// File: /workspace/github_c_makefile_star2_O0/S01den[P]Lost_CavernRL/screen.c
// Function: calcFOV
void calcFOV(Map map[LONGUEUR][LARGEUR], int view, int posX, int posY, WINDOW *win_map, Ennemy ennemies[], int nbrEnnemies, int *ennemyPresent, int colorBlind, int stone, Drug drugList[], int nbrDrugs, Weapons weaponOnFloor[], int nbrWeapons, Armor armorOnFloor[], int nbrArmors, Pnj pnjOnFloor[], int nbrPnjOnFloor)
{
	const char tileset_ennemies[] = "dtgn";
	const char tileset_pnj[] = "cwes";
	const char tileset[] = " .#>=!+]/;* ?";

	float i = 0;
	float j = 0;
	int angle = 0; // en radian
	float ox,oy = 0;
	int c = 0;
	int colorWeapon = 22;
	int colorArmor = 22;

	for(angle = 0; angle < nbrEnnemies; angle++)
	{
		ennemies[angle].seen = 0;
	}

	for(angle = 0; angle < 360; angle++)
	{
		i = cos((float)angle*0.01745f); // 1° = 0.01745 rad because 360° = 2pi rad
		j = sin((float)angle*0.01745f);
		ox = (float)posX+0.5f;
		oy = (float)posY+0.5f;

			for(c = 0; c < view && (int)ox+i <= LONGUEUR && (int)ox+i >= -1 && (int)oy+j >= -1 && (int)oy+j <= LARGEUR;c++)
			{
				if(!stone)
				{
					if(map[(int)ox][(int)oy].effect == 0)
					{
						wattron(win_map,A_BOLD);
						mvwprintw(win_map,(int)ox+1,(int)oy+1,"%c",tileset[map[(int)ox][(int)oy].content]);
						wattroff(win_map,A_BOLD);					
					}
					else if(map[(int)ox][(int)oy].effect == 1) // on fire
					{
						if(rand()%300 <= 298)
						{
							if(rand()%4 == 3)
							{
								wattron(win_map,COLOR_PAIR(10));
								mvwprintw(win_map,(int)ox+1,(int)oy+1,"%c",tileset[map[(int)ox][(int)oy].content]);
								wattroff(win_map,COLOR_PAIR(10));		
							}
							else
							{
								wattron(win_map,COLOR_PAIR(203));
								mvwprintw(win_map,(int)ox+1,(int)oy+1,"%c",tileset[map[(int)ox][(int)oy].content]);
								wattroff(win_map,COLOR_PAIR(203));
							}					
						}
						else
						{
							map[(int)ox][(int)oy].effect = 0;
							wattron(win_map,A_BOLD);
							mvwprintw(win_map,(int)ox+1,(int)oy+1,"%c",tileset[map[(int)ox][(int)oy].content]);
							wattroff(win_map,A_BOLD);						
						}

						if(map[(int)ox][(int)oy].content == WALL && rand()%10 == 2)
						{
							if(map[(int)ox][(int)oy].resistance-1 > 0)
							{
								map[(int)ox][(int)oy].resistance--;
							}
							else
							{
								map[(int)ox][(int)oy].resistance = 0;
								if(rand()%100 <= 90)
									map[(int)ox][(int)oy].content = FLOOR;
								else
								{
									map[(int)ox][(int)oy].content = MINES;
									map[(int)ox][(int)oy].trap = 1;
								}
							}
						}
					}
					else if(map[(int)ox][(int)oy].effect == 2) // radioactive
					{
						wattron(win_map,COLOR_PAIR(83));
						mvwprintw(win_map,(int)ox+1,(int)oy+1,"%c",tileset[map[(int)ox][(int)oy].content]);
						wattroff(win_map,COLOR_PAIR(83));				
					}
					else if(map[(int)ox][(int)oy].effect == 3) // lava
					{
						if(rand()%4 == 0)
						{
							wattron(win_map,COLOR_PAIR(203));
							mvwprintw(win_map,(int)ox+1,(int)oy+1,"*");
							wattroff(win_map,COLOR_PAIR(203));
						}
						else
						{
							wattron(win_map,COLOR_PAIR(COLOR_LAVA));
							mvwprintw(win_map,(int)ox+1,(int)oy+1,"*");
							wattroff(win_map,COLOR_PAIR(COLOR_LAVA));	
						}			
					}
					else if(map[(int)ox][(int)oy].effect == 4) // gem
					{
						wattron(win_map,COLOR_PAIR(124));
						mvwprintw(win_map,j+1,i+1,"#");
						wattroff(win_map,COLOR_PAIR(124));				
					}

					map[(int)ox][(int)oy].seen = 1;

					int testPnj = testPnjOnPos(pnjOnFloor,(int)ox,(int)oy,nbrPnjOnFloor);
					if(testPnj >= 0)
					{
							wattron(win_map,COLOR_PAIR(STAIRS_COLOR));
							mvwprintw(win_map,(int)ox+1,(int)oy+1,"%c",tileset_pnj[pnjOnFloor[testPnj].type]);
							wattroff(win_map,COLOR_PAIR(STAIRS_COLOR));	
							map[(int)ox][(int)oy].typePnj = pnjOnFloor[testPnj].type;
					}

					int testEnnemy = testEnnemyOnPos(ennemies,(int)ox,(int)oy,nbrEnnemies);
					
					if(testEnnemy >= 0 && ennemies[testEnnemy].life > 0 && ennemies[testEnnemy].type > 0)
					{
						*ennemyPresent = 1;
						ennemies[testEnnemy].seen = 1;
						map[(int)ox][(int)oy].typeEnnemy = ennemies[testEnnemy].type;
						if(ennemies[testEnnemy].effect == 1)
						{
							wattron(win_map,COLOR_PAIR(BURN_EFFECT));
							if(ennemies[testEnnemy].boss == 0)
								mvwprintw(win_map,(int)ox+1,(int)oy+1,"%c",tileset_ennemies[map[(int)ox][(int)oy].typeEnnemy-1]);
							else
								mvwprintw(win_map,(int)ox+1,(int)oy+1,"%c",tileset_ennemies[map[(int)ox][(int)oy].typeEnnemy-1]-32);
							wattroff(win_map,COLOR_PAIR(BURN_EFFECT));
						}
						else
						{
							wattron(win_map,COLOR_PAIR(ENEMY_COLORS+1));
							if(ennemies[testEnnemy].boss == 0)
								mvwprintw(win_map,(int)ox+1,(int)oy+1,"%c",tileset_ennemies[map[(int)ox][(int)oy].typeEnnemy-1]);
							else
								mvwprintw(win_map,(int)ox+1,(int)oy+1,"%c",tileset_ennemies[map[(int)ox][(int)oy].typeEnnemy-1]-32);
							wattroff(win_map,COLOR_PAIR(ENEMY_COLORS+1));
						}
					}
					else
					{
						map[(int)ox][(int)oy].typeEnnemy = 0;
					}

					if(map[(int)ox][(int)oy].typeEnnemy == 0)
					{
							if(map[(int)ox][(int)oy].content == WALL)
							{
								if(colorBlind == 0 && map[(int)ox][(int)oy].effect == 0)
								{
									switch(map[(int)ox][(int)oy].resistance/10)
									{
										case 0:
											wattron(win_map,COLOR_PAIR(COLOR_RESIST_1));
											mvwprintw(win_map,(int)ox+1,(int)oy+1,"#");
											wattroff(win_map,COLOR_PAIR(COLOR_RESIST_1));
											break;
										case 1:
											wattron(win_map,COLOR_PAIR(COLOR_RESIST_2));
											mvwprintw(win_map,(int)ox+1,(int)oy+1,"#");
											wattroff(win_map,COLOR_PAIR(COLOR_RESIST_2));
											break;
										case 2:
											wattron(win_map,COLOR_PAIR(COLOR_RESIST_3));
											mvwprintw(win_map,(int)ox+1,(int)oy+1,"#");
											wattroff(win_map,COLOR_PAIR(COLOR_RESIST_3));
											break;
										default:
											wattron(win_map,COLOR_PAIR(COLOR_RESIST_3));
											mvwprintw(win_map,(int)ox+1,(int)oy+1,"#");
											wattroff(win_map,COLOR_PAIR(COLOR_RESIST_3));
											break;
									}
								}
								else if(colorBlind == 1)
								{
									wattron(win_map,A_DIM);
									mvwprintw(win_map,(int)ox+1,(int)oy+1,"#");
									wattroff(win_map,A_DIM);
								}
								else if(map[(int)ox][(int)oy].effect == 2)
								{
									wattron(win_map,COLOR_PAIR(83));
									mvwprintw(win_map,(int)ox+1,(int)oy+1,"#");
									wattroff(win_map,COLOR_PAIR(83));
								}
								break;
							}
							else if(map[(int)ox][(int)oy].content == STAIRS)
							{
								wattron(win_map,COLOR_PAIR(STAIRS_COLOR));
								mvwprintw(win_map,(int)ox+1,(int)oy+1,">");
								wattroff(win_map,COLOR_PAIR(STAIRS_COLOR));		
							}
							else if(map[(int)ox][(int)oy].content == COMPUTER)
							{
								wattron(win_map,COLOR_PAIR(STAIRS_COLOR));
								mvwprintw(win_map,(int)ox+1,(int)oy+1,"?");
								wattroff(win_map,COLOR_PAIR(STAIRS_COLOR));					
							}
							else if(map[(int)ox][(int)oy].content == HOLE)
							{
								wattron(win_map,COLOR_PAIR(COLOR_HOLE));
								mvwprintw(win_map,(int)ox+1,(int)oy+1," ");
								wattroff(win_map,COLOR_PAIR(COLOR_HOLE));	
							}
							else if(map[(int)ox][(int)oy].content == MINES && map[(int)ox][(int)oy].trap > 0)
							{
								wattron(win_map,COLOR_PAIR(map[(int)ox][(int)oy].trap+21));
								mvwprintw(win_map,(int)ox+1,(int)oy+1,"=");
								wattroff(win_map,COLOR_PAIR(map[(int)ox][(int)oy].trap+21));		
							}
							else if(map[(int)ox][(int)oy].content == DRUG)
							{
								int drug = testDrug(drugList,(int)ox,(int)oy,nbrDrugs);
								if(drug >= 0)
								{
									//mvwprintw(win_map,0,0,"%d",drugList[drug].type);
									wattron(win_map,COLOR_PAIR(drugList[drug].color));
									mvwprintw(win_map,(int)ox+1,(int)oy+1,"!");
									wattroff(win_map,COLOR_PAIR(drugList[drug].color));					
								}
								else
								{
									map[(int)ox][(int)oy].content = FLOOR;
								}

							}
							else if(map[(int)ox][(int)oy].content == CONTACT_WEAPON)
							{
								int weapon = testWeapon(weaponOnFloor,(int)ox,(int)oy,nbrWeapons);
								switch(weaponOnFloor[weapon].rarity)
								{
									case 1:
										colorWeapon = 22;
										break;
									case 2:
										colorWeapon = 166;
										break;
									case 3:
										colorWeapon = 12;
										break;
									default:
										colorWeapon = 22;
										break;
								}
								if(weapon >= 0)
								{
									wattron(win_map,COLOR_PAIR(colorWeapon));
									mvwprintw(win_map,(int)ox+1,(int)oy+1,"/");
									wattroff(win_map,COLOR_PAIR(colorWeapon));
								}	
								else
								{
									map[(int)ox][(int)oy].content = FLOOR;
								}
							}
							else if(map[(int)ox][(int)oy].content == DIST_WEAPON)
							{
								int weapon = testWeapon(weaponOnFloor,(int)ox,(int)oy,nbrWeapons);
								switch(weaponOnFloor[weapon].rarity)
								{
									case 1:
										colorWeapon = 22;
										break;
									case 2:
										colorWeapon = 166;
										break;
									case 3:
										colorWeapon = 12;
										break;
									default:
										colorWeapon = 22;
										break;
								}
								if(weapon >= 0)
								{
									wattron(win_map,COLOR_PAIR(colorWeapon));
									mvwprintw(win_map,(int)ox+1,(int)oy+1,";");
									wattroff(win_map,COLOR_PAIR(colorWeapon));	
								}
								else
								{
									map[(int)ox][(int)oy].content = FLOOR;
								}
							}
							else if(map[(int)ox][(int)oy].content == ARMOR)
							{
								int armor = testArmor(armorOnFloor, (int)ox, (int)oy, nbrArmors);
								switch(armorOnFloor[armor].rarity)
								{
									case 1:
										colorArmor = 22;
										break;
									case 2:
										colorArmor = 166;
										break;
									case 3:
										colorArmor = 12;
										break;
									default:
										colorArmor = 22;
										break;
								}
								if(armor >= 0)
								{
									wattron(win_map,COLOR_PAIR(colorArmor));
									mvwprintw(win_map,(int)ox+1,(int)oy+1,"]");
									wattroff(win_map,COLOR_PAIR(colorArmor));	
								}
								else
								{
									map[(int)ox][(int)oy].content = FLOOR;
								}	
							}
						}
				}
				else
				{
					int colorRand = rand()%256;
					wattron(win_map,COLOR_PAIR(colorRand));
					mvwprintw(win_map,(int)ox+1,(int)oy+1,"%c",tileset[map[(int)ox][(int)oy].content]);
					wattroff(win_map,COLOR_PAIR(colorRand));
					map[(int)ox][(int)oy].seen = 1;
				}			

				ox+=i;
				oy+=j;
			}
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl 0x68(%rbp), %eax
movq 0x60(%rbp), %rax
movl 0x58(%rbp), %eax
movq 0x50(%rbp), %rax
movl 0x48(%rbp), %eax
movq 0x40(%rbp), %rax
movl 0x38(%rbp), %eax
movq 0x30(%rbp), %rax
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movl 0x5b49(%rip), %eax      # 0x1a6b8
movl %eax, -0x2d(%rbp)
movb 0x5b44(%rip), %al       # 0x1a6bc
movb %al, -0x29(%rbp)
movl 0x5b3c(%rip), %eax      # 0x1a6bd
movl %eax, -0x32(%rbp)
movb 0x5b37(%rip), %al       # 0x1a6c1
movb %al, -0x2e(%rbp)
movq 0x5b2e(%rip), %rax      # 0x1a6c2
movq %rax, -0x40(%rbp)
movl 0x5b2c(%rip), %eax      # 0x1a6ca
movl %eax, -0x38(%rbp)
movw 0x5b26(%rip), %ax       # 0x1a6ce
movw %ax, -0x34(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x44(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x54(%rbp)
movl $0x0, -0x58(%rbp)
movl $0x16, -0x5c(%rbp)
movl $0x16, -0x60(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl 0x10(%rbp), %eax
jge 0x14c10
movq -0x28(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x14be7
movl $0x0, -0x4c(%rbp)
cmpl $0x168, -0x4c(%rbp)     # imm = 0x168
jge 0x161d6
cvtsi2ssl -0x4c(%rbp), %xmm0
movss 0x41b3(%rip), %xmm1     # 0x18de4
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x20c0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x44(%rbp)
cvtsi2ssl -0x4c(%rbp), %xmm0
movss 0x4190(%rip), %xmm1     # 0x18de4
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x2210
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x48(%rbp)
cvtsi2ssl -0x10(%rbp), %xmm0
movss 0x4169(%rip), %xmm1     # 0x18de0
addss %xmm1, %xmm0
movss %xmm0, -0x50(%rbp)
cvtsi2ssl -0x14(%rbp), %xmm0
movss 0x4153(%rip), %xmm1     # 0x18de0
addss %xmm1, %xmm0
movss %xmm0, -0x54(%rbp)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %ecx
xorl %eax, %eax
cmpl -0xc(%rbp), %ecx
movb %al, -0x7d(%rbp)
jge 0x14d29
cvttss2si -0x50(%rbp), %eax
cvtsi2ss %eax, %xmm1
addss -0x44(%rbp), %xmm1
xorl %eax, %eax
movss 0x411a(%rip), %xmm0     # 0x18ddc
ucomiss %xmm1, %xmm0
movb %al, -0x7d(%rbp)
jb 0x14d29
cvttss2si -0x50(%rbp), %eax
cvtsi2ss %eax, %xmm0
addss -0x44(%rbp), %xmm0
xorl %eax, %eax
movss 0x59ce(%rip), %xmm1     # 0x1a6b0
ucomiss %xmm1, %xmm0
movb %al, -0x7d(%rbp)
jb 0x14d29
cvttss2si -0x54(%rbp), %eax
cvtsi2ss %eax, %xmm0
addss -0x48(%rbp), %xmm0
xorl %eax, %eax
movss 0x59ae(%rip), %xmm1     # 0x1a6b0
ucomiss %xmm1, %xmm0
movb %al, -0x7d(%rbp)
jb 0x14d29
cvttss2si -0x54(%rbp), %eax
cvtsi2ss %eax, %xmm1
addss -0x48(%rbp), %xmm1
movss 0x40b8(%rip), %xmm0     # 0x18dd8
ucomiss %xmm1, %xmm0
setae %al
movb %al, -0x7d(%rbp)
movb -0x7d(%rbp), %al
testb $0x1, %al
jne 0x14d35
jmp 0x161c6
cmpl $0x0, 0x28(%rbp)
jne 0x160dc
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
jne 0x14de3
movq -0x20(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x40(%rbp,%rax), %r8d
leaq 0x590b(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x15341
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, 0x4(%rax)
jne 0x1513e
callq 0x21e0
movl $0x12c, %ecx            # imm = 0x12C
cltd
idivl %ecx
cmpl $0x12a, %edx            # imm = 0x12A
jg 0x14f2c
callq 0x21e0
movl $0x4, %ecx
cltd
idivl %ecx
cmpl $0x3, %edx
jne 0x14eb3
movq -0x20(%rbp), %rdi
movl $0xa00, %esi            # imm = 0xA00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x40(%rbp,%rax), %r8d
leaq 0x5838(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0xa00, %esi            # imm = 0xA00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x14f27
movq -0x20(%rbp), %rdi
movl $0xcb00, %esi           # imm = 0xCB00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x40(%rbp,%rax), %r8d
leaq 0x57c2(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0xcb00, %esi           # imm = 0xCB00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x14fcc
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movq -0x20(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x40(%rbp,%rax), %r8d
leaq 0x571d(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x2, (%rax)
jne 0x15139
callq 0x21e0
movl $0xa, %ecx
cltd
idivl %ecx
cmpl $0x2, %edx
jne 0x15139
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jle 0x15073
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x14(%rax)
jmp 0x15137
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x14(%rax)
callq 0x21e0
movl $0x64, %ecx
cltd
idivl %ecx
cmpl $0x5a, %edx
jg 0x150de
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
jmp 0x15135
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x4, (%rax)
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x18(%rax)
jmp 0x15137
jmp 0x15139
jmp 0x1533f
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x2, 0x4(%rax)
jne 0x151e2
movq -0x20(%rbp), %rdi
movl $0x5300, %esi           # imm = 0x5300
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x40(%rbp,%rax), %r8d
leaq 0x550c(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0x5300, %esi           # imm = 0x5300
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x1533d
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jne 0x152b6
callq 0x21e0
movl $0x4, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1526b
movq -0x20(%rbp), %rdi
movl $0xcb00, %esi           # imm = 0xCB00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x4bd9(%rip), %rcx      # 0x19e29
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0xcb00, %esi           # imm = 0xCB00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x152b1
movq -0x20(%rbp), %rdi
movl $0xf500, %esi           # imm = 0xF500
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x4b91(%rip), %rcx      # 0x19e29
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0xf500, %esi           # imm = 0xF500
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x1533b
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x4, 0x4(%rax)
jne 0x15339
movq -0x20(%rbp), %rdi
movl $0x7c00, %esi           # imm = 0x7C00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
movss 0x53b5(%rip), %xmm0     # 0x1a6b4
addss -0x48(%rbp), %xmm0
cvttss2si %xmm0, %esi
movss 0x53a4(%rip), %xmm0     # 0x1a6b4
addss -0x44(%rbp), %xmm0
cvttss2si %xmm0, %edx
leaq 0x53b3(%rip), %rcx      # 0x1a6d3
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0x7c00, %esi           # imm = 0x7C00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x1533b
jmp 0x1533d
jmp 0x1533f
jmp 0x15341
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x8(%rax)
movq 0x60(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
cvttss2si -0x54(%rbp), %edx
movl 0x68(%rbp), %ecx
callq 0x13950
movl %eax, -0x64(%rbp)
cmpl $0x0, -0x64(%rbp)
jl 0x15429
movq -0x20(%rbp), %rdi
movl $0xfe00, %esi           # imm = 0xFE00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
movq 0x60(%rbp), %rax
movslq -0x64(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq 0x8(%rax), %rax
movsbl -0x32(%rbp,%rax), %r8d
leaq 0x52fa(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0xfe00, %esi           # imm = 0xFE00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
movq 0x60(%rbp), %rax
movslq -0x64(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %edx
movslq %edx, %rdx
imulq $0xe38, %rdx, %rdx      # imm = 0xE38
addq %rdx, %rax
cvttss2si -0x54(%rbp), %edx
movslq %edx, %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
cvttss2si -0x54(%rbp), %edx
movl 0x10(%rbp), %ecx
callq 0x8a10
movl %eax, -0x68(%rbp)
cmpl $0x0, -0x68(%rbp)
jl 0x156ca
movq -0x28(%rbp), %rax
movslq -0x68(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jle 0x156ca
movq -0x28(%rbp), %rax
movslq -0x68(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x20(%rax)
jle 0x156ca
movq 0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x28(%rbp), %rax
movslq -0x68(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0xc(%rax)
movq -0x28(%rbp), %rax
movslq -0x68(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %ecx
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %edx
movslq %edx, %rdx
imulq $0xe38, %rdx, %rdx      # imm = 0xE38
addq %rdx, %rax
cvttss2si -0x54(%rbp), %edx
movslq %edx, %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movq -0x28(%rbp), %rax
movslq -0x68(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, 0x24(%rax)
jne 0x155df
movq -0x20(%rbp), %rdi
movl $0xf600, %esi           # imm = 0xF600
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x28(%rbp), %rax
movslq -0x68(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x28(%rax)
jne 0x1556f
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
cltq
movsbl -0x2d(%rbp,%rax), %r8d
leaq 0x516a(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
jmp 0x155c8
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
cltq
movsbl -0x2d(%rbp,%rax), %r8d
subl $0x20, %r8d
leaq 0x510f(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0xf600, %esi           # imm = 0xF600
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x156c8
movq -0x20(%rbp), %rdi
movl $0xf100, %esi           # imm = 0xF100
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x28(%rbp), %rax
movslq -0x68(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x28(%rax)
jne 0x1565d
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
cltq
movsbl -0x2d(%rbp,%rax), %r8d
leaq 0x507c(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
jmp 0x156b6
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
cltq
movsbl -0x2d(%rbp,%rax), %r8d
subl $0x20, %r8d
leaq 0x5021(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0xf100, %esi           # imm = 0xF100
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x156f6
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xc(%rax)
jne 0x160d7
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x2, (%rax)
jne 0x159ea
cmpl $0x0, 0x20(%rbp)
jne 0x15922
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
jne 0x15922
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rdx
leaq (%rdx,%rdx,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rdx, %rcx
movslq 0x14(%rax,%rcx), %rax
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x22, %rax
addl %ecx, %eax
movl %eax, -0x84(%rbp)
je 0x157f9
jmp 0x157d8
movl -0x84(%rbp), %eax
subl $0x1, %eax
je 0x15844
jmp 0x157e5
movl -0x84(%rbp), %eax
subl $0x2, %eax
je 0x1588f
jmp 0x158d7
movq -0x20(%rbp), %rdi
movl $0x1300, %esi           # imm = 0x1300
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x4ead(%rip), %rcx      # 0x1a6d3
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0x1300, %esi           # imm = 0x1300
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x1591d
movq -0x20(%rbp), %rdi
movl $0x1800, %esi           # imm = 0x1800
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x4e62(%rip), %rcx      # 0x1a6d3
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0x1800, %esi           # imm = 0x1800
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x1591d
movq -0x20(%rbp), %rdi
movl $0xef00, %esi           # imm = 0xEF00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x4e17(%rip), %rcx      # 0x1a6d3
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0xef00, %esi           # imm = 0xEF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x1591d
movq -0x20(%rbp), %rdi
movl $0xef00, %esi           # imm = 0xEF00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x4dcf(%rip), %rcx      # 0x1a6d3
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0xef00, %esi           # imm = 0xEF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x159e5
cmpl $0x1, 0x20(%rbp)
jne 0x15970
movq -0x20(%rbp), %rdi
movl $0x100000, %esi         # imm = 0x100000
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x4d7e(%rip), %rcx      # 0x1a6d3
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0x100000, %esi         # imm = 0x100000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x159e3
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x2, 0x4(%rax)
jne 0x159e1
movq -0x20(%rbp), %rdi
movl $0x5300, %esi           # imm = 0x5300
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x4d0b(%rip), %rcx      # 0x1a6d3
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0x5300, %esi           # imm = 0x5300
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x159e3
jmp 0x159e5
jmp 0x161c6
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x3, (%rax)
jne 0x15a5f
movq -0x20(%rbp), %rdi
movl $0xfe00, %esi           # imm = 0xFE00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x4c94(%rip), %rcx      # 0x1a6d5
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0xfe00, %esi           # imm = 0xFE00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x160d3
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0xc, (%rax)
jne 0x15ad4
movq -0x20(%rbp), %rdi
movl $0xfe00, %esi           # imm = 0xFE00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x4c18(%rip), %rcx      # 0x1a6ce
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0xfe00, %esi           # imm = 0xFE00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x160d1
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x15b49
movq -0x20(%rbp), %rdi
movl $0xea00, %esi           # imm = 0xEA00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x25bb(%rip), %rcx      # 0x180e6
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl $0xea00, %esi           # imm = 0xEA00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x160cf
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x4, (%rax)
jne 0x15c4f
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
jle 0x15c4f
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %esi
addl $0x15, %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x4ad5(%rip), %rcx      # 0x1a6d7
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %esi
addl $0x15, %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x160cd
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x5, (%rax)
jne 0x15d40
movq 0x30(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
cvttss2si -0x54(%rbp), %edx
movl 0x38(%rbp), %ecx
callq 0xd480
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x6c(%rbp)
jl 0x15d10
movq -0x20(%rbp), %rdi
movq 0x30(%rbp), %rax
movslq -0x6c(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x4073(%rip), %rcx      # 0x19d52
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movq 0x30(%rbp), %rax
movslq -0x6c(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x15d3b
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
jmp 0x160cb
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x8, (%rax)
jne 0x15e6c
movq 0x40(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
cvttss2si -0x54(%rbp), %edx
movl 0x48(%rbp), %ecx
callq 0xd500
movl %eax, -0x70(%rbp)
movq 0x40(%rbp), %rax
movslq -0x70(%rbp), %rcx
shlq $0x6, %rcx
movl 0x30(%rax,%rcx), %eax
movl %eax, -0x88(%rbp)
subl $0x1, %eax
je 0x15dbe
jmp 0x15da4
movl -0x88(%rbp), %eax
subl $0x2, %eax
je 0x15dc7
jmp 0x15db1
movl -0x88(%rbp), %eax
subl $0x3, %eax
je 0x15dd0
jmp 0x15dd9
movl $0x16, -0x5c(%rbp)
jmp 0x15de0
movl $0xa6, -0x5c(%rbp)
jmp 0x15de0
movl $0xc, -0x5c(%rbp)
jmp 0x15de0
movl $0x16, -0x5c(%rbp)
cmpl $0x0, -0x70(%rbp)
jl 0x15e3c
movq -0x20(%rbp), %rdi
movl -0x5c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x3323(%rip), %rcx      # 0x1913d
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl -0x5c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x15e67
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
jmp 0x160c9
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x9, (%rax)
jne 0x15f98
movq 0x40(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
cvttss2si -0x54(%rbp), %edx
movl 0x48(%rbp), %ecx
callq 0xd500
movl %eax, -0x74(%rbp)
movq 0x40(%rbp), %rax
movslq -0x74(%rbp), %rcx
shlq $0x6, %rcx
movl 0x30(%rax,%rcx), %eax
movl %eax, -0x8c(%rbp)
subl $0x1, %eax
je 0x15eea
jmp 0x15ed0
movl -0x8c(%rbp), %eax
subl $0x2, %eax
je 0x15ef3
jmp 0x15edd
movl -0x8c(%rbp), %eax
subl $0x3, %eax
je 0x15efc
jmp 0x15f05
movl $0x16, -0x5c(%rbp)
jmp 0x15f0c
movl $0xa6, -0x5c(%rbp)
jmp 0x15f0c
movl $0xc, -0x5c(%rbp)
jmp 0x15f0c
movl $0x16, -0x5c(%rbp)
cmpl $0x0, -0x74(%rbp)
jl 0x15f68
movq -0x20(%rbp), %rdi
movl -0x5c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x31fd(%rip), %rcx      # 0x19143
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl -0x5c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x15f93
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
jmp 0x160c7
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x7, (%rax)
jne 0x160c5
movq 0x50(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
cvttss2si -0x54(%rbp), %edx
movl 0x58(%rbp), %ecx
callq 0xd580
movl %eax, -0x78(%rbp)
movq 0x50(%rbp), %rax
movslq -0x78(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movl 0x24(%rax,%rcx), %eax
movl %eax, -0x90(%rbp)
subl $0x1, %eax
je 0x1601a
jmp 0x16000
movl -0x90(%rbp), %eax
subl $0x2, %eax
je 0x16023
jmp 0x1600d
movl -0x90(%rbp), %eax
subl $0x3, %eax
je 0x1602c
jmp 0x16035
movl $0x16, -0x60(%rbp)
jmp 0x1603c
movl $0xa6, -0x60(%rbp)
jmp 0x1603c
movl $0xc, -0x60(%rbp)
jmp 0x1603c
movl $0x16, -0x60(%rbp)
cmpl $0x0, -0x78(%rbp)
jl 0x16098
movq -0x20(%rbp), %rdi
movl -0x60(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
leaq 0x25bc(%rip), %rcx      # 0x18632
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl -0x60(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x160c3
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
jmp 0x160c5
jmp 0x160c7
jmp 0x160c9
jmp 0x160cb
jmp 0x160cd
jmp 0x160cf
jmp 0x160d1
jmp 0x160d3
jmp 0x160d5
jmp 0x160d7
jmp 0x1619a
callq 0x21e0
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movl %edx, -0x7c(%rbp)
movq -0x20(%rbp), %rdi
movl -0x7c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x20(%rbp), %rdi
cvttss2si -0x50(%rbp), %esi
addl $0x1, %esi
cvttss2si -0x54(%rbp), %edx
addl $0x1, %edx
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x40(%rbp,%rax), %r8d
leaq 0x4582(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
movl -0x7c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
movq -0x8(%rbp), %rax
cvttss2si -0x50(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
cvttss2si -0x54(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x8(%rax)
movss -0x44(%rbp), %xmm0
addss -0x50(%rbp), %xmm0
movss %xmm0, -0x50(%rbp)
movss -0x48(%rbp), %xmm0
addss -0x54(%rbp), %xmm0
movss %xmm0, -0x54(%rbp)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x14c9d
jmp 0x161c8
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x14c17
addq $0x90, %rsp
popq %rbp
retq
nop