// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_cmds.c
// Function: Cmd_Referee_f
void Cmd_Referee_f (edict_t *ent)
{
	char *p;

	p = gi.args();

	// check for a password
	//surt adjusted this so that a blank ref password doesn't deny access to rcon,
	//and created rcon access mode
	if (strcmp(rconpassword->string, p) == 0)
	{
		//deny access if password is blank on server
		if (!strlen(rconpassword->string))
		{
			ctf_SafePrint(ent, PRINT_HIGH, "Rcon Mode is off\n");
			return;
		}

		ctf_SafePrint(ent, PRINT_HIGH, "You are now an Rcon\n");
		ent->client->ctf.extra_flags |= CTF_EXTRAFLAGS_REFEREE;
		ent->client->ctf.extra_flags |= CTF_EXTRAFLAGS_RCON;
		Ctf_Menu(ent);
	}

	else if (strcmp(refpassword->string, p) == 0)
	{
		//deny access if password is blank on server
		if (!strlen(refpassword->string))
		{
			ctf_SafePrint(ent, PRINT_HIGH, "Referee Mode is off\n");
			return;
		}
		ctf_SafePrint(ent, PRINT_HIGH, "You are now a Referee\n");
		ent->client->ctf.extra_flags |= CTF_EXTRAFLAGS_REFEREE;
		ent->client->ctf.extra_flags &= ~CTF_EXTRAFLAGS_RCON;
		Ctf_Menu(ent);
	}
	else
	{
		ctf_SafePrint(ent, PRINT_HIGH, "Incorrect Referee Password\n");
		ent->client->ctf.extra_flags &= ~CTF_EXTRAFLAGS_REFEREE;
		ent->client->ctf.extra_flags &= ~CTF_EXTRAFLAGS_RCON;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x52ead(%rip), %rax     # 0x82600
callq *0x148(%rax)
movq %rax, -0x10(%rbp)
movq 0x532f4(%rip), %rax     # 0x82a58
movq (%rax), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x18bf0
cmpl $0x0, %eax
jne 0x2f801
movq 0x532d4(%rip), %rax     # 0x82a58
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x186e0
cmpq $0x0, %rax
jne 0x2f7b0
movq -0x8(%rbp), %rdi
movl $0x2, %esi
leaq 0x42965(%rip), %rdx     # 0x7210b
callq 0x18f20
jmp 0x2f8e7
movq -0x8(%rbp), %rdi
movl $0x2, %esi
leaq 0x4295d(%rip), %rdx     # 0x7211d
callq 0x18f20
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x1108(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x1108(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x1108(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x1108(%rax)
movq -0x8(%rbp), %rdi
callq 0x19a40
jmp 0x2f8e7
movq 0x52e08(%rip), %rax     # 0x82610
movq (%rax), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x18bf0
cmpl $0x0, %eax
jne 0x2f8a2
movq 0x52de8(%rip), %rax     # 0x82610
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x186e0
cmpq $0x0, %rax
jne 0x2f854
movq -0x8(%rbp), %rdi
movl $0x2, %esi
leaq 0x428e8(%rip), %rdx     # 0x72132
callq 0x18f20
jmp 0x2f8e7
movq -0x8(%rbp), %rdi
movl $0x2, %esi
leaq 0x428e3(%rip), %rdx     # 0x72147
callq 0x18f20
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x1108(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x1108(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x1108(%rax), %ecx
andl $-0x5, %ecx
movl %ecx, 0x1108(%rax)
movq -0x8(%rbp), %rdi
callq 0x19a40
jmp 0x2f8e5
movq -0x8(%rbp), %rdi
movl $0x2, %esi
leaq 0x428ac(%rip), %rdx     # 0x7215e
callq 0x18f20
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x1108(%rax), %ecx
andl $-0x3, %ecx
movl %ecx, 0x1108(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x1108(%rax), %ecx
andl $-0x5, %ecx
movl %ecx, 0x1108(%rax)
jmp 0x2f8e7
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)