// File: /workspace/github_c_makefile_star2_O1/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 0x4c214(%rip), %rax     # 0x698b8
je 0x1d7a2
cmpq 0x4bd3f(%rip), %rax     # 0x693f0
je 0x1d7be
cmpq 0x4c5da(%rip), %rax     # 0x69c98
je 0x1d7da
cmpq 0x4bee5(%rip), %rax     # 0x695b0
je 0x1d7f6
cmpq 0x4c5d0(%rip), %rax     # 0x69ca8
je 0x1d812
movq 0x4c7eb(%rip), %rcx     # 0x69ed0
movq (%rcx), %r14
cmpq 0x4c7b1(%rip), %rax     # 0x69ea0
je 0x1d83c
cmpq 0x4c064(%rip), %rax     # 0x69760
je 0x1d89c
cmpq 0x4c467(%rip), %rax     # 0x69b70
je 0x1d8b8
cmpq 0x4c302(%rip), %rax     # 0x69a18
je 0x1d8d4
cmpq 0x4bc9d(%rip), %rax     # 0x693c0
je 0x1d8f0
cmpq 0x4c010(%rip), %rax     # 0x69740
je 0x1d90c
cmpq 0x4c3d3(%rip), %rax     # 0x69b10
jne 0x1d894
movq %rbx, %rdi
callq 0x197e0
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 0x1d792
movl $0x1, %edx
movq 0x10(%r14), %r14
testq %r14, %r14
setne %cl
cmpl %eax, %edx
jge 0x1d792
incl %edx
testq %r14, %r14
jne 0x1d77d
testb %cl, %cl
je 0x1d894
movq (%r14), %rdi
jmp 0x1d92a
movq %rbx, %rdi
callq 0x197e0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4c764(%rip), %rcx     # 0x69f20
jmp 0x1d82c
movq %rbx, %rdi
callq 0x197e0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4c108(%rip), %rcx     # 0x698e0
jmp 0x1d82c
movq %rbx, %rdi
callq 0x197e0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4c494(%rip), %rcx     # 0x69c88
jmp 0x1d82c
movq %rbx, %rdi
callq 0x197e0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4c080(%rip), %rcx     # 0x69890
jmp 0x1d82c
movq %rbx, %rdi
callq 0x197e0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4c3e4(%rip), %rcx     # 0x69c10
movq (%rcx,%rax,8), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x18320
movq %rbx, %rdi
callq 0x197e0
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 0x1d88b
movl $0x1, %edx
movq 0x10(%r14), %r14
testq %r14, %r14
setne %cl
cmpl %eax, %edx
jge 0x1d88b
incl %edx
testq %r14, %r14
jne 0x1d876
testb %cl, %cl
je 0x1d894
movq (%r14), %rdi
jmp 0x1d830
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x197e0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4c66a(%rip), %rcx     # 0x69f20
jmp 0x1d926
movq %rbx, %rdi
callq 0x197e0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4c00e(%rip), %rcx     # 0x698e0
jmp 0x1d926
movq %rbx, %rdi
callq 0x197e0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4c39a(%rip), %rcx     # 0x69c88
jmp 0x1d926
movq %rbx, %rdi
callq 0x197e0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4bf86(%rip), %rcx     # 0x69890
jmp 0x1d926
movq %rbx, %rdi
callq 0x197e0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4c2ea(%rip), %rcx     # 0x69c10
movq (%rcx,%rax,8), %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19750