LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_weapon.c
// Function: fire_bfg
void fire_bfg (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius)
{
	edict_t	*bfg;

	bfg = G_Spawn();
	VectorCopy (start, bfg->s.origin);
	VectorCopy (dir, bfg->movedir);
	vectoangles (dir, bfg->s.angles);
	VectorScale (dir, speed, bfg->velocity);
	bfg->movetype = MOVETYPE_FLYMISSILE;
	bfg->clipmask = MASK_SHOT;
	bfg->solid = SOLID_BBOX;
	bfg->s.effects |= EF_BFG | EF_ANIM_ALLFAST;
	VectorClear (bfg->mins);
	VectorClear (bfg->maxs);
	bfg->s.modelindex = gi.modelindex ("sprites/s_bfg1.sp2");
	bfg->owner = self;
	bfg->touch = bfg_touch;
	bfg->nextthink = level.time + 8000/speed;
	bfg->think = G_FreeEdict;
	bfg->radius_dmg = damage;
	bfg->dmg_radius = damage_radius;
	bfg->classname = "bfg blast";
	bfg->s.sound = gi.soundindex ("weapons/bfg__l1a.wav");

	bfg->think = bfg_think;
	bfg->nextthink = level.time + FRAMETIME;
	bfg->teammaster = bfg;
	bfg->teamchain = NULL;

	if (self->client)
		check_dodge (self, bfg->s.origin, dir, speed);

	gi.linkentity (bfg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movss %xmm0, 0x4(%rsp)
movl %r8d, %r12d
movl %ecx, (%rsp)
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
callq 0x19710
movq %rax, %r14
movss (%r13), %xmm0
movss %xmm0, 0x4(%rax)
movss 0x4(%r13), %xmm0
movss %xmm0, 0x8(%rax)
movss 0x8(%r13), %xmm0
movss %xmm0, 0xc(%rax)
movss (%rbx), %xmm0
movss %xmm0, 0x19c(%rax)
movss 0x4(%rbx), %xmm0
movss %xmm0, 0x1a0(%rax)
movss 0x8(%rbx), %xmm0
movss %xmm0, 0x1a4(%rax)
leaq 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0x190d0
xorps %xmm0, %xmm0
cvtsi2ss %r12d, %xmm0
leaq 0x1c0(%r14), %rsi
movq %rbx, %rdi
callq 0x189d0
movl $0x8, 0x118(%r14)
movabsq $0x600000300000002, %rax # imm = 0x600000300000002
movq %rax, 0x108(%r14)
orl $0x2080, 0x40(%r14)     # imm = 0x2080
xorps %xmm0, %xmm0
movups %xmm0, 0xcc(%r14)
xorl %r13d, %r13d
movq %r13, 0xdc(%r14)
movq 0x27c08(%rip), %rbp     # 0x69600
leaq 0x18a6b(%rip), %rdi     # 0x5a46a
callq *0x40(%rbp)
movl %eax, 0x28(%r14)
movq %r15, 0x110(%r14)
movq 0x27c24(%rip), %rax     # 0x69638
movq %rax, 0x220(%r14)
movl $0x1f40, %eax           # imm = 0x1F40
xorl %edx, %edx
idivl %r12d
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movq 0x2836d(%rip), %r12     # 0x69da0
addss 0x4(%r12), %xmm0
movss %xmm0, 0x200(%r14)
movq 0x279e6(%rip), %rax     # 0x69430
movq %rax, 0x210(%r14)
movl (%rsp), %eax
movl %eax, 0x284(%r14)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x288(%r14)
leaq 0x18a0c(%rip), %rax     # 0x5a47d
movq %rax, 0x138(%r14)
leaq 0x130d7(%rip), %rdi     # 0x54b56
callq *0x48(%rbp)
movl %eax, 0x4c(%r14)
movq 0x28463(%rip), %rax     # 0x69ef0
movq %rax, 0x210(%r14)
movss 0x4(%r12), %xmm0
addss 0x127ed(%rip), %xmm0    # 0x54290
movss %xmm0, 0x200(%r14)
movq %r14, 0x2d0(%r14)
movq %r13, 0x2c8(%r14)
cmpq %r13, 0x58(%r15)
je 0x41acf
movq %r14, %rdi
addq $0x4, %rdi
movq %rbx, %rsi
callq 0x40464
movq %r14, %rdi
movq 0x27b27(%rip), %rax     # 0x69600
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x90(%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/m_boss3.c
// Function: Use_Boss3
void Use_Boss3 (edict_t *ent, edict_t *other, edict_t *activator)
{
	gi.WriteByte (svc_temp_entity);
	gi.WriteByte (TE_BOSSTPORT);
	gi.WritePosition (ent->s.origin);
	gi.multicast (ent->s.origin, MULTICAST_PVS);
	G_FreeEdict (ent);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x27b01(%rip), %r15     # 0x69600
movl $0x3, %edi
callq *0xc8(%r15)
movl $0x16, %edi
callq *0xc8(%r15)
leaq 0x4(%rbx), %r14
movq %r14, %rdi
callq *0xf0(%r15)
movq %r14, %rdi
movl $0x2, %esi
callq *0xb0(%r15)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x19a60
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/m_boss3.c
// Function: SP_monster_boss3_stand
void SP_monster_boss3_stand (edict_t *self)
{
	if (deathmatch->value)
	{
		G_FreeEdict (self);
		return;
	}

	self->movetype = MOVETYPE_STEP;
	self->solid = SOLID_BBOX;
	self->model = "models/monsters/boss3/rider/tris.md2";
	self->s.modelindex = gi.modelindex (self->model);
	self->s.frame = FRAME_stand201;

	gi.soundindex ("misc/bigtele.wav");

	VectorSet (self->mins, -32, -32, 0);
	VectorSet (self->maxs, 32, 32, 90);

	self->use = Use_Boss3;
	self->think = Think_Boss3Stand;
	self->nextthink = level.time + FRAMETIME;
	gi.linkentity (self);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2833e(%rip), %rax     # 0x69ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x41b94
jnp 0x41ba3
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19a60
movl $0x5, 0x118(%rbx)
movl $0x2, 0x108(%rbx)
leaq 0x188fc(%rip), %rdi     # 0x5a4ba
movq %rdi, 0x120(%rbx)
movq 0x27a34(%rip), %r14     # 0x69600
callq *0x40(%r14)
movl %eax, 0x28(%rbx)
movl $0x19e, 0x38(%rbx)      # imm = 0x19E
leaq 0x188fe(%rip), %rdi     # 0x5a4df
callq *0x48(%r14)
movaps 0x166f4(%rip), %xmm0    # 0x582e0
movups %xmm0, 0xcc(%rbx)
movabsq $0x42b4000042000000, %rax # imm = 0x42B4000042000000
movq %rax, 0xdc(%rbx)
movq 0x278cd(%rip), %rax     # 0x694d8
movq %rax, 0x228(%rbx)
movq 0x2803f(%rip), %rax     # 0x69c58
movq %rax, 0x210(%rbx)
movq 0x28179(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
addss 0x1265c(%rip), %xmm0    # 0x54290
movss %xmm0, 0x200(%rbx)
movq %rbx, %rdi
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x90(%rax)
nop
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/m_move.c
// Function: SV_StepDirection
qboolean SV_StepDirection (edict_t *ent, float yaw, float dist)
{
	vec3_t		move, oldorigin;
	float		delta;
	
	ent->ideal_yaw = yaw;
	M_ChangeYaw (ent);
	
	yaw = yaw*M_PI*2 / 360;
	move[0] = cos(yaw)*dist;
	move[1] = sin(yaw)*dist;
	move[2] = 0;

	VectorCopy (ent->s.origin, oldorigin);
	if (SV_movestep (ent, move, false))
	{
		delta = ent->s.angles[YAW] - ent->ideal_yaw;
		if (delta > 45 && delta < 315)
		{		// not turned far enough, so don't take the step
			VectorCopy (oldorigin, ent->s.origin);
		}
		gi.linkentity (ent);
		G_TouchTriggers (ent);
		return true;
	}
	gi.linkentity (ent);
	G_TouchTriggers (ent);
	return false;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movss %xmm1, 0x8(%rsp)
movss %xmm0, (%rsp)
movq %rdi, %rbx
movss %xmm0, 0x1fc(%rdi)
callq 0x18330
xorps %xmm0, %xmm0
cvtss2sd (%rsp), %xmm0
mulsd 0x17c8f(%rip), %xmm0    # 0x5a228
addsd %xmm0, %xmm0
divsd 0x17f7b(%rip), %xmm0    # 0x5a520
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, (%rsp)
callq 0x18990
xorps %xmm1, %xmm1
cvtss2sd 0x8(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
leaq 0x14(%rsp), %r14
movss %xmm0, (%r14)
movsd (%rsp), %xmm0
callq 0x19550
mulsd 0x8(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%r14)
movl $0x0, 0x8(%r14)
movss 0x4(%rbx), %xmm0
movss %xmm0, 0x8(%rsp)
movss 0x8(%rbx), %xmm0
movss %xmm0, (%rsp)
movss 0xc(%rbx), %xmm0
movss %xmm0, 0x10(%rsp)
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x19a50
testl %eax, %eax
je 0x42675
movss 0x14(%rbx), %xmm0
subss 0x1fc(%rbx), %xmm0
ucomiss 0x17ec7(%rip), %xmm0    # 0x5a508
movl $0x1, %ebp
jbe 0x42675
movss 0x17ebc(%rip), %xmm1    # 0x5a50c
ucomiss %xmm0, %xmm1
jbe 0x42675
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%rbx)
movss (%rsp), %xmm0
movss %xmm0, 0x8(%rbx)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0xc(%rbx)
movq 0x26f84(%rip), %rax     # 0x69600
movq %rbx, %rdi
callq *0x90(%rax)
movq %rbx, %rdi
callq 0x19200
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/m_move.c
// Function: M_MoveToGoal
void M_MoveToGoal (edict_t *ent, float dist)
{
	edict_t		*goal;
	
	goal = ent->goalentity;
	
	if (!ent->groundentity && !(ent->flags & (FL_FLY|FL_SWIM)))
		return;
	
	// if the next step hits the enemy, return immediately
	if (ent->enemy &&  SV_CloseEnough (ent, ent->enemy, dist) )
		return;
	
	// bump around
	if ((rand() & 3) == 1 || !SV_StepDirection (ent, ent->ideal_yaw, dist))
	{
		if (ent->inuse)
			SV_NewChaseDir (ent, goal, dist);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x1e8(%rdi), %rbx
cmpq $0x0, 0x2b8(%rdi)
jne 0x429ef
testb $0x3, 0x11c(%r14)
je 0x42a8e
movq 0x2a0(%r14), %rax
testq %rax, %rax
je 0x42a3e
movq $-0xc, %rcx
movss 0xf0(%rax,%rcx), %xmm2
movss 0xfc(%r14,%rcx), %xmm1
addss %xmm0, %xmm1
ucomiss %xmm1, %xmm2
ja 0x42a3e
movss 0xf0(%r14,%rcx), %xmm1
subss %xmm0, %xmm1
ucomiss 0xfc(%rax,%rcx), %xmm1
ja 0x42a3e
addq $0x4, %rcx
jne 0x42a02
jmp 0x42a8e
movss %xmm0, 0x4(%rsp)
callq 0x19a20
movss 0x4(%rsp), %xmm1
andl $0x3, %eax
cmpl $0x1, %eax
je 0x42a72
movss 0x1fc(%r14), %xmm0
movq %r14, %rdi
callq 0x18200
movss 0x4(%rsp), %xmm1
testl %eax, %eax
jne 0x42a8e
cmpl $0x0, 0x60(%r14)
je 0x42a8e
movq %r14, %rdi
movq %rbx, %rsi
movaps %xmm1, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x18840
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/m_move.c
// Function: M_walkmove
qboolean M_walkmove (edict_t *ent, float yaw, float dist)
{
	vec3_t	move;
	
	if (!ent->groundentity && !(ent->flags & (FL_FLY|FL_SWIM)))
		return false;

	yaw = yaw * M_PI * 2 / 360;
	
	move[0] = cos(yaw)*dist;
	move[1] = sin(yaw)*dist;
	move[2] = 0;

	return SV_movestep(ent, move, true);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x2b8(%rdi)
jne 0x42ab7
testb $0x3, 0x11c(%rbx)
je 0x42b44
cvtss2sd %xmm0, %xmm0
mulsd 0x17765(%rip), %xmm0    # 0x5a228
addsd %xmm0, %xmm0
divsd 0x17a51(%rip), %xmm0    # 0x5a520
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movss %xmm1, 0x8(%rsp)
callq 0x18990
xorps %xmm1, %xmm1
cvtss2sd 0x8(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
leaq 0x1c(%rsp), %r14
movss %xmm0, (%r14)
movsd 0x10(%rsp), %xmm0
callq 0x19550
mulsd 0x8(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%r14)
movl $0x0, 0x8(%r14)
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19a50
addq $0x28, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x42b3c
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: ClientHasFlag
edict_t *ClientHasFlag(edict_t *ent)
{
	edict_t	*flag;
	int		teamnum = ent->client->ctf.teamnum;
	
	// ctf_validateflags(); //make sure nothing wrong with flags before calling this
	
	// Were we carrying a flag?
	flag = ctf_getteamflag(teamnum, CTF_TEAM_OPPOSING);
	
	if (flag && flag->item)
	{
		if (ent->client->pers.inventory[ITEM_INDEX(flag->item)])
			return flag;
		else
			return NULL;
	}
	return NULL;
	
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %rax
movl 0x1100(%rax), %edi
movl $0xfffffffa, %esi       # imm = 0xFFFFFFFA
callq 0x18d70
testq %rax, %rax
je 0x42b9e
movq 0x330(%rax), %rcx
testq %rcx, %rcx
je 0x42b9e
movq 0x58(%rbx), %rdx
subq 0x272c4(%rip), %rcx     # 0x69e40
sarq $0x3, %rcx
movabsq $-0x3c3c3c3c3c3c3c3c, %rsi # imm = 0xC3C3C3C3C3C3C3C4
imulq %rcx, %rsi
xorl %ecx, %ecx
cmpl $0x0, 0x318(%rdx,%rsi)
cmoveq %rcx, %rax
jmp 0x42ba0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SP_info_player_start
void SP_info_player_start(edict_t *self)
{
	if (!coop->value)
		return;
	if(Q_stricmp(level.mapname, "security") == 0)
	{
		// invoke one of our gross, ugly, disgusting hacks
		self->think = SP_CreateCoopSpots;
		self->nextthink = level.time + FRAMETIME;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x273b3(%rip), %rax     # 0x69f60
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x42bbf
jnp 0x42c01
movq %rdi, %rbx
movq 0x271d7(%rip), %r14     # 0x69da0
leaq 0x48(%r14), %rdi
leaq 0x15236(%rip), %rsi     # 0x57e0a
callq 0x18690
testl %eax, %eax
jne 0x42c01
leaq 0x25(%rip), %rax        # 0x42c09
movq %rax, 0x210(%rbx)
movss 0x4(%r14), %xmm0
addss 0x11697(%rip), %xmm0    # 0x54290
movss %xmm0, 0x200(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SP_CreateCoopSpots
static void SP_CreateCoopSpots (edict_t *self)
{
	edict_t	*spot;

	if(Q_stricmp(level.mapname, "security") == 0)
	{
		spot = G_Spawn();
		spot->classname = "info_player_coop";
		spot->s.origin[0] = 188 - 64;
		spot->s.origin[1] = -164;
		spot->s.origin[2] = 80;
		spot->targetname = "jail3";
		spot->s.angles[1] = 90;

		spot = G_Spawn();
		spot->classname = "info_player_coop";
		spot->s.origin[0] = 188 + 64;
		spot->s.origin[1] = -164;
		spot->s.origin[2] = 80;
		spot->targetname = "jail3";
		spot->s.angles[1] = 90;

		spot = G_Spawn();
		spot->classname = "info_player_coop";
		spot->s.origin[0] = 188 + 128;
		spot->s.origin[1] = -164;
		spot->s.origin[2] = 80;
		spot->targetname = "jail3";
		spot->s.angles[1] = 90;

		return;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x27189(%rip), %rdi     # 0x69da0
addq $0x48, %rdi
leaq 0x151e8(%rip), %rsi     # 0x57e0a
callq 0x18690
testl %eax, %eax
jne 0x42cc0
callq 0x19710
leaq 0x16325(%rip), %rbx     # 0x58f60
movq %rbx, 0x138(%rax)
movabsq $-0x3cdbffffbd080000, %rcx # imm = 0xC324000042F80000
movq %rcx, 0x4(%rax)
movl $0x42a00000, %ebp       # imm = 0x42A00000
movl %ebp, 0xc(%rax)
leaq 0x18712(%rip), %r14     # 0x5b371
movq %r14, 0x158(%rax)
movl $0x42b40000, %r15d      # imm = 0x42B40000
movl %r15d, 0x14(%rax)
callq 0x19710
movq %rbx, 0x138(%rax)
movabsq $-0x3cdbffffbc840000, %rcx # imm = 0xC3240000437C0000
movq %rcx, 0x4(%rax)
movl %ebp, 0xc(%rax)
movq %r14, 0x158(%rax)
movl %r15d, 0x14(%rax)
callq 0x19710
movq %rbx, 0x138(%rax)
movabsq $-0x3cdbffffbc620000, %rcx # imm = 0xC3240000439E0000
movq %rcx, 0x4(%rax)
movl %ebp, 0xc(%rax)
movq %r14, 0x158(%rax)
movl %r15d, 0x14(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SP_info_player_coop
void SP_info_player_coop(edict_t *self)
{
	if (!coop->value)
	{
		G_FreeEdict (self);
		return;
	}

	if((Q_stricmp(level.mapname, "jail2") == 0)   ||
	   (Q_stricmp(level.mapname, "jail4") == 0)   ||
	   (Q_stricmp(level.mapname, "mine1") == 0)   ||
	   (Q_stricmp(level.mapname, "mine2") == 0)   ||
	   (Q_stricmp(level.mapname, "mine3") == 0)   ||
	   (Q_stricmp(level.mapname, "mine4") == 0)   ||
	   (Q_stricmp(level.mapname, "lab") == 0)     ||
	   (Q_stricmp(level.mapname, "boss1") == 0)   ||
	   (Q_stricmp(level.mapname, "fact3") == 0)   ||
	   (Q_stricmp(level.mapname, "biggun") == 0)  ||
	   (Q_stricmp(level.mapname, "space") == 0)   ||
	   (Q_stricmp(level.mapname, "command") == 0) ||
	   (Q_stricmp(level.mapname, "power2") == 0) ||
	   (Q_stricmp(level.mapname, "strike") == 0))
	{
		// invoke one of our gross, ugly, disgusting hacks
		self->think = SP_FixCoopSpots;
		self->nextthink = level.time + FRAMETIME;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x27263(%rip), %rax     # 0x69f60
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x42d13
jnp 0x42e6e
movq 0x27086(%rip), %r15     # 0x69da0
leaq 0x48(%r15), %r14
leaq 0x1794b(%rip), %rsi     # 0x5a670
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
je 0x42e44
leaq 0x1793a(%rip), %rsi     # 0x5a676
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
je 0x42e44
leaq 0x1647c(%rip), %rsi     # 0x591cf
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
je 0x42e44
leaq 0x16471(%rip), %rsi     # 0x591db
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
je 0x42e44
leaq 0x171f9(%rip), %rsi     # 0x59f7a
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
je 0x42e44
leaq 0x178e4(%rip), %rsi     # 0x5a67c
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
je 0x42e44
leaq 0x178d3(%rip), %rsi     # 0x5a682
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
je 0x42e44
leaq 0x178c0(%rip), %rsi     # 0x5a686
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
je 0x42e44
leaq 0x17207(%rip), %rsi     # 0x59fe0
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
je 0x42e44
leaq 0x178a0(%rip), %rsi     # 0x5a68c
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
je 0x42e44
leaq 0x18196(%rip), %rsi     # 0x5af95
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
je 0x42e44
leaq 0x1678f(%rip), %rsi     # 0x595a1
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
je 0x42e44
leaq 0x1786e(%rip), %rsi     # 0x5a693
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
je 0x42e44
leaq 0x150f9(%rip), %rsi     # 0x57f31
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
jne 0x42e68
leaq 0x30(%rip), %rax        # 0x42e7b
movq %rax, 0x210(%rbx)
movss 0x4(%r15), %xmm0
addss 0x11430(%rip), %xmm0    # 0x54290
movss %xmm0, 0x200(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x19a60
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SP_FixCoopSpots
static void SP_FixCoopSpots (edict_t *self)
{
	edict_t	*spot;
	vec3_t	d;

	spot = NULL;

	while(1)
	{
		spot = G_Find(spot, FOFS(classname), "info_player_start");
		if (!spot)
			return;
		if (!spot->targetname)
			continue;
		VectorSubtract(self->s.origin, spot->s.origin, d);
		if (VectorLength(d) < 384)
		{
			if ((!self->targetname) || Q_stricmp(self->targetname, spot->targetname) != 0)
			{
//				gi.dprintf("FixCoopSpots changed %s at %s targetname from %s to %s\n", self->classname, vtos(self->s.origin), self->targetname, spot->targetname);
				self->targetname = spot->targetname;
			}
			return;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x11699(%rip), %rdx     # 0x54529
xorl %edi, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x19430
testq %rax, %rax
je 0x42f4a
movq %rax, %r14
leaq 0x1167a(%rip), %r15     # 0x54529
leaq 0xc(%rsp), %r12
cmpq $0x0, 0x158(%r14)
je 0x42f06
movss 0x4(%rbx), %xmm0
subss 0x4(%r14), %xmm0
movss %xmm0, 0xc(%rsp)
movss 0x8(%rbx), %xmm0
subss 0x8(%r14), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0xc(%rbx), %xmm0
subss 0xc(%r14), %xmm0
movss %xmm0, 0x14(%rsp)
movq %r12, %rdi
callq 0x192e0
movss 0x17647(%rip), %xmm1    # 0x5a548
ucomiss %xmm0, %xmm1
ja 0x42f20
movq %r14, %rdi
movl $0x138, %esi            # imm = 0x138
movq %r15, %rdx
callq 0x19430
movq %rax, %r14
testq %rax, %rax
jne 0x42eb4
jmp 0x42f4a
movq 0x158(%rbx), %rdi
testq %rdi, %rdi
je 0x42f3c
movq 0x158(%r14), %rsi
callq 0x18690
testl %eax, %eax
je 0x42f4a
movq 0x158(%r14), %rax
movq %rax, 0x158(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SP_info_player_red
void SP_info_player_red(edict_t *self)
{
	vec3_t	end, angles;
	
	// If we have no facing for this spawn point...
	//  Turn it to face the flag
	if (!self->s.angles[1] && redflag)
	{
		VectorSubtract(redflag->s.origin, self->s.origin, end);
		vectoangles(end, angles);
		
		self->s.angles[1] = angles[1];
	}
	self->classname = "info_player_red";
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
ucomiss 0x14(%rdi), %xmm0
setnp %al
sete %cl
andb %al, %cl
movq 0x26882(%rip), %rax     # 0x697f8
movq (%rax), %rax
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x42fcd
movss 0x4(%rax), %xmm0
subss 0x4(%rbx), %xmm0
leaq 0xc(%rsp), %rdi
movss %xmm0, (%rdi)
movss 0x8(%rax), %xmm0
subss 0x8(%rbx), %xmm0
movss %xmm0, 0x4(%rdi)
movss 0xc(%rax), %xmm0
subss 0xc(%rbx), %xmm0
movss %xmm0, 0x8(%rdi)
movq %rsp, %r14
movq %r14, %rsi
callq 0x190d0
movss 0x4(%r14), %xmm0
movss %xmm0, 0x14(%rbx)
leaq 0x12fbb(%rip), %rax     # 0x55f8f
movq %rax, 0x138(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SP_info_player_blue
void SP_info_player_blue(edict_t *self)
{
	vec3_t	end, angles;
	
	// If we have no facing for this spawn point...
	//  Turn it to face the flag
	if (!self->s.angles[1] && blueflag)
	{
		VectorSubtract(blueflag->s.origin, self->s.origin, end);
		vectoangles(end, angles);
		
		self->s.angles[1] = angles[1];
	}
	self->classname = "info_player_blue";
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
ucomiss 0x14(%rdi), %xmm0
setnp %al
sete %cl
andb %al, %cl
movq 0x2685d(%rip), %rax     # 0x69860
movq (%rax), %rax
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x4305a
movss 0x4(%rax), %xmm0
subss 0x4(%rbx), %xmm0
leaq 0xc(%rsp), %rdi
movss %xmm0, (%rdi)
movss 0x8(%rax), %xmm0
subss 0x8(%rbx), %xmm0
movss %xmm0, 0x4(%rdi)
movss 0xc(%rax), %xmm0
subss 0xc(%rbx), %xmm0
movss %xmm0, 0x8(%rdi)
movq %rsp, %r14
movq %r14, %rsi
callq 0x190d0
movss 0x4(%r14), %xmm0
movss %xmm0, 0x14(%rbx)
leaq 0x12f3e(%rip), %rax     # 0x55f9f
movq %rax, 0x138(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: IsNeutral
qboolean IsNeutral (edict_t *ent)
{
	char		*info;

	if (!ent->client)
		return false;

	info = Info_ValueForKey (ent->client->pers.userinfo, "gender");
	if (info[0] != 'f' && info[0] != 'F' && info[0] != 'm' && info[0] != 'M')
		return true;
	return false;
}

// Assembly:
movq 0x58(%rdi), %rdi
xorl %eax, %eax
testq %rdi, %rdi
je 0x430ea
pushq %rax
addq $0xc0, %rdi
leaq 0x175dc(%rip), %rsi     # 0x5a69a
callq 0x18bb0
movzbl (%rax), %ecx
movl $0x1, %eax
addl $-0x46, %ecx
cmpl $0x27, %ecx
leaq 0x8(%rsp), %rsp
ja 0x430ea
movabsq $0x8100000081, %rdx     # imm = 0x8100000081
btq %rcx, %rdx
jae 0x430ea
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: LookAtKiller
void LookAtKiller (edict_t *self, edict_t *inflictor, edict_t *attacker)
{
	vec3_t		dir;

	if (attacker && attacker != world && attacker != self)
	{
		VectorSubtract (attacker->s.origin, self->s.origin, dir);
	}
	else if (inflictor && inflictor != world && inflictor != self)
	{
		VectorSubtract (inflictor->s.origin, self->s.origin, dir);
	}
	else
	{
		self->client->killer_yaw = self->s.angles[YAW];
		return;
	}

	if (dir[0])
		self->client->killer_yaw = 180/M_PI*atan2(dir[1], dir[0]);
	else {
		self->client->killer_yaw = 0;
		if (dir[1] > 0)
			self->client->killer_yaw = 90;
		else if (dir[1] < 0)
			self->client->killer_yaw = -90;
	}
	if (self->client->killer_yaw < 0)
		self->client->killer_yaw += 360;
	

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x25ba4(%rip), %rax     # 0x69558
movq (%rax), %rax
cmpq %rdi, %rdx
je 0x439c6
testq %rdx, %rdx
je 0x439c6
cmpq %rdx, %rax
jne 0x439d8
cmpq %rbx, %rsi
je 0x43a3c
testq %rsi, %rsi
je 0x43a3c
movq %rsi, %rdx
cmpq %rsi, %rax
je 0x43a3c
movss 0x4(%rdx), %xmm1
movss 0x8(%rdx), %xmm0
subss 0x4(%rbx), %xmm1
subss 0x8(%rbx), %xmm0
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jne 0x439f6
jnp 0x43a1d
cvtss2sd %xmm0, %xmm0
cvtss2sd %xmm1, %xmm1
callq 0x190b0
mulsd 0x16c35(%rip), %xmm0    # 0x5a640
cvtsd2ss %xmm0, %xmm0
movq 0x58(%rbx), %rax
movss %xmm0, 0xe74(%rax)
jmp 0x43a59
movq 0x58(%rbx), %rax
movl $0x0, 0xe74(%rax)
ucomiss %xmm2, %xmm0
jbe 0x43a47
movl $0x42b40000, 0xe74(%rax) # imm = 0x42B40000
jmp 0x43a59
movss 0x14(%rbx), %xmm0
movq 0x58(%rbx), %rax
jmp 0x43a75
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x43a59
movl $0xc2b40000, 0xe74(%rax) # imm = 0xC2B40000
movq 0x58(%rbx), %rax
movss 0xe74(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x43a7d
addss 0x112af(%rip), %xmm0    # 0x54d24
movss %xmm0, 0xe74(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: InitClientPersistent
void InitClientPersistent (gclient_t *client)
{
	gitem_t		*item;

	memset (&client->pers, 0, sizeof(client->pers));
	
	// CTF CODE -- LM_JORM
	item = FindItem("Grappling Hook");
	client->pers.inventory[ITEM_INDEX(item)] = 1;
	// END CTF CODE -- LM_JORM
	
	
	item = FindItem("Blaster");
	client->pers.selected_item = ITEM_INDEX(item);
	client->pers.inventory[client->pers.selected_item] = 1;

	client->pers.weapon = item;

	client->pers.health			= 100;
	client->pers.max_health		= 100;

	client->pers.max_bullets	= 200;
	client->pers.max_shells		= 100;
	client->pers.max_rockets	= 50;
	client->pers.max_grenades	= 50;
	client->pers.max_cells		= 200;
	client->pers.max_slugs		= 50;

	client->pers.connected = true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0xc0, %rdi
movl $0x698, %edx            # imm = 0x698
xorl %esi, %esi
callq 0x18880
leaq 0x101a1(%rip), %rdi     # 0x547c7
callq 0x189e0
movq 0x2580e(%rip), %r14     # 0x69e40
subq %r14, %rax
sarq $0x3, %rax
movabsq $-0x3c3c3c3c3c3c3c3c, %rcx # imm = 0xC3C3C3C3C3C3C3C4
imulq %rax, %rcx
movl $0x1, %ebp
movl %ebp, 0x318(%rbx,%rcx)
leaq 0x130e9(%rip), %rdi     # 0x57743
callq 0x189e0
movq %rax, %rcx
subq %r14, %rcx
sarq $0x3, %rcx
movabsq $-0xf0f0f0f0f0f0f0f, %rdx # imm = 0xF0F0F0F0F0F0F0F1
imulq %rcx, %rdx
movl %edx, 0x314(%rbx)
movslq %edx, %rcx
movl %ebp, 0x318(%rbx,%rcx,4)
movq %rax, 0x730(%rbx)
movl $0x64, 0x30c(%rbx)
movaps 0x15fc1(%rip), %xmm0    # 0x5a660
movups %xmm0, 0x718(%rbx)
movabsq $0x32000000c8, %rax     # imm = 0x32000000C8
movq %rax, 0x728(%rbx)
movabsq $0x6400000001, %rax     # imm = 0x6400000001
movq %rax, 0x304(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: InitClientResp
void InitClientResp (gclient_t *client)
{
	//surt
	//	  int teamnum, radio, extra_flags;
	//	  qboolean	goodskin;	// Flags that skin has been approved, no need to forcecommand
	//	  int 		pingalertfloor;
	//	  int 		pingalertceiling;
	//	  int 	compass;
	stats_player_s *playertemp;
	
	ctftemp = client->ctf;
	playertemp = client->p_stats_player;
	
	memset (&client->resp, 0, sizeof(client->resp));
	client->resp.enterframe = level.framenum;
	
	client->ctf = ctftemp;
	client->p_stats_player = playertemp;

	if ((int)ctfflags->value & CTF_TEAM_RESET)
	{
		//if (client->ctf.teamnum != CTF_TEAM_OBSERVER)
		//bat
		if (client->ctf.teamnum != CTF_TEAM_OBSERVER && 
			client->ctf.teamnum != CTF_TEAM_OBSERVER_RED &&
			client->ctf.teamnum != CTF_TEAM_OBSERVER_BLUE)
				client->ctf.teamnum = CTF_TEAM_UNDEFINED; // LM_JORM -- This will cause us to be on a new team
	}
	//surt above is allowed as a special case for now, otherwise only set teamnum
	//in ctf_SetEntTeam
	
	client->resp.coop_respawn = client->pers;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1100(%rdi), %r14
leaq 0x4d8c5(%rip), %rdi     # 0x91fa8
movl $0x8038, %edx           # imm = 0x8038
movq %r14, %rsi
callq 0x18c80
leaq 0x758(%rbx), %r15
movl $0x6b0, %edx            # imm = 0x6B0
movq %r15, %rdi
xorl %esi, %esi
callq 0x18880
movq 0x25693(%rip), %rax     # 0x69da0
movl (%rax), %eax
movl %eax, 0xdf0(%rbx)
movq 0x2543c(%rip), %rax     # 0x69b58
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
testb $0x4, %al
je 0x44735
cmpl $-0x4, (%r14)
ja 0x44735
movl $0x0, (%r14)
addq $0xc0, %rbx
movl $0x698, %edx            # imm = 0x698
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x18c80
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SaveClientData
void SaveClientData (void)
{
	int		i;
	edict_t	*ent;

	for (i=0 ; i<game.maxclients ; i++)
	{
		ent = &g_edicts[1+i];
		if (!ent->inuse)
			continue;
		game.clients[i].pers.health = ent->health;
		game.clients[i].pers.max_health = ent->max_health;
		game.clients[i].pers.savedFlags = (ent->flags & (FL_GODMODE|FL_NOTARGET|FL_POWER_ARMOR));
		if (coop->value)
			game.clients[i].pers.score = ent->client->resp.score;
	}
}

// Assembly:
movq 0x255e8(%rip), %rdi     # 0x69d40
movslq 0x610(%rdi), %rsi
testq %rsi, %rsi
jle 0x447ff
movq 0x24de9(%rip), %rax     # 0x69558
movq (%rax), %rax
movq 0x257e7(%rip), %rcx     # 0x69f60
movq (%rcx), %rcx
movl $0x308, %edx            # imm = 0x308
addq 0x408(%rdi), %rdx
imulq $0x4a8, %rsi, %rsi      # imm = 0x4A8
xorl %edi, %edi
movl $0x1030, %r8d           # imm = 0x1030
xorps %xmm0, %xmm0
cmpl $0x0, 0x508(%rax,%rdi)
je 0x447ec
movl 0x6fc(%rax,%rdi), %r9d
movl %r9d, (%rdx)
movl 0x700(%rax,%rdi), %r9d
movl %r9d, 0x4(%rdx)
movl 0x5c4(%rax,%rdi), %r9d
andl %r8d, %r9d
movl %r9d, 0x8(%rdx)
movss 0x20(%rcx), %xmm1
ucomiss %xmm0, %xmm1
jne 0x447d6
jnp 0x447ec
movq 0x500(%rax,%rdi), %r9
movl 0xdf4(%r9), %r9d
movl %r9d, 0x43c(%rdx)
addq $0x9140, %rdx           # imm = 0x9140
addq $0x4a8, %rdi            # imm = 0x4A8
cmpq %rdi, %rsi
jne 0x4479a
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: FetchClientEntData
void FetchClientEntData (edict_t *ent)
{
	ent->health = ent->client->pers.health;
	ent->max_health = ent->client->pers.max_health;
	ent->flags |= ent->client->pers.savedFlags;
	if (coop->value)
		ent->client->resp.score = ent->client->pers.score;
}

// Assembly:
movq 0x58(%rdi), %rax
movl 0x308(%rax), %ecx
movl %ecx, 0x254(%rdi)
movl 0x30c(%rax), %ecx
movl %ecx, 0x258(%rdi)
movl 0x310(%rax), %ecx
orl %ecx, 0x11c(%rdi)
movq 0x25731(%rip), %rcx     # 0x69f60
movq (%rcx), %rcx
movss 0x20(%rcx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x44841
jnp 0x4484d
movl 0x744(%rax), %ecx
movl %ecx, 0xdf4(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: PlayersRangeFromSpot
float	PlayersRangeFromSpot (edict_t *spot)
{
	edict_t	*player;
	float	bestplayerdistance;
	vec3_t	v;
	int		n;
	float	playerdistance;


	bestplayerdistance = 9999999;

	for (n = 1; n <= maxclients->value; n++)
	{
		player = &g_edicts[n];

		if (!player->inuse)
			continue;

		if (player->health <= 0)
			continue;

		VectorSubtract (spot->s.origin, player->s.origin, v);
		playerdistance = VectorLength (v);

		if (playerdistance < bestplayerdistance)
			bestplayerdistance = playerdistance;
	}

	return bestplayerdistance;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x24ccd(%rip), %r15     # 0x69530
movq (%r15), %rax
movss 0x20(%rax), %xmm0
ucomiss 0xf6b6(%rip), %xmm0     # 0x53f28
jae 0x44887
movss 0xfa10(%rip), %xmm0     # 0x5428c
movss %xmm0, 0x8(%rsp)
jmp 0x44935
movq %rdi, %rbx
movss 0xf9fa(%rip), %xmm0     # 0x5428c
movss %xmm0, 0x8(%rsp)
movl $0x4ac, %r12d           # imm = 0x4AC
movl $0x2, %ebp
movq 0x24cae(%rip), %r13     # 0x69558
leaq 0xc(%rsp), %r14
movq (%r13), %rax
cmpl $0x0, 0x5c(%rax,%r12)
je 0x44914
cmpl $0x0, 0x250(%rax,%r12)
jle 0x44914
movss 0x4(%rbx), %xmm0
subss (%rax,%r12), %xmm0
movss %xmm0, 0xc(%rsp)
movss 0x8(%rbx), %xmm0
subss 0x4(%rax,%r12), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0xc(%rbx), %xmm0
subss 0x8(%rax,%r12), %xmm0
movss %xmm0, 0x14(%rsp)
movq %r14, %rdi
callq 0x192e0
movss 0x8(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x44914
movss %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2ss %ebp, %xmm0
movq (%r15), %rax
movss 0x20(%rax), %xmm1
addq $0x4a8, %r12            # imm = 0x4A8
incl %ebp
ucomiss %xmm0, %xmm1
jae 0x448af
movss 0x8(%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SelectRandomDeathmatchSpawnPoint
edict_t *SelectRandomDeathmatchSpawnPoint (void)
{
	edict_t	*spot, *spot1, *spot2;
	int		count = 0;
	int		selection;
	float	range, range1, range2;

	spot = NULL;
	range1 = range2 = 99999;
	spot1 = spot2 = NULL;

	while ((spot = G_Find (spot, FOFS(classname), "info_player_deathmatch")) != NULL)
	{
		count++;
		range = PlayersRangeFromSpot(spot);
		if (range < range1)
		{
			range1 = range;
			spot1 = spot;
		}
		else if (range < range2)
		{
			range2 = range;
			spot2 = spot;
		}
	}

	if (!count)
		return NULL;

	if (count <= 2)
	{
		spot1 = spot2 = NULL;
	}
	else
		count -= 2;

	selection = rand() % count;

	spot = NULL;
	do
	{
		spot = G_Find (spot, FOFS(classname), "info_player_deathmatch");
		if (spot == spot1 || spot == spot2)
			selection++;
	} while(selection--);

	return spot;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xfbb6(%rip), %rdx      # 0x54512
xorl %r15d, %r15d
xorl %edi, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x19430
movl $0x0, %r12d
movl $0x0, %r13d
testq %rax, %rax
je 0x44a00
movq %rax, %rbx
xorl %r13d, %r13d
movss 0x15bc2(%rip), %xmm0    # 0x5a550
leaq 0xfb7d(%rip), %r14      # 0x54512
movss %xmm0, 0x4(%rsp)
xorl %r12d, %r12d
xorl %r15d, %r15d
movss %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x19410
movaps %xmm0, %xmm1
movss 0x4(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x449c7
movq %rbx, %r15
movss %xmm1, 0x4(%rsp)
jmp 0x449e0
movss (%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x449db
movq %rbx, %r12
movss %xmm1, (%rsp)
jmp 0x449e0
movss %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x138, %esi            # imm = 0x138
movq %r14, %rdx
callq 0x19430
movq %rax, %rbx
incl %r13d
movss (%rsp), %xmm0
testq %rax, %rax
jne 0x449a1
testl %r13d, %r13d
je 0x44a5b
leal -0x2(%r13), %ebp
xorl %ebx, %ebx
cmpl $0x3, %r13d
cmovbq %rbx, %r15
cmovbq %rbx, %r12
cmovbl %r13d, %ebp
callq 0x19a20
cltd
idivl %ebp
movl %edx, %ebp
leaq 0xfae6(%rip), %r14      # 0x54512
movq %rbx, %rdi
movl $0x138, %esi            # imm = 0x138
movq %r14, %rdx
callq 0x19430
movq %rax, %rbx
cmpq %r15, %rax
sete %al
cmpq %r12, %rbx
sete %cl
orb %al, %cl
movzbl %cl, %eax
addl %ebp, %eax
subl $0x1, %eax
movl %eax, %ebp
jae 0x44a2c
jmp 0x44a5d
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SelectFarthestDeathmatchSpawnPoint
edict_t *SelectFarthestDeathmatchSpawnPoint (void)
{
	edict_t	*bestspot;
	float	bestdistance, bestplayerdistance;
	edict_t	*spot;


	spot = NULL;
	bestspot = NULL;
	bestdistance = 0;
	while ((spot = G_Find (spot, FOFS(classname), "info_player_deathmatch")) != NULL)
	{
		bestplayerdistance = PlayersRangeFromSpot (spot);

		if (bestplayerdistance > bestdistance)
		{
			bestspot = spot;
			bestdistance = bestplayerdistance;
		}
	}

	if (bestspot)
	{
		return bestspot;
	}

	// if there is a player just spawned on each and every start spot
	// we have no choice to turn one into a telefrag meltdown
	spot = G_Find (NULL, FOFS(classname), "info_player_deathmatch");

	return spot;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0xfa93(%rip), %rdx      # 0x54512
xorl %ebx, %ebx
xorl %edi, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x19430
testq %rax, %rax
je 0x44ae4
movq %rax, %r14
xorps %xmm0, %xmm0
xorl %ebx, %ebx
leaq 0xfa71(%rip), %r15      # 0x54512
movss %xmm0, 0xc(%rsp)
movq %r14, %rdi
callq 0x19410
movss 0xc(%rsp), %xmm1
ucomiss %xmm1, %xmm0
cmovaq %r14, %rbx
maxss %xmm1, %xmm0
movss %xmm0, 0xc(%rsp)
movq %r14, %rdi
movl $0x138, %esi            # imm = 0x138
movq %r15, %rdx
callq 0x19430
movq %rax, %r14
movss 0xc(%rsp), %xmm0
testq %rax, %rax
jne 0x44aa1
testq %rbx, %rbx
je 0x44af6
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0xfa15(%rip), %rdx      # 0x54512
xorl %edi, %edi
movl $0x138, %esi            # imm = 0x138
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x19430
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SelectTeamSpawnPoint
edict_t *SelectTeamSpawnPoint (edict_t *ent)
{
	edict_t	*bestspot;
	float	bestdistance, bestplayerdistance;
	edict_t	*spot;
	char	*spawntype;
	
	if (ent->client->ctf.teamnum == CTF_TEAM_RED) // RED team
		spawntype = "info_player_red";
	else // BLUE team
		spawntype = "info_player_blue";
	
	spot = NULL;
	bestspot = NULL;
	bestdistance = 0;
	while ((spot = G_Find (spot, FOFS(classname), spawntype)) != NULL)
	{
		bestplayerdistance = PlayersRangeFromSpot (spot);
		
		if (bestplayerdistance > bestdistance)
		{
			bestspot = spot;
			bestdistance = bestplayerdistance;
		}
	}
	
	if (bestspot)
	{
		return bestspot;
	}
	
	// if there is a player just spawned on each and every start spot
	// we have no choice to turn one into a telefrag meltdown
	spot = G_Find (NULL, FOFS(classname), spawntype);
	
	return spot;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x58(%rdi), %rax
cmpl $0x1, 0x1100(%rax)
leaq 0x11462(%rip), %rax     # 0x55f8f
leaq 0x1146b(%rip), %rbx     # 0x55f9f
cmoveq %rax, %rbx
xorl %r14d, %r14d
xorl %edi, %edi
movl $0x138, %esi            # imm = 0x138
movq %rbx, %rdx
callq 0x19430
testq %rax, %rax
je 0x44b9b
movq %rax, %r15
xorps %xmm0, %xmm0
xorl %r14d, %r14d
movss %xmm0, 0xc(%rsp)
movq %r15, %rdi
callq 0x19410
movss 0xc(%rsp), %xmm1
ucomiss %xmm1, %xmm0
cmovaq %r15, %r14
maxss %xmm1, %xmm0
movss %xmm0, 0xc(%rsp)
movq %r15, %rdi
movl $0x138, %esi            # imm = 0x138
movq %rbx, %rdx
callq 0x19430
movq %rax, %r15
movss 0xc(%rsp), %xmm0
testq %rax, %rax
jne 0x44b58
testq %r14, %r14
je 0x44bad
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorl %edi, %edi
movl $0x138, %esi            # imm = 0x138
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x19430
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SelectAnySpawnPoint
edict_t *SelectAnySpawnPoint (edict_t *ent)
{
	float	distance1, distance2;
	edict_t	*spot1, *spot2;
	
	
	if ( (int)(dmflags->value) & DF_SPAWN_FARTHEST)
		spot1 = SelectFarthestDeathmatchSpawnPoint ();
	else
		spot1 = SelectRandomDeathmatchSpawnPoint ();
	
	if (!spot1)
		return NULL;
	
	distance1 = PlayersRangeFromSpot (spot1);
	
	
	spot2 = SelectTeamSpawnPoint(ent);
	if (!spot2) // Do we have any team spawn points?
		return spot1;
	distance2 = PlayersRangeFromSpot (spot2);
	
	if (distance1 > distance2) // Is deathmatch better than team?
		return spot1;
	else
		return spot2;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x24a45(%rip), %rax     # 0x69618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
btl $0x9, %eax
jb 0x44be8
callq 0x18f00
jmp 0x44bed
callq 0x18110
movq %rax, %rbx
testq %rax, %rax
je 0x44c2a
movq %rbx, %rdi
callq 0x19410
movss %xmm0, 0x4(%rsp)
movq %r14, %rdi
callq 0x192f0
testq %rax, %rax
je 0x44c2c
movq %rax, %r14
movq %rax, %rdi
callq 0x19410
movss 0x4(%rsp), %xmm1
ucomiss %xmm0, %xmm1
cmovbeq %r14, %rbx
jmp 0x44c2c
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SelectCoopSpawnPoint
edict_t *SelectCoopSpawnPoint (edict_t *ent)
{
	int		index;
	edict_t	*spot = NULL;
	char	*target;

	index = ent->client - game.clients;

	// player 0 starts in normal player spawn point
	if (!index)
		return NULL;

	spot = NULL;

	// assume there are four coop spots at each spawnpoint
	while (1)
	{
		spot = G_Find (spot, FOFS(classname), "info_player_coop");
		if (!spot)
			return NULL;	// we didn't have enough...

		target = spot->targetname;
		if (!target)
			target = "";
		if ( Q_stricmp(game.spawnpoint, target) == 0 )
		{	// this is a coop spawn point for one of the clients here
			index--;
			if (!index)
				return spot;		// this is it
		}
	}


	return spot;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x58(%rdi), %rax
movq 0x250d8(%rip), %rcx     # 0x69d40
subq 0x408(%rcx), %rax
shrq $0x6, %rax
imull $0x4f4fc08d, %eax, %ebp # imm = 0x4F4FC08D
testl %ebp, %ebp
je 0x44ceb
leaq 0x142dc(%rip), %rdx     # 0x58f60
xorl %ebx, %ebx
xorl %edi, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x19430
testq %rax, %rax
je 0x44ced
leaq 0x10267(%rip), %r12     # 0x54f05
movl $0x410, %r14d           # imm = 0x410
addq 0x25095(%rip), %r14     # 0x69d40
leaq 0x142ae(%rip), %r15     # 0x58f60
movq %rax, %rbx
movq 0x158(%rbx), %rsi
testq %rsi, %rsi
cmoveq %r12, %rsi
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
jne 0x44cd3
decl %ebp
je 0x44ced
movq %rbx, %rdi
movl $0x138, %esi            # imm = 0x138
movq %r15, %rdx
callq 0x19430
movq %rax, %rbx
testq %rax, %rax
jne 0x44cb5
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: InitBodyQue
void InitBodyQue (void)
{
	int		i;
	edict_t	*ent;

	level.body_que = 0;
	for (i=0; i<BODY_QUEUE_SIZE ; i++)
	{
		ent = G_Spawn();
		ent->classname = "bodyque";
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x24ebf(%rip), %rax     # 0x69da0
movl $0x0, 0x150(%rax)
movl $0x8, %ebx
leaq 0x11ce4(%rip), %r14     # 0x56bdb
callq 0x19710
movq %r14, 0x138(%rax)
decl %ebx
jne 0x44ef7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: body_die
void body_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
{
	int	n;

	if (self->health < -40)
	{
		gi.sound (self, CHAN_BODY, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
		for (n= 0; n < 4; n++)
			ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
		self->s.origin[2] -= 48;
		ThrowClientHead (self, damage);
		self->takedamage = DAMAGE_NO;
	}
}

// Assembly:
cmpl $-0x29, 0x254(%rdi)
jg 0x44fa9
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdi, %rbx
movq 0x246d1(%rip), %rax     # 0x69600
movq 0x20(%rax), %r14
leaq 0x13610(%rip), %rdi     # 0x5854a
callq *0x48(%rax)
movl $0x4, %r15d
movss 0xefdd(%rip), %xmm0     # 0x53f28
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0x4, %esi
movl %eax, %edx
movaps %xmm0, %xmm1
callq *%r14
leaq 0x135f5(%rip), %r14     # 0x5855a
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x188e0
decl %r15d
jne 0x44f65
movss 0xc(%rbx), %xmm0
addss 0x155d2(%rip), %xmm0    # 0x5a558
movss %xmm0, 0xc(%rbx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x18db0
movl $0x0, 0x27c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: CopyToBodyQue
void CopyToBodyQue (edict_t *ent)
{
	edict_t		*body;

	// grab a body que and cycle to the next one
	body = &g_edicts[(int)maxclients->value + level.body_que + 1];
	level.body_que = (level.body_que + 1) % BODY_QUEUE_SIZE;

	// FIXME: send an effect on the removed body

	gi.unlinkentity (ent);

	gi.unlinkentity (body);
	body->s = ent->s;
	body->s.number = body - g_edicts;

	body->svflags = ent->svflags;
	VectorCopy (ent->mins, body->mins);
	VectorCopy (ent->maxs, body->maxs);
	VectorCopy (ent->absmin, body->absmin);
	VectorCopy (ent->absmax, body->absmax);
	VectorCopy (ent->size, body->size);
	body->solid = ent->solid;
	body->clipmask = ent->clipmask;
	body->owner = ent->owner;
	body->movetype = ent->movetype;

	body->die = body_die;
	body->takedamage = DAMAGE_YES;

	gi.linkentity (body);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x24599(%rip), %r13     # 0x69558
movq (%r13), %r15
movq 0x24566(%rip), %rax     # 0x69530
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
movq 0x24dc7(%rip), %rcx     # 0x69da0
movl 0x150(%rcx), %edx
addl %edx, %eax
cltq
imulq $0x4a8, %rax, %r12      # imm = 0x4A8
leaq 0x4a8(%r15), %r14
addq %r12, %r14
leal 0x1(%rdx), %eax
leal 0x8(%rdx), %esi
testl %eax, %eax
cmovnsl %eax, %esi
andl $-0x8, %esi
negl %esi
leal (%rdx,%rsi), %eax
incl %eax
movl %eax, 0x150(%rcx)
movq 0x245ea(%rip), %rbp     # 0x69600
callq *0x98(%rbp)
movq %r14, %rdi
callq *0x98(%rbp)
movl $0xa, %ecx
movq %r14, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl 0x50(%rbx), %eax
movl %eax, 0x4f8(%r15,%r12)
movq %r14, %rax
subq (%r13), %rax
shrq $0x3, %rax
imull $0x8ce2cabd, %eax, %eax # imm = 0x8CE2CABD
movl %eax, 0x4a8(%r15,%r12)
movl 0xc8(%rbx), %eax
movl %eax, 0x570(%r15,%r12)
movss 0xcc(%rbx), %xmm0
movss %xmm0, 0x574(%r15,%r12)
movss 0xd0(%rbx), %xmm0
movss %xmm0, 0x578(%r15,%r12)
movss 0xd4(%rbx), %xmm0
movss %xmm0, 0x57c(%r15,%r12)
movss 0xd8(%rbx), %xmm0
movss %xmm0, 0x580(%r15,%r12)
movss 0xdc(%rbx), %xmm0
movss %xmm0, 0x584(%r15,%r12)
movss 0xe0(%rbx), %xmm0
movss %xmm0, 0x588(%r15,%r12)
movss 0xe4(%rbx), %xmm0
movss %xmm0, 0x58c(%r15,%r12)
movss 0xe8(%rbx), %xmm0
movss %xmm0, 0x590(%r15,%r12)
movss 0xec(%rbx), %xmm0
movss %xmm0, 0x594(%r15,%r12)
movss 0xf0(%rbx), %xmm0
movss %xmm0, 0x598(%r15,%r12)
movss 0xf4(%rbx), %xmm0
movss %xmm0, 0x59c(%r15,%r12)
movss 0xf8(%rbx), %xmm0
movss %xmm0, 0x5a0(%r15,%r12)
movss 0xfc(%rbx), %xmm0
movss %xmm0, 0x5a4(%r15,%r12)
movss 0x100(%rbx), %xmm0
movss %xmm0, 0x5a8(%r15,%r12)
movss 0x104(%rbx), %xmm0
movss %xmm0, 0x5ac(%r15,%r12)
movl 0x108(%rbx), %eax
movl %eax, 0x5b0(%r15,%r12)
movl 0x10c(%rbx), %eax
movl %eax, 0x5b4(%r15,%r12)
movq 0x110(%rbx), %rax
movq %rax, 0x5b8(%r15,%r12)
movl 0x118(%rbx), %eax
movl %eax, 0x5c0(%r15,%r12)
movq 0x24305(%rip), %rax     # 0x694b8
movq %rax, 0x6e0(%r15,%r12)
movl $0x1, 0x724(%r15,%r12)
movq %r14, %rdi
movq %rbp, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x90(%rax)
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: respawn
void respawn (edict_t *self)
{

	if(matchstate == MATCH_RAILGUN_INPLAY)
	{
		//Drop_All(self);
		self->movetype = MOVETYPE_NOCLIP;
		self->solid = SOLID_NOT;
		self->svflags |= SVF_NOCLIENT;
		self->health = 0;
		return;
	}

	if (deathmatch->value || coop->value)
	{
		// spectator's don't leave bodies
		if (self->movetype != MOVETYPE_NOCLIP)
			CopyToBodyQue (self);
		self->svflags &= ~SVF_NOCLIENT;
		Menu_Free (self); // free the menu rather than lose it during the memset
		PutClientInServer (self);
		// add a teleportation effect
		self->s.event = EV_PLAYER_TELEPORT;

		// hold in place briefly
		self->client->ps.pmove.pm_flags = PMF_TIME_TELEPORT;
		self->client->ps.pmove.pm_time = 14;

		//bat changed to avoid the overflows.
		self->client->respawn_time = level.time;
		//self->client->respawn_time = level.time + (0.2 * Respawn_Count);

		// Set the squadboard status to "respawned"...
		strncpy (self->client->pers.squadStatus, RESPAWNED_STATUS_STR, MAX_STATUS_LEN); // ADC
		self->client->pers.squadStatus[MAX_STATUS_LEN-1] = 0; // ADC

		return;
	}

	// restart the entire server
	gi.AddCommandString ("menu_loadgame\n");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x245ec(%rip), %rax     # 0x697d8
cmpl $0x6, (%rax)
jne 0x45215
movl $0x1, 0x118(%rbx)
xorl %eax, %eax
movl %eax, 0x108(%rbx)
orb $0x1, 0xc8(%rbx)
movl %eax, 0x254(%rbx)
jmp 0x452b8
movq 0x24ca4(%rip), %rax     # 0x69ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x45244
jp 0x45244
movq 0x24d2b(%rip), %rax     # 0x69f60
movq (%rax), %rax
movss 0x20(%rax), %xmm1
ucomiss %xmm0, %xmm1
jne 0x45244
jnp 0x452ba
cmpl $0x1, 0x118(%rbx)
je 0x45255
movq %rbx, %rdi
callq 0x18d30
andb $-0x2, 0xc8(%rbx)
movq %rbx, %rdi
callq 0x18960
movq %rbx, %rdi
callq 0x18a20
movl $0x6, 0x50(%rbx)
movq 0x58(%rbx), %rax
movw $0xe20, 0x10(%rax)      # imm = 0xE20
movq 0x24b1c(%rip), %rcx     # 0x69da0
movss 0x4(%rcx), %xmm0
movss %xmm0, 0xf28(%rax)
movups 0x15374(%rip), %xmm0    # 0x5a60c
movups %xmm0, 0x2e0(%rax)
movups 0x15376(%rip), %xmm0    # 0x5a61c
movups %xmm0, 0x2f0(%rax)
movq 0x58(%rbx), %rax
movb $0x0, 0x2ff(%rax)
popq %rbx
retq
movq 0x2433f(%rip), %rax     # 0x69600
leaq 0x15e03(%rip), %rdi     # 0x5b0cb
popq %rbx
jmpq *0x150(%rax)
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: Team_To_Join
int Team_To_Join(edict_t *ent)
{
int	red, blue;
edict_t	*player;

	red = blue = 0;
	player = ctf_findplayer(NULL, ent, CTF_TEAM_ANYTEAM);
	while (player)
	{
		if (player->client->ctf.teamnum == CTF_TEAM_RED)
			red++;
		else if (player->client->ctf.teamnum == CTF_TEAM_BLUE)
			blue++;

		player = ctf_findplayer(player, ent, CTF_TEAM_ANYTEAM);
	}


	if(red == blue) // Even teams
	{
		if(redscore > bluescore)
			return(CTF_TEAM_BLUE);
		else 
			return(CTF_TEAM_RED);
	}
	else if(red > blue)
		return(CTF_TEAM_BLUE);
	else // if (blue > red)
		return(CTF_TEAM_RED);

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %edi, %edi
movq %rbx, %rsi
movl $0xfffffffb, %edx       # imm = 0xFFFFFFFB
callq 0x19170
movl $0x0, %ebp
testq %rax, %rax
je 0x45e60
xorl %ebp, %ebp
xorl %r14d, %r14d
movq 0x58(%rax), %rcx
movl 0x1100(%rcx), %ecx
cmpl $0x2, %ecx
je 0x45e49
cmpl $0x1, %ecx
jne 0x45e4b
incl %r14d
jmp 0x45e4b
incl %ebp
movq %rax, %rdi
movq %rbx, %rsi
movl $0xfffffffb, %edx       # imm = 0xFFFFFFFB
callq 0x19170
testq %rax, %rax
jne 0x45e30
movq 0x23d71(%rip), %rax     # 0x69bd8
movl (%rax), %eax
movq 0x23bd8(%rip), %rcx     # 0x69a48
xorl %edx, %edx
cmpl (%rcx), %eax
setg %dl
xorl %eax, %eax
cmpl %ebp, %r14d
setg %al
cmovnel %eax, %edx
movzbl %dl, %eax
incl %eax
popq %rbx
popq %r14
popq %rbp
retq