LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_view.c
// Function: SV_CalcRoll
float SV_CalcRoll (vec3_t angles, vec3_t velocity)
{
	float	sign;
	float	side;
	float	value;
	
	side = DotProduct (velocity, right);
	sign = side < 0 ? -1 : 1;
	side = fabs(side);
	
	value = sv_rollangle->value;

	if (side < sv_rollspeed->value)
		side = side * value / sv_rollspeed->value;
	else
		side = value;
	
	return side*sign;
	
}

// Assembly:
movss 0x4(%rsi), %xmm0
mulss 0x51423(%rip), %xmm0    # 0x9714c
movss (%rsi), %xmm1
mulss 0x51413(%rip), %xmm1    # 0x97148
addss %xmm0, %xmm1
movss 0x8(%rsi), %xmm0
mulss 0x5140a(%rip), %xmm0    # 0x97150
addss %xmm1, %xmm0
movaps 0x91ef(%rip), %xmm1     # 0x4ef40
andps %xmm0, %xmm1
movq 0x20ded(%rip), %rax     # 0x66b48
movq (%rax), %rax
movss 0x20(%rax), %xmm2
movq 0x2104e(%rip), %rax     # 0x66db8
movq (%rax), %rax
movss 0x20(%rax), %xmm3
movaps %xmm1, %xmm4
mulss %xmm2, %xmm4
divss %xmm3, %xmm4
cmpltss %xmm3, %xmm1
andps %xmm1, %xmm4
andnps %xmm2, %xmm1
orps %xmm4, %xmm1
movaps 0xbf1e(%rip), %xmm2     # 0x51cb0
xorps %xmm1, %xmm2
xorps %xmm3, %xmm3
cmpltss %xmm3, %xmm0
movaps %xmm0, %xmm3
andnps %xmm1, %xmm3
andps %xmm2, %xmm0
orps %xmm3, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_view.c
// Function: SV_AddBlend
void SV_AddBlend (float r, float g, float b, float a, float *v_blend)
{
	float	a2, a3;

	if (a <= 0)
		return;
	a2 = v_blend[3] + (1-v_blend[3])*a;	// new total alpha
	a3 = v_blend[3]/a2;		// fraction of color from old

	v_blend[0] = v_blend[0]*a3 + r*(1-a3);
	v_blend[1] = v_blend[1]*a3 + g*(1-a3);
	v_blend[2] = v_blend[2]*a3 + b*(1-a3);
	v_blend[3] = a2;
}

