// File: Stygain[P]bandwidth-monitor/src/main.cpp
// Function: resizeUI()
GraphMode resizeUI()
{
	logger->Log("New width: ");
	logger->Log(std::to_string(COLS));
	logger->Log("\n");

	logger->Log("New height: ");
	logger->Log(std::to_string(LINES));
	logger->Log("\n");

	gmLast = gm;
	gm = assessGraphUISize();
	logger->Log("GRAPH MODE: ");
	logger->Log(std::to_string((int)gm));
	logger->Log("\n");

	clear();

	footer->Resize(0, LINES-1, COLS, 1);


	switch (gm)
	{
		case GM_ONE:
		{
			int startXPos = 0;
			int startYPos = (interfaceRows.size() * 3) + 1;
			int width = COLS;
			int height = (LINES - startYPos - 2);
			graphs[0]->Resize(startXPos, startYPos, width, height);
			if (gmLast != gm)
			{
				if (gmLast == GM_TWO_WIDE || gmLast == GM_TWO_TALL)
				{
					delete graphs[1];
					graphs[1] = NULL;
				}
				if (gmLast == GM_FOUR_WIDE || gmLast == GM_FOUR_TALL || gmLast == GM_TWO_WIDE_TWO_TALL)
				{
					delete graphs[1];
					delete graphs[2];
					delete graphs[3];
					graphs[1] = NULL;
					graphs[2] = NULL;
					graphs[3] = NULL;
				}
			}
			break;
		}
		case GM_TWO_WIDE:
		{
			int startXPos = 0;
			int startYPos = (interfaceRows.size() * 3) + 1;
			int width = (int)(COLS / 2) - 1;
			int height = (LINES - startYPos - 2);
			graphs[0]->Resize(startXPos, startYPos, width, height);

			if (graphs[1] == NULL)
			{
				GraphType gt1 = (GraphType)settings->root["graphs"][1].asInt();
				graphs[1] = new Graph(gt1, &interfaces);
				graphs[1]->Create(startXPos + width, startYPos, width, height);
			}
			else
			{
				graphs[1]->Resize(startXPos + width, startYPos, width, height);
			}

			if (gmLast != gm)
			{
				if (gmLast == GM_FOUR_WIDE || gmLast == GM_FOUR_TALL || gmLast == GM_TWO_WIDE_TWO_TALL)
				{
					delete graphs[2];
					delete graphs[3];
					graphs[2] = NULL;
					graphs[3] = NULL;
				}
			}
			break;
		}
		case GM_TWO_TALL:
		{
			int startYPos = (interfaceRows.size() * 3) + 1;
			int startXPos = 0;
			int height = (int)((LINES - startYPos) / 2);
			int width = COLS;
			graphs[0]->Resize(startXPos, startYPos, width, height);

			if (graphs[1] == NULL)
			{
				GraphType gt1 = (GraphType)settings->root["graphs"][1].asInt();
				graphs[1] = new Graph(gt1, &interfaces);
				graphs[1]->Create(startXPos, startYPos + height, width, height);
			}
			else
			{
				graphs[1]->Resize(startXPos, startYPos + height, width, height);
			}

			if (gmLast != gm)
			{
				if (gmLast == GM_FOUR_WIDE || gmLast == GM_FOUR_TALL || gmLast == GM_TWO_WIDE_TWO_TALL)
				{
					delete graphs[2];
					delete graphs[3];
					graphs[2] = NULL;
					graphs[3] = NULL;
				}
			}
			break;
		}
		case GM_FOUR_WIDE:
		{
			int startXPos = 0;
			int startYPos = (interfaceRows.size() * 3) + 1;
			int width = (int)(COLS / 4) - 1;
			int height = LINES - startYPos - 2;
			graphs[0]->Resize(startXPos, startYPos, width, height);

			if (graphs[1] == NULL)
			{
				GraphType gt1 = (GraphType)settings->root["graphs"][1].asInt();
				graphs[1] = new Graph(gt1, &interfaces);
				graphs[1]->Create(startXPos + width + 1, startYPos, width, height);
			}
			else
			{
				graphs[1]->Resize(startXPos + width + 1, startYPos, width, height);
			}

			if (graphs[2] == NULL)
			{
				GraphType gt2 = (GraphType)settings->root["graphs"][2].asInt();
				graphs[2] = new Graph(gt2, &interfaces);
				graphs[2]->Create(startXPos + (width * 2) + 1, startYPos, width, height);
			}
			else
			{
				graphs[2]->Resize(startXPos + (width * 2) + 1, startYPos, width, height);
			}

			if (graphs[3] == NULL)
			{
				GraphType gt3 = (GraphType)settings->root["graphs"][3].asInt();
				graphs[3] = new Graph(gt3, &interfaces);
				graphs[3]->Create(startXPos + (width * 3) + 1, startYPos, width, height);
			}
			else
			{
				graphs[3]->Resize(startXPos + (width * 3) + 1, startYPos, width, height);
			}
			break;
		}
		case GM_FOUR_TALL:
		{
			int startYPos = (interfaceRows.size() * 3) + 1;
			int startXPos = 0;
			int height = (int)((LINES - startYPos) / 4) - 1;
			int width = COLS;
			graphs[0]->Resize(startXPos, startYPos, width, height);

			if (graphs[1] == NULL)
			{
				GraphType gt1 = (GraphType)settings->root["graphs"][1].asInt();
				graphs[1] = new Graph(gt1, &interfaces);
				graphs[1]->Create(startXPos, startYPos + height + 1, width, height);
			}
			else
			{
				graphs[1]->Resize(startXPos, startYPos + height + 1, width, height);
			}

			if (graphs[2] == NULL)
			{
				GraphType gt2 = (GraphType)settings->root["graphs"][2].asInt();
				graphs[2] = new Graph(gt2, &interfaces);
				graphs[2]->Create(startXPos, startYPos + (height * 2) + 1, width, height);
			}
			else
			{
				graphs[2]->Resize(startXPos, startYPos + (height * 2) + 1, width, height);
			}

			if (graphs[3] == NULL)
			{
				GraphType gt3 = (GraphType)settings->root["graphs"][3].asInt();
				graphs[3] = new Graph(gt3, &interfaces);
				graphs[3]->Create(startXPos, startYPos + (height * 3) + 1, width, height);
			}
			else
			{
				graphs[3]->Resize(startXPos, startYPos + (height * 3) + 1, width, height);
			}
			break;
		}
		case GM_TWO_WIDE_TWO_TALL:
		{
			int startYPos = (interfaceRows.size() * 3) + 1;
			int startXPos = 0;
			int height = (int)((LINES - startYPos) / 2) - 2;
			int width = (int)(COLS / 2) - 1;
			graphs[0]->Resize(startXPos, startYPos, width, height);

			if (graphs[1] == NULL)
			{
				GraphType gt1 = (GraphType)settings->root["graphs"][1].asInt();
				graphs[1] = new Graph(gt1, &interfaces);
				graphs[1]->Create(startXPos + width + 1, startYPos, width, height);
			}
			else
			{
				graphs[1]->Resize(startXPos + width + 1, startYPos, width, height);
			}

			if (graphs[2] == NULL)
			{
				GraphType gt2 = (GraphType)settings->root["graphs"][2].asInt();
				graphs[2] = new Graph(gt2, &interfaces);
				graphs[2]->Create(startXPos, startYPos + height + 1, width, height);
			}
			else
			{
				graphs[2]->Resize(startXPos, startYPos + height + 1, width, height);
			}

			if (graphs[3] == NULL)
			{
				GraphType gt3 = (GraphType)settings->root["graphs"][3].asInt();
				graphs[3] = new Graph(gt3, &interfaces);
				graphs[3]->Create(startXPos + width + 1, startYPos + height + 1, width, height);
			}
			else
			{
				graphs[3]->Resize(startXPos + width + 1, startYPos + height + 1, width, height);
			}
			break;
		}
	}

	if (selectionWindow != NULL)
	{
		selectionWindow->AutoResize();
	}

	return gm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
leaq 0x19186(%rip), %rax     # 0x1e3c8
movq %rax, -0x118(%rbp)
movq (%rax), %rdi
leaq 0x11012(%rip), %rsi     # 0x16265
callq 0x13910
movq -0x118(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x110(%rbp)
movq 0x18d50(%rip), %rax     # 0x1dfc0
movl (%rax), %esi
leaq -0x20(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x9d40
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rsi
callq 0x13940
jmp 0x5297
leaq -0x20(%rbp), %rdi
callq 0x3250
leaq 0x19121(%rip), %rax     # 0x1e3c8
movq %rax, -0x130(%rbp)
movq (%rax), %rdi
leaq 0x10fab(%rip), %rsi     # 0x16263
callq 0x13910
movq -0x130(%rbp), %rax
movq (%rax), %rdi
leaq 0x10fa3(%rip), %rsi     # 0x16271
callq 0x13910
movq -0x130(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x128(%rbp)
movq 0x18cc5(%rip), %rax     # 0x1dfb0
movl (%rax), %esi
leaq -0x50(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x9d40
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rsi
callq 0x13940
jmp 0x5312
leaq -0x50(%rbp), %rdi
callq 0x3250
leaq 0x190a6(%rip), %rax     # 0x1e3c8
movq %rax, -0x148(%rbp)
movq (%rax), %rdi
leaq 0x10f30(%rip), %rsi     # 0x16263
callq 0x13910
movl 0x19082(%rip), %eax     # 0x1e3c0
movl %eax, 0x19080(%rip)     # 0x1e3c4
callq 0x4ac0
movl %eax, %ecx
movq -0x148(%rbp), %rax
movl %ecx, 0x19068(%rip)     # 0x1e3c0
movq (%rax), %rdi
leaq 0x10f1c(%rip), %rsi     # 0x1627e
callq 0x13910
movq -0x148(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x140(%rbp)
movl 0x19042(%rip), %esi     # 0x1e3c0
leaq -0x70(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x9d40
movq -0x140(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq 0x13940
jmp 0x53a3
leaq -0x70(%rbp), %rdi
callq 0x3250
leaq 0x19015(%rip), %rax     # 0x1e3c8
movq (%rax), %rdi
leaq 0x10ea6(%rip), %rsi     # 0x16263
callq 0x13910
callq 0x35b0
movq 0x18fba(%rip), %rdi     # 0x1e388
movq 0x18bdb(%rip), %rax     # 0x1dfb0
movl (%rax), %edx
decl %edx
movq 0x18be0(%rip), %rax     # 0x1dfc0
movl (%rax), %ecx
xorl %esi, %esi
movl $0x1, %r8d
callq 0x14750
movl 0x18fcb(%rip), %eax     # 0x1e3c0
movq %rax, -0x150(%rbp)
subq $0x5, %rax
ja 0x67e7
movq -0x150(%rbp), %rax
leaq 0x10c60(%rip), %rcx     # 0x16074
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3250
jmp 0x680c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3250
jmp 0x680c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x3250
jmp 0x680c
movl $0x0, -0x74(%rbp)
leaq 0x18edf(%rip), %rdi     # 0x1e358
callq 0x9f40
imulq $0x3, %rax, %rax
addq $0x1, %rax
movl %eax, -0x78(%rbp)
movq 0x18b30(%rip), %rax     # 0x1dfc0
movl (%rax), %eax
movl %eax, -0x7c(%rbp)
movq 0x18b14(%rip), %rax     # 0x1dfb0
movl (%rax), %eax
subl -0x78(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x80(%rbp)
leaq 0x18efa(%rip), %rdi     # 0x1e3a8
xorl %eax, %eax
movl %eax, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0x74(%rbp), %esi
movl -0x78(%rbp), %edx
movl -0x7c(%rbp), %ecx
movl -0x80(%rbp), %r8d
callq 0xea70
movl 0x18ef2(%rip), %eax     # 0x1e3c4
cmpl 0x18ee8(%rip), %eax     # 0x1e3c0
je 0x5669
cmpl $0x1, 0x18edf(%rip)     # 0x1e3c4
je 0x54f0
cmpl $0x2, 0x18ed6(%rip)     # 0x1e3c4
jne 0x5546
leaq 0x18eb1(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq (%rax), %rax
movq %rax, -0x158(%rbp)
cmpq $0x0, %rax
je 0x552e
movq -0x158(%rbp), %rdi
callq 0xe720
movq -0x158(%rbp), %rdi
movl $0x78, %esi
callq 0x3330
leaq 0x18e73(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq $0x0, (%rax)
cmpl $0x3, 0x18e77(%rip)     # 0x1e3c4
je 0x5565
cmpl $0x4, 0x18e6e(%rip)     # 0x1e3c4
je 0x5565
cmpl $0x5, 0x18e65(%rip)     # 0x1e3c4
jne 0x5667
leaq 0x18e3c(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq (%rax), %rax
movq %rax, -0x160(%rbp)
cmpq $0x0, %rax
je 0x55a3
movq -0x160(%rbp), %rdi
callq 0xe720
movq -0x160(%rbp), %rdi
movl $0x78, %esi
callq 0x3330
leaq 0x18dfe(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq (%rax), %rax
movq %rax, -0x168(%rbp)
cmpq $0x0, %rax
je 0x55e1
movq -0x168(%rbp), %rdi
callq 0xe720
movq -0x168(%rbp), %rdi
movl $0x78, %esi
callq 0x3330
leaq 0x18dc0(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq (%rax), %rax
movq %rax, -0x170(%rbp)
cmpq $0x0, %rax
je 0x561f
movq -0x170(%rbp), %rdi
callq 0xe720
movq -0x170(%rbp), %rdi
movl $0x78, %esi
callq 0x3330
leaq 0x18d82(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq $0x0, (%rax)
leaq 0x18d6a(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq $0x0, (%rax)
leaq 0x18d52(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq $0x0, (%rax)
jmp 0x5669
jmp 0x67e7
movl $0x0, -0x84(%rbp)
leaq 0x18cd9(%rip), %rdi     # 0x1e358
callq 0x9f40
imulq $0x3, %rax, %rax
addq $0x1, %rax
movl %eax, -0x88(%rbp)
movq 0x18927(%rip), %rax     # 0x1dfc0
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
subl $0x1, %eax
movl %eax, -0x8c(%rbp)
movq 0x188fd(%rip), %rax     # 0x1dfb0
movl (%rax), %eax
subl -0x88(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x90(%rbp)
leaq 0x18cdd(%rip), %rdi     # 0x1e3a8
xorl %eax, %eax
movl %eax, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0x84(%rbp), %esi
movl -0x88(%rbp), %edx
movl -0x8c(%rbp), %ecx
movl -0x90(%rbp), %r8d
callq 0xea70
leaq 0x18cac(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
cmpq $0x0, (%rax)
jne 0x57e3
leaq 0x18cc1(%rip), %rax     # 0x1e3d8
movq (%rax), %rdi
leaq 0x10b6a(%rip), %rsi     # 0x1628b
callq 0x3140
movq %rax, %rdi
movl $0x1, %esi
callq 0x3380
movq %rax, %rdi
callq 0x34d0
movl %eax, -0x94(%rbp)
movl $0x78, %edi
callq 0x3320
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x178(%rbp)
movl -0x94(%rbp), %esi
leaq 0x18c0b(%rip), %rdx     # 0x1e370
callq 0xe600
jmp 0x576c
leaq 0x18c35(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq -0x178(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x18c1a(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0x84(%rbp), %esi
addl -0x8c(%rbp), %esi
movl -0x88(%rbp), %edx
movl -0x8c(%rbp), %ecx
movl -0x90(%rbp), %r8d
callq 0xe7b0
jmp 0x581b
movq -0x178(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x78, %esi
callq 0x3330
jmp 0x680c
leaq 0x18bbe(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0x84(%rbp), %esi
addl -0x8c(%rbp), %esi
movl -0x88(%rbp), %edx
movl -0x8c(%rbp), %ecx
movl -0x90(%rbp), %r8d
callq 0xea70
movl 0x18ba3(%rip), %eax     # 0x1e3c4
cmpl 0x18b99(%rip), %eax     # 0x1e3c0
je 0x58fa
cmpl $0x3, 0x18b90(%rip)     # 0x1e3c4
je 0x584c
cmpl $0x4, 0x18b87(%rip)     # 0x1e3c4
je 0x584c
cmpl $0x5, 0x18b7e(%rip)     # 0x1e3c4
jne 0x58f8
leaq 0x18b55(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq (%rax), %rax
movq %rax, -0x180(%rbp)
cmpq $0x0, %rax
je 0x588a
movq -0x180(%rbp), %rdi
callq 0xe720
movq -0x180(%rbp), %rdi
movl $0x78, %esi
callq 0x3330
leaq 0x18b17(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq (%rax), %rax
movq %rax, -0x188(%rbp)
cmpq $0x0, %rax
je 0x58c8
movq -0x188(%rbp), %rdi
callq 0xe720
movq -0x188(%rbp), %rdi
movl $0x78, %esi
callq 0x3330
leaq 0x18ad9(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq $0x0, (%rax)
leaq 0x18ac1(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq $0x0, (%rax)
jmp 0x58fa
jmp 0x67e7
leaq 0x18a52(%rip), %rdi     # 0x1e358
callq 0x9f40
imulq $0x3, %rax, %rax
addq $0x1, %rax
movl %eax, -0x98(%rbp)
movl $0x0, -0x9c(%rbp)
movq 0x18686(%rip), %rax     # 0x1dfb0
movl (%rax), %eax
subl -0x98(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0xa0(%rbp)
movq 0x18679(%rip), %rax     # 0x1dfc0
movl (%rax), %eax
movl %eax, -0xa4(%rbp)
leaq 0x18a52(%rip), %rdi     # 0x1e3a8
xorl %eax, %eax
movl %eax, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0x9c(%rbp), %esi
movl -0x98(%rbp), %edx
movl -0xa4(%rbp), %ecx
movl -0xa0(%rbp), %r8d
callq 0xea70
leaq 0x18a21(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
cmpq $0x0, (%rax)
jne 0x5a6e
leaq 0x18a36(%rip), %rax     # 0x1e3d8
movq (%rax), %rdi
leaq 0x108df(%rip), %rsi     # 0x1628b
callq 0x3140
movq %rax, %rdi
movl $0x1, %esi
callq 0x3380
movq %rax, %rdi
callq 0x34d0
movl %eax, -0xa8(%rbp)
movl $0x78, %edi
callq 0x3320
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x190(%rbp)
movl -0xa8(%rbp), %esi
leaq 0x18980(%rip), %rdx     # 0x1e370
callq 0xe600
jmp 0x59f7
leaq 0x189aa(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq -0x190(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x1898f(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0x9c(%rbp), %esi
movl -0x98(%rbp), %edx
addl -0xa0(%rbp), %edx
movl -0xa4(%rbp), %ecx
movl -0xa0(%rbp), %r8d
callq 0xe7b0
jmp 0x5aa6
movq -0x190(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x78, %esi
callq 0x3330
jmp 0x680c
leaq 0x18933(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0x9c(%rbp), %esi
movl -0x98(%rbp), %edx
addl -0xa0(%rbp), %edx
movl -0xa4(%rbp), %ecx
movl -0xa0(%rbp), %r8d
callq 0xea70
movl 0x18918(%rip), %eax     # 0x1e3c4
cmpl 0x1890e(%rip), %eax     # 0x1e3c0
je 0x5b85
cmpl $0x3, 0x18905(%rip)     # 0x1e3c4
je 0x5ad7
cmpl $0x4, 0x188fc(%rip)     # 0x1e3c4
je 0x5ad7
cmpl $0x5, 0x188f3(%rip)     # 0x1e3c4
jne 0x5b83
leaq 0x188ca(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq (%rax), %rax
movq %rax, -0x198(%rbp)
cmpq $0x0, %rax
je 0x5b15
movq -0x198(%rbp), %rdi
callq 0xe720
movq -0x198(%rbp), %rdi
movl $0x78, %esi
callq 0x3330
leaq 0x1888c(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq (%rax), %rax
movq %rax, -0x1a0(%rbp)
cmpq $0x0, %rax
je 0x5b53
movq -0x1a0(%rbp), %rdi
callq 0xe720
movq -0x1a0(%rbp), %rdi
movl $0x78, %esi
callq 0x3330
leaq 0x1884e(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq $0x0, (%rax)
leaq 0x18836(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq $0x0, (%rax)
jmp 0x5b85
jmp 0x67e7
movl $0x0, -0xac(%rbp)
leaq 0x187bd(%rip), %rdi     # 0x1e358
callq 0x9f40
imulq $0x3, %rax, %rax
addq $0x1, %rax
movl %eax, -0xb0(%rbp)
movq 0x1840b(%rip), %rax     # 0x1dfc0
movl (%rax), %eax
movl $0x4, %ecx
cltd
idivl %ecx
subl $0x1, %eax
movl %eax, -0xb4(%rbp)
movq 0x183e1(%rip), %rax     # 0x1dfb0
movl (%rax), %eax
subl -0xb0(%rbp), %eax
subl $0x2, %eax
movl %eax, -0xb8(%rbp)
leaq 0x187c1(%rip), %rdi     # 0x1e3a8
xorl %eax, %eax
movl %eax, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xac(%rbp), %esi
movl -0xb0(%rbp), %edx
movl -0xb4(%rbp), %ecx
movl -0xb8(%rbp), %r8d
callq 0xea70
leaq 0x18790(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
cmpq $0x0, (%rax)
jne 0x5d02
leaq 0x187a5(%rip), %rax     # 0x1e3d8
movq (%rax), %rdi
leaq 0x1064e(%rip), %rsi     # 0x1628b
callq 0x3140
movq %rax, %rdi
movl $0x1, %esi
callq 0x3380
movq %rax, %rdi
callq 0x34d0
movl %eax, -0xbc(%rbp)
movl $0x78, %edi
callq 0x3320
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1a8(%rbp)
movl -0xbc(%rbp), %esi
leaq 0x186ef(%rip), %rdx     # 0x1e370
callq 0xe600
jmp 0x5c88
leaq 0x18719(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq -0x1a8(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x186fe(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xac(%rbp), %esi
addl -0xb4(%rbp), %esi
addl $0x1, %esi
movl -0xb0(%rbp), %edx
movl -0xb4(%rbp), %ecx
movl -0xb8(%rbp), %r8d
callq 0xe7b0
jmp 0x5d3d
movq -0x1a8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x78, %esi
callq 0x3330
jmp 0x680c
leaq 0x1869f(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xac(%rbp), %esi
addl -0xb4(%rbp), %esi
addl $0x1, %esi
movl -0xb0(%rbp), %edx
movl -0xb4(%rbp), %ecx
movl -0xb8(%rbp), %r8d
callq 0xea70
leaq 0x18664(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
cmpq $0x0, (%rax)
jne 0x5e32
leaq 0x18679(%rip), %rax     # 0x1e3d8
movq (%rax), %rdi
leaq 0x10522(%rip), %rsi     # 0x1628b
callq 0x3140
movq %rax, %rdi
movl $0x2, %esi
callq 0x3380
movq %rax, %rdi
callq 0x34d0
movl %eax, -0xc0(%rbp)
movl $0x78, %edi
callq 0x3320
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1b0(%rbp)
movl -0xc0(%rbp), %esi
leaq 0x185c3(%rip), %rdx     # 0x1e370
callq 0xe600
jmp 0x5db4
leaq 0x185ed(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq -0x1b0(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x185d2(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xac(%rbp), %esi
movl -0xb4(%rbp), %eax
shll %eax
addl %eax, %esi
addl $0x1, %esi
movl -0xb0(%rbp), %edx
movl -0xb4(%rbp), %ecx
movl -0xb8(%rbp), %r8d
callq 0xe7b0
jmp 0x5e71
movq -0x1b0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x78, %esi
callq 0x3330
jmp 0x680c
leaq 0x1856f(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xac(%rbp), %esi
movl -0xb4(%rbp), %eax
shll %eax
addl %eax, %esi
addl $0x1, %esi
movl -0xb0(%rbp), %edx
movl -0xb4(%rbp), %ecx
movl -0xb8(%rbp), %r8d
callq 0xea70
leaq 0x18530(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
cmpq $0x0, (%rax)
jne 0x5f65
leaq 0x18545(%rip), %rax     # 0x1e3d8
movq (%rax), %rdi
leaq 0x103ee(%rip), %rsi     # 0x1628b
callq 0x3140
movq %rax, %rdi
movl $0x3, %esi
callq 0x3380
movq %rax, %rdi
callq 0x34d0
movl %eax, -0xc4(%rbp)
movl $0x78, %edi
callq 0x3320
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1b8(%rbp)
movl -0xc4(%rbp), %esi
leaq 0x1848f(%rip), %rdx     # 0x1e370
callq 0xe600
jmp 0x5ee8
leaq 0x184b9(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq -0x1b8(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x1849e(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xac(%rbp), %esi
imull $0x3, -0xb4(%rbp), %eax
addl %eax, %esi
addl $0x1, %esi
movl -0xb0(%rbp), %edx
movl -0xb4(%rbp), %ecx
movl -0xb8(%rbp), %r8d
callq 0xe7b0
jmp 0x5fa3
movq -0x1b8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x78, %esi
callq 0x3330
jmp 0x680c
leaq 0x1843c(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xac(%rbp), %esi
imull $0x3, -0xb4(%rbp), %eax
addl %eax, %esi
addl $0x1, %esi
movl -0xb0(%rbp), %edx
movl -0xb4(%rbp), %ecx
movl -0xb8(%rbp), %r8d
callq 0xea70
jmp 0x67e7
leaq 0x183a9(%rip), %rdi     # 0x1e358
callq 0x9f40
imulq $0x3, %rax, %rax
addq $0x1, %rax
movl %eax, -0xc8(%rbp)
movl $0x0, -0xcc(%rbp)
movq 0x17fdd(%rip), %rax     # 0x1dfb0
movl (%rax), %eax
subl -0xc8(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
subl $0x1, %eax
movl %eax, -0xd0(%rbp)
movq 0x17fcd(%rip), %rax     # 0x1dfc0
movl (%rax), %eax
movl %eax, -0xd4(%rbp)
leaq 0x183a6(%rip), %rdi     # 0x1e3a8
xorl %eax, %eax
movl %eax, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xcc(%rbp), %esi
movl -0xc8(%rbp), %edx
movl -0xd4(%rbp), %ecx
movl -0xd0(%rbp), %r8d
callq 0xea70
leaq 0x18375(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
cmpq $0x0, (%rax)
jne 0x611d
leaq 0x1838a(%rip), %rax     # 0x1e3d8
movq (%rax), %rdi
leaq 0x10233(%rip), %rsi     # 0x1628b
callq 0x3140
movq %rax, %rdi
movl $0x1, %esi
callq 0x3380
movq %rax, %rdi
callq 0x34d0
movl %eax, -0xd8(%rbp)
movl $0x78, %edi
callq 0x3320
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1c0(%rbp)
movl -0xd8(%rbp), %esi
leaq 0x182d4(%rip), %rdx     # 0x1e370
callq 0xe600
jmp 0x60a3
leaq 0x182fe(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq -0x1c0(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x182e3(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xcc(%rbp), %esi
movl -0xc8(%rbp), %edx
addl -0xd0(%rbp), %edx
addl $0x1, %edx
movl -0xd4(%rbp), %ecx
movl -0xd0(%rbp), %r8d
callq 0xe7b0
jmp 0x6158
movq -0x1c0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x78, %esi
callq 0x3330
jmp 0x680c
leaq 0x18284(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xcc(%rbp), %esi
movl -0xc8(%rbp), %edx
addl -0xd0(%rbp), %edx
addl $0x1, %edx
movl -0xd4(%rbp), %ecx
movl -0xd0(%rbp), %r8d
callq 0xea70
leaq 0x18249(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
cmpq $0x0, (%rax)
jne 0x624d
leaq 0x1825e(%rip), %rax     # 0x1e3d8
movq (%rax), %rdi
leaq 0x10107(%rip), %rsi     # 0x1628b
callq 0x3140
movq %rax, %rdi
movl $0x2, %esi
callq 0x3380
movq %rax, %rdi
callq 0x34d0
movl %eax, -0xdc(%rbp)
movl $0x78, %edi
callq 0x3320
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1c8(%rbp)
movl -0xdc(%rbp), %esi
leaq 0x181a8(%rip), %rdx     # 0x1e370
callq 0xe600
jmp 0x61cf
leaq 0x181d2(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq -0x1c8(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x181b7(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xcc(%rbp), %esi
movl -0xc8(%rbp), %edx
movl -0xd0(%rbp), %eax
shll %eax
addl %eax, %edx
addl $0x1, %edx
movl -0xd4(%rbp), %ecx
movl -0xd0(%rbp), %r8d
callq 0xe7b0
jmp 0x628c
movq -0x1c8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x78, %esi
callq 0x3330
jmp 0x680c
leaq 0x18154(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xcc(%rbp), %esi
movl -0xc8(%rbp), %edx
movl -0xd0(%rbp), %eax
shll %eax
addl %eax, %edx
addl $0x1, %edx
movl -0xd4(%rbp), %ecx
movl -0xd0(%rbp), %r8d
callq 0xea70
leaq 0x18115(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
cmpq $0x0, (%rax)
jne 0x6380
leaq 0x1812a(%rip), %rax     # 0x1e3d8
movq (%rax), %rdi
leaq 0xffd3(%rip), %rsi      # 0x1628b
callq 0x3140
movq %rax, %rdi
movl $0x3, %esi
callq 0x3380
movq %rax, %rdi
callq 0x34d0
movl %eax, -0xe0(%rbp)
movl $0x78, %edi
callq 0x3320
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1d0(%rbp)
movl -0xe0(%rbp), %esi
leaq 0x18074(%rip), %rdx     # 0x1e370
callq 0xe600
jmp 0x6303
leaq 0x1809e(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq -0x1d0(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x18083(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xcc(%rbp), %esi
movl -0xc8(%rbp), %edx
imull $0x3, -0xd0(%rbp), %eax
addl %eax, %edx
addl $0x1, %edx
movl -0xd4(%rbp), %ecx
movl -0xd0(%rbp), %r8d
callq 0xe7b0
jmp 0x63be
movq -0x1d0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x78, %esi
callq 0x3330
jmp 0x680c
leaq 0x18021(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xcc(%rbp), %esi
movl -0xc8(%rbp), %edx
imull $0x3, -0xd0(%rbp), %eax
addl %eax, %edx
addl $0x1, %edx
movl -0xd4(%rbp), %ecx
movl -0xd0(%rbp), %r8d
callq 0xea70
jmp 0x67e7
leaq 0x17f8e(%rip), %rdi     # 0x1e358
callq 0x9f40
imulq $0x3, %rax, %rax
addq $0x1, %rax
movl %eax, -0xe4(%rbp)
movl $0x0, -0xe8(%rbp)
movq 0x17bc2(%rip), %rax     # 0x1dfb0
movl (%rax), %eax
subl -0xe4(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
subl $0x2, %eax
movl %eax, -0xec(%rbp)
movq 0x17bb2(%rip), %rax     # 0x1dfc0
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
subl $0x1, %eax
movl %eax, -0xf0(%rbp)
leaq 0x17f80(%rip), %rdi     # 0x1e3a8
xorl %eax, %eax
movl %eax, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xe8(%rbp), %esi
movl -0xe4(%rbp), %edx
movl -0xf0(%rbp), %ecx
movl -0xec(%rbp), %r8d
callq 0xea70
leaq 0x17f4f(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
cmpq $0x0, (%rax)
jne 0x6543
leaq 0x17f64(%rip), %rax     # 0x1e3d8
movq (%rax), %rdi
leaq 0xfe0d(%rip), %rsi      # 0x1628b
callq 0x3140
movq %rax, %rdi
movl $0x1, %esi
callq 0x3380
movq %rax, %rdi
callq 0x34d0
movl %eax, -0xf4(%rbp)
movl $0x78, %edi
callq 0x3320
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1d8(%rbp)
movl -0xf4(%rbp), %esi
leaq 0x17eae(%rip), %rdx     # 0x1e370
callq 0xe600
jmp 0x64c9
leaq 0x17ed8(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq -0x1d8(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x17ebd(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xe8(%rbp), %esi
addl -0xf0(%rbp), %esi
addl $0x1, %esi
movl -0xe4(%rbp), %edx
movl -0xf0(%rbp), %ecx
movl -0xec(%rbp), %r8d
callq 0xe7b0
jmp 0x657e
movq -0x1d8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x78, %esi
callq 0x3330
jmp 0x680c
leaq 0x17e5e(%rip), %rdi     # 0x1e3a8
movl $0x1, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xe8(%rbp), %esi
addl -0xf0(%rbp), %esi
addl $0x1, %esi
movl -0xe4(%rbp), %edx
movl -0xf0(%rbp), %ecx
movl -0xec(%rbp), %r8d
callq 0xea70
leaq 0x17e23(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
cmpq $0x0, (%rax)
jne 0x666f
leaq 0x17e38(%rip), %rax     # 0x1e3d8
movq (%rax), %rdi
leaq 0xfce1(%rip), %rsi      # 0x1628b
callq 0x3140
movq %rax, %rdi
movl $0x2, %esi
callq 0x3380
movq %rax, %rdi
callq 0x34d0
movl %eax, -0xf8(%rbp)
movl $0x78, %edi
callq 0x3320
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1e0(%rbp)
movl -0xf8(%rbp), %esi
leaq 0x17d82(%rip), %rdx     # 0x1e370
callq 0xe600
jmp 0x65f5
leaq 0x17dac(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq -0x1e0(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x17d91(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xe8(%rbp), %esi
movl -0xe4(%rbp), %edx
addl -0xec(%rbp), %edx
addl $0x1, %edx
movl -0xf0(%rbp), %ecx
movl -0xec(%rbp), %r8d
callq 0xe7b0
jmp 0x66aa
movq -0x1e0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x78, %esi
callq 0x3330
jmp 0x680c
leaq 0x17d32(%rip), %rdi     # 0x1e3a8
movl $0x2, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xe8(%rbp), %esi
movl -0xe4(%rbp), %edx
addl -0xec(%rbp), %edx
addl $0x1, %edx
movl -0xf0(%rbp), %ecx
movl -0xec(%rbp), %r8d
callq 0xea70
leaq 0x17cf7(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
cmpq $0x0, (%rax)
jne 0x67a1
leaq 0x17d0c(%rip), %rax     # 0x1e3d8
movq (%rax), %rdi
leaq 0xfbb5(%rip), %rsi      # 0x1628b
callq 0x3140
movq %rax, %rdi
movl $0x3, %esi
callq 0x3380
movq %rax, %rdi
callq 0x34d0
movl %eax, -0xfc(%rbp)
movl $0x78, %edi
callq 0x3320
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1e8(%rbp)
movl -0xfc(%rbp), %esi
leaq 0x17c56(%rip), %rdx     # 0x1e370
callq 0xe600
jmp 0x6721
leaq 0x17c80(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq -0x1e8(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x17c65(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xe8(%rbp), %esi
addl -0xf0(%rbp), %esi
addl $0x1, %esi
movl -0xe4(%rbp), %edx
addl -0xec(%rbp), %edx
addl $0x1, %edx
movl -0xf0(%rbp), %ecx
movl -0xec(%rbp), %r8d
callq 0xe7b0
jmp 0x67e5
movq -0x1e8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x78, %esi
callq 0x3330
jmp 0x680c
leaq 0x17c00(%rip), %rdi     # 0x1e3a8
movl $0x3, %esi
callq 0x9f60
movq (%rax), %rdi
movl -0xe8(%rbp), %esi
addl -0xf0(%rbp), %esi
addl $0x1, %esi
movl -0xe4(%rbp), %edx
addl -0xec(%rbp), %edx
addl $0x1, %edx
movl -0xf0(%rbp), %ecx
movl -0xec(%rbp), %r8d
callq 0xea70
jmp 0x67e7
cmpq $0x0, 0x17ba1(%rip)     # 0x1e390
je 0x67fd
movq 0x17b98(%rip), %rdi     # 0x1e390
callq 0x144c0
movl 0x17bbd(%rip), %eax     # 0x1e3c0
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x35c0
nopw %cs:(%rax,%rax)