LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x24f09
movl 0x1100(%rax), %edx
movq 0x446f9(%rip), %rsi     # 0x69558
movq (%rsi), %rsi
movq %rcx, %rdi
subq %rsi, %rdi
shrq $0x3, %rdi
imull $0x8ce2cabd, %edi, %edi # imm = 0x8CE2CABD
movq 0x446b7(%rip), %r8      # 0x69530
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 0x24e9d
movl %r8d, %edi
movslq %edi, %r8
imulq $0x4a8, %r8, %r9        # imm = 0x4A8
leaq (%rsi,%r9), %r8
cmpl $0x0, 0x60(%rsi,%r9)
je 0x24ef3
cmpl $-0x2, %edx
je 0x24ed0
cmpl $-0x3, %edx
jne 0x24ede
movq 0x58(%r8), %r9
cmpl $0x1, 0x1100(%r9)
jne 0x24ef3
cmpl $-0x2, %edx
jne 0x24ede
movq 0x58(%r8), %r9
cmpl $0x2, 0x1100(%r9)
jne 0x24ef3
cmpq %rcx, %r8
je 0x24ef8
movq 0x58(%r8), %r9
cmpl $0x0, 0xe04(%r9)
jne 0x24e82
jmp 0x24ef8
cmpq %rcx, %r8
jne 0x24e82
movq %r8, 0xf30(%rax)
movl $0x1, 0xf38(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_chase.c
// Function: ChasePrev
void ChasePrev(edict_t *ent)
{
int i;
edict_t *e;
int Chase_Team; //-bat
int Team_Observe_OK;

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

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

	if(Chase_Team == CTF_TEAM_OBSERVER_RED || Chase_Team == CTF_TEAM_OBSERVER_BLUE)
		Team_Observe_OK = false;
	else
		Team_Observe_OK = true;

	i = ent->client->chase_target - g_edicts;
	do 
	{
		i--;
		if(i < 1)
			i = maxclients->value;
		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)
		{
			Team_Observe_OK = true;
			break;
		}
	} while (e != ent->client->chase_target);

	if(Team_Observe_OK)
	{
		ent->client->chase_target = e;
		ent->client->update_chase = true;
	}
}

