// File: /workspace/github_c_makefile_star2_O1/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 0x18960
movq 0x58(%rbx), %rax
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, 0xf84(%rax)
leaq 0x2edce(%rip), %rdx     # 0x55353
movq 0x43214(%rip), %rcx     # 0x697a0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x18370
leaq 0x2cc45(%rip), %rdx     # 0x531e2
movq %rbx, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x18370
movq 0x430f5(%rip), %r15     # 0x696a8
cmpl $0x0, (%r15)
je 0x265e4
leaq 0x2edda(%rip), %rdx     # 0x5539a
movq 0x434e9(%rip), %rcx     # 0x69ab0
movq %rbx, %rdi
movl $0x3, %esi
callq 0x18370
leaq 0x2edc8(%rip), %rdx     # 0x553a3
movq 0x432e6(%rip), %rcx     # 0x698c8
jmp 0x26628
leaq 0x2ed78(%rip), %rdx     # 0x55363
movq 0x43906(%rip), %rcx     # 0x69ef8
movq %rbx, %rdi
movl $0x2, %esi
callq 0x18370
leaq 0x2ed6e(%rip), %rdx     # 0x55374
movq 0x42e93(%rip), %rcx     # 0x694a0
movq %rbx, %rdi
movl $0x3, %esi
callq 0x18370
leaq 0x2ed68(%rip), %rdx     # 0x55389
movq 0x436a8(%rip), %rcx     # 0x69cd0
movq %rbx, %rdi
movl $0x4, %esi
callq 0x18370
cmpl $0x0, (%r15)
je 0x2664f
movups 0x2ed69(%rip), %xmm0    # 0x553ab
movaps %xmm0, (%rsp)
movw $0x64, 0x10(%rsp)
jmp 0x2666c
movabsq $0x656c6449202020, %rax # imm = 0x656C6449202020
movq %rax, 0x7(%rsp)
movabsq $0x2020203a65746f56, %rax # imm = 0x2020203A65746F56
movq %rax, (%rsp)
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x6, %esi
xorl %ecx, %ecx
callq 0x18370
cmpl $0x0, (%r15)
je 0x266e4
movq 0x58(%rbx), %rax
movl 0x1108(%rax), %eax
testb $0x40, %al
jne 0x266ab
testb %al, %al
js 0x266c0
movups 0x2ed54(%rip), %xmm0    # 0x553f1
movaps %xmm0, (%rsp)
movl $0x646574, 0xf(%rsp)    # imm = 0x646574
jmp 0x266d2
movups 0x2ed1a(%rip), %xmm0    # 0x553cc
movaps %xmm0, (%rsp)
movl $0x534559, 0xf(%rsp)    # imm = 0x534559
jmp 0x266d2
movups 0x2ed18(%rip), %xmm0    # 0x553df
movaps %xmm0, (%rsp)
movw $0x4f, 0x10(%rsp)
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x8, %esi
xorl %ecx, %ecx
callq 0x18370
movl $0x0, 0xf88(%r14)
movq %rbx, %rdi
callq 0x196c0
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq