// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_vote.c
// Function: Vote_Menu
void Vote_Menu (edict_t *ent)             //Vampire -- voting menu
{
	gclient_t	*cl;
	char text[MAX_INFO_STRING];

	cl = ent->client;

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

	Menu_Set(ent, 0, "LMCTF Vote Menu", Main_Menu);
	Menu_Set(ent, 1, "------------------", NULL);
	if (!VoteStarted)
	{
		Menu_Set(ent, 2, "Skip to next map", Vote_Skip_Level);
		Menu_Set(ent, 3, "Jump to specific map", Vote_Jump_Level);
		Menu_Set(ent, 4, "Referee a player", Vote_Ref_Player);
	}
	else
	{
		Menu_Set(ent, 3, "Vote YES", Vote_YES);
		Menu_Set(ent, 4, "Vote NO", Vote_NO);
	}
	if (VoteStarted)
		sprintf(text, "Vote:     Started");
	else
		sprintf(text, "Vote:     Idle");
	Menu_Set(ent, 6, text, NULL);
	if (VoteStarted)
	{
		if (ent->client->ctf.extra_flags & CTF_EXTRAFLAGS_VOTE_YES)
			sprintf(text, "You have voted YES");
		else if (ent->client->ctf.extra_flags & CTF_EXTRAFLAGS_VOTE_NO)
			sprintf(text, "You have voted NO");
		else
			sprintf(text, "You have not voted");
		Menu_Set(ent, 8, text, NULL);
	}

	cl->menuselect = 0;
		
	Menu_Draw (ent);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
movq 0x58(%rdi), %r14
callq 0x189e0
movq 0x58(%rbx), %rax
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, 0xf84(%rax)
leaq 0x2c086(%rip), %rdx     # 0x5034f
movq 0x424d0(%rip), %rcx     # 0x667a0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x183a0
leaq 0x29f01(%rip), %rdx     # 0x4e1e2
pushq $0x1
popq %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x183a0
movq 0x423b3(%rip), %r15     # 0x666a8
cmpl $0x0, (%r15)
je 0x24324
leaq 0x2c094(%rip), %rdx     # 0x50396
movq 0x427a7(%rip), %rcx     # 0x66ab0
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x183a0
leaq 0x2c084(%rip), %rdx     # 0x5039f
movq 0x425a6(%rip), %rcx     # 0x668c8
jmp 0x24364
leaq 0x2c034(%rip), %rdx     # 0x5035f
movq 0x42bc6(%rip), %rcx     # 0x66ef8
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x183a0
leaq 0x2c02c(%rip), %rdx     # 0x50370
movq 0x42155(%rip), %rcx     # 0x664a0
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x183a0
leaq 0x2c028(%rip), %rdx     # 0x50385
movq 0x4296c(%rip), %rcx     # 0x66cd0
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x183a0
cmpl $0x0, (%r15)
je 0x24389
movups 0x2c02b(%rip), %xmm0    # 0x503a7
movaps %xmm0, (%rsp)
movw $0x64, 0x10(%rsp)
jmp 0x243a6
movabsq $0x656c6449202020, %rax # imm = 0x656C6449202020
movq %rax, 0x7(%rsp)
movabsq $0x2020203a65746f56, %rax # imm = 0x2020203A65746F56
movq %rax, (%rsp)
pushq $0x6
popq %rsi
movq %rsp, %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x183a0
cmpl $0x0, (%r15)
je 0x2441a
movq 0x58(%rbx), %rax
movl 0x1108(%rax), %eax
testb $0x40, %al
jne 0x243e3
testb %al, %al
js 0x243f8
movups 0x2c018(%rip), %xmm0    # 0x503ed
movaps %xmm0, (%rsp)
movl $0x646574, 0xf(%rsp)    # imm = 0x646574
jmp 0x2440a
movups 0x2bfde(%rip), %xmm0    # 0x503c8
movaps %xmm0, (%rsp)
movl $0x534559, 0xf(%rsp)    # imm = 0x534559
jmp 0x2440a
movups 0x2bfdc(%rip), %xmm0    # 0x503db
movaps %xmm0, (%rsp)
movw $0x4f, 0x10(%rsp)
pushq $0x8
popq %rsi
movq %rsp, %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x183a0
andl $0x0, 0xf88(%r14)
movq %rbx, %rdi
callq 0x19880
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq