// File: essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: init_map()
void init_map()
{
	for(int x=0;x<MAP_SIZE; x++)
	{
		for(int y=0;y<MAP_SIZE; y++)
		{
			map_occupants[x][y] = NULL;
			map_items[x][y] = NULL;
			map_seen[x][y] = false;
			map_access[x][y] = false;
			map_human_scent[x][y] = 0.001f*randfloat()+0.02f;
			if(x != 0 && x != MAP_SIZE-1 && y != 0 && y != MAP_SIZE-1)
			{
				switch(rand()%13)
				{
				case 0: case 1: case 2: case 3: case 4:
					map_terrain[x][y] = STREE; break;
				case 5: case 6: case 7:
					map_terrain[x][y] = BTREE;break;
				default:
					map_terrain[x][y] = DIRT;
				}
			}
			else
			{
				map_terrain[x][y] = WALL;
			}
		}
	}
	int buildings = (rand()%3)+5;
	int *building_xcentres = (int*)malloc(buildings*sizeof(int));
	int *building_ycentres = (int*)malloc(buildings*sizeof(int));
	for (int i=0;i<buildings;i++)
	{
		building_xcentres[i] = -BUILDING_SIZE;
		building_ycentres[i] = -BUILDING_SIZE;
	}
	for(int i=0;i<buildings;i++)
	{
		bool is_ok = false;
		int xcentre = rand()%(MAP_SIZE-2*BUILDING_SIZE)+BUILDING_SIZE;
		int ycentre = rand()%(MAP_SIZE-2*BUILDING_SIZE)+BUILDING_SIZE;
		while(!is_ok)
		{
			int xcentre = rand()%(MAP_SIZE-2*BUILDING_SIZE)+BUILDING_SIZE;
			int ycentre = rand()%(MAP_SIZE-2*BUILDING_SIZE)+BUILDING_SIZE;
			is_ok = true;
			for(int j=0;j<i;j++)
			{
				if(abs(xcentre-building_xcentres[j])<=2*BUILDING_SIZE+3)
				{
					is_ok = false;
					xcentre = rand()%(MAP_SIZE-2*BUILDING_SIZE-2)+BUILDING_SIZE;
					ycentre = rand()%(MAP_SIZE-2*BUILDING_SIZE-2)+BUILDING_SIZE;
				}
			}
		}
		std::vector<std::pair<int,int>> room_centres;
		room_centres.push_back(std::make_pair(xcentre,ycentre));
		std::vector<std::pair<int,int>> room_sizes;
		room_sizes.push_back(std::make_pair(rand()%5 + 2,rand()%5+2));
		std::vector<int> fail_counts;
		fail_counts.push_back(0);
		make_room(room_centres[0],room_sizes[0]);
		int successive_failures = 0;
		int room_count = 0;
		while(successive_failures < 10 && room_count < 10)
		{
			int x_size = rand()%5 + 3;
			int y_size = rand()%5 + 3;
			if(room_centres.size() == 0 || room_sizes.size() != room_centres.size())
			{
				successive_failures++;
				continue;
			}
			int parent_choice = rand()%room_centres.size();
			std::pair<int,int> parent_centre = room_centres[parent_choice];
			std::pair<int,int> parent_size = room_sizes[parent_choice];
			std::vector<std::pair<int,int>> centre_choices;
			std::vector<std::pair<int,int>> size_choices;
			int choice_range_x = rand()%(x_size-2)+parent_size.first+2;
			int choice_range_y = rand()%(y_size-2)+parent_size.second+2;
			std::pair<int,int> candidate;
			std::pair<int,int> candidate_size;
			for(int x=0;x<choice_range_x;x++)
			{
				candidate=std::make_pair(x+parent_centre.first-choice_range_x/2,parent_centre.second-choice_range_y/2);
				candidate_size = five_tries_to_make_room(candidate,xcentre,ycentre);
				if(candidate_size != std::make_pair(0,0)) {centre_choices.push_back(candidate); size_choices.push_back(candidate_size);}

				candidate=std::make_pair(x+parent_centre.first-choice_range_x/2,choice_range_y-1+parent_centre.second-choice_range_y/2);
				candidate_size = five_tries_to_make_room(candidate,xcentre,ycentre);
				if(candidate_size != std::make_pair(0,0)) {centre_choices.push_back(candidate); size_choices.push_back(candidate_size);}
			}
			for(int y=1;y<choice_range_y;y++)
			{
				candidate = std::make_pair(parent_centre.first-choice_range_x/2,y+parent_centre.second-choice_range_y/2);
				candidate_size = five_tries_to_make_room(candidate,xcentre,ycentre);
				if(candidate_size != std::make_pair(0,0)) {centre_choices.push_back(candidate); size_choices.push_back(candidate_size);}

				candidate=std::make_pair(parent_centre.first-choice_range_x/2+choice_range_x-1,y+parent_centre.second-choice_range_y/2);
				candidate_size = five_tries_to_make_room(candidate,xcentre,ycentre);
				if(candidate_size != std::make_pair(0,0)) {centre_choices.push_back(candidate); size_choices.push_back(candidate_size);}
			}
			if(centre_choices.size() == 0 || size_choices.size() != centre_choices.size())
			{
				successive_failures++;
			}
			else
			{
				successive_failures = 0;
				int choice = rand()%centre_choices.size();
				make_room(centre_choices[choice],size_choices[choice]);
				room_centres.push_back(centre_choices[choice]);
				room_sizes.push_back(size_choices[choice]);
				fail_counts.push_back(0);
				room_count++;
			}
			
		}
	}

	bool is_ok = false;
	int xcentre = rand()%(MAP_SIZE-2*BUILDING_SIZE)+BUILDING_SIZE;
	int ycentre = rand()%(MAP_SIZE-2*BUILDING_SIZE)+BUILDING_SIZE;
	while(!is_ok)
	{
		is_ok = true;
		for(int j=0;j<buildings;j++)
		{
			if(abs(xcentre-building_xcentres[j])<=BUILDING_SIZE+10)
			{
				is_ok = false;
				xcentre = rand()%(MAP_SIZE-2*BUILDING_SIZE-2)+BUILDING_SIZE;
				ycentre = rand()%(MAP_SIZE-2*BUILDING_SIZE-2)+BUILDING_SIZE;
			}
		}
	}
	draw_ship(xcentre,ycentre);

	free(building_xcentres); free(building_ycentres);
}

