LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: Move_Calc
void Move_Calc (edict_t *ent, vec3_t dest, void(*func)(edict_t*))
{
	VectorClear (ent->velocity);
	VectorSubtract (dest, ent->s.origin, ent->moveinfo.dir);
	ent->moveinfo.remaining_distance = VectorNormalize (ent->moveinfo.dir);
	ent->moveinfo.endfunc = func;

	if (ent->moveinfo.speed == ent->moveinfo.accel && ent->moveinfo.speed == ent->moveinfo.decel)
	{
		if (level.current_entity == ((ent->flags & FL_TEAMSLAVE) ? ent->teammaster : ent))
		{
			Move_Begin (ent);
		}
		else
		{
			ent->nextthink = level.time + FRAMETIME;
			ent->think = Move_Begin;
		}
	}
	else
	{
		// accelerative
		ent->moveinfo.current_speed = 0;
		ent->think = Think_AccelMove;
		ent->nextthink = level.time + FRAMETIME;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movl $0x0, 0x1c8(%rdi)
movq $0x0, 0x1c0(%rdi)
movss (%rsi), %xmm0
subss 0x4(%rdi), %xmm0
addq $0x38c, %rdi            # imm = 0x38C
movss %xmm0, 0x38c(%rbx)
movss 0x4(%rsi), %xmm0
subss 0x8(%rbx), %xmm0
movss %xmm0, 0x390(%rbx)
movss 0x8(%rsi), %xmm0
subss 0xc(%rbx), %xmm0
movss %xmm0, 0x394(%rbx)
callq 0x18390
movss %xmm0, 0x3a4(%rbx)
movq %r14, 0x3b0(%rbx)
movss 0x378(%rbx), %xmm0
ucomiss 0x374(%rbx), %xmm0
jne 0x2c5cb
jp 0x2c5cb
ucomiss 0x37c(%rbx), %xmm0
jne 0x2c5cb
jp 0x2c5cb
movq 0x3d819(%rip), %rax     # 0x69da0
movq 0x148(%rax), %rcx
testb $0x4, 0x11d(%rbx)
movq %rbx, %rdx
je 0x2c5a1
movq 0x2d0(%rbx), %rdx
cmpq %rdx, %rcx
je 0x2c607
movss 0x4(%rax), %xmm0
addss 0x27cdd(%rip), %xmm0    # 0x54290
movss %xmm0, 0x200(%rbx)
movq 0x3d38e(%rip), %rax     # 0x69950
movq %rax, 0x210(%rbx)
jmp 0x2c5ff
movl $0x0, 0x398(%rbx)
movq 0x3cfc4(%rip), %rax     # 0x695a0
movq %rax, 0x210(%rbx)
movq 0x3d7b6(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
addss 0x27c99(%rip), %xmm0    # 0x54290
movss %xmm0, 0x200(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19ae8
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: Think_AccelMove
void Think_AccelMove (edict_t *ent)
{
	ent->moveinfo.remaining_distance -= ent->moveinfo.current_speed;

	if (ent->moveinfo.current_speed == 0)		// starting or blocked
		plat_CalcAcceleratedMove(&ent->moveinfo);

	plat_Accelerate (&ent->moveinfo);

	// will the entire move complete on next frame?
	if (ent->moveinfo.remaining_distance <= ent->moveinfo.current_speed)
	{
		Move_Final (ent);
		return;
	}

	VectorScale (ent->moveinfo.dir, ent->moveinfo.current_speed*10, ent->velocity);
	ent->nextthink = level.time + FRAMETIME;
	ent->think = Think_AccelMove;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x338(%rdi), %r14
movss 0x398(%rdi), %xmm0
movss 0x3a4(%rdi), %xmm1
subss %xmm0, %xmm1
movss %xmm1, 0x3a4(%rdi)
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x2c652
jp 0x2c652
movq %r14, %rdi
callq 0x19210
movq %r14, %rdi
callq 0x19090
movss 0x398(%rbx), %xmm0
ucomiss 0x3a4(%rbx), %xmm0
jae 0x2c6b8
leaq 0x38c(%rbx), %rdi
mulss 0x2789a(%rip), %xmm0    # 0x53f14
leaq 0x1c0(%rbx), %rsi
callq 0x189d0
movq 0x3d713(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
addss 0x27bf6(%rip), %xmm0    # 0x54290
movss %xmm0, 0x200(%rbx)
movq 0x3cef7(%rip), %rax     # 0x695a0
movq %rax, 0x210(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19b30
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: AngleMove_Final
void AngleMove_Final (edict_t *ent)
{
	vec3_t	move;

	if (ent->moveinfo.state == STATE_UP)
		VectorSubtract (ent->moveinfo.end_angles, ent->s.angles, move);
	else
		VectorSubtract (ent->moveinfo.start_angles, ent->s.angles, move);

	if (VectorCompare (move, vec3_origin))
	{
		AngleMove_Done (ent);
		return;
	}

	VectorScale (move, 1.0f/FRAMETIME, ent->avelocity);

	ent->think = AngleMove_Done;
	ent->nextthink = level.time + FRAMETIME;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x344(%rdi), %rax
leaq 0x35c(%rdi), %rcx
leaq 0x348(%rdi), %rdx
cmpl $0x2, 0x388(%rdi)
cmoveq %rcx, %rax
leaq 0x360(%rdi), %rcx
movss (%rax), %xmm0
subss 0x10(%rdi), %xmm0
leaq 0x34c(%rdi), %rax
leaq 0x4(%rsp), %rdi
cmovneq %rdx, %rcx
movss %xmm0, (%rdi)
movss (%rcx), %xmm0
subss 0x14(%rbx), %xmm0
leaq 0x364(%rbx), %rcx
movss %xmm0, 0x4(%rdi)
cmovneq %rax, %rcx
movss (%rcx), %xmm0
subss 0x18(%rbx), %xmm0
movss %xmm0, 0x8(%rdi)
movq 0x3d00c(%rip), %rsi     # 0x69768
callq 0x18b70
testl %eax, %eax
je 0x2c785
movl $0x0, 0x1d4(%rbx)
movq $0x0, 0x1cc(%rbx)
movq %rbx, %rdi
callq *0x3b0(%rbx)
jmp 0x2c7c8
leaq 0x1cc(%rbx), %rsi
leaq 0x4(%rsp), %rdi
movss 0x2777b(%rip), %xmm0    # 0x53f14
callq 0x189d0
movq 0x3d313(%rip), %rax     # 0x69ab8
movq %rax, 0x210(%rbx)
movq 0x3d5ed(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
addss 0x27ad0(%rip), %xmm0    # 0x54290
movss %xmm0, 0x200(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: AngleMove_Begin
void AngleMove_Begin (edict_t *ent)
{
	vec3_t	destdelta;
	float	len;
	float	traveltime;
	float	frames;

	// set destdelta to the vector needed to move
	if (ent->moveinfo.state == STATE_UP)
		VectorSubtract (ent->moveinfo.end_angles, ent->s.angles, destdelta);
	else
		VectorSubtract (ent->moveinfo.start_angles, ent->s.angles, destdelta);
	
	// calculate length of vector
	len = VectorLength (destdelta);
	
	// divide by speed to get time to reach dest
	traveltime = len / ent->moveinfo.speed;

	if (traveltime < FRAMETIME)
	{
		AngleMove_Final (ent);
		return;
	}

	frames = floor(traveltime / FRAMETIME);

	// scale the destdelta vector by the time spent traveling to get velocity
	VectorScale (destdelta, 1.0 / traveltime, ent->avelocity);

	// set nextthink to trigger a think when dest is reached
	ent->nextthink = level.time + frames * FRAMETIME;
	ent->think = AngleMove_Final;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x344(%rdi), %rax
leaq 0x35c(%rdi), %rcx
leaq 0x348(%rdi), %rdx
cmpl $0x2, 0x388(%rdi)
cmoveq %rcx, %rax
leaq 0x360(%rdi), %rcx
movss (%rax), %xmm0
subss 0x10(%rdi), %xmm0
leaq 0x34c(%rdi), %rax
leaq 0x14(%rsp), %rdi
cmovneq %rdx, %rcx
movss %xmm0, (%rdi)
movss (%rcx), %xmm0
subss 0x14(%rbx), %xmm0
leaq 0x364(%rbx), %rcx
movss %xmm0, 0x4(%rdi)
cmovneq %rax, %rcx
movss (%rcx), %xmm0
subss 0x18(%rbx), %xmm0
movss %xmm0, 0x8(%rdi)
callq 0x192e0
divss 0x378(%rbx), %xmm0
movss 0x27a3a(%rip), %xmm1    # 0x54290
ucomiss %xmm0, %xmm1
jbe 0x2c865
movq %rbx, %rdi
callq 0x19b50
jmp 0x2c8c9
movss %xmm0, 0xc(%rsp)
divss %xmm1, %xmm0
callq 0x19540
movss %xmm0, 0x10(%rsp)
movss 0x276a6(%rip), %xmm0    # 0x53f28
divss 0xc(%rsp), %xmm0
leaq 0x1cc(%rbx), %rsi
leaq 0x14(%rsp), %rdi
callq 0x189d0
movq 0x3d500(%rip), %rax     # 0x69da0
movss 0x10(%rsp), %xmm0
mulss 0x279e2(%rip), %xmm0    # 0x54290
addss 0x4(%rax), %xmm0
movss %xmm0, 0x200(%rbx)
movq 0x3d56e(%rip), %rax     # 0x69e30
movq %rax, 0x210(%rbx)
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: AngleMove_Calc
void AngleMove_Calc (edict_t *ent, void(*func)(edict_t*))
{
	VectorClear (ent->avelocity);
	ent->moveinfo.endfunc = func;
	if (level.current_entity == ((ent->flags & FL_TEAMSLAVE) ? ent->teammaster : ent))
	{
		AngleMove_Begin (ent);
	}
	else
	{
		ent->nextthink = level.time + FRAMETIME;
		ent->think = AngleMove_Begin;
	}
}

// Assembly:
movl $0x0, 0x1d4(%rdi)
movq $0x0, 0x1cc(%rdi)
movq %rsi, 0x3b0(%rdi)
movq 0x3d4ae(%rip), %rax     # 0x69da0
movq 0x148(%rax), %rcx
testb $0x4, 0x11d(%rdi)
movq %rdi, %rdx
je 0x2c90c
movq 0x2d0(%rdi), %rdx
cmpq %rdx, %rcx
je 0x19a78
movss 0x4(%rax), %xmm0
addss 0x2796e(%rip), %xmm0    # 0x54290
movss %xmm0, 0x200(%rdi)
movq 0x3cc87(%rip), %rax     # 0x695b8
movq %rax, 0x210(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_func.c
// Function: plat_CalcAcceleratedMove
void plat_CalcAcceleratedMove(moveinfo_t *moveinfo)
{
	float	accel_dist;
	float	decel_dist;

	moveinfo->move_speed = moveinfo->speed;

	if (moveinfo->remaining_distance < moveinfo->accel)
	{
		moveinfo->current_speed = moveinfo->remaining_distance;
		return;
	}

	accel_dist = AccelerationDistance (moveinfo->speed, moveinfo->accel);
	decel_dist = AccelerationDistance (moveinfo->speed, moveinfo->decel);

	if ((moveinfo->remaining_distance - accel_dist - decel_dist) < 0)
	{
		float	f;

		f = (moveinfo->accel + moveinfo->decel) / (moveinfo->accel * moveinfo->decel);
		moveinfo->move_speed = (-2 + sqrtf(4 - 4 * f * (-2 * moveinfo->remaining_distance))) / (2 * f);
		decel_dist = AccelerationDistance (moveinfo->move_speed, moveinfo->decel);
	}

	moveinfo->decel_distance = decel_dist;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movss 0x3c(%rdi), %xmm0
movss 0x40(%rdi), %xmm3
movss %xmm3, 0x64(%rdi)
movss 0x6c(%rdi), %xmm1
movl $0x60, %r14d
ucomiss %xmm1, %xmm0
jbe 0x2c967
movaps %xmm1, %xmm2
jmp 0x2ca33
movaps %xmm3, %xmm5
divss %xmm0, %xmm5
movss 0x275b2(%rip), %xmm6    # 0x53f28
addss %xmm6, %xmm5
mulss %xmm3, %xmm5
movss 0x28a7e(%rip), %xmm7    # 0x55404
mulss %xmm7, %xmm5
movss 0x44(%rbx), %xmm4
movaps %xmm3, %xmm2
divss %xmm4, %xmm2
addss %xmm6, %xmm2
mulss %xmm3, %xmm2
mulss %xmm7, %xmm2
movaps %xmm1, %xmm3
subss %xmm5, %xmm3
movl $0x70, %r14d
ucomiss %xmm3, %xmm2
jbe 0x2ca33
movaps %xmm0, %xmm2
addss %xmm4, %xmm2
mulss %xmm4, %xmm0
divss %xmm0, %xmm2
mulss 0x28a45(%rip), %xmm1    # 0x55410
movss 0x2a219(%rip), %xmm0    # 0x56bec
mulss %xmm2, %xmm0
mulss %xmm1, %xmm0
addss 0x27525(%rip), %xmm0    # 0x53f08
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x2c9f1
sqrtss %xmm0, %xmm0
jmp 0x2ca02
movss %xmm2, 0x4(%rsp)
callq 0x18e80
movss 0x4(%rsp), %xmm2
addss 0x28a06(%rip), %xmm0    # 0x55410
addss %xmm2, %xmm2
divss %xmm2, %xmm0
movss %xmm0, 0x64(%rbx)
movaps %xmm0, %xmm2
divss 0x44(%rbx), %xmm2
addss 0x27501(%rip), %xmm2    # 0x53f28
mulss %xmm0, %xmm2
mulss 0x289d1(%rip), %xmm2    # 0x55404
movss %xmm2, (%rbx,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2cbca
movl 0x370(%rbx), %edx
testl %edx, %edx
je 0x2cbc3
movq 0x3ca5b(%rip), %rax     # 0x69600
movss 0x2737b(%rip), %xmm0    # 0x53f28
movss 0x27357(%rip), %xmm1    # 0x53f0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0xa, %esi
callq *0x20(%rax)
movl $0x0, 0x4c(%rbx)
movl $0x0, 0x388(%rbx)
movq 0x3cddd(%rip), %rax     # 0x699b8
movq %rax, 0x210(%rbx)
movq 0x3d1b7(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
addss 0x27316(%rip), %xmm0    # 0x53f0c
movss %xmm0, 0x200(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2cc45
movl 0x368(%rbx), %edx
testl %edx, %edx
je 0x2cc3c
movq 0x3c9e2(%rip), %rax     # 0x69600
movss 0x27302(%rip), %xmm0    # 0x53f28
movss 0x272de(%rip), %xmm1    # 0x53f0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0xa, %esi
callq *0x20(%rax)
movl 0x36c(%rbx), %eax
movl %eax, 0x4c(%rbx)
movl $0x3, 0x388(%rbx)
leaq 0x350(%rbx), %rsi
movq 0x3cc43(%rip), %rdx     # 0x698a0
movq %rbx, %rdi
popq %rbx
jmp 0x18e70
// File: /workspace/github_c_makefile_star2_O1/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 0x2cca9
movl 0x370(%rbx), %edx
testl %edx, %edx
je 0x2cca2
movq 0x3c97c(%rip), %rax     # 0x69600
movss 0x2729c(%rip), %xmm0    # 0x53f28
movss 0x27278(%rip), %xmm1    # 0x53f0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0xa, %esi
callq *0x20(%rax)
movl $0x0, 0x4c(%rbx)
movl $0x1, 0x388(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2ccfa
movl 0x368(%rbx), %edx
testl %edx, %edx
je 0x2ccf1
movq 0x3c92d(%rip), %rax     # 0x69600
movss 0x2724d(%rip), %xmm0    # 0x53f28
movss 0x27229(%rip), %xmm1    # 0x53f0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0xa, %esi
callq *0x20(%rax)
movl 0x36c(%rbx), %eax
movl %eax, 0x4c(%rbx)
leaq 0x338(%rbx), %rsi
movl $0x2, 0x388(%rbx)
movq 0x3cc96(%rip), %rdx     # 0x699a8
movq %rbx, %rdi
popq %rbx
jmp 0x18e70
// File: /workspace/github_c_makefile_star2_O1/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 0x2cd35
cmpq $0x0, 0x58(%r14)
je 0x2cd90
leaq 0x4(%r14), %r8
movl 0x280(%rbx), %eax
movq 0x3ca22(%rip), %rcx     # 0x69768
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rcx, %r9
pushq $0x14
pushq $0x0
pushq $0x1
pushq %rax
callq 0x190f0
addq $0x20, %rsp
movl 0x388(%rbx), %eax
cmpl $0x3, %eax
je 0x2cd81
cmpl $0x2, %eax
jne 0x2cdcf
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19af0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x180f0
leaq 0x4(%r14), %r8
movq 0x3c9cd(%rip), %rcx     # 0x69768
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rcx, %r9
pushq $0x14
pushq $0x0
pushq $0x1
pushq $0x186a0                # imm = 0x186A0
callq 0x190f0
addq $0x20, %rsp
testq %r14, %r14
je 0x2cdcf
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x195c0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2ce2d
cmpl $0x0, 0x254(%rsi)
jle 0x2ce2d
movq 0x2a0(%rdi), %rdi
movl 0x388(%rdi), %eax
testl %eax, %eax
je 0x2ce11
cmpl $0x1, %eax
jne 0x2ce2d
jmp 0x180f0
movq 0x3cf88(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
addss 0x27103(%rip), %xmm0    # 0x53f28
movss %xmm0, 0x200(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x19710
movq 0x3cd82(%rip), %rcx     # 0x69bc0
movq %rcx, 0x220(%rax)
movl $0x0, 0x118(%rax)
movl $0x1, 0x108(%rax)
movq %rbx, 0x2a0(%rax)
movss 0xcc(%rbx), %xmm6
movss 0xd0(%rbx), %xmm0
movss 0x29d78(%rip), %xmm4    # 0x56bf0
movaps %xmm6, %xmm9
addss %xmm4, %xmm9
movss 0xd8(%rbx), %xmm10
movss 0x29d62(%rip), %xmm1    # 0x56bf4
movaps %xmm10, %xmm2
addss %xmm1, %xmm2
movss 0xdc(%rbx), %xmm7
movss 0x2704d(%rip), %xmm8    # 0x53ef8
movss 0xe0(%rbx), %xmm3
addss %xmm8, %xmm3
movss 0x1b0(%rbx), %xmm5
subss 0x1bc(%rbx), %xmm5
movq 0x3c799(%rip), %rcx     # 0x69668
cvtsi2ssl 0x20(%rcx), %xmm11
addss %xmm5, %xmm11
movaps %xmm3, %xmm5
subss %xmm11, %xmm5
testb $0x1, 0x140(%rbx)
je 0x2cef4
addss %xmm5, %xmm8
movaps %xmm8, %xmm3
addss %xmm0, %xmm4
addss %xmm7, %xmm1
movaps %xmm2, %xmm8
subss %xmm9, %xmm8
xorps %xmm11, %xmm11
ucomiss %xmm8, %xmm11
addss %xmm10, %xmm6
movss 0x284e9(%rip), %xmm12   # 0x55404
mulss %xmm12, %xmm6
movss 0x26fff(%rip), %xmm10   # 0x53f28
cmpnless %xmm11, %xmm8
andps %xmm8, %xmm9
andnps %xmm6, %xmm8
orps %xmm9, %xmm8
jb 0x2cf45
addss %xmm10, %xmm6
movaps %xmm6, %xmm2
movaps %xmm1, %xmm6
subss %xmm4, %xmm6
ucomiss %xmm6, %xmm11
addss %xmm7, %xmm0
mulss %xmm12, %xmm0
cmpnless %xmm11, %xmm6
andps %xmm6, %xmm4
andnps %xmm0, %xmm6
orps %xmm4, %xmm6
jb 0x2cf72
addss %xmm10, %xmm0
movaps %xmm0, %xmm1
movss %xmm8, 0xcc(%rax)
movss %xmm6, 0xd0(%rax)
movss %xmm5, 0xd4(%rax)
movss %xmm2, 0xd8(%rax)
movss %xmm1, 0xdc(%rax)
movss %xmm3, 0xe0(%rax)
movq 0x3c656(%rip), %rcx     # 0x69600
movq %rax, %rdi
popq %rbx
jmpq *0x90(%rcx)
// File: /workspace/github_c_makefile_star2_O1/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 0x3c455(%rip), %rsi     # 0x69768
movq %r14, %rdi
callq 0x18b70
testl %eax, %eax
je 0x2d351
movl 0x36c(%rbx), %eax
movl %eax, 0x4c(%rbx)
leaq 0x19c(%rbx), %rdi
movss 0x190(%rbx), %xmm0
movq %r14, %rsi
callq 0x189d0
testb $0x10, 0x140(%rbx)
je 0x2d36e
movq 0x3c6b1(%rip), %rax     # 0x69a00
jmp 0x2d367
xorl %eax, %eax
movl %eax, 0x4c(%rbx)
movl %eax, 0x1d4(%rbx)
movq $0x0, 0x1cc(%rbx)
movq %rax, 0x220(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x3, %ecx
movl %ecx, 0x108(%rdi)
movl 0x140(%rdi), %eax
movl %eax, %edx
andl $0x20, %edx
cmpl $0x1, %edx
sbbl $0x0, %ecx
movl %ecx, 0x118(%rdi)
movl $0x0, 0x1a4(%rdi)
movq $0x0, 0x19c(%rdi)
xorl %ecx, %ecx
testb $0x8, %al
sete %cl
shll $0x2, %ecx
addq $0x19c, %rcx            # imm = 0x19C
testb $0x4, %al
movl $0x1a4, %edx            # imm = 0x1A4
cmoveq %rcx, %rdx
movl $0x3f800000, (%rdi,%rdx) # imm = 0x3F800000
testb $0x2, %al
je 0x2d41b
movaps 0x2982e(%rip), %xmm0    # 0x56c10
movss 0x19c(%rbx), %xmm1
movss 0x1a0(%rbx), %xmm2
movss 0x1a4(%rbx), %xmm3
xorps %xmm0, %xmm1
movss %xmm1, 0x19c(%rbx)
xorps %xmm0, %xmm2
movss %xmm2, 0x1a0(%rbx)
xorps %xmm0, %xmm3
movss %xmm3, 0x1a4(%rbx)
movss 0x190(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x2d437
jp 0x2d437
movl $0x42c80000, 0x190(%rbx) # imm = 0x42C80000
cmpl $0x0, 0x280(%rbx)
jne 0x2d44a
movl $0x2, 0x280(%rbx)
movq 0x3bfff(%rip), %rcx     # 0x69450
movq %rcx, 0x228(%rbx)
cmpl $0x0, 0x280(%rbx)
je 0x2d46f
movq 0x3c100(%rip), %rcx     # 0x69568
movq %rcx, 0x218(%rbx)
testb $0x1, %al
je 0x2d47b
movq %rbx, %rdi
callq 0x19a70
movl 0x140(%rbx), %eax
testb $0x40, %al
je 0x2d489
orb $0x10, 0x41(%rbx)
testb %al, %al
jns 0x2d491
orb $0x20, 0x41(%rbx)
movq 0x3c168(%rip), %r14     # 0x69600
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_O1/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 0x3c610(%rip), %rdx     # 0x69b00
callq 0x18e70
movl $0x0, 0x38(%rbx)
cmpl $0x0, 0x254(%rbx)
je 0x2d50f
movl $0x1, 0x27c(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $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 0x198f0
movl $0x1, 0x38(%rbx)
movss 0x384(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x2d574
movq 0x3c847(%rip), %rax     # 0x69da0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x200(%rbx)
movq 0x3bf73(%rip), %rax     # 0x694e0
movq %rax, 0x210(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2d583
retq
pushq %rbx
movq %rdi, %rbx
movl $0x2, 0x388(%rdi)
movl 0x368(%rdi), %edx
testl %edx, %edx
je 0x2d5c9
testb $0x4, 0x11d(%rbx)
jne 0x2d5c9
movq 0x3c055(%rip), %rax     # 0x69600
movss 0x26975(%rip), %xmm0    # 0x53f28
movss 0x26951(%rip), %xmm1    # 0x53f0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0xa, %esi
callq *0x20(%rax)
leaq 0x350(%rbx), %rsi
movq 0x3c209(%rip), %rdx     # 0x697e0
movq %rbx, %rdi
popq %rbx
jmp 0x18e70
// File: /workspace/github_c_makefile_star2_O1/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 0x2d942
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 0x19430
testq %rax, %rax
je 0x2d939
movq %rax, %r15
leaq 0x29377(%rip), %r12     # 0x56c6a
movq 0x3bd06(%rip), %r13     # 0x69600
movq 0x138(%r15), %rdi
movq %r12, %rsi
callq 0x18690
testl %eax, %eax
jne 0x2d91d
movl 0x32c(%r15), %edi
movl %ebx, %esi
callq *0x80(%r13)
movq 0x150(%r14), %rdx
movq %r15, %rdi
movl $0x158, %esi            # imm = 0x158
callq 0x19430
movq %rax, %r15
testq %rax, %rax
jne 0x2d8fa
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2d986
movl 0x370(%rbx), %edx
testl %edx, %edx
je 0x2d97f
movq 0x3bc9f(%rip), %rax     # 0x69600
movss 0x265bf(%rip), %xmm0    # 0x53f28
movss 0x2659b(%rip), %xmm1    # 0x53f0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0xa, %esi
callq *0x20(%rax)
movl $0x0, 0x4c(%rbx)
movl $0x0, 0x388(%rbx)
testb $0x20, 0x140(%rbx)
jne 0x2d9cb
movss 0x384(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x2d9cb
movq 0x3c568(%rip), %rax     # 0x69f18
movq %rax, 0x210(%rbx)
movq 0x3c3e2(%rip), %rax     # 0x69da0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x200(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2da15
movl 0x368(%rbx), %edx
testl %edx, %edx
je 0x2da0c
movq 0x3bc12(%rip), %rax     # 0x69600
movss 0x26532(%rip), %xmm0    # 0x53f28
movss 0x2650e(%rip), %xmm1    # 0x53f0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0xa, %esi
callq *0x20(%rax)
movl 0x36c(%rbx), %eax
movl %eax, 0x4c(%rbx)
movl 0x258(%rbx), %eax
testl %eax, %eax
je 0x2da2f
movl $0x1, 0x27c(%rbx)
movl %eax, 0x254(%rbx)
movl $0x3, 0x388(%rbx)
movq 0x138(%rbx), %r14
leaq 0x29233(%rip), %rsi     # 0x56c7a
movq %r14, %rdi
callq 0x18b20
testl %eax, %eax
je 0x2da6e
leaq 0x2922a(%rip), %rsi     # 0x56c84
movq %r14, %rdi
callq 0x18b20
testl %eax, %eax
je 0x2da8b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x338(%rbx), %rsi
movq 0x3c3d4(%rip), %rdx     # 0x69e50
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x18e70
movq 0x3c3be(%rip), %rsi     # 0x69e50
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x182d0
// File: /workspace/github_c_makefile_star2_O1/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 0x2dae4
movl 0x370(%rbx), %edx
testl %edx, %edx
je 0x2dadd
movq 0x3bb41(%rip), %rax     # 0x69600
movss 0x26461(%rip), %xmm0    # 0x53f28
movss 0x2643d(%rip), %xmm1    # 0x53f0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0xa, %esi
callq *0x20(%rax)
movl $0x0, 0x4c(%rbx)
movl $0x1, 0x388(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x18230
// File: /workspace/github_c_makefile_star2_O1/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 0x2db34
movq %rdi, %rbx
testl %eax, %eax
jne 0x2db3a
movss 0x384(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x2db34
movq 0x3c279(%rip), %rax     # 0x69da0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x200(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rsi, %r14
testb $0x4, 0x11d(%rbx)
jne 0x2db7e
movl 0x368(%rbx), %edx
testl %edx, %edx
je 0x2db75
movq 0x3baa9(%rip), %rax     # 0x69600
movss 0x263c9(%rip), %xmm0    # 0x53f28
movss 0x263a5(%rip), %xmm1    # 0x53f0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0xa, %esi
callq *0x20(%rax)
movl 0x36c(%rbx), %eax
movl %eax, 0x4c(%rbx)
movl $0x2, 0x388(%rbx)
movq 0x138(%rbx), %r15
leaq 0x290e4(%rip), %rsi     # 0x56c7a
movq %r15, %rdi
callq 0x18b20
testl %eax, %eax
je 0x2dbc6
leaq 0x290db(%rip), %rsi     # 0x56c84
movq %r15, %rdi
callq 0x18b20
testl %eax, %eax
jne 0x2dbdc
movq 0x3bcec(%rip), %rsi     # 0x698a8
movq %rbx, %rdi
callq 0x182d0
jmp 0x2dbdc
leaq 0x350(%rbx), %rsi
movq 0x3bcd4(%rip), %rdx     # 0x698a8
movq %rbx, %rdi
callq 0x18e70
movq %rbx, %rdi
movq %r14, %rsi
callq 0x198f0
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x18230
// File: /workspace/github_c_makefile_star2_O1/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 0x2dc80
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
testb $0x20, 0x140(%rdi)
je 0x2dc4e
testl $0xfffffffd, 0x388(%rbx) # imm = 0xFFFFFFFD
jne 0x2dc4e
testq %rbx, %rbx
je 0x2dc7b
xorl %r14d, %r14d
movq %r14, 0x130(%rbx)
movq %r14, 0x220(%rbx)
movq %rbx, %rdi
callq 0x19b58
movq 0x2c8(%rbx), %rbx
testq %rbx, %rbx
jne 0x2dc2a
jmp 0x2dc7b
testq %rbx, %rbx
je 0x2dc7b
xorl %r15d, %r15d
movq %r15, 0x130(%rbx)
movq %r15, 0x220(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x187b0
movq 0x2c8(%rbx), %rbx
testq %rbx, %rbx
jne 0x2dc56
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2dccc
movl 0xc8(%rsi), %ecx
testb $0x4, %cl
jne 0x2dc9c
cmpq $0x0, 0x58(%rsi)
je 0x2dccc
movq 0x110(%rdi), %rax
testb $0x4, %cl
je 0x2dcb3
movl 0x140(%rax), %ecx
andl $0x8, %ecx
jne 0x2dccc
movq 0x3c0e6(%rip), %rcx     # 0x69da0
movss 0x4(%rcx), %xmm0
movss 0x240(%rdi), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x2dccd
retq
addss 0x26253(%rip), %xmm0    # 0x53f28
movss %xmm0, 0x240(%rdi)
movq %rax, %rdi
movq %rsi, %rdx
jmp 0x19af8
// File: /workspace/github_c_makefile_star2_O1/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 0x2ddd1
movss 0x380(%rdi), %xmm1
andps 0x2623c(%rip), %xmm1    # 0x53f40
movq 0x2c8(%rdi), %rax
testq %rax, %rax
je 0x2dd37
movaps 0x26229(%rip), %xmm2    # 0x53f40
movss 0x380(%rax), %xmm0
andps %xmm2, %xmm0
minss %xmm1, %xmm0
movq 0x2c8(%rax), %rax
movaps %xmm0, %xmm1
testq %rax, %rax
jne 0x2dd17
jmp 0x2dd3a
movaps %xmm1, %xmm0
testq %rdi, %rdi
je 0x2ddd1
divss 0x378(%rdi), %xmm0
movaps 0x261ee(%rip), %xmm1    # 0x53f40
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
testq %rdi, %rdi
jne 0x2dd52
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2df87
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movss 0xe4(%rdi), %xmm0
movss %xmm0, 0xc(%rsp)
movss 0xe8(%rdi), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0xec(%rdi), %xmm0
movss %xmm0, 0x14(%rsp)
movss 0xf0(%rdi), %xmm0
movss %xmm0, (%rsp)
movss 0xf4(%rdi), %xmm0
movss %xmm0, 0x4(%rsp)
movss 0xf8(%rdi), %xmm0
movss %xmm0, 0x8(%rsp)
movq 0x2c8(%rdi), %r12
testq %r12, %r12
je 0x2de87
leaq 0xc(%rsp), %r14
movq %rsp, %r15
leaq 0xe4(%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x18c20
leaq 0xf0(%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x18c20
movq 0x2c8(%r12), %r12
testq %r12, %r12
jne 0x2de54
movss 0x28d69(%rip), %xmm0    # 0x56bf8
movss 0xc(%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0xc(%rsp)
addss 0x10(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0x28d49(%rip), %xmm0    # 0x56bfc
movss (%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rsp)
addss 0x4(%rsp), %xmm0
movss %xmm0, 0x4(%rsp)
callq 0x19710
movss 0xc(%rsp), %xmm0
movss %xmm0, 0xcc(%rax)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0xd0(%rax)
movss 0x14(%rsp), %xmm0
movss %xmm0, 0xd4(%rax)
movss (%rsp), %xmm0
movss %xmm0, 0xd8(%rax)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0xdc(%rax)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0xe0(%rax)
movq %rbx, 0x110(%rax)
movl $0x1, 0x108(%rax)
movl $0x0, 0x118(%rax)
movq 0x3bf99(%rip), %rcx     # 0x69ee0
movq %rcx, 0x220(%rax)
movq 0x3b6ab(%rip), %rcx     # 0x69600
movq %rax, %rdi
callq *0x90(%rcx)
testb $0x1, 0x140(%rbx)
je 0x2df74
movq %rbx, %rdi
movl $0x1, %esi
callq 0x18230
movq %rbx, %rdi
callq 0x19b48
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2dfa6
cmpq $0x0, 0x58(%r14)
je 0x2e037
leaq 0x4(%r14), %r8
movl 0x280(%rbx), %eax
movq 0x3b7b1(%rip), %rcx     # 0x69768
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rcx, %r9
pushq $0x14
pushq $0x0
pushq $0x1
pushq %rax
callq 0x190f0
addq $0x20, %rsp
testb $0x4, 0x140(%rbx)
jne 0x2e076
movss 0x384(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x2e076
cmpl $0x3, 0x388(%rbx)
movq 0x2d0(%rbx), %rbx
jne 0x2e021
testq %rbx, %rbx
je 0x2e076
movq 0x2b0(%rbx), %rsi
movq %rbx, %rdi
callq 0x187b0
movq 0x2c8(%rbx), %rbx
jmp 0x2e004
testq %rbx, %rbx
je 0x2e076
movq %rbx, %rdi
callq 0x19b58
movq 0x2c8(%rbx), %rbx
jmp 0x2e021
leaq 0x4(%r14), %r8
movq 0x3b726(%rip), %rcx     # 0x69768
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rcx, %r9
pushq $0x14
pushq $0x0
pushq $0x1
pushq $0x186a0                # imm = 0x186A0
callq 0x190f0
addq $0x20, %rsp
testq %r14, %r14
je 0x2e076
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x195c0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movq 0x2d0(%rdi), %rax
testq %rax, %rax
je 0x2e0a9
movl 0x258(%rax), %ecx
movl %ecx, 0x254(%rax)
movl $0x0, 0x27c(%rax)
movq 0x2c8(%rax), %rax
jmp 0x2e085
movq 0x2d0(%rdi), %rdi
jmp 0x19af8
// File: /workspace/github_c_makefile_star2_O1/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 0x2e0d5
movq 0x3bcdd(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
movss 0x240(%rdi), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x2e0d6
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
addss 0x25e1e(%rip), %xmm0    # 0x53f04
movss %xmm0, 0x240(%rdi)
movq 0x3b50b(%rip), %r14     # 0x69600
movq 0x130(%rdi), %rdx
leaq 0x258aa(%rip), %rsi     # 0x539ad
movq %rbx, %rdi
xorl %eax, %eax
callq *0x18(%r14)
movq 0x20(%r14), %r15
leaq 0x28b80(%rip), %rdi     # 0x56c97
callq *0x48(%r14)
movss 0x25e05(%rip), %xmm0    # 0x53f28
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_O1/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 0x2ec59
cmpq $0x0, 0x58(%rbx)
je 0x2ecb2
movq 0x3b140(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
movss 0x240(%rdx), %xmm1
ucomiss %xmm0, %xmm1
ja 0x2ece8
movl 0x280(%rdx), %eax
testl %eax, %eax
je 0x2ece8
addss 0x26780(%rip), %xmm0    # 0x55404
movss %xmm0, 0x240(%rdx)
leaq 0x4(%rbx), %r8
movq 0x3aad1(%rip), %rcx     # 0x69768
movq %rbx, %rdi
movq %rdx, %rsi
movq %rcx, %r9
pushq $0x14
pushq $0x0
pushq $0x1
pushq %rax
callq 0x190f0
addq $0x20, %rsp
jmp 0x2ece8
leaq 0x4(%rbx), %r8
movq 0x3aaab(%rip), %rcx     # 0x69768
movq %rbx, %rdi
movq %rdx, %rsi
movq %rcx, %r9
pushq $0x14
pushq $0x0
pushq $0x1
pushq $0x186a0                # imm = 0x186A0
callq 0x190f0
addq $0x20, %rsp
testq %rbx, %rbx
je 0x2ece8
movq %rbx, %rdi
popq %rbx
jmp 0x195c0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2ed33
movq 0x150(%r14), %r15
movq %rax, 0x150(%r14)
movq 0x2b0(%rbx), %rsi
movq %r14, %rdi
callq 0x198f0
movq %r15, 0x150(%r14)
cmpl $0x0, 0x60(%rbx)
je 0x2ede8
movss 0x384(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x2ed45
jnp 0x2ed6b
jbe 0x2ed78
movq 0x3b052(%rip), %rax     # 0x69da0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x200(%rbx)
movq 0x3ab86(%rip), %rax     # 0x698e8
movq %rax, 0x210(%rbx)
jmp 0x2eda9
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x19ae0
testb $0x2, 0x140(%rbx)
je 0x2eda9
movq %rbx, %rdi
callq 0x19ae0
andb $-0x2, 0x140(%rbx)
xorl %eax, %eax
movl %eax, 0x1c8(%rbx)
movq $0x0, 0x1c0(%rbx)
movl %eax, 0x200(%rbx)
testb $0x4, 0x11d(%rbx)
jne 0x2ede8
movl 0x370(%rbx), %edx
testl %edx, %edx
je 0x2ede1
movq 0x3a83d(%rip), %rax     # 0x69600
movss 0x2515d(%rip), %xmm0    # 0x53f28
movss 0x25139(%rip), %xmm1    # 0x53f0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0xa, %esi
callq *0x20(%rax)
movl $0x0, 0x4c(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
movss 0x4(%rax), %xmm0
subss 0xcc(%rdi), %xmm0
leaq 0x4(%rsp), %rsi
movss %xmm0, (%rsi)
movss 0x8(%rax), %xmm1
subss 0xd0(%rdi), %xmm1
movss %xmm1, 0x4(%rsi)
movss 0xc(%rax), %xmm2
subss 0xd4(%rdi), %xmm2
movss %xmm2, 0x8(%rsi)
movl $0x0, 0x388(%rdi)
movss 0x4(%rdi), %xmm3
movss %xmm3, 0x338(%rdi)
movq 0x8(%rdi), %rax
movq %rax, 0x33c(%rdi)
movss %xmm0, 0x350(%rdi)
movss %xmm1, 0x354(%rdi)
movss %xmm2, 0x358(%rdi)
movq 0x3af2a(%rip), %rdx     # 0x69fb0
callq 0x18e70
orb $0x1, 0x140(%rbx)
addq $0x10, %rsp
popq %rbx
retq