LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_replace.c
// Function: replace_viewinfo
void replace_viewinfo(edict_t *person, char *temp)
{
	strcpy(temp, "");
	if (person->client->ctf.popup_ent)
	{
		strcpy(temp, person->client->ctf.popup_ent->client->pers.netname);
		temp[15] = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x513a5(%rip), %rsi     # 0x70f80
callq 0x182c0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0x9130(%rax)
je 0x1fc24
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x9130(%rax), %rax
movq 0x58(%rax), %rsi
addq $0xc0, %rsi
addq $0x200, %rsi            # imm = 0x200
callq 0x182c0
movq -0x10(%rbp), %rax
movb $0x0, 0xf(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_replace.c
// Function: replace_carrierinfo
void replace_carrierinfo(edict_t *person, char *temp)
{
	edict_t * teamflag;

	teamflag = ctf_getteamflag(person->client->ctf.teamnum, CTF_TEAM_OPPOSING);

	if (teamflag)
	{
		if (ctf_validateplayer(teamflag->owner, person->client->ctf.teamnum))
		{
			strcpy(temp, teamflag->owner->client->pers.netname);
			strcat(temp, " is at ");
			replace_location(teamflag->owner, temp, true, true);
		}
		else
		{
			strcpy(temp, " no carrier");
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x1100(%rax), %edi
movl $0xfffffffa, %esi       # imm = 0xFFFFFFFA
callq 0x18ef0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1fcef
movq -0x18(%rbp), %rax
movq 0x110(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x1100(%rax), %esi
callq 0x18e40
cmpl $0x0, %eax
je 0x1fcdd
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x110(%rax), %rax
movq 0x58(%rax), %rsi
addq $0xc0, %rsi
addq $0x200, %rsi            # imm = 0x200
callq 0x182c0
movq -0x10(%rbp), %rdi
leaq 0x505b8(%rip), %rsi     # 0x70273
callq 0x19880
movq -0x18(%rbp), %rax
movq 0x110(%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %ecx
movl %ecx, %edx
callq 0x18ea0
jmp 0x1fced
movq -0x10(%rbp), %rdi
leaq 0x50593(%rip), %rsi     # 0x7027b
callq 0x182c0
jmp 0x1fcef
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_replace.c
// Function: visibility_test
qboolean visibility_test(edict_t *one, edict_t *two)
{
	trace_t	traceresult;
	
	//movetype push obs have bogus origins
	if (one->movetype == MOVETYPE_PUSH)
		return false; //pretend we can't see it
	if (two->movetype == MOVETYPE_PUSH)
		return false; //pretend we can't see it
	
	traceresult = gi.trace(one->s.origin, NULL, NULL, two->s.origin, one, MASK_SOLID);
	if (traceresult.fraction == 1.0)
		return true;
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x118(%rax)
jne 0x1fd2c
movl $0x0, -0x4(%rbp)
jmp 0x1fdb4
movq -0x18(%rbp), %rax
cmpl $0x2, 0x118(%rax)
jne 0x1fd42
movl $0x0, -0x4(%rbp)
jmp 0x1fdb4
movq 0x628b7(%rip), %rax     # 0x82600
movq 0x60(%rax), %rax
movq -0x10(%rbp), %rsi
addq $0x4, %rsi
movq -0x18(%rbp), %r8
addq $0x4, %r8
movq -0x10(%rbp), %r9
leaq -0xa8(%rbp), %rdi
xorl %ecx, %ecx
movq %rcx, %rdx
movl $0x3, (%rsp)
callq *%rax
leaq -0x60(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
movl $0x48, %edx
callq 0x18dc0
movss -0x58(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x501a4(%rip), %xmm1    # 0x6ff40
ucomisd %xmm1, %xmm0
jne 0x1fdad
jp 0x1fdad
movl $0x1, -0x4(%rbp)
jmp 0x1fdb4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_replace.c
// Function: replace_visibleplayers
void replace_visibleplayers(edict_t *person, char *temp)
{
	edict_t *cur = NULL;
	qboolean more_than_one = false;	
	
	strcpy(temp,"");
	while ((cur = findradius(cur, person->s.origin, 2048)) != NULL)
	{
		if (cur->client)
		{
			if (cur->inuse && cur != person && visibility_test(person, cur) )
			{
				if (more_than_one)
					strcat(temp," and");
				strcat(temp, cur->client->pers.netname);
				more_than_one = true;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x51196(%rip), %rsi     # 0x70f80
callq 0x182c0
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x4, %rsi
movss 0x5011d(%rip), %xmm0    # 0x6ff20
callq 0x19ae0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1fe86
movq -0x18(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x1fe81
movq -0x18(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x1fe7f
movq -0x18(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x1fe7f
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x18440
cmpl $0x0, %eax
je 0x1fe7f
cmpl $0x0, -0x1c(%rbp)
je 0x1fe59
movq -0x10(%rbp), %rdi
leaq 0x56a40(%rip), %rsi     # 0x76894
callq 0x19880
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rsi
addq $0xc0, %rsi
addq $0x200, %rsi            # imm = 0x200
callq 0x19880
movl $0x1, -0x1c(%rbp)
jmp 0x1fe81
jmp 0x1fdef
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_replace.c
// Function: LowerCase
void LowerCase(char* src)
{
	size_t len;
	size_t i;

	len = strlen(src);
	for (i = 0; i < len; i++)
	{
		src[i] = tolower(src[i]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x186e0
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x1fee7
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x19070
movb %al, %dl
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x1feb1
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_runes.c
// Function: SelectFarthestRuneSpawnPoint
edict_t *SelectFarthestRuneSpawnPoint (void)
{
	edict_t	*bestspot;
	float	bestdistance, bestrunedistance;
	edict_t	*spot;


	spot = NULL;
	bestspot = NULL;
	bestdistance = 0;
	spot = G_Find (spot, FOFS(classname), "item_health");
	while (spot)
	{
		bestrunedistance = RunesRangeFromSpot (spot);
		
		if (bestrunedistance > bestdistance)
		{
			bestspot = spot;
			bestdistance = bestrunedistance;
		}
		spot = G_Find (spot, FOFS(classname), "item_health");
	}

	if (bestspot)
	{
	    return bestspot;
	}

	spot = SelectRuneSpawnPoint();

	return spot;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq $0x0, -0x20(%rbp)
movq $0x0, -0x10(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x14(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
addq $0x138, %rax            # imm = 0x138
movl %eax, %esi
leaq 0x4fd2a(%rip), %rdx     # 0x701af
callq 0x19660
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x204e0
movq -0x20(%rbp), %rdi
callq 0x19ab0
movss %xmm0, -0x18(%rbp)
movss -0x18(%rbp), %xmm0
ucomiss -0x14(%rbp), %xmm0
jbe 0x204c0
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x14(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
addq $0x138, %rax            # imm = 0x138
movl %eax, %esi
leaq 0x4fcda(%rip), %rdx     # 0x701af
callq 0x19660
movq %rax, -0x20(%rbp)
jmp 0x2048e
cmpq $0x0, -0x10(%rbp)
je 0x204f1
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x20502
callq 0x18410
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_runes.c
// Function: Pickup_Rune
qboolean Pickup_Rune (edict_t *ent, edict_t *other)
{
	if (!other->client->rune) // don't already have rune
	{
		// Make sure it will respawn
		ent->flags |= FL_RESPAWN;
		ent->think = NULL;
		ent->nextthink = 0;

		other->client->pers.inventory[ITEM_INDEX(ent->item)]++;
		ent->owner = other;
		other->client->rune = ent;
		ent->solid = SOLID_NOT;
		gi.linkentity (ent); //always pair with solid changes

		ent->svflags |= SVF_NOCLIENT;
		ent->movetype = MOVETYPE_NONE;  // Don't block doors
		gi.sound(ent, CHAN_ITEM, gi.soundindex("misc/power1.wav"), 1, ATTN_NORM, 0);
		return true;
	}

	ent->touch = Touch_Item;
	ent->think = Rune_Think;
	ent->nextthink = level.time + FRAMETIME;
	
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0xf68(%rax)
jne 0x20ef2
movq -0x10(%rbp), %rax
movl 0x11c(%rax), %ecx
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, 0x11c(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x210(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x200(%rax)
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x62028(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x30(%rbp), %rax
movl 0x318(%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, 0x318(%rax,%rcx,4)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x110(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq %rcx, 0xf68(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x108(%rax)
movq 0x6178c(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rax
movl 0xc8(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0xc8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x118(%rax)
movq 0x61757(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x52270(%rip), %rdi     # 0x73130
movq 0x61739(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x28(%rbp), %rdi
movl %eax, %edx
movq -0x20(%rbp), %rax
movl $0x3, %esi
movss 0x4f00b(%rip), %xmm1    # 0x6feec
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq *%rax
movl $0x1, -0x4(%rbp)
jmp 0x20f3d
movq -0x10(%rbp), %rax
movq 0x61983(%rip), %rcx     # 0x82880
movq %rcx, 0x220(%rax)
movq -0x10(%rbp), %rax
movq 0x61d11(%rip), %rcx     # 0x82c20
movq %rcx, 0x210(%rax)
movss 0x4f376(%rip), %xmm0    # 0x70294
movq 0x61e7b(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x200(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_runes.c
// Function: Drop_Rune_Think
void Drop_Rune_Think (edict_t *ent)
{
	ent->touch = Touch_Item;
	ent->owner = NULL;
	ent->think = Rune_Think;
	ent->nextthink = level.time + FRAMETIME;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x6191d(%rip), %rcx     # 0x82880
movq %rcx, 0x220(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x110(%rax)
movq -0x8(%rbp), %rax
movq 0x61c9c(%rip), %rcx     # 0x82c20
movq %rcx, 0x210(%rax)
movss 0x4f301(%rip), %xmm0    # 0x70294
movq 0x61e06(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x200(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_runes.c
// Function: tossruneset
static void tossruneset(edict_t *ent)
{
	ent->svflags &= ~SVF_NOCLIENT;
	ent->flags |= FL_RESPAWN;
	ent->spawnflags = DROPPED_ITEM;
	
	if (ent->model)
		gi.setmodel (ent, ent->model);
	else
		gi.setmodel (ent, ent->item->world_model);
	ent->movetype = MOVETYPE_TOSS;  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0xc8(%rax), %ecx
andl $-0x2, %ecx
movl %ecx, 0xc8(%rax)
movq -0x8(%rbp), %rax
movl 0x11c(%rax), %ecx
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, 0x11c(%rax)
movq -0x8(%rbp), %rax
movl $0x10000, 0x140(%rax)   # imm = 0x10000
movq -0x8(%rbp), %rax
cmpq $0x0, 0x120(%rax)
je 0x2130f
movq 0x61308(%rip), %rax     # 0x82600
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x120(%rcx), %rsi
callq *%rax
jmp 0x2132f
movq 0x612ea(%rip), %rax     # 0x82600
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x330(%rcx), %rcx
movq 0x30(%rcx), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movl $0x7, 0x118(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_runes.c
// Function: DamageRuneHook
int DamageRuneHook(edict_t *targ, edict_t *inflictor, edict_t *attacker, int damage, int knockback, int dflags)
{
	if (attacker && attacker->client && attacker->client->rune)
	{
		if (attacker->client->rune->runetype == RUNE_DAMAGE)
		{
			//damage *=2; // Double damage
			damage *= 1.75f; //-bat
		}
	}
	
	return damage;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x213c1
movq -0x18(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x213c1
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0xf68(%rax)
je 0x213c1
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf68(%rax), %rax
cmpl $0x1, 0x478(%rax)
jne 0x213bf
cvtsi2ssl -0x1c(%rbp), %xmm0
movss 0x4ef00(%rip), %xmm1    # 0x702b4
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x1c(%rbp)
jmp 0x213c1
movl -0x1c(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_runes.c
// Function: ResistRuneHook
int ResistRuneHook(edict_t *targ, edict_t *inflictor, edict_t *attacker, int damage, int knockback, int dflags)
{
	if (targ && targ->client && targ->client->rune)
	{
		if (targ->client->rune->runetype == RUNE_RESIST)
		{
			//damage /=2; // Half damage
			damage /= 1.75f; //-bat needs to offset damage rune.
			gi.sound(targ, CHAN_ITEM, gi.soundindex("ctf/resist.wav"), 1, ATTN_NORM, 0);
		}
	}
	
	return damage;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x21494
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x21494
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0xf68(%rax)
je 0x21494
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf68(%rax), %rax
cmpl $0x2, 0x478(%rax)
jne 0x21492
cvtsi2ssl -0x1c(%rbp), %xmm0
movss 0x4ee74(%rip), %xmm1    # 0x702b4
divss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x1c(%rbp)
movq 0x611ae(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0x4efbd(%rip), %rdi     # 0x70426
movq 0x61190(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x38(%rbp), %rdi
movl %eax, %edx
movq -0x30(%rbp), %rax
movl $0x3, %esi
movss 0x4ea62(%rip), %xmm1    # 0x6feec
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq *%rax
jmp 0x21494
movl -0x1c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_runes.c
// Function: RuneWeaponThinkHook
void RuneWeaponThinkHook (edict_t *ent)
{
	if (ent && ent->client && ent->client->rune)
	{
		if (ent->client->rune->runetype == RUNE_HASTE)
		{
			if (ent->client->isfiring)
				gi.sound(ent, CHAN_ITEM, gi.soundindex("player/lava1.wav"), 1, ATTN_NORM, 0);
			
			if (ent->client->ps.gunframe)
				ent->client->pers.weapon->weaponthink (ent);
		}
		if (ent->client->rune->runetype == RUNE_DAMAGE)
		{
			if (ent->client->isfiring)
				gi.sound(ent, CHAN_ITEM, gi.soundindex("ctf/strength.wav"), 1, ATTN_NORM, 0);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2188d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x2188d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0xf68(%rax)
je 0x2188d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf68(%rax), %rax
cmpl $0x4, 0x478(%rax)
jne 0x21819
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xf70(%rax)
je 0x217f0
movq 0x60e50(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x4ec89(%rip), %rdi     # 0x70450
movq 0x60e32(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x18(%rbp), %rdi
movl %eax, %edx
movq -0x10(%rbp), %rax
movl $0x3, %esi
movss 0x4e704(%rip), %xmm1    # 0x6feec
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq *%rax
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0x5c(%rax)
je 0x21817
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x730(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
jmp 0x21819
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf68(%rax), %rax
cmpl $0x1, 0x478(%rax)
jne 0x2188b
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xf70(%rax)
je 0x21889
movq 0x60db7(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x4ec01(%rip), %rdi     # 0x70461
movq 0x60d99(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x28(%rbp), %rdi
movl %eax, %edx
movq -0x20(%rbp), %rax
movl $0x3, %esi
movss 0x4e66b(%rip), %xmm1    # 0x6feec
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq *%rax
jmp 0x2188b
jmp 0x2188d
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_validateplayer
qboolean ctf_validateplayer(edict_t * ent, int teamnum_wanted)
{
	if (ent)
	{
		if (ent->client && ent->inuse && ent->client->pers.connected && (strcmp(ent->classname,"player") == 0) )
		{
			if (!deathmatch->value) //surt, trying to catch stuff that breaks in single player
			{
				return true;
			}
			if (teamnum_wanted == CTF_TEAM_IGNORETEAM) //we don't care about team
			{
				return true; //this object was a player, regardless of team
			}
			else if (teamnum_wanted == CTF_TEAM_ANYTEAM)
			{
				if (ent->client->ctf.teamnum > CTF_TEAM_UNDEFINED && ent->client->ctf.teamnum < CTF_TEAM_LIMIT )
					return true; //this was a player, on some defined team
			}
			else if (teamnum_wanted == ent->client->ctf.teamnum) //we matched the desired team
			{
				return true; //this was a player that matched the right team number
			}
		}
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x21ab4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x21ab2
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x21ab2
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0x304(%rax)
je 0x21ab2
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rdi
leaq 0x4f979(%rip), %rsi     # 0x71397
callq 0x18bf0
cmpl $0x0, %eax
jne 0x21ab2
movq 0x6148d(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x21a4e
jp 0x21a4e
movl $0x1, -0x4(%rbp)
jmp 0x21abb
cmpl $-0x4, -0x14(%rbp)
jne 0x21a5d
movl $0x1, -0x4(%rbp)
jmp 0x21abb
cmpl $-0x5, -0x14(%rbp)
jne 0x21a90
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0x1100(%rax)
jle 0x21a8e
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x3, 0x1100(%rax)
jge 0x21a8e
movl $0x1, -0x4(%rbp)
jmp 0x21abb
jmp 0x21aae
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x58(%rcx), %rcx
cmpl 0x1100(%rcx), %eax
jne 0x21aac
movl $0x1, -0x4(%rbp)
jmp 0x21abb
jmp 0x21aae
jmp 0x21ab0
jmp 0x21ab2
jmp 0x21ab4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_flagatposition
qboolean ctf_flagatposition(vec3_t a, vec3_t b)
{
	vec3_t dir;
	vec_t dist;
	qboolean result = true;

	VectorSubtract (a, b, dir);
	dist = VectorLength(dir);
	if (dist > 32)
		result = false;
	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x24(%rbp)
movq -0x8(%rbp), %rax
movss (%rax), %xmm0
movq -0x10(%rbp), %rax
subss (%rax), %xmm0
movss %xmm0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x10(%rbp), %rax
subss 0x4(%rax), %xmm0
movss %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x10(%rbp), %rax
subss 0x8(%rax), %xmm0
movss %xmm0, -0x14(%rbp)
leaq -0x1c(%rbp), %rdi
callq 0x194e0
movss %xmm0, -0x20(%rbp)
movss -0x20(%rbp), %xmm0
movss 0x4e92f(%rip), %xmm1    # 0x70474
ucomiss %xmm1, %xmm0
jbe 0x21b51
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_getteamflag
edict_t * ctf_getteamflag(int teamnum, int teamnum_option)
{
	if (teamnum_option == CTF_TEAM_OPPOSING)
	{
		if (teamnum == CTF_TEAM_RED)
			return blueflag;
		else if (teamnum == CTF_TEAM_BLUE)
			return redflag;
		else
			return NULL;
	}
	if (teamnum == CTF_TEAM_RED)
		return redflag;
	else if (teamnum == CTF_TEAM_BLUE)
		return blueflag;
	else
		return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
cmpl $-0x6, -0x10(%rbp)
jne 0x21c06
cmpl $0x1, -0xc(%rbp)
jne 0x21be6
movq 0x60c83(%rip), %rax     # 0x82860
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x21c3a
cmpl $0x2, -0xc(%rbp)
jne 0x21bfc
movq 0x60c05(%rip), %rax     # 0x827f8
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x21c3a
movq $0x0, -0x8(%rbp)
jmp 0x21c3a
cmpl $0x1, -0xc(%rbp)
jne 0x21c1c
movq 0x60be5(%rip), %rax     # 0x827f8
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x21c3a
cmpl $0x2, -0xc(%rbp)
jne 0x21c32
movq 0x60c37(%rip), %rax     # 0x82860
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x21c3a
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_flagsearch
edict_t * ctf_flagsearch(int whichteam)
{
	edict_t* current_flag = NULL;
	edict_t* valid_flag = NULL;
	current_flag = G_Find(current_flag, FOFS(classname), "flag");
	while (current_flag)
	{
		//is this the flag we're looking for?
		//we already know it is classname flag, what else is required?
		if (!current_flag->item) //how did this happen?
			G_FreeEdict(current_flag);
		else if (current_flag->flagteam >= CTF_TEAM_LIMIT ||
					current_flag->flagteam <= CTF_TEAM_UNDEFINED)
		{
			G_FreeEdict(current_flag); //what the heck is this?
		}
		else if (current_flag->flagteam == whichteam)
		{
			if (valid_flag != NULL) //uh oh, multiple flags
			{
				ctf_resetflagandplayer(current_flag, current_flag->owner);
				ctf_resetflagandplayer(valid_flag, valid_flag->owner);
				G_FreeEdict(current_flag); //we'll keep the first one we find
			}
			else
			{
				valid_flag = current_flag;
			}
		}

		current_flag = G_Find(current_flag, FOFS(classname), "flag");
	}

	return valid_flag; //either a flag matching the one we want, or null
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
addq $0x138, %rax            # imm = 0x138
movl %eax, %esi
leaq 0x559fb(%rip), %rdx     # 0x77b1b
callq 0x19660
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x221ec
movq -0x10(%rbp), %rax
cmpq $0x0, 0x330(%rax)
jne 0x2214d
movq -0x10(%rbp), %rdi
callq 0x19cd0
jmp 0x221c9
movq -0x10(%rbp), %rax
cmpl $0x3, 0x47c(%rax)
jge 0x22167
movq -0x10(%rbp), %rax
cmpl $0x0, 0x47c(%rax)
jg 0x22172
movq -0x10(%rbp), %rdi
callq 0x19cd0
jmp 0x221c7
movq -0x10(%rbp), %rax
movl 0x47c(%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x221c5
cmpq $0x0, -0x18(%rbp)
je 0x221bb
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x110(%rax), %rsi
callq 0x19240
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x110(%rax), %rsi
callq 0x19240
movq -0x10(%rbp), %rdi
callq 0x19cd0
jmp 0x221c3
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x221c5
jmp 0x221c7
jmp 0x221c9
movq -0x10(%rbp), %rdi
xorl %eax, %eax
addq $0x138, %rax            # imm = 0x138
movl %eax, %esi
leaq 0x5593d(%rip), %rdx     # 0x77b1b
callq 0x19660
movq %rax, -0x10(%rbp)
jmp 0x22129
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_resetflagandplayer
qboolean ctf_resetflagandplayer(edict_t * whichflag, edict_t * whichplayer)
{

	if (whichflag)
	{
		VectorCopy (whichflag->homeposition, whichflag->s.origin);
		VectorCopy (whichflag->homeangles, whichflag->s.angles);	
		ctf_ResetFlagProps(whichflag);
		// Change the object's position back to it's home position
	}
	if (whichplayer)
	{
		whichplayer->s.effects &= ~EF_COLOR_SHELL;  // Turn off flag carrying affect
		ValidateSelectedItem(whichplayer);
		whichplayer->s.modelindex3 = 0; // Remove model from player
		if (whichplayer->client)
		{
			if (redflag)
				whichplayer->client->pers.inventory[ITEM_INDEX(redflag->item)] = 0;
			if (blueflag)
				whichplayer->client->pers.inventory[ITEM_INDEX(blueflag->item)] = 0;
			if (whichflag)
				whichplayer->client->pers.inventory[ITEM_INDEX(whichflag->item)] = 0;
			ValidateSelectedItem (whichplayer);
		}
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x22882
movq -0x8(%rbp), %rax
movss 0x460(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x4(%rax)
movq -0x8(%rbp), %rax
movss 0x464(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movss 0x468(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xc(%rax)
movq -0x8(%rbp), %rax
movss 0x46c(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x10(%rax)
movq -0x8(%rbp), %rax
movss 0x470(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x14(%rax)
movq -0x8(%rbp), %rax
movss 0x474(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x18(%rax)
movq -0x8(%rbp), %rdi
callq 0x185e0
cmpq $0x0, -0x10(%rbp)
je 0x229af
movq -0x10(%rbp), %rax
movl 0x40(%rax), %ecx
andl $0xfffffeff, %ecx       # imm = 0xFFFFFEFF
movl %ecx, 0x40(%rax)
movq -0x10(%rbp), %rdi
callq 0x182a0
movq -0x10(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x229ad
movq 0x5ff31(%rip), %rax     # 0x827f8
cmpq $0x0, (%rax)
je 0x22910
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x18(%rbp)
movq 0x5ff18(%rip), %rax     # 0x827f8
movq (%rax), %rax
movq 0x330(%rax), %rax
movq 0x6054f(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl $0x0, 0x318(%rax,%rcx,4)
movq 0x5ff49(%rip), %rax     # 0x82860
cmpq $0x0, (%rax)
je 0x22960
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
movq 0x5ff30(%rip), %rax     # 0x82860
movq (%rax), %rax
movq 0x330(%rax), %rax
movq 0x604ff(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl $0x0, 0x318(%rax,%rcx,4)
cmpq $0x0, -0x8(%rbp)
je 0x229a4
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x330(%rax), %rax
movq 0x604bb(%rip), %rcx     # 0x82e40
subq %rcx, %rax
movl $0x88, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x28(%rbp), %rax
movl $0x0, 0x318(%rax,%rcx,4)
movq -0x10(%rbp), %rdi
callq 0x182a0
jmp 0x229af
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_flagwave
void ctf_flagwave (edict_t *ent) //flag animation
{
	if (ent->solid != SOLID_NOT)
		ent->s.frame = 173 + (((ent->s.frame - 173) + 1) % 16);
	ent->nextthink = level.time + FRAMETIME;

	if ( (ent->droptime) && (level.time > ent->droptime + 30) )
	{
		if (!ctf_validateplayer(ent->owner,CTF_TEAM_ANYTEAM))
		{
			if (ent == redflag)
				gi.sound(ent, CHAN_CTF, gi.soundindex("ctf/r_returned.wav"), 0.8f, ATTN_NONE, 0);	
			else if (ent == blueflag)
				gi.sound(ent, CHAN_CTF, gi.soundindex("ctf/b_returned.wav"), 0.8f, ATTN_NONE, 0);	
			ctf_resetflagandplayer(ent, NULL);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x108(%rax)
je 0x22d0d
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
subl $0xad, %eax
addl $0x1, %eax
movl $0x10, %ecx
cltd
idivl %ecx
addl $0xad, %edx
movq -0x8(%rbp), %rax
movl %edx, 0x38(%rax)
movss 0x4d57f(%rip), %xmm0    # 0x70294
movq 0x60084(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq -0x8(%rbp), %rax
movss 0x4a0(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x22d48
jp 0x22d48
jmp 0x22e50
movq 0x60051(%rip), %rax     # 0x82da0
movss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss 0x4d530(%rip), %xmm1    # 0x70290
addss 0x4a0(%rax), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x22e50
movq -0x8(%rbp), %rax
movq 0x110(%rax), %rdi
movl $0xfffffffb, %esi       # imm = 0xFFFFFFFB
callq 0x18e40
cmpl $0x0, %eax
jne 0x22e4e
movq -0x8(%rbp), %rax
movq 0x5fa5e(%rip), %rcx     # 0x827f8
cmpq (%rcx), %rax
jne 0x22de8
movq 0x5f85a(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x4d7cf(%rip), %rdi     # 0x7058c
movq 0x5f83c(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x18(%rbp), %rdi
movl %eax, %edx
movq -0x10(%rbp), %rax
movl $0x5, %esi
movss 0x4d6a2(%rip), %xmm0    # 0x70480
xorps %xmm2, %xmm2
movaps %xmm2, %xmm1
callq *%rax
jmp 0x22e41
movq -0x8(%rbp), %rax
movq 0x5fa6d(%rip), %rcx     # 0x82860
cmpq (%rcx), %rax
jne 0x22e3f
movq 0x5f801(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x4d789(%rip), %rdi     # 0x7059f
movq 0x5f7e3(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x28(%rbp), %rdi
movl %eax, %edx
movq -0x20(%rbp), %rax
movl $0x5, %esi
movss 0x4d649(%rip), %xmm0    # 0x70480
xorps %xmm2, %xmm2
movaps %xmm2, %xmm1
callq *%rax
jmp 0x22e41
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19240
jmp 0x22e50
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_deletespawnpointsnearflag
void ctf_deletespawnpointsnearflag (edict_t *flag)
{
	edict_t *spot;
	float	dist;		  // CTF CODE -- LM JORM
	vec3_t	v;			  // CTF CODE -- LM JORM


	spot = NULL;
	if (deathmatch->value)
	{
                // MJD This should have parentheses, given that you DO want
		// to do an asignment and not a ==
		spot = G_Find (spot, FOFS(classname), "info_player_deathmatch");
		while(spot)
		{
			VectorSubtract (spot->s.origin, flag->homeposition, v);
			dist = VectorLength (v);
			if (dist <= 256)			
			{
				G_FreeEdict (spot);
			}
			spot = G_Find (spot, FOFS(classname), "info_player_deathmatch");
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq 0x5fe15(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x230c2
jp 0x230c2
jmp 0x23183
movq -0x10(%rbp), %rdi
xorl %eax, %eax
addq $0x138, %rax            # imm = 0x138
movl %eax, %esi
leaq 0x4d44b(%rip), %rdx     # 0x70522
callq 0x19660
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x23181
movq -0x10(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
subss 0x460(%rax), %xmm0
movss %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
subss 0x464(%rax), %xmm0
movss %xmm0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movss 0xc(%rax), %xmm0
movq -0x8(%rbp), %rax
subss 0x468(%rax), %xmm0
movss %xmm0, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x194e0
movss %xmm0, -0x14(%rbp)
movss 0x4cdcd(%rip), %xmm0    # 0x6ff1c
ucomiss -0x14(%rbp), %xmm0
jb 0x2315e
movq -0x10(%rbp), %rdi
callq 0x19cd0
movq -0x10(%rbp), %rdi
xorl %eax, %eax
addq $0x138, %rax            # imm = 0x138
movl %eax, %esi
leaq 0x4d3af(%rip), %rdx     # 0x70522
callq 0x19660
movq %rax, -0x10(%rbp)
jmp 0x230e0
jmp 0x23183
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_TossEnt
void ctf_TossEnt(edict_t * startent, edict_t * tossent)
{
	trace_t		tr;
	vec3_t		forward,right,offset;

	AngleVectors (startent->client->v_angle, forward, right, NULL);
	VectorSet(offset, 24, 0, -16);
	G_ProjectSource (startent->s.origin, offset, forward, right, tossent->s.origin);
	tr = gi.trace (startent->s.origin, tossent->mins, tossent->maxs,
		tossent->s.origin, startent, CONTENTS_SOLID);
	VectorCopy (tr.endpos, tossent->s.origin);

	VectorScale(forward, 200, tossent->velocity);
	tossent->velocity[2] = 300;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0xebc, %rdi            # imm = 0xEBC
leaq -0x64(%rbp), %rsi
leaq -0x70(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x183e0
movss 0x4d2c1(%rip), %xmm0    # 0x7048c
movss %xmm0, -0x7c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x78(%rbp)
movss 0x4d2a8(%rip), %xmm0    # 0x70488
movss %xmm0, -0x74(%rbp)
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
leaq -0x7c(%rbp), %rsi
leaq -0x64(%rbp), %rdx
leaq -0x70(%rbp), %rcx
movq -0x10(%rbp), %r8
addq $0x4, %r8
callq 0x19140
movq 0x5f3f3(%rip), %rax     # 0x82600
movq 0x60(%rax), %rax
movq -0x8(%rbp), %rsi
addq $0x4, %rsi
movq -0x10(%rbp), %rdx
addq $0xcc, %rdx
movq -0x10(%rbp), %rcx
addq $0xd8, %rcx
movq -0x10(%rbp), %r8
addq $0x4, %r8
movq -0x8(%rbp), %r9
leaq -0xc8(%rbp), %rdi
movl $0x1, (%rsp)
callq *%rax
leaq -0x58(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
movl $0x48, %edx
callq 0x18dc0
movss -0x4c(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x4(%rax)
movss -0x48(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x8(%rax)
movss -0x44(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0xc(%rax)
leaq -0x64(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x1c0, %rsi            # imm = 0x1C0
movss 0x4cfff(%rip), %xmm0    # 0x702a0
callq 0x18a80
movq -0x10(%rbp), %rax
movss 0x4d1d2(%rip), %xmm0    # 0x70484
movss %xmm0, 0x1c8(%rax)
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: Drop_Flag_Think
void Drop_Flag_Think (edict_t *ent)
{
	ent->touch = Touch_Item;
	ent->owner = NULL;
	ent->think = ctf_flagwave;
	ent->nextthink = level.time + FRAMETIME;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x5f59d(%rip), %rcx     # 0x82880
movq %rcx, 0x220(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x110(%rax)
movq -0x8(%rbp), %rax
movq 0x5f2bc(%rip), %rcx     # 0x825c0
movq %rcx, 0x210(%rax)
movss 0x4cf81(%rip), %xmm0    # 0x70294
movq 0x5fa86(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x200(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_BSafePrint
void ctf_BSafePrint(long print_priority, char * buf)
{
	edict_t *ent = NULL;
//	int i;

//	for (i=0 ; i<game.maxclients ; i++)
//	{
//		ent = g_edicts + 1 + i;
//		ctf_SafePrint(ent, print_priority, buf);
//	}

	gi.dprintf(buf);
	
	ent = ctf_findplayer(ent, NULL, CTF_TEAM_IGNORETEAM);
	while (ent)
	{
		ctf_SafePrint(ent, print_priority, buf); 
		ent = ctf_findplayer(ent, NULL, CTF_TEAM_IGNORETEAM);
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq 0x5f0e1(%rip), %rax     # 0x82600
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rdi
movb $0x0, %al
callq *%rcx
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
callq 0x19340
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x23571
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x18f20
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
callq 0x19340
movq %rax, -0x18(%rbp)
jmp 0x23541
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_hook_abort
void ctf_hook_abort(edict_t *ent)
{
	if (ent && ent->client)
	{
//		ent->client->fall_time = 0;
//		ent->client->fall_value = 0;
//		ent->client->bobtime = 0.0625;
//		ent->pain_debounce_time = 0;
//		ent->client->ps.pmove.velocity[2] = 0;
//		if (ent->velocity[2] < 0)
//			ent->velocity[2] = (ent->velocity[2] * -1) /10;
		//surt, none of the above is responsible for the problem with
		//the bouncing view.

		// If we are on the ground, don't take falling damage
		if (ent->groundentity)
		{
			ent->client->oldvelocity[2] = 0;
			ent->velocity[2] = 0;
		}

		if (ent->client->pers.weapon &&
			!strcmp (ent->client->pers.weapon->pickup_name, "Grappling Hook"))
		{
			// Only stop firing grapple
			if (ent->client->weaponstate == WEAPON_FIRING)
				ent->client->weaponstate = WEAPON_READY;
		}
		ent->client->hookstate = 0; //Surt: this used to be ==, obviously broken
		ent->client->hooklength = 0;
		if (ent->client->hook)
		{
			ent->client->hook->think = NULL;
			ent->client->hook->nextthink = 0;
			ent->client->hook->hook_target = NULL;
			G_FreeEdict (ent->client->hook);
			ent->client->hook = NULL;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x248de
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x248de
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2b8(%rax)
je 0x247d6
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xee0(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x1c8(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0x730(%rax)
je 0x24831
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x730(%rax), %rax
movq 0x50(%rax), %rdi
leaq 0x4bfd5(%rip), %rsi     # 0x707d7
callq 0x18bf0
cmpl $0x0, %eax
jne 0x24831
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x3, 0xe78(%rax)
jne 0x2482f
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl $0x0, 0xe78(%rax)
jmp 0x24831
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl $0x0, 0xf40(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl $0x0, 0xf5c(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0xf60(%rax)
je 0x248dc
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf60(%rax), %rax
movq $0x0, 0x210(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf60(%rax), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x200(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf60(%rax), %rax
movq $0x0, 0x480(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf60(%rax), %rdi
callq 0x19cd0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq $0x0, 0xf60(%rax)
jmp 0x248de
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_facing
char *
ctf_facing(edict_t *ent)
{
	int angle;
	
	angle = (int)ent->client->v_angle[1];

	// Turn the angle positive
	angle = (angle + 720) % 360;

	if (angle < 22 || angle >= 338)
		return "s";
	else if (angle < 67)
		return "se";
	else if (angle < 112)
		return "e";
	else if (angle < 157)
		return "ne";
	else if (angle < 202)
		return "n";
	else if (angle < 247)
		return "nw";
	else if (angle < 292)
		return "w";
	else // MJD - Requires a default state. Logic removed
	     // MJD - Would a (int)(angle/67) and case statment
	     // MJD - work better?
		return "sw";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cvttss2si 0xec0(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x2d0, %eax            # imm = 0x2D0
movl $0x168, %ecx            # imm = 0x168
cltd
idivl %ecx
movl %edx, -0x14(%rbp)
cmpl $0x16, -0x14(%rbp)
jl 0x2492d
cmpl $0x152, -0x14(%rbp)     # imm = 0x152
jl 0x2493d
leaq 0x4b06a(%rip), %rax     # 0x6f99e
movq %rax, -0x8(%rbp)
jmp 0x249c6
cmpl $0x43, -0x14(%rbp)
jge 0x24950
leaq 0x51833(%rip), %rax     # 0x7617d
movq %rax, -0x8(%rbp)
jmp 0x249c6
cmpl $0x70, -0x14(%rbp)
jge 0x24963
leaq 0x4f377(%rip), %rax     # 0x73cd4
movq %rax, -0x8(%rbp)
jmp 0x249c6
cmpl $0x9d, -0x14(%rbp)
jge 0x24979
leaq 0x4f28b(%rip), %rax     # 0x73bfe
movq %rax, -0x8(%rbp)
jmp 0x249c6
cmpl $0xca, -0x14(%rbp)
jge 0x2498f
leaq 0x501f2(%rip), %rax     # 0x74b7b
movq %rax, -0x8(%rbp)
jmp 0x249c6
cmpl $0xf7, -0x14(%rbp)
jge 0x249a5
leaq 0x4be47(%rip), %rax     # 0x707e6
movq %rax, -0x8(%rbp)
jmp 0x249c6
cmpl $0x124, -0x14(%rbp)     # imm = 0x124
jge 0x249bb
leaq 0x50042(%rip), %rax     # 0x749f7
movq %rax, -0x8(%rbp)
jmp 0x249c6
leaq 0x4be27(%rip), %rax     # 0x707e9
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_faceNorth
char *
ctf_faceNorth(edict_t *ent)
{
	int angle;
	
	angle = (int)ent->client->v_angle[1];

	// Turn the angle positive
	angle = (angle + 720) % 360;

	if (angle < 22 || angle >= 338)
		return "south";
	else if (angle < 67)
		return "southwest";
	else if (angle < 112)
		return "west";
	else if (angle < 157)
		return "northwest";
	else if (angle < 202)
		return "north";
	else if (angle < 247)
		return "northeast";
	else if (angle < 292)
		return "east";
	else // MJD See Previous Error - Requires Default
		return "southeast";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cvttss2si 0xec0(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x2d0, %eax            # imm = 0x2D0
movl $0x168, %ecx            # imm = 0x168
cltd
idivl %ecx
movl %edx, -0x14(%rbp)
cmpl $0x16, -0x14(%rbp)
jl 0x24a0d
cmpl $0x152, -0x14(%rbp)     # imm = 0x152
jl 0x24a1d
leaq 0x4bdd8(%rip), %rax     # 0x707ec
movq %rax, -0x8(%rbp)
jmp 0x24aa6
cmpl $0x43, -0x14(%rbp)
jge 0x24a30
leaq 0x4bdc8(%rip), %rax     # 0x707f2
movq %rax, -0x8(%rbp)
jmp 0x24aa6
cmpl $0x70, -0x14(%rbp)
jge 0x24a43
leaq 0x4bdc4(%rip), %rax     # 0x70801
movq %rax, -0x8(%rbp)
jmp 0x24aa6
cmpl $0x9d, -0x14(%rbp)
jge 0x24a59
leaq 0x4bda9(%rip), %rax     # 0x707fc
movq %rax, -0x8(%rbp)
jmp 0x24aa6
cmpl $0xca, -0x14(%rbp)
jge 0x24a6f
leaq 0x4bd9d(%rip), %rax     # 0x70806
movq %rax, -0x8(%rbp)
jmp 0x24aa6
cmpl $0xf7, -0x14(%rbp)
jge 0x24a85
leaq 0x4bd8d(%rip), %rax     # 0x7080c
movq %rax, -0x8(%rbp)
jmp 0x24aa6
cmpl $0x124, -0x14(%rbp)     # imm = 0x124
jge 0x24a9b
leaq 0x4bd7c(%rip), %rax     # 0x70811
movq %rax, -0x8(%rbp)
jmp 0x24aa6
leaq 0x4bd74(%rip), %rax     # 0x70816
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_SetLogName
void ctf_SetLogName()
{
	//surt automated logfile renaming here
	if ( strcmp(logrename->string, "") != 0)
	{
		time_t t;
		struct tm  *ptm;
		qboolean lognamechange = false;
		
		/* Get the time */
		t = time(NULL);
		
//		sl_CloseLogFile();
		
		ptm = localtime( &t );
		if( NULL != ptm )
		{
			char timestring[MAX_INFO_STRING];
			char stdlogstring[MAX_INFO_STRING];
			
			strftime( &timestring[0],
				(sizeof(timestring)/sizeof(timestring[0]))-1,
				"%d%b%Y.log",
				ptm );
			strcpy(stdlogstring, logrename->string);
			strcat(stdlogstring, "/");
			strcat(stdlogstring, timestring);
			if (strcmp(logrename->string, stdlogstring) != 0)
				lognamechange = true;
			if (lognamechange == true)
			{
				sl_GameEnd( &gi, level); //closes the previous logfile
				gi.cvar_set("stdlogname", stdlogstring); //set the new name
				sl_Logging( &gi, GAMEVERSION );	// StdLog - Surt, print the standard header
			}
		}
	}


	//surt end of automated logfile renaming
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x580, %rsp            # imm = 0x580
movq 0x5d20e(%rip), %rax     # 0x82540
movq (%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x4bc40(%rip), %rsi     # 0x70f80
callq 0x18bf0
cmpl $0x0, %eax
je 0x25456
movl $0x0, -0x14(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x18f70
movq %rax, -0x8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x181a0
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x25454
leaq -0x220(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x1ff, %esi            # imm = 0x1FF
leaq 0x4b51e(%rip), %rdx     # 0x708b0
callq 0x194d0
leaq -0x420(%rbp), %rdi
movq 0x5d19b(%rip), %rax     # 0x82540
movq (%rax), %rax
movq 0x8(%rax), %rsi
callq 0x182c0
leaq -0x420(%rbp), %rdi
leaq 0x4cbe3(%rip), %rsi     # 0x71fa2
callq 0x19880
leaq -0x420(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x19880
movq 0x5d162(%rip), %rax     # 0x82540
movq (%rax), %rax
movq 0x8(%rax), %rdi
leaq -0x420(%rbp), %rsi
callq 0x18bf0
cmpl $0x0, %eax
je 0x253fd
movl $0x1, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
jne 0x25452
movq 0x5d996(%rip), %rsi     # 0x82da0
movq %rsp, %rdi
movl $0x2b, %ecx
rep  movsq (%rsi), %es:(%rdi)
movq 0x5d1e4(%rip), %rdi     # 0x82600
callq 0x19c70
movq 0x5d1d8(%rip), %rax     # 0x82600
movq 0x128(%rax), %rax
leaq -0x420(%rbp), %rsi
leaq 0x4b47e(%rip), %rdi     # 0x708bb
callq *%rax
movq 0x5d1ba(%rip), %rdi     # 0x82600
leaq 0x4b479(%rip), %rsi     # 0x708c6
callq 0x197c0
jmp 0x25454
jmp 0x25456
addq $0x580, %rsp            # imm = 0x580
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_ChangeMap
void ctf_ChangeMap(char *mapname, qboolean startmatch)
{
	extern int matchstate;
    char command[MAX_INFO_STRING];
    Com_sprintf (command, sizeof(command), "gamemap \"%s\"\n", mapname);
    gi.AddCommandString (command);
    level.changemap = NULL;
    level.exitintermission = 0;
    level.intermissiontime = 0;
    stats_cleanup(); // STATS - LM_Hati
    KillMatch();
    if (startmatch) {
		matchstate = MATCH_COUNTDOWN;
    } else {
		matchstate = MATCH_NONE;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x8(%rbp), %rcx
movl $0x200, %esi            # imm = 0x200
leaq 0x4b44a(%rip), %rdx     # 0x708d3
movb $0x0, %al
callq 0x18f90
movq 0x5d169(%rip), %rax     # 0x82600
movq 0x150(%rax), %rax
leaq -0x210(%rbp), %rdi
callq *%rax
movq 0x5d8f2(%rip), %rax     # 0x82da0
movq $0x0, 0xd0(%rax)
movq 0x5d8e0(%rip), %rax     # 0x82da0
movl $0x0, 0xd8(%rax)
movq 0x5d8cf(%rip), %rax     # 0x82da0
xorps %xmm0, %xmm0
movss %xmm0, 0xc8(%rax)
movb $0x0, %al
callq 0x19100
movb $0x0, %al
callq 0x180d0
cmpl $0x0, -0xc(%rbp)
je 0x254ff
movq 0x5d2e1(%rip), %rax     # 0x827d8
movl $0x2, (%rax)
jmp 0x2550c
movq 0x5d2d2(%rip), %rax     # 0x827d8
movl $0x0, (%rax)
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop