// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_menu.c
// Function: Main_Menu
void Main_Menu (edict_t *ent)
{
	gclient_t	*cl;

	cl = ent->client;

	Menu_Free(ent);
	ent->client->menu = MENU_LOCAL;
	ent->client->menuselect = 1;

	Menu_Set(ent, 0, "LM CTF Option Menu", Help_Menu);
	Menu_Set(ent, 1, "------------------", NULL);
//-bat
//put back in
//#ifdef OLDOBSERVERCODE
	//if (ctf_validateplayer(ent, CTF_TEAM_OBSERVER))
	if(ent->client->ctf.teamnum ==  CTF_TEAM_OBSERVER ||
		ent->client->ctf.teamnum ==  CTF_TEAM_OBSERVER_RED ||
		ent->client->ctf.teamnum ==  CTF_TEAM_OBSERVER_BLUE)
			Menu_Set(ent, 3, "Observer Options", Obs_Main_Menu);
	else
	{
		Menu_Set(ent, 3, "Become Observer", Observe_Exec);
		Menu_Set(ent, 4, "Change Team", Change_Team_Exec);
	}
//#else
//	Menu_Set(ent, 4, "Change Team", Change_Team_Exec);
//#endif
	Menu_Set(ent, 5, "Change Skin", Skin_Menu);
	Menu_Set(ent, 6, "Radio Sounds", Radio_Menu);
	Menu_Set(ent, 7, "Voice Sounds", Voice_Menu);
	if (!((int)ctfflags->value & CTF_VOTEMENU_OFF))
		Menu_Set(ent, 8, "Voting Menu", Vote_Menu);              //Vampire -- voting menu
	if (cl->ctf.extra_flags & CTF_EXTRAFLAGS_REFEREE)
		Menu_Set(ent, 9, "Referee Menu", Ref_Main_Menu);
	Menu_Set(ent, 10, "Help", Help_Menu);

	cl->menuselect = 0;

	Menu_Draw (ent);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %rax
movq %rax, (%rsp)
xorl %r14d, %r14d
movq 0x4f537(%rip), %r12     # 0x69600
movq 0x58(%rbx), %rax
movq 0xf90(%rax,%r14), %rdi
testq %rdi, %rdi
je 0x1a0f2
callq *0x110(%r12)
movq 0x58(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xf90(%rax,%r14)
addq $0x10, %r14
cmpq $0x120, %r14            # imm = 0x120
jne 0x1a0c9
movq 0x58(%rbx), %rax
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, 0xf84(%rax)
movq 0xf90(%rax), %rdi
testq %rdi, %rdi
je 0x1a128
callq *0x110(%r12)
leaq 0x38ee1(%rip), %rdi     # 0x53010
callq 0x18100
movq 0x58(%rbx), %rcx
movq %rax, 0xf90(%rcx)
movq 0x4f6ca(%rip), %rax     # 0x69810
movq %rax, 0xf98(%rcx)
movq 0xfa0(%rcx), %rdi
testq %rdi, %rdi
je 0x1a161
callq *0x110(%r12)
leaq 0x3907a(%rip), %rdi     # 0x531e2
callq 0x18100
movq 0x58(%rbx), %rcx
movq %rax, 0xfa0(%rcx)
movq $0x0, 0xfa8(%rcx)
cmpl $-0x3, 0x1100(%rcx)
movq 0xfc0(%rcx), %rdi
jb 0x1a1af
movq 0x4f486(%rip), %rbp     # 0x69620
movl $0xfc8, %r13d           # imm = 0xFC8
movl $0xfc0, %r15d           # imm = 0xFC0
leaq 0x39169(%rip), %r14     # 0x53316
jmp 0x1a202
testq %rdi, %rdi
je 0x1a1bc
callq *0x110(%r12)
leaq 0x38e60(%rip), %rdi     # 0x53023
callq 0x18100
movq 0x58(%rbx), %rcx
movq %rax, 0xfc0(%rcx)
movq 0x4f2ee(%rip), %rax     # 0x694c8
movq %rax, 0xfc8(%rcx)
movq 0xfd0(%rcx), %rdi
movq 0x4fb29(%rip), %rbp     # 0x69d18
movl $0xfd8, %r13d           # imm = 0xFD8
movl $0xfd0, %r15d           # imm = 0xFD0
leaq 0x38e31(%rip), %r14     # 0x53033
testq %rdi, %rdi
je 0x1a20f
callq *0x110(%r12)
movq %r14, %rdi
callq 0x18100
movq 0x58(%rbx), %rcx
movq %rax, (%rcx,%r15)
movq %rbp, (%rcx,%r13)
movq 0xfe0(%rcx), %rdi
testq %rdi, %rdi
je 0x1a237
callq *0x110(%r12)
leaq 0x38e01(%rip), %rdi     # 0x5303f
callq 0x18100
movq 0x58(%rbx), %rcx
movq %rax, 0xfe0(%rcx)
movq 0x4f783(%rip), %rax     # 0x699d8
movq %rax, 0xfe8(%rcx)
movq 0xff0(%rcx), %rdi
testq %rdi, %rdi
movq (%rsp), %r14
je 0x1a274
callq *0x110(%r12)
leaq 0x38e27(%rip), %rdi     # 0x530a2
callq 0x18100
movq 0x58(%rbx), %rcx
movq %rax, 0xff0(%rcx)
movq 0x4fd36(%rip), %rax     # 0x69fc8
movq %rax, 0xff8(%rcx)
movq 0x1000(%rcx), %rdi
testq %rdi, %rdi
je 0x1a2ad
callq *0x110(%r12)
leaq 0x39073(%rip), %rdi     # 0x53327
callq 0x18100
movq 0x58(%rbx), %rcx
movq %rax, 0x1000(%rcx)
movq 0x4f91d(%rip), %rax     # 0x69be8
movq %rax, 0x1008(%rcx)
movq 0x4f87f(%rip), %rax     # 0x69b58
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
testw %ax, %ax
js 0x1a31f
movq 0x1010(%rcx), %rdi
testq %rdi, %rdi
je 0x1a2fa
callq *0x110(%r12)
leaq 0x39033(%rip), %rdi     # 0x53334
callq 0x18100
movq 0x58(%rbx), %rcx
movq %rax, 0x1010(%rcx)
movq 0x4f988(%rip), %rax     # 0x69ca0
movq %rax, 0x1018(%rcx)
testb $0x2, 0x1108(%r14)
je 0x1a366
movq 0x58(%rbx), %rax
movq 0x1020(%rax), %rdi
testq %rdi, %rdi
je 0x1a341
callq *0x110(%r12)
leaq 0x39072(%rip), %rdi     # 0x533ba
callq 0x18100
movq 0x58(%rbx), %rcx
movq %rax, 0x1020(%rcx)
movq 0x4f791(%rip), %rax     # 0x69af0
movq %rax, 0x1028(%rcx)
movq 0x58(%rbx), %rax
movq 0x1030(%rax), %rdi
testq %rdi, %rdi
je 0x1a37e
callq *0x110(%r12)
leaq 0x390fa(%rip), %rdi     # 0x5347f
callq 0x18100
movq 0x58(%rbx), %rcx
movq %rax, 0x1030(%rcx)
movq 0x4f474(%rip), %rax     # 0x69810
movq %rax, 0x1038(%rcx)
movl $0x0, 0xf88(%r14)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x196c0