// File: essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: make_room(std::pair<int, int>, std::pair<int, int>)
void make_room(std::pair<int,int> centre, std::pair<int,int> size)
{
	int x=centre.first;int y=centre.second;int xsize=size.first;int ysize=size.second;
	std::vector<std::pair<int,int>> inner_walls;
	std::vector<std::pair<int,int>> outer_walls;
	for(int i=0;i<xsize+2;i++)
	{
		for(int j=0;j<ysize+2;j++)
		{
			if(i==0 || i == xsize+1 || j==0 || j==ysize+1)
			{
				if (map_terrain[i+x-xsize/2][j+y-ysize/2] == DIRT || map_terrain[i+x-xsize/2][j+y-ysize/2] == STREE || map_terrain[i+x-xsize/2][j+y-ysize/2] == BTREE)
				{
					map_terrain[i+x-xsize/2][j+y-ysize/2] = WALL;
					if(!is_corner_a(i,j,xsize+1,ysize+1))
					{ outer_walls.push_back(std::make_pair(i+x-xsize/2,j+y-ysize/2)); }
				}
			}
			else
			{
				if(map_terrain[i+x-xsize/2][j+y-ysize/2] != WALL && map_terrain[i+x-xsize/2][j+y-ysize/2] != DOOR && map_terrain[i+x-xsize/2][j+y-ysize/2] != TWINDOW)
				{
					map_terrain[i+x-xsize/2][j+y-ysize/2] = FLOOR;
				}
				else if(map_terrain[i+x-xsize/2][j+y-ysize/2] == DOOR && rand()%3 == 0)
				{
					map_terrain[i+x-xsize/2][j+y-ysize/2] = FLOOR;
				}
				else if(!is_corner_b(i+x-xsize/2,j+y-ysize/2))
				{
					inner_walls.push_back(std::make_pair(i+x-xsize/2,j+y-ysize/2));
				}
			}
		}
	}
	if(inner_walls.size()>0) // this should really be done with shuffle
	{
		int door_id = rand()%inner_walls.size();
		std::pair<int,int> inner_door_choice = inner_walls[door_id];
		map_access[inner_door_choice.first+1][inner_door_choice.second] = true;
		map_access[inner_door_choice.first-1][inner_door_choice.second] = true;
		map_access[inner_door_choice.first][inner_door_choice.second+1] = true;
		map_access[inner_door_choice.first][inner_door_choice.second-1] = true;
		map_terrain[inner_door_choice.first][inner_door_choice.second] = DOOR;
		if(inner_walls.size() > 2)
		{
			int w1_id = rand()%inner_walls.size();
			while(w1_id == door_id)
			{
				w1_id = rand()%inner_walls.size();
			}
			std::pair<int,int> w1_choice = inner_walls[w1_id];
			map_terrain[w1_choice.first][w1_choice.second] = TWINDOW;
			if(inner_walls.size() > 4)
			{
				int w2_id = rand()%inner_walls.size();
				while(w2_id == door_id || w2_id == w1_id)
				{
					w2_id = rand()%inner_walls.size();
				}
				std::pair<int,int> w2_choice = inner_walls[w2_id];
				map_terrain[w2_choice.first][w2_choice.second] = TWINDOW;
				}
		}
	}
	if(outer_walls.size()>0)
	{
		int door_id = rand()%outer_walls.size();
		std::pair<int,int> outer_door_choice = outer_walls[door_id];
		map_terrain[outer_door_choice.first][outer_door_choice.second] = DOOR;
		map_access[outer_door_choice.first+1][outer_door_choice.second] = true;
		map_access[outer_door_choice.first-1][outer_door_choice.second] = true;
		map_access[outer_door_choice.first][outer_door_choice.second+1] = true;
		map_access[outer_door_choice.first][outer_door_choice.second-1] = true;
		if(outer_walls.size() > 2)
		{
			int w1_id = rand()%outer_walls.size();
			while(w1_id == door_id)
			{
				w1_id = rand()%outer_walls.size();
			}
			std::pair<int,int> w1_choice = outer_walls[w1_id];
			map_terrain[w1_choice.first][w1_choice.second] = TWINDOW;
			if(outer_walls.size() > 4)
			{
				int w2_id = rand()%outer_walls.size();
				while(w2_id == door_id || w2_id == w1_id)
				{
					w2_id = rand()%outer_walls.size();
				}
				std::pair<int,int> w2_choice = outer_walls[w2_id];
				map_terrain[w2_choice.first][w2_choice.second] = TWINDOW;
				}
		}
	}

}

