// File: /workspace/github_c_makefile_star2_O2/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 0x19590
movq 0x58(%rbx), %rax
movq 0x10b8(%rax), %rax
cmpq 0x4a610(%rip), %rax     # 0x668b8
je 0x1c380
cmpq 0x4a13b(%rip), %rax     # 0x663f0
je 0x1c39c
cmpq 0x4a9d6(%rip), %rax     # 0x66c98
je 0x1c3b8
cmpq 0x4a2e1(%rip), %rax     # 0x665b0
je 0x1c3d4
cmpq 0x4a9cc(%rip), %rax     # 0x66ca8
je 0x1c3f0
movq 0x4abe7(%rip), %rcx     # 0x66ed0
movq (%rcx), %r14
cmpq 0x4abad(%rip), %rax     # 0x66ea0
je 0x1c41a
cmpq 0x4a460(%rip), %rax     # 0x66760
je 0x1c459
cmpq 0x4a863(%rip), %rax     # 0x66b70
je 0x1c475
cmpq 0x4a6fe(%rip), %rax     # 0x66a18
je 0x1c491
cmpq 0x4a099(%rip), %rax     # 0x663c0
je 0x1c4ad
cmpq 0x4a40c(%rip), %rax     # 0x66740
je 0x1c4c9
cmpq 0x4a7cf(%rip), %rax     # 0x66b10
jne 0x1c4ff
movq %rbx, %rdi
callq 0x199b0
movq 0x58(%rbx), %rax
movl 0xf88(%rax), %ecx
imull $0xf, 0x10c4(%rax), %eax
addl %ecx, %eax
addl $-0x2, %eax
xorl %ecx, %ecx
cmpl %eax, %ecx
jge 0x1c4f5
testq %r14, %r14
je 0x1c4f5
movq 0x10(%r14), %r14
incl %ecx
jmp 0x1c367
movq %rbx, %rdi
callq 0x199b0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4ab86(%rip), %rcx     # 0x66f20
jmp 0x1c40a
movq %rbx, %rdi
callq 0x199b0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4a52a(%rip), %rcx     # 0x668e0
jmp 0x1c40a
movq %rbx, %rdi
callq 0x199b0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4a8b6(%rip), %rcx     # 0x66c88
jmp 0x1c40a
movq %rbx, %rdi
callq 0x199b0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4a4a2(%rip), %rcx     # 0x66890
jmp 0x1c40a
movq %rbx, %rdi
callq 0x199b0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4a806(%rip), %rcx     # 0x66c10
movq (%rcx,%rax,8), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x18350
movq %rbx, %rdi
callq 0x199b0
movq 0x58(%rbx), %rax
movl 0xf88(%rax), %ecx
imull $0xf, 0x10c4(%rax), %eax
addl %ecx, %eax
addl $-0x2, %eax
xorl %ecx, %ecx
cmpl %eax, %ecx
jge 0x1c44b
testq %r14, %r14
je 0x1c44b
movq 0x10(%r14), %r14
incl %ecx
jmp 0x1c43a
testq %r14, %r14
je 0x1c4ff
movq (%r14), %rdi
jmp 0x1c40e
movq %rbx, %rdi
callq 0x199b0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4aaad(%rip), %rcx     # 0x66f20
jmp 0x1c4e3
movq %rbx, %rdi
callq 0x199b0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4a451(%rip), %rcx     # 0x668e0
jmp 0x1c4e3
movq %rbx, %rdi
callq 0x199b0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4a7dd(%rip), %rcx     # 0x66c88
jmp 0x1c4e3
movq %rbx, %rdi
callq 0x199b0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4a3c9(%rip), %rcx     # 0x66890
jmp 0x1c4e3
movq %rbx, %rdi
callq 0x199b0
movq 0x58(%rbx), %rax
movslq 0xf88(%rax), %rax
movq 0x4a72d(%rip), %rcx     # 0x66c10
movq (%rcx,%rax,8), %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19910
testq %r14, %r14
je 0x1c4ff
movq (%r14), %rdi
jmp 0x1c4e7
addq $0x8, %rsp
popq %rbx
popq %r14
retq