// File: /workspace/github_c_makefile_star2_O0/S01den[P]Lost_CavernRL/screen.c
// Function: recalcScreen
void recalcScreen(WINDOW *win_map, Map map[LONGUEUR][LARGEUR], int nbrEnnemies, Ennemy ennemies[])
{
	const char tileset_ennemies[] = "dtgn";
	const char tileset[] = " .#>=!+]/;* ?";
	const char tileset_pnj[] = "cwes";
	
	int j = 0;
	int i = 0;

	for(i = 0; i < LARGEUR; i++)
	{
		for(j = 0; j < LONGUEUR; j++)
		{
			if(map[j][i].seen == 1)
			{
				if(map[j][i].typeEnnemy == 0)
				{
					if(map[j][i].content == STAIRS)
					{
						wattron(win_map,A_BOLD);
						mvwprintw(win_map,j+1,i+1,"%c",tileset[map[j][i].content]);
						wattroff(win_map,A_BOLD);
					}
					else if(map[j][i].content == HOLE)
					{
						wattron(win_map,COLOR_PAIR(COLOR_HOLE));
						mvwprintw(win_map,j+1,i+1," ");
						wattroff(win_map,COLOR_PAIR(COLOR_HOLE));	
					}
					else if(map[j][i].content == MINES || map[j][i].content == DIST_WEAPON || map[j][i].content == CONTACT_WEAPON || map[j][i].content == DRUG || map[j][i].content == COMPUTER)
					{
						wattron(win_map,A_BOLD);
						mvwprintw(win_map,j+1,i+1,"%c",tileset[map[j][i].content]);
						wattroff(win_map,A_BOLD);		
					}
					else if(map[j][i].content == DOOR)
					{
						wattron(win_map,COLOR_PAIR(15));
						mvwprintw(win_map,j+1,i+1,"%c",tileset[map[j][i].content]);
						wattroff(win_map,COLOR_PAIR(15));			
					}
					else if(map[j][i].content == PNJ)
					{
						wattron(win_map,A_BOLD);
						mvwprintw(win_map,j+1,i+1,"%c",tileset_pnj[map[j][i].typePnj]);
						wattroff(win_map,A_BOLD);
					}				
					else if(map[j][i].content == BOMB)
					{
						wattron(win_map,A_BOLD);
						mvwprintw(win_map,j+1,i+1,"%c",tileset[map[j][i].content]);
						wattroff(win_map,A_BOLD);
						if(map[j][i].resistance-1 > 0)
						{
							map[j][i].resistance--;
						}
						else // EXPLOSION !!!
						{
							map[j][i].resistance = 0;
							map[j][i].content = FLOOR;
							map[j][i].effect = 2;
							if(i > 0)
								map[j][i-1].effect = 2;
							if(i < LARGEUR-1)
								map[j][i+1].effect = 2;
							if(j > 0)
								map[j-1][i].effect = 2;		
							if(j < LONGUEUR-1)
								map[j+1][i].effect = 2;

							int k = 0;
							int l = 0;

							int minJ = j-5;
							if(minJ < 0)
								minJ = 0;
							int maxJ = j+5;
							if(maxJ >= LONGUEUR)
								minJ = LONGUEUR-1;
							int minI = i-5;
							if(minI < 0)
								minI = 0;
							int maxI = i+5;
							if(maxI >= LARGEUR)
								maxI = LARGEUR-1;

							for(k = minJ; k <= maxJ; k++)
							{
								for(l = minI; l <= maxI; l++)
								{
									if(testEnnemyOnPos(ennemies,k,l,nbrEnnemies) >= 0)
									{
										ennemies[testEnnemyOnPos(ennemies,k,l,nbrEnnemies)].life -= 21+rand()%10;
									}
									if(rand()%4 <= 2)
									{
										map[k][l].resistance = 0;
										map[k][l].content = FLOOR;
									}
									if(rand()%5 == 0) //set fire
										map[k][l].effect = 1;	
								}
							}	

							flashBomb(win_map);
						}
					}
					else if(map[j][i].effect == 0)
					{
						wattron(win_map,A_DIM);
						mvwprintw(win_map,j+1,i+1,"%c",tileset[map[j][i].content]);
						wattroff(win_map,A_DIM);
					}
					else if(map[j][i].effect == 1) // fire
					{
						if(rand()%300 <= 298)
						{
							if(rand()%4 == 3)
							{
								wattron(win_map,COLOR_PAIR(10));
								mvwprintw(win_map,j+1,i+1,"%c",tileset[map[j][i].content]);
								wattroff(win_map,COLOR_PAIR(10));		
							}
							else
							{
								wattron(win_map,COLOR_PAIR(203));
								mvwprintw(win_map,j+1,i+1,"%c",tileset[map[j][i].content]);
								wattroff(win_map,COLOR_PAIR(203));
							}					
						}
						else
						{
							map[j][i].effect = 0;
							wattron(win_map,A_BOLD);
							mvwprintw(win_map,j+1,i+1,"%c",tileset[map[j][i].content]);
							wattroff(win_map,A_BOLD);						
						}

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

						int counterX = 0;
						int counterY = 0;

						for(counterX = -1; counterX <= 1; counterX++) // the lava flow
						{
							for(counterY = -1; counterY <= 1; counterY++)
							{
								if(rand()%10 == 0)
								{
									if(map[j+counterX][i+counterY].content == FLOOR || map[j+counterX][i+counterY].content == CONTACT_WEAPON || map[j+counterX][i+counterY].content == DIST_WEAPON)
									{
										map[j+counterX][i+counterY].effect = 3;
									}
								}
							}
						}		
					}				
				}
				else
				{
					int ennemy = testEnnemyOnPos(ennemies,j,i,nbrEnnemies);
					if(ennemy >= 0)
					{
						ennemies[ennemy].seen = 0;
						wattron(win_map,A_BOLD);
						mvwprintw(win_map,j+1,i+1,"%c",tileset_ennemies[map[j][i].typeEnnemy-1]);
						wattroff(win_map,A_BOLD);
					}
				}
			}				
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl 0x4348(%rip), %eax      # 0x1a6b8
movl %eax, -0x25(%rbp)
movb 0x4343(%rip), %al       # 0x1a6bc
movb %al, -0x21(%rbp)
movq 0x433f(%rip), %rax      # 0x1a6c2
movq %rax, -0x33(%rbp)
movl 0x433d(%rip), %eax      # 0x1a6ca
movl %eax, -0x2b(%rbp)
movw 0x4337(%rip), %ax       # 0x1a6ce
movw %ax, -0x27(%rbp)
movl 0x431c(%rip), %eax      # 0x1a6bd
movl %eax, -0x38(%rbp)
movb 0x4317(%rip), %al       # 0x1a6c1
movb %al, -0x34(%rbp)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x40(%rbp)
cmpl $0x82, -0x40(%rbp)
jge 0x1726d
movl $0x0, -0x3c(%rbp)
cmpl $0x27, -0x3c(%rbp)
jge 0x1725d
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, 0x8(%rax)
jne 0x1724d
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xc(%rax)
jne 0x171a7
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x3, (%rax)
jne 0x164bd
movq -0x8(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x33(%rbp,%rax), %r8d
leaq 0x4231(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x171a2
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x16526
movq -0x8(%rbp), %rdi
movl $0xea00, %esi           # imm = 0xEA00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
leaq 0x1bde(%rip), %rcx      # 0x180e6
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0xea00, %esi           # imm = 0xEA00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x171a0
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x4, (%rax)
je 0x165d4
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x9, (%rax)
je 0x165d4
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x8, (%rax)
je 0x165d4
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x5, (%rax)
je 0x165d4
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0xc, (%rax)
jne 0x16641
movq -0x8(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x33(%rbp,%rax), %r8d
leaq 0x40ad(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x1719e
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x6, (%rax)
jne 0x166d0
movq -0x8(%rbp), %rdi
movl $0xf00, %esi            # imm = 0xF00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x33(%rbp,%rax), %r8d
leaq 0x401e(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0xf00, %esi            # imm = 0xF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x1719c
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0xb, (%rax)
jne 0x16760
movq -0x8(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq 0x10(%rax), %rax
movsbl -0x38(%rbp,%rax), %r8d
leaq 0x3f8e(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x1719a
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0xa, (%rax)
jne 0x16b14
movq -0x8(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x33(%rbp,%rax), %r8d
leaq 0x3efb(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jle 0x16841
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x14(%rax)
jmp 0x16b0f
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x14(%rax)
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x2, 0x4(%rax)
cmpl $0x0, -0x40(%rbp)
jle 0x168db
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movl -0x40(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x2, 0x4(%rax)
cmpl $0x81, -0x40(%rbp)
jge 0x1690d
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x2, 0x4(%rax)
cmpl $0x0, -0x3c(%rbp)
jle 0x1693c
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x2, 0x4(%rax)
cmpl $0x26, -0x3c(%rbp)
jge 0x1696b
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x2, 0x4(%rax)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x3c(%rbp), %eax
subl $0x5, %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jge 0x1698f
movl $0x0, -0x4c(%rbp)
movl -0x3c(%rbp), %eax
addl $0x5, %eax
movl %eax, -0x50(%rbp)
cmpl $0x27, -0x50(%rbp)
jl 0x169a5
movl $0x26, -0x4c(%rbp)
movl -0x40(%rbp), %eax
subl $0x5, %eax
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
jge 0x169bb
movl $0x0, -0x54(%rbp)
movl -0x40(%rbp), %eax
addl $0x5, %eax
movl %eax, -0x58(%rbp)
cmpl $0x82, -0x58(%rbp)
jl 0x169d4
movl $0x81, -0x58(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x50(%rbp), %eax
jg 0x16b06
movl -0x54(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x58(%rbp), %eax
jg 0x16af6
movq -0x20(%rbp), %rdi
movl -0x44(%rbp), %esi
movl -0x48(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x8a10
cmpl $0x0, %eax
jl 0x16a57
callq 0x21e0
movl $0xa, %ecx
cltd
idivl %ecx
addl $0x15, %edx
movl %edx, -0x74(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rdi
movl -0x44(%rbp), %esi
movl -0x48(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x8a10
movl -0x74(%rbp), %edx
movl %eax, %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
callq 0x21e0
movl $0x4, %ecx
cltd
idivl %ecx
cmpl $0x2, %edx
jg 0x16ab0
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x48(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x14(%rax)
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x48(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
callq 0x21e0
movl $0x5, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x16ae6
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x48(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x4(%rax)
jmp 0x16ae8
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x169ec
jmp 0x16af8
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x169da
movq -0x8(%rbp), %rdi
callq 0x16220
jmp 0x17198
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
jne 0x16ba4
movq -0x8(%rbp), %rdi
movl $0x100000, %esi         # imm = 0x100000
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x33(%rbp,%rax), %r8d
leaq 0x3b4a(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x100000, %esi         # imm = 0x100000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x17196
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, 0x4(%rax)
jne 0x16e93
callq 0x21e0
movl $0x12c, %ecx            # imm = 0x12C
cltd
idivl %ecx
cmpl $0x12a, %edx            # imm = 0x12A
jg 0x16ccd
callq 0x21e0
movl $0x4, %ecx
cltd
idivl %ecx
cmpl $0x3, %edx
jne 0x16c60
movq -0x8(%rbp), %rdi
movl $0xa00, %esi            # imm = 0xA00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x33(%rbp,%rax), %r8d
leaq 0x3a8b(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0xa00, %esi            # imm = 0xA00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x16cc8
movq -0x8(%rbp), %rdi
movl $0xcb00, %esi           # imm = 0xCB00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x33(%rbp,%rax), %r8d
leaq 0x3a21(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0xcb00, %esi           # imm = 0xCB00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x16d59
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x33(%rbp,%rax), %r8d
leaq 0x3990(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x2, (%rax)
jne 0x16e8e
callq 0x21e0
movl $0xa, %ecx
cltd
idivl %ecx
cmpl $0x2, %edx
jne 0x16e8e
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
subl $0x1, %eax
cmpl $0x0, %eax
jle 0x16de8
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x14(%rax)
jmp 0x16e8c
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x14(%rax)
callq 0x21e0
movl $0x64, %ecx
cltd
idivl %ecx
cmpl $0x5a, %edx
jg 0x16e43
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
jmp 0x16e8a
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x4, (%rax)
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x18(%rax)
jmp 0x16e8c
jmp 0x16e8e
jmp 0x17194
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x2, 0x4(%rax)
jne 0x16f23
movq -0x8(%rbp), %rdi
movl $0x2900, %esi           # imm = 0x2900
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x33(%rbp,%rax), %r8d
leaq 0x37cb(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x2900, %esi           # imm = 0x2900
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x17192
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x4, 0x4(%rax)
jne 0x16fb3
movq -0x8(%rbp), %rdi
movl $0x7c00, %esi           # imm = 0x7C00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rax
movsbl -0x33(%rbp,%rax), %r8d
leaq 0x373b(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x7c00, %esi           # imm = 0x7C00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x17190
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x3, 0x4(%rax)
jne 0x1718e
callq 0x21e0
movl $0x4, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x17030
movq -0x8(%rbp), %rdi
movl $0xcb00, %esi           # imm = 0xCB00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
leaq 0x2e14(%rip), %rcx      # 0x19e29
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0xcb00, %esi           # imm = 0xCB00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x17072
movq -0x8(%rbp), %rdi
movl $0xf500, %esi           # imm = 0xF500
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
leaq 0x2dd0(%rip), %rcx      # 0x19e29
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0xf500, %esi           # imm = 0xF500
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x60(%rbp)
movl $0xffffffff, -0x5c(%rbp) # imm = 0xFFFFFFFF
cmpl $0x1, -0x5c(%rbp)
jg 0x1718c
movl $0xffffffff, -0x60(%rbp) # imm = 0xFFFFFFFF
cmpl $0x1, -0x60(%rbp)
jg 0x1717c
callq 0x21e0
movl $0xa, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1716c
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
addl -0x5c(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movl -0x40(%rbp), %ecx
addl -0x60(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
je 0x1713c
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
addl -0x5c(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movl -0x40(%rbp), %ecx
addl -0x60(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x8, (%rax)
je 0x1713c
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
addl -0x5c(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movl -0x40(%rbp), %ecx
addl -0x60(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x9, (%rax)
jne 0x1716a
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
addl -0x5c(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movl -0x40(%rbp), %ecx
addl -0x60(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x3, 0x4(%rax)
jmp 0x1716c
jmp 0x1716e
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x17098
jmp 0x1717e
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x17087
jmp 0x1718e
jmp 0x17190
jmp 0x17192
jmp 0x17194
jmp 0x17196
jmp 0x17198
jmp 0x1719a
jmp 0x1719c
jmp 0x1719e
jmp 0x171a0
jmp 0x171a2
jmp 0x1724b
movq -0x20(%rbp), %rdi
movl -0x3c(%rbp), %esi
movl -0x40(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x8a10
movl %eax, -0x64(%rbp)
cmpl $0x0, -0x64(%rbp)
jl 0x17249
movq -0x20(%rbp), %rax
movslq -0x64(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
addl $0x1, %esi
movl -0x40(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movslq -0x40(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
cltq
movsbl -0x25(%rbp,%rax), %r8d
leaq 0x34a0(%rip), %rcx      # 0x1a6d0
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x1724b
jmp 0x1724d
jmp 0x1724f
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x163d6
jmp 0x1725f
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x163c2
addq $0x80, %rsp
popq %rbp
retq