// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_menu.c
// Function: SetMap
void SetMap (edict_t *ent)
{
	int i;
	SetupShortList();
	MapInfo *slPtr = shortList;

	if (ent->client->prevmenu == Ref_Match_A_Menu)
	{
		Ctf_Menu(ent); // turn off menu
		StartMatch (mapalist[ent->client->menuselect]);
	}
	else if (ent->client->prevmenu == Ref_Match_B_Menu)
	{
		Ctf_Menu(ent); // turn off menu
		StartMatch (mapblist[ent->client->menuselect]);
	}
	else if (ent->client->prevmenu == Ref_Match_C_Menu)
	{
		Ctf_Menu(ent); // turn off menu
		StartMatch (mapclist[ent->client->menuselect]);
	}
	else if (ent->client->prevmenu == Ref_Match_D_Menu)
	{
		Ctf_Menu(ent); // turn off menu
		StartMatch (mapdlist[ent->client->menuselect]);
	}
	else if (ent->client->prevmenu == Ref_Match_E_Menu)
	{
		Ctf_Menu(ent); // turn off menu
		StartMatch (mapelist[ent->client->menuselect]);
	}
	else if (ent->client->prevmenu == Ref_Match_Maplist_Menu)
	{
		Ctf_Menu(ent); // turn off menu
		i = (ent->client->menuselect - 2)+ent->client->menulastpage*15;
	 	for (int ctr = 0; ctr < i && slPtr; ctr++)
			slPtr = slPtr->next;
		if (slPtr)
			StartMatch (slPtr->mapname);
	}
	else if (ent->client->prevmenu == Ref_Map_A_Menu)
	{
		Ctf_Menu(ent); // turn off menu
		ctf_ChangeMap(mapalist[ent->client->menuselect], false);
	}
	else if (ent->client->prevmenu == Ref_Map_B_Menu)
	{
		Ctf_Menu(ent); // turn off menu
		ctf_ChangeMap(mapblist[ent->client->menuselect], false);
	}
	else if (ent->client->prevmenu == Ref_Map_C_Menu)
	{
		Ctf_Menu(ent); // turn off menu
		ctf_ChangeMap(mapclist[ent->client->menuselect], false);
	}
	else if (ent->client->prevmenu == Ref_Map_D_Menu)
	{
		Ctf_Menu(ent); // turn off menu
		ctf_ChangeMap(mapdlist[ent->client->menuselect], false);
	}
	else if (ent->client->prevmenu == Ref_Map_E_Menu)
	{
		Ctf_Menu(ent); // turn off menu
		ctf_ChangeMap(mapelist[ent->client->menuselect], false);
	}
	else if (ent->client->prevmenu == Ref_Map_Maplist_Menu)
	{
		Ctf_Menu(ent); // turn off menu
		i = (ent->client->menuselect - 2)+ent->client->menulastpage*15;
	 	for (int ctr = 0; ctr < i && slPtr; ctr++)
			slPtr = slPtr->next;
		if (slPtr)
			ctf_ChangeMap(slPtr->mapname, false);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x193e0
movq 0x58(%rbx), %rax
movq 0x10b8(%rax), %rax
cmpq 0x4b221(%rip), %rax     # 0x688b8
je 0x1d795
cmpq 0x4ad4c(%rip), %rax     # 0x683f0
je 0x1d7b1
cmpq 0x4b5e7(%rip), %rax     # 0x68c98
je 0x1d7cd
cmpq 0x4aef2(%rip), %rax     # 0x685b0
je 0x1d7e9
cmpq 0x4b5dd(%rip), %rax     # 0x68ca8
je 0x1d805
movq 0x4b7f8(%rip), %rcx     # 0x68ed0
movq (%rcx), %r14
cmpq 0x4b7be(%rip), %rax     # 0x68ea0
je 0x1d82f
cmpq 0x4b071(%rip), %rax     # 0x68760
je 0x1d88f
cmpq 0x4b474(%rip), %rax     # 0x68b70
je 0x1d8ab
cmpq 0x4b30f(%rip), %rax     # 0x68a18
je 0x1d8c7
cmpq 0x4acaa(%rip), %rax     # 0x683c0
je 0x1d8e3
cmpq 0x4b01d(%rip), %rax     # 0x68740
je 0x1d8ff
cmpq 0x4b3e0(%rip), %rax     # 0x68b10
jne 0x1d887
movq %rbx, %rdi
callq 0x197d0
movq 0x58(%rbx), %rax
movl 0xf88(%rax), %ecx
movl 0x10c4(%rax), %eax
leal (%rax,%rax,4), %eax
leal (%rax,%rax,2), %eax
addl %ecx, %eax
addl $-0x2, %eax
testl %eax, %eax
setg %dl
testq %r14, %r14
setne %cl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1d785
movl $0x1, %edx
movq 0x10(%r14), %r14
testq %r14, %r14
setne %cl
cmpl %eax, %edx
jge 0x1d785
incl %edx
testq %r14, %r14
jne 0x1d770
testb %cl, %cl
je 0x1d887
movq (%r14), %rdi
jmp 0x1d91d
movq %rbx, %rdi
callq 0x197d0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4b771(%rip), %rcx     # 0x68f20
jmp 0x1d81f
movq %rbx, %rdi
callq 0x197d0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4b115(%rip), %rcx     # 0x688e0
jmp 0x1d81f
movq %rbx, %rdi
callq 0x197d0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4b4a1(%rip), %rcx     # 0x68c88
jmp 0x1d81f
movq %rbx, %rdi
callq 0x197d0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4b08d(%rip), %rcx     # 0x68890
jmp 0x1d81f
movq %rbx, %rdi
callq 0x197d0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4b3f1(%rip), %rcx     # 0x68c10
movq (%rcx,%rax,8), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x18320
movq %rbx, %rdi
callq 0x197d0
movq 0x58(%rbx), %rax
movl 0xf88(%rax), %ecx
movl 0x10c4(%rax), %eax
leal (%rax,%rax,4), %eax
leal (%rax,%rax,2), %eax
addl %ecx, %eax
addl $-0x2, %eax
testl %eax, %eax
setg %dl
testq %r14, %r14
setne %cl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1d87e
movl $0x1, %edx
movq 0x10(%r14), %r14
testq %r14, %r14
setne %cl
cmpl %eax, %edx
jge 0x1d87e
incl %edx
testq %r14, %r14
jne 0x1d869
testb %cl, %cl
je 0x1d887
movq (%r14), %rdi
jmp 0x1d823
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x197d0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4b677(%rip), %rcx     # 0x68f20
jmp 0x1d919
movq %rbx, %rdi
callq 0x197d0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4b01b(%rip), %rcx     # 0x688e0
jmp 0x1d919
movq %rbx, %rdi
callq 0x197d0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4b3a7(%rip), %rcx     # 0x68c88
jmp 0x1d919
movq %rbx, %rdi
callq 0x197d0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4af93(%rip), %rcx     # 0x68890
jmp 0x1d919
movq %rbx, %rdi
callq 0x197d0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4b2f7(%rip), %rcx     # 0x68c10
movq (%rcx,%rax,8), %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19740