// Assembly:
movq 0x58(%rdi), %rax
movq 0xf30(%rax), %rcx
testq %rcx, %rcx
je 0x24fd5
movl 0x1100(%rax), %esi
leal 0x1(%rsi), %edi
xorl %edx, %edx
cmpl $-0x2, %edi
setb %dl
movq 0x44622(%rip), %rdi     # 0x69558
movq (%rdi), %rdi
movq %rcx, %r8
subq %rdi, %r8
shrq $0x3, %r8
imull $0x8ce2cabd, %r8d, %r8d # imm = 0x8CE2CABD
movq 0x445df(%rip), %r9      # 0x69530
movq (%r9), %r9
cmpl $0x1, %r8d
jg 0x24f62
cvttss2si 0x20(%r9), %r8d
jmp 0x24f65
decl %r8d
movslq %r8d, %r10
imulq $0x4a8, %r10, %r11      # imm = 0x4A8
leaq (%rdi,%r11), %r10
cmpl $0x0, 0x60(%rdi,%r11)
je 0x24fb4
cmpl $-0x2, %esi
je 0x24f98
cmpl $-0x3, %esi
jne 0x24fa6
movq 0x58(%r10), %r11
cmpl $0x1, 0x1100(%r11)
jne 0x24fb4
cmpl $-0x2, %esi
jne 0x24fa6
movq 0x58(%r10), %r11
cmpl $0x2, 0x1100(%r11)
jne 0x24fb4
movq 0x58(%r10), %r11
cmpl $0x0, 0xe04(%r11)
je 0x24fbb
cmpq %rcx, %r10
jne 0x24f54
jmp 0x24fc0
movl $0x1, %edx
testl %edx, %edx
je 0x24fd5
movq %r10, 0xf30(%rax)
movl $0x1, 0xf38(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x44507(%rip), %rax     # 0x69530
movq (%rax), %rax
movss 0x20(%rax), %xmm0
ucomiss 0x2eef0(%rip), %xmm0    # 0x53f28
jb 0x250ac
movq 0x58(%rdi), %rax
movl 0x1100(%rax), %ecx
movq 0x4450d(%rip), %rsi     # 0x69558
movl $0x4a8, %edx            # imm = 0x4A8
addq (%rsi), %rdx
movl $0x2, %esi
cmpl $-0x2, %ecx
je 0x25075
cmpl $-0x3, %ecx
jne 0x25083
movq 0x58(%rdx), %r8
cmpl $0x1, 0x1100(%r8)
jne 0x25097
cmpl $-0x2, %ecx
jne 0x25083
movq 0x58(%rdx), %r8
cmpl $0x2, 0x1100(%r8)
jne 0x25097
cmpl $0x0, 0x60(%rdx)
je 0x25097
movq 0x58(%rdx), %r8
cmpl $0x0, 0xe04(%r8)
je 0x250c2
xorps %xmm1, %xmm1
cvtsi2ss %esi, %xmm1
addq $0x4a8, %rdx            # imm = 0x4A8
incl %esi
ucomiss %xmm1, %xmm0
jae 0x25058
movq 0x4454d(%rip), %rax     # 0x69600
movq 0x18(%rax), %rcx
leaq 0x2fc9d(%rip), %rsi     # 0x54d5b
xorl %eax, %eax
jmpq *%rcx
movq %rdx, 0xf30(%rax)
movl $0x1, 0xf38(%rax)
jmp 0x199d0
// File: /workspace/github_c_makefile_star2_O1/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 0x44846(%rip), %rbx     # 0x69938
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2511a
movq 0x444ff(%rip), %r14     # 0x69600
movq 0x280(%rdi), %rax
movq %rax, (%rbx)
callq *0x110(%r14)
movq (%rbx), %rdi
testq %rdi, %rdi
jne 0x25101
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x44804(%rip), %rax     # 0x69938
movq (%rax), %rbx
testq %rbx, %rbx
je 0x25160
movq %rdi, %r14
leaq 0x4(%rbx), %rdi
movq %r14, %rsi
callq 0x18b20
testl %eax, %eax
jne 0x25154
cmpl $0x0, (%rbx)
jne 0x25160
movq 0x280(%rbx), %rbx
testq %rbx, %rbx
jne 0x2513f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x44446(%rip), %r15     # 0x69600
movl $0x288, %edi            # imm = 0x288
movl $0x2fd, %esi            # imm = 0x2FD
callq *0x108(%r15)
testq %rax, %rax
je 0x25239
movq %rax, %rbx
movl $0x0, (%rax)
movq %rax, %rdi
addq $0x4, %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x204(%rax)
movups %xmm0, 0x214(%rax)
movups %xmm0, 0x224(%rax)
movups %xmm0, 0x234(%rax)
movups %xmm0, 0x244(%rax)
movups %xmm0, 0x254(%rax)
movups %xmm0, 0x264(%rax)
movups %xmm0, 0x270(%rax)
movq %r14, %rsi
callq 0x182a0
movq 0x4470e(%rip), %rax     # 0x69938
movq (%rax), %rcx
movq %rcx, 0x280(%rbx)
movq %rbx, (%rax)
jmp 0x25251
leaq 0x2fb36(%rip), %rsi     # 0x54d76
leaq 0x2fb4e(%rip), %rdx     # 0x54d95
xorl %ebx, %ebx
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_O1/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 0x446b8(%rip), %r14     # 0x69938
movq (%r14), %rbx
testq %rbx, %rbx
sete %al
je 0x25391
cmpl $0x0, (%rbx)
je 0x252c3
movq 0x44365(%rip), %r15     # 0x69600
movq 0x280(%rbx), %rax
movq %rax, (%r14)
movq %rbx, %rdi
callq *0x110(%r15)
movq (%r14), %rbx
testq %rbx, %rbx
sete %al
je 0x25391
cmpl $0x0, (%rbx)
jne 0x2529b
testb %al, %al
jne 0x25391
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 0x25391
leaq 0x280(%rbx), %rax
movq 0x442dc(%rip), %r14     # 0x69600
cmpl $0x0, (%rdi)
je 0x2533c
movq 0x280(%rdi), %rcx
movq %rcx, (%rax)
callq *0x110(%r14)
jmp 0x2537e
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 0x25324
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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, %rbx
movq 0x43f97(%rip), %rax     # 0x69600
callq *0x148(%rax)
movq %rbx, %r13
testq %rax, %rax
je 0x2571c
movq %rax, %r14
cmpb $0x0, (%rax)
movq %rbx, %r13
je 0x2571c
movq %r14, %rdi
callq 0x18d00
movq 0x446a7(%rip), %rax     # 0x69d40
cmpl $0x0, 0x610(%rax)
jle 0x2570c
movq %rbx, 0x8(%rsp)
movl $0x4a8, %ebp            # imm = 0x4A8
xorl %r13d, %r13d
leaq 0x10(%rsp), %r15
xorl %ebx, %ebx
movq 0x43e9b(%rip), %rax     # 0x69558
movq (%rax), %r12
movq 0x58(%r12,%rbp), %rsi
movl $0x2c0, %eax            # imm = 0x2C0
addq %rax, %rsi
movq %r15, %rdi
callq 0x182a0
movq %r15, %rdi
callq 0x18d00
movq %r15, %rdi
movq %r14, %rsi
callq 0x19990
testq %rax, %rax
jne 0x25711
incq %rbx
movq 0x44649(%rip), %rax     # 0x69d40
movslq 0x610(%rax), %rax
addq $0x4a8, %rbp            # imm = 0x4A8
cmpq %rax, %rbx
jl 0x256b6
jmp 0x25717
xorl %r13d, %r13d
jmp 0x2571c
addq %rbp, %r12
movq %r12, %r13
movq 0x8(%rsp), %rbx
testq %r13, %r13
je 0x25736
movq 0x58(%r13), %rax
movq 0x9138(%rax), %rsi
movq %rbx, %rdi
callq 0x198d0
jmp 0x2574a
leaq 0x2f746(%rip), %rdx     # 0x54e83
movl $0x2, %esi
movq %rbx, %rdi
callq 0x18da0
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
cmpq $0x0, 0x4e0e3(%rip)     # 0x73888
jne 0x257c7
leaq 0x2f6f5(%rip), %rdi     # 0x54ea3
leaq 0x365c7(%rip), %rsi     # 0x5bd7c
movl $0x4, %edx
callq *0x120(%rbx)
movq %rax, 0x4e0c1(%rip)     # 0x73888
movq 0x4e0ba(%rip), %rax     # 0x73888
testq %rax, %rax
je 0x2583b
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x257e2
jnp 0x2583b
cmpq $0x0, 0x4e0a6(%rip)     # 0x73890
jne 0x2583b
leaq 0x2f0b8(%rip), %rdi     # 0x548ab
leaq 0x2f6b4(%rip), %r14     # 0x54eae
movq %r14, %rsi
movl $0x4, %edx
callq *0x120(%rbx)
testq %rax, %rax
je 0x25811
movq 0x8(%rax), %r14
leaq 0x2f6a1(%rip), %rsi     # 0x54eb9
movq %r14, %rdi
callq 0x19470
movq %rax, 0x4e069(%rip)     # 0x73890
testq %rax, %rax
jne 0x2583b
leaq 0x2f68a(%rip), %rdi     # 0x54ebd
movq %r14, %rsi
xorl %eax, %eax
callq *0x38(%rbx)
xorl %eax, %eax
cmpq $0x0, 0x4e04b(%rip)     # 0x73890
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x4e030(%rip)     # 0x73888
setne %al
movq 0x4e02e(%rip), %rdi     # 0x73890
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x25879
pushq %rax
callq 0x185a0
addq $0x8, %rsp
xorl %eax, %eax
movq %rax, 0x4e00e(%rip)     # 0x73890
movq %rax, 0x4dfff(%rip)     # 0x73888
movq %rax, 0x4e008(%rip)     # 0x73898
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x25b81
movq %rbp, %rdi
callq 0x25796
testl %eax, %eax
je 0x25b81
cmpq $0x0, 0x4dd61(%rip)     # 0x73898
jne 0x25b59
leaq 0x2f38e(%rip), %rdi     # 0x54ece
leaq 0x36235(%rip), %rsi     # 0x5bd7c
movl $0x4, %edx
callq *0x120(%rbp)
movq %rax, 0x4dd3f(%rip)     # 0x73898
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 0x25f7e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/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 0x25ed9
leaq 0x8(%rsp), %rdi
callq 0x18180
testq %rax, %rax
je 0x25ed9
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, (%rbx)
movq $0x0, 0xe(%rbx)
leaq 0x2f055(%rip), %rdx     # 0x54f06
movl $0x15, %esi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x192d0
movq 0x4d9c8(%rip), %rdi     # 0x73890
leaq 0x2f040(%rip), %rsi     # 0x54f0f
movq %rbx, %rdx
xorl %eax, %eax
callq 0x18bf0
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x25f46
leaq 0x8(%rsp), %rdi
callq 0x18180
testq %rax, %rax
je 0x25f46
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, (%rbx)
movl $0x0, 0xf(%rbx)
leaq 0x2efff(%rip), %rdx     # 0x54f1d
movl $0x12, %esi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x192d0
movq 0x4d95b(%rip), %rdi     # 0x73890
leaq 0x2efea(%rip), %rsi     # 0x54f26
movq %rbx, %rdx
xorl %eax, %eax
callq 0x18bf0
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x25fa9
movq 0x4d8ec(%rip), %rsi     # 0x73890
callq 0x187f0
movq 0x4d8e0(%rip), %rsi     # 0x73890
movl $0x9, %edi
callq 0x189a0
testq %r12, %r12
je 0x25fce
movq 0x4d8ca(%rip), %rsi     # 0x73890
movq %r12, %rdi
callq 0x187f0
movq 0x4d8bb(%rip), %rsi     # 0x73890
movl $0x9, %edi
callq 0x189a0
testq %r15, %r15
je 0x25ff3
movq 0x4d8a5(%rip), %rsi     # 0x73890
movq %r15, %rdi
callq 0x187f0
movq 0x4d896(%rip), %rsi     # 0x73890
movl $0x9, %edi
callq 0x189a0
testq %r14, %r14
je 0x26018
movq 0x4d880(%rip), %rsi     # 0x73890
movq %r14, %rdi
callq 0x187f0
movq 0x4d871(%rip), %rsi     # 0x73890
movl $0x9, %edi
callq 0x189a0
movq 0x4d860(%rip), %rdi     # 0x73890
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rsp), %xmm0
leaq 0x2ef3b(%rip), %rsi     # 0x54f7b
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_O1/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 0x26159
cmpl $0x0, 0x4d7c4(%rip)     # 0x738a0
jne 0x26159
leaq 0x2d432(%rip), %rdi     # 0x53517
leaq 0x35c90(%rip), %rsi     # 0x5bd7c
movl $0x4, %edx
callq *0x120(%r14)
movq %rax, %r12
movq %r14, %rdi
callq 0x196d0
movq %r15, 0x4d79e(%rip)     # 0x738a8
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 0x2ef10(%rip), %xmm0    # 0x55050
cvttss2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
movq %r14, %rdi
callq 0x19930
movl %ebx, 0x4d747(%rip)     # 0x738a0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4d6f8(%rip), %rsi     # 0x738a8
callq 0x19580
testl %eax, %eax
je 0x261da
leaq 0x10(%rsp), %rax
movss 0x4(%rax), %xmm0
movq %rbx, %rdi
callq 0x18dc0
callq 0x184a0
movl $0x0, 0x4d6c6(%rip)     # 0x738a0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/gslog.c
// Function: sl_WriteStdLogPlayerEntered
void sl_WriteStdLogPlayerEntered( game_import_t     *gi,
                                  level_locals_t     level,
                                  edict_t           *ent )
{
    if( sl_Logging( gi, pPatch ) )
    {
        sl_LogPlayerConnect( gi,
                             ent->client->pers.netname,
                             NULL,
                             level.time);        
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x4d4f6(%rip), %rsi     # 0x738a8
callq 0x19580
testl %eax, %eax
je 0x263df
leaq 0x20(%rsp), %rax
movl $0x2c0, %esi            # imm = 0x2C0
addq 0x58(%r14), %rsi
movss 0x4(%rax), %xmm0
movq %rbx, %rdi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x18130
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/gslog.c
// Function: sl_LogPlayerDisconnect
void sl_LogPlayerDisconnect( game_import_t      *gi,
                             level_locals_t      level,
                             edict_t            *ent )
{
    // GSLogMod Start: Player disconnected
    if( sl_Logging( gi, pPatch ) )
    {
        sl_LogPlayerLeft( gi,
                          ent->client->pers.netname,
                          level.time );
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x4d4b0(%rip), %rsi     # 0x738a8
callq 0x19580
testl %eax, %eax
je 0x26423
leaq 0x20(%rsp), %rax
movl $0x2c0, %esi            # imm = 0x2C0
addq 0x58(%r14), %rsi
movss 0x4(%rax), %xmm0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x18d90
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_vote.c
// Function: Clear_All_Ballots
int Clear_All_Ballots (edict_t *ent)
{
	edict_t * player = NULL;
	unsigned int num_players = 0;

	//Reset the flags to neither yes or no (ie abstain) to prepare for next vote
	player = ctf_findplayer(NULL, NULL, CTF_TEAM_IGNORETEAM);
	while (player)
	{
		num_players++;
		//gi.bprintf(PRINT_HIGH, "processing: %s --", player->client->pers.netname); //for debugging
		player->client->ctf.extra_flags &= ~CTF_EXTRAFLAGS_VOTE_NO; //reset all players so they are all in
		player->client->ctf.extra_flags &= ~CTF_EXTRAFLAGS_VOTE_YES;  //'abstain' mode.
		//gi.bprintf(PRINT_HIGH," reset\n"); //for debugging
		player = ctf_findplayer(player, NULL, CTF_TEAM_IGNORETEAM);
	}
	return (num_players);
}

// Assembly:
pushq %rbx
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
callq 0x19170
testq %rax, %rax
je 0x26468
xorl %ebx, %ebx
incl %ebx
movq 0x58(%rax), %rcx
andl $0xffffff3f, 0x1108(%rcx) # imm = 0xFFFFFF3F
movq %rax, %rdi
xorl %esi, %esi
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
callq 0x19170
testq %rax, %rax
jne 0x26444
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_vote.c
// Function: Vote_Skip_Level
void Vote_Skip_Level (edict_t *ent)
{
	unsigned int num_players = 0;

	num_players = Clear_All_Ballots (ent);
	if (num_players < 4 )
		gi.cprintf(ent, PRINT_HIGH,"You need at least four players on the server to initiate a vote\n");
	else if (VoteStarted)
		gi.cprintf(ent, PRINT_HIGH,"Vote has already been started\n");
	else
	{
		VoteStarted = true;
		VoteTime = level.time;  //start the 30 second timer
		VoteType |= CTF_VOTETYPE_SKIP;

		gi.bprintf(PRINT_HIGH,"%s started vote to skip level.\n", ent->client->pers.netname);
		gi.sound(ent, CHAN_ITEM, gi.soundindex("misc/secret.wav"), 1, ATTN_NONE, 0);
		ent->client->ctf.extra_flags |= CTF_EXTRAFLAGS_VOTE_YES; //client who initiates vote must vote yes by default
		ent->client->ctf.extra_flags &= ~CTF_EXTRAFLAGS_VOTE_NO;
	}
	Vote_Menu(ent);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x18040
cmpl $0x3, %eax
ja 0x2648e
movq 0x4317b(%rip), %rcx     # 0x69600
leaq 0x2ec63(%rip), %rdx     # 0x550ef
jmp 0x264a8
movq 0x43213(%rip), %rax     # 0x696a8
cmpl $0x0, (%rax)
je 0x264c2
movq 0x4315f(%rip), %rcx     # 0x69600
leaq 0x2ec88(%rip), %rdx     # 0x55130
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq *0x10(%rcx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x19b38
movl $0x1, (%rax)
movq 0x438d1(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
movq 0x431fd(%rip), %rax     # 0x696d8
movss %xmm0, (%rax)
movq 0x43aea(%rip), %rax     # 0x69fd0
orb $0x1, (%rax)
movq 0x43110(%rip), %r14     # 0x69600
movl $0x2c0, %edx            # imm = 0x2C0
addq 0x58(%rbx), %rdx
leaq 0x2ec4f(%rip), %rsi     # 0x5514f
movl $0x2, %edi
xorl %eax, %eax
callq *(%r14)
movq 0x20(%r14), %r15
leaq 0x2ec5a(%rip), %rdi     # 0x5516f
callq *0x48(%r14)
movss 0x2da07(%rip), %xmm0    # 0x53f28
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0x3, %esi
movl %eax, %edx
callq *%r15
movq 0x58(%rbx), %rax
movl $0xffffff3f, %ecx       # imm = 0xFFFFFF3F
andl 0x1108(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0x1108(%rax)
jmp 0x264b5
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_vote.c
// Function: Vote_Ref_Player
void Vote_Ref_Player (edict_t *ent)
{
	unsigned int num_players = 0;

	num_players = Clear_All_Ballots (ent);
	if (num_players < 4 )
		gi.cprintf(ent, PRINT_HIGH,"You need at least four players on the server to initiate a vote\n");
	else if (VoteStarted)
		gi.cprintf(ent, PRINT_HIGH,"Vote has already been started\n");
	else
	{
		VoteStarted = true;
		VoteTime = level.time;  //start the 30 second timer
		VoteType |= CTF_VOTETYPE_REFPLAYER;

		gi.bprintf(PRINT_HIGH,"%s started vote to referee a player.\n", ent->client->pers.netname);
		gi.sound(ent, CHAN_ITEM, gi.soundindex("misc/secret.wav"), 1, ATTN_NONE, 0);
		ent->client->ctf.extra_flags |= CTF_EXTRAFLAGS_VOTE_YES; //client who initiates vote must vote yes by default
		ent->client->ctf.extra_flags &= ~CTF_EXTRAFLAGS_VOTE_NO;
	}	
	Vote_Menu(ent);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x18040
cmpl $0x3, %eax
ja 0x2680b
movq 0x42dfe(%rip), %rcx     # 0x69600
leaq 0x2e8e6(%rip), %rdx     # 0x550ef
jmp 0x26825
movq 0x42e96(%rip), %rax     # 0x696a8
cmpl $0x0, (%rax)
je 0x2683f
movq 0x42de2(%rip), %rcx     # 0x69600
leaq 0x2e90b(%rip), %rdx     # 0x55130
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq *0x10(%rcx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x19b38
movl $0x1, (%rax)
movq 0x43554(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
movq 0x42e80(%rip), %rax     # 0x696d8
movss %xmm0, (%rax)
movq 0x4376d(%rip), %rax     # 0x69fd0
orb $0x4, (%rax)
movq 0x42d93(%rip), %r14     # 0x69600
movl $0x2c0, %edx            # imm = 0x2C0
addq 0x58(%rbx), %rdx
leaq 0x2e92e(%rip), %rsi     # 0x551ab
movl $0x2, %edi
xorl %eax, %eax
callq *(%r14)
movq 0x20(%r14), %r15
leaq 0x2e8dd(%rip), %rdi     # 0x5516f
callq *0x48(%r14)
movss 0x2d68a(%rip), %xmm0    # 0x53f28
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0x3, %esi
movl %eax, %edx
callq *%r15
movq 0x58(%rbx), %rax
movl $0xffffff3f, %ecx       # imm = 0xFFFFFF3F
andl 0x1108(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0x1108(%rax)
jmp 0x26832
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_vote.c
// Function: Vote_YES
void Vote_YES (edict_t *ent)
{
	gi.cprintf(ent, PRINT_HIGH,"You have voted YES\n");
	ent->client->ctf.extra_flags |= CTF_EXTRAFLAGS_VOTE_YES;
	ent->client->ctf.extra_flags &= ~CTF_EXTRAFLAGS_VOTE_NO;
	Vote_Menu(ent);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x42bae(%rip), %rcx     # 0x69600
leaq 0x2e8d3(%rip), %rdx     # 0x5532c
movl $0x2, %esi
xorl %eax, %eax
callq *0x10(%rcx)
movq 0x58(%rbx), %rax
movl $0xffffff3f, %ecx       # imm = 0xFFFFFF3F
andl 0x1108(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0x1108(%rax)
movq %rbx, %rdi
popq %rbx
jmp 0x19b38
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_vote.c
// Function: Vote_NO
void Vote_NO (edict_t *ent)
{
	gi.cprintf(ent, PRINT_HIGH,"You have voted NO\n");
	ent->client->ctf.extra_flags &= ~CTF_EXTRAFLAGS_VOTE_YES;
	ent->client->ctf.extra_flags |= CTF_EXTRAFLAGS_VOTE_NO;
	Vote_Menu(ent);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x42b71(%rip), %rcx     # 0x69600
leaq 0x2e8aa(%rip), %rdx     # 0x55340
movl $0x2, %esi
xorl %eax, %eax
callq *0x10(%rcx)
movq 0x58(%rbx), %rax
movl $0xffffff3f, %ecx       # imm = 0xFFFFFF3F
andl 0x1108(%rax), %ecx
orl $0x80, %ecx
movl %ecx, 0x1108(%rax)
movq %rbx, %rdi
popq %rbx
jmp 0x19b38
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_cmds.c
// Function: Cmd_LockTeams_f
void Cmd_LockTeams_f(edict_t *ent)
{
	if (!ISREF(ent)) {
		gi.cprintf(ent, PRINT_HIGH, "Only referees can (un)lock teams.\n");
		return;
	}

	game.teamslocked = !game.teamslocked;
	gi.bprintf(PRINT_HIGH, "Teams are now %slocked\n", game.teamslocked ? "" : "un");
}

// Assembly:
movq 0x58(%rdi), %rax
testb $0x2, 0x1108(%rax)
jne 0x26aec
movq 0x42b28(%rip), %rax     # 0x69600
movq 0x10(%rax), %rcx
leaq 0x2e9bd(%rip), %rdx     # 0x554a0
movl $0x2, %esi
xorl %eax, %eax
jmpq *%rcx
movq 0x4324d(%rip), %rax     # 0x69d40
xorl %ecx, %ecx
cmpl $0x0, 0x624(%rax)
sete %cl
movl %ecx, 0x624(%rax)
movq 0x42af4(%rip), %rax     # 0x69600
movq (%rax), %rcx
leaq 0x2e3ef(%rip), %rax     # 0x54f05
leaq 0x34232(%rip), %rdx     # 0x5ad4f
cmoveq %rax, %rdx
leaq 0x2e99b(%rip), %rsi     # 0x554c3
movl $0x2, %edi
xorl %eax, %eax
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_cmds.c
// Function: Cmd_StartMatch_f
void Cmd_StartMatch_f(edict_t *ent) {
	if (!ISREF(ent)) {
		gi.cprintf(ent, PRINT_HIGH, "Referee-only command denied.\n");
		return;
	}

	if (matchstate > MATCH_NONE) {
		gi.cprintf(ent, PRINT_HIGH, "Match already running, stop it first\n");
		return;
	}

	// start countdown
	SpawnTourneyClock();
}

// Assembly:
movq 0x58(%rdi), %rax
testb $0x2, 0x1108(%rax)
jne 0x26b52
movq 0x42abb(%rip), %rax     # 0x69600
movq 0x10(%rax), %rcx
leaq 0x2e98b(%rip), %rdx     # 0x554db
jmp 0x26b70
movq 0x42c7f(%rip), %rax     # 0x697d8
cmpl $0x0, (%rax)
jle 0x26b79
movq 0x42a9b(%rip), %rax     # 0x69600
movq 0x10(%rax), %rcx
leaq 0x2e989(%rip), %rdx     # 0x554f9
movl $0x2, %esi
xorl %eax, %eax
jmpq *%rcx
xorl %eax, %eax
jmp 0x18970
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_cmds.c
// Function: Cmd_StopMatch_f
void Cmd_StopMatch_f(edict_t *ent) {
	if (!ISREF(ent)) {
		gi.cprintf(ent, PRINT_HIGH, "Referee-only command denied.\n");
		return;
	}

	if (matchstate == MATCH_NONE) {
		gi.cprintf(ent, PRINT_HIGH, "No match running\n");
		return;
	}

	KillMatch();
	gi.bprintf(PRINT_HIGH, "Match stopped by %s\n", ent->client->pers.netname);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %rax
testb $0x2, 0x1108(%rax)
jne 0x26ba5
movq 0x42a68(%rip), %rax     # 0x69600
movq 0x10(%rax), %rcx
leaq 0x2e938(%rip), %rdx     # 0x554db
jmp 0x26bee
movq 0x42c2c(%rip), %rax     # 0x697d8
cmpl $0x0, (%rax)
je 0x26bdc
xorl %eax, %eax
callq 0x180d0
movq 0x42a41(%rip), %rax     # 0x69600
movq (%rax), %rcx
movl $0x2c0, %edx            # imm = 0x2C0
addq 0x58(%rbx), %rdx
leaq 0x2e95f(%rip), %rsi     # 0x55531
movl $0x2, %edi
xorl %eax, %eax
popq %rbx
jmpq *%rcx
movq 0x42a1d(%rip), %rax     # 0x69600
movq 0x10(%rax), %rcx
leaq 0x2e931(%rip), %rdx     # 0x5551f
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
popq %rbx
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_cmds.c
// Function: ForceCommand
void ForceCommand(edict_t *ent, char *command)
{
	if (!command || strlen(command) > MAX_INFO_STRING)
		return;
	if (strcmp(level.level_name, "") == 0)
		return;

   	gi.WriteByte (11);
	gi.WriteString (command);
    gi.unicast (ent, true);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x26c60
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x18680
cmpq $0x200, %rax            # imm = 0x200
ja 0x26c60
movq 0x43179(%rip), %rax     # 0x69da0
cmpb $0x0, 0x8(%rax)
je 0x26c60
movq 0x429cc(%rip), %r15     # 0x69600
movl $0xb, %edi
callq *0xc8(%r15)
movq %r14, %rdi
callq *0xe8(%r15)
movq 0xb8(%r15), %rax
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_cmds.c
// Function: Cmd_SetPassword_f
void Cmd_SetPassword_f(edict_t *ent)
{
	if (!ISREF(ent)) {
		gi.cprintf(ent, PRINT_HIGH, "Referee-only command\n");
		return;
	}

	// no password supplied, clear current password
	if (gi.argc() < 2) {
		gi.cvar_set("password", "");
		gi.cprintf(ent, PRINT_HIGH, "Server password has been cleared\n");
		return;
	}

	char *pw = gi.argv(1);
	gi.cvar_set("password", pw);
	gi.cprintf(ent, PRINT_HIGH, "Server password set to \"%s\"\n", pw);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %rax
testb $0x2, 0x1108(%rax)
jne 0x26c8f
movq 0x4297e(%rip), %rax     # 0x69600
movq 0x10(%rax), %rcx
leaq 0x2e8b9(%rip), %rdx     # 0x55546
jmp 0x26cc2
movq 0x4296a(%rip), %r15     # 0x69600
callq *0x138(%r15)
cmpl $0x1, %eax
jg 0x26cd3
leaq 0x3205c(%rip), %rdi     # 0x58d05
leaq 0x2e255(%rip), %rsi     # 0x54f05
callq *0x128(%r15)
movq 0x10(%r15), %rcx
leaq 0x2e89a(%rip), %rdx     # 0x5555c
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmpq *%rcx
movl $0x1, %edi
callq *0x140(%r15)
movq %rax, %r14
leaq 0x3201c(%rip), %rdi     # 0x58d05
movq %rax, %rsi
callq *0x128(%r15)
movq 0x10(%r15), %r8
leaq 0x2e880(%rip), %rdx     # 0x5557e
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmpq *%r8
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_cmds.c
// Function: OnSameTeam
qboolean OnSameTeam (edict_t *ent1, edict_t *ent2)
{
	if ((int)ctfflags->value & CTF_TEAM_NOTEAMS)
		return false; //surt there are no teams allowed

	if (ent1->client && ent2->client &&
		(ent1->client->ctf.teamnum == ent2->client->ctf.teamnum) &&
		ent1->inuse && ent2->inuse)
		return true;
	return false;
}

// Assembly:
movq 0x42c0b(%rip), %rax     # 0x69b58
movq (%rax), %rax
cvttss2si 0x20(%rax), %ecx
xorl %eax, %eax
testb %cl, %cl
js 0x26f8e
movq 0x58(%rdi), %rax
testq %rax, %rax
je 0x26f8c
movq 0x58(%rsi), %rcx
testq %rcx, %rcx
je 0x26f8c
movl 0x1100(%rax), %eax
cmpl 0x1100(%rcx), %eax
jne 0x26f8c
cmpl $0x0, 0x60(%rdi)
je 0x26f8c
movl $0x1, %eax
cmpl $0x0, 0x60(%rsi)
jne 0x26f8e
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_cmds.c
// Function: PlayVoiceSound
void PlayVoiceSound(edict_t *ent, char *sound)
{
	char	command [MAX_INFO_STRING];
	char	*s, *gender;

	//bat
	//if (ent->client->ctf.teamnum == CTF_TEAM_OBSERVER)
	if (ent->client->ctf.teamnum <= CTF_TEAM_OBSERVER)
	{
		ctf_SafePrint(ent, PRINT_HIGH, "Observers can't use voice.\n");
		return;
	}

#ifdef NOVOICE_OK
	if ((int)ctfflags->value & CTF_NOVOICE)
	{
		ctf_SafePrint(ent, PRINT_HIGH, "It's quiet time, no talking.\n");
		return;
	}
#endif

	if (!ctf_SpamCheck(ent))
		return;

	s = Info_ValueForKey (ent->client->pers.userinfo, "skin");

	// decide gender


	if (sound[0] == '_' || !strncmp(sound, "male_", 5)	|| !strncmp(sound, "fem_", 4))
	{
		Com_sprintf (command, sizeof(command), "voice/%s.wav", sound);
	}
	else // Append gender
	{
		if (s[0] == 'f' || s[0] == 'F') // Female
		{
			gender = "fem";
		}
		else
		{
			gender = "male";
		}

		Com_sprintf (command, sizeof(command), "voice/%s_%s.wav", gender, sound);
	}

	gi.sound(ent, CHAN_AUTO, gi.soundindex(command), 1, ATTN_IDLE, 0);

	gi.dprintf("%s (voicetext): %s\n",
			ent->client->pers.netname, command);

	ent->client->spam_band_count -= CTF_SPAM_BAND_VOICE; //75 units of spam control for the voice
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
movq 0x58(%rdi), %rax
cmpl $0x0, 0x1100(%rax)
js 0x2704a
movq %rsi, %r14
movq %rbx, %rdi
callq 0x195b0
testl %eax, %eax
je 0x270dc
movl $0xc0, %edi
addq 0x58(%rbx), %rdi
leaq 0x2c36c(%rip), %rsi     # 0x53340
callq 0x18bb0
cmpb $0x5f, (%r14)
je 0x2706c
movq %rax, %r15
leaq 0x2e5dc(%rip), %rsi     # 0x555c9
movl $0x5, %edx
movq %r14, %rdi
callq 0x181e0
testl %eax, %eax
je 0x2706c
leaq 0x2e5ca(%rip), %rsi     # 0x555cf
movl $0x4, %edx
movq %r14, %rdi
callq 0x181e0
testl %eax, %eax
je 0x2706c
movb (%r15), %al
addb $-0x46, %al
testb $-0x21, %al
leaq 0x2e5bf(%rip), %rax     # 0x555e3
leaq 0x2c055(%rip), %rcx     # 0x53080
cmoveq %rax, %rcx
leaq 0x2e600(%rip), %rdx     # 0x55636
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %r8
xorl %eax, %eax
callq 0x18e10
jmp 0x27085
leaq 0x2e5bc(%rip), %rdx     # 0x5560d
movl $0x2, %esi
movq %rbx, %rdi
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x18da0
leaq 0x2e5b6(%rip), %rdx     # 0x55629
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rcx
xorl %eax, %eax
callq 0x18e10
movq 0x42574(%rip), %r15     # 0x69600
movq 0x20(%r15), %r12
movq %rsp, %r14
movq %r14, %rdi
callq *0x48(%r15)
movss 0x2ce86(%rip), %xmm0    # 0x53f28
movss 0x2d3ae(%rip), %xmm1    # 0x54458
xorps %xmm2, %xmm2
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq *%r12
movl $0x2c0, %esi            # imm = 0x2C0
addq 0x58(%rbx), %rsi
leaq 0x2e57f(%rip), %rdi     # 0x55646
movq %r14, %rdx
xorl %eax, %eax
callq *0x8(%r15)
movq 0x58(%rbx), %rax
addq $-0x4b, 0x10e0(%rax)
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_cmds.c
// Function: SelectNextItem
void SelectNextItem (edict_t *ent, int itflags)
{
	gclient_t	*cl;
	int			i, index;
	gitem_t		*it;
	it = 0;

	cl = ent->client;

	if (cl->showmenu)
	{
		Menu_Next(ent);
//		return; //surt, this causes a bug with dropping items ... this can
		//be called from validate selected item in which case it must _not_
		//return early!!!!
	}

	if (cl->chase_target) {
		ChaseNext(ent);
		return;
	}

	// scan  for the next valid one
	for (i=1 ; i<=MAX_ITEMS ; i++)
	{
		index = (cl->pers.selected_item + i)%MAX_ITEMS;
		if (!cl->pers.inventory[index])
			continue;
		it = &itemlist[index];
		if (!it->use)
			continue;
		if (!(it->flags & itflags))
			continue;

		cl->pers.selected_item = index;
		return;
	}

	cl->pers.selected_item = -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq 0x58(%rdi), %r15
cmpl $0x0, 0xf80(%r15)
je 0x27229
movq %r14, %rdi
callq 0x18bd0
cmpq $0x0, 0xf30(%r15)
je 0x27240
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x19570
movl 0x314(%r15), %eax
incl %eax
xorl %ecx, %ecx
movq 0x42bee(%rip), %rdx     # 0x69e40
movl %eax, %esi
addl %ecx, %esi
leal 0xff(%rax,%rcx), %edi
cmovnsl %esi, %edi
andl $0xffffff00, %edi       # imm = 0xFFFFFF00
subl %edi, %esi
movslq %esi, %rdi
cmpl $0x0, 0x318(%r15,%rdi,4)
je 0x27291
movq %rdi, %r8
shlq $0x7, %r8
leaq (%r8,%rdi,8), %rdi
cmpq $0x0, 0x10(%rdx,%rdi)
je 0x27291
addq %rdx, %rdi
testl %ebx, 0x68(%rdi)
jne 0x272a8
incl %ecx
cmpl $0x100, %ecx            # imm = 0x100
jne 0x27252
movl $0xffffffff, 0x314(%r15) # imm = 0xFFFFFFFF
jmp 0x272af
movl %esi, 0x314(%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_cmds.c
// Function: SelectPrevItem
void SelectPrevItem (edict_t *ent, int itflags)
{
	gclient_t	*cl;
	int			i;
	int			index;
	gitem_t		*it;

	it = 0;

	cl = ent->client;

	if (cl->showmenu)
	{
		Menu_Prev(ent);
//		return; //surt, see above ... this should not fail!!
	}

	if (cl->chase_target) {
		ChasePrev(ent);
		return;
	}

	// scan  for the next valid one
	for (i=1 ; i<=MAX_ITEMS ; i++)
	{
		index = (cl->pers.selected_item + MAX_ITEMS - i)%MAX_ITEMS;
		if (!cl->pers.inventory[index])
			continue;
		it = &itemlist[index];
		if (!it->use)
			continue;
		if (!(it->flags & itflags))
			continue;

		cl->pers.selected_item = index;
		return;
	}

	cl->pers.selected_item = -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq 0x58(%rdi), %r15
cmpl $0x0, 0xf80(%r15)
je 0x272d5
movq %r14, %rdi
callq 0x19980
cmpq $0x0, 0xf30(%r15)
je 0x272ec
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x188d0
movl 0x314(%r15), %eax
movl $0xff, %ecx
movq 0x42b41(%rip), %rdx     # 0x69e40
movl %eax, %esi
addl %ecx, %esi
leal 0xff(%rax,%rcx), %edi
cmovnsl %esi, %edi
andl $0xffffff00, %edi       # imm = 0xFFFFFF00
subl %edi, %esi
movslq %esi, %rdi
cmpl $0x0, 0x318(%r15,%rdi,4)
je 0x2733e
movq %rdi, %r8
shlq $0x7, %r8
leaq (%r8,%rdi,8), %rdi
cmpq $0x0, 0x10(%rdx,%rdi)
je 0x2733e
addq %rdx, %rdi
testl %ebx, 0x68(%rdi)
jne 0x27350
addl $-0x1, %ecx
jb 0x272ff
movl $0xffffffff, 0x314(%r15) # imm = 0xFFFFFFFF
jmp 0x27357
movl %esi, 0x314(%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_cmds.c
// Function: Cmd_Use_f
void Cmd_Use_f (edict_t *ent)
{
	int			index;
	gitem_t		*it;
	char		*s;
	char message[MAX_INFO_STRING];

	s = gi.args();

	// CTF CODE -- LM_JORM
	if (Q_stricmp(s, "hook") == 0)
		s = "grappling hook";
	else if (Q_stricmp(s, "grapple") == 0)
		s = "grappling hook";
	if (Q_stricmp(s, "flag") == 0)
		s = "Enemy Flag";
	// END CTF CODE -- LM_JORM

	it = FindItem (s);
	if (!it)
	{
		sprintf(message, "unknown item: %s\n", s);
		ctf_SafePrint(ent, PRINT_HIGH, message);
		return;
	}
	if (!it->use)
	{
		ctf_SafePrint(ent, PRINT_HIGH, "Item is not usable.\n");
		return;
	}
	index = ITEM_INDEX(it);
	if (!ent->client->pers.inventory[index])
	{
		sprintf(message, "Out of item: %s\n", s);
		ctf_SafePrint(ent, PRINT_HIGH, message);
		return;
	}

		it->use (ent, it);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
movq 0x41d0a(%rip), %rax     # 0x69600
callq *0x148(%rax)
movq %rax, %r14
leaq 0x336af(%rip), %rsi     # 0x5afb5
movq %rax, %rdi
callq 0x18690
testl %eax, %eax
je 0x27930
leaq 0x2de04(%rip), %rsi     # 0x5571d
movq %r14, %rdi
callq 0x18690
testl %eax, %eax
leaq 0x33681(%rip), %r15     # 0x5afab
cmovneq %r14, %r15
jmp 0x27937
leaq 0x33674(%rip), %r15     # 0x5afab
leaq 0x342ad(%rip), %rsi     # 0x5bbeb
movq %r15, %rdi
callq 0x18690
testl %eax, %eax
leaq 0x2ddd6(%rip), %r14     # 0x55725
cmovneq %r15, %r14
movq %r14, %rdi
callq 0x189e0
testq %rax, %rax
je 0x279a2
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x279ab
movq %rax, %rdx
subq 0x424cd(%rip), %rdx     # 0x69e40
shrq $0x3, %rdx
imull $0xf0f0f0f1, %edx, %edx # imm = 0xF0F0F0F1
movq 0x58(%rbx), %rsi
movslq %edx, %rdx
cmpl $0x0, 0x318(%rsi,%rdx,4)
je 0x279cb
movq %rbx, %rdi
movq %rax, %rsi
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
jmpq *%rcx
leaq 0x2dd87(%rip), %rsi     # 0x55730
jmp 0x279d2
leaq 0x2dd90(%rip), %rdx     # 0x55742
movl $0x2, %esi
movq %rbx, %rdi
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
jmp 0x18da0
leaq 0x2dd85(%rip), %rsi     # 0x55757
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x19700
movl $0x2, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x18da0
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_cmds.c
// Function: Cmd_Inven_f
void Cmd_Inven_f (edict_t *ent)
{
	int			i;
	gclient_t	*cl;

	cl = ent->client;

	ent->client->showscores = false;
	ent->client->showhelp = false;
	ent->client->showctfhud = false;
	ent->client->showmod = false;
	ent->client->showmenu = false;
	cl->showsquadboard = false; // ADC

	if (cl->showinventory)
	{
		cl->showinventory = false;
		return;
	}

	cl->showinventory = true;

	gi.WriteByte (svc_inventory);
	for (i=0 ; i<MAX_ITEMS ; i++)
	{
		gi.WriteShort (cl->pers.inventory[i]);
	}
	gi.unicast (ent, true);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x58(%rdi), %r14
xorl %eax, %eax
movl %eax, 0xe24(%r14)
movl %eax, 0xe2c(%r14)
movq $0x0, 0xf74(%r14)
movl %eax, 0xf80(%r14)
movl %eax, 0xe34(%r14)
cmpl %eax, 0xe28(%r14)
je 0x27c34
movl $0x0, 0xe28(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rdi, %rbx
movl $0x1, 0xe28(%r14)
movq 0x419b7(%rip), %r15     # 0x69600
movl $0x5, %edi
callq *0xc8(%r15)
xorl %r12d, %r12d
movl 0x318(%r14,%r12,4), %edi
callq *0xd0(%r15)
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x27c58
movq 0xb8(%r15), %rax
movq %rbx, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_cmds.c
// Function: Cmd_InvUse_f
void Cmd_InvUse_f (edict_t *ent)
{
	gitem_t		*it;

	if (ent->client->showmenu)
	{
		Menu_Use(ent);
		return;
	}

	ValidateSelectedItem (ent);

	if (ent->client->pers.selected_item == -1)
	{
		ctf_SafePrint(ent, PRINT_HIGH, "No item to use.\n");
		return;
	}

	it = &itemlist[ent->client->pers.selected_item];
	if (!it->use)
	{
		ctf_SafePrint(ent, PRINT_HIGH, "Item is not usable.\n");
		return;
	}
	it->use (ent, it);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %rax
cmpl $0x0, 0xf80(%rax)
je 0x27ca9
movq %rbx, %rdi
popq %rbx
jmp 0x194e0
movslq 0x314(%rax), %rcx
cmpl $0x0, 0x318(%rax,%rcx,4)
jne 0x27cc7
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x18940
movq 0x58(%rbx), %rax
movslq 0x314(%rax), %rax
cmpq $-0x1, %rax
je 0x27cfd
movq %rax, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rax,8), %rcx
movq 0x42156(%rip), %rsi     # 0x69e40
movq 0x10(%rsi,%rcx), %rax
testq %rax, %rax
je 0x27d06
addq %rcx, %rsi
movq %rbx, %rdi
popq %rbx
jmpq *%rax
leaq 0x2da9b(%rip), %rdx     # 0x5579f
jmp 0x27d0d
leaq 0x2da35(%rip), %rdx     # 0x55742
movl $0x2, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x18da0