LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Pickup_Key
qboolean Pickup_Key (edict_t *ent, edict_t *other)
{
	if (coop->value)
	{
		if (strcmp(ent->classname, "key_power_cube") == 0)
		{
			if (other->client->pers.power_cubes & ((ent->spawnflags & 0x0000ff00)>> 8))
				return false;
			other->client->pers.inventory[ITEM_INDEX(ent->item)]++;
			other->client->pers.power_cubes |= ((ent->spawnflags & 0x0000ff00) >> 8);
		}
		else
		{
			if (other->client->pers.inventory[ITEM_INDEX(ent->item)])
				return false;
			other->client->pers.inventory[ITEM_INDEX(ent->item)] = 1;
		}
		return true;
	}
	other->client->pers.inventory[ITEM_INDEX(ent->item)]++;
	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38ad1(%rip), %rax     # 0x68f60
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x304a1
jnp 0x304f3
movq 0x138(%rbx), %rdi
leaq 0x25b6a(%rip), %rsi     # 0x56019
callq 0x18b20
movq 0x58(%r14), %rcx
testl %eax, %eax
je 0x30525
movq 0x330(%rbx), %rdx
subq 0x38976(%rip), %rdx     # 0x68e40
sarq $0x3, %rdx
movabsq $-0xf0f0f0f0f0f0f0f, %rax # imm = 0xF0F0F0F0F0F0F0F1
imulq %rdx, %rax
cmpl $0x0, 0x318(%rcx,%rax,4)
jne 0x30533
movl $0x1, 0x318(%rcx,%rax,4)
jmp 0x3051e
movq 0x330(%rbx), %rax
subq 0x3893f(%rip), %rax     # 0x68e40
movq 0x58(%r14), %rcx
sarq $0x3, %rax
movabsq $-0x3c3c3c3c3c3c3c3c, %rdx # imm = 0xC3C3C3C3C3C3C3C4
imulq %rax, %rdx
incl 0x318(%rcx,%rdx)
movl $0x1, %eax
jmp 0x30535
movb 0x740(%rcx), %al
testb %al, 0x141(%rbx)
je 0x3053d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x330(%rbx), %rax
subq 0x388f5(%rip), %rax     # 0x68e40
sarq $0x3, %rax
movabsq $-0x3c3c3c3c3c3c3c3c, %rdx # imm = 0xC3C3C3C3C3C3C3C4
imulq %rax, %rdx
incl 0x318(%rcx,%rdx)
movzbl 0x141(%rbx), %eax
orl %eax, 0x740(%rcx)
jmp 0x3051e
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Pickup_Ammo
qboolean Pickup_Ammo (edict_t *ent, edict_t *other)
{
	int			oldcount;
	int			count;
	qboolean	weapon;

	weapon = (ent->item->flags & IT_WEAPON);
	if ( (weapon) && ( (int)dmflags->value & DF_INFINITE_AMMO ) )
		count = 1000;
	else if (ent->count)
		count = ent->count;
	else
		count = ent->item->quantity;

	oldcount = other->client->pers.inventory[ITEM_INDEX(ent->item)];

	if (!Add_Ammo (other, ent->item, count))
		return false;

	if (weapon && !oldcount)
	{
		if (other->client->pers.weapon != ent->item && ( !deathmatch->value || other->client->pers.weapon == FindItem("blaster") ) )
			other->client->newweapon = ent->item;
	}

	if (!(ent->spawnflags & (DROPPED_ITEM | DROPPED_PLAYER_ITEM)) && (deathmatch->value))
		SetRespawn (ent, 30);
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x330(%rdi), %rsi
movl 0x68(%rsi), %ebp
testb $0x1, %bpl
je 0x305fe
movq 0x3802d(%rip), %rax     # 0x68618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
movl $0x3e8, %edx            # imm = 0x3E8
btl $0xd, %eax
jb 0x3060b
movl 0x290(%rbx), %edx
testl %edx, %edx
jne 0x3060b
movl 0x5c(%rsi), %edx
movq 0x58(%r14), %rax
movq %rsi, %rcx
subq 0x38827(%rip), %rcx     # 0x68e40
sarq $0x3, %rcx
movabsq $-0x3c3c3c3c3c3c3c3c, %rdi # imm = 0xC3C3C3C3C3C3C3C4
imulq %rcx, %rdi
movl 0x318(%rax,%rdi), %r15d
movq %r14, %rdi
callq 0x19230
testl %eax, %eax
je 0x3071c
testb $0x1, %bpl
je 0x306a1
testl %r15d, %r15d
jne 0x306a1
movq 0x58(%r14), %rax
movq 0x730(%rax), %r15
movq 0x330(%rbx), %rcx
cmpq %rcx, %r15
je 0x306a1
movq 0x38854(%rip), %rdx     # 0x68ec0
movq (%rdx), %rdx
movss 0x20(%rdx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3067e
jnp 0x3069a
leaq 0x299e1(%rip), %rdi     # 0x5a066
callq 0x189e0
cmpq %rax, %r15
jne 0x306a1
movq 0x330(%rbx), %rcx
movq 0x58(%r14), %rax
movq %rcx, 0xe50(%rax)
movl $0x1, %ebp
testb $0x3, 0x142(%rbx)
jne 0x3071e
movq 0x3880a(%rip), %rax     # 0x68ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x306c8
jnp 0x3071e
orb $-0x80, 0x11f(%rbx)
orb $0x1, 0xc8(%rbx)
movl $0x0, 0x108(%rbx)
movq 0x386b9(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
addss 0x22ba0(%rip), %xmm0    # 0x53294
movss %xmm0, 0x200(%rbx)
movq 0x3864d(%rip), %rax     # 0x68d50
movq %rax, 0x210(%rbx)
movq 0x37eef(%rip), %rax     # 0x68600
movq %rbx, %rdi
callq *0x90(%rax)
jmp 0x3071e
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Drop_Ammo
void Drop_Ammo (edict_t *ent, gitem_t *item)
{
	edict_t	*dropped;
	int		index;

	index = ITEM_INDEX(item);
	dropped = Drop_Item (ent, item);
	if (ent->client->pers.inventory[index] >= item->quantity)
		dropped->count = item->quantity;
	else
		dropped->count = ent->client->pers.inventory[index];

	if (ent->client->pers.weapon && 
		ent->client->pers.weapon->tag == AMMO_GRENADES &&
		item->tag == AMMO_GRENADES &&
		ent->client->pers.inventory[index] - dropped->count <= 0) {
		gi.cprintf (ent, PRINT_HIGH, "Can't drop current weapon\n");
		G_FreeEdict(dropped);
		return;
	}

	ent->client->pers.inventory[index] -= dropped->count;
	ValidateSelectedItem (ent);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rax
subq 0x386fe(%rip), %rax     # 0x68e40
shrq $0x3, %rax
imull $0xf0f0f0f1, %eax, %ebp # imm = 0xF0F0F0F1
callq 0x18460
movq 0x58(%rbx), %rcx
movslq %ebp, %rdx
movl 0x318(%rcx,%rdx,4), %edi
movl 0x5c(%r14), %esi
cmpl %esi, %edi
cmovll %edi, %esi
movq %rax, %r15
movl %esi, 0x290(%rax)
movq 0x730(%rcx), %rax
testq %rax, %rax
je 0x30793
cmpl $0x3, 0x78(%rax)
jne 0x30793
cmpl $0x3, 0x78(%r14)
jne 0x30793
cmpl %esi, 0x318(%rcx,%rdx,4)
jle 0x307ac
subl %esi, 0x318(%rcx,%rdx,4)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x18280
movq 0x37e4d(%rip), %rcx     # 0x68600
leaq 0x2586e(%rip), %rdx     # 0x56028
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq *0x10(%rcx)
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x19a50
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: MegaHealth_think
void MegaHealth_think (edict_t *self)
{
	//surt regen rune problem with this
	if (self->owner)
	{
		if (self->owner->client && self->owner->client->rune &&
			self->owner->client->rune->runetype == RUNE_REGEN)
		{
			if (self->owner->health > self->owner->max_health + 25)
			{
				self->nextthink = level.time + 2;
				self->owner->health -= 1;
				return;
			}
		}
			
		//this was the old standard case
		else if (self->owner->health > self->owner->max_health)
		{
			self->nextthink = level.time + 1;
			self->owner->health -= 1;
			return;
		}
	}

	if (!(self->spawnflags & DROPPED_ITEM) && (deathmatch->value))
		SetRespawn (self, 20);
	else
		G_FreeEdict (self);
}

// Assembly:
movq 0x110(%rdi), %rax
testq %rax, %rax
je 0x3085f
movq 0x58(%rax), %rcx
testq %rcx, %rcx
je 0x3082c
movq 0xf68(%rcx), %rcx
testq %rcx, %rcx
je 0x3082c
cmpl $0x8, 0x478(%rcx)
jne 0x3082c
movl 0x254(%rax), %ecx
movl 0x258(%rax), %edx
addl $0x19, %edx
cmpl %edx, %ecx
jle 0x3085f
movq 0x38583(%rip), %rdx     # 0x68da0
movss 0x4(%rdx), %xmm0
addss 0x22c42(%rip), %xmm0    # 0x5346c
jmp 0x3084e
movl 0x254(%rax), %ecx
cmpl 0x258(%rax), %ecx
jle 0x3085f
movq 0x3855f(%rip), %rdx     # 0x68da0
movss 0x4(%rdx), %xmm0
addss 0x226da(%rip), %xmm0    # 0x52f28
movss %xmm0, 0x200(%rdi)
decl %ecx
movl %ecx, 0x254(%rax)
retq
testb $0x1, 0x142(%rdi)
jne 0x19a50
movq 0x3864d(%rip), %rax     # 0x68ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x30885
jnp 0x308d4
orb $-0x80, 0x11f(%rdi)
orb $0x1, 0xc8(%rdi)
movl $0x0, 0x108(%rdi)
movq 0x384fc(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
addss 0x2338f(%rip), %xmm0    # 0x53c40
movss %xmm0, 0x200(%rdi)
movq 0x38490(%rip), %rax     # 0x68d50
movq %rax, 0x210(%rdi)
movq 0x37d32(%rip), %rax     # 0x68600
jmpq *0x90(%rax)
jmp 0x19a50
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Pickup_Health
qboolean Pickup_Health (edict_t *ent, edict_t *other)
{
	if (!(ent->style & HEALTH_IGNORE_MAX))
		if (other->health >= other->max_health)
			return false;

	other->health += ent->count;

	if (!(ent->style & HEALTH_IGNORE_MAX))
	{
		if (other->health > other->max_health)
			other->health = other->max_health;
	}



#ifdef WEAP_BALANCE_OK	
	//surt take care of overboard health
	if ((int)ctfflags->value & CTF_WEAP_BALANCE)
	{
		if (other->health > (2 * other->max_health) )
			other->health = (2 * other->max_health);
	}
	//end surt code
#endif

	if (ent->style & HEALTH_TIMED)
	{
		ent->think = MegaHealth_think;
		ent->nextthink = level.time + 5;
		ent->owner = other;
		ent->flags |= FL_RESPAWN;
		ent->svflags |= SVF_NOCLIENT;
		ent->solid = SOLID_NOT;
	}
	else
	{
		if (!(ent->spawnflags & DROPPED_ITEM) && (deathmatch->value))
			SetRespawn (ent, 30);
	}

	return true;
}

// Assembly:
pushq %rbx
movl 0x32c(%rdi), %eax
testb $0x1, %al
jne 0x3090d
movl 0x254(%rsi), %ecx
movl 0x258(%rsi), %edx
xorl %ebx, %ebx
cmpl %edx, %ecx
jge 0x309ef
addl 0x290(%rdi), %ecx
cmpl %edx, %ecx
cmovgel %edx, %ecx
movl %ecx, 0x254(%rsi)
jmp 0x30919
movl 0x290(%rdi), %ecx
addl %ecx, 0x254(%rsi)
testb $0x2, %al
jne 0x309a1
movl $0x1, %ebx
testb $0x1, 0x142(%rdi)
jne 0x309ef
movq 0x38586(%rip), %rax     # 0x68ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x30950
jnp 0x309ef
orb $-0x80, 0x11f(%rdi)
orb $0x1, 0xc8(%rdi)
movl $0x0, 0x108(%rdi)
movq 0x38431(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
addss 0x22918(%rip), %xmm0    # 0x53294
movss %xmm0, 0x200(%rdi)
movq 0x383c5(%rip), %rax     # 0x68d50
movq %rax, 0x210(%rdi)
movq 0x37c67(%rip), %rax     # 0x68600
callq *0x90(%rax)
jmp 0x309ef
movq 0x37f58(%rip), %rax     # 0x68900
movq %rax, 0x210(%rdi)
movq 0x383ea(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
addss 0x22545(%rip), %xmm0    # 0x52f08
movss %xmm0, 0x200(%rdi)
movq %rsi, 0x110(%rdi)
orb $-0x80, 0x11f(%rdi)
orb $0x1, 0xc8(%rdi)
movl $0x0, 0x108(%rdi)
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: ArmorIndex
int ArmorIndex (edict_t *ent)
{
	if (!ent->client)
		return 0;

	if (ent->client->pers.inventory[jacket_armor_index] > 0)
		return jacket_armor_index;

	if (ent->client->pers.inventory[combat_armor_index] > 0)
		return combat_armor_index;

	if (ent->client->pers.inventory[body_armor_index] > 0)
		return body_armor_index;

	return 0;
}

// Assembly:
movq 0x58(%rdi), %rcx
testq %rcx, %rcx
je 0x30a0e
movslq 0x42141(%rip), %rax     # 0x72b44
cmpl $0x0, 0x318(%rcx,%rax,4)
jle 0x30a11
retq
xorl %eax, %eax
retq
movslq 0x42130(%rip), %rax     # 0x72b48
cmpl $0x0, 0x318(%rcx,%rax,4)
jg 0x30a0d
movslq 0x42123(%rip), %rdx     # 0x72b4c
xorl %eax, %eax
cmpl $0x0, 0x318(%rcx,%rdx,4)
cmovgl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: PowerArmorType
int PowerArmorType (edict_t *ent)
{
	if (!ent->client)
		return POWER_ARMOR_NONE;

	if (!(ent->flags & FL_POWER_ARMOR))
		return POWER_ARMOR_NONE;

	if (ent->client->pers.inventory[power_shield_index] > 0)
		return POWER_ARMOR_SHIELD;

	if (ent->client->pers.inventory[power_screen_index] > 0)
		return POWER_ARMOR_SCREEN;

	return POWER_ARMOR_NONE;
}

// Assembly:
movq 0x58(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x30c54
testb $0x10, 0x11d(%rdi)
je 0x30c54
movslq 0x41f0b(%rip), %rdx     # 0x72b50
movl $0x2, %eax
cmpl $0x0, 0x318(%rcx,%rdx,4)
jle 0x30c55
retq
movslq 0x41ef8(%rip), %rdx     # 0x72b54
xorl %eax, %eax
cmpl $0x0, 0x318(%rcx,%rdx,4)
setg %al
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Use_PowerArmor
void Use_PowerArmor (edict_t *ent, gitem_t *item)
{
	int		index;

	if (ent->flags & FL_POWER_ARMOR)
	{
		ent->flags &= ~FL_POWER_ARMOR;
		gi.sound(ent, CHAN_AUTO, gi.soundindex("misc/power2.wav"), 1, ATTN_NORM, 0);
	}
	else
	{
		index = ITEM_INDEX(FindItem("cells"));
		if (!ent->client->pers.inventory[index])
		{
			ctf_SafePrint(ent, PRINT_HIGH, "No cells for power armor.\n");
			return;
		}
		ent->flags |= FL_POWER_ARMOR;
		gi.sound(ent, CHAN_AUTO, gi.soundindex("misc/power1.wav"), 1, ATTN_NORM, 0);	//FIXME powering up sound
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x11c(%rdi), %eax
btl $0xc, %eax
jb 0x30cc5
leaq 0x25e73(%rip), %rdi     # 0x56af7
callq 0x189e0
subq 0x381b0(%rip), %rax     # 0x68e40
shrq $0x3, %rax
imull $0xf0f0f0f1, %eax, %eax # imm = 0xF0F0F0F1
movq 0x58(%rbx), %rcx
cltq
cmpl $0x0, 0x318(%rcx,%rax,4)
je 0x30d06
orb $0x10, 0x11d(%rbx)
movq 0x37948(%rip), %rax     # 0x68600
movq 0x20(%rax), %r14
leaq 0x255d9(%rip), %rdi     # 0x5629c
jmp 0x30ce2
andl $0xffffefff, %eax       # imm = 0xFFFFEFFF
movl %eax, 0x11c(%rbx)
movq 0x37929(%rip), %rax     # 0x68600
movq 0x20(%rax), %r14
leaq 0x2270c(%rip), %rdi     # 0x533ee
callq *0x48(%rax)
movss 0x2223b(%rip), %xmm0    # 0x52f28
xorps %xmm2, %xmm2
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
movaps %xmm0, %xmm1
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x25336(%rip), %rdx     # 0x56043
movl $0x2, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x18da0
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: SP_flag
void SP_flag (edict_t *self)
{
	if ( !deathmatch->value )
	{
		G_FreeEdict (self);
		return;
	}

	//self->model = "models/items/mega_h/tris.md2";
	self->droptime = 0;
	self->entprops = 0;
	self->count = 0;
	self->flagteam = 0; // Not set yet
	SpawnItem (self, FindItemByClassname ("flag"));
	self->think = ctf_flagwave;
	self->nextthink = level.time + 1;
	gi.soundindex ("items/m_health.wav");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x37ca8(%rip), %rax     # 0x68ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3122a
jnp 0x31296
movq $0x0, 0x4a0(%rbx)
xorl %eax, %eax
movl %eax, 0x290(%rbx)
movl %eax, 0x47c(%rbx)
leaq 0x29cf1(%rip), %rdi     # 0x5af3b
callq 0x18170
movq %rbx, %rdi
movq %rax, %rsi
callq 0x18ec0
movq 0x3735f(%rip), %rax     # 0x685c0
movq %rax, 0x210(%rbx)
movq 0x37b31(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
addss 0x21cac(%rip), %xmm0    # 0x52f28
movss %xmm0, 0x200(%rbx)
movq 0x37375(%rip), %rax     # 0x68600
leaq 0x25ded(%rip), %rdi     # 0x5707f
popq %rbx
jmpq *0x48(%rax)
movq %rbx, %rdi
popq %rbx
jmp 0x19a50
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: Pickup_PowerArmor
qboolean Pickup_PowerArmor (edict_t *ent, edict_t *other)
{
	int		quantity;

	quantity = other->client->pers.inventory[ITEM_INDEX(ent->item)];

	other->client->pers.inventory[ITEM_INDEX(ent->item)]++;

	if (deathmatch->value)
	{
		if (!(ent->spawnflags & DROPPED_ITEM) )
			SetRespawn (ent, ent->item->quantity);
		// auto-use for DM only if we didn't already have one
		if (!quantity)
			ent->item->use (other, ent->item);
	}

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x58(%rsi), %rcx
movq 0x330(%rdi), %rax
movq %rax, %rdx
subq 0x37781(%rip), %rdx     # 0x68e40
sarq $0x3, %rdx
movabsq $-0x3c3c3c3c3c3c3c3c, %rsi # imm = 0xC3C3C3C3C3C3C3C4
imulq %rdx, %rsi
movl 0x318(%rcx,%rsi), %r15d
leal 0x1(%r15), %edx
movl %edx, 0x318(%rcx,%rsi)
movq 0x377d5(%rip), %rcx     # 0x68ec0
movq (%rcx), %rcx
movss 0x20(%rcx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x316fd
jnp 0x31774
movq %rdi, %r14
testb $0x1, 0x142(%rdi)
jne 0x31762
xorps %xmm0, %xmm0
cvtsi2ssl 0x5c(%rax), %xmm0
orl $0x80000000, 0x11c(%r14) # imm = 0x80000000
orb $0x1, 0xc8(%r14)
movl $0x0, 0x108(%r14)
movq 0x3766a(%rip), %rax     # 0x68da0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x200(%r14)
movq 0x37605(%rip), %rax     # 0x68d50
movq %rax, 0x210(%r14)
movq 0x36ea7(%rip), %rax     # 0x68600
movq %r14, %rdi
callq *0x90(%rax)
testl %r15d, %r15d
jne 0x31774
movq 0x330(%r14), %rsi
movq %rbx, %rdi
callq *0x10(%rsi)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: drop_make_touchable
static void drop_make_touchable (edict_t *ent)
{
	ent->touch = Touch_Item;
	if (deathmatch->value)
	{
		ent->nextthink = level.time + 29;
		ent->think = G_FreeEdict;
	}
}

// Assembly:
movq 0x37063(%rip), %rax     # 0x68880
movq %rax, 0x220(%rdi)
movq 0x37695(%rip), %rax     # 0x68ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3183d
jnp 0x31867
movq 0x3755c(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
addss 0x2477b(%rip), %xmm0    # 0x55fcc
movss %xmm0, 0x200(%rdi)
movq 0x36bd0(%rip), %rax     # 0x68430
movq %rax, 0x210(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: SP_item_health
void SP_item_health (edict_t *self)
{
	if ( deathmatch->value && ((int)dmflags->value & DF_NO_HEALTH) )
	{
		G_FreeEdict (self);
		return;
	}

	self->model = "models/items/healing/medium/tris.md2";
	self->count = 10;
	SpawnItem (self, FindItem ("Health"));
	gi.soundindex ("items/n_health.wav");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x371ed(%rip), %rax     # 0x68ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x31ce5
jnp 0x31cf8
movq 0x3692c(%rip), %rax     # 0x68618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
testb $0x1, %al
jne 0x31d39
leaq 0x254a7(%rip), %rax     # 0x571a6
movq %rax, 0x120(%rbx)
movl $0xa, 0x290(%rbx)
leaq 0x2129e(%rip), %rdi     # 0x52fb5
callq 0x189e0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x18ec0
movq 0x368d2(%rip), %rax     # 0x68600
leaq 0x2433c(%rip), %rdi     # 0x56071
popq %rbx
jmpq *0x48(%rax)
movq %rbx, %rdi
popq %rbx
jmp 0x19a50
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: SP_item_health_small
void SP_item_health_small (edict_t *self)
{
	if ( deathmatch->value && ((int)dmflags->value & DF_NO_HEALTH) )
	{
		G_FreeEdict (self);
		return;
	}

	self->model = "models/items/healing/stimpack/tris.md2";
	self->count = 2;
	SpawnItem (self, FindItem ("Health"));
	self->style = HEALTH_IGNORE_MAX;
	gi.soundindex ("items/s_health.wav");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x37173(%rip), %rax     # 0x68ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x31d5f
jnp 0x31d72
movq 0x368b2(%rip), %rax     # 0x68618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
testb $0x1, %al
jne 0x31dbd
leaq 0x25452(%rip), %rax     # 0x571cb
movq %rax, 0x120(%rbx)
movl $0x2, 0x290(%rbx)
leaq 0x21224(%rip), %rdi     # 0x52fb5
callq 0x189e0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x18ec0
movl $0x1, 0x32c(%rbx)
movq 0x3684e(%rip), %rax     # 0x68600
leaq 0x242a5(%rip), %rdi     # 0x5605e
popq %rbx
jmpq *0x48(%rax)
movq %rbx, %rdi
popq %rbx
jmp 0x19a50
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: SP_item_health_large
void SP_item_health_large (edict_t *self)
{
	if ( deathmatch->value && ((int)dmflags->value & DF_NO_HEALTH) )
	{
		G_FreeEdict (self);
		return;
	}

	self->model = "models/items/healing/large/tris.md2";
	self->count = 25;
	SpawnItem (self, FindItem ("Health"));
	gi.soundindex ("items/l_health.wav");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x370ef(%rip), %rax     # 0x68ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x31de3
jnp 0x31df6
movq 0x3682e(%rip), %rax     # 0x68618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
testb $0x1, %al
jne 0x31e37
leaq 0x253f5(%rip), %rax     # 0x571f2
movq %rax, 0x120(%rbx)
movl $0x19, 0x290(%rbx)
leaq 0x211a0(%rip), %rdi     # 0x52fb5
callq 0x189e0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x18ec0
movq 0x367d4(%rip), %rax     # 0x68600
leaq 0x24251(%rip), %rdi     # 0x56084
popq %rbx
jmpq *0x48(%rax)
movq %rbx, %rdi
popq %rbx
jmp 0x19a50
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: SP_item_health_mega
void SP_item_health_mega (edict_t *self)
{
	if ( deathmatch->value && ((int)dmflags->value & DF_NO_HEALTH) )
	{
		G_FreeEdict (self);
		return;
	}

	self->model = "models/items/mega_h/tris.md2";
	self->count = 100;
	SpawnItem (self, FindItem ("Health"));
	gi.soundindex ("items/m_health.wav");
	self->style = HEALTH_IGNORE_MAX|HEALTH_TIMED;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x37075(%rip), %rax     # 0x68ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x31e5d
jnp 0x31e70
movq 0x367b4(%rip), %rax     # 0x68618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
testb $0x1, %al
jne 0x31ebc
leaq 0x2539f(%rip), %rax     # 0x57216
movq %rax, 0x120(%rbx)
movl $0x64, 0x290(%rbx)
leaq 0x21126(%rip), %rdi     # 0x52fb5
callq 0x189e0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x18ec0
movq 0x3675a(%rip), %rax     # 0x68600
leaq 0x251d2(%rip), %rdi     # 0x5707f
callq *0x48(%rax)
movl $0x3, 0x32c(%rbx)
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x19a50
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_items.c
// Function: SetItemNames
void SetItemNames (void)
{
	int		i;
	gitem_t	*it;

	for (i=0 ; i<game.num_items ; i++)
	{
		it = &itemlist[i];
		gi.configstring (CS_ITEMS+i, it->pickup_name);
	}

	jacket_armor_index = ITEM_INDEX(FindItem("Jacket Armor"));
	combat_armor_index = ITEM_INDEX(FindItem("Combat Armor"));
	body_armor_index   = ITEM_INDEX(FindItem("Body Armor"));
	power_screen_index = ITEM_INDEX(FindItem("Power Screen"));
	power_shield_index = ITEM_INDEX(FindItem("Power Shield"));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x36e5a(%rip), %rbx     # 0x68d40
cmpl $0x0, 0x61c(%rbx)
jle 0x31f29
movq 0x36f4a(%rip), %r14     # 0x68e40
addq $0x50, %r14
xorl %r15d, %r15d
movq 0x366fc(%rip), %r12     # 0x68600
movq (%r14), %rsi
leal 0x420(%r15), %edi
callq *0x30(%r12)
incq %r15
movslq 0x61c(%rbx), %rax
addq $0x88, %r14
cmpq %rax, %r15
jl 0x31f04
leaq 0x214dd(%rip), %rdi     # 0x5340d
callq 0x189e0
movq 0x36f04(%rip), %rbx     # 0x68e40
subq %rbx, %rax
shrq $0x3, %rax
imull $0xf0f0f0f1, %eax, %eax # imm = 0xF0F0F0F1
movl %eax, 0x40bf5(%rip)     # 0x72b44
leaq 0x22758(%rip), %rdi     # 0x546ae
callq 0x189e0
subq %rbx, %rax
shrq $0x3, %rax
imull $0xf0f0f0f1, %eax, %eax # imm = 0xF0F0F0F1
movl %eax, 0x40bda(%rip)     # 0x72b48
leaq 0x22746(%rip), %rdi     # 0x546bb
callq 0x189e0
subq %rbx, %rax
shrq $0x3, %rax
imull $0xf0f0f0f1, %eax, %eax # imm = 0xF0F0F0F1
movl %eax, 0x40bbf(%rip)     # 0x72b4c
leaq 0x242ba(%rip), %rdi     # 0x5624e
callq 0x189e0
subq %rbx, %rax
shrq $0x3, %rax
imull $0xf0f0f0f1, %eax, %eax # imm = 0xF0F0F0F1
movl %eax, 0x40ba8(%rip)     # 0x72b54
leaq 0x22713(%rip), %rdi     # 0x546c6
callq 0x189e0
subq %rbx, %rax
shrq $0x3, %rax
imull $0xf0f0f0f1, %eax, %eax # imm = 0xF0F0F0F1
movl %eax, 0x40b85(%rip)     # 0x72b50
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_main.c
// Function: ShutdownGame
void ShutdownGame (void)
{
	gi.dprintf ("==== ShutdownGame ====\n");

	sl_GameEnd( &gi, level );	// StdLog - Mark Davies

	gi.FreeTags (TAG_LEVEL);
	gi.FreeTags (TAG_GAME);

#ifdef _WIN32
	OutputDebugString("ShutdownGame() was called.\n");
	OutputDebugString("Dump objects since startup.\n");
	_CrtMemDumpAllObjectsSince(&startup1);
	OutputDebugString("Memory stats since startup.\n");
	_CrtMemDumpStatistics(&startup1);
	_CrtDumpMemoryLeaks();
#endif

}

// Assembly:
pushq %rbx
subq $0x160, %rsp            # imm = 0x160
movq 0x36619(%rip), %rbx     # 0x68600
leaq 0x2524a(%rip), %rdi     # 0x57238
xorl %eax, %eax
callq *0x8(%rbx)
movq 0x36da6(%rip), %rsi     # 0x68da0
movl $0x2b, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
callq 0x19a00
movl $0x2fe, %edi            # imm = 0x2FE
callq *0x118(%rbx)
movl $0x2fd, %edi            # imm = 0x2FD
movq %rbx, %rax
addq $0x160, %rsp            # imm = 0x160
popq %rbx
jmpq *0x118(%rax)
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_main.c
// Function: GetGameAPI
q_exported game_export_t *GetGameAPI (game_import_t *import)
{
	gi = *import;

	globals.apiversion = GAME_API_VERSION;
	globals.Init = InitGame;
	globals.Shutdown = ShutdownGame;
	globals.SpawnEntities = SpawnEntities;

	globals.WriteGame = WriteGame;
	globals.ReadGame = ReadGame;
	globals.WriteLevel = WriteLevel;
	globals.ReadLevel = ReadLevel;

	globals.ClientThink = ClientThink;
	globals.ClientConnect = ClientConnect;
	globals.ClientUserinfoChanged = ClientUserinfoChanged;
	globals.ClientDisconnect = ClientDisconnect;
	globals.ClientBegin = ClientBegin;
	globals.ClientCommand = ClientCommand;

	globals.RunFrame = G_RunFrame;

	globals.ServerCommand = ServerCommand;

	globals.edict_size = sizeof(edict_t);

	return &globals;
}

// Assembly:
pushq %rax
movq %rdi, %rsi
movq 0x365c7(%rip), %rdi     # 0x68600
movl $0x160, %edx            # imm = 0x160
callq 0x18c80
movq 0x36abe(%rip), %rax     # 0x68b08
movl $0x3, (%rax)
movq 0x36631(%rip), %rcx     # 0x68688
movq %rcx, 0x8(%rax)
movq 0x36d66(%rip), %rcx     # 0x68dc8
movq %rcx, 0x10(%rax)
movq 0x36443(%rip), %rcx     # 0x684b0
movq %rcx, 0x18(%rax)
movq 0x36ad8(%rip), %rcx     # 0x68b50
movq %rcx, 0x20(%rax)
movq 0x3650d(%rip), %rcx     # 0x68590
movq %rcx, 0x28(%rax)
movq 0x3669a(%rip), %rcx     # 0x68728
movq %rcx, 0x30(%rax)
movq 0x36e1f(%rip), %rcx     # 0x68eb8
movq %rcx, 0x38(%rax)
movq 0x3672c(%rip), %rcx     # 0x687d0
movq %rcx, 0x68(%rax)
movq 0x36ce9(%rip), %rcx     # 0x68d98
movq %rcx, 0x40(%rax)
movq 0x366b6(%rip), %rcx     # 0x68770
movq %rcx, 0x50(%rax)
movq 0x363d3(%rip), %rcx     # 0x68498
movq %rcx, 0x58(%rax)
movq 0x36900(%rip), %rcx     # 0x689d0
movq %rcx, 0x48(%rax)
movq 0x3684d(%rip), %rcx     # 0x68928
movq %rcx, 0x60(%rax)
movq 0x365d2(%rip), %rcx     # 0x686b8
movq %rcx, 0x70(%rax)
movq 0x3699f(%rip), %rcx     # 0x68a90
movq %rcx, 0x78(%rax)
movl $0x4a8, 0x88(%rax)      # imm = 0x4A8
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_main.c
// Function: ClientEndServerFrames
void ClientEndServerFrames (void)
{
	int		i;
	edict_t	*ent;

	// calc the player views now that all pushing
	// and damage has been added
	for (i=0 ; i<maxclients->value ; i++)
	{
		ent = g_edicts + 1 + i;
		if (!ent->inuse || !ent->client)
			continue;
		ClientEndServerFrame (ent);
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x360d7(%rip), %rbx     # 0x68530
movq (%rbx), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x324b6
movq 0x360e8(%rip), %r14     # 0x68558
movq (%r14), %rdi
movl $0x4a8, %r15d           # imm = 0x4A8
movl $0x1, %ebp
cmpl $0x0, 0x60(%rdi,%r15)
je 0x3249c
cmpq $0x0, 0x58(%rdi,%r15)
je 0x3249c
addq %r15, %rdi
callq 0x18b00
movq (%r14), %rdi
movq (%rbx), %rax
xorps %xmm0, %xmm0
cvtsi2ss %ebp, %xmm0
movss 0x20(%rax), %xmm1
addq $0x4a8, %r15            # imm = 0x4A8
incl %ebp
ucomiss %xmm0, %xmm1
ja 0x3247e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_main.c
// Function: CreateTargetChangeLevel
edict_t *CreateTargetChangeLevel(char *map)
{
	edict_t *ent;

	ent = G_Spawn ();
	ent->classname = "target_changelevel";
	Com_sprintf(level.nextmap, sizeof(level.nextmap), "%s", map);
	ent->map = level.nextmap;
	return ent;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x19700
movq %rax, %r14
leaq 0x210aa(%rip), %rax     # 0x53582
movq %rax, 0x138(%r14)
movl $0x88, %r15d
addq 0x368b4(%rip), %r15     # 0x68da0
leaq 0x204ba(%rip), %rdx     # 0x529ad
movq %r15, %rdi
movl $0x40, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x18e10
movq %r15, 0x270(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_main.c
// Function: Randomize_Map_List
void Randomize_Map_List(int Num_Of_Maps)
{
	int i;
	int Rand_Num;

	if (Num_Of_Maps > MAX_MAPS)
		Num_Of_Maps = MAX_MAPS;

	for (i = 0; i < MAX_MAPS; i++)
		Maps_Picked[i] = 0;

	for (i = 1; i < Num_Of_Maps; i++)
	{
		Rand_Num = rand() % (Num_Of_Maps - 2);
		while (Maps_Picked[Rand_Num])
		{
			Rand_Num++;
			if (Rand_Num == Num_Of_Maps)
				Rand_Num = 0;
		}

		Maps_Picked[Rand_Num] = i;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebp
movq 0x36912(%rip), %rbx     # 0x68e38
xorl %r14d, %r14d
movl $0x258, %edx            # imm = 0x258
movq %rbx, %rdi
xorl %esi, %esi
callq 0x18880
movl $0x12c, %r15d           # imm = 0x12C
cmpl %r15d, %ebp
cmovll %ebp, %r15d
cmpl $0x2, %ebp
jl 0x32581
leal -0x2(%r15), %ebp
movl $0x1, %r12d
callq 0x19a10
cltd
idivl %ebp
movslq %edx, %rax
cmpw $0x0, (%rbx,%rax,2)
je 0x32571
incl %edx
cmpl %r15d, %edx
cmovel %r14d, %edx
jmp 0x3255c
leaq (%rbx,%rax,2), %rax
movw %r12w, (%rax)
incl %r12d
cmpl %r15d, %r12d
jne 0x32554
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_main.c
// Function: getRandomMapByPlayerCount
MapInfo *getRandomMapByPlayerCount(int count) {
	MapInfo *criteriaList = NULL;
	MapInfo *clPtr = NULL;
	int mapCounter = 0;
	int randNum;

	for(int i = 0; maplist[i].mapname; i++) {
		if (maplist[i].minplayers > count || maplist[i].maxplayers < count) {
			gi.dprintf("Excluding %s due to min/max playercount\n", maplist[i].mapname);
			continue;
		}
		if (!criteriaList) {
			criteriaList = clPtr = &maplist[i];			
		} else {
			clPtr->next = &maplist[i];
			clPtr = clPtr->next;
			clPtr->next = NULL;
		}
		mapCounter++;
	}

	//QW// Added. This should never happen.
	if (!clPtr || !criteriaList) {
		gi.error("%s line %i: NULL pointer error.", __func__, __LINE__);
		abort(); // Shut up compiler.
	}

	clPtr->next = criteriaList;
	srand(time(0));
	randNum = rand() % (mapCounter - 2);
	for(int i = 0; i < randNum; i++) 
		clPtr = clPtr->next;	
	return clPtr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x3622c(%rip), %r12     # 0x687c8
movq (%r12), %rsi
testq %rsi, %rsi
je 0x3264f
movl %edi, %ebp
leaq 0x24c9e(%rip), %r14     # 0x57250
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %ebx, %ebx
cmpl %ebp, 0x8(%r12)
jg 0x325c8
cmpl %ebp, 0xc(%r12)
jge 0x325d9
movq %r14, %rdi
xorl %eax, %eax
movq 0x3602c(%rip), %rcx     # 0x68600
callq *0x8(%rcx)
jmp 0x325fa
movq %r12, %rax
testq %r13, %r13
je 0x325f1
movq %r12, 0x10(%rbx)
movq $0x0, 0x10(%r12)
movq %r13, %rax
incl %r15d
movq %r12, %rbx
movq %rax, %r13
movq 0x18(%r12), %rsi
addq $0x18, %r12
testq %rsi, %rsi
jne 0x325ba
testq %rbx, %rbx
je 0x3264f
testq %r13, %r13
je 0x3264f
addl $-0x2, %r15d
movq %r13, 0x10(%rbx)
xorl %edi, %edi
callq 0x18df0
movl %eax, %edi
callq 0x189f0
callq 0x19a10
cltd
idivl %r15d
testl %edx, %edx
jle 0x3263d
movq 0x10(%rbx), %rbx
decl %edx
jne 0x32635
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x35faa(%rip), %rcx     # 0x68600
leaq 0x24c1c(%rip), %rdi     # 0x57279
leaq 0x24c35(%rip), %rsi     # 0x57299
movl $0x138, %edx            # imm = 0x138
xorl %eax, %eax
callq *0x38(%rcx)
callq 0x18190
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_main.c
// Function: playerCount
int playerCount() {
        edict_t * player = NULL;
        unsigned int num_players = 0;

        player = ctf_findplayer(NULL, NULL, CTF_TEAM_IGNORETEAM);
        while (player)
        {
                num_players++;
                player = ctf_findplayer(player, NULL, CTF_TEAM_IGNORETEAM);
        }
        return (num_players);
}

// Assembly:
pushq %rbx
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
callq 0x19170
testq %rax, %rax
je 0x326a1
xorl %ebx, %ebx
incl %ebx
movq %rax, %rdi
xorl %esi, %esi
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
callq 0x19170
testq %rax, %rax
jne 0x3268b
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_main.c
// Function: Check_Made_Table
void Check_Made_Table(edict_t *cl_ent)
{
long score;
int index = 0;
int i;

   	score = stats_get(cl_ent, STATS_SCORE);

	if(score <= Highscore_Table[MAX_HIGHSCORE_ENTRIES - 1].Score)
		return;


	for(i = 0; i < MAX_HIGHSCORE_ENTRIES; i++)
	{
		if(score > Highscore_Table[i].Score)
		{
			index = i;
			break;
		}
	}

	for(i = MAX_HIGHSCORE_ENTRIES - 1; i > index; i--)
	{
		Highscore_Table[i].Score = Highscore_Table[i - 1].Score;
		strcpy(Highscore_Table[i].Player, Highscore_Table[i-1].Player);
	}


	Highscore_Table[index].Score = score;
	strcpy(Highscore_Table[i].Player, cl_ent->client->pers.netname);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x3, %esi
callq 0x18030
movq 0x363cc(%rip), %r12     # 0x68aa8
cmpq 0x110(%r12), %rax
jle 0x32708
movq %rax, %r14
leaq 0x20(%r12), %rax
xorl %r13d, %r13d
cmpq (%rax), %r14
jg 0x32717
incq %r13
addq $0x28, %rax
cmpq $0x7, %r13
jne 0x326f1
xorl %r13d, %r13d
jmp 0x32722
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x6, %ebp
cmpq $0x5, %r13
ja 0x32754
movl $0xc8, %r15d
addq 0x36379(%rip), %r15     # 0x68aa8
movl $0x6, %ebp
decq %rbp
movq 0x20(%r15), %rax
leaq 0x28(%r15), %rdi
movq %rax, 0x48(%r15)
movq %r15, %rsi
callq 0x182a0
addq $-0x28, %r15
cmpq %r13, %rbp
ja 0x32734
leaq (,%r13,4), %rax
addq %r13, %rax
movq %r14, 0x20(%r12,%rax,8)
leaq (,%rbp,4), %rax
addq %rbp, %rax
leaq (%r12,%rax,8), %rdi
movl $0x2c0, %esi            # imm = 0x2C0
addq 0x58(%rbx), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x182a0
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_main.c
// Function: Write_Highscore_Table
void Write_Highscore_Table(void)
{
edict_t     *cl_ent;
char Buf[512];
FILE *fp;
int i;
size_t Obj_Read;

	if(maplistindex < 0)
		return;

	sprintf(Buf, "%s/%s.scr", gamedir->string, level.mapname);


	fp = fopen(Buf, "rb");

	if(fp == 0)
		Create_New_File();
	else
	{
		Obj_Read = fread(Highscore_Table, sizeof(HIGHSCORE_STATS_TYPE), MAX_HIGHSCORE_ENTRIES, fp);
		if(Obj_Read < MAX_HIGHSCORE_ENTRIES)
		{
			fclose(fp);
			Create_New_File();
		}
	}

	fp = fopen(Buf, "wb");
	if(fp == 0)
		return;


    for(i = 0; i < game.maxclients; i++)
    {
        cl_ent = g_edicts + 1 + i;
		Check_Made_Table(cl_ent);
    }

	
	fwrite(Highscore_Table, sizeof(HIGHSCORE_STATS_TYPE), MAX_HIGHSCORE_ENTRIES, fp);
	fclose(fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq 0x36632(%rip), %rax     # 0x68dd8
cmpl $0x0, (%rax)
js 0x328bd
movq 0x366fa(%rip), %rax     # 0x68eb0
movq (%rax), %rax
movq 0x8(%rax), %rdx
movq 0x365dc(%rip), %rcx     # 0x68da0
addq $0x48, %rcx
leaq 0x24ae4(%rip), %rsi     # 0x572b3
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x196f0
leaq 0x24ada(%rip), %rsi     # 0x572bd
movq %rbx, %rdi
callq 0x19470
testq %rax, %rax
je 0x3281a
movq %rax, %rbx
movq 0x362ae(%rip), %rdi     # 0x68aa8
movl $0x28, %esi
movl $0x7, %edx
movq %rax, %rcx
callq 0x183f0
cmpq $0x6, %rax
ja 0x32832
movq %rbx, %rdi
callq 0x185a0
movq 0x36287(%rip), %rdi     # 0x68aa8
movq 0x35f28(%rip), %rsi     # 0x68750
movl $0x118, %edx            # imm = 0x118
callq 0x18c80
leaq 0x24a87(%rip), %rsi     # 0x572c0
movq %rsp, %rdi
callq 0x19470
testq %rax, %rax
je 0x328bd
movq %rax, %rbx
movq 0x364f0(%rip), %r14     # 0x68d40
cmpl $0x0, 0x610(%r14)
jle 0x3288c
movl $0x4a8, %r15d           # imm = 0x4A8
xorl %r12d, %r12d
movq 0x35cee(%rip), %r13     # 0x68558
movq (%r13), %rdi
addq %r15, %rdi
callq 0x185d0
incq %r12
movslq 0x610(%r14), %rax
addq $0x4a8, %r15            # imm = 0x4A8
cmpq %rax, %r12
jl 0x3286a
movq 0x36215(%rip), %rdi     # 0x68aa8
movl $0x28, %esi
movl $0x7, %edx
movq %rbx, %rcx
callq 0x19710
movq %rbx, %rdi
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x185a0
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_main.c
// Function: One_Man_Left
int One_Man_Left(void)
{
edict_t *cl_ent;
int i;
int Living_People = 0;

	for(i = 0; i < game.maxclients; i++)
    {
        cl_ent = g_edicts + 1 + i;

		if(cl_ent->health > 0)
			Living_People++;

		if(Living_People > 1)
			return(false);
	}

	return(true);

}

// Assembly:
movq 0x36457(%rip), %rax     # 0x68d40
movslq 0x610(%rax), %rdx
movl $0x1, %eax
testq %rdx, %rdx
jle 0x32934
movq 0x35c57(%rip), %rcx     # 0x68558
movq (%rcx), %rcx
imulq $0x4a8, %rdx, %rdx      # imm = 0x4A8
xorl %esi, %esi
xorl %edi, %edi
movl %edi, %r8d
xorl %edi, %edi
cmpl $0x0, 0x6fc(%rcx,%rsi)
setg %dil
addl %r8d, %edi
cmpl $0x2, %edi
jae 0x32935
addq $0x4a8, %rsi            # imm = 0x4A8
cmpq %rsi, %rdx
jne 0x3290f
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_main.c
// Function: Declare_Railgun_Victor
edict_t *Declare_Railgun_Victor(void)
{
int Highscore = -9999;
edict_t *Winner;
edict_t *cl_ent;
int i;
int score;
    
	Winner = g_edicts + 1;

	for(i = 0; i < game.maxclients; i++)
    {
        cl_ent = g_edicts + 1 + i;

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

		score = stats_get(cl_ent, STATS_SCORE);

    	if(score > Highscore)
		{
			Winner = cl_ent;
			Highscore = score;
		}
    }

	return(Winner);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x35c0e(%rip), %rax     # 0x68558
movq (%rax), %r14
leaq 0x4a8(%r14), %rbx
movq 0x363e5(%rip), %r12     # 0x68d40
movl 0x610(%r12), %ecx
testl %ecx, %ecx
jle 0x329c2
movl $0xffffd8f1, %r15d      # imm = 0xFFFFD8F1
movl $0x4a8, %r13d           # imm = 0x4A8
xorl %ebp, %ebp
cmpl $0x0, 0x254(%r14,%r13)
jle 0x329b0
addq %r13, %r14
movq %r14, %rdi
movl $0x3, %esi
callq 0x18030
cmpl %eax, %r15d
cmovlq %r14, %rbx
cmovgl %r15d, %eax
movq 0x35bb6(%rip), %rcx     # 0x68558
movq (%rcx), %r14
movl 0x610(%r12), %ecx
movl %eax, %r15d
incq %rbp
movslq %ecx, %rax
addq $0x4a8, %r13            # imm = 0x4A8
cmpq %rax, %rbp
jl 0x32975
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_O3/QwazyWabbitWOS[P]lmctf60/g_main.c
// Function: CheckNeedPass
void CheckNeedPass (void)
{
	int need;

	// if password or spectator_password has changed, update needpass
	// as needed
	if (password->modified || spectator_password->modified) 
	{
		password->modified = spectator_password->modified = false;

		need = 0;

		if (*password->string && Q_stricmp(password->string, "none"))
			need |= 1;
		if (*spectator_password->string && Q_stricmp(spectator_password->string, "none"))
			need |= 2;

		gi.cvar_set("needpass", va("%d", need));
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x35c70(%rip), %rax     # 0x68858
movq (%rax), %rcx
cmpl $0x0, 0x1c(%rcx)
movq 0x36032(%rip), %r14     # 0x68c28
movq (%r14), %rax
jne 0x32c01
cmpl $0x0, 0x1c(%rax)
je 0x32c7b
xorl %ebx, %ebx
movl %ebx, 0x1c(%rax)
movl %ebx, 0x1c(%rcx)
movq 0x8(%rcx), %rdi
cmpb $0x0, (%rdi)
je 0x32c28
leaq 0x246b8(%rip), %rsi     # 0x572d1
callq 0x18690
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
movq (%r14), %rax
movq 0x8(%rax), %rdi
cmpb $0x0, (%rdi)
je 0x32c47
leaq 0x24699(%rip), %rsi     # 0x572d1
callq 0x18690
leal 0x2(%rbx), %ecx
testl %eax, %eax
cmovel %ebx, %ecx
movl %ecx, %ebx
movq 0x359b2(%rip), %rax     # 0x68600
movq 0x128(%rax), %r14
leaq 0x1fc2a(%rip), %rdi     # 0x52886
movl %ebx, %esi
xorl %eax, %eax
callq 0x19340
leaq 0x2466a(%rip), %rdi     # 0x572d6
movq %rax, %rsi
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_main.c
// Function: ExitLevel
void ExitLevel (void)
{
	int		i;
	edict_t	*ent;
	char	command [MAX_INFO_STRING];

	Com_sprintf (command, sizeof(command), "gamemap \"%s\"\n", level.changemap);

	gi.AddCommandString (command);
	level.changemap = NULL;
	level.exitintermission = 0;
	level.intermissiontime = 0;
	ClientEndServerFrames ();

	// clear some things before going to next level
	for (i = 0; i < maxclients->value; i++)
	{
		ent = g_edicts + 1 + i;
		if (ent && ent->inuse)
		{
			if (ent->health > ent->client->pers.max_health)
				ent->health = ent->client->pers.max_health;
		}
	}

	// clean up stats before start of next level
	stats_cleanup(); // STATS - LM_Hati
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq 0x35e08(%rip), %r14     # 0x68da0
movq 0xd0(%r14), %rcx
leaq 0x2094d(%rip), %rdx     # 0x538f3
xorl %ebp, %ebp
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x200, %esi            # imm = 0x200
xorl %eax, %eax
callq 0x18e10
movq 0x3563f(%rip), %rax     # 0x68600
movq %rbx, %rdi
callq *0x150(%rax)
movq $0x0, 0xd0(%r14)
movl %ebp, 0xd8(%r14)
movl %ebp, 0xc8(%r14)
callq 0x18f90
movq 0x35541(%rip), %rax     # 0x68530
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x33043
movq 0x35552(%rip), %rcx     # 0x68558
movl $0x6fc, %eax            # imm = 0x6FC
addq (%rcx), %rax
movl $0x1, %ecx
cmpl $0x0, -0x1f4(%rax)
je 0x3302f
movq -0x1fc(%rax), %rdx
movl 0x30c(%rdx), %edx
cmpl %edx, (%rax)
jle 0x3302f
movl %edx, (%rax)
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
addq $0x4a8, %rax            # imm = 0x4A8
incl %ecx
ucomiss %xmm1, %xmm0
ja 0x33013
xorl %eax, %eax
callq 0x18f70
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_misc.c
// Function: VelocityForDamage
void VelocityForDamage (int damage, vec3_t v)
{
	v[0] = 100.0 * crandom();
	v[1] = 100.0 * crandom();
	v[2] = 200.0 + 100.0 * random();

	if (damage < 50)
		VectorScale (v, 0.7f, v);
	else 
		VectorScale (v, 1.2f, v);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
xorl %r14d, %r14d
cmpl $0x32, %edi
setl %r14b
callq 0x19a10
movl $0x7fff, %ebp           # imm = 0x7FFF
andl %ebp, %eax
cvtsi2ss %eax, %xmm0
divss 0x201c7(%rip), %xmm0    # 0x53288
cvtss2sd %xmm0, %xmm0
addsd 0x22b4b(%rip), %xmm0    # 0x55c18
addsd %xmm0, %xmm0
mulsd 0x24267(%rip), %xmm0    # 0x57340
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rbx)
callq 0x19a10
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x20191(%rip), %xmm0    # 0x53288
cvtss2sd %xmm0, %xmm0
addsd 0x22b15(%rip), %xmm0    # 0x55c18
addsd %xmm0, %xmm0
mulsd 0x24231(%rip), %xmm0    # 0x57340
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%rbx)
callq 0x19a10
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x2015a(%rip), %xmm0    # 0x53288
cvtss2sd %xmm0, %xmm0
mulsd 0x24206(%rip), %xmm0    # 0x57340
addsd 0x24206(%rip), %xmm0    # 0x57348
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%rbx)
leaq 0x241fe(%rip), %rax     # 0x57350
movss (%rax,%r14,4), %xmm0
movq %rbx, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x189d0
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_misc.c
// Function: ClipGibVelocity
void ClipGibVelocity (edict_t *ent)
{
	if (ent->velocity[0] < -300)
		ent->velocity[0] = -300;
	else if (ent->velocity[0] > 300)
		ent->velocity[0] = 300;
	if (ent->velocity[1] < -300)
		ent->velocity[1] = -300;
	else if (ent->velocity[1] > 300)
		ent->velocity[1] = 300;
	if (ent->velocity[2] < 200)
		ent->velocity[2] = 200;	// always some upwards
	else if (ent->velocity[2] > 500)
		ent->velocity[2] = 500;
}

// Assembly:
movss 0x1c0(%rdi), %xmm1
movss 0x241b5(%rip), %xmm0    # 0x5732c
ucomiss %xmm1, %xmm0
ja 0x33189
movss 0x22e38(%rip), %xmm0    # 0x55fbc
ucomiss %xmm0, %xmm1
jbe 0x33191
movss %xmm0, 0x1c0(%rdi)
movss 0x1c4(%rdi), %xmm1
movss 0x2418b(%rip), %xmm0    # 0x5732c
ucomiss %xmm1, %xmm0
ja 0x331b3
movss 0x22e0e(%rip), %xmm0    # 0x55fbc
ucomiss %xmm0, %xmm1
jbe 0x331bb
movss %xmm0, 0x1c4(%rdi)
movss 0x1c8(%rdi), %xmm1
movss 0x200d9(%rip), %xmm0    # 0x532a4
ucomiss %xmm1, %xmm0
ja 0x331dd
movss 0x24158(%rip), %xmm0    # 0x57330
ucomiss %xmm0, %xmm1
jbe 0x331e5
movss %xmm0, 0x1c8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_misc.c
// Function: gib_think
void gib_think (edict_t *self)
{
	self->s.frame++;
	self->nextthink = level.time + FRAMETIME;

	if (self->s.frame == 10)
	{
		self->think = G_FreeEdict;
		self->nextthink = level.time + 8 + random()*10;
	}
}

// Assembly:
movl 0x38(%rdi), %eax
incl %eax
movl %eax, 0x38(%rdi)
movq 0x35bab(%rip), %rcx     # 0x68da0
movss 0x4(%rcx), %xmm1
movss 0x2008e(%rip), %xmm0    # 0x53290
addss %xmm1, %xmm0
movss %xmm0, 0x200(%rdi)
cmpl $0xa, %eax
jne 0x3326b
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x3520e(%rip), %rax     # 0x68430
movq %rax, 0x210(%rdi)
addss 0x1fccb(%rip), %xmm1    # 0x52efc
movss %xmm1, 0xc(%rsp)
callq 0x19a10
andl $0x7fff, %eax           # imm = 0x7FFF
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x20038(%rip), %xmm0    # 0x53288
mulss 0x1fcbc(%rip), %xmm0    # 0x52f14
addss 0xc(%rsp), %xmm0
movss %xmm0, 0x200(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_misc.c
// Function: gib_touch
void gib_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
{
	vec3_t	normal_angles, right;

	if (!self->groundentity)
		return;

	self->touch = NULL;

	if (plane)
	{
		gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/fhit3.wav"), 1, ATTN_NORM, 0);

		vectoangles (plane->normal, normal_angles);
		AngleVectors (normal_angles, NULL, right, NULL);
		vectoangles (right, self->s.angles);

		if (self->s.modelindex == sm_meat_index)
		{
			self->s.frame++;
			self->think = gib_think;
			self->nextthink = level.time + FRAMETIME;
		}
	}
}

// Assembly:
cmpq $0x0, 0x2b8(%rdi)
je 0x33341
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq $0x0, 0x220(%rdi)
testq %rdx, %rdx
je 0x33338
movq 0x3535c(%rip), %rax     # 0x68600
movq 0x20(%rax), %r15
leaq 0x24281(%rip), %rdi     # 0x57530
callq *0x48(%rax)
movss 0x1fc6e(%rip), %xmm0    # 0x52f28
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0x2, %esi
movl %eax, %edx
movaps %xmm0, %xmm1
callq *%r15
leaq 0x14(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x190d0
leaq 0x8(%rsp), %r14
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x183a0
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x190d0
movl 0x28(%rbx), %eax
movq 0x35ce9(%rip), %rcx     # 0x68ff0
cmpl (%rcx), %eax
jne 0x33338
incl 0x38(%rbx)
movq 0x35903(%rip), %rax     # 0x68c18
movq %rax, 0x210(%rbx)
movq 0x35a7d(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
addss 0x1ff60(%rip), %xmm0    # 0x53290
movss %xmm0, 0x200(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq