LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x470ea(%rip), %rcx     # 0x68600
movq %rsi, %rdi
xorl %eax, %eax
callq *0x8(%rcx)
xorl %edi, %edi
xorl %esi, %esi
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
callq 0x19170
testq %rax, %rax
je 0x21559
movq %rax, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x18da0
movq %r15, %rdi
xorl %esi, %esi
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
callq 0x19170
movq %rax, %r15
testq %rax, %rax
jne 0x21534
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x2219b
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %r14
testq %r14, %r14
je 0x22194
cmpq $0x0, 0x2b8(%rbx)
je 0x22118
xorl %eax, %eax
movl %eax, 0xee0(%r14)
movl %eax, 0x1c8(%rbx)
movq 0x730(%r14), %rax
testq %rax, %rax
je 0x2214d
movq 0x50(%rax), %rdi
leaq 0x316c8(%rip), %rsi     # 0x537f7
callq 0x18b20
testl %eax, %eax
jne 0x2214d
cmpl $0x3, 0xe78(%r14)
jne 0x2214d
movl $0x0, 0xe78(%r14)
xorl %eax, %eax
movl %eax, 0xf40(%r14)
movl %eax, 0xf5c(%r14)
movq 0xf60(%r14), %rdi
testq %rdi, %rdi
je 0x22194
xorl %r14d, %r14d
movq %r14, 0x210(%rdi)
movl $0x0, 0x200(%rdi)
movq %r14, 0x480(%rdi)
callq 0x19a50
movq 0x58(%rbx), %rax
movq %r14, 0xf60(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movq 0x58(%rdi), %rax
cvttss2si 0xec0(%rax), %ecx
movl %ecx, %eax
addl $0x2d0, %eax            # imm = 0x2D0
cltq
imulq $-0x49f49f49, %rax, %rdx # imm = 0xB60B60B7
shrq $0x20, %rdx
addl %edx, %ecx
addl $0x2d0, %ecx            # imm = 0x2D0
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x8, %ecx
addl %edx, %ecx
imull $0x168, %ecx, %ecx      # imm = 0x168
subl %ecx, %eax
leal -0x152(%rax), %ecx
cmpl $0xfffffec4, %ecx       # imm = 0xFFFFFEC4
jae 0x221ec
leaq 0x307c3(%rip), %rax     # 0x529ae
retq
cmpl $0x43, %eax
jae 0x221f9
leaq 0x372ad(%rip), %rax     # 0x594a5
retq
cmpl $0x70, %eax
jae 0x22206
leaq 0x34c3b(%rip), %rax     # 0x56e40
retq
cmpl $0x9d, %eax
jae 0x22215
leaq 0x34b56(%rip), %rax     # 0x56d6a
retq
cmpl $0xca, %eax
jae 0x22224
leaq 0x35c70(%rip), %rax     # 0x57e93
retq
cmpl $0xf7, %eax
jae 0x22233
leaq 0x315d4(%rip), %rax     # 0x53806
retq
cmpl $0x124, %eax            # imm = 0x124
leaq 0x35ad0(%rip), %rcx     # 0x57d0f
leaq 0x315c3(%rip), %rax     # 0x53809
cmovbq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movq 0x58(%rdi), %rax
cvttss2si 0xec0(%rax), %ecx
movl %ecx, %eax
addl $0x2d0, %eax            # imm = 0x2D0
cltq
imulq $-0x49f49f49, %rax, %rdx # imm = 0xB60B60B7
shrq $0x20, %rdx
addl %edx, %ecx
addl $0x2d0, %ecx            # imm = 0x2D0
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x8, %ecx
addl %edx, %ecx
imull $0x168, %ecx, %ecx      # imm = 0x168
subl %ecx, %eax
leal -0x152(%rax), %ecx
cmpl $0xfffffec4, %ecx       # imm = 0xFFFFFEC4
jae 0x2229b
leaq 0x31572(%rip), %rax     # 0x5380c
retq
cmpl $0x43, %eax
jae 0x222a8
leaq 0x3156b(%rip), %rax     # 0x53812
retq
cmpl $0x70, %eax
jae 0x222b5
leaq 0x3156d(%rip), %rax     # 0x53821
retq
cmpl $0x9d, %eax
jae 0x222c4
leaq 0x31559(%rip), %rax     # 0x5381c
retq
cmpl $0xca, %eax
jae 0x222d3
leaq 0x31554(%rip), %rax     # 0x53826
retq
cmpl $0xf7, %eax
jae 0x222e2
leaq 0x3154b(%rip), %rax     # 0x5382c
retq
cmpl $0x124, %eax            # imm = 0x124
leaq 0x31543(%rip), %rcx     # 0x53831
leaq 0x31541(%rip), %rax     # 0x53836
cmovbq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_ctffunc.c
// Function: ctf_SpamCheck
qboolean ctf_SpamCheck(edict_t *ent)
{
	qboolean result = false;

	if (ent->client->ctf.extra_flags & CTF_EXTRAFLAGS_REFEREE)
		result = true;

	else if (	(ent->client->spam_band_count <= 0) || //no bandwidth available
					(ent->client->spam_freq_count > CTF_SPAM_FREQ_MAX_ALLOWED) || //no frequency available
					(level.time - ent->client->spam_lock_time < CTF_SPAM_LOCKOUT_TIME)    ) //already in penalty box
	{
		ctf_SafePrint(ent, PRINT_HIGH, "That action has been blocked by spam control.\n");
		ent->client->spam_lock_time = level.time; //you triggered spam lock
	}
	else
	{
		result = true;
		
		//here we have a player who has done too many long says, or some such
		if (ent->client->spam_band_count < CTF_SPAM_BAND_WARN_LEVEL)
		{
			ctf_SafePrint(ent, PRINT_HIGH, "Warning: Approaching spam bandwidth limits.\n");
		}
		
	}

	//here we have a player who has done a few actions in a short time
	if (ent->client->spam_freq_time - level.time < CTF_SPAM_FREQ_EXTRA_PENALTY_TIME)
	{
		ent->client->spam_freq_count += CTF_SPAM_FREQ_EXTRA_PENALTY;
		if (ent->client->spam_band_count < CTF_SPAM_FREQ_BAND_EXTRA_PENALTY_LEVEL) //compound penalty for bandwidth
			ent->client->spam_freq_count += CTF_SPAM_FREQ_BAND_EXTRA_PENALTY;
	}


	ent->client->spam_freq_time = level.time; //see test of this above

/*	gi.dprintf("Time: %f Freq-Time: %f Freq-Count: %ld Lock-Time: %f Band: %ld", 
		level.time,
		ent->client->spam_freq_time,
		ent->client->spam_freq_count,
		ent->client->spam_lock_time,
		ent->client->spam_band_count
		); */

	return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x58(%rdi), %rax
movl $0x1, %ebx
testb $0x2, 0x1108(%rax)
jne 0x224ed
movq %rdi, %r14
movq 0x10e0(%rax), %rcx
testq %rcx, %rcx
jle 0x224bf
cmpq $0x32, 0x10d8(%rax)
jg 0x224bf
movq 0x468ff(%rip), %rdx     # 0x68da0
movss 0x4(%rdx), %xmm0
subss 0x10cc(%rax), %xmm0
movss 0x30a52(%rip), %xmm1    # 0x52f08
ucomiss %xmm0, %xmm1
jbe 0x22551
leaq 0x31393(%rip), %rdx     # 0x53859
movl $0x2, %esi
movq %r14, %rdi
callq 0x18da0
movq 0x468c6(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
movq 0x58(%r14), %rax
movss %xmm0, 0x10cc(%rax)
xorl %ebx, %ebx
movss 0x10d0(%rax), %xmm1
movq 0x468a4(%rip), %rcx     # 0x68da0
movss 0x4(%rcx), %xmm0
subss %xmm0, %xmm1
movss 0x30f63(%rip), %xmm2    # 0x53470
ucomiss %xmm1, %xmm2
jbe 0x2253f
movq 0x10d8(%rax), %rcx
movq 0x10e0(%rax), %rdx
leaq 0x14(%rcx), %rsi
movq %rsi, 0x10d8(%rax)
cmpq $0xbd, %rdx
jg 0x2253f
addq $0x19, %rcx
movq %rcx, 0x10d8(%rax)
movss %xmm0, 0x10d0(%rax)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpq $0x59, %rcx
ja 0x224ed
leaq 0x3132a(%rip), %rdx     # 0x53888
movl $0x2, %esi
movq %r14, %rdi
callq 0x18da0
movq 0x58(%r14), %rax
jmp 0x224ed
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x560, %rsp            # imm = 0x560
movq 0x45d3a(%rip), %r14     # 0x68540
movq (%r14), %rax
movq 0x8(%rax), %rax
cmpb $0x0, (%rax)
je 0x228e0
xorl %edi, %edi
callq 0x18df0
leaq 0x158(%rsp), %rdi
movq %rax, (%rdi)
callq 0x18180
testq %rax, %rax
je 0x228e0
leaq 0x31093(%rip), %rdx     # 0x538d0
leaq 0x360(%rsp), %rbx
movl $0x1ff, %esi            # imm = 0x1FF
movq %rbx, %rdi
movq %rax, %rcx
callq 0x192d0
movq (%r14), %rax
movq 0x8(%rax), %r14
leaq 0x160(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x182a0
movq %r15, %rdi
callq 0x18680
movw $0x2f, 0x160(%rsp,%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x19640
movq %r14, %rdi
movq %r15, %rsi
callq 0x18b20
testl %eax, %eax
je 0x228e0
movq 0x464fe(%rip), %rsi     # 0x68da0
movl $0x2b, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq 0x45d4c(%rip), %rbx     # 0x68600
movq %rbx, %rdi
callq 0x19a00
leaq 0x31018(%rip), %rdi     # 0x538db
leaq 0x160(%rsp), %rsi
callq *0x128(%rbx)
leaq 0x3100e(%rip), %rsi     # 0x538e6
movq %rbx, %rdi
callq 0x19580
addq $0x560, %rsp            # imm = 0x560
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rcx
xorl %ebp, %ebp
testl %esi, %esi
setne %bpl
leaq 0x30fe9(%rip), %rdx     # 0x538f3
xorl %r14d, %r14d
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x200, %esi            # imm = 0x200
xorl %eax, %eax
callq 0x18e10
movq 0x45cda(%rip), %rax     # 0x68600
movq %rbx, %rdi
callq *0x150(%rax)
movq 0x4646a(%rip), %rax     # 0x68da0
movq $0x0, 0xd0(%rax)
movl %r14d, 0xd8(%rax)
movl %r14d, 0xc8(%rax)
xorl %eax, %eax
callq 0x18f70
xorl %eax, %eax
callq 0x180d0
addl %ebp, %ebp
movq 0x45e72(%rip), %rax     # 0x687d8
movl %ebp, (%rax)
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_skins.c
// Function: SkinValid
qboolean
SkinValid(edict_t *ent, char *input)
{
	int teamnum, i;
	qboolean	valid = false;
	char	skin[MAX_INFO_STRING] = { 0 };
	char	model[MAX_INFO_STRING] = { 0 };

	if (!ent->client)
		return false;

	if (!input)
		return false;

	// Parse our input skin and model
	if (sscanf(input, "%[^/]/%s", model, skin) != 2)
		return false; // Doesn't contain skin and model

	if (ent->client->ctf.teamnum == CTF_TEAM_RED)
		teamnum = SKIN_RED;
	else 
		teamnum = SKIN_BLUE;

	i = 0;
	while(skinlist[teamnum][i][SKIN_MODELNAME])
	{
		if (!strcmp(skinlist[teamnum][i][SKIN_SKINNAME], skin) &&
			!strcmp(skinlist[teamnum][i][SKIN_MODELNAME], model))
		{
			valid = true;
			break;
		}
		i++;
	}
	return valid;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rsi, %r15
movq %rdi, %r14
leaq 0x200(%rsp), %rdi
xorl %ebx, %ebx
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x18880
movq %rsp, %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x18880
testq %r15, %r15
je 0x22f18
cmpq $0x0, 0x58(%r14)
je 0x22f18
leaq 0x30aca(%rip), %rsi     # 0x53958
xorl %ebx, %ebx
movq %rsp, %rdx
leaq 0x200(%rsp), %rcx
movq %r15, %rdi
xorl %eax, %eax
callq 0x18fe0
cmpl $0x2, %eax
jne 0x22f18
movq 0x58(%r14), %rcx
xorl %eax, %eax
cmpl $0x1, 0x1100(%rcx)
setne %al
movl %eax, %edx
shll $0xc, %edx
movq 0x456b2(%rip), %rcx     # 0x68578
movq (%rcx,%rdx), %r14
testq %r14, %r14
je 0x22f18
shll $0xc, %eax
leaq (%rax,%rcx), %r13
addq $0x10, %r13
leaq 0x200(%rsp), %r15
movq %rsp, %r12
movq -0x8(%r13), %rdi
movq %r15, %rsi
callq 0x18b20
testl %eax, %eax
jne 0x22f04
movq %r14, %rdi
movq %r12, %rsi
callq 0x18b20
testl %eax, %eax
je 0x22f13
movq (%r13), %r14
addq $0x10, %r13
testq %r14, %r14
jne 0x22ee5
jmp 0x22f18
movl $0x1, %ebx
movl %ebx, %eax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_skins.c
// Function: SkinRandom
char *SkinRandom(edict_t *ent)
{
	int teamnum,i;
	static	char skin[MAX_INFO_STRING]; // Returned and used as a temp

	if (ent->client->ctf.teamnum == CTF_TEAM_RED)
		teamnum = SKIN_RED;
	else 
		teamnum = SKIN_BLUE;

	i = 0;
	while (skinlist[teamnum][i][SKIN_MODELNAME])
	{
		i++;
	}

	i = rand() % i;

	sprintf(skin, "%s/%s", skinlist[teamnum][i][SKIN_MODELNAME],
		skinlist[teamnum][i][SKIN_SKINNAME]);

	return skin;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq 0x58(%rdi), %rax
xorl %ebx, %ebx
cmpl $0x1, 0x1100(%rax)
setne %bl
movl %ebx, %eax
shll $0xc, %eax
addq 0x45624(%rip), %rax     # 0x68578
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
incl %ebp
cmpq $0x0, (%rax)
leaq 0x10(%rax), %rax
jne 0x22f59
callq 0x19a10
cltd
idivl %ebp
movslq %edx, %rax
shlq $0x4, %rax
shll $0xc, %ebx
addq 0x455fa(%rip), %rbx     # 0x68578
movq (%rax,%rbx), %rdx
movq 0x8(%rax,%rbx), %rcx
leaq 0x4d0b2(%rip), %rbx     # 0x70040
leaq 0x309f5(%rip), %rsi     # 0x5398a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x196f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_skins.c
// Function: SkinGetList
char **SkinGetList(edict_t *ent)
{
	int teamnum, i;
	static	char *skins[SKIN_MAXSKINS]; // Returned and used as a temp
	static  char storage[SKIN_MAXSKINS][30];
	
	if (ent->client->ctf.teamnum == CTF_TEAM_RED)
		teamnum = SKIN_RED;
	else 
		teamnum = SKIN_BLUE;

	i = 0;
	while (skinlist[teamnum][i][SKIN_MODELNAME])
	{
		sprintf(storage[i], "%s/%s", skinlist[teamnum][i][SKIN_MODELNAME],
			skinlist[teamnum][i][SKIN_SKINNAME]);
		skins[i] = storage[i];		
		i++;
	}
	skins[i] = NULL;

	return skins;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x58(%rdi), %rcx
xorl %eax, %eax
cmpl $0x1, 0x1100(%rcx)
setne %al
movl %eax, %edx
shll $0xc, %edx
movq 0x455a8(%rip), %rcx     # 0x68578
movq (%rcx,%rdx), %rdx
testq %rdx, %rdx
je 0x2302b
shll $0xc, %eax
leaq (%rax,%rcx), %r15
addq $0x10, %r15
leaq 0x4da55(%rip), %rbx     # 0x70a40
leaq 0x30998(%rip), %r14     # 0x5398a
leaq 0x4d247(%rip), %r13     # 0x70240
xorl %ebp, %ebp
xorl %r12d, %r12d
movq -0x8(%r15,%rbp,2), %rcx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x196f0
movq %rbx, (%rbp,%r13)
incq %r12
movq (%r15,%rbp,2), %rdx
addq $0x1e, %rbx
addq $0x8, %rbp
testq %rdx, %rdx
jne 0x22ffe
jmp 0x2302e
xorl %r12d, %r12d
leaq 0x4d20b(%rip), %rax     # 0x70240
movq $0x0, (%rax,%r12,8)
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_tourney.c
// Function: Match_End
void Match_End(edict_t *ent)
{
    Victory();

    matchstate = MATCH_OVER;
    ent->count = 300; // five minutes
    game.teamslocked = false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x19530
movq 0x45133(%rip), %rax     # 0x687d8
movl $0x4, (%rax)
movl $0x12c, 0x290(%rbx)     # imm = 0x12C
movq 0x45684(%rip), %rax     # 0x68d40
movl $0x0, 0x624(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_tourney.c
// Function: SetPause
void SetPause(qboolean state)
{
    edict_t *ent;
    char *message;
    int i;

    match_pause = state;

    if (state) {
    	if ((int)autolock->value) {
    		game.teamslocked = false;
    	}
        message = "Game Paused\n";
    } else {
    	if ((int)autolock->value) {
    		game.teamslocked = true;
    	}
        message = "Game Unpaused\n";
    }

    for (i=0 ; i<game.maxclients ; i++) {  // Go through everyone
        ent = g_edicts + 1 + i;            // Select the client entity from the list of ents.
        if (!ent->inuse) {                 // Not in game yet is what I think this means.
            continue;
        }
        gi.centerprintf(ent, message);
    }
    gi.dprintf(message);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x45359(%rip), %rax     # 0x68aa0
movl %edi, (%rax)
testl %edi, %edi
movq 0x455be(%rip), %rax     # 0x68d10
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
leaq 0x30341(%rip), %rcx     # 0x53aa2
leaq 0x3032d(%rip), %rbx     # 0x53a95
cmoveq %rcx, %rbx
testl %eax, %eax
je 0x23784
xorl %eax, %eax
testl %edi, %edi
sete %al
movq 0x455c2(%rip), %rcx     # 0x68d40
movl %eax, 0x624(%rcx)
movq 0x455b5(%rip), %r14     # 0x68d40
movl 0x610(%r14), %eax
testl %eax, %eax
jle 0x237df
movq 0x44dbb(%rip), %r15     # 0x68558
movq (%r15), %rdi
movl $0x4a8, %r12d           # imm = 0x4A8
movq 0x44e53(%rip), %r13     # 0x68600
xorl %ebp, %ebp
cmpl $0x0, 0x60(%rdi,%r12)
je 0x237cd
addq %r12, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq *0x18(%r13)
movq (%r15), %rdi
movl 0x610(%r14), %eax
incq %rbp
movslq %eax, %rcx
addq $0x4a8, %r12            # imm = 0x4A8
cmpq %rcx, %rbp
jl 0x237af
movq 0x44e1a(%rip), %rax     # 0x68600
movq 0x8(%rax), %rcx
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_tourney.c
// Function: KillMatch
void KillMatch()
{
    matchstate = MATCH_NONE;

    if (tourneyclock) {
        tourneyclock->think = G_FreeEdict;
        tourneyclock->nextthink = level.time + 1;
        tourneyclock = NULL;
    }

    if ((int)autolock->value) {
    	game.teamslocked = false;
    }
}

// Assembly:
movq 0x44b1a(%rip), %rax     # 0x687d8
movl $0x0, (%rax)
movq 0x4531d(%rip), %rax     # 0x68fe8
movq (%rax), %rcx
testq %rcx, %rcx
je 0x23d04
movq 0x44756(%rip), %rdx     # 0x68430
movq %rdx, 0x210(%rcx)
movq 0x450b8(%rip), %rdx     # 0x68da0
movss 0x4(%rdx), %xmm0
addss 0x2f233(%rip), %xmm0    # 0x52f28
movss %xmm0, 0x200(%rcx)
movq $0x0, (%rax)
movq 0x45005(%rip), %rax     # 0x68d10
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
testl %eax, %eax
je 0x23d28
movq 0x45022(%rip), %rax     # 0x68d40
movl $0x0, 0x624(%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_tourney.c
// Function: SpawnTourneyClock
void SpawnTourneyClock ()
{
    edict_t    *ent;

    if (!tourneyclock) {
        ent = G_Spawn();
        tourneyclock = ent;
    } else {
        ent = tourneyclock;
    }

    if (matchstate == MATCH_RAILGUN_COUNTDOWN) {
        ent->count = 16;
    } else {
        ent->count = (int)countdown_time->value;
        matchstate = MATCH_COUNTDOWN;
    }

    // game is about to start, lock teams if necessary
    if ((int)autolock->value) {
    	game.teamslocked = true;
    }

    ent->think = Tourney_Think;
    ent->nextthink = level.time + 1;
}

// Assembly:
pushq %rbx
movq 0x45289(%rip), %rbx     # 0x68fe8
movq (%rbx), %rax
testq %rax, %rax
jne 0x23d6f
callq 0x19700
movq %rax, (%rbx)
movq 0x44a62(%rip), %rcx     # 0x687d8
movl $0x10, %edx
cmpl $0x5, (%rcx)
je 0x23d95
movq 0x44b29(%rip), %rdx     # 0x688b0
movq (%rdx), %rdx
cvttss2si 0x20(%rdx), %edx
movl $0x2, (%rcx)
movl %edx, 0x290(%rax)
movq 0x44f6e(%rip), %rcx     # 0x68d10
movq (%rcx), %rcx
cvttss2si 0x20(%rcx), %ecx
testl %ecx, %ecx
je 0x23dbf
movq 0x44f8b(%rip), %rcx     # 0x68d40
movl $0x1, 0x624(%rcx)
movq 0x4513a(%rip), %rcx     # 0x68f00
movq %rcx, 0x210(%rax)
movq 0x44fcc(%rip), %rcx     # 0x68da0
movss 0x4(%rcx), %xmm0
addss 0x2f147(%rip), %xmm0    # 0x52f28
movss %xmm0, 0x200(%rax)
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/plasma.c
// Function: Spawn_Goop
edict_t *
Spawn_Goop
(edict_t *ent, vec3_t start) {
	edict_t *goop = G_Spawn();

	goop->owner=	ent;
	goop->clipmask=	MASK_SHOT;
	goop->solid=	SOLID_BBOX;
	goop->svflags=	SVF_DEADMONSTER;
	
	VectorCopy (start, goop->s.origin);
	goop->classname= "goop";

	//goop->s.effects|=	EF_BLUEHYPERBLASTER | EF_ANIM_ALLFAST;
	//bat to get rid of the blue flag effect
	goop->s.effects|=	EF_IONRIPPER | EF_ANIM_ALLFAST;
	goop->s.renderfx= 	RF_TRANSLUCENT;
	goop->s.modelindex=	gi.modelindex(PLASMA_SPRITE_FLY);
	goop->s.sound= 		gi.soundindex(PLASMA_SOUND_FLYBY);

	return goop;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x19700
movq %rax, %r15
movq %r14, 0x110(%rax)
movabsq $0x600000300000002, %rax # imm = 0x600000300000002
movq %rax, 0x108(%r15)
movl $0x2, 0xc8(%r15)
movss (%rbx), %xmm0
movss %xmm0, 0x4(%r15)
movss 0x4(%rbx), %xmm0
movss %xmm0, 0x8(%r15)
movss 0x8(%rbx), %xmm0
movss %xmm0, 0xc(%r15)
leaq 0x2fa37(%rip), %rax     # 0x53cb7
movq %rax, 0x138(%r15)
orl $0x102000, 0x40(%r15)   # imm = 0x102000
movl $0x20, 0x44(%r15)
movq 0x44362(%rip), %rbx     # 0x68600
leaq 0x2fa17(%rip), %rdi     # 0x53cbc
callq *0x40(%rbx)
movl %eax, 0x28(%r15)
leaq 0x2fa1f(%rip), %rdi     # 0x53cd2
callq *0x48(%rbx)
movl %eax, 0x4c(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/plasma.c
// Function: fire_plasma
void
fire_plasma
(edict_t *ent, vec3_t start, vec3_t dir, int reflect) {
	edict_t *goop= Spawn_Goop(ent, start);

	// give it some thickness for the bounce
	VectorSet (goop->mins, -12,-12,-12);
	VectorSet (goop->maxs, 12,12,12);

	if(reflect)
	{
		fire_plasma_reflect (goop,start,dir);
		//bat
		ent->client->pers.inventory[ent->client->ammo_index] -= (PLASMA_CELLS_PER_SHOT -1);
	}
	else
	{
		fire_plasma_spread (goop,start,dir);
		//bat
		ent->client->pers.inventory[ent->client->ammo_index] -= (PLASMA_CELLS_PER_SHOT - 1);
	}


}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x18870
movaps 0x2f70f(%rip), %xmm0    # 0x53c50
movups %xmm0, 0xcc(%rax)
movsd 0x2f710(%rip), %xmm0    # 0x53c60
movsd %xmm0, 0xdc(%rax)
movq %rax, %rdi
testl %ebp, %ebp
je 0x24569
movq %r14, %rdx
callq 0x193c0
jmp 0x24574
movq %r15, %rsi
movq %r14, %rdx
callq 0x186f0
movq 0x58(%rbx), %rax
movslq 0xe38(%rax), %rcx
addl $-0x9, 0x318(%rax,%rcx,4)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/plasma.c
// Function: Use_PLASMA
void
Use_PLASMA
(edict_t *ent, gitem_t *item)
{
	int		ammo_index;
	gitem_t		*ammo_item;
///////// FIXME /////////
	// if we're already using it, switch modes
	if(item == ent->client->pers.weapon) {
		// see if you have the other weapon
			// if yes, switch
			// else return
// simple hack for demo
		ent->client->plasma_mode = (!ent->client->plasma_mode);

		if(ent->client->plasma_mode)
			gi.cprintf(ent, PRINT_HIGH, "bounce plasma\n");
		else
			gi.cprintf(ent, PRINT_HIGH, "spread plasma\n");

		return;
	}
/////////////////////////

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

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

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

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %rcx
cmpq %rsi, 0x730(%rcx)
je 0x24632
movq %rsi, %r14
movq 0x60(%rsi), %rdi
testq %rdi, %rdi
je 0x24623
movq 0x43f8b(%rip), %rax     # 0x68548
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x24623
jp 0x24623
testb $0x2, 0x68(%r14)
jne 0x24623
callq 0x189e0
movq %rax, %rcx
subq 0x4485b(%rip), %rcx     # 0x68e40
shrq $0x3, %rcx
imull $0xf0f0f0f1, %ecx, %edx # imm = 0xF0F0F0F1
movq 0x58(%rbx), %rcx
movslq %edx, %rdx
movl 0x318(%rcx,%rdx,4), %edx
testl %edx, %edx
je 0x24674
cmpl 0x5c(%r14), %edx
jge 0x24623
movq 0x43ff2(%rip), %rcx     # 0x68600
movq 0x10(%rcx), %r9
movq 0x50(%rax), %rcx
movq 0x50(%r14), %r8
leaq 0x2f6f7(%rip), %rdx     # 0x53d18
jmp 0x2468e
movq %r14, 0xe50(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
cmpl $0x0, 0xf3c(%rcx)
sete %al
movl %eax, 0xf3c(%rcx)
movq 0x43fb5(%rip), %rax     # 0x68600
movq 0x10(%rax), %rcx
je 0x2465a
leaq 0x2f6a2(%rip), %rdx     # 0x53cfa
jmp 0x24661
leaq 0x2f68a(%rip), %rdx     # 0x53ceb
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
movq 0x43f85(%rip), %rcx     # 0x68600
movq 0x10(%rcx), %r9
movq 0x50(%rax), %rcx
movq 0x50(%r14), %r8
leaq 0x2f67b(%rip), %rdx     # 0x53d09
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%r9
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_chase.c
// Function: ChaseNext
void ChaseNext(edict_t *ent)
{
int i;
edict_t *e;
int Chase_Team; //-bat

	if(!ent->client->chase_target)
		return;

	Chase_Team = ent->client->ctf.teamnum;

	i = ent->client->chase_target - g_edicts;
	do 
	{
		i++;
		if (i > maxclients->value)
			i = 1;
		e = g_edicts + i;
		if(!e->inuse)
			continue;

		//bat
		if(((Chase_Team == CTF_TEAM_OBSERVER_RED) && (e->client->ctf.teamnum != CTF_TEAM_RED))
			|| ((Chase_Team == CTF_TEAM_OBSERVER_BLUE) && (e->client->ctf.teamnum != CTF_TEAM_BLUE)))
			continue;


		if (!e->client->resp.spectator)
			break;
	} while (e != ent->client->chase_target);

	ent->client->chase_target = e;
	ent->client->update_chase = true;
}

// Assembly:
movq 0x58(%rdi), %rax
movq 0xf30(%rax), %rcx
testq %rcx, %rcx
je 0x24dbd
movl 0x1100(%rax), %edx
movq 0x43838(%rip), %rsi     # 0x68558
movq (%rsi), %rsi
movq %rcx, %rdi
subq %rsi, %rdi
shrq $0x3, %rdi
imull $0x8ce2cabd, %edi, %edi # imm = 0x8CE2CABD
movq 0x437f6(%rip), %r8      # 0x68530
movq (%r8), %r8
movss 0x20(%r8), %xmm0
movl %edi, %r8d
incl %r8d
xorps %xmm1, %xmm1
cvtsi2ss %r8d, %xmm1
ucomiss %xmm0, %xmm1
movl $0x1, %edi
ja 0x24d5e
movl %r8d, %edi
movslq %edi, %r8
imulq $0x4a8, %r8, %r9        # imm = 0x4A8
leaq (%rsi,%r9), %r8
cmpl $0x0, 0x60(%rsi,%r9)
je 0x24da7
movq 0x58(%r8), %r9
cmpl $-0x2, %edx
je 0x24d9d
cmpl $-0x3, %edx
jne 0x24d8c
cmpl $0x1, 0x1100(%r9)
jne 0x24da7
cmpq %rcx, %r8
je 0x24dac
cmpl $0x0, 0xe04(%r9)
jne 0x24d43
jmp 0x24dac
cmpl $0x2, 0x1100(%r9)
je 0x24d8c
cmpq %rcx, %r8
jne 0x24d43
movq %r8, 0xf30(%rax)
movl $0x1, 0xf38(%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_chase.c
// Function: GetChaseTarget
void GetChaseTarget(edict_t *ent)
{
int i;
edict_t *other;
int Chase_Team; //-bat

	Chase_Team = ent->client->ctf.teamnum;

	for(i = 1; i <= maxclients->value; i++) 
	{
		//other is the guy we are chasing
		other = g_edicts + i;

		//-bat
		if(((Chase_Team == CTF_TEAM_OBSERVER_RED) && (other->client->ctf.teamnum != CTF_TEAM_RED))
			|| ((Chase_Team == CTF_TEAM_OBSERVER_BLUE) && (other->client->ctf.teamnum != CTF_TEAM_BLUE)))
			continue;

		if(other->inuse && !other->client->resp.spectator) 
		{
			ent->client->chase_target = other;
			ent->client->update_chase = true;
			UpdateChaseCam(ent);
			return;
		}
	}

	gi.centerprintf(ent, "No other players to chase.");
}

// Assembly:
movq 0x4366c(%rip), %rax     # 0x68530
movq (%rax), %rax
movss 0x20(%rax), %xmm0
ucomiss 0x2e055(%rip), %xmm0    # 0x52f28
jb 0x24f44
movq 0x58(%rdi), %rax
movl 0x1100(%rax), %ecx
movq 0x43672(%rip), %rsi     # 0x68558
movl $0x4a8, %edx            # imm = 0x4A8
addq (%rsi), %rdx
movl $0x2, %esi
cmpl $-0x2, %ecx
je 0x24f0d
cmpl $-0x3, %ecx
jne 0x24f1b
movq 0x58(%rdx), %r8
cmpl $0x1, 0x1100(%r8)
je 0x24f1b
jmp 0x24f2f
movq 0x58(%rdx), %r8
cmpl $0x2, 0x1100(%r8)
jne 0x24f2f
cmpl $0x0, 0x60(%rdx)
je 0x24f2f
movq 0x58(%rdx), %r8
cmpl $0x0, 0xe04(%r8)
je 0x24f5a
xorps %xmm1, %xmm1
cvtsi2ss %esi, %xmm1
addq $0x4a8, %rdx            # imm = 0x4A8
incl %esi
ucomiss %xmm1, %xmm0
jae 0x24ef3
movq 0x436b5(%rip), %rax     # 0x68600
movq 0x18(%rax), %rcx
leaq 0x2ee45(%rip), %rsi     # 0x53d9b
xorl %eax, %eax
jmpq *%rcx
movq %rdx, 0xf30(%rax)
movl $0x1, 0xf38(%rax)
jmp 0x199c0
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/p_stats.c
// Function: stats_log_reset
void stats_log_reset()
{
	stats_player_s * p_current_player;

	p_current_player = p_start_player;
	while (p_current_player != NULL)
	{
		p_start_player = p_start_player->pNext;
		gi.TagFree(p_current_player);
		p_current_player = p_start_player;
	}

	stats_log_init();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x439ae(%rip), %rbx     # 0x68938
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x24fb2
movq 0x43667(%rip), %r14     # 0x68600
movq 0x280(%rdi), %rax
movq %rax, (%rbx)
callq *0x110(%r14)
movq (%rbx), %rdi
testq %rdi, %rdi
jne 0x24f99
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/p_stats.c
// Function: stats_find_dropped_player
stats_player_s* stats_find_dropped_player(char* name)
{
	stats_player_s *p_current_player = p_start_player;
	
	while (p_current_player != NULL)
	{
		if ((strcmp(p_current_player->info.name, name) == 0) &&
			p_current_player->dropped)
			break;
		else
			p_current_player = p_current_player->pNext;
	}

	return p_current_player;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x4396c(%rip), %rax     # 0x68938
movq (%rax), %rbx
testq %rbx, %rbx
je 0x24ff8
movq %rdi, %r14
leaq 0x4(%rbx), %rdi
movq %r14, %rsi
callq 0x18b20
testl %eax, %eax
jne 0x24fec
cmpl $0x0, (%rbx)
jne 0x24ffa
movq 0x280(%rbx), %rbx
testq %rbx, %rbx
jne 0x24fd7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/p_stats.c
// Function: stats_new_player
stats_player_s* stats_new_player(char* name)
{
	stats_player_s* p_player;
	
	p_player = (stats_player_s *) gi.TagMalloc(sizeof(stats_player_s), TAG_GAME);
	if (!p_player) {
		gi.error(ERR_FATAL, "LMCTF: allocation failed in %s", __func__);
		return NULL;
	}

	stats_init_player(p_player);
	p_player->dropped = false;
	p_player->info.teamnum = CTF_TEAM_UNDEFINED;
	strcpy(p_player->info.name, name);

	//attach the player to the front of the list
	p_player->pNext = p_start_player;
	p_start_player = p_player;

	return p_player;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x435ac(%rip), %r15     # 0x68600
movl $0x288, %edi            # imm = 0x288
movl $0x2fd, %esi            # imm = 0x2FD
callq *0x108(%r15)
movq %rax, %rbx
testq %rax, %rax
je 0x250d3
movl $0x0, (%rbx)
movq %rbx, %rdi
addq $0x4, %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x204(%rbx)
movups %xmm0, 0x214(%rbx)
movups %xmm0, 0x224(%rbx)
movups %xmm0, 0x234(%rbx)
movups %xmm0, 0x244(%rbx)
movups %xmm0, 0x254(%rbx)
movups %xmm0, 0x264(%rbx)
movups %xmm0, 0x270(%rbx)
movq %r14, %rsi
callq 0x182a0
movq 0x43874(%rip), %rax     # 0x68938
movq (%rax), %rcx
movq %rcx, 0x280(%rbx)
movq %rbx, (%rax)
jmp 0x250e9
leaq 0x2ecdc(%rip), %rsi     # 0x53db6
leaq 0x2ecf4(%rip), %rdx     # 0x53dd5
xorl %edi, %edi
xorl %eax, %eax
callq *0x38(%r15)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/p_stats.c
// Function: stats_cleanup
void stats_cleanup()
{
	stats_player_s *p_current_player, *p_prev_player;

	// clear out dropped players from start and
	// adjust start if needed
	p_current_player = p_start_player;
	while ( p_current_player && (p_current_player->dropped))
	{
		p_start_player = p_current_player->pNext;
		gi.TagFree(p_current_player);
		p_current_player = p_start_player;

	}

	// case when everyone is gone
	if (p_start_player == NULL)
	{
		return;
	}

	stats_init_player(p_start_player);

	// clear out dropped players and reinitialize stats
	p_current_player = p_start_player->pNext; // When the start is valid
	p_prev_player = p_start_player;

	while (p_current_player)
	{
		if (p_current_player->dropped)
		{
			p_prev_player->pNext = p_current_player->pNext;
			gi.TagFree(p_current_player);
		}
		else
		{
			stats_init_player(p_current_player);
			p_prev_player = p_current_player;
		}
		p_current_player = p_prev_player->pNext;

	}
	
	if (p_current_player)
		p_current_player->pNext = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x43820(%rip), %r15     # 0x68938
movq (%r15), %rbx
testq %rbx, %rbx
je 0x25210
movq 0x434d5(%rip), %r14     # 0x68600
cmpl $0x0, (%rbx)
je 0x25151
movq 0x280(%rbx), %rax
movq %rax, (%r15)
movq %rbx, %rdi
callq *0x110(%r14)
movq (%r15), %rbx
testq %rbx, %rbx
jne 0x2512b
jmp 0x25210
xorps %xmm0, %xmm0
movups %xmm0, 0x268(%rbx)
movups %xmm0, 0x258(%rbx)
movups %xmm0, 0x248(%rbx)
movups %xmm0, 0x238(%rbx)
movups %xmm0, 0x228(%rbx)
movups %xmm0, 0x218(%rbx)
movups %xmm0, 0x208(%rbx)
movq $0x0, 0x278(%rbx)
movq 0x280(%rbx), %rdi
testq %rdi, %rdi
je 0x25210
leaq 0x280(%rbx), %rax
cmpl $0x0, (%rdi)
je 0x251bb
movq 0x280(%rdi), %rcx
movq %rcx, (%rax)
callq *0x110(%r14)
jmp 0x251fd
xorps %xmm0, %xmm0
movups %xmm0, 0x268(%rdi)
movups %xmm0, 0x258(%rdi)
movups %xmm0, 0x248(%rdi)
movups %xmm0, 0x238(%rdi)
movups %xmm0, 0x228(%rdi)
movups %xmm0, 0x218(%rdi)
movups %xmm0, 0x208(%rdi)
movq $0x0, 0x278(%rdi)
movq %rdi, %rbx
leaq 0x280(%rbx), %rax
movq 0x280(%rbx), %rdi
testq %rdi, %rdi
jne 0x251a3
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/p_stats.c
// Function: Cmd_PlayerStats_f
void Cmd_PlayerStats_f (edict_t *ent)
{
	edict_t *temp, *target;
	stats_player_s *p_player;
	int i;
	char *p;
	char lowerstr[MAX_INFO_STRING];

	p = gi.args();

	if (p && strlen(p))
	{
		LowerCase(p);
		target = NULL;
		for (i=0 ; i<game.maxclients ; i++)
		{
			temp = g_edicts + 1 + i;
			strcpy(lowerstr, temp->client->pers.netname);
			LowerCase(lowerstr);
			if (strstr(lowerstr, p))
			{
				target = temp;
				break;
			}
		}
	}
	else
		target = ent;

	if (!target)
	{
		ctf_SafePrint(ent, PRINT_HIGH, "Cannot find a matching player.\n");
		return;
	}

	p_player = target->client->p_stats_player;
	stats_output(ent, p_player);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdi, %r15
movq 0x43118(%rip), %rax     # 0x68600
callq *0x148(%rax)
testq %rax, %rax
movq %r15, 0x8(%rsp)
je 0x25580
movq %rax, %r14
cmpb $0x0, (%rax)
je 0x25580
movq %r14, %rdi
callq 0x18d00
movq 0x4382d(%rip), %rax     # 0x68d40
cmpl $0x0, 0x610(%rax)
jle 0x25588
movl $0x4a8, %r13d           # imm = 0x4A8
xorl %ebp, %ebp
movl $0x2c0, %r12d           # imm = 0x2C0
leaq 0x10(%rsp), %r15
movq 0x43022(%rip), %rax     # 0x68558
movq (%rax), %rbx
movq 0x58(%rbx,%r13), %rsi
addq %r12, %rsi
movq %r15, %rdi
callq 0x182a0
movq %r15, %rdi
callq 0x18d00
movq %r15, %rdi
movq %r14, %rsi
callq 0x19980
testq %rax, %rax
jne 0x255a0
incq %rbp
movq 0x437d5(%rip), %rax     # 0x68d40
movslq 0x610(%rax), %rax
addq $0x4a8, %r13            # imm = 0x4A8
cmpq %rax, %rbp
jl 0x2552f
jmp 0x25588
movq %r15, %rbx
testq %r15, %r15
jne 0x255a3
leaq 0x2e934(%rip), %rdx     # 0x53ec3
movl $0x2, %esi
movq 0x8(%rsp), %rdi
callq 0x18da0
jmp 0x255b8
addq %r13, %rbx
movq 0x58(%rbx), %rax
movq 0x9138(%rax), %rsi
movq 0x8(%rsp), %rdi
callq 0x198c0
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/stdlog.c
// Function: sl_MaybeOpenFile
static int _sl_MaybeOpenFile( game_import_t  *gi )
{
    if( NULL == logfile )
        logfile = gi->cvar( "stdlogfile", "0", CVAR_SERVERINFO );

    if( (NULL != logfile) && (logfile->value != 0) )
    {
        if( NULL == StdLogFile )
        {
            cvar_t   *filename  = gi->cvar( "stdlogname", "StdLog.log", CVAR_SERVERINFO );
            char     *pName     = "StdLog.log";

            // Open File
            if( filename )
                pName = filename->string;

            StdLogFile = fopen( pName, "a+t" );

            if( NULL == StdLogFile )
            {
                gi->error( "Couldn't open %s", pName );
            }
        }
    }

    return (NULL != StdLogFile);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x4d278(%rip), %rax     # 0x72888
testq %rax, %rax
jne 0x2563a
leaq 0x2e8c7(%rip), %rdi     # 0x53ee3
leaq 0x35ac9(%rip), %rsi     # 0x5b0ec
movl $0x4, %edx
callq *0x120(%rbx)
movq %rax, 0x4d253(%rip)     # 0x72888
testq %rax, %rax
je 0x256a2
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x25649
jnp 0x256a2
cmpq $0x0, 0x4d23f(%rip)     # 0x72890
jne 0x256a2
leaq 0x2e281(%rip), %rdi     # 0x538db
leaq 0x2e88d(%rip), %r14     # 0x53eee
movq %r14, %rsi
movl $0x4, %edx
callq *0x120(%rbx)
testq %rax, %rax
je 0x25678
movq 0x8(%rax), %r14
leaq 0x2e87a(%rip), %rsi     # 0x53ef9
movq %r14, %rdi
callq 0x19470
movq %rax, 0x4d202(%rip)     # 0x72890
testq %rax, %rax
jne 0x256a2
leaq 0x2e863(%rip), %rdi     # 0x53efd
movq %r14, %rsi
xorl %eax, %eax
callq *0x38(%rbx)
xorl %eax, %eax
cmpq $0x0, 0x4d1e4(%rip)     # 0x72890
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/stdlog.c
// Function: sl_CloseLogFile
static void _sl_MaybeCloseFile( void )
{
    if( logfile && StdLogFile) // LM_JORM -- was "if ( NULL != logfile)"
    {
        fclose( StdLogFile );
    }

    StdLogFile = NULL;
    logfile    = NULL;
    logstyle   = NULL;
    uiLogstyle  = 0;
}

// Assembly:
cmpq $0x0, 0x4d1c9(%rip)     # 0x72888
setne %al
movq 0x4d1c7(%rip), %rdi     # 0x72890
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x256e0
pushq %rax
callq 0x185a0
addq $0x8, %rsp
xorl %eax, %eax
movq %rax, 0x4d1a7(%rip)     # 0x72890
movq %rax, 0x4d198(%rip)     # 0x72888
movq %rax, 0x4d1a1(%rip)     # 0x72898
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/stdlog.c
// Function: sl_LogScore
void sl_LogScore( game_import_t  *gi,
                  char           *pKillerName,
                  char           *pTargetName,
                  char           *pScoreType,
                  char           *pWeaponName,
                  int             iScore,
                  float           timeInSeconds )
{
    if (!Match_CanScore())
        return;

    if( _sl_MaybeOpenFile( gi ) )
    {
        _sl_SetStyle( gi );
        _sl_LogStyles[uiLogstyle].pLogScore( pKillerName, pTargetName, pScoreType, pWeaponName, iScore, timeInSeconds );
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movss %xmm0, 0x4(%rsp)
movl %r9d, %ebx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
xorl %eax, %eax
callq 0x19000
testl %eax, %eax
je 0x259e8
movq %rbp, %rdi
callq 0x25602
testl %eax, %eax
je 0x259e8
cmpq $0x0, 0x4cefa(%rip)     # 0x72898
jne 0x259c0
leaq 0x2e567(%rip), %rdi     # 0x53f0e
leaq 0x3573e(%rip), %rsi     # 0x5b0ec
movl $0x4, %edx
callq *0x120(%rbp)
movq %rax, 0x4ced8(%rip)     # 0x72898
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
movss 0x4(%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x25de5
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/stdlog.c
// Function: sl_LogDate
static void _sl_LogDate( void )
{
    time_t t;

    /* Get the time */
    t = time(NULL);
    if( -1 != t )
    {
        struct tm  *ptm;

        ptm = localtime( &t );
        if( NULL != ptm )
        {
            char        date[MAX_DATE_STRLEN+1] = {0};

            strftime( &date[0],
                      (sizeof(date)/sizeof(date[0]))-1,
                      "%d %b %Y",
                      ptm );

            fprintf( StdLogFile, "\t\tLogDate\t%s\n", &date[0] );
        }
    }
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
xorl %edi, %edi
callq 0x18df0
movq %rax, 0x8(%rsp)
cmpq $-0x1, %rax
je 0x25d40
leaq 0x8(%rsp), %rdi
callq 0x18180
testq %rax, %rax
je 0x25d40
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, (%rbx)
movq $0x0, 0xe(%rbx)
leaq 0x2e22e(%rip), %rdx     # 0x53f46
movl $0x15, %esi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x192d0
movq 0x4cb61(%rip), %rdi     # 0x72890
leaq 0x2e219(%rip), %rsi     # 0x53f4f
movq %rbx, %rdx
xorl %eax, %eax
callq 0x18bf0
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/stdlog.c
// Function: sl_LogTime
static void _sl_LogTime( void )
{
    time_t t;

    /* Get the time */
    t = time(NULL);
    if( -1 != t )
    {
        struct tm  *ptm;

        ptm = localtime( &t );
        if( NULL != ptm )
        {
            char        time[MAX_TIME_STRLEN+1] = {0};

            strftime( &time[0],
                      (sizeof(time)/sizeof(time[0]))-1,
                      "%H:%M:%S",
                      ptm );

            fprintf( StdLogFile, "\t\tLogTime\t%s\n", &time[0] );
        }
    }
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
xorl %edi, %edi
callq 0x18df0
movq %rax, 0x8(%rsp)
cmpq $-0x1, %rax
je 0x25dad
leaq 0x8(%rsp), %rdi
callq 0x18180
testq %rax, %rax
je 0x25dad
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, (%rbx)
movl $0x0, 0xf(%rbx)
leaq 0x2e1d8(%rip), %rdx     # 0x53f5d
movl $0x12, %esi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x192d0
movq 0x4caf4(%rip), %rdi     # 0x72890
leaq 0x2e1c3(%rip), %rsi     # 0x53f66
movq %rbx, %rdx
xorl %eax, %eax
callq 0x18bf0
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/stdlog.c
// Function: sl_LogScore
static void _sl_LogScore( char *pKillerName,
                          char *pTargetName,
                          char *pScoreType,
                          char *pWeaponName,
                          int   iScore,
                          float timeInSeconds )
{
    /* Killer Name */
    if( NULL != pKillerName )
        fprintf( StdLogFile, "%s", pKillerName );
    fprintf( StdLogFile, "\t" );

    /* Target Name */
    if( NULL != pTargetName )
        fprintf( StdLogFile, "%s", pTargetName );
    fprintf( StdLogFile, "\t" );

    /* Score Type */
    if( NULL != pScoreType )
        fprintf( StdLogFile, "%s", pScoreType );
    fprintf( StdLogFile, "\t" );

    /* Weapon Name */
    if( NULL != pWeaponName )
        fprintf( StdLogFile, "%s", pWeaponName );
    fprintf( StdLogFile, "\t" );

    /* Score & Time */
    fprintf( StdLogFile, "%d\t%.1f\n", iScore, timeInSeconds );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movss %xmm0, 0x4(%rsp)
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
testq %rdi, %rdi
je 0x25e10
movq 0x4ca85(%rip), %rsi     # 0x72890
callq 0x187f0
movq 0x4ca79(%rip), %rsi     # 0x72890
movl $0x9, %edi
callq 0x189a0
testq %r12, %r12
je 0x25e35
movq 0x4ca63(%rip), %rsi     # 0x72890
movq %r12, %rdi
callq 0x187f0
movq 0x4ca54(%rip), %rsi     # 0x72890
movl $0x9, %edi
callq 0x189a0
testq %r15, %r15
je 0x25e5a
movq 0x4ca3e(%rip), %rsi     # 0x72890
movq %r15, %rdi
callq 0x187f0
movq 0x4ca2f(%rip), %rsi     # 0x72890
movl $0x9, %edi
callq 0x189a0
testq %r14, %r14
je 0x25e7f
movq 0x4ca19(%rip), %rsi     # 0x72890
movq %r14, %rdi
callq 0x187f0
movq 0x4ca0a(%rip), %rsi     # 0x72890
movl $0x9, %edi
callq 0x189a0
movq 0x4c9f9(%rip), %rdi     # 0x72890
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rsp), %xmm0
leaq 0x2e114(%rip), %rsi     # 0x53fbb
movl %ebx, %edx
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x18bf0
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/gslog.c
// Function: sl_Logging
int sl_Logging( game_import_t  *gi,
                char           *pPatchName )
{
    int fFileOpen = sl_OpenLogFile( gi );

    if( fFileOpen && !fWasAlreadyOpen )
    {
        cvar_t *deathflags = gi->cvar( "dmflags", "0", CVAR_SERVERINFO );

        sl_LogVers( gi );
        
        pPatch = pPatchName;
        sl_LogPatch( gi, pPatchName );

        sl_LogDate( gi );
        sl_LogTime( gi );
        sl_LogDeathFlags( gi, (unsigned long)deathflags->value );

        fWasAlreadyOpen = fFileOpen;
    }

    return fFileOpen;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
callq 0x18060
movl %eax, %ebx
testl %eax, %eax
je 0x25fc1
cmpl $0x0, 0x4c95c(%rip)     # 0x728a0
jne 0x25fc1
leaq 0x2c5ca(%rip), %rdi     # 0x52517
leaq 0x35198(%rip), %rsi     # 0x5b0ec
movl $0x4, %edx
callq *0x120(%r14)
movq %rax, %r12
movq %r14, %rdi
callq 0x196c0
movq %r15, 0x4c936(%rip)     # 0x728a8
movq %r14, %rdi
movq %r15, %rsi
callq 0x18340
movq %r14, %rdi
callq 0x18240
movq %r14, %rdi
callq 0x18f30
movss 0x20(%r12), %xmm0
cvttss2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subss 0x2e0e8(%rip), %xmm0    # 0x54090
cvttss2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
movq %r14, %rdi
callq 0x19920
movl %ebx, 0x4c8df(%rip)     # 0x728a0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/gslog.c
// Function: sl_GameEnd
void sl_GameEnd( game_import_t      *gi,
                 level_locals_t      level )
{
    if( sl_Logging( gi, pPatch ) )
    {
        sl_LogGameEnd( gi, level.time );
        sl_CloseLogFile();

        fWasAlreadyOpen = 0;
    }   
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x4c890(%rip), %rsi     # 0x728a8
callq 0x19580
testl %eax, %eax
je 0x26042
leaq 0x10(%rsp), %rax
movss 0x4(%rax), %xmm0
movq %rbx, %rdi
callq 0x18dc0
callq 0x184a0
movl $0x0, 0x4c85e(%rip)     # 0x728a0
popq %rbx
retq