// Assembly:
subq $0x318, %rsp            # imm = 0x318
movl $0x0, 0x314(%rsp)
cmpl $0x96, 0x314(%rsp)
jge 0x12119
movl $0x0, 0x310(%rsp)
cmpl $0x96, 0x310(%rsp)
jge 0x12101
movslq 0x314(%rsp), %rcx
leaq 0x76672(%rip), %rax     # 0x88560
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rax
movslq 0x310(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movslq 0x314(%rsp), %rcx
leaq 0xa2619(%rip), %rax     # 0xb4530
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rax
movslq 0x310(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movslq 0x314(%rsp), %rcx
leaq 0x6b320(%rip), %rax     # 0x7d260
imulq $0x96, %rcx, %rcx
addq %rcx, %rax
movslq 0x310(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movslq 0x314(%rsp), %rcx
leaq 0x70aeb(%rip), %rax     # 0x82a50
imulq $0x96, %rcx, %rcx
addq %rcx, %rax
movslq 0x310(%rsp), %rcx
movb $0x0, (%rax,%rcx)
callq 0x6650
movss 0x1b0d4(%rip), %xmm1    # 0x2d05c
mulss %xmm1, %xmm0
movss 0x1b0cc(%rip), %xmm1    # 0x2d060
addss %xmm1, %xmm0
movslq 0x314(%rsp), %rcx
leaq 0x3f399(%rip), %rax     # 0x51340
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movslq 0x310(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
cmpl $0x0, 0x314(%rsp)
je 0x120c1
cmpl $0x95, 0x314(%rsp)
je 0x120c1
cmpl $0x0, 0x310(%rsp)
je 0x120c1
cmpl $0x95, 0x310(%rsp)
je 0x120c1
callq 0x50b0
movslq %eax, %rcx
imulq $0x4ec4ec4f, %rcx, %rdx # imm = 0x4EC4EC4F
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x22, %rdx
addl %ecx, %edx
movl %edx, %ecx
leal (%rcx,%rcx,2), %esi
movl %esi, %edx
leal (%rcx,%rdx,4), %ecx
subl %ecx, %eax
movl %eax, 0xe0(%rsp)
subl $0x5, %eax
jb 0x12043
jmp 0x12032
movl 0xe0(%rsp), %eax
addl $-0x5, %eax
subl $0x3, %eax
jb 0x1206d
jmp 0x12097
movslq 0x314(%rsp), %rcx
leaq 0x2935e(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movslq 0x310(%rsp), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0x120bf
movslq 0x314(%rsp), %rcx
leaq 0x29334(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movslq 0x310(%rsp), %rcx
movl $0x2, (%rax,%rcx,4)
jmp 0x120bf
movslq 0x314(%rsp), %rcx
leaq 0x2930a(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movslq 0x310(%rsp), %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0x120e9
movslq 0x314(%rsp), %rcx
leaq 0x292e0(%rip), %rax     # 0x3b3b0
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq %rcx, %rax
movslq 0x310(%rsp), %rcx
movl $0x4, (%rax,%rcx,4)
jmp 0x120eb
movl 0x310(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x310(%rsp)
jmp 0x11ece
jmp 0x12103
movl 0x314(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x314(%rsp)
jmp 0x11eb2
callq 0x50b0
movl $0x3, %ecx
cltd
idivl %ecx
addl $0x5, %edx
movl %edx, 0x30c(%rsp)
movslq 0x30c(%rsp), %rdi
shlq $0x2, %rdi
callq 0x53b0
movq %rax, 0x300(%rsp)
movslq 0x30c(%rsp), %rdi
shlq $0x2, %rdi
callq 0x53b0
movq %rax, 0x2f8(%rsp)
movl $0x0, 0x2f4(%rsp)
movl 0x2f4(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x121be
movq 0x300(%rsp), %rax
movslq 0x2f4(%rsp), %rcx
movl $0xffffffef, (%rax,%rcx,4) # imm = 0xFFFFFFEF
movq 0x2f8(%rsp), %rax
movslq 0x2f4(%rsp), %rcx
movl $0xffffffef, (%rax,%rcx,4) # imm = 0xFFFFFFEF
movl 0x2f4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2f4(%rsp)
jmp 0x1216d
movl $0x0, 0x2f0(%rsp)
movl 0x2f0(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x12f29
movb $0x0, 0x2ef(%rsp)
callq 0x50b0
movl $0x74, %ecx
cltd
idivl %ecx
addl $0x11, %edx
movl %edx, 0x2e8(%rsp)
callq 0x50b0
movl $0x74, %ecx
cltd
idivl %ecx
addl $0x11, %edx
movl %edx, 0x2e4(%rsp)
movb 0x2ef(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x12225
jmp 0x122ef
callq 0x50b0
movl $0x74, %ecx
cltd
idivl %ecx
addl $0x11, %edx
movl %edx, 0x2e0(%rsp)
callq 0x50b0
movl $0x74, %ecx
cltd
idivl %ecx
addl $0x11, %edx
movl %edx, 0x2dc(%rsp)
movb $0x1, 0x2ef(%rsp)
movl $0x0, 0x2d8(%rsp)
movl 0x2d8(%rsp), %eax
cmpl 0x2f0(%rsp), %eax
jge 0x122ea
movl 0x2e0(%rsp), %eax
movq 0x300(%rsp), %rcx
movslq 0x2d8(%rsp), %rdx
subl (%rcx,%rdx,4), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl $0x25, %eax
jg 0x122d2
movb $0x0, 0x2ef(%rsp)
callq 0x50b0
movl $0x72, %ecx
cltd
idivl %ecx
addl $0x11, %edx
movl %edx, 0x2e0(%rsp)
callq 0x50b0
movl $0x72, %ecx
cltd
idivl %ecx
addl $0x11, %edx
movl %edx, 0x2dc(%rsp)
jmp 0x122d4
movl 0x2d8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2d8(%rsp)
jmp 0x12266
jmp 0x12213
leaq 0x2c0(%rsp), %rdi
callq 0x20d50
leaq 0x2e8(%rsp), %rdi
leaq 0x2e4(%rsp), %rsi
callq 0x207c0
movq %rax, 0xd8(%rsp)
jmp 0x1231b
movq 0xd8(%rsp), %rax
movq %rax, 0x2b8(%rsp)
leaq 0x2c0(%rsp), %rdi
leaq 0x2b8(%rsp), %rsi
callq 0x20dc0
jmp 0x12342
leaq 0x290(%rsp), %rdi
callq 0x20d50
callq 0x50b0
movl %eax, %ecx
movslq %ecx, %rax
imulq $0x66666667, %rax, %rdx # imm = 0x66666667
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x21, %rdx
addl %eax, %edx
movl %edx, %eax
leal (%rax,%rax,4), %edx
movl %ecx, %eax
negl %edx
movl %edx, %ecx
leal 0x2(%rax,%rcx), %eax
movl %eax, 0x284(%rsp)
callq 0x50b0
movl %eax, %ecx
movslq %ecx, %rax
imulq $0x66666667, %rax, %rdx # imm = 0x66666667
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x21, %rdx
addl %eax, %edx
movl %edx, %eax
leal (%rax,%rax,4), %edx
movl %ecx, %eax
negl %edx
movl %edx, %ecx
leal 0x2(%rax,%rcx), %eax
movl %eax, 0x280(%rsp)
leaq 0x284(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x20b30
movq %rax, 0xd0(%rsp)
jmp 0x123d6
movq 0xd0(%rsp), %rax
movq %rax, 0x288(%rsp)
leaq 0x290(%rsp), %rdi
leaq 0x288(%rsp), %rsi
callq 0x20dc0
jmp 0x123fd
leaq 0x268(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0x20f30
movq 0xc8(%rsp), %rdi
movl $0x0, 0x264(%rsp)
leaq 0x264(%rsp), %rsi
callq 0x20f40
jmp 0x12434
xorl %eax, %eax
movl %eax, %esi
movq %rsi, 0xc0(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x20f10
movq 0xc0(%rsp), %rsi
movq (%rax), %rax
movq %rax, 0x258(%rsp)
leaq 0x290(%rsp), %rdi
callq 0x20f10
movq (%rax), %rax
movq %rax, 0x250(%rsp)
movq 0x258(%rsp), %rdi
movq 0x250(%rsp), %rsi
callq 0xffb0
jmp 0x1248f
movl $0x0, 0x24c(%rsp)
movl $0x0, 0x248(%rsp)
xorl %eax, %eax
cmpl $0xa, 0x24c(%rsp)
movb %al, 0xbf(%rsp)
jge 0x124ca
cmpl $0xa, 0x248(%rsp)
setl %al
movb %al, 0xbf(%rsp)
movb 0xbf(%rsp), %al
testb $0x1, %al
jne 0x124da
jmp 0x12ec0
callq 0x50b0
movl $0x5, %ecx
cltd
idivl %ecx
addl $0x3, %edx
movl %edx, 0x244(%rsp)
callq 0x50b0
movl $0x5, %ecx
cltd
idivl %ecx
addl $0x3, %edx
movl %edx, 0x240(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x20ef0
cmpq $0x0, %rax
je 0x1254d
leaq 0x290(%rsp), %rdi
callq 0x20ef0
movq %rax, 0xb0(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x20ef0
movq %rax, %rcx
movq 0xb0(%rsp), %rax
cmpq %rcx, %rax
je 0x125ae
movl 0x24c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24c(%rsp)
jmp 0x124a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x12f17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x12f0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x12efd
callq 0x50b0
cltq
movq %rax, 0xa8(%rsp)
leaq 0x2c0(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
callq 0x20ef0
movq 0xa0(%rsp), %rdi
movq %rax, %rcx
movq 0xa8(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x23c(%rsp)
movslq 0x23c(%rsp), %rsi
callq 0x20f10
movq (%rax), %rax
movq %rax, 0x230(%rsp)
movslq 0x23c(%rsp), %rsi
leaq 0x290(%rsp), %rdi
callq 0x20f10
movq (%rax), %rax
movq %rax, 0x228(%rsp)
leaq 0x210(%rsp), %rdi
callq 0x20d50
leaq 0x1f8(%rsp), %rdi
callq 0x20d50
callq 0x50b0
movl 0x244(%rsp), %ecx
addl $-0x2, %ecx
cltd
idivl %ecx
movl 0x228(%rsp), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x2(%rax,%rcx), %eax
movl %eax, 0x1f4(%rsp)
callq 0x50b0
movl 0x240(%rsp), %ecx
addl $-0x2, %ecx
cltd
idivl %ecx
movl 0x22c(%rsp), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x2(%rax,%rcx), %eax
movl %eax, 0x1f0(%rsp)
leaq 0x1e8(%rsp), %rdi
callq 0x20f70
jmp 0x126a4
leaq 0x1e0(%rsp), %rdi
callq 0x20f70
jmp 0x126b3
movl $0x0, 0x1dc(%rsp)
movl 0x1dc(%rsp), %eax
cmpl 0x1f4(%rsp), %eax
jge 0x12a19
movl 0x1dc(%rsp), %eax
movl 0x230(%rsp), %ecx
addl %ecx, %eax
movl 0x1f4(%rsp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, 0x1d0(%rsp)
movl 0x234(%rsp), %eax
movl 0x1f0(%rsp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, 0x1cc(%rsp)
leaq 0x1d0(%rsp), %rdi
leaq 0x1cc(%rsp), %rsi
callq 0x20b30
movq %rax, 0x98(%rsp)
jmp 0x1273a
movq 0x98(%rsp), %rax
movq %rax, 0x1d4(%rsp)
leaq 0x1e8(%rsp), %rdi
leaq 0x1d4(%rsp), %rsi
callq 0x20f90
movq 0x1e8(%rsp), %rax
movq %rax, 0x1b8(%rsp)
movl 0x2e8(%rsp), %esi
movl 0x2e4(%rsp), %edx
movq 0x1b8(%rsp), %rdi
callq 0x11520
movq %rax, 0x90(%rsp)
jmp 0x12794
movq 0x90(%rsp), %rax
movq %rax, 0x1c4(%rsp)
leaq 0x1e0(%rsp), %rdi
leaq 0x1c4(%rsp), %rsi
callq 0x20f90
movl $0x0, 0x1ac(%rsp)
movl $0x0, 0x1a8(%rsp)
leaq 0x1ac(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x20b30
movq %rax, 0x88(%rsp)
jmp 0x127ee
movq 0x88(%rsp), %rax
movq %rax, 0x1b0(%rsp)
leaq 0x1e0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x20c00
movb %al, 0x87(%rsp)
jmp 0x1281c
movb 0x87(%rsp), %al
testb $0x1, %al
jne 0x12829
jmp 0x1288c
leaq 0x210(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x20fc0
jmp 0x12840
leaq 0x1f8(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x20fc0
jmp 0x12857
jmp 0x1288c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0x1fcd0
leaq 0x210(%rsp), %rdi
callq 0x1fcd0
jmp 0x12efd
movl 0x1dc(%rsp), %eax
movl 0x230(%rsp), %ecx
addl %ecx, %eax
movl 0x1f4(%rsp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, 0x19c(%rsp)
movl 0x1f0(%rsp), %eax
movl 0x234(%rsp), %edx
movl %eax, %ecx
addl %edx, %ecx
movl %eax, %edx
shrl $0x1f, %edx
addl %edx, %eax
sarl %eax
notl %eax
addl %ecx, %eax
movl %eax, 0x198(%rsp)
leaq 0x19c(%rsp), %rdi
leaq 0x198(%rsp), %rsi
callq 0x20b30
movq %rax, 0x78(%rsp)
jmp 0x128f7
movq 0x78(%rsp), %rax
movq %rax, 0x1a0(%rsp)
leaq 0x1e8(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
callq 0x20f90
movq 0x1e8(%rsp), %rax
movq %rax, 0x188(%rsp)
movl 0x2e8(%rsp), %esi
movl 0x2e4(%rsp), %edx
movq 0x188(%rsp), %rdi
callq 0x11520
movq %rax, 0x70(%rsp)
jmp 0x1294b
movq 0x70(%rsp), %rax
movq %rax, 0x190(%rsp)
leaq 0x1e0(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x20f90
movl $0x0, 0x17c(%rsp)
movl $0x0, 0x178(%rsp)
leaq 0x17c(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x20b30
movq %rax, 0x68(%rsp)
jmp 0x1299f
movq 0x68(%rsp), %rax
movq %rax, 0x180(%rsp)
leaq 0x1e0(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x20c00
movb %al, 0x67(%rsp)
jmp 0x129c7
movb 0x67(%rsp), %al
testb $0x1, %al
jne 0x129d1
jmp 0x12a01
leaq 0x210(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x20fc0
jmp 0x129e8
leaq 0x1f8(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x20fc0
jmp 0x129ff
jmp 0x12a01
jmp 0x12a03
movl 0x1dc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1dc(%rsp)
jmp 0x126be
movl $0x1, 0x174(%rsp)
movl 0x174(%rsp), %eax
cmpl 0x1f0(%rsp), %eax
jge 0x12d38
movl 0x230(%rsp), %eax
movl 0x1f4(%rsp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, 0x168(%rsp)
movl 0x174(%rsp), %eax
movl 0x234(%rsp), %ecx
addl %ecx, %eax
movl 0x1f0(%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, 0x58(%rsp)
jmp 0x12a9d
movq 0x58(%rsp), %rax
movq %rax, 0x16c(%rsp)
leaq 0x1e8(%rsp), %rdi
leaq 0x16c(%rsp), %rsi
callq 0x20f90
movq 0x1e8(%rsp), %rax
movq %rax, 0x150(%rsp)
movl 0x2e8(%rsp), %esi
movl 0x2e4(%rsp), %edx
movq 0x150(%rsp), %rdi
callq 0x11520
movq %rax, 0x50(%rsp)
jmp 0x12af1
movq 0x50(%rsp), %rax
movq %rax, 0x15c(%rsp)
leaq 0x1e0(%rsp), %rdi
leaq 0x15c(%rsp), %rsi
callq 0x20f90
movl $0x0, 0x144(%rsp)
movl $0x0, 0x140(%rsp)
leaq 0x144(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x20b30
movq %rax, 0x48(%rsp)
jmp 0x12b45
movq 0x48(%rsp), %rax
movq %rax, 0x148(%rsp)
leaq 0x1e0(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x20c00
movb %al, 0x47(%rsp)
jmp 0x12b6d
movb 0x47(%rsp), %al
testb $0x1, %al
jne 0x12b77
jmp 0x12ba7
leaq 0x210(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x20fc0
jmp 0x12b8e
leaq 0x1f8(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x20fc0
jmp 0x12ba5
jmp 0x12ba7
movl 0x230(%rsp), %edx
movl 0x1f4(%rsp), %ecx
movl %ecx, %esi
shrl $0x1f, %esi
movl %ecx, %eax
addl %esi, %eax
sarl %eax
subl %eax, %edx
movl %ecx, %eax
movl %edx, %ecx
leal -0x1(%rax,%rcx), %eax
movl %eax, 0x134(%rsp)
movl 0x174(%rsp), %eax
movl 0x234(%rsp), %ecx
addl %ecx, %eax
movl 0x1f0(%rsp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, 0x130(%rsp)
leaq 0x134(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x20b30
movq %rax, 0x38(%rsp)
jmp 0x12c16
movq 0x38(%rsp), %rax
movq %rax, 0x138(%rsp)
leaq 0x1e8(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x20f90
movq 0x1e8(%rsp), %rax
movq %rax, 0x120(%rsp)
movl 0x2e8(%rsp), %esi
movl 0x2e4(%rsp), %edx
movq 0x120(%rsp), %rdi
callq 0x11520
movq %rax, 0x30(%rsp)
jmp 0x12c6a
movq 0x30(%rsp), %rax
movq %rax, 0x128(%rsp)
leaq 0x1e0(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x20f90
movl $0x0, 0x114(%rsp)
movl $0x0, 0x110(%rsp)
leaq 0x114(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x20b30
movq %rax, 0x28(%rsp)
jmp 0x12cbe
movq 0x28(%rsp), %rax
movq %rax, 0x118(%rsp)
leaq 0x1e0(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x20c00
movb %al, 0x27(%rsp)
jmp 0x12ce6
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x12cf0
jmp 0x12d20
leaq 0x210(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x20fc0
jmp 0x12d07
leaq 0x1f8(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x20fc0
jmp 0x12d1e
jmp 0x12d20
jmp 0x12d22
movl 0x174(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x174(%rsp)
jmp 0x12a24
leaq 0x210(%rsp), %rdi
callq 0x20ef0
cmpq $0x0, %rax
je 0x12d77
leaq 0x1f8(%rsp), %rdi
callq 0x20ef0
movq %rax, 0x18(%rsp)
leaq 0x210(%rsp), %rdi
callq 0x20ef0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
je 0x12d8d
movl 0x24c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24c(%rsp)
jmp 0x12ea1
movl $0x0, 0x24c(%rsp)
callq 0x50b0
cltq
movq %rax, 0x10(%rsp)
leaq 0x210(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x20ef0
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movq 0x10(%rsp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x10c(%rsp)
movslq 0x10c(%rsp), %rsi
callq 0x20f10
movq (%rax), %rax
movq %rax, 0x100(%rsp)
movslq 0x10c(%rsp), %rsi
leaq 0x1f8(%rsp), %rdi
callq 0x20f10
movq (%rax), %rax
movq %rax, 0xf8(%rsp)
movq 0x100(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq 0xffb0
jmp 0x12e20
movslq 0x10c(%rsp), %rsi
leaq 0x210(%rsp), %rdi
callq 0x20f10
movq %rax, %rsi
leaq 0x2c0(%rsp), %rdi
callq 0x20fc0
jmp 0x12e47
movslq 0x10c(%rsp), %rsi
leaq 0x1f8(%rsp), %rdi
callq 0x20f10
movq %rax, %rsi
leaq 0x290(%rsp), %rdi
callq 0x20fc0
jmp 0x12e6e
movl $0x0, 0xf4(%rsp)
leaq 0x268(%rsp), %rdi
leaq 0xf4(%rsp), %rsi
callq 0x20f40
jmp 0x12e90
movl 0x248(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x248(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0x1fcd0
leaq 0x210(%rsp), %rdi
callq 0x1fcd0
jmp 0x124a5
leaq 0x268(%rsp), %rdi
callq 0x21030
leaq 0x290(%rsp), %rdi
callq 0x1fcd0
leaq 0x2c0(%rsp), %rdi
callq 0x1fcd0
movl 0x2f0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2f0(%rsp)
jmp 0x121c9
leaq 0x268(%rsp), %rdi
callq 0x21030
leaq 0x290(%rsp), %rdi
callq 0x1fcd0
leaq 0x2c0(%rsp), %rdi
callq 0x1fcd0
jmp 0x13042
movb $0x0, 0xf3(%rsp)
callq 0x50b0
movl $0x74, %ecx
cltd
idivl %ecx
addl $0x11, %edx
movl %edx, 0xec(%rsp)
callq 0x50b0
movl $0x74, %ecx
cltd
idivl %ecx
addl $0x11, %edx
movl %edx, 0xe8(%rsp)
movb 0xf3(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x12f71
jmp 0x1300d
movb $0x1, 0xf3(%rsp)
movl $0x0, 0xe4(%rsp)
movl 0xe4(%rsp), %eax
cmpl 0x30c(%rsp), %eax
jge 0x13008
movl 0xec(%rsp), %eax
movq 0x300(%rsp), %rcx
movslq 0xe4(%rsp), %rdx
subl (%rcx,%rdx,4), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl $0x1b, %eax
jg 0x12ff0
movb $0x0, 0xf3(%rsp)
callq 0x50b0
movl $0x72, %ecx
cltd
idivl %ecx
addl $0x11, %edx
movl %edx, 0xec(%rsp)
callq 0x50b0
movl $0x72, %ecx
cltd
idivl %ecx
addl $0x11, %edx
movl %edx, 0xe8(%rsp)
jmp 0x12ff2
movl 0xe4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe4(%rsp)
jmp 0x12f84
jmp 0x12f5f
movl 0xec(%rsp), %edi
movl 0xe8(%rsp), %esi
callq 0x115e0
movq 0x300(%rsp), %rdi
callq 0x5350
movq 0x2f8(%rsp), %rdi
callq 0x5350
addq $0x318, %rsp            # imm = 0x318
retq
movq 0x2b0(%rsp), %rdi
callq 0x5480
nop