// Assembly:
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, 0x1d0(%rsp)
movq %rsi, 0x1c8(%rsp)
movl 0x1d0(%rsp), %eax
movl %eax, 0x1c4(%rsp)
movl 0x1d4(%rsp), %eax
movl %eax, 0x1c0(%rsp)
movl 0x1c8(%rsp), %eax
movl %eax, 0x1bc(%rsp)
movl 0x1cc(%rsp), %eax
movl %eax, 0x1b8(%rsp)
leaq 0x1a0(%rsp), %rdi
callq 0x20d50
leaq 0x188(%rsp), %rdi
callq 0x20d50
movl $0x0, 0x184(%rsp)
movl 0x184(%rsp), %eax
movl 0x1bc(%rsp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jge 0x107d1
movl $0x0, 0x180(%rsp)
movl 0x180(%rsp), %eax
movl 0x1b8(%rsp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jge 0x107b9
cmpl $0x0, 0x184(%rsp)
je 0x100a3
movl 0x184(%rsp), %eax
movl 0x1bc(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
je 0x100a3
cmpl $0x0, 0x180(%rsp)
je 0x100a3
movl 0x180(%rsp), %eax
movl 0x1b8(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x1039a
movl 0x184(%rsp), %eax
addl 0x1c4(%rsp), %eax
movl %eax, 0xfc(%rsp)
movl 0x1bc(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0xfc(%rsp), %eax
subl %ecx, %eax
movslq %eax, %rcx
leaq 0x2b2d4(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movq %rax, 0x100(%rsp)
movl 0x180(%rsp), %ecx
addl 0x1c0(%rsp), %ecx
movl 0x1b8(%rsp), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movq 0x100(%rsp), %rax
subl %edx, %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x10226
movl 0x184(%rsp), %eax
addl 0x1c4(%rsp), %eax
movl %eax, 0xec(%rsp)
movl 0x1bc(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0xec(%rsp), %eax
subl %ecx, %eax
movslq %eax, %rcx
leaq 0x2b253(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movq %rax, 0xf0(%rsp)
movl 0x180(%rsp), %ecx
addl 0x1c0(%rsp), %ecx
movl 0x1b8(%rsp), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movq 0xf0(%rsp), %rax
subl %edx, %ecx
movslq %ecx, %rcx
cmpl $0x1, (%rax,%rcx,4)
je 0x10226
movl 0x184(%rsp), %eax
addl 0x1c4(%rsp), %eax
movl %eax, 0xdc(%rsp)
movl 0x1bc(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0xdc(%rsp), %eax
subl %ecx, %eax
movslq %eax, %rcx
leaq 0x2b1d2(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movq %rax, 0xe0(%rsp)
movl 0x180(%rsp), %ecx
addl 0x1c0(%rsp), %ecx
movl 0x1b8(%rsp), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movq 0xe0(%rsp), %rax
subl %edx, %ecx
movslq %ecx, %rcx
cmpl $0x2, (%rax,%rcx,4)
jne 0x10395
movl 0x184(%rsp), %eax
movl 0x1c4(%rsp), %ecx
addl %ecx, %eax
movl 0x1bc(%rsp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
cltq
imulq $0x258, %rax, %rcx      # imm = 0x258
leaq 0x2b158(%rip), %rax     # 0x3b3b0
addq %rcx, %rax
movl 0x180(%rsp), %ecx
movl 0x1c0(%rsp), %edx
addl %edx, %ecx
movl 0x1b8(%rsp), %edx
movl %edx, %esi
shrl $0x1f, %esi
addl %esi, %edx
sarl %edx
subl %edx, %ecx
movslq %ecx, %rcx
movl $0x4, (%rax,%rcx,4)
movl 0x184(%rsp), %edi
movl 0x180(%rsp), %esi
movl 0x1bc(%rsp), %edx
incl %edx
movl 0x1b8(%rsp), %ecx
incl %ecx
callq 0x20d60
movb %al, 0xdb(%rsp)
jmp 0x102b5
movb 0xdb(%rsp), %al
testb $0x1, %al
jne 0x10393
jmp 0x102c6
movl 0x184(%rsp), %eax
movl 0x1c4(%rsp), %ecx
addl %ecx, %eax
movl 0x1bc(%rsp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, 0x168(%rsp)
movl 0x180(%rsp), %eax
movl 0x1c0(%rsp), %ecx
addl %ecx, %eax
movl 0x1b8(%rsp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, 0x164(%rsp)
leaq 0x168(%rsp), %rdi
leaq 0x164(%rsp), %rsi
callq 0x20b30
movq %rax, 0xd0(%rsp)
jmp 0x10337
movq 0xd0(%rsp), %rax
movq %rax, 0x16c(%rsp)
leaq 0x188(%rsp), %rdi
leaq 0x16c(%rsp), %rsi
callq 0x20dc0
jmp 0x1035e
jmp 0x10393
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x178(%rsp)
movl %eax, 0x174(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x1fcd0
leaq 0x1a0(%rsp), %rdi
callq 0x1fcd0
jmp 0x10ded
jmp 0x10395
jmp 0x107a1
movl 0x184(%rsp), %eax
addl 0x1c4(%rsp), %eax
movl %eax, 0xc4(%rsp)
movl 0x1bc(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0xc4(%rsp), %eax
subl %ecx, %eax
movslq %eax, %rcx
leaq 0x2afdd(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movq %rax, 0xc8(%rsp)
movl 0x180(%rsp), %ecx
addl 0x1c0(%rsp), %ecx
movl 0x1b8(%rsp), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movq 0xc8(%rsp), %rax
subl %edx, %ecx
movslq %ecx, %rcx
cmpl $0x4, (%rax,%rcx,4)
je 0x105a0
movl 0x184(%rsp), %eax
addl 0x1c4(%rsp), %eax
movl %eax, 0xb4(%rsp)
movl 0x1bc(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0xb4(%rsp), %eax
subl %ecx, %eax
movslq %eax, %rcx
leaq 0x2af5c(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movq %rax, 0xb8(%rsp)
movl 0x180(%rsp), %ecx
addl 0x1c0(%rsp), %ecx
movl 0x1b8(%rsp), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movq 0xb8(%rsp), %rax
subl %edx, %ecx
movslq %ecx, %rcx
cmpl $0x5, (%rax,%rcx,4)
je 0x105a0
movl 0x184(%rsp), %eax
addl 0x1c4(%rsp), %eax
movl %eax, 0xa4(%rsp)
movl 0x1bc(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0xa4(%rsp), %eax
subl %ecx, %eax
movslq %eax, %rcx
leaq 0x2aedb(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movq %rax, 0xa8(%rsp)
movl 0x180(%rsp), %ecx
addl 0x1c0(%rsp), %ecx
movl 0x1b8(%rsp), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movq 0xa8(%rsp), %rax
subl %edx, %ecx
movslq %ecx, %rcx
cmpl $0xc, (%rax,%rcx,4)
je 0x105a0
movl 0x184(%rsp), %eax
addl 0x1c4(%rsp), %eax
movl %eax, 0x94(%rsp)
movl 0x1bc(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x94(%rsp), %eax
subl %ecx, %eax
movslq %eax, %rcx
leaq 0x2ae5a(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movq %rax, 0x98(%rsp)
movl 0x180(%rsp), %ecx
addl 0x1c0(%rsp), %ecx
movl 0x1b8(%rsp), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movq 0x98(%rsp), %rax
subl %edx, %ecx
movslq %ecx, %rcx
movl $0x3, (%rax,%rcx,4)
jmp 0x1079f
movl 0x184(%rsp), %eax
addl 0x1c4(%rsp), %eax
movl %eax, 0x84(%rsp)
movl 0x1bc(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x84(%rsp), %eax
subl %ecx, %eax
movslq %eax, %rcx
leaq 0x2add7(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movq %rax, 0x88(%rsp)
movl 0x180(%rsp), %ecx
addl 0x1c0(%rsp), %ecx
movl 0x1b8(%rsp), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movq 0x88(%rsp), %rax
subl %edx, %ecx
movslq %ecx, %rcx
cmpl $0x5, (%rax,%rcx,4)
jne 0x106aa
callq 0x50b0
movl $0x3, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x106aa
movl 0x184(%rsp), %eax
addl 0x1c4(%rsp), %eax
movl %eax, 0x74(%rsp)
movl 0x1bc(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x74(%rsp), %eax
subl %ecx, %eax
movslq %eax, %rcx
leaq 0x2ad4a(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movq %rax, 0x78(%rsp)
movl 0x180(%rsp), %ecx
addl 0x1c0(%rsp), %ecx
movl 0x1b8(%rsp), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movq 0x78(%rsp), %rax
subl %edx, %ecx
movslq %ecx, %rcx
movl $0x3, (%rax,%rcx,4)
jmp 0x1079d
movl 0x184(%rsp), %edi
movl 0x1c4(%rsp), %eax
addl %eax, %edi
movl 0x1bc(%rsp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
subl %eax, %edi
movl 0x180(%rsp), %esi
movl 0x1c0(%rsp), %eax
addl %eax, %esi
movl 0x1b8(%rsp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
subl %eax, %esi
callq 0x20df0
movb %al, 0x73(%rsp)
jmp 0x106f9
movb 0x73(%rsp), %al
testb $0x1, %al
jne 0x1079b
jmp 0x10707
movl 0x184(%rsp), %eax
movl 0x1c4(%rsp), %ecx
addl %ecx, %eax
movl 0x1bc(%rsp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, 0x158(%rsp)
movl 0x180(%rsp), %eax
movl 0x1c0(%rsp), %ecx
addl %ecx, %eax
movl 0x1b8(%rsp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, 0x154(%rsp)
leaq 0x158(%rsp), %rdi
leaq 0x154(%rsp), %rsi
callq 0x20b30
movq %rax, 0x68(%rsp)
jmp 0x10775
movq 0x68(%rsp), %rax
movq %rax, 0x15c(%rsp)
leaq 0x1a0(%rsp), %rdi
leaq 0x15c(%rsp), %rsi
callq 0x20dc0
jmp 0x10799
jmp 0x1079b
jmp 0x1079d
jmp 0x1079f
jmp 0x107a1
jmp 0x107a3
movl 0x180(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x180(%rsp)
jmp 0x10048
jmp 0x107bb
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x184(%rsp)
jmp 0x10024
leaq 0x1a0(%rsp), %rdi
callq 0x20ef0
cmpq $0x0, %rax
jbe 0x10ace
callq 0x50b0
cltq
movq %rax, 0x60(%rsp)
leaq 0x1a0(%rsp), %rdi
callq 0x20ef0
movq %rax, %rcx
movq 0x60(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x150(%rsp)
movslq 0x150(%rsp), %rsi
leaq 0x1a0(%rsp), %rdi
callq 0x20f10
movq (%rax), %rax
movq %rax, 0x148(%rsp)
movl 0x148(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x72205(%rip), %rax     # 0x82a50
imulq $0x96, %rcx, %rcx
addq %rcx, %rax
movslq 0x14c(%rsp), %rcx
movb $0x1, (%rax,%rcx)
movl 0x148(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x721db(%rip), %rax     # 0x82a50
imulq $0x96, %rcx, %rcx
addq %rcx, %rax
movslq 0x14c(%rsp), %rcx
movb $0x1, (%rax,%rcx)
movslq 0x148(%rsp), %rcx
leaq 0x721b6(%rip), %rax     # 0x82a50
imulq $0x96, %rcx, %rcx
addq %rcx, %rax
movl 0x14c(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x1, (%rax,%rcx)
movslq 0x148(%rsp), %rcx
leaq 0x7218c(%rip), %rax     # 0x82a50
imulq $0x96, %rcx, %rcx
addq %rcx, %rax
movl 0x14c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x1, (%rax,%rcx)
movslq 0x148(%rsp), %rcx
leaq 0x2aac2(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movslq 0x14c(%rsp), %rcx
movl $0x5, (%rax,%rcx,4)
leaq 0x1a0(%rsp), %rdi
callq 0x20ef0
cmpq $0x2, %rax
jbe 0x10acc
callq 0x50b0
cltq
movq %rax, 0x58(%rsp)
leaq 0x1a0(%rsp), %rdi
callq 0x20ef0
movq %rax, %rcx
movq 0x58(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x144(%rsp)
movl 0x144(%rsp), %eax
cmpl 0x150(%rsp), %eax
jne 0x1098e
callq 0x50b0
cltq
movq %rax, 0x50(%rsp)
leaq 0x1a0(%rsp), %rdi
callq 0x20ef0
movq %rax, %rcx
movq 0x50(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x144(%rsp)
jmp 0x1094d
movslq 0x144(%rsp), %rsi
leaq 0x1a0(%rsp), %rdi
callq 0x20f10
movq (%rax), %rax
movq %rax, 0x13c(%rsp)
movslq 0x13c(%rsp), %rcx
leaq 0x2a9f3(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movslq 0x140(%rsp), %rcx
movl $0xc, (%rax,%rcx,4)
leaq 0x1a0(%rsp), %rdi
callq 0x20ef0
cmpq $0x4, %rax
jbe 0x10aca
callq 0x50b0
cltq
movq %rax, 0x48(%rsp)
leaq 0x1a0(%rsp), %rdi
callq 0x20ef0
movq %rax, %rcx
movq 0x48(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x138(%rsp)
movl 0x138(%rsp), %ecx
movb $0x1, %al
cmpl 0x150(%rsp), %ecx
movb %al, 0x47(%rsp)
je 0x10a47
movl 0x138(%rsp), %eax
cmpl 0x144(%rsp), %eax
sete %al
movb %al, 0x47(%rsp)
movb 0x47(%rsp), %al
testb $0x1, %al
jne 0x10a51
jmp 0x10a82
callq 0x50b0
cltq
movq %rax, 0x38(%rsp)
leaq 0x1a0(%rsp), %rdi
callq 0x20ef0
movq %rax, %rcx
movq 0x38(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x138(%rsp)
jmp 0x10a1c
movslq 0x138(%rsp), %rsi
leaq 0x1a0(%rsp), %rdi
callq 0x20f10
movq (%rax), %rax
movq %rax, 0x130(%rsp)
movslq 0x130(%rsp), %rcx
leaq 0x2a8ff(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movslq 0x134(%rsp), %rcx
movl $0xc, (%rax,%rcx,4)
jmp 0x10acc
jmp 0x10ace
leaq 0x188(%rsp), %rdi
callq 0x20ef0
cmpq $0x0, %rax
jbe 0x10dcb
callq 0x50b0
cltq
movq %rax, 0x30(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x20ef0
movq %rax, %rcx
movq 0x30(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x12c(%rsp)
movslq 0x12c(%rsp), %rsi
leaq 0x188(%rsp), %rdi
callq 0x20f10
movq (%rax), %rax
movq %rax, 0x124(%rsp)
movslq 0x124(%rsp), %rcx
leaq 0x2a86d(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movslq 0x128(%rsp), %rcx
movl $0x5, (%rax,%rcx,4)
movl 0x124(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x71ee0(%rip), %rax     # 0x82a50
imulq $0x96, %rcx, %rcx
addq %rcx, %rax
movslq 0x128(%rsp), %rcx
movb $0x1, (%rax,%rcx)
movl 0x124(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x71eb6(%rip), %rax     # 0x82a50
imulq $0x96, %rcx, %rcx
addq %rcx, %rax
movslq 0x128(%rsp), %rcx
movb $0x1, (%rax,%rcx)
movslq 0x124(%rsp), %rcx
leaq 0x71e91(%rip), %rax     # 0x82a50
imulq $0x96, %rcx, %rcx
addq %rcx, %rax
movl 0x128(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x1, (%rax,%rcx)
movslq 0x124(%rsp), %rcx
leaq 0x71e67(%rip), %rax     # 0x82a50
imulq $0x96, %rcx, %rcx
addq %rcx, %rax
movl 0x128(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x1, (%rax,%rcx)
leaq 0x188(%rsp), %rdi
callq 0x20ef0
cmpq $0x2, %rax
jbe 0x10dc9
callq 0x50b0
cltq
movq %rax, 0x28(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x20ef0
movq %rax, %rcx
movq 0x28(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x120(%rsp)
movl 0x120(%rsp), %eax
cmpl 0x12c(%rsp), %eax
jne 0x10c8b
callq 0x50b0
cltq
movq %rax, 0x20(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x20ef0
movq %rax, %rcx
movq 0x20(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x120(%rsp)
jmp 0x10c4a
movslq 0x120(%rsp), %rsi
leaq 0x188(%rsp), %rdi
callq 0x20f10
movq (%rax), %rax
movq %rax, 0x118(%rsp)
movslq 0x118(%rsp), %rcx
leaq 0x2a6f6(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movslq 0x11c(%rsp), %rcx
movl $0xc, (%rax,%rcx,4)
leaq 0x188(%rsp), %rdi
callq 0x20ef0
cmpq $0x4, %rax
jbe 0x10dc7
callq 0x50b0
cltq
movq %rax, 0x18(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x20ef0
movq %rax, %rcx
movq 0x18(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x114(%rsp)
movl 0x114(%rsp), %ecx
movb $0x1, %al
cmpl 0x12c(%rsp), %ecx
movb %al, 0x17(%rsp)
je 0x10d44
movl 0x114(%rsp), %eax
cmpl 0x120(%rsp), %eax
sete %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x10d4e
jmp 0x10d7f
callq 0x50b0
cltq
movq %rax, 0x8(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x20ef0
movq %rax, %rcx
movq 0x8(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x114(%rsp)
jmp 0x10d19
movslq 0x114(%rsp), %rsi
leaq 0x188(%rsp), %rdi
callq 0x20f10
movq (%rax), %rax
movq %rax, 0x10c(%rsp)
movslq 0x10c(%rsp), %rcx
leaq 0x2a602(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movslq 0x110(%rsp), %rcx
movl $0xc, (%rax,%rcx,4)
jmp 0x10dc9
jmp 0x10dcb
leaq 0x188(%rsp), %rdi
callq 0x1fcd0
leaq 0x1a0(%rsp), %rdi
callq 0x1fcd0
addq $0x1d8, %rsp            # imm = 0x1D8
retq
movq 0x178(%rsp), %rdi
callq 0x5480
nopw (%rax,%rax)