// Assembly:
xorps %xmm4, %xmm4
ucomiss %xmm3, %xmm4
jae 0x46746
movss 0xc(%rdi), %xmm4
movss 0x882f(%rip), %xmm5     # 0x4ef28
movaps %xmm5, %xmm6
subss %xmm4, %xmm6
mulss %xmm3, %xmm6
addss %xmm4, %xmm6
divss %xmm6, %xmm4
subss %xmm4, %xmm5
movsd (%rdi), %xmm3
movaps %xmm5, %xmm7
unpcklps %xmm5, %xmm7            # xmm7 = xmm7[0],xmm5[0],xmm7[1],xmm5[1]
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
mulps %xmm7, %xmm0
movaps %xmm4, %xmm1
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
mulps %xmm3, %xmm1
addps %xmm0, %xmm1
movlps %xmm1, (%rdi)
mulss 0x8(%rdi), %xmm4
mulss %xmm2, %xmm5
addss %xmm5, %xmm4
movss %xmm4, 0x8(%rdi)
movss %xmm6, 0xc(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_view.c
// Function: G_SetClientEvent
void G_SetClientEvent (edict_t *ent)
{
	if (ent->s.event)
		return;

	if ( ent->groundentity && xyspeed > 225)
	{
		if ( (int)(current_client->bobtime+bobmove) != bobcycle )
			ent->s.event = EV_FOOTSTEP;
	}
}

// Assembly:
cmpl $0x0, 0x50(%rdi)
je 0x473ae
retq
cmpq $0x0, 0x2b8(%rdi)
je 0x473ad
movq 0x1fb89(%rip), %rax     # 0x66f48
movss (%rax), %xmm0
ucomiss 0xf812(%rip), %xmm0     # 0x56bdc
jbe 0x473ad
movq 0x4fdb5(%rip), %rax     # 0x97188
movss 0xec8(%rax), %xmm0
movq 0x1fa66(%rip), %rax     # 0x66e48
addss (%rax), %xmm0
cvttss2si %xmm0, %eax
movq 0x1f79f(%rip), %rcx     # 0x66b90
cmpl %eax, (%rcx)
je 0x473ad
movl $0x2, 0x50(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_view.c
// Function: G_SetClientSound
void G_SetClientSound (edict_t *ent)
{
	char	*weap;

	if (ent->client->pers.game_helpchanged != game.helpchanged)
	{
		ent->client->pers.game_helpchanged = game.helpchanged;
		ent->client->pers.helpchanged = 1;
	}

	// help beep (no more than three times)
	if (ent->client->pers.helpchanged && ent->client->pers.helpchanged <= 3 && !(level.framenum&63) )
	{
		ent->client->pers.helpchanged++;
		gi.sound (ent, CHAN_VOICE, gi.soundindex ("misc/pc_up.wav"), 1, ATTN_STATIC, 0);
	}


	if (ent->client->pers.weapon)
		weap = ent->client->pers.weapon->classname;
	else
		weap = "";

	if (ent->waterlevel && (ent->watertype&(CONTENTS_LAVA|CONTENTS_SLIME)) )
		ent->s.sound = snd_fry;
	else if (strcmp(weap, "weapon_railgun") == 0)
		ent->s.sound = gi.soundindex("weapons/rg_hum.wav");
	else if (strcmp(weap, "weapon_bfg") == 0)
		ent->s.sound = gi.soundindex("weapons/bfg_hum.wav");
// SKWiD MOD
	else if (strcmp(weap, "weapon_plasma") == 0)
		ent->s.sound = gi.soundindex(PLASMA_SOUND_IDLE);
// END
	else if (ent->client->weapon_sound)
		ent->s.sound = ent->client->weapon_sound;
	else
		ent->s.sound = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %r15
movq 0x1f930(%rip), %rax     # 0x66d40
movl 0x400(%rax), %eax
cmpl %eax, 0x748(%r15)
jne 0x47428
movl 0x74c(%r15), %eax
jmp 0x4743d
movl %eax, 0x748(%r15)
movl $0x1, 0x74c(%r15)
pushq $0x1
popq %rax
testl %eax, %eax
sete %cl
cmpl $0x4, %eax
setge %dl
orb %cl, %dl
jne 0x47498
movq 0x1f94d(%rip), %rcx     # 0x66da0
testb $0x3f, (%rcx)
jne 0x47498
incl %eax
movl %eax, 0x74c(%r15)
movq 0x1f198(%rip), %rax     # 0x66600
movq 0x20(%rax), %r14
leaq 0xd6ce(%rip), %rdi      # 0x54b41
callq *0x48(%rax)
pushq $0x2
popq %rsi
movss 0x7aa7(%rip), %xmm0     # 0x4ef28
movss 0x7a83(%rip), %xmm1     # 0x4ef0c
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl %eax, %edx
callq *%r14
movq 0x58(%rbx), %r15
movq 0x730(%r15), %rax
testq %rax, %rax
je 0x474a9
movq (%rax), %r14
jmp 0x474b0
leaq 0x8a95(%rip), %r14      # 0x4ff45
cmpl $0x0, 0x30c(%rbx)
je 0x474cd
testb $0x18, 0x308(%rbx)
je 0x474cd
movq 0x1f037(%rip), %rax     # 0x66500
movl (%rax), %eax
jmp 0x47548
leaq 0x7af3(%rip), %rsi      # 0x4efc7
movq %r14, %rdi
callq 0x18bc0
testl %eax, %eax
je 0x47517
leaq 0x7ad5(%rip), %rsi      # 0x4efbc
movq %r14, %rdi
callq 0x18bc0
testl %eax, %eax
je 0x47527
leaq 0xabf1(%rip), %rsi      # 0x520eb
movq %r14, %rdi
callq 0x18bc0
testl %eax, %eax
je 0x47537
movl 0xf20(%r15), %eax
testl %eax, %eax
jne 0x47548
andl $0x0, 0x4c(%rbx)
jmp 0x4754b
movq 0x1f0e2(%rip), %rax     # 0x66600
leaq 0xb3ae(%rip), %rdi      # 0x528d3
jmp 0x47545
movq 0x1f0d2(%rip), %rax     # 0x66600
leaq 0xb472(%rip), %rdi      # 0x529a7
jmp 0x47545
movq 0x1f0c2(%rip), %rax     # 0x66600
leaq 0xf72e(%rip), %rdi      # 0x56c73
callq *0x48(%rax)
movl %eax, 0x4c(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_view.c
// Function: Client_Show_High_Scores
void Client_Show_High_Scores(edict_t *ent)
{
 char	string[5000];

	strcpy(string, "I am the big dawg");

 	gi.WriteByte (svc_layout);
 	gi.WriteString (string);
 	gi.unicast (ent, false);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1390, %rsp           # imm = 0x1390
movq %rdi, %rbx
movups 0xec65(%rip), %xmm0     # 0x56c8b
movq %rsp, %r14
movaps %xmm0, (%r14)
movw $0x67, 0x10(%r14)
movq 0x1e5c5(%rip), %r15     # 0x66600
pushq $0x4
popq %rdi
callq *0xc8(%r15)
movq %r14, %rdi
callq *0xe8(%r15)
movq %rbx, %rdi
xorl %esi, %esi
callq *0xb8(%r15)
addq $0x1390, %rsp           # imm = 0x1390
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_weapon.c
// Function: Use_Weapon
void Use_Weapon (edict_t *ent, gitem_t *item)
{
	int			ammo_index;
	gitem_t		*ammo_item;
	char message[MAX_INFO_STRING];

	// see if we're already using it
	if (item == ent->client->pers.weapon)
		return;

	if (item->ammo && !g_select_empty->value && !(item->flags & IT_AMMO))
	{
		ammo_item = FindItem(item->ammo);
		ammo_index = ITEM_INDEX(ammo_item);

		if (!ent->client->pers.inventory[ammo_index])
		{
			sprintf(message, "No %s for %s.\n", ammo_item->pickup_name, item->pickup_name);
			ctf_SafePrint(ent, PRINT_HIGH, message);
			return;
		}

		if (ent->client->pers.inventory[ammo_index] < item->quantity)
		{
			sprintf(message, "Not enough %s for %s.\n", ammo_item->pickup_name, item->pickup_name);
			ctf_SafePrint(ent, PRINT_HIGH, message);
			return;
		}
	}

	// change to this weapon when down
	ent->client->newweapon = item;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq 0x58(%rdi), %rdx
cmpq %rsi, 0x730(%rdx)
je 0x48a41
movq %rsi, %r14
movq %rdi, %rbx
movq 0x60(%rsi), %rdi
testq %rdi, %rdi
je 0x48a3a
movq 0x1db68(%rip), %rax     # 0x66548
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x48a3a
jp 0x48a3a
testb $0x2, 0x68(%r14)
jne 0x48a3a
callq 0x18a80
movq %rax, %rcx
subq 0x1e438(%rip), %rax     # 0x66e40
movl $0x88, %esi
cqto
idivq %rsi
movq 0x58(%rbx), %rdx
cltq
movl 0x318(%rdx,%rax,4), %eax
testl %eax, %eax
je 0x48a4c
cmpl 0x5c(%r14), %eax
jge 0x48a3a
movq 0x50(%rcx), %rdx
movq 0x50(%r14), %rcx
leaq 0x72e0(%rip), %rsi      # 0x4fd18
jmp 0x48a5b
movq %r14, 0xe50(%rdx)
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
retq
movq 0x50(%rcx), %rdx
movq 0x50(%r14), %rcx
leaq 0x72ae(%rip), %rsi      # 0x4fd09
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x198c0
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x18ec0
jmp 0x48a41
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_weapon.c
// Function: Drop_Weapon
void Drop_Weapon (edict_t *ent, gitem_t *item)
{
	int		index;

	if ((int)(dmflags->value) & DF_WEAPONS_STAY)
		return;

	index = ITEM_INDEX(item);
	// see if we're already using it
	if ( ((item == ent->client->pers.weapon) || (item == ent->client->newweapon))&& (ent->client->pers.inventory[index] == 1) )
	{
		ctf_SafePrint(ent, PRINT_HIGH, "Can't drop current weapon\n");
		return;
	}

	Drop_Item (ent, item);
	ent->client->pers.inventory[index]--;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x1db95(%rip), %rax     # 0x66618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
testb $0x4, %al
jne 0x48afc
movq %rdi, %rbx
movq %rsi, %rax
subq 0x1e3a4(%rip), %rax     # 0x66e40
movl $0x88, %ecx
cqto
idivq %rcx
movq 0x58(%rdi), %rcx
cmpq %rsi, 0x730(%rcx)
je 0x48ac1
cmpq %rsi, 0xe50(%rcx)
je 0x48ac1
movslq %eax, %r14
jmp 0x48ae8
movslq %eax, %r14
cmpl $0x1, 0x318(%rcx,%r14,4)
jne 0x48ae8
leaq 0x9532(%rip), %rdx      # 0x52008
pushq $0x2
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x18ec0
movq %rbx, %rdi
callq 0x18490
movq 0x58(%rbx), %rax
decl 0x318(%rax,%r14,4)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_weapon.c
// Function: P_ProjectSource
static void P_ProjectSource (gclient_t *client, vec3_t point, vec3_t distance, vec3_t forward, vec3_t right, vec3_t result)
{
	vec3_t	_distance;

	VectorCopy (distance, _distance);
	if (client->pers.hand == LEFT_HANDED)
		_distance[1] *= -1;
	else if (client->pers.hand == CENTER_HANDED)
		_distance[1] = 0;
	G_ProjectSource (point, _distance, forward, right, result);
}

// Assembly:
subq $0x18, %rsp
movq %rsi, %rax
movsd (%rdx), %xmm0
movsd %xmm0, 0x8(%rsp)
movss 0x8(%rdx), %xmm1
movss %xmm1, 0x10(%rsp)
movl 0x300(%rdi), %edx
cmpl $0x2, %edx
je 0x48f3f
cmpl $0x1, %edx
jne 0x48f48
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
xorps 0x8d73(%rip), %xmm0     # 0x51cb0
jmp 0x48f42
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
movq %rcx, %rdx
movq %r8, %rcx
movq %r9, %r8
callq 0x190d0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_weapon.c
// Function: weapon_grenadelauncher_fire
void weapon_grenadelauncher_fire (edict_t *ent)
{
	vec3_t	offset;
	vec3_t	forward, right;
	vec3_t	start;
	int		damage = 120;
	float	radius;

	radius = damage+40;
	if (is_quad)
		damage *= 4;

#ifdef WEAP_BALANCE_OK	

	if ((int)ctfflags->value & CTF_WEAP_BALANCE)
	{
		radius*=1.5;
		damage-=10;
	}
#endif


	VectorSet(offset, 8, 8, ent->viewheight-8);
	AngleVectors (ent->client->v_angle, forward, right, NULL);
	P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start);

	VectorScale (forward, -2, ent->client->kick_origin);
	ent->client->kick_angles[0] = -1;

	fire_grenade (ent, start, forward, damage, 600, 2.5, radius);

	gi.WriteByte (svc_muzzleflash);
	gi.WriteShort (ent-g_edicts);
	gi.WriteByte (MZ_GRENADE | is_silenced);
	gi.multicast (ent->s.origin, MULTICAST_PVS);

	ent->client->ps.gunframe++;

	PlayerNoise(ent, start, PNOISE_WEAPON);

	if (! ( (int)dmflags->value & DF_INFINITE_AMMO ) )
		ent->client->pers.inventory[ent->client->ammo_index]--;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
cmpl $0x0, 0x4df37(%rip)     # 0x97194
pushq $0x78
popq %rax
movl $0x1e0, %ebp            # imm = 0x1E0
cmovel %eax, %ebp
movsd 0xa150(%rip), %xmm0     # 0x533c0
leaq 0x8(%rsp), %r13
movsd %xmm0, (%r13)
movl 0x278(%rdi), %eax
addl $-0x8, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x8(%r13)
movl $0xebc, %edi            # imm = 0xEBC
addq 0x58(%rbx), %rdi
leaq 0x2c(%rsp), %r12
leaq 0x20(%rsp), %r14
movq %r12, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x183d0
movq 0x58(%rbx), %rdi
leaq 0x4(%rbx), %r15
leaq 0x14(%rsp), %r9
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %r14, %r8
movq %r9, %r13
callq 0x48f06
movl $0xe88, %esi            # imm = 0xE88
addq 0x58(%rbx), %rsi
movss 0x7130(%rip), %xmm0     # 0x50410
movq %r12, %rdi
callq 0x18a70
movq 0x58(%rbx), %rax
movl $0xbf800000, 0xe7c(%rax) # imm = 0xBF800000
movss 0xdb1a(%rip), %xmm0     # 0x56e18
movss 0xdb16(%rip), %xmm1     # 0x56e1c
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %ebp, %ecx
movl $0x258, %r8d            # imm = 0x258
callq 0x194f0
movq 0x1d2dd(%rip), %r14     # 0x66600
pushq $0x1
popq %rbp
movl %ebp, %edi
callq *0xc8(%r14)
movq 0x1d222(%rip), %rcx     # 0x66558
movq %rbx, %rax
subq (%rcx), %rax
movl $0x4a8, %ecx            # imm = 0x4A8
cqto
idivq %rcx
movl %eax, %edi
callq *0xd0(%r14)
movzbl 0x4de42(%rip), %edi     # 0x97198
shll $0x7, %edi
orl $0x8, %edi
callq *0xc8(%r14)
pushq $0x2
popq %rsi
movq %r15, %rdi
callq *0xb0(%r14)
movq 0x58(%rbx), %rax
incl 0x5c(%rax)
movq %rbx, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x19010
movq 0x1d28d(%rip), %rax     # 0x66618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
btl $0xd, %eax
jb 0x493ab
movq 0x58(%rbx), %rax
movslq 0xe38(%rax), %rcx
decl 0x318(%rax,%rcx,4)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_weapon.c
// Function: Blaster_Fire
void Blaster_Fire (edict_t *ent, vec3_t g_offset, int damage, qboolean hyper, int effect)
{
	vec3_t	forward, right;
	vec3_t	start;
	vec3_t	offset;

	if (is_quad)
		damage *= 4;
	AngleVectors (ent->client->v_angle, forward, right, NULL);
	VectorSet(offset, 24, 8, ent->viewheight-8);
	VectorAdd (offset, g_offset, offset);
	P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start);

	VectorScale (forward, -2, ent->client->kick_origin);
	ent->client->kick_angles[0] = -1;

	fire_blaster (ent, start, forward, damage, 1000, effect, hyper);

	// send muzzle flash
	gi.WriteByte (svc_muzzleflash);
	gi.WriteShort (ent-g_edicts);
	if (hyper)
		gi.WriteByte (MZ_HYPERBLASTER | is_silenced);
	else
		gi.WriteByte (MZ_BLASTER | is_silenced);
	gi.multicast (ent->s.origin, MULTICAST_PVS);

	PlayerNoise(ent, start, PNOISE_WEAPON);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, 0x10(%rsp)
movl %ecx, %ebp
movq %rsi, %r12
leal (,%rdx,4), %r13d
cmpl $0x0, 0x4dbb8(%rip)     # 0x97194
cmovel %edx, %r13d
movq %rdi, %rbx
movl $0xebc, %edi            # imm = 0xEBC
addq 0x58(%rbx), %rdi
leaq 0x3c(%rsp), %r14
leaq 0x30(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x183d0
movl 0x278(%rbx), %eax
addl $-0x8, %eax
cvtsi2ss %eax, %xmm0
movsd (%r12), %xmm1
addps 0xd7b3(%rip), %xmm1     # 0x56dd0
leaq 0x20(%rsp), %rdx
movlps %xmm1, (%rdx)
addss 0x8(%r12), %xmm0
movss %xmm0, 0x8(%rdx)
movq 0x58(%rbx), %rdi
leaq 0x4(%rbx), %r12
leaq 0x14(%rsp), %r9
movq %r12, %rsi
movq %r14, %rcx
movq %r15, %r8
movq %r9, %r15
callq 0x48f06
movl $0xe88, %esi            # imm = 0xE88
addq 0x58(%rbx), %rsi
movss 0x6db0(%rip), %xmm0     # 0x50410
movq %r14, %rdi
callq 0x18a70
movq 0x58(%rbx), %rax
movl $0xbf800000, 0xe7c(%rax) # imm = 0xBF800000
movl %ebp, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %r13d, %ecx
movl $0x3e8, %r8d            # imm = 0x3E8
movl 0x10(%rsp), %r9d
callq 0x18a40
movq 0x1cf64(%rip), %r15     # 0x66600
pushq $0x1
popq %r14
movl %r14d, %edi
callq *0xc8(%r15)
movq 0x1cea7(%rip), %rcx     # 0x66558
movq %rbx, %rax
subq (%rcx), %rax
movl $0x4a8, %ecx            # imm = 0x4A8
cqto
idivq %rcx
movl %eax, %edi
callq *0xd0(%r15)
movzbl 0x4dac7(%rip), %eax     # 0x97198
shll $0x7, %eax
leal 0xe(%rax), %edi
testl %ebp, %ebp
cmovel %eax, %edi
callq *0xc8(%r15)
pushq $0x2
popq %rsi
movq %r12, %rdi
callq *0xb0(%r15)
movq %rbx, %rdi
leaq 0x14(%rsp), %rsi
movl %r14d, %edx
callq 0x19010
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_weapon.c
// Function: weapon_fieldgun_fire
void weapon_fieldgun_fire (edict_t *ent)
{
	vec3_t		start;
	vec3_t		forward, right;
	vec3_t		offset;
	int			damage = 4;
	int			kick = 8;

	AngleVectors (ent->client->v_angle, forward, right, NULL);

	VectorScale (forward, -2, ent->client->kick_origin);
	ent->client->kick_angles[0] = -2;

	VectorSet(offset, 0, 8,  ent->viewheight-8);
	P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start);

	if (is_quad)
	{
		damage *= 4;
		kick *= 4;
	}

#ifdef WEAP_BALANCE_OK	
	if ((int)ctfflags->value & CTF_WEAP_BALANCE) //surt
		damage+=1; //slightly more damage, except with quad
#endif

	if (ent->client->buttons & BUTTON_ATTACK)
	{
		if (deathmatch->value)
			fire_fieldgun (ent, start, forward, damage, kick, 500, 500, DEFAULT_DEATHMATCH_SHOTGUN_COUNT);
		else
			fire_fieldgun (ent, start, forward, damage, kick, 500, 500, DEFAULT_SHOTGUN_COUNT);

		// send muzzle flash
		gi.WriteByte (svc_muzzleflash);
		gi.WriteShort (ent-g_edicts);
		gi.WriteByte (MZ_SHOTGUN | is_silenced);
		gi.multicast (ent->s.origin, MULTICAST_PVS);

		//ent->client->ps.gunframe++;
		//PlayerNoise(ent, start, PNOISE_WEAPON);

		//ent->client->pers.inventory[ent->client->ammo_index] -= ent->client->pers.weapon->quantity;
	}
	else
	{
		ent->client->ps.gunframe++;
		ent->client->hooklength = 0;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movl $0xebc, %edi            # imm = 0xEBC
addq 0x58(%rbx), %rdi
leaq 0x18(%rsp), %r15
leaq 0x3c(%rsp), %r12
movq %r15, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x183d0
movl $0xe88, %esi            # imm = 0xE88
addq 0x58(%rbx), %rsi
movss 0x5cf8(%rip), %xmm0     # 0x50410
movq %r15, %rdi
callq 0x18a70
movq 0x58(%rbx), %rdi
movl $0xc0000000, 0xe7c(%rdi) # imm = 0xC0000000
movsd 0xc6aa(%rip), %xmm0     # 0x56de0
leaq 0x30(%rsp), %rdx
movsd %xmm0, (%rdx)
movl 0x278(%rbx), %eax
addl $-0x8, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x8(%rdx)
leaq 0x4(%rbx), %r14
leaq 0x24(%rsp), %r9
movq %r14, %rsi
movq %r15, %rcx
movq %r12, %r8
callq 0x48f06
movq 0x58(%rbx), %rax
testb $0x1, 0xe3c(%rax)
jne 0x4a781
incl 0x5c(%rax)
andl $0x0, 0xf5c(%rax)
jmp 0x4a7e5
leaq 0x24(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x19060
movq 0x1be66(%rip), %r15     # 0x66600
pushq $0x1
popq %rdi
callq *0xc8(%r15)
movq 0x1bdad(%rip), %rax     # 0x66558
subq (%rax), %rbx
movl $0x4a8, %ecx            # imm = 0x4A8
movq %rbx, %rax
cqto
idivq %rcx
movl %eax, %edi
callq *0xd0(%r15)
movzbl 0x4c9cd(%rip), %edi     # 0x97198
shll $0x7, %edi
orl $0x2, %edi
callq *0xc8(%r15)
pushq $0x2
popq %rsi
movq %r14, %rdi
callq *0xb0(%r15)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_weapon.c
// Function: Draw_Hook
void Draw_Hook (edict_t *ent, vec3_t start, vec3_t end)
{
	vec3_t	dir, mins, maxs;
	vec3_t	offset;
	float		*v;

	v = tv(-15,-15,-15);
	_VectorCopy (v, mins);
	v = tv(15,15,15);
	_VectorCopy (v, maxs);

	VectorSubtract(end, start, dir);
	VectorSet(offset, 0, 0, 0);

	// Only display the grapple line if it isn't short
	if (VectorLength(dir) > 64)
	{
		gi.WriteByte (svc_temp_entity);
		gi.WriteByte (TE_GRAPPLE_CABLE);
		gi.WriteShort (ent - g_edicts);
		gi.WritePosition (start);
		gi.WritePosition (end);
		gi.WritePosition (offset);
		gi.multicast (ent->s.origin, MULTICAST_PVS);
	}	
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movss 0x3f9d(%rip), %xmm0     # 0x4f450
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x196c0
leaq 0x2c(%rsp), %rsi
movq %rax, %rdi
callq 0x19bb0
movss 0x3f81(%rip), %xmm0     # 0x4f454
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x196c0
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x19bb0
movsd (%r14), %xmm0
movsd (%r15), %xmm1
subps %xmm1, %xmm0
leaq 0x10(%rsp), %rdi
movlps %xmm0, (%rdi)
movss 0x8(%r14), %xmm0
subss 0x8(%r15), %xmm0
andq $0x0, (%rsp)
movss %xmm0, 0x8(%rdi)
andl $0x0, 0x8(%rsp)
callq 0x19460
ucomiss 0x39f1(%rip), %xmm0     # 0x4ef18
jbe 0x4b59a
movq 0x1b0d0(%rip), %r12     # 0x66600
pushq $0x3
popq %rdi
callq *0xc8(%r12)
pushq $0x18
popq %rdi
callq *0xc8(%r12)
movq 0x1b00b(%rip), %rcx     # 0x66558
movq %rbx, %rax
subq (%rcx), %rax
movl $0x4a8, %ecx            # imm = 0x4A8
cqto
idivq %rcx
movl %eax, %edi
callq *0xd0(%r12)
movq %r15, %rdi
callq *0xf0(%r12)
movq %r14, %rdi
callq *0xf0(%r12)
movq %rsp, %rdi
callq *0xf0(%r12)
addq $0x4, %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq *0xb0(%r12)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_weapon.c
// Function: Weapon_Hook
void Weapon_Hook (edict_t *ent)
{
	static int	pause_frames[]	= {14, 18, 26, 30, 0};
	static int	fire_frames[]	= {8, 9, 10, 11,0};

	//if (ent->client->weaponstate == WEAPON_READY)
	//		ent->client->hookstate = 0;
	
	if (ent->client->weaponstate == WEAPON_ACTIVATING)
	{
		// Speed up activation
		ent->client->ps.gunframe+=1;
	}

	if (ent->client->newweapon && ent->client->weaponstate != WEAPON_DROPPING)
	{
		ent->client->weaponstate = WEAPON_DROPPING;
		ent->client->ps.gunframe = 36; //FRAME_DEACTIVATE_FIRST;
		return;
	}
	
	if ( !((ent->client->latched_buttons|ent->client->buttons) & BUTTON_ATTACK))
	{
		ctf_hook_abort(ent);
	}
	
	Weapon_Generic (ent, 9, 13, 34, 38, pause_frames, fire_frames, Weapon_Hook_Fire);

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %rax
movl 0xe78(%rax), %ecx
cmpl $0x1, %ecx
jne 0x4b8d4
incl 0x5c(%rax)
jmp 0x4b8d9
cmpl $0x2, %ecx
je 0x4b8f6
cmpq $0x0, 0xe50(%rax)
je 0x4b8f6
movl $0x2, 0xe78(%rax)
movl $0x24, 0x5c(%rax)
jmp 0x4b93e
movl 0xe3c(%rax), %ecx
orl 0xe44(%rax), %ecx
testb $0x1, %cl
jne 0x4b90f
movq %rbx, %rdi
callq 0x18670
movq 0x1b152(%rip), %rax     # 0x66a68
leaq 0x207c3(%rip), %r10     # 0x6c0e0
leaq 0x2079c(%rip), %r9      # 0x6c0c0
pushq $0x9
popq %rsi
pushq $0xd
popq %rdx
pushq $0x22
popq %rcx
pushq $0x26
popq %r8
movq %rbx, %rdi
pushq %rax
pushq %r10
callq 0x18480
popq %rax
popq %rcx
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: ProjectPointOnPlane
void ProjectPointOnPlane( vec3_t dst, const vec3_t p, const vec3_t normal )
{
	float d;
	vec3_t n;
	float inv_denom;

	inv_denom = 1.0F / DotProduct( normal, normal );

	d = DotProduct( normal, p ) * inv_denom;

	n[0] = normal[0] * inv_denom;
	n[1] = normal[1] * inv_denom;
	n[2] = normal[2] * inv_denom;

	dst[0] = p[0] - d * n[0];
	dst[1] = p[1] - d * n[1];
	dst[2] = p[2] - d * n[2];
}

// Assembly:
movss (%rdx), %xmm1
movss 0x4(%rdx), %xmm0
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
movaps %xmm1, %xmm3
mulss %xmm1, %xmm3
addss %xmm2, %xmm3
movss 0x8(%rdx), %xmm2
movaps %xmm2, %xmm4
mulss %xmm2, %xmm4
addss %xmm3, %xmm4
movss 0x2d43(%rip), %xmm3     # 0x4ef28
divss %xmm4, %xmm3
movss (%rsi), %xmm4
movss 0x4(%rsi), %xmm5
mulss %xmm0, %xmm5
movaps %xmm1, %xmm6
mulss %xmm4, %xmm6
addss %xmm5, %xmm6
movss 0x8(%rsi), %xmm5
mulss %xmm2, %xmm5
addss %xmm6, %xmm5
mulss %xmm3, %xmm1
mulss %xmm3, %xmm0
mulss %xmm3, %xmm2
xorps 0x5a8f(%rip), %xmm5     # 0x51cb0
mulss %xmm3, %xmm5
mulss %xmm5, %xmm1
addss %xmm4, %xmm1
movss %xmm1, (%rdi)
mulss %xmm5, %xmm0
addss 0x4(%rsi), %xmm0
movss %xmm0, 0x4(%rdi)
mulss %xmm2, %xmm5
addss 0x8(%rsi), %xmm5
movss %xmm5, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: VectorNormalize
vec_t VectorNormalize (vec3_t v)
{
	float	length, ilength;

	length = v[0]*v[0] + v[1]*v[1] + v[2]*v[2];
	length = sqrt (length);		// FIXME

	if (length)
	{
		ilength = 1/length;
		v[0] *= ilength;
		v[1] *= ilength;
		v[2] *= ilength;
	}
		
	return length;

}

// Assembly:
movsd (%rdi), %xmm1
movaps %xmm1, %xmm0
mulps %xmm1, %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm1, %xmm3
mulss %xmm1, %xmm3
addss %xmm0, %xmm3
movss 0x8(%rdi), %xmm2
movaps %xmm2, %xmm0
mulss %xmm2, %xmm0
addss %xmm3, %xmm0
sqrtss %xmm0, %xmm0
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm0
jne 0x4c285
jnp 0x4c2a6
movss 0x2c9b(%rip), %xmm3     # 0x4ef28
divss %xmm0, %xmm3
movaps %xmm3, %xmm4
unpcklps %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
mulps %xmm1, %xmm4
movlps %xmm4, (%rdi)
mulss %xmm2, %xmm3
movss %xmm3, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: BoxOnPlaneSide2
int BoxOnPlaneSide2 (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
{
	int		i;
	float	dist1, dist2;
	int		sides;
	vec3_t	corners[2];

	for (i=0 ; i<3 ; i++)
	{
		if (p->normal[i] < 0)
		{
			corners[0][i] = emins[i];
			corners[1][i] = emaxs[i];
		}
		else
		{
			corners[1][i] = emins[i];
			corners[0][i] = emaxs[i];
		}
	}
	dist1 = DotProduct (p->normal, corners[0]) - p->dist;
	dist2 = DotProduct (p->normal, corners[1]) - p->dist;
	sides = 0;
	if (dist1 >= 0)
		sides = 1;
	if (dist2 < 0)
		sides |= 2;

	return sides;
}

// Assembly:
leaq -0xc(%rsp), %rax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
leaq -0x18(%rsp), %r8
cmpq $0x3, %rcx
je 0x4c573
ucomiss (%rdx,%rcx,4), %xmm0
movq %r8, %r9
movq %rax, %r10
ja 0x4c558
movq %rax, %r9
movq %r8, %r10
movss (%rdi,%rcx,4), %xmm1
movss %xmm1, (%r9,%rcx,4)
movss (%rsi,%rcx,4), %xmm1
movss %xmm1, (%r10,%rcx,4)
incq %rcx
jmp 0x4c540
movss (%rdx), %xmm0
movss 0x4(%rdx), %xmm1
movss -0x14(%rsp), %xmm2
mulss %xmm1, %xmm2
movss -0x18(%rsp), %xmm3
mulss %xmm0, %xmm3
addss %xmm2, %xmm3
movss 0x8(%rdx), %xmm2
movss -0x10(%rsp), %xmm4
mulss %xmm2, %xmm4
addss %xmm3, %xmm4
movss 0xc(%rdx), %xmm3
subss %xmm3, %xmm4
mulss -0x8(%rsp), %xmm1
mulss -0xc(%rsp), %xmm0
addss %xmm1, %xmm0
mulss -0x4(%rsp), %xmm2
addss %xmm0, %xmm2
xorps %xmm0, %xmm0
xorl %ecx, %ecx
ucomiss %xmm0, %xmm4
setae %cl
leal 0x2(%rcx), %eax
ucomiss %xmm2, %xmm3
cmovbel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: AddPointToBounds
void AddPointToBounds (vec3_t v, vec3_t mins, vec3_t maxs)
{
	int		i;
	vec_t	val;

	for (i=0 ; i<3 ; i++)
	{
		val = v[i];
		if (val < mins[i])
			mins[i] = val;
		if (val > maxs[i])
			maxs[i] = val;
	}
}

// Assembly:
xorl %eax, %eax
cmpq $0x3, %rax
je 0x4c7a0
movss (%rdi,%rax,4), %xmm0
movss (%rsi,%rax,4), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x4c790
movss %xmm0, (%rsi,%rax,4)
ucomiss (%rdx,%rax,4), %xmm0
jbe 0x4c79b
movss %xmm0, (%rdx,%rax,4)
incq %rax
jmp 0x4c776
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: VectorNormalize2
vec_t VectorNormalize2 (vec3_t v, vec3_t out)
{
	float	length, ilength;

	length = v[0]*v[0] + v[1]*v[1] + v[2]*v[2];
	length = sqrt (length);		// FIXME

	if (length)
	{
		ilength = 1/length;
		out[0] = v[0]*ilength;
		out[1] = v[1]*ilength;
		out[2] = v[2]*ilength;
	}
		
	return length;

}

// Assembly:
movss (%rdi), %xmm1
movss 0x4(%rdi), %xmm0
mulss %xmm0, %xmm0
movaps %xmm1, %xmm2
mulss %xmm1, %xmm2
addss %xmm0, %xmm2
movss 0x8(%rdi), %xmm0
mulss %xmm0, %xmm0
addss %xmm2, %xmm0
sqrtss %xmm0, %xmm0
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
jne 0x4c800
jnp 0x4c82c
movss 0x2720(%rip), %xmm2     # 0x4ef28
divss %xmm0, %xmm2
mulss %xmm2, %xmm1
movss %xmm1, (%rsi)
movss 0x4(%rdi), %xmm1
mulss %xmm2, %xmm1
movss %xmm1, 0x4(%rsi)
mulss 0x8(%rdi), %xmm2
movss %xmm2, 0x8(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: VectorLength
vec_t VectorLength(vec3_t v)
{
	int		i;
	float	length;
	
	length = 0;
	for (i=0 ; i< 3 ; i++)
		length += v[i]*v[i];

	length = sqrt (length);		// FIXME

	return length;
}

// Assembly:
xorps %xmm0, %xmm0
xorl %eax, %eax
cmpq $0x3, %rax
je 0x4c915
movss (%rdi,%rax,4), %xmm1
mulss %xmm1, %xmm1
addss %xmm1, %xmm0
incq %rax
jmp 0x4c8fd
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x18fa0
sqrtss %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: COM_FileExtension
char *COM_FileExtension (char *in)
{
	static char exten[8];
	int		i;

	while (*in && *in != '.')
		in++;
	if (!*in)
		return "";
	in++;
	for (i=0 ; i<7 && *in ; i++,in++)
		exten[i] = *in;
	exten[i] = 0;
	return exten;
}

// Assembly:
incq %rdi
movzbl -0x1(%rdi), %eax
testl %eax, %eax
je 0x4c9e6
cmpl $0x2e, %eax
jne 0x4c9b3
xorl %ecx, %ecx
leaq 0x4a7f4(%rip), %rax     # 0x971c0
cmpq $0x7, %rcx
je 0x4c9e1
movb (%rdi,%rcx), %dl
testb %dl, %dl
je 0x4c9e1
movb %dl, (%rcx,%rax)
incq %rcx
jmp 0x4c9cc
movb $0x0, (%rcx,%rax)
retq
leaq 0x3558(%rip), %rax      # 0x4ff45
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: COM_FileBase
void COM_FileBase (char *in, char *out)
{
	char *s, *s2;
	
	s = in + strlen(in) - 1;
	
	while (s != in && *s != '.')
		s--;
	
	for (s2 = s ; s2 != in && *s2 != '/' ; s2--)
	;
	
	if (s-s2 < 2)
		out[0] = 0;
	else
	{
		s--;
		strncpy (out,s2+1, s-s2);
		out[s-s2] = 0;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x186c0
leaq 0x1(%r14), %r15
movq %r14, %rdx
negq %rdx
pushq $0x1
popq %rcx
movq %r14, %rsi
cmpq %rcx, %rax
je 0x4ca3a
leaq -0x1(%rsi), %rdi
incq %rdx
incq %rcx
cmpb $0x2e, -0x1(%rsi,%rax)
movq %rdi, %rsi
jne 0x4ca0e
movq %rax, %rcx
subq %rdx, %rcx
leaq (%rdi,%rax), %rdx
leaq (%rdi,%rax), %r15
incq %r15
jmp 0x4ca40
movq %r14, %rcx
movq %r14, %rdx
movq %r14, %rsi
subq %rcx, %rsi
addq %rdx, %rsi
cmpq %r14, %rdx
je 0x4ca5b
cmpb $0x2f, (%rdx)
je 0x4ca58
decq %rdx
jmp 0x4ca49
movq %rdx, %rsi
subq %rsi, %rcx
cmpq $0x2, %rcx
jl 0x4ca7d
subq %rsi, %r15
incq %rsi
leaq -0x2(%r15), %rdx
movq %rbx, %rdi
callq 0x181e0
addq %r15, %rbx
addq $-0x2, %rbx
movb $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: COM_FilePath
void COM_FilePath (char *in, char *out)
{
	char *s;
	
	s = in + strlen(in) - 1;
	
	while (s != in && *s != '/')
		s--;

	strncpy (out,in, s-in);
	out[s-in] = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x186c0
cmpq $0x1, %rax
je 0x4cab0
leaq -0x1(%rax), %r15
cmpb $0x2f, -0x1(%r14,%rax)
movq %r15, %rax
jne 0x4ca96
addq %r14, %r15
jmp 0x4cab3
movq %r14, %r15
subq %r14, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x181e0
movb $0x0, (%rbx,%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: COM_DefaultExtension
void COM_DefaultExtension (char *path, char *extension)
{
	char    *src;
//
// if path doesn't have a .EXT, append extension
// (extension should include the .)
//
	src = path + strlen(path) - 1;

	while (*src != '/' && src != path)
	{
		if (*src == '.')
			return;                 // it has an extension
		src--;
	}

	strcat (path, extension);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x186c0
decq %rax
movb (%r14,%rax), %cl
cmpb $0x2f, %cl
je 0x4caff
testq %rax, %rax
je 0x4caff
decq %rax
cmpb $0x2e, %cl
jne 0x4cae1
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19800
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: COM_Parse
char* COM_Parse(char** data_p)
{
	int         c;
	int         len;
	char* data;
	char* s = com_token[com_tokidx++ & 3];

	data = *data_p;
	len = 0;
	s[0] = 0;

	if (!data) {
		*data_p = NULL;
		return s;
	}

	// skip whitespace
skipwhite:
	while ((c = *data) <= ' ') {
		if (c == 0) {
			*data_p = NULL;
			return s;
		}
		data++;
	}

	// skip // comments
	if (c == '/' && data[1] == '/') {
		data += 2;
		while (*data && *data != '\n')
			data++;
		goto skipwhite;
	}

	// skip /* */ comments
	if (c == '/' && data[1] == '*') {
		data += 2;
		while (*data) {
			if (data[0] == '*' && data[1] == '/') {
				data += 2;
				break;
			}
			data++;
		}
		goto skipwhite;
	}

	// handle quoted strings specially
	if (c == '\"') {
		data++;
		while (1) {
			c = *data++;
			if (c == '\"' || !c) {
				goto finish;
			}

			if (len < MAX_TOKEN_CHARS - 1) {
				s[len++] = c;
			}
		}
	}

	// parse a regular word
	do {
		if (len < MAX_TOKEN_CHARS - 1) {
			s[len++] = c;
		}
		data++;
		c = *data;
	} while (c > 32);

finish:
	s[len] = 0;

	*data_p = data;
	return s;
}

// Assembly:
movl 0x4ac1c(%rip), %edx     # 0x977d0
leal 0x1(%rdx), %eax
movl %eax, 0x4ac13(%rip)     # 0x977d0
andl $0x3, %edx
shll $0x7, %edx
leaq 0x4aa06(%rip), %rsi     # 0x975d0
leaq (%rsi,%rdx), %rax
movq (%rdi), %rcx
movb $0x0, (%rdx,%rsi)
testq %rcx, %rcx
je 0x4cc3c
movb (%rcx), %sil
cmpb $0x20, %sil
jg 0x4cbed
testb %sil, %sil
je 0x4cc3c
incq %rcx
jmp 0x4cbda
movzbl %sil, %edx
cmpl $0x2f, %edx
jne 0x4cc40
movzbl 0x1(%rcx), %edx
cmpl $0x2a, %edx
je 0x4cc19
cmpl $0x2f, %edx
jne 0x4cc69
addq $0x2, %rcx
movzbl (%rcx), %edx
testl %edx, %edx
je 0x4cbda
cmpl $0xa, %edx
je 0x4cbda
incq %rcx
jmp 0x4cc08
addq $0x2, %rcx
movzbl (%rcx), %edx
cmpl $0x2a, %edx
je 0x4cc2b
testl %edx, %edx
jne 0x4cc31
jmp 0x4cbda
cmpb $0x2f, 0x1(%rcx)
je 0x4cc36
incq %rcx
jmp 0x4cc1d
addq $0x2, %rcx
jmp 0x4cbda
xorl %ecx, %ecx
jmp 0x4cc92
cmpl $0x22, %edx
jne 0x4cc69
incq %rcx
xorl %edx, %edx
movzbl (%rcx), %esi
testl %esi, %esi
je 0x4cc88
cmpl $0x22, %esi
je 0x4cc88
incq %rcx
cmpl $0x7e, %edx
ja 0x4cc4a
movl %edx, %r8d
incl %edx
movb %sil, (%rax,%r8)
jmp 0x4cc4a
xorl %edx, %edx
cmpl $0x7e, %edx
jg 0x4cc79
movslq %edx, %r8
incl %edx
movb %sil, (%rax,%r8)
movb 0x1(%rcx), %sil
incq %rcx
cmpb $0x20, %sil
jg 0x4cc6b
jmp 0x4cc8b
incq %rcx
movslq %edx, %rdx
movb $0x0, (%rax,%rdx)
movq %rcx, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: Q_strnicmp
int Q_strnicmp(const char* s1, const char* s2, size_t count)
{
	if (count == 0)
		return 0;
	else
	{
		while (count-- != 0 && tolower(*s1) == tolower(*s2))
		{
			if (count == 0 || *s1 == '\0' || *s2 == '\0')
				break;
			s1++;
			s2++;
		}

		return tolower(*(unsigned char*)s1) - tolower(*(unsigned char*)s2);
	}
}

// Assembly:
testq %rdx, %rdx
je 0x4cd4e
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x19c00
movq (%rax), %rcx
decq %rbx
xorl %edx, %edx
movl $0xff, %eax
movsbq (%r15,%rdx), %rdi
movsbq (%r14,%rdx), %rsi
testq %rsi, %rsi
je 0x4cd3c
testb %dil, %dil
je 0x4cd3c
movl (%rcx,%rsi,4), %r8d
cmpl %r8d, (%rcx,%rdi,4)
jne 0x4cd3c
cmpq %rdx, %rbx
je 0x4cd3c
incq %rdx
jmp 0x4cd14
andq %rax, %rdi
andq %rax, %rsi
movl (%rcx,%rdi,4), %eax
subl (%rcx,%rsi,4), %eax
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: Com_sprintf
void Com_sprintf(char* dest, int size, char* fmt, ...)
{
	int		len;
	va_list	argptr;

	va_start(argptr, fmt);
	len = vsprintf(bigbuffer, fmt, argptr);
	va_end(argptr);
	if (len < size)
		strncpy(dest, bigbuffer, (size_t)size - 1);
	else
		Com_Printf("Com_sprintf: overflow of %i in %i\n", len, size);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x20(%rsp), %rsi
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x4cdac
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rax
movq %rsi, 0x10(%rax)
leaq 0xf0(%rsp), %rcx
movq %rcx, 0x8(%rax)
movabsq $0x3000000018, %rcx     # imm = 0x3000000018
movq %rcx, (%rax)
leaq 0x4aa0d(%rip), %rdi     # 0x977e0
movq %rdx, %rsi
movq %rax, %rdx
callq 0x194c0
cmpl %ebx, %eax
jge 0x4cdf9
movslq %ebx, %rdx
decq %rdx
leaq 0x4a9f1(%rip), %rsi     # 0x977e0
movq %r14, %rdi
callq 0x181e0
jmp 0x4ce0b
leaq 0xa2ae(%rip), %rdi      # 0x570ae
movl %eax, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x19040
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: Info_ValueForKey
char *Info_ValueForKey (char *s, char *key)
{
	char	pkey[MAX_INFO_STRING];
	static	char value[2][MAX_INFO_STRING]; // Use two buffers so compares work without stomping on each other.
	static	int	valueindex;
	char	*o;
	
	valueindex ^= 1;
	if (*s == '\\')
		s++;
	while (1)
	{
		o = pkey;
		while (*s != '\\')
		{
			if (!*s)
				return "";
			*o++ = *s++;
		}
		*o = 0;
		s++;

		o = value[valueindex];

		while (*s != '\\' && *s)
		{
			if (!*s)
				return "";
			*o++ = *s++;
		}
		*o = 0;

		if (!strcmp (key, pkey) )
			return value[valueindex];

		if (!*s)
			return "";
		s++;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rsi, %rbx
movl 0x5adb1(%rip), %eax     # 0xa7be0
xorq $0x1, %rax
movl %eax, 0x5ada7(%rip)     # 0xa7be0
xorl %r12d, %r12d
cmpb $0x5c, (%rdi)
sete %r12b
addq %rdi, %r12
shlq $0x9, %rax
leaq 0x5a98f(%rip), %r13     # 0xa77e0
addq %rax, %r13
movq %rsp, %r15
leaq 0x30e7(%rip), %r14      # 0x4ff45
movq %r15, %rax
movzbl (%r12), %ecx
cmpl $0x5c, %ecx
je 0x4ce79
testl %ecx, %ecx
je 0x4cebe
incq %r12
movb %cl, (%rax)
incq %rax
jmp 0x4ce61
movb $0x0, (%rax)
addq $0x2, %r12
movq %r13, %rax
movzbl -0x1(%r12), %ecx
testl %ecx, %ecx
je 0x4ce9c
cmpl $0x5c, %ecx
je 0x4ce9c
movb %cl, (%rax)
incq %rax
incq %r12
jmp 0x4ce83
movb $0x0, (%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18bc0
testl %eax, %eax
je 0x4cebb
cmpb $0x0, -0x1(%r12)
movq %r15, %rax
jne 0x4ce61
jmp 0x4cebe
movq %r13, %r14
movq %r14, %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: Info_RemoveKey
void Info_RemoveKey (char *s, char *key)
{
	char	*start;
	char	pkey[MAX_INFO_STRING];
	char	value[MAX_INFO_STRING];
	char	*o;

	if (strstr (key, "\\"))
	{
//		Com_Printf ("Can't use a key with a \\\n");
		return;
	}

	while (1)
	{
		start = s;
		if (*s == '\\')
			s++;
		o = pkey;
		while (*s != '\\')
		{
			if (!*s)
				return;
			*o++ = *s++;
		}
		*o = 0;
		s++;

		o = value;
		while (*s != '\\' && *s)
		{
			if (!*s)
				return;
			*o++ = *s++;
		}
		*o = 0;

		if (!strcmp (key, pkey) )
		{
			strcpy (start, s);	// remove this part
			return;
		}

		if (!*s)
			return;
	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x5c
popq %rsi
movq %rbx, %rdi
callq 0x18780
testq %rax, %rax
je 0x4cf09
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movb (%r14), %al
leaq 0x200(%rsp), %r13
movq %rsp, %r15
xorl %ecx, %ecx
cmpb $0x5c, %al
sete %cl
leaq (%r14,%rcx), %rax
leaq (%r14,%rcx), %r12
incq %r12
xorl %ecx, %ecx
movzbl (%rax,%rcx), %edx
testl %edx, %edx
je 0x4cef8
cmpl $0x5c, %edx
je 0x4cf43
movb %dl, (%rsp,%rcx)
incq %rcx
incq %r12
jmp 0x4cf2b
movb $0x0, (%rsp,%rcx)
movq %r13, %rax
movzbl (%r12), %ecx
testl %ecx, %ecx
je 0x4cf62
cmpl $0x5c, %ecx
je 0x4cf62
movb %cl, (%rax)
incq %rax
incq %r12
jmp 0x4cf4a
movb $0x0, (%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18bc0
testl %eax, %eax
je 0x4cf84
movb (%r12), %al
movq %r12, %r14
testb %al, %al
jne 0x4cf17
jmp 0x4cef8
movq %r14, %rdi
movq %r12, %rsi
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x182c0
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/q_shared.c
// Function: Info_SetValueForKey
void Info_SetValueForKey (char *s, char *key, char *value)
{
	char	newi[MAX_INFO_STRING], *v;
	int		c;
	size_t	maxsize = MAX_INFO_STRING;

	if (strstr (key, "\\") || strstr (value, "\\") )
	{
		Com_Printf ("Can't use keys or values with a \\\n");
		return;
	}

	if (strstr (key, ";") )
	{
		Com_Printf ("Can't use keys or values with a semicolon\n");
		return;
	}

	if (strstr (key, "\"") || strstr (value, "\"") )
	{
		Com_Printf ("Can't use keys or values with a \"\n");
		return;
	}

	if (strlen(key) > MAX_INFO_KEY-1 || strlen(value) > MAX_INFO_KEY-1)
	{
		Com_Printf ("Keys and values must be < 64 characters.\n");
		return;
	}
	Info_RemoveKey (s, key);
	if (!value || !strlen(value))
		return;

	Com_sprintf (newi, sizeof(newi), "\\%s\\%s", key, value);

	if (strlen(newi) + strlen(s) > maxsize)
	{
		Com_Printf ("Info string length exceeded\n");
		return;
	}

	// only copy ascii values
	s += strlen(s);
	v = newi;
	while (*v)
	{
		c = *v++;
		c &= 127;		// strip high bits
		if (c >= 32 && c < 127)
			*s++ = c;
	}
	*s = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x5c
popq %rsi
movq %r15, %rdi
callq 0x18780
testq %rax, %rax
jne 0x4d004
pushq $0x5c
popq %rsi
movq %r14, %rdi
callq 0x18780
testq %rax, %rax
je 0x4d020
leaq 0xa0c6(%rip), %rdi      # 0x570d1
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x19040
pushq $0x3b
popq %rsi
movq %r15, %rdi
callq 0x18780
testq %rax, %rax
je 0x4d039
leaq 0xa0bd(%rip), %rdi      # 0x570f4
jmp 0x4d00b
pushq $0x22
popq %rsi
movq %r15, %rdi
callq 0x18780
testq %rax, %rax
jne 0x4d059
pushq $0x22
popq %rsi
movq %r14, %rdi
callq 0x18780
testq %rax, %rax
je 0x4d062
leaq 0xa0bf(%rip), %rdi      # 0x5711f
jmp 0x4d00b
movq %r15, %rdi
callq 0x186c0
cmpq $0x3f, %rax
ja 0x4d07e
movq %r14, %rdi
callq 0x186c0
cmpq $0x40, %rax
jb 0x4d087
leaq 0xa0bd(%rip), %rdi      # 0x57142
jmp 0x4d00b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19920
testq %r14, %r14
je 0x4d113
cmpb $0x0, (%r14)
je 0x4d113
leaq 0xa0c8(%rip), %rdx      # 0x5716c
movq %rsp, %r12
movq %r12, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r15, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x18f30
movq %r12, %rdi
callq 0x186c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x186c0
addq %rax, %r14
cmpq $0x201, %r14            # imm = 0x201
jb 0x4d0eb
leaq 0xa091(%rip), %rdi      # 0x57173
xorl %eax, %eax
callq 0x19040
jmp 0x4d113
addq %rax, %rbx
movb (%r12), %al
testb %al, %al
je 0x4d110
incq %r12
andb $0x7f, %al
cmpb $0x20, %al
setb %cl
cmpb $0x7f, %al
sete %dl
orb %cl, %dl
jne 0x4d0ee
movb %al, (%rbx)
incq %rbx
jmp 0x4d0ee
movb $0x0, (%rbx)
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/lupyuen[P]lora-sx1262/npl/linux/src/wqueue.h
// Function: wqueue<ble_npl_event*>::wqueue()
wqueue()
    {
        pthread_mutexattr_init(&m_mutex_attr);
        pthread_mutexattr_settype(&m_mutex_attr, PTHREAD_MUTEX_RECURSIVE);
        pthread_mutex_init(&m_mutex, &m_mutex_attr);
        pthread_cond_init(&m_condv, NULL);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x40(%rdi), %r14
movq %r14, %rdi
callq 0x2060
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x2240
leaq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x2250
addq $0x48, %rbx
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x21b0
nop
// File: /workspace/github_c_makefile_star2_O2/lupyuen[P]lora-sx1262/npl/linux/src/wqueue.h
// Function: wqueue<ble_npl_event*>::size()
int size() {
        pthread_mutex_lock(&m_mutex);
        int size = m_queue.size();
        pthread_mutex_unlock(&m_mutex);
        return size;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
movq %r14, %rdi
callq 0x2230
movl 0x10(%rbx), %ebx
movq %r14, %rdi
callq 0x2130
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lupyuen[P]lora-sx1262/npl/linux/src/wqueue.h
// Function: wqueue<ble_npl_event*>::put(ble_npl_event*)
void put(T item) {
        pthread_mutex_lock(&m_mutex);
        m_queue.push_back(item);
        pthread_cond_signal(&m_condv);
        pthread_mutex_unlock(&m_mutex);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x20(%rbp), %r14
movq %rsi, (%r14)
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0x2230
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26ac
addq $0x48, %rbx
movq %rbx, %rdi
callq 0x2030
movq %r15, %rdi
callq 0x2130
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/lupyuen[P]lora-sx1262/npl/linux/src/wqueue.h
// Function: wqueue<ble_npl_event*>::get(unsigned int)
T get(uint32_t tmo) {
        pthread_mutex_lock(&m_mutex);
        if (tmo) {
            while (m_queue.size() == 0) {
                pthread_cond_wait(&m_condv, &m_mutex);
            }
        }

        T item = NULL;

        if (m_queue.size() != 0) {
            item = m_queue.front();
            m_queue.pop_front();
        }

        pthread_mutex_unlock(&m_mutex);
        return item;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %r14
leaq 0x18(%rdi), %rbx
movq %rbx, %rdi
callq 0x2230
testl %r15d, %r15d
setne %cl
movq 0x10(%r14), %rax
testq %rax, %rax
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x263f
leaq 0x48(%r14), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2270
cmpq $0x0, 0x10(%r14)
je 0x262b
jmp 0x2644
testq %rax, %rax
je 0x2669
movq (%r14), %rax
movq 0x10(%rax), %r15
movq %r14, %rdi
callq 0x279e
movq %rbx, %rdi
callq 0x2130
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x2653