LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: plat_hit_top
void plat_hit_top (edict_t *ent)
{
	if (!(ent->flags & FL_TEAMSLAVE))
	{
		if (ent->moveinfo.sound_end)
			gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, ent->moveinfo.sound_end, 1, ATTN_STATIC, 0);
		ent->s.sound = 0;
	}
	ent->moveinfo.state = STATE_TOP;

	ent->think = plat_go_down;
	ent->nextthink = level.time + 3;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x4, 0x11d(%rdi)
jne 0x2a363
movl 0x370(%rbx), %edx
testl %edx, %edx
je 0x2a35f
movq 0x3c2bd(%rip), %rax     # 0x66600
pushq $0xa
popq %rsi
movss 0x24bda(%rip), %xmm0    # 0x4ef28
movss 0x24bb6(%rip), %xmm1    # 0x4ef0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq *0x20(%rax)
andl $0x0, 0x4c(%rbx)
andl $0x0, 0x388(%rbx)
movq 0x3c647(%rip), %rax     # 0x669b8
movq %rax, 0x210(%rbx)
movq 0x3ca21(%rip), %rax     # 0x66da0
movss 0x4(%rax), %xmm0
addss 0x24b80(%rip), %xmm0    # 0x4ef0c
movss %xmm0, 0x200(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: plat_go_down
void plat_go_down (edict_t *ent)
{
	if (!(ent->flags & FL_TEAMSLAVE))
	{
		if (ent->moveinfo.sound_start)
			gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, ent->moveinfo.sound_start, 1, ATTN_STATIC, 0);
		ent->s.sound = ent->moveinfo.sound_middle;
	}
	ent->moveinfo.state = STATE_DOWN;
	Move_Calc (ent, ent->moveinfo.end_origin, plat_hit_bottom);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x4, 0x11d(%rdi)
jne 0x2a3d9
movl 0x368(%rbx), %edx
testl %edx, %edx
je 0x2a3d0
movq 0x3c24c(%rip), %rax     # 0x66600
pushq $0xa
popq %rsi
movss 0x24b69(%rip), %xmm0    # 0x4ef28
movss 0x24b45(%rip), %xmm1    # 0x4ef0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq *0x20(%rax)
movl 0x36c(%rbx), %eax
movl %eax, 0x4c(%rbx)
movl $0x3, 0x388(%rbx)
leaq 0x350(%rbx), %rsi
movq 0x3c4af(%rip), %rdx     # 0x668a0
movq %rbx, %rdi
popq %rbx
jmp 0x18f90
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: plat_hit_bottom
void plat_hit_bottom (edict_t *ent)
{
	if (!(ent->flags & FL_TEAMSLAVE))
	{
		if (ent->moveinfo.sound_end)
			gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, ent->moveinfo.sound_end, 1, ATTN_STATIC, 0);
		ent->s.sound = 0;
	}
	ent->moveinfo.state = STATE_BOTTOM;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x4, 0x11d(%rdi)
jne 0x2a438
movl 0x370(%rbx), %edx
testl %edx, %edx
je 0x2a434
movq 0x3c1e8(%rip), %rax     # 0x66600
pushq $0xa
popq %rsi
movss 0x24b05(%rip), %xmm0    # 0x4ef28
movss 0x24ae1(%rip), %xmm1    # 0x4ef0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq *0x20(%rax)
andl $0x0, 0x4c(%rbx)
movl $0x1, 0x388(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: plat_go_up
void plat_go_up (edict_t *ent)
{
	if (!(ent->flags & FL_TEAMSLAVE))
	{
		if (ent->moveinfo.sound_start)
			gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, ent->moveinfo.sound_start, 1, ATTN_STATIC, 0);
		ent->s.sound = ent->moveinfo.sound_middle;
	}
	ent->moveinfo.state = STATE_UP;
	Move_Calc (ent, ent->moveinfo.start_origin, plat_hit_top);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x4, 0x11d(%rdi)
jne 0x2a487
movl 0x368(%rbx), %edx
testl %edx, %edx
je 0x2a47e
movq 0x3c19e(%rip), %rax     # 0x66600
pushq $0xa
popq %rsi
movss 0x24abb(%rip), %xmm0    # 0x4ef28
movss 0x24a97(%rip), %xmm1    # 0x4ef0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq *0x20(%rax)
movl 0x36c(%rbx), %eax
movl %eax, 0x4c(%rbx)
leaq 0x338(%rbx), %rsi
movl $0x2, 0x388(%rbx)
movq 0x3c509(%rip), %rdx     # 0x669a8
movq %rbx, %rdi
popq %rbx
jmp 0x18f90
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: plat_blocked
void plat_blocked (edict_t *self, edict_t *other)
{
	if (!(other->svflags & SVF_MONSTER) && (!other->client) )
	{
		// give it a chance to go away on it's own terms (like gibs)
		T_Damage (other, self, self, vec3_origin, other->s.origin, vec3_origin, 100000, 1, 0, MOD_CRUSH);
		// if it's still there, nuke it
		if (other)
			BecomeExplosion1 (other);
		return;
	}

	T_Damage (other, self, self, vec3_origin, other->s.origin, vec3_origin, self->dmg, 1, 0, MOD_CRUSH);

	if (self->moveinfo.state == STATE_UP)
		plat_go_down (self);
	else if (self->moveinfo.state == STATE_DOWN)
		plat_go_up (self);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testb $0x4, 0xc8(%rsi)
jne 0x2a4c2
cmpq $0x0, 0x58(%r14)
je 0x2a525
leaq 0x4(%r14), %r8
movl 0x280(%rbx), %eax
movq 0x3c295(%rip), %rcx     # 0x66768
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rcx, %r9
pushq $0x14
pushq $0x0
pushq $0x1
pushq %rax
callq 0x19260
addq $0x20, %rsp
movl 0x388(%rbx), %eax
cmpl $0x3, %eax
je 0x2a50e
cmpl $0x2, %eax
jne 0x2a51d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19ce8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x180f0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4(%r14), %r8
movq 0x3c238(%rip), %rcx     # 0x66768
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rcx, %r9
pushq $0x14
pushq $0x0
pushq $0x1
pushq $0x186a0                # imm = 0x186A0
callq 0x19260
addq $0x20, %rsp
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19780
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: Touch_Plat_Center
void Touch_Plat_Center (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
{
	if (!other->client)
		return;
		
	if (other->health <= 0)
		return;

	ent = ent->enemy;	// now point at the plat, not the trigger
	if (ent->moveinfo.state == STATE_BOTTOM)
		plat_go_up (ent);
	else if (ent->moveinfo.state == STATE_TOP)
		ent->nextthink = level.time + 1;	// the player is still on the plat, so delay going down
}

// Assembly:
cmpq $0x0, 0x58(%rsi)
je 0x2a5b5
cmpl $0x0, 0x254(%rsi)
jle 0x2a5b5
movq 0x2a0(%rdi), %rdi
movl 0x388(%rdi), %eax
testl %eax, %eax
je 0x2a599
cmpl $0x1, %eax
jne 0x2a5b5
jmp 0x180f0
movq 0x3c800(%rip), %rax     # 0x66da0
movss 0x4(%rax), %xmm0
addss 0x2497b(%rip), %xmm0    # 0x4ef28
movss %xmm0, 0x200(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: plat_spawn_inside_trigger
void plat_spawn_inside_trigger (edict_t *ent)
{
	edict_t	*trigger;
	vec3_t	tmin, tmax;

//
// middle trigger
//	
	trigger = G_Spawn();
	trigger->touch = Touch_Plat_Center;
	trigger->movetype = MOVETYPE_NONE;
	trigger->solid = SOLID_TRIGGER;
	trigger->enemy = ent;
	
	tmin[0] = ent->mins[0] + 25;
	tmin[1] = ent->mins[1] + 25;
	tmin[2] = ent->mins[2];

	tmax[0] = ent->maxs[0] - 25;
	tmax[1] = ent->maxs[1] - 25;
	tmax[2] = ent->maxs[2] + 8;

	tmin[2] = tmax[2] - (ent->pos1[2] - ent->pos2[2] + st.lip);

	if (ent->spawnflags & PLAT_LOW_TRIGGER)
		tmax[2] = tmin[2] + 8;
	
	if (tmax[0] - tmin[0] <= 0)
	{
		tmin[0] = (ent->mins[0] + ent->maxs[0]) *0.5;
		tmax[0] = tmin[0] + 1;
	}
	if (tmax[1] - tmin[1] <= 0)
	{
		tmin[1] = (ent->mins[1] + ent->maxs[1]) *0.5;
		tmax[1] = tmin[1] + 1;
	}
	
	VectorCopy (tmin, trigger->mins);
	VectorCopy (tmax, trigger->maxs);

	gi.linkentity (trigger);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x198d0
movq 0x3c5fa(%rip), %rcx     # 0x66bc0
movq %rcx, 0x220(%rax)
andl $0x0, 0x118(%rax)
movl $0x1, 0x108(%rax)
movq %rbx, 0x2a0(%rax)
movss 0x2490b(%rip), %xmm2    # 0x4eef8
movss 0xe0(%rbx), %xmm0
addss %xmm2, %xmm0
movss 0x1b0(%rbx), %xmm1
subss 0x1bc(%rbx), %xmm1
movq 0x3c058(%rip), %rcx     # 0x66668
cvtsi2ssl 0x20(%rcx), %xmm3
addss %xmm1, %xmm3
movaps %xmm0, %xmm1
subss %xmm3, %xmm1
testb $0x1, 0x140(%rbx)
je 0x2a630
addss %xmm1, %xmm2
movaps %xmm2, %xmm0
movsd 0xcc(%rbx), %xmm2
movsd 0xd8(%rbx), %xmm3
movaps 0x27619(%rip), %xmm4    # 0x51c60
addps %xmm2, %xmm4
addps %xmm3, %xmm2
addps 0x2761c(%rip), %xmm3    # 0x51c70
mulps 0x275f5(%rip), %xmm2    # 0x51c50
movaps %xmm3, %xmm5
subps %xmm4, %xmm5
xorps %xmm6, %xmm6
cmpnleps %xmm6, %xmm5
movaps %xmm5, %xmm6
andnps %xmm2, %xmm6
andps %xmm5, %xmm4
orps %xmm6, %xmm4
movlps %xmm4, 0xcc(%rax)
addps 0x275be(%rip), %xmm2    # 0x51c40
movss %xmm1, 0xd4(%rax)
andps %xmm5, %xmm3
andnps %xmm2, %xmm5
orps %xmm3, %xmm5
movlps %xmm5, 0xd8(%rax)
movss %xmm0, 0xe0(%rax)
movq 0x3bf57(%rip), %rcx     # 0x66600
movq %rax, %rdi
popq %rbx
jmpq *0x90(%rcx)
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: rotating_use
void rotating_use (edict_t *self, edict_t *other, edict_t *activator)
{
	if (!VectorCompare (self->avelocity, vec3_origin))
	{
		self->s.sound = 0;
		VectorClear (self->avelocity);
		self->touch = NULL;
	}
	else
	{
		self->s.sound = self->moveinfo.sound_middle;
		VectorScale (self->movedir, self->speed, self->avelocity);
		if (self->spawnflags & 16)
			self->touch = rotating_touch;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1cc(%rdi), %r14
movq 0x3bdd5(%rip), %rsi     # 0x66768
movq %r14, %rdi
callq 0x18c20
testl %eax, %eax
je 0x2a9d1
movl 0x36c(%rbx), %eax
movl %eax, 0x4c(%rbx)
leaq 0x19c(%rbx), %rdi
movss 0x190(%rbx), %xmm0
movq %r14, %rsi
callq 0x18a70
testb $0x10, 0x140(%rbx)
je 0x2a9ed
movq 0x3c031(%rip), %rax     # 0x66a00
jmp 0x2a9e6
andl $0x0, 0x4c(%rbx)
andl $0x0, 0x1d4(%rbx)
andq $0x0, 0x1cc(%rbx)
xorl %eax, %eax
movq %rax, 0x220(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: SP_func_rotating
void SP_func_rotating (edict_t *ent)
{
	ent->solid = SOLID_BSP;
	if (ent->spawnflags & 32)
		ent->movetype = MOVETYPE_STOP;
	else
		ent->movetype = MOVETYPE_PUSH;

	// set the axis of rotation
	VectorClear(ent->movedir);
	if (ent->spawnflags & 4)
		ent->movedir[2] = 1.0;
	else if (ent->spawnflags & 8)
		ent->movedir[0] = 1.0;
	else // Z_AXIS
		ent->movedir[1] = 1.0;

	// check for reverse rotation
	if (ent->spawnflags & 2)
		VectorNegate (ent->movedir, ent->movedir);

	if (!ent->speed)
		ent->speed = 100;
	if (!ent->dmg)
		ent->dmg = 2;

//	ent->moveinfo.sound_middle = "doors/hydro1.wav";

	ent->use = rotating_use;
	if (ent->dmg)
		ent->blocked = rotating_blocked;

	if (ent->spawnflags & 1)
		ent->use (ent, NULL, NULL);

	if (ent->spawnflags & 64)
		ent->s.effects |= EF_ANIM_ALL;
	if (ent->spawnflags & 128)
		ent->s.effects |= EF_ANIM_ALLFAST;

	gi.setmodel (ent, ent->model);
	gi.linkentity (ent);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x3
popq %rcx
movl %ecx, 0x108(%rdi)
movl 0x140(%rdi), %eax
movl %eax, %edx
andl $0x20, %edx
cmpl $0x1, %edx
sbbl $0x0, %ecx
movl %ecx, 0x118(%rdi)
leaq 0x19c(%rdi), %rdx
leaq 0x1a4(%rdi), %rcx
andl $0x0, 0x1a4(%rdi)
andq $0x0, 0x19c(%rdi)
testb $0x4, %al
jne 0x2aa85
leaq 0x1a0(%rbx), %rsi
xorl %edi, %edi
testb $0x8, %al
cmovneq %rdx, %rsi
sete %dil
movd %edi, %xmm0
pshufd $0x50, %xmm0, %xmm0     # xmm0 = xmm0[0,0,1,1]
pslld $0x1f, %xmm0
psrad $0x1f, %xmm0
movd 0x244bd(%rip), %xmm1    # 0x4ef28
movdqa %xmm0, %xmm2
pandn %xmm1, %xmm2
pand 0x27225(%rip), %xmm0    # 0x51ca0
por %xmm2, %xmm0
pxor %xmm1, %xmm1
jmp 0x2aa94
pxor %xmm0, %xmm0
movd 0x24497(%rip), %xmm1    # 0x4ef28
movq %rcx, %rsi
movl $0x3f800000, (%rsi)     # imm = 0x3F800000
testb $0x2, %al
je 0x2aab6
movdqa 0x2720a(%rip), %xmm2    # 0x51cb0
pxor %xmm2, %xmm0
movq %xmm0, (%rdx)
pxor %xmm2, %xmm1
movd %xmm1, (%rcx)
movss 0x190(%rbx), %xmm0
pxor %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x2aad3
jp 0x2aad3
movl $0x42c80000, 0x190(%rbx) # imm = 0x42C80000
cmpl $0x0, 0x280(%rbx)
jne 0x2aae6
movl $0x2, 0x280(%rbx)
movq 0x3b963(%rip), %rcx     # 0x66450
movq %rcx, 0x228(%rbx)
movq 0x3ba6d(%rip), %rcx     # 0x66568
movq %rcx, 0x218(%rbx)
testb $0x1, %al
je 0x2ab14
movq %rbx, %rdi
callq 0x19c60
movl 0x140(%rbx), %eax
testb $0x40, %al
je 0x2ab1c
orb $0x10, 0x41(%rbx)
testb %al, %al
jns 0x2ab24
orb $0x20, 0x41(%rbx)
movq 0x3bad5(%rip), %r14     # 0x66600
movq 0x120(%rbx), %rsi
movq %rbx, %rdi
callq *0x58(%r14)
movq %rbx, %rdi
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x90(%rax)
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: button_return
void button_return (edict_t *self)
{
	self->moveinfo.state = STATE_DOWN;

	Move_Calc (self, self->moveinfo.start_origin, button_done);

	self->s.frame = 0;

	if (self->health)
		self->takedamage = DAMAGE_YES;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x338(%rdi), %rsi
movl $0x3, 0x388(%rdi)
movq 0x3bf7d(%rip), %rdx     # 0x66b00
callq 0x18f90
andl $0x0, 0x38(%rbx)
cmpl $0x0, 0x254(%rbx)
je 0x2ab9f
movl $0x1, 0x27c(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: button_wait
void button_wait (edict_t *self)
{
	self->moveinfo.state = STATE_TOP;
	self->s.effects &= ~EF_ANIM01;
	self->s.effects |= EF_ANIM23;

	G_UseTargets (self, self->activator);
	self->s.frame = 1;
	if (self->moveinfo.wait >= 0)
	{
		self->nextthink = level.time + self->moveinfo.wait;
		self->think = button_return;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
andl $0x0, 0x388(%rdi)
movl $0xfffff3ff, %eax       # imm = 0xFFFFF3FF
andl 0x40(%rdi), %eax
orl $0x800, %eax            # imm = 0x800
movl %eax, 0x40(%rdi)
movq 0x2b0(%rdi), %rsi
callq 0x19ac0
movl $0x1, 0x38(%rbx)
movss 0x384(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x2ac01
movq 0x3c1ba(%rip), %rax     # 0x66da0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x200(%rbx)
movq 0x3b8e6(%rip), %rax     # 0x664e0
movq %rax, 0x210(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: button_fire
void button_fire (edict_t *self)
{
	if (self->moveinfo.state == STATE_UP || self->moveinfo.state == STATE_TOP)
		return;

	self->moveinfo.state = STATE_UP;
	if (self->moveinfo.sound_start && !(self->flags & FL_TEAMSLAVE))
		gi.sound (self, CHAN_NO_PHS_ADD+CHAN_VOICE, self->moveinfo.sound_start, 1, ATTN_STATIC, 0);
	Move_Calc (self, self->moveinfo.end_origin, button_wait);
}

// Assembly:
testl $0xfffffffd, 0x388(%rdi) # imm = 0xFFFFFFFD
jne 0x2ac10
retq
pushq %rbx
movq %rdi, %rbx
movl $0x2, 0x388(%rdi)
movl 0x368(%rdi), %edx
testl %edx, %edx
je 0x2ac54
testb $0x4, 0x11d(%rbx)
jne 0x2ac54
movq 0x3b9c8(%rip), %rax     # 0x66600
pushq $0xa
popq %rsi
movss 0x242e5(%rip), %xmm0    # 0x4ef28
movss 0x242c1(%rip), %xmm1    # 0x4ef0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq *0x20(%rax)
leaq 0x350(%rbx), %rsi
movq 0x3bb7e(%rip), %rdx     # 0x667e0
movq %rbx, %rdi
popq %rbx
jmp 0x18f90
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: door_use_areaportals
void door_use_areaportals (edict_t *self, qboolean open)
{
	edict_t	*t = NULL;

	if (!self->target)
		return;

	//surt eliminate level 4 warnings. (removed assignment in conditional while)
	t = G_Find (t, FOFS(targetname), self->target);
	while (t)
	{
		if (Q_stricmp(t->classname, "func_areaportal") == 0)
		{
			gi.SetAreaPortalState (t->style, open);
		}
		t = G_Find (t, FOFS(targetname), self->target);
	}
}

// Assembly:
movq 0x150(%rdi), %rdx
testq %rdx, %rdx
je 0x2af8b
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %edi, %edi
movl $0x158, %esi            # imm = 0x158
callq 0x195e0
movq %rax, %r12
leaq 0x26e0a(%rip), %r15     # 0x51d42
movq 0x3b6c1(%rip), %r13     # 0x66600
testq %r12, %r12
je 0x2af82
movq 0x138(%r12), %rdi
movq %r15, %rsi
callq 0x186d0
testl %eax, %eax
jne 0x2af69
movl 0x32c(%r12), %edi
movl %ebx, %esi
callq *0x80(%r13)
movq 0x150(%r14), %rdx
movq %r12, %rdi
movl $0x158, %esi            # imm = 0x158
callq 0x195e0
movq %rax, %r12
jmp 0x2af3f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: door_hit_top
void door_hit_top (edict_t *self)
{
	if (!(self->flags & FL_TEAMSLAVE))
	{
		if (self->moveinfo.sound_end)
			gi.sound (self, CHAN_NO_PHS_ADD+CHAN_VOICE, self->moveinfo.sound_end, 1, ATTN_STATIC, 0);
		self->s.sound = 0;
	}
	self->moveinfo.state = STATE_TOP;
	if (self->spawnflags & DOOR_TOGGLE)
		return;
	if (self->moveinfo.wait >= 0)
	{
		self->think = door_go_down;
		self->nextthink = level.time + self->moveinfo.wait;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x4, 0x11d(%rdi)
jne 0x2afca
movl 0x370(%rbx), %edx
testl %edx, %edx
je 0x2afc6
movq 0x3b656(%rip), %rax     # 0x66600
pushq $0xa
popq %rsi
movss 0x23f73(%rip), %xmm0    # 0x4ef28
movss 0x23f4f(%rip), %xmm1    # 0x4ef0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq *0x20(%rax)
andl $0x0, 0x4c(%rbx)
andl $0x0, 0x388(%rbx)
testb $0x20, 0x140(%rbx)
jne 0x2b00c
movss 0x384(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x2b00c
movq 0x3bf27(%rip), %rax     # 0x66f18
movq %rax, 0x210(%rbx)
movq 0x3bda1(%rip), %rax     # 0x66da0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x200(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: door_go_down
void door_go_down (edict_t *self)
{
	if (!(self->flags & FL_TEAMSLAVE))
	{
		if (self->moveinfo.sound_start)
			gi.sound (self, CHAN_NO_PHS_ADD+CHAN_VOICE, self->moveinfo.sound_start, 1, ATTN_STATIC, 0);
		self->s.sound = self->moveinfo.sound_middle;
	}
	if (self->max_health)
	{
		self->takedamage = DAMAGE_YES;
		self->health = self->max_health;
	}
	
	self->moveinfo.state = STATE_DOWN;
	if (strcmp(self->classname, "func_door") == 0)
		Move_Calc (self, self->moveinfo.start_origin, door_hit_bottom);
	else if (strcmp(self->classname, "func_door_rotating") == 0)
		AngleMove_Calc (self, door_hit_bottom);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testb $0x4, 0x11d(%rdi)
jne 0x2b054
movl 0x368(%rbx), %edx
testl %edx, %edx
je 0x2b04b
movq 0x3b5d1(%rip), %rax     # 0x66600
pushq $0xa
popq %rsi
movss 0x23eee(%rip), %xmm0    # 0x4ef28
movss 0x23eca(%rip), %xmm1    # 0x4ef0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq *0x20(%rax)
movl 0x36c(%rbx), %eax
movl %eax, 0x4c(%rbx)
movl 0x258(%rbx), %eax
testl %eax, %eax
je 0x2b06e
movl $0x1, 0x27c(%rbx)
movl %eax, 0x254(%rbx)
movl $0x3, 0x388(%rbx)
movq 0x138(%rbx), %r14
leaq 0x26ccc(%rip), %rsi     # 0x51d52
movq %r14, %rdi
callq 0x18bc0
testl %eax, %eax
je 0x2b0ad
leaq 0x26cc3(%rip), %rsi     # 0x51d5c
movq %r14, %rdi
callq 0x18bc0
testl %eax, %eax
je 0x2b0ca
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x338(%rbx), %rsi
movq 0x3bd95(%rip), %rdx     # 0x66e50
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x18f90
movq 0x3bd7f(%rip), %rsi     # 0x66e50
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x182f0
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: door_hit_bottom
void door_hit_bottom (edict_t *self)
{
	if (!(self->flags & FL_TEAMSLAVE))
	{
		if (self->moveinfo.sound_end)
			gi.sound (self, CHAN_NO_PHS_ADD+CHAN_VOICE, self->moveinfo.sound_end, 1, ATTN_STATIC, 0);
		self->s.sound = 0;
	}
	self->moveinfo.state = STATE_BOTTOM;
	door_use_areaportals (self, false);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x4, 0x11d(%rdi)
jne 0x2b11e
movl 0x370(%rbx), %edx
testl %edx, %edx
je 0x2b11a
movq 0x3b502(%rip), %rax     # 0x66600
pushq $0xa
popq %rsi
movss 0x23e1f(%rip), %xmm0    # 0x4ef28
movss 0x23dfb(%rip), %xmm1    # 0x4ef0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq *0x20(%rax)
andl $0x0, 0x4c(%rbx)
movl $0x1, 0x388(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x18250
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: door_go_up
void door_go_up (edict_t *self, edict_t *activator)
{
	if (self->moveinfo.state == STATE_UP)
		return;		// already going up

	if (self->moveinfo.state == STATE_TOP)
	{	// reset top wait time
		if (self->moveinfo.wait >= 0)
			self->nextthink = level.time + self->moveinfo.wait;
		return;
	}
	
	if (!(self->flags & FL_TEAMSLAVE))
	{
		if (self->moveinfo.sound_start)
			gi.sound (self, CHAN_NO_PHS_ADD+CHAN_VOICE, self->moveinfo.sound_start, 1, ATTN_STATIC, 0);
		self->s.sound = self->moveinfo.sound_middle;
	}
	self->moveinfo.state = STATE_UP;
	if (strcmp(self->classname, "func_door") == 0)
		Move_Calc (self, self->moveinfo.end_origin, door_hit_top);
	else if (strcmp(self->classname, "func_door_rotating") == 0)
		AngleMove_Calc (self, door_hit_top);

	G_UseTargets (self, activator);
	door_use_areaportals (self, true);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl 0x388(%rdi), %eax
cmpl $0x2, %eax
je 0x2b16e
movq %rdi, %rbx
testl %eax, %eax
jne 0x2b174
movss 0x384(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x2b16e
movq 0x3bc3f(%rip), %rax     # 0x66da0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x200(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rsi, %r14
testb $0x4, 0x11d(%rbx)
jne 0x2b1b6
movl 0x368(%rbx), %edx
testl %edx, %edx
je 0x2b1ad
movq 0x3b46f(%rip), %rax     # 0x66600
pushq $0xa
popq %rsi
movss 0x23d8c(%rip), %xmm0    # 0x4ef28
movss 0x23d68(%rip), %xmm1    # 0x4ef0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq *0x20(%rax)
movl 0x36c(%rbx), %eax
movl %eax, 0x4c(%rbx)
movl $0x2, 0x388(%rbx)
movq 0x138(%rbx), %r15
leaq 0x26b84(%rip), %rsi     # 0x51d52
movq %r15, %rdi
callq 0x18bc0
testl %eax, %eax
je 0x2b1fe
leaq 0x26b7b(%rip), %rsi     # 0x51d5c
movq %r15, %rdi
callq 0x18bc0
testl %eax, %eax
jne 0x2b214
movq 0x3b6b4(%rip), %rsi     # 0x668a8
movq %rbx, %rdi
callq 0x182f0
jmp 0x2b214
leaq 0x350(%rbx), %rsi
movq 0x3b69c(%rip), %rdx     # 0x668a8
movq %rbx, %rdi
callq 0x18f90
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19ac0
pushq $0x1
popq %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x18250
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: door_use
void door_use (edict_t *self, edict_t *other, edict_t *activator)
{
	edict_t	*ent;

	if (self->flags & FL_TEAMSLAVE)
		return;

	if (self->spawnflags & DOOR_TOGGLE)
	{
		if (self->moveinfo.state == STATE_UP || self->moveinfo.state == STATE_TOP)
		{
			// trigger all paired doors
			for (ent = self ; ent ; ent = ent->teamchain)
			{
				ent->message = NULL;
				ent->touch = NULL;
				door_go_down (ent);
			}
			return;
		}
	}
	
	// trigger all paired doors
	for (ent = self ; ent ; ent = ent->teamchain)
	{
		ent->message = NULL;
		ent->touch = NULL;
		door_go_up (ent, activator);
	}
}

// Assembly:
testb $0x4, 0x11d(%rdi)
jne 0x2b2ab
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
testb $0x20, 0x140(%rdi)
je 0x2b29f
testl $0xfffffffd, 0x388(%rbx) # imm = 0xFFFFFFFD
jne 0x2b29f
testq %rbx, %rbx
je 0x2b2a4
andq $0x0, 0x130(%rbx)
andq $0x0, 0x220(%rbx)
movq %rbx, %rdi
callq 0x19d50
movq 0x2c8(%rbx), %rbx
jmp 0x2b257
andq $0x0, 0x130(%rbx)
andq $0x0, 0x220(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x18810
movq 0x2c8(%rbx), %rbx
testq %rbx, %rbx
jne 0x2b27d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: Touch_DoorTrigger
void Touch_DoorTrigger (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
{
	if (other->health <= 0)
		return;

	if (!(other->svflags & SVF_MONSTER) && (!other->client))
		return;

	if ((self->owner->spawnflags & DOOR_NOMONSTER) && (other->svflags & SVF_MONSTER))
		return;

	if (level.time < self->touch_debounce_time)
		return;
	self->touch_debounce_time = level.time + 1.0;

	door_use (self->owner, other, other);
}

// Assembly:
cmpl $0x0, 0x254(%rsi)
jle 0x2b2f7
movl 0xc8(%rsi), %ecx
testb $0x4, %cl
jne 0x2b2c7
cmpq $0x0, 0x58(%rsi)
je 0x2b2f7
movq 0x110(%rdi), %rax
testb $0x4, %cl
je 0x2b2de
movl 0x140(%rax), %ecx
andl $0x8, %ecx
jne 0x2b2f7
movq 0x3babb(%rip), %rcx     # 0x66da0
movss 0x4(%rcx), %xmm0
movss 0x240(%rdi), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x2b2f8
retq
addss 0x23c28(%rip), %xmm0    # 0x4ef28
movss %xmm0, 0x240(%rdi)
movq %rax, %rdi
movq %rsi, %rdx
jmp 0x19cf0
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: Think_CalcMoveSpeed
void Think_CalcMoveSpeed (edict_t *self)
{
	edict_t	*ent;
	float	min;
	float	time;
	float	newspeed;
	float	ratio;
	float	dist;

	if (self->flags & FL_TEAMSLAVE)
		return;		// only the team master does this

	// find the smallest distance any member of the team will be moving
	min = fabs(self->moveinfo.distance);
	for (ent = self->teamchain; ent; ent = ent->teamchain)
	{
		dist = fabs(ent->moveinfo.distance);
		if (dist < min)
			min = dist;
	}

	time = min / self->moveinfo.speed;

	// adjust speeds so they will all complete at the same time
	for (ent = self; ent; ent = ent->teamchain)
	{
		newspeed = fabs(ent->moveinfo.distance) / time;
		ratio = newspeed / ent->moveinfo.speed;
		if (ent->moveinfo.accel == ent->moveinfo.speed)
			ent->moveinfo.accel = newspeed;
		else
			ent->moveinfo.accel *= ratio;
		if (ent->moveinfo.decel == ent->moveinfo.speed)
			ent->moveinfo.decel = newspeed;
		else
			ent->moveinfo.decel *= ratio;
		ent->moveinfo.speed = newspeed;
	}
}

// Assembly:
testb $0x4, 0x11d(%rdi)
jne 0x2b3e5
movss 0x380(%rdi), %xmm0
andps 0x23c11(%rip), %xmm0    # 0x4ef40
movaps 0x23c0a(%rip), %xmm1    # 0x4ef40
movq %rdi, %rax
movq 0x2c8(%rax), %rax
testq %rax, %rax
je 0x2b359
movss 0x380(%rax), %xmm2
andps %xmm1, %xmm2
minss %xmm0, %xmm2
movaps %xmm2, %xmm0
jmp 0x2b339
divss 0x378(%rdi), %xmm0
testq %rdi, %rdi
je 0x2b3e5
movss 0x380(%rdi), %xmm2
andps %xmm1, %xmm2
divss %xmm0, %xmm2
movss 0x378(%rdi), %xmm3
movaps %xmm2, %xmm4
divss %xmm3, %xmm4
movss 0x374(%rdi), %xmm5
movaps %xmm5, %xmm6
mulss %xmm4, %xmm6
cmpeqss %xmm3, %xmm5
movaps %xmm5, %xmm7
andps %xmm2, %xmm7
andnps %xmm6, %xmm5
orps %xmm7, %xmm5
movss %xmm5, 0x374(%rdi)
movss 0x37c(%rdi), %xmm5
mulss %xmm5, %xmm4
cmpeqss %xmm3, %xmm5
movaps %xmm5, %xmm3
andps %xmm2, %xmm3
andnps %xmm4, %xmm5
orps %xmm3, %xmm5
movss %xmm5, 0x37c(%rdi)
movss %xmm2, 0x378(%rdi)
movq 0x2c8(%rdi), %rdi
jmp 0x2b361
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: Think_SpawnDoorTrigger
void Think_SpawnDoorTrigger (edict_t *ent)
{
	edict_t		*other;
	vec3_t		mins, maxs;

	if (ent->flags & FL_TEAMSLAVE)
		return;		// only the team leader spawns a trigger

	VectorCopy (ent->absmin, mins);
	VectorCopy (ent->absmax, maxs);

	for (other = ent->teamchain ; other ; other=other->teamchain)
	{
		AddPointToBounds (other->absmin, mins, maxs);
		AddPointToBounds (other->absmax, mins, maxs);
	}

	// expand 
	mins[0] -= 60;
	mins[1] -= 60;
	maxs[0] += 60;
	maxs[1] += 60;

	other = G_Spawn ();
	VectorCopy (mins, other->mins);
	VectorCopy (maxs, other->maxs);
	other->owner = ent;
	other->solid = SOLID_TRIGGER;
	other->movetype = MOVETYPE_NONE;
	other->touch = Touch_DoorTrigger;
	gi.linkentity (other);

	if (ent->spawnflags & DOOR_START_OPEN)
		door_use_areaportals (ent, true);

	Think_CalcMoveSpeed (ent);
}

// Assembly:
testb $0x4, 0x11d(%rdi)
jne 0x2b531
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movsd 0xe4(%rdi), %xmm0
leaq 0x18(%rsp), %r14
movsd %xmm0, (%r14)
movss 0xec(%rdi), %xmm0
movss %xmm0, 0x8(%r14)
movsd 0xf0(%rdi), %xmm0
leaq 0x8(%rsp), %r15
movsd %xmm0, (%r15)
movss 0xf8(%rdi), %xmm0
movss %xmm0, 0x8(%r15)
movq %rdi, %r12
movq 0x2c8(%r12), %r12
testq %r12, %r12
je 0x2b479
leaq 0xe4(%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x18d00
leaq 0xf0(%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x18d00
jmp 0x2b444
movsd 0x18(%rsp), %xmm0
addps 0x2683a(%rip), %xmm0    # 0x51cc0
movlps %xmm0, 0x18(%rsp)
movsd 0x8(%rsp), %xmm0
addps 0x26838(%rip), %xmm0    # 0x51cd0
movlps %xmm0, 0x8(%rsp)
callq 0x198d0
movsd 0x1c(%rsp), %xmm0
movss 0x18(%rsp), %xmm1
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movss 0x8(%rsp), %xmm2
shufps $0xd4, %xmm0, %xmm2     # xmm2 = xmm2[0,1],xmm0[1,3]
shufps $0x28, %xmm2, %xmm1     # xmm1 = xmm1[0,2],xmm2[2,0]
movups %xmm1, 0xcc(%rax)
movsd 0xc(%rsp), %xmm0
movsd %xmm0, 0xdc(%rax)
movq %rbx, 0x110(%rax)
movl $0x1, 0x108(%rax)
andl $0x0, 0x118(%rax)
movq 0x3b9ed(%rip), %rcx     # 0x66ee0
movq %rcx, 0x220(%rax)
movq 0x3b0ff(%rip), %rcx     # 0x66600
movq %rax, %rdi
callq *0x90(%rcx)
testb $0x1, 0x140(%rbx)
je 0x2b51e
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x18250
movq %rbx, %rdi
callq 0x19d40
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: door_blocked
void door_blocked  (edict_t *self, edict_t *other)
{
	edict_t	*ent;

	if (!(other->svflags & SVF_MONSTER) && (!other->client) )
	{
		// give it a chance to go away on it's own terms (like gibs)
		T_Damage (other, self, self, vec3_origin, other->s.origin, vec3_origin, 100000, 1, 0, MOD_CRUSH);
		// if it's still there, nuke it
		if (other)
			BecomeExplosion1 (other);
		return;
	}

	T_Damage (other, self, self, vec3_origin, other->s.origin, vec3_origin, self->dmg, 1, 0, MOD_CRUSH);

	if (self->spawnflags & DOOR_CRUSHER)
		return;


// if a door has a negative wait, it would never come back if blocked,
// so let it just squash the object to death real fast
	if (self->moveinfo.wait >= 0)
	{
		if (self->moveinfo.state == STATE_DOWN)
		{
			for (ent = self->teammaster ; ent ; ent = ent->teamchain)
				door_go_up (ent, ent->activator);
		}
		else
		{
			for (ent = self->teammaster ; ent ; ent = ent->teamchain)
				door_go_down (ent);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testb $0x4, 0xc8(%rsi)
jne 0x2b550
cmpq $0x0, 0x58(%r14)
je 0x2b5e7
leaq 0x4(%r14), %r8
movl 0x280(%rbx), %eax
movq 0x3b207(%rip), %rcx     # 0x66768
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rcx, %r9
pushq $0x14
pushq $0x0
pushq $0x1
pushq %rax
callq 0x19260
addq $0x20, %rsp
testb $0x4, 0x140(%rbx)
jne 0x2b596
movss 0x384(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jae 0x2b59e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2d0(%rbx), %r14
cmpl $0x3, 0x388(%rbx)
jne 0x2b5ce
movq (%r14), %r14
testq %r14, %r14
je 0x2b596
movq 0x2b0(%r14), %rsi
movq %r14, %rdi
callq 0x18810
addq $0x2c8, %r14            # imm = 0x2C8
jmp 0x2b5ae
movq (%r14), %r14
testq %r14, %r14
je 0x2b596
movq %r14, %rdi
callq 0x19d50
addq $0x2c8, %r14            # imm = 0x2C8
jmp 0x2b5ce
leaq 0x4(%r14), %r8
movq 0x3b176(%rip), %rcx     # 0x66768
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rcx, %r9
pushq $0x14
pushq $0x0
pushq $0x1
pushq $0x186a0                # imm = 0x186A0
callq 0x19260
addq $0x20, %rsp
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19780
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: door_killed
void door_killed (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
{
	edict_t	*ent;

	for (ent = self->teammaster ; ent ; ent = ent->teamchain)
	{
		ent->health = ent->max_health;
		ent->takedamage = DAMAGE_NO;
	}
	door_use (self->teammaster, attacker, attacker);
}

// Assembly:
addq $0x2d0, %rdi            # imm = 0x2D0
movq %rdi, %rax
movq (%rax), %rax
testq %rax, %rax
je 0x2b64e
movl 0x258(%rax), %ecx
movl %ecx, 0x254(%rax)
andl $0x0, 0x27c(%rax)
addq $0x2c8, %rax            # imm = 0x2C8
jmp 0x2b62b
movq (%rdi), %rdi
jmp 0x19cf0
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: door_touch
void door_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
{
	if (!other->client)
		return;

	if (level.time < self->touch_debounce_time)
		return;
	self->touch_debounce_time = level.time + 5.0;

	gi.centerprintf (other, "%s", self->message);
	gi.sound (other, CHAN_AUTO, gi.soundindex ("misc/talk1.wav"), 1, ATTN_NORM, 0);
}

// Assembly:
cmpq $0x0, 0x58(%rsi)
je 0x2b676
movq 0x3b73c(%rip), %rax     # 0x66da0
movss 0x4(%rax), %xmm0
movss 0x240(%rdi), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x2b677
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
addss 0x2387d(%rip), %xmm0    # 0x4ef04
movss %xmm0, 0x240(%rdi)
movq 0x3af6a(%rip), %r14     # 0x66600
movq 0x130(%rdi), %rdx
leaq 0x23309(%rip), %rsi     # 0x4e9ad
movq %rbx, %rdi
xorl %eax, %eax
callq *0x18(%r14)
movq 0x20(%r14), %r15
leaq 0x266b7(%rip), %rdi     # 0x51d6f
callq *0x48(%r14)
movss 0x23864(%rip), %xmm0    # 0x4ef28
xorps %xmm2, %xmm2
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
movaps %xmm0, %xmm1
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: train_blocked
void train_blocked (edict_t *self, edict_t *other)
{
	if (!(other->svflags & SVF_MONSTER) && (!other->client) )
	{
		// give it a chance to go away on it's own terms (like gibs)
		T_Damage (other, self, self, vec3_origin, other->s.origin, vec3_origin, 100000, 1, 0, MOD_CRUSH);
		// if it's still there, nuke it
		if (other)
			BecomeExplosion1 (other);
		return;
	}

	if (level.time < self->touch_debounce_time)
		return;

	if (!self->dmg)
		return;
	self->touch_debounce_time = level.time + 0.5;
	T_Damage (other, self, self, vec3_origin, other->s.origin, vec3_origin, self->dmg, 1, 0, MOD_CRUSH);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rdx
testb $0x4, 0xc8(%rsi)
jne 0x2c125
cmpq $0x0, 0x58(%rbx)
je 0x2c17e
movq 0x3ac74(%rip), %rax     # 0x66da0
movss 0x4(%rax), %xmm0
movss 0x240(%rdx), %xmm1
ucomiss %xmm0, %xmm1
ja 0x2c17c
movl 0x280(%rdx), %eax
testl %eax, %eax
je 0x2c17c
addss 0x242b0(%rip), %xmm0    # 0x50400
movss %xmm0, 0x240(%rdx)
leaq 0x4(%rbx), %r8
movq 0x3a605(%rip), %rcx     # 0x66768
movq %rbx, %rdi
movq %rdx, %rsi
movq %rcx, %r9
pushq $0x14
pushq $0x0
pushq $0x1
pushq %rax
callq 0x19260
addq $0x20, %rsp
popq %rbx
retq
leaq 0x4(%rbx), %r8
movq 0x3a5df(%rip), %rcx     # 0x66768
movq %rbx, %rdi
movq %rdx, %rsi
movq %rcx, %r9
pushq $0x14
pushq $0x0
pushq $0x1
pushq $0x186a0                # imm = 0x186A0
callq 0x19260
addq $0x20, %rsp
movq %rbx, %rdi
popq %rbx
jmp 0x19780
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: train_wait
void train_wait (edict_t *self)
{
	if (self->target_ent->pathtarget)
	{
		char	*savetarget;
		edict_t	*ent;

		ent = self->target_ent;
		savetarget = ent->target;
		ent->target = ent->pathtarget;
		G_UseTargets (ent, self->activator);
		ent->target = savetarget;

		// make sure we didn't get killed by a killtarget
		if (!self->inuse)
			return;
	}

	if (self->moveinfo.wait)
	{
		if (self->moveinfo.wait > 0)
		{
			self->nextthink = level.time + self->moveinfo.wait;
			self->think = train_next;
		}
		else if (self->spawnflags & TRAIN_TOGGLE)  // && wait < 0
		{
			train_next (self);
			self->spawnflags &= ~TRAIN_START_ON;
			VectorClear (self->velocity);
			self->nextthink = 0;
		}

		if (!(self->flags & FL_TEAMSLAVE))
		{
			if (self->moveinfo.sound_end)
				gi.sound (self, CHAN_NO_PHS_ADD+CHAN_VOICE, self->moveinfo.sound_end, 1, ATTN_STATIC, 0);
			self->s.sound = 0;
		}
	}
	else
	{
		train_next (self);
	}
	
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x188(%rdi), %r14
movq 0x170(%r14), %rax
testq %rax, %rax
je 0x2c1f8
movq 0x150(%r14), %r15
movq %rax, 0x150(%r14)
movq 0x2b0(%rbx), %rsi
movq %r14, %rdi
callq 0x19ac0
movq %r15, 0x150(%r14)
cmpl $0x0, 0x60(%rbx)
je 0x2c2a5
movss 0x384(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x2c20a
jnp 0x2c230
jbe 0x2c23d
movq 0x3ab8d(%rip), %rax     # 0x66da0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x200(%rbx)
movq 0x3a6c1(%rip), %rax     # 0x668e8
movq %rax, 0x210(%rbx)
jmp 0x2c26b
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x19cd8
testb $0x2, 0x140(%rbx)
je 0x2c26b
movq %rbx, %rdi
callq 0x19cd8
andb $-0x2, 0x140(%rbx)
andl $0x0, 0x1c8(%rbx)
andq $0x0, 0x1c0(%rbx)
andl $0x0, 0x200(%rbx)
testb $0x4, 0x11d(%rbx)
jne 0x2c2a5
movl 0x370(%rbx), %edx
testl %edx, %edx
je 0x2c2a1
movq 0x3a37b(%rip), %rax     # 0x66600
pushq $0xa
popq %rsi
movss 0x22c98(%rip), %xmm0    # 0x4ef28
movss 0x22c74(%rip), %xmm1    # 0x4ef0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq *0x20(%rax)
andl $0x0, 0x4c(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: train_resume
void train_resume (edict_t *self)
{
	edict_t	*ent;
	vec3_t	dest;

	ent = self->target_ent;

	VectorSubtract (ent->s.origin, self->mins, dest);
	self->moveinfo.state = STATE_TOP;
	VectorCopy (self->s.origin, self->moveinfo.start_origin);
	VectorCopy (dest, self->moveinfo.end_origin);
	Move_Calc (self, dest, train_wait);
	self->spawnflags |= TRAIN_START_ON;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x188(%rdi), %rax
movsd 0x4(%rax), %xmm0
movsd 0xcc(%rdi), %xmm1
subps %xmm1, %xmm0
movq %rsp, %rsi
movlps %xmm0, (%rsi)
movss 0xc(%rax), %xmm1
subss 0xd4(%rdi), %xmm1
movss %xmm1, 0x8(%rsi)
andl $0x0, 0x388(%rdi)
movsd 0x4(%rdi), %xmm2
movsd %xmm2, 0x338(%rdi)
movss 0xc(%rdi), %xmm2
movss %xmm2, 0x340(%rdi)
movlps %xmm0, 0x350(%rdi)
movss %xmm1, 0x358(%rdi)
movq 0x3aab6(%rip), %rdx     # 0x66fb0
callq 0x18f90
orb $0x1, 0x140(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: func_train_find
void func_train_find (edict_t *self)
{
	edict_t *ent;

	if (!self->target)
	{
		gi.dprintf ("train_find: no target\n");
		return;
	}
	ent = G_PickTarget (self->target);
	if (!ent)
	{
		gi.dprintf ("train_find: target %s not found\n", self->target);
		return;
	}
	self->target = ent->target;

	VectorSubtract (ent->s.origin, self->mins, self->s.origin);
	gi.linkentity (self);

	// if not triggered, start immediately
	if (!self->targetname)
		self->spawnflags |= TRAIN_START_ON;

	if (self->spawnflags & TRAIN_START_ON)
	{
		self->nextthink = level.time + FRAMETIME;
		self->think = train_next;
		self->activator = self;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x150(%rdi), %rdi
testq %rdi, %rdi
je 0x2c594
callq 0x18380
testq %rax, %rax
je 0x2c5ab
movq 0x150(%rax), %rcx
movq %rcx, 0x150(%rbx)
movss 0x4(%rax), %xmm0
subss 0xcc(%rbx), %xmm0
movss %xmm0, 0x4(%rbx)
movss 0x8(%rax), %xmm0
subss 0xd0(%rbx), %xmm0
movss %xmm0, 0x8(%rbx)
movss 0xc(%rax), %xmm0
subss 0xd4(%rbx), %xmm0
movss %xmm0, 0xc(%rbx)
movq 0x3a08b(%rip), %rax     # 0x66600
movq %rbx, %rdi
callq *0x90(%rax)
cmpq $0x0, 0x158(%rbx)
movl 0x140(%rbx), %eax
je 0x2c5c9
testb $0x1, %al
jne 0x2c5d2
jmp 0x2c603
movq 0x3a065(%rip), %rax     # 0x66600
movq 0x8(%rax), %rcx
leaq 0x258ac(%rip), %rdi     # 0x51e52
xorl %eax, %eax
popq %rbx
jmpq *%rcx
movq 0x3a04e(%rip), %rax     # 0x66600
movq 0x8(%rax), %rcx
movq 0x150(%rbx), %rsi
leaq 0x258a5(%rip), %rdi     # 0x51e69
xorl %eax, %eax
popq %rbx
jmpq *%rcx
orl $0x1, %eax
movl %eax, 0x140(%rbx)
movq 0x3a7c7(%rip), %rax     # 0x66da0
movss 0x4(%rax), %xmm0
addss 0x22caa(%rip), %xmm0    # 0x4f290
movss %xmm0, 0x200(%rbx)
movq 0x3a2f3(%rip), %rax     # 0x668e8
movq %rax, 0x210(%rbx)
movq %rbx, 0x2b0(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: SP_func_train
void SP_func_train (edict_t *self)
{
	self->movetype = MOVETYPE_PUSH;

	VectorClear (self->s.angles);
	self->blocked = train_blocked;
	if (self->spawnflags & TRAIN_BLOCK_STOPS)
		self->dmg = 0;
	else
	{
		if (!self->dmg)
			self->dmg = 100;
	}
	self->solid = SOLID_BSP;
	gi.setmodel (self, self->model);

	if (st.noise)
		self->moveinfo.sound_middle = gi.soundindex  (st.noise);

	if (!self->speed)
		self->speed = 100;

	self->moveinfo.speed = self->speed;
	self->moveinfo.accel = self->moveinfo.decel = self->moveinfo.speed;

	self->use = train_use;

	gi.linkentity (self);

	if (self->target)
	{
		// start trains on the second frame, to make sure their targets have had
		// a chance to spawn
		self->nextthink = level.time + FRAMETIME;
		self->think = func_train_find;
	}
	else
	{
		gi.dprintf ("func_train without a target at %s\n", vtos(self->absmin));
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2, 0x118(%rdi)
andl $0x0, 0x18(%rdi)
andq $0x0, 0x10(%rdi)
movq 0x3a55a(%rip), %rax     # 0x66bc8
movq %rax, 0x218(%rdi)
xorl %eax, %eax
testb $0x4, 0x140(%rdi)
jne 0x2c68c
cmpl $0x0, 0x280(%rbx)
jne 0x2c692
pushq $0x64
popq %rax
movl %eax, 0x280(%rbx)
movl $0x3, 0x108(%rbx)
movq 0x39f5d(%rip), %r14     # 0x66600
movq 0x120(%rbx), %rsi
movq %rbx, %rdi
callq *0x58(%r14)
movq 0x39fb0(%rip), %rax     # 0x66668
movq 0x30(%rax), %rdi
testq %rdi, %rdi
je 0x2c6cb
callq *0x48(%r14)
movl %eax, 0x36c(%rbx)
movss 0x190(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x2c6ef
jp 0x2c6ef
movl $0x42c80000, 0x190(%rbx) # imm = 0x42C80000
movss 0x2553d(%rip), %xmm0    # 0x51c2c
movss %xmm0, 0x378(%rbx)
movss %xmm0, 0x37c(%rbx)
movss %xmm0, 0x374(%rbx)
movq 0x39d2a(%rip), %rax     # 0x66438
movq %rax, 0x228(%rbx)
movq %rbx, %rdi
callq *0x90(%r14)
cmpq $0x0, 0x150(%rbx)
je 0x2c75b
movq 0x3a670(%rip), %rax     # 0x66da0
movss 0x4(%rax), %xmm0
addss 0x22b53(%rip), %xmm0    # 0x4f290
movss %xmm0, 0x200(%rbx)
movq 0x3a3f4(%rip), %rax     # 0x66b40
movq %rax, 0x210(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x8(%r14), %r14
addq $0xe4, %rbx
movq %rbx, %rdi
callq 0x19200
leaq 0x25715(%rip), %rdi     # 0x51e8a
movq %rax, %rsi
xorl %eax, %eax
movq %r14, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: trigger_elevator_use
void trigger_elevator_use (edict_t *self, edict_t *other, edict_t *activator)
{
	edict_t *target;

	if (self->movetarget->nextthink)
	{
//		gi.dprintf("elevator busy\n");
		return;
	}

	if (!other->pathtarget)
	{
		gi.dprintf("elevator used with no pathtarget\n");
		return;
	}

	target = G_PickTarget (other->pathtarget);
	if (!target)
	{
		gi.dprintf("elevator used with bad pathtarget: %s\n", other->pathtarget);
		return;
	}

	self->movetarget->target_ent = target;
	train_resume (self->movetarget);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x1f0(%rdi), %rax
movss 0x200(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x2c7a3
jnp 0x2c7ab
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rsi, %rbx
movq %rdi, %r14
movq 0x170(%rsi), %rdi
testq %rdi, %rdi
je 0x2c7e1
callq 0x18380
testq %rax, %rax
je 0x2c7fe
movq 0x1f0(%r14), %rdi
movq %rax, 0x188(%rdi)
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19a80
movq 0x39e18(%rip), %rax     # 0x66600
movq 0x8(%rax), %rcx
leaq 0x256ba(%rip), %rdi     # 0x51ead
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
movq 0x39dfb(%rip), %rax     # 0x66600
movq 0x8(%rax), %rcx
movq 0x170(%rbx), %rsi
leaq 0x256b8(%rip), %rdi     # 0x51ecf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: trigger_elevator_init
void trigger_elevator_init (edict_t *self)
{
	if (!self->target)
	{
		gi.dprintf("trigger_elevator has no target\n");
		return;
	}
	self->movetarget = G_PickTarget (self->target);
	if (!self->movetarget)
	{
		gi.dprintf("trigger_elevator unable to find target %s\n", self->target);
		return;
	}
	if (strcmp(self->movetarget->classname, "func_train") != 0)
	{
		gi.dprintf("trigger_elevator target %s is not a train\n", self->target);
		return;
	}

	self->use = trigger_elevator_use;
	self->svflags = SVF_NOCLIENT;

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x150(%rdi), %rdi
testq %rdi, %rdi
je 0x2c875
callq 0x18380
movq %rax, 0x1f0(%rbx)
testq %rax, %rax
je 0x2c88c
movq 0x138(%rax), %rdi
leaq 0x256f0(%rip), %rsi     # 0x51f41
callq 0x18bc0
testl %eax, %eax
je 0x2c8aa
movq 0x39d9f(%rip), %rax     # 0x66600
movq 0x8(%rax), %rcx
movq 0x150(%rbx), %rsi
leaq 0x256d9(%rip), %rdi     # 0x51f4c
jmp 0x2c8a5
movq 0x39d84(%rip), %rax     # 0x66600
movq 0x8(%rax), %rcx
leaq 0x2566f(%rip), %rdi     # 0x51ef6
xorl %eax, %eax
popq %rbx
jmpq *%rcx
movq 0x39d6d(%rip), %rax     # 0x66600
movq 0x8(%rax), %rcx
movq 0x150(%rbx), %rsi
leaq 0x25671(%rip), %rdi     # 0x51f16
xorl %eax, %eax
popq %rbx
jmpq *%rcx
movq 0x3a447(%rip), %rax     # 0x66cf8
movq %rax, 0x228(%rbx)
movl $0x1, 0xc8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: func_timer_use
void func_timer_use (edict_t *self, edict_t *other, edict_t *activator)
{
	self->activator = activator;

	// if on, turn it off
	if (self->nextthink)
	{
		self->nextthink = 0;
		return;
	}

	// turn it on
	if (self->delay)
		self->nextthink = level.time + self->delay;
	else
		func_timer_think (self);
}

// Assembly:
movq %rdx, 0x2b0(%rdi)
movss 0x200(%rdi), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x2c984
jnp 0x2c98c
andl $0x0, 0x200(%rdi)
retq
movss 0x2fc(%rdi), %xmm0
ucomiss %xmm1, %xmm0
jne 0x2c99b
jnp 0x2c9b0
movq 0x3a3fe(%rip), %rax     # 0x66da0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x200(%rdi)
retq
jmp 0x19cb0
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: SP_func_timer
void SP_func_timer (edict_t *self)
{
	if (!self->wait)
		self->wait = 1.0;

	self->use = func_timer_use;
	self->think = func_timer_think;

	if (self->random >= self->wait)
	{
		self->random = self->wait - FRAMETIME;
		gi.dprintf("func_timer at %s has random >= wait\n", vtos(self->s.origin));
	}

	if (self->spawnflags & 1)
	{
		self->nextthink = level.time + 1.0 + st.pausetime + self->delay + self->wait + crandom() * self->random;
		self->activator = self;
	}

	self->svflags = SVF_NOCLIENT;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movss 0x2f8(%rdi), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x2c9e0
jp 0x2c9e0
movl $0x3f800000, 0x2f8(%rbx) # imm = 0x3F800000
movss 0x22548(%rip), %xmm0    # 0x4ef28
movq 0x39bf9(%rip), %rax     # 0x665e0
movq %rax, 0x228(%rbx)
movq 0x39e23(%rip), %rax     # 0x66818
movq %rax, 0x210(%rbx)
movss 0x300(%rbx), %xmm1
ucomiss %xmm0, %xmm1
jb 0x2ca3c
addss 0x2321f(%rip), %xmm0    # 0x4fc30
movss %xmm0, 0x300(%rbx)
movq 0x39be0(%rip), %rax     # 0x66600
movq 0x8(%rax), %r14
leaq 0x4(%rbx), %rdi
callq 0x19200
leaq 0x25543(%rip), %rdi     # 0x51f77
movq %rax, %rsi
xorl %eax, %eax
callq *%r14
testb $0x1, 0x140(%rbx)
je 0x2cad4
movq 0x3a350(%rip), %rax     # 0x66da0
cvtss2sd 0x4(%rax), %xmm0
addsd 0x25293(%rip), %xmm0    # 0x51cf0
movq 0x39c04(%rip), %rax     # 0x66668
cvtss2sd 0x38(%rax), %xmm1
addsd %xmm0, %xmm1
cvtss2sd 0x2fc(%rbx), %xmm0
addsd %xmm1, %xmm0
cvtss2sd 0x2f8(%rbx), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
callq 0x19bf0
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2ss %eax, %xmm0
divss 0x227e8(%rip), %xmm0    # 0x4f288
cvtss2sd %xmm0, %xmm0
addsd 0x2514c(%rip), %xmm0    # 0x51bf8
addsd %xmm0, %xmm0
cvtss2sd 0x300(%rbx), %xmm1
mulsd %xmm0, %xmm1
addsd (%rsp), %xmm1
cvtsd2ss %xmm1, %xmm0
movss %xmm0, 0x200(%rbx)
movq %rbx, 0x2b0(%rbx)
movl $0x1, 0xc8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: SP_func_conveyor
void SP_func_conveyor (edict_t *self)
{
	if (!self->speed)
		self->speed = 100;

	if (!(self->spawnflags & 1))
	{
		self->count = self->speed;
		self->speed = 0;
	}

	self->use = func_conveyor_use;

	gi.setmodel (self, self->model);
	self->solid = SOLID_BSP;
	gi.linkentity (self);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movss 0x190(%rdi), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x2cb48
jp 0x2cb48
movl $0x42c80000, 0x190(%rbx) # imm = 0x42C80000
movss 0x250e4(%rip), %xmm0    # 0x51c2c
testb $0x1, 0x140(%rbx)
jne 0x2cb62
cvttss2si %xmm0, %eax
movl %eax, 0x290(%rbx)
andl $0x0, 0x190(%rbx)
movq 0x39f7f(%rip), %rax     # 0x66ae8
movq %rax, 0x228(%rbx)
movq 0x39a89(%rip), %r14     # 0x66600
movq 0x120(%rbx), %rsi
movq %rbx, %rdi
callq *0x58(%r14)
movl $0x3, 0x108(%rbx)
movq %rbx, %rdi
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x90(%rax)
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: door_secret_done
void door_secret_done (edict_t *self)
{
	if (!(self->targetname) || (self->spawnflags & SECRET_ALWAYS_SHOOT))
	{
		self->health = 0;
		self->takedamage = DAMAGE_YES;
	}
	door_use_areaportals (self, false);
}

// Assembly:
cmpq $0x0, 0x158(%rdi)
je 0x2ccb7
testb $0x1, 0x140(%rdi)
je 0x2ccc8
andl $0x0, 0x254(%rdi)
movl $0x1, 0x27c(%rdi)
xorl %esi, %esi
jmp 0x18250
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: FindItemByClassname
gitem_t	*FindItemByClassname (char *classname)
{
	int		i;
	gitem_t	*it;

	it = itemlist;
	for (i=0 ; i<game.num_items ; i++, it++)
	{
		if (!it->classname)
			continue;
		if (!Q_stricmp(it->classname, classname))
			return it;
	}

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x39ce0(%rip), %r15     # 0x66d40
movl 0x61c(%r15), %eax
movq 0x39dd2(%rip), %rbx     # 0x66e40
xorl %ebp, %ebp
cmpl %eax, %ebp
jge 0x2d09a
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2d08f
movq %r14, %rsi
callq 0x186d0
testl %eax, %eax
je 0x2d09c
movl 0x61c(%r15), %eax
incl %ebp
addq $0x88, %rbx
jmp 0x2d070
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq