// File: /workspace/github_cpp_makefile_star2_O1/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 0x147f3(%rip), %rax     # 0x21350
movq %rax, 0x60(%rsp)
leaq 0x61997(%rip), %rax     # 0x6e500
movq %rax, 0x58(%rsp)
leaq 0x8d95b(%rip), %r15     # 0x9a4d0
leaq 0x2a764(%rip), %r12     # 0x372e0
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 0x5664b(%rip), %rcx     # 0x63200
movb %r13b, (%rcx,%rax)
leaq 0x5be30(%rip), %rcx     # 0x689f0
movb %r13b, (%rcx,%rax)
callq 0x5070
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss 0xb42c(%rip), %xmm0     # 0x18004
mulss 0xb4a4(%rip), %xmm0     # 0x18084
addss 0xb4a0(%rip), %xmm0     # 0x18088
movss %xmm0, (%r12,%r14,4)
testq %r14, %r14
setne %al
movl $0x4, %ecx
cmpq $0x95, %r14
je 0xcc3c
andb %bl, %al
je 0xcc3c
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 0xcc3c
movl %eax, %eax
leaq 0xe363(%rip), %rcx      # 0x1af9c
movl (%rcx,%rax,4), %ecx
movq 0x60(%rsp), %rax
movl %ecx, (%rax,%r14,4)
incq %r14
cmpq $0x96, %r14
jne 0xcb9d
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 0xcb83
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), %ebx
addl $0x5, %ebx
leaq (,%rbx,4), %rdi
callq 0x5330
movq %rax, %r15
leaq -0x1(%rbx), %rax
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq 0xc(,%rbx,4), %rax
andq $-0x10, %rax
movdqa 0xb490(%rip), %xmm1     # 0x18170
movdqa 0xb498(%rip), %xmm2     # 0x18180
xorl %ecx, %ecx
movdqa 0xb49e(%rip), %xmm3     # 0x18190
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0xb49e(%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 0xcd3e
movl $0xffffffef, (%r15,%rcx) # imm = 0xFFFFFFEF
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0xcd55
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 0xcd95
movl $0xffffffef, 0x8(%r15,%rcx) # imm = 0xFFFFFFEF
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0xcda8
movl $0xffffffef, 0xc(%r15,%rcx) # imm = 0xFFFFFFEF
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0xcd02
movl %ebx, %r14d
movq $0x0, 0x60(%rsp)
movq %r15, 0xe8(%rsp)
movq %r14, 0xf8(%rsp)
callq 0x5070
movslq %eax, %r12
imulq $-0x72c234f7, %r12, %rax # imm = 0x8D3DCB09
shrq $0x20, %rax
addl %r12d, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x6, %eax
addl %ecx, %eax
imull $0x74, %eax, %eax
subl %eax, %r12d
callq 0x5070
movslq %eax, %rbp
imulq $-0x72c234f7, %rbp, %rax # imm = 0x8D3DCB09
shrq $0x20, %rax
addl %ebp, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0x6, %eax
addl %ecx, %eax
imull $0x74, %eax, %eax
subl %eax, %ebp
callq 0x5070
movl %eax, %r14d
callq 0x5070
cmpq $0x0, 0x60(%rsp)
je 0xcebe
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 0xceac
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 0xce67
testb $0x1, %al
je 0xce23
addl $0x11, %r12d
addl $0x11, %ebp
pxor %xmm0, %xmm0
movdqa %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
movq %rbp, %rax
shlq $0x20, %rax
addq %r12, %rax
movq %rax, 0x70(%rsp)
movq 0xa8(%rsp), %rsi
testq %rsi, %rsi
je 0xcf08
movq %rax, (%rsi)
addq $0x8, 0xa8(%rsp)
jmp 0xcf1a
leaq 0xa0(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x16f70
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, 0xc0(%rsp)
movq 0x78(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0xcfa8
movq %rbx, (%rsi)
addq $0x8, 0x78(%rsp)
jmp 0xcfba
leaq 0x70(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
callq 0x16f70
pxor %xmm0, %xmm0
movdqa %xmm0, 0xc0(%rsp)
movq $0x0, 0xd0(%rsp)
movl $0x0, 0x20(%rsp)
movq 0xc8(%rsp), %rsi
testq %rsi, %rsi
je 0xcffc
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xc8(%rsp)
jmp 0xd00e
leaq 0xc0(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x17092
movq 0xa0(%rsp), %rax
movq (%rax), %rdi
movq 0x70(%rsp), %rax
movq (%rax), %rsi
callq 0xbdbf
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 0xd559
movq 0x78(%rsp), %rdx
subq 0x70(%rsp), %rdx
cmpq %rcx, %rdx
jne 0xd559
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 0xd30b
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, 0xe0(%rsp)
movq 0xf0(%rsp), %rdx
addl %edx, %ecx
subl %eax, %ecx
incl %ecx
movl %ecx, 0xdc(%rsp)
xorl %r13d, %r13d
movq 0x100(%rsp), %rax
leal (%rax,%r13), %ebx
movl %ebx, 0x8(%rsp)
movl 0xe0(%rsp), %eax
movl %eax, 0xc(%rsp)
movl $0x5, %r15d
movq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0xc30f
testq %rax, %rax
jne 0xd1e7
decl %r15d
jne 0xd1ce
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rax, %rcx
shrq $0x20, %rcx
testl %eax, %eax
sete %al
testq %rcx, %rcx
sete %cl
testb %al, %cl
jne 0xd258
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0xd21e
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rsp)
jmp 0xd22d
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x171c6
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0xd249
movq 0x10(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x48(%rsp)
jmp 0xd258
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x171c6
movl %ebx, 0x8(%rsp)
movl 0xdc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl $0x5, %ebx
movq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0xc30f
testq %rax, %rax
jne 0xd289
decl %ebx
jne 0xd271
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rax, %rcx
shrq $0x20, %rcx
testl %eax, %eax
sete %al
testq %rcx, %rcx
sete %cl
testb %al, %cl
jne 0xd2fa
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0xd2c0
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rsp)
jmp 0xd2cf
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x171c6
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0xd2eb
movq 0x10(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x48(%rsp)
jmp 0xd2fa
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x171c6
incl %r13d
cmpl 0x90(%rsp), %r13d
jne 0xd1a8
cmpl $0x0, 0xf0(%rsp)
js 0xd4c6
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 $0x5, %ebx
movq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0xc30f
testq %rax, %rax
jne 0xd3a4
decl %ebx
jne 0xd38c
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rax, %rcx
shrq $0x20, %rcx
testl %eax, %eax
sete %al
testq %rcx, %rcx
sete %cl
testb %al, %cl
jne 0xd415
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0xd3db
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rsp)
jmp 0xd3ea
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x171c6
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0xd406
movq 0x10(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x48(%rsp)
jmp 0xd415
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x171c6
movl 0x90(%rsp), %eax
movl %eax, 0x8(%rsp)
movl %r13d, 0xc(%rsp)
movl $0x5, %ebx
movq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0xc30f
testq %rax, %rax
jne 0xd447
decl %ebx
jne 0xd42f
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rax, %rcx
shrq $0x20, %rcx
testl %eax, %eax
sete %al
testq %rcx, %rcx
sete %cl
testb %al, %cl
jne 0xd4b8
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0xd47e
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rsp)
jmp 0xd48d
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x171c6
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0xd4a9
movq 0x10(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x48(%rsp)
jmp 0xd4b8
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x171c6
incl %r15d
cmpl 0x1c(%rsp), %r15d
jne 0xd36b
movq 0x28(%rsp), %rax
subq 0x20(%rsp), %rax
je 0xd569
movq 0x48(%rsp), %rcx
subq 0x40(%rsp), %rcx
cmpq %rax, %rcx
jne 0xd569
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 0xbdbf
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 0xd588
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0xa8(%rsp)
jmp 0xd595
movl 0x9c(%rsp), %r14d
incl %r14d
jmp 0xd62d
movl 0x9c(%rsp), %r14d
incl %r14d
movq 0xe8(%rsp), %r15
movl 0x98(%rsp), %ebx
jmp 0xd60f
leaq 0xa0(%rsp), %rdi
callq 0x171c6
addq 0x40(%rsp), %r14
movq 0x78(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0xd5b7
movq (%r14), %rax
movq %rax, (%rsi)
addq $0x8, 0x78(%rsp)
jmp 0xd5c4
leaq 0x70(%rsp), %rdi
movq %r14, %rdx
callq 0x171c6
movl $0x0, 0xe4(%rsp)
movq 0xc8(%rsp), %rsi
cmpq 0xd0(%rsp), %rsi
je 0xd5f5
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xc8(%rsp)
jmp 0xd60a
leaq 0xc0(%rsp), %rdi
leaq 0xe4(%rsp), %rdx
callq 0x17092
incl %ebx
xorl %r14d, %r14d
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xd61e
callq 0x5230
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xd62d
callq 0x5230
cmpl $0x9, %r14d
jg 0xd63c
cmpl $0xa, %ebx
jl 0xd02b
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0xd64e
callq 0x5230
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
movq 0xf8(%rsp), %r14
je 0xd665
callq 0x5230
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xd677
callq 0x5230
movq 0x60(%rsp), %rcx
incq %rcx
movq %rcx, 0x60(%rsp)
cmpq %r14, %rcx
jne 0xcdd9
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 0xd749
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 %rbx, %r14
jne 0xd6e3
testb $0x1, %al
je 0xd6df
movl %ebp, %edi
callq 0xc787
movq %r15, %rdi
callq 0x52e0
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd782
movq %rax, %rbx
jmp 0xd7c0
movq %rax, %rbx
jmp 0xd7cf
movq %rax, %rbx
jmp 0xd7ae
jmp 0xd78d
jmp 0xd78d
jmp 0xd78d
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xd79f
callq 0x5230
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xd7ae
callq 0x5230
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0xd7c0
callq 0x5230
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0xd7cf
callq 0x5230
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xd7e1
callq 0x5230
movq %rbx, %rdi
callq 0x53d0