Skip to content

Instantly share code, notes, and snippets.

@Bigcheese
Created March 5, 2012 03:09
Show Gist options
  • Save Bigcheese/1976266 to your computer and use it in GitHub Desktop.
Save Bigcheese/1976266 to your computer and use it in GitHub Desktop.
handler 3 11 // @TALKED
// BB#0: // %entry
push_event
push_const 296
add
fetch_i
push_reg_sp
fetch_i
push_const 5
func_call 3735928559
shift_sp -1
func_call 3735928559
exit_handler
handler_end
From...
%CreatureData = type <{ [8 x i8], double, double, double, i32, [60 x i8] ; 100
, i32, i32, i32, [18 x i8] ; 120
, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x i8] ; 164
, i8*, [92 x i8] ; 264
, i32, [278 x i8] ; 456
, double, [8 x i8] ; 472
, double
; Yeah, I'm way too lazy to manually do the rest of this, but you should get the point.
}>
%StaticObjectData = type opaque
%ItemData = type <{ [8 x i8], double, double, double, [4 x i8] ; 36
, i32, [64 x i8] ; 104
, i64, [4 x i8] ; 116
, i32, i32, [20 x i8] ; 144
, i32
}>
%GlobalObject = type <{ [52 x i8], i32 }>
%NpcEvent = type <{ [40 x i8], %CreatureData*, %CreatureData*, %CreatureData*, %CreatureData*, %CreatureData*, %CreatureData*, %CreatureData*, %CreatureData*, [8 x i8] ; 112, 10, 10
, %CreatureData*, %StaticObjectData*, %ItemData*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x i8] ; 272, 35, 45
, i64, i64, i64, i64 ; 49
; Not complete...
, %GlobalObject*
}>
%NpcMakerEvent = type <{ [40 x i8], %CreatureData*, %CreatureData*, %CreatureData*, %CreatureData*, %CreatureData*, %CreatureData*, %CreatureData*, %CreatureData*, [8 x i8] ; 112, 10, 10
, %CreatureData*, %StaticObjectData*, %ItemData*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [4 x i8] ; 272, 35, 45
, i64, i64, i64, i64 ; 49
; Not complete...
, %GlobalObject*
}>
declare %NpcEvent* @llvm.aiobj.push.event() nounwind readnone
declare i64 @llvm.aiobj.test(i64) nounwind
declare i64 @llvm.aiobj.add.i64.i64(i64, i64) nounwind readnone
declare i8* @GlobalObject.IntToStr(%GlobalObject*, i64) nounwind readnone
declare void @GlobalObject.Announce(%GlobalObject*, i8*) nounwind
define void @TALKED() {
entry:
%event = call %NpcEvent* @llvm.aiobj.push.event()
%gg = getelementptr inbounds %NpcEvent* %event, i32 0, i32 48
%ggval0 = load %GlobalObject** %gg
%str = call i8* @GlobalObject.IntToStr(%GlobalObject* %ggval0, i64 5)
call void @GlobalObject.Announce(%GlobalObject* %ggval0, i8* %str)
ret void
}
!0 = metadata !{ i32 1, metadata !"SizeofPointer", i32 8 }
!1 = metadata !{ i32 1, metadata !"SharedFactoryVersion", i32 69 }
!2 = metadata !{ i32 1, metadata !"NPCHVersion", i32 79 }
!3 = metadata !{ i32 1, metadata !"NASCVersion", i32 2 }
!4 = metadata !{ i32 1, metadata !"NPCEventHVersion", i32 2 }
!llvm.module.flags = !{ !0, !1, !2, !3, !4 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment