// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
leaq 0x14d02(%rip), %rax     # 0x21340
movq %rax, 0x60(%rsp)
leaq 0x61ea6(%rip), %rax     # 0x6e4f0
movq %rax, 0x58(%rsp)
leaq 0x8de6a(%rip), %r15     # 0x9a4c0
leaq 0x2ac73(%rip), %r12     # 0x372d0
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %edx, %edx
testq %rdx, %rdx
setne %al
movq %rdx, 0x68(%rsp)
cmpq $0x95, %rdx
setne %bl
andb %al, %bl
xorl %r14d, %r14d
movq 0x58(%rsp), %rax
movq %r13, (%rax,%r14,8)
movq %r13, (%r15,%r14,8)
leaq (%r14,%rbp), %rax
leaq 0x56b5a(%rip), %rcx     # 0x631f0
movb %r13b, (%rcx,%rax)
leaq 0x5c33f(%rip), %rcx     # 0x689e0
movb %r13b, (%rcx,%rax)
callq 0x5070
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss 0xb94b(%rip), %xmm0     # 0x18004
mulss 0xb9c3(%rip), %xmm0     # 0x18084
addss 0xb9bf(%rip), %xmm0     # 0x18088
movss %xmm0, (%r12,%r14,4)
testq %r14, %r14
setne %al
movl $0x4, %ecx
cmpq $0x95, %r14
je 0xc71d
andb %bl, %al
je 0xc71d
callq 0x5070
cltq
imulq $0x4ec4ec4f, %rax, %rcx # imm = 0x4EC4EC4F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %edx
leal (%rcx,%rdx,4), %ecx
subl %ecx, %eax
xorl %ecx, %ecx
cmpl $0x7, %eax
ja 0xc71d
movl %eax, %eax
leaq 0xe8f2(%rip), %rcx      # 0x1b00c
movl (%rcx,%rax,4), %ecx
movq 0x60(%rsp), %rax
movl %ecx, (%rax,%r14,4)
incq %r14
cmpq $0x96, %r14
jne 0xc67e
movq 0x68(%rsp), %rdx
incq %rdx
movl $0x258, %eax            # imm = 0x258
addq %rax, 0x60(%rsp)
movl $0x4b0, %ecx            # imm = 0x4B0
addq %rcx, 0x58(%rsp)
addq %rcx, %r15
movl $0x96, %ecx
addq %rcx, %rbp
addq %rax, %r12
cmpq %rcx, %rdx
jne 0xc664
callq 0x5070
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
negl %ecx
leal (%rax,%rcx), %r14d
addl $0x5, %r14d
leaq (,%r14,4), %rdi
callq 0x5330
movq %rax, %r15
leaq -0x1(%r14), %rax
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq 0xc(,%r14,4), %rax
andq $-0x10, %rax
movdqa 0xb9ad(%rip), %xmm1     # 0x18170
movdqa 0xb9b5(%rip), %xmm2     # 0x18180
xorl %ecx, %ecx
movdqa 0xb9bb(%rip), %xmm3     # 0x18190
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0xb9bb(%rip), %xmm5     # 0x181a0
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0xc821
movl $0xffffffef, (%r15,%rcx) # imm = 0xFFFFFFEF
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0xc838
movl $0xffffffef, 0x4(%r15,%rcx) # imm = 0xFFFFFFEF
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %edx
testb $0x1, %dl
je 0xc878
movl $0xffffffef, 0x8(%r15,%rcx) # imm = 0xFFFFFFEF
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0xc88b
movl $0xffffffef, 0xc(%r15,%rcx) # imm = 0xFFFFFFEF
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0xc7e5
movq $0x0, 0x60(%rsp)
movq %r15, 0xe8(%rsp)
movq %r14, 0xf8(%rsp)
callq 0x5070
cltq
imulq $-0x72c234f7, %rax, %rcx # imm = 0x8D3DCB09
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x6, %ecx
addl %edx, %ecx
imull $0x74, %ecx, %ecx
negl %ecx
leal (%rax,%rcx), %r12d
addl $0x11, %r12d
callq 0x5070
cltq
imulq $-0x72c234f7, %rax, %rcx # imm = 0x8D3DCB09
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x6, %ecx
addl %edx, %ecx
imull $0x74, %ecx, %ecx
negl %ecx
leal (%rax,%rcx), %ebp
addl $0x11, %ebp
callq 0x5070
movl %eax, %r14d
callq 0x5070
cmpq $0x0, 0x60(%rsp)
je 0xc9a8
movslq %r14d, %rax
imulq $-0x72c234f7, %rax, %rcx # imm = 0x8D3DCB09
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x6, %ecx
addl %edx, %ecx
imull $0x74, %ecx, %ecx
negl %ecx
leal (%rax,%rcx), %r14d
addl $0x11, %r14d
movb $0x1, %al
xorl %ebx, %ebx
movl %r14d, %ecx
subl (%r15,%rbx,4), %ecx
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
cmpl $0x25, %edx
ja 0xc996
callq 0x5070
cltq
imulq $-0x7047dc11, %rax, %rcx # imm = 0x8FB823EF
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x6, %ecx
addl %edx, %ecx
imull $0x72, %ecx, %ecx
negl %ecx
leal (%rax,%rcx), %r14d
addl $0x11, %r14d
callq 0x5070
xorl %eax, %eax
incq %rbx
cmpq %rbx, 0x60(%rsp)
jne 0xc951
testb $0x1, %al
je 0xc90d
pxor %xmm0, %xmm0
movdqa %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
movq %rbp, %rax
shlq $0x20, %rax
movl %r12d, %ecx
orq %rax, %rcx
movq %rcx, 0x70(%rsp)
leaq 0xa0(%rsp), %rdi
xorl %esi, %esi
leaq 0x70(%rsp), %rdx
callq 0x167f8
pxor %xmm0, %xmm0
movdqa %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
callq 0x5070
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
sarl %ecx
addl %edx, %ecx
leal (%rcx,%rcx,4), %ecx
negl %ecx
leal (%rax,%rcx), %ebx
addl $0x2, %ebx
callq 0x5070
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
sarl %ecx
addl %edx, %ecx
leal (%rcx,%rcx,4), %ecx
negl %ecx
addl %ecx, %eax
addl $0x2, %eax
shlq $0x20, %rax
orq %rax, %rbx
movq %rbx, 0xd0(%rsp)
movq 0x78(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0xca7d
movq %rbx, (%rsi)
addq $0x8, 0x78(%rsp)
leaq 0xd0(%rsp), %rbx
jmp 0xca92
leaq 0x70(%rsp), %rdi
leaq 0xd0(%rsp), %rbx
movq %rbx, %rdx
callq 0x167f8
pxor %xmm0, %xmm0
movdqa %xmm0, 0xd0(%rsp)
movq $0x0, 0xe0(%rsp)
movl $0x0, 0x20(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x20(%rsp), %rdx
callq 0x1691a
movq 0xa0(%rsp), %rax
movq (%rax), %rdi
movq 0x70(%rsp), %rax
movq (%rax), %rsi
callq 0xb9ec
xorl %r14d, %r14d
xorl %ebx, %ebx
movl %r14d, 0x9c(%rsp)
callq 0x5070
movl %eax, %r14d
callq 0x5070
movq 0xa8(%rsp), %rcx
subq 0xa0(%rsp), %rcx
je 0xd01d
movq 0x78(%rsp), %rdx
subq 0x70(%rsp), %rdx
cmpq %rcx, %rdx
jne 0xd01d
movl %ebx, 0x98(%rsp)
movslq %r14d, %rbx
imulq $0x66666667, %rbx, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x21, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %ebx
movslq %eax, %r14
imulq $0x66666667, %r14, %rax # imm = 0x66666667
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x21, %rax
addl %ecx, %eax
leal (%rax,%rax,4), %eax
subl %eax, %r14d
callq 0x5070
cltq
movq 0xa0(%rsp), %rcx
movq 0xa8(%rsp), %rsi
subq %rcx, %rsi
sarq $0x3, %rsi
xorl %edx, %edx
divq %rsi
movslq %edx, %rax
movl (%rcx,%rax,8), %edx
movq %rdx, 0x58(%rsp)
movl 0x4(%rcx,%rax,8), %ecx
movq %rcx, 0x68(%rsp)
movq 0x70(%rsp), %rcx
movl (%rcx,%rax,8), %r13d
movl 0x4(%rcx,%rax,8), %r15d
xorl %eax, %eax
movq %rax, 0x30(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x20(%rsp)
movq %rax, 0x50(%rsp)
movdqa %xmm0, 0x40(%rsp)
callq 0x5070
incl %ebx
cltd
idivl %ebx
leal (%rdx,%r13), %ebx
addl $0x2, %ebx
callq 0x5070
incl %r14d
cltd
idivl %r14d
leal (%rdx,%r15), %eax
movq %rax, 0xf0(%rsp)
leal (%rdx,%r15), %eax
addl $0x2, %eax
movl %eax, 0x1c(%rsp)
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq %rbx, 0x90(%rsp)
testl %ebx, %ebx
jle 0xcdc7
movq 0x90(%rsp), %rax
shrl %eax
movq 0x58(%rsp), %rcx
subl %eax, %ecx
movq %rcx, 0x100(%rsp)
movl 0x1c(%rsp), %ecx
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
movq 0x68(%rsp), %rcx
movl %ecx, %edx
subl %eax, %edx
movl %edx, 0xc8(%rsp)
movq 0xf0(%rsp), %rdx
addl %edx, %ecx
subl %eax, %ecx
incl %ecx
movl %ecx, 0xc4(%rsp)
xorl %r13d, %r13d
movq 0x100(%rsp), %rax
leal (%rax,%r13), %ebx
movl %ebx, 0x8(%rsp)
movl 0xc8(%rsp), %eax
movl %eax, 0xc(%rsp)
movl $0x4, %r15d
movq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0xbf57
subl $0x1, %r15d
setb %cl
testq %rax, %rax
jne 0xcc9f
testb %cl, %cl
je 0xcc82
movq %rax, %rcx
shrq $0x20, %rcx
movq %rax, 0x10(%rsp)
testl %eax, %eax
sete %al
testq %rcx, %rcx
sete %cl
testb %al, %cl
jne 0xcd10
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0xccd6
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rsp)
jmp 0xcce5
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x16a4e
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0xcd01
movq 0x10(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x48(%rsp)
jmp 0xcd10
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x16a4e
movl %ebx, 0x8(%rsp)
movl 0xc4(%rsp), %eax
movl %eax, 0xc(%rsp)
movl $0x4, %ebx
movq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0xbf57
subl $0x1, %ebx
setb %cl
testq %rax, %rax
jne 0xcd45
testb %cl, %cl
je 0xcd29
movq %rax, %rcx
shrq $0x20, %rcx
movq %rax, 0x10(%rsp)
testl %eax, %eax
sete %al
testq %rcx, %rcx
sete %cl
testb %al, %cl
jne 0xcdb6
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0xcd7c
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rsp)
jmp 0xcd8b
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x16a4e
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0xcda7
movq 0x10(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x48(%rsp)
jmp 0xcdb6
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x16a4e
incl %r13d
cmpl 0x90(%rsp), %r13d
jne 0xcc5c
cmpl $0x0, 0xf0(%rsp)
js 0xcf8a
movq 0x90(%rsp), %rdi
movl %edi, %eax
shrl $0x1f, %eax
addl %edi, %eax
sarl %eax
movq 0x58(%rsp), %rcx
subl %eax, %ecx
movl 0x1c(%rsp), %esi
movl %esi, %eax
shrl %eax
movq 0x68(%rsp), %rdx
subl %eax, %edx
movq %rdx, 0x68(%rsp)
movq %rcx, 0x58(%rsp)
leal (%rdi,%rcx), %eax
decl %eax
movl %eax, 0x90(%rsp)
cmpl $0x3, %esi
movl $0x2, %eax
cmovll %eax, %esi
movl %esi, 0x1c(%rsp)
movl $0x1, %r15d
movq 0x68(%rsp), %rax
leal (%rax,%r15), %r13d
movq 0x58(%rsp), %rax
movl %eax, 0x8(%rsp)
movl %r13d, 0xc(%rsp)
movl $0x4, %ebx
movq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0xbf57
subl $0x1, %ebx
setb %cl
testq %rax, %rax
jne 0xce64
testb %cl, %cl
je 0xce48
movq %rax, %rcx
shrq $0x20, %rcx
movq %rax, 0x10(%rsp)
testl %eax, %eax
sete %al
testq %rcx, %rcx
sete %cl
testb %al, %cl
jne 0xced5
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0xce9b
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rsp)
jmp 0xceaa
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x16a4e
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0xcec6
movq 0x10(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x48(%rsp)
jmp 0xced5
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x16a4e
movl 0x90(%rsp), %eax
movl %eax, 0x8(%rsp)
movl %r13d, 0xc(%rsp)
movl $0x4, %ebx
movq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0xbf57
subl $0x1, %ebx
setb %cl
testq %rax, %rax
jne 0xcf0b
testb %cl, %cl
je 0xceef
movq %rax, %rcx
shrq $0x20, %rcx
movq %rax, 0x10(%rsp)
testl %eax, %eax
sete %al
testq %rcx, %rcx
sete %cl
testb %al, %cl
jne 0xcf7c
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0xcf42
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rsp)
jmp 0xcf51
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x16a4e
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0xcf6d
movq 0x10(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x48(%rsp)
jmp 0xcf7c
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x16a4e
incl %r15d
cmpl 0x1c(%rsp), %r15d
jne 0xce27
movq 0x28(%rsp), %rax
subq 0x20(%rsp), %rax
je 0xd02d
movq 0x48(%rsp), %rcx
subq 0x40(%rsp), %rcx
cmpq %rax, %rcx
jne 0xd02d
callq 0x5070
cltq
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rsi
subq %rcx, %rsi
sarq $0x3, %rsi
xorl %edx, %edx
divq %rsi
movslq %edx, %r14
movq (%rcx,%r14,8), %rdi
movq 0x40(%rsp), %rax
movq (%rax,%r14,8), %rsi
callq 0xb9ec
movq 0xe8(%rsp), %r15
movl 0x98(%rsp), %ebx
shlq $0x3, %r14
movq 0x20(%rsp), %rdx
addq %r14, %rdx
movq 0xa8(%rsp), %rsi
cmpq 0xb0(%rsp), %rsi
je 0xd04c
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0xa8(%rsp)
jmp 0xd059
movl 0x9c(%rsp), %r14d
incl %r14d
jmp 0xd0f1
movl 0x9c(%rsp), %r14d
incl %r14d
movq 0xe8(%rsp), %r15
movl 0x98(%rsp), %ebx
jmp 0xd0d3
leaq 0xa0(%rsp), %rdi
callq 0x16a4e
addq 0x40(%rsp), %r14
movq 0x78(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0xd07b
movq (%r14), %rax
movq %rax, (%rsi)
addq $0x8, 0x78(%rsp)
jmp 0xd088
leaq 0x70(%rsp), %rdi
movq %r14, %rdx
callq 0x16a4e
movl $0x0, 0xcc(%rsp)
movq 0xd8(%rsp), %rsi
cmpq 0xe0(%rsp), %rsi
je 0xd0b9
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xd8(%rsp)
jmp 0xd0ce
leaq 0xd0(%rsp), %rdi
leaq 0xcc(%rsp), %rdx
callq 0x1691a
incl %ebx
xorl %r14d, %r14d
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xd0e2
callq 0x5230
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xd0f1
callq 0x5230
cmpl $0x9, %r14d
jg 0xd100
cmpl $0xa, %ebx
jl 0xcadf
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0xd112
callq 0x5230
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
movq 0xf8(%rsp), %r14
je 0xd129
callq 0x5230
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xd13b
callq 0x5230
movq 0x60(%rsp), %rcx
incq %rcx
movq %rcx, 0x60(%rsp)
cmpq %r14, %rcx
jne 0xc8b9
callq 0x5070
cltq
imulq $-0x72c234f7, %rax, %rcx # imm = 0x8D3DCB09
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x6, %ecx
addl %edx, %ecx
imull $0x74, %ecx, %ecx
negl %ecx
leal (%rax,%rcx), %ebp
addl $0x11, %ebp
callq 0x5070
cltq
imulq $-0x72c234f7, %rax, %rcx # imm = 0x8D3DCB09
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x6, %ecx
addl %edx, %ecx
imull $0x74, %ecx, %ecx
negl %ecx
leal (%rax,%rcx), %esi
addl $0x11, %esi
movb $0x1, %al
xorl %ebx, %ebx
movl %ebp, %ecx
subl (%r15,%rbx,4), %ecx
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
cmpl $0x1b, %edx
ja 0xd20d
callq 0x5070
cltq
imulq $-0x7047dc11, %rax, %rcx # imm = 0x8FB823EF
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x6, %ecx
addl %edx, %ecx
imull $0x72, %ecx, %ecx
negl %ecx
leal (%rax,%rcx), %ebp
addl $0x11, %ebp
callq 0x5070
cltq
imulq $-0x7047dc11, %rax, %rcx # imm = 0x8FB823EF
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x6, %ecx
addl %edx, %ecx
imull $0x72, %ecx, %ecx
negl %ecx
leal (%rax,%rcx), %esi
addl $0x11, %esi
xorl %eax, %eax
incq %rbx
cmpq %r14, %rbx
sete %cl
setne %dl
movl %eax, %edi
movl $0x0, %r8d
cmoveq %r8, %rbx
notb %dil
orb %dl, %dil
orb %cl, %al
testb $0x1, %dil
jne 0xd1a7
movl %ebp, %edi
callq 0xc2c0
movq %r15, %rdi
callq 0x52e0
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xd2a2
movq %rax, %rbx
jmp 0xd2b1
jmp 0xd264
movq %rax, %rbx
jmp 0xd290
jmp 0xd26f
jmp 0xd26f
jmp 0xd26f
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xd281
callq 0x5230
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xd290
callq 0x5230
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0xd2a2
callq 0x5230
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0xd2b1
callq 0x5230
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xd2c3
callq 0x5230
movq %rbx, %rdi
callq 0x53d0