// File: /workspace/github_c_makefile_star2_O0/S01den[P]Lost_CavernRL/menu.c
// Function: takeDrug
int takeDrug(Map map[LONGUEUR][LARGEUR], Inventory inventory[], Drug drugs[], int indice, char messagePrint[], int *colorPrint, Player *player, double *diseaseLevel)
{
	int ret = 0;
	int i = 0;
	char *typeOfDrugs[] = {"VACCIN","STEROID","ANTIDOTE","STIMULANT","HALLUCINOGEN","MEDIPAC","NEUROPARALYSANT"};

	WINDOW* win_menuInvent;
	win_menuInvent = newwin(8,30,(LONGUEUR-5)/2+7,(LARGEUR-15)/2);
	box(win_menuInvent, 0 , 0);
	
	if(inventory[indice].type == 2)
	{
		Drug drugUse = drugs[inventory[indice].object];
		if(drugUse.discovered == 0)
		{
			wattron(win_menuInvent,COLOR_PAIR(drugUse.color));
			mvwprintw(win_menuInvent,1,3,"! : UNKNOWN DRUG");
			wattroff(win_menuInvent,COLOR_PAIR(drugUse.color));
		}
		else
		{
			wattron(win_menuInvent,COLOR_PAIR(drugUse.color));
			mvwprintw(win_menuInvent,1,3,"! : %s",typeOfDrugs[drugUse.type]);
			wattroff(win_menuInvent,COLOR_PAIR(drugUse.color));
		}

			mvwprintw(win_menuInvent,3,1,"1) INJECT");
			mvwprintw(win_menuInvent,4,1,"2) DROP");

			int charMenu = wgetch(win_menuInvent);
			switch(charMenu)
			{
				case '1':
					drugs[inventory[indice].object].discovered = 1;
					for(i = 0; i < NBR_DRUGS; i++)
					{
						if(drugs[i].type == drugUse.type)
						{
							drugs[i].discovered = 1;

						}
					}
					switch(drugUse.type)
					{
						case 0: // vaccin
							if(drugUse.poisoned == 1)
							{
								*diseaseLevel+=10;
								*colorPrint = 197;
								snprintf(messagePrint,100,"YOU TOOK A POISONNED VAX ! (DISEASE LEVEL +10)");
							}
							else
							{
								*diseaseLevel-=10;
								*colorPrint = 47;
								snprintf(messagePrint,100,"YOU TOOK A VAX ! (DISEASE LEVEL -10)");
							}
							break;
						case 1: // steroid
							if(drugUse.poisoned == 1)
							{
								player->strength--;
								*colorPrint = 197;
								snprintf(messagePrint,100,"YOU TOOK A POISONNED STEROID DOSE, (-1 STR) !");
							}
							else
							{
								player->strength++;
								*colorPrint = 47;
								snprintf(messagePrint,100,"YOU TOOK A STEROID DOSE, (+1 STR) !");
							}
							break;
						case 2: // antidote
							wclear(win_menuInvent);
							wattron(win_menuInvent,A_UNDERLINE);
							mvwprintw(win_menuInvent,1,(LARGEUR-15)/4+25,"ANTIDOTE");
							wattroff(win_menuInvent,A_UNDERLINE);
							mvwprintw(win_menuInvent,2,3,"SELECT A DRUG IN YOUR INVENTORY TO DISCOVER AND CLEAN IT");
							wrefresh(win_menuInvent);

							int keyAntidote = wgetch(win_menuInvent);
							if(keyAntidote >= '1' && keyAntidote <= '9')
							{
								keyAntidote -= ('0'+1);
								if(inventory[keyAntidote].type == 2)
								{
									drugs[inventory[keyAntidote].object].discovered = 1;
									drugs[inventory[keyAntidote].object].poisoned = 0;
								}
							}
							
							*colorPrint = 47;
							snprintf(messagePrint,100,"YOU TOOK AN ANTIDOTE !");
							break;
						case 3: // stimulant
							if(drugUse.poisoned == 1)
							{
								player->agility--;
								*colorPrint = 197;
								snprintf(messagePrint,100,"YOU TOOK A POISONNED STIMULANT DOSE, (-1 AGL) !");
							}
							else
							{
								player->agility++;
								*colorPrint = 47;
								snprintf(messagePrint,100,"YOU TOOK A STIMULANT DOSE, (+1 AGL) !");
							}
							break;
						case 4: // hallucinogen
							if(player->state != 0)
								player->state2 = 3;
							else
								player->state = 3;
							player->view += 2;
							*colorPrint = 47;
							snprintf(messagePrint,120,"YOU TOOK AN HALLUCINOGEN DRUG ! YOUR VISION IS ALTERED BUT YOUR FIELD OF VIEW IS INCREASED");
							break;
						case 5: // medipac
							if(drugUse.poisoned == 1)
							{
								player->life -= 20;
								*colorPrint = 197; 
								snprintf(messagePrint,100,"YOU TOOK A POISONNED MEDIPAC, (-20 LP) !");
							}
							else
							{
								player->life += 20;
								*colorPrint = 47; 
								snprintf(messagePrint,100,"YOU TOOK A MEDIPAC, (+20 LP) !");
							}
							break;
						case 6: // neuroparalysant
								if(player->state != 0)
									player->state2 = 2;
								else
									player->state = 2;
								*colorPrint = 197; 
								snprintf(messagePrint,100,"YOU TOOK A NEUROPARALYSER POISON !");						
							break;
					}
					
					inventory[indice].type = -1;
					inventory[indice].object = 0;
					ret = 1;
					break;

				case '2':
					if(map[player->x+1][player->y].content == FLOOR)
					{
						drugs[inventory[indice].object].x = player->x+1;
						drugs[inventory[indice].object].y = player->y;
						map[player->x+1][player->y].content = DRUG;

						inventory[indice].type = -1;
						inventory[indice].object = 0;
					}
					else if(map[player->x-1][player->y].content == FLOOR)
					{
						drugs[inventory[indice].object].x = player->x-1;
						drugs[inventory[indice].object].y = player->y;
						map[player->x-1][player->y].content = DRUG;

						inventory[indice].type = -1;
						inventory[indice].object = 0;
					}
					else if(map[player->x][player->y+1].content == FLOOR)
					{
						drugs[inventory[indice].object].x = player->x;
						drugs[inventory[indice].object].y = player->y+1;
						map[player->x][player->y+1].content = DRUG;

						inventory[indice].type = -1;
						inventory[indice].object = 0;
					}
					else if(map[player->x][player->y-1].content == FLOOR)
					{
						drugs[inventory[indice].object].x = player->x;
						drugs[inventory[indice].object].y = player->y-1;
						map[player->x][player->y-1].content = DRUG;

						inventory[indice].type = -1;
						inventory[indice].object = 0;
					}	
						break;
			}

			wrefresh(win_menuInvent);
	}
	
	box(win_menuInvent, ' ', ' ');
	wborder(win_menuInvent, ' ', ' ', ' ',' ',' ',' ',' ',' ');
	wclear(win_menuInvent);
	wrefresh(win_menuInvent);
	delwin(win_menuInvent);

 return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
leaq -0x70(%rbp), %rdi
leaq 0xb36d(%rip), %rsi      # 0x1ccb0
movl $0x38, %edx
callq 0x2200
movl $0x8, %edi
movl $0x1e, %esi
movl $0x18, %edx
movl $0x39, %ecx
callq 0x2130
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
xorl %r9d, %r9d
movl %r9d, %esi
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0x2120
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpl $0x2, (%rax,%rcx,8)
jne 0x1229e
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movslq 0x4(%rcx,%rdx,8), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x94(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x8c(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x84(%rbp)
movl 0x18(%rax), %eax
movl %eax, -0x7c(%rbp)
cmpl $0x0, -0x84(%rbp)
jne 0x11a48
movq -0x78(%rbp), %rdi
movl -0x8c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x78(%rbp), %rdi
movl $0x1, %esi
movl $0x3, %edx
leaq 0x7731(%rip), %rcx      # 0x19154
movb $0x0, %al
callq 0x2070
movq -0x78(%rbp), %rdi
movl -0x8c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0x11aa8
movq -0x78(%rbp), %rdi
movl -0x8c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x78(%rbp), %rdi
movslq -0x94(%rbp), %rax
movq -0x70(%rbp,%rax,8), %r8
movl $0x1, %esi
movl $0x3, %edx
leaq 0x76e4(%rip), %rcx      # 0x19169
movb $0x0, %al
callq 0x2070
movq -0x78(%rbp), %rdi
movl -0x8c(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
movq -0x78(%rbp), %rdi
leaq 0x8143(%rip), %rcx      # 0x19bf6
xorl %eax, %eax
movb %al, -0xa1(%rbp)
movl $0x3, %esi
movl $0x1, %edx
movl %edx, -0xa8(%rbp)
callq 0x2070
movl -0xa8(%rbp), %edx
movb -0xa1(%rbp), %al
movq -0x78(%rbp), %rdi
leaq 0x8119(%rip), %rcx      # 0x19c00
movl $0x4, %esi
callq 0x2070
movq -0x78(%rbp), %rdi
callq 0x21f0
movl %eax, -0x98(%rbp)
movl -0x98(%rbp), %eax
movl %eax, -0xa0(%rbp)
subl $0x31, %eax
je 0x11b27
jmp 0x11b13
movl -0xa0(%rbp), %eax
subl $0x32, %eax
je 0x11f5a
jmp 0x12295
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
movslq 0x4(%rcx,%rdx,8), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x10(%rax)
movl $0x0, -0x38(%rbp)
cmpl $0x7, -0x38(%rbp)
jge 0x11b8f
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x94(%rbp), %eax
jne 0x11b82
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x10(%rax)
jmp 0x11b84
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x11b4d
movl -0x94(%rbp), %eax
movq %rax, -0xb0(%rbp)
subq $0x6, %rax
ja 0x11f2f
movq -0xb0(%rbp), %rax
leaq 0x7b6c(%rip), %rcx      # 0x19720
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x1, -0x90(%rbp)
jne 0x11bfd
movq 0x18(%rbp), %rax
movsd 0x7b8e(%rip), %xmm0     # 0x19760
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq -0x30(%rbp), %rax
movl $0xc5, (%rax)
movq -0x28(%rbp), %rdi
movl $0x64, %esi
leaq 0x8014(%rip), %rdx      # 0x19c08
movb $0x0, %al
callq 0x2050
jmp 0x11c36
movq 0x18(%rbp), %rax
movsd (%rax), %xmm0
movsd 0x7b53(%rip), %xmm1     # 0x19760
subsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movq -0x30(%rbp), %rax
movl $0x2f, (%rax)
movq -0x28(%rbp), %rdi
movl $0x64, %esi
leaq 0x8008(%rip), %rdx      # 0x19c37
movb $0x0, %al
callq 0x2050
jmp 0x11f2f
cmpl $0x1, -0x90(%rbp)
jne 0x11c74
movq 0x10(%rbp), %rax
movl 0x20(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x20(%rax)
movq -0x30(%rbp), %rax
movl $0xc5, (%rax)
movq -0x28(%rbp), %rdi
movl $0x64, %esi
leaq 0x7ff1(%rip), %rdx      # 0x19c5c
movb $0x0, %al
callq 0x2050
jmp 0x11ca2
movq 0x10(%rbp), %rax
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
movq -0x30(%rbp), %rax
movl $0x2f, (%rax)
movq -0x28(%rbp), %rdi
movl $0x64, %esi
leaq 0x7fef(%rip), %rdx      # 0x19c8a
movb $0x0, %al
callq 0x2050
jmp 0x11f2f
movq -0x78(%rbp), %rdi
callq 0x2030
movq -0x78(%rbp), %rdi
movl $0x20000, %esi          # imm = 0x20000
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x78(%rbp), %rdi
movl $0x1, %esi
movl $0x35, %edx
leaq 0x73ec(%rip), %rcx      # 0x190c3
movb $0x0, %al
callq 0x2070
movq -0x78(%rbp), %rdi
movl $0x20000, %esi          # imm = 0x20000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
movq -0x78(%rbp), %rdi
movl $0x2, %esi
movl $0x3, %edx
leaq 0x7fa9(%rip), %rcx      # 0x19cae
movb $0x0, %al
callq 0x2070
movq -0x78(%rbp), %rdi
callq 0x2100
movq -0x78(%rbp), %rdi
callq 0x21f0
movl %eax, -0x9c(%rbp)
cmpl $0x31, -0x9c(%rbp)
jl 0x11d9c
cmpl $0x39, -0x9c(%rbp)
jg 0x11d9c
movl -0x9c(%rbp), %eax
subl $0x31, %eax
movl %eax, -0x9c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x9c(%rbp), %rcx
cmpl $0x2, (%rax,%rcx,8)
jne 0x11d9a
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq -0x9c(%rbp), %rdx
movslq 0x4(%rcx,%rdx,8), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x10(%rax)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq -0x9c(%rbp), %rdx
movslq 0x4(%rcx,%rdx,8), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x4(%rax)
jmp 0x11d9c
movq -0x30(%rbp), %rax
movl $0x2f, (%rax)
movq -0x28(%rbp), %rdi
movl $0x64, %esi
leaq 0x7f31(%rip), %rdx      # 0x19ce7
movb $0x0, %al
callq 0x2050
jmp 0x11f2f
cmpl $0x1, -0x90(%rbp)
jne 0x11dfb
movq 0x10(%rbp), %rax
movl 0x24(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x24(%rax)
movq -0x30(%rbp), %rax
movl $0xc5, (%rax)
movq -0x28(%rbp), %rdi
movl $0x64, %esi
leaq 0x7f0c(%rip), %rdx      # 0x19cfe
movb $0x0, %al
callq 0x2050
jmp 0x11e29
movq 0x10(%rbp), %rax
movl 0x24(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x24(%rax)
movq -0x30(%rbp), %rax
movl $0x2f, (%rax)
movq -0x28(%rbp), %rdi
movl $0x64, %esi
leaq 0x7f0c(%rip), %rdx      # 0x19d2e
movb $0x0, %al
callq 0x2050
jmp 0x11f2f
movq 0x10(%rbp), %rax
cmpl $0x0, 0x30(%rax)
je 0x11e45
movq 0x10(%rbp), %rax
movl $0x3, 0x34(%rax)
jmp 0x11e50
movq 0x10(%rbp), %rax
movl $0x3, 0x30(%rax)
movq 0x10(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x2c(%rax)
movq -0x30(%rbp), %rax
movl $0x2f, (%rax)
movq -0x28(%rbp), %rdi
movl $0x78, %esi
leaq 0x7edd(%rip), %rdx      # 0x19d54
movb $0x0, %al
callq 0x2050
jmp 0x11f2f
cmpl $0x1, -0x90(%rbp)
jne 0x11ebc
movq 0x10(%rbp), %rax
movl 0x10(%rax), %ecx
subl $0x14, %ecx
movl %ecx, 0x10(%rax)
movq -0x30(%rbp), %rax
movl $0xc5, (%rax)
movq -0x28(%rbp), %rdi
movl $0x64, %esi
leaq 0x7efc(%rip), %rdx      # 0x19daf
movb $0x0, %al
callq 0x2050
jmp 0x11eea
movq 0x10(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x14, %ecx
movl %ecx, 0x10(%rax)
movq -0x30(%rbp), %rax
movl $0x2f, (%rax)
movq -0x28(%rbp), %rdi
movl $0x64, %esi
leaq 0x7ef5(%rip), %rdx      # 0x19dd8
movb $0x0, %al
callq 0x2050
jmp 0x11f2f
movq 0x10(%rbp), %rax
cmpl $0x0, 0x30(%rax)
je 0x11f03
movq 0x10(%rbp), %rax
movl $0x2, 0x34(%rax)
jmp 0x11f0e
movq 0x10(%rbp), %rax
movl $0x2, 0x30(%rax)
movq -0x30(%rbp), %rax
movl $0xc5, (%rax)
movq -0x28(%rbp), %rdi
movl $0x64, %esi
leaq 0x7ecf(%rip), %rdx      # 0x19df7
movb $0x0, %al
callq 0x2050
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0xffffffff, (%rax,%rcx,8) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0x0, 0x4(%rax,%rcx,8)
movl $0x1, -0x34(%rbp)
jmp 0x12295
movq -0x8(%rbp), %rax
movq 0x10(%rbp), %rcx
movl 0x14(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movq 0x10(%rbp), %rcx
movslq 0x18(%rcx), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0x12028
movq 0x10(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq -0x1c(%rbp), %rsi
movslq 0x4(%rdx,%rsi,8), %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq 0x10(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq -0x1c(%rbp), %rsi
movslq 0x4(%rdx,%rsi,8), %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rbp), %rcx
movl 0x14(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movq 0x10(%rbp), %rcx
movslq 0x18(%rcx), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x5, (%rax)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0xffffffff, (%rax,%rcx,8) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0x0, 0x4(%rax,%rcx,8)
jmp 0x12293
movq -0x8(%rbp), %rax
movq 0x10(%rbp), %rcx
movl 0x14(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movq 0x10(%rbp), %rcx
movslq 0x18(%rcx), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0x120f6
movq 0x10(%rbp), %rax
movl 0x14(%rax), %ecx
subl $0x1, %ecx
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq -0x1c(%rbp), %rsi
movslq 0x4(%rdx,%rsi,8), %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq 0x10(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq -0x1c(%rbp), %rsi
movslq 0x4(%rdx,%rsi,8), %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rbp), %rcx
movl 0x14(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movq 0x10(%rbp), %rcx
movslq 0x18(%rcx), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x5, (%rax)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0xffffffff, (%rax,%rcx,8) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0x0, 0x4(%rax,%rcx,8)
jmp 0x12291
movq -0x8(%rbp), %rax
movq 0x10(%rbp), %rcx
movslq 0x14(%rcx), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movq 0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0x121c4
movq 0x10(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq -0x1c(%rbp), %rsi
movslq 0x4(%rdx,%rsi,8), %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq 0x10(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq -0x1c(%rbp), %rsi
movslq 0x4(%rdx,%rsi,8), %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rbp), %rcx
movslq 0x14(%rcx), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movq 0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x5, (%rax)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0xffffffff, (%rax,%rcx,8) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0x0, 0x4(%rax,%rcx,8)
jmp 0x1228f
movq -0x8(%rbp), %rax
movq 0x10(%rbp), %rcx
movslq 0x14(%rcx), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movq 0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0x1228d
movq 0x10(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq -0x1c(%rbp), %rsi
movslq 0x4(%rdx,%rsi,8), %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq 0x10(%rbp), %rax
movl 0x18(%rax), %ecx
subl $0x1, %ecx
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdx
movslq -0x1c(%rbp), %rsi
movslq 0x4(%rdx,%rsi,8), %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rbp), %rcx
movslq 0x14(%rcx), %rcx
imulq $0xe38, %rcx, %rcx      # imm = 0xE38
addq %rcx, %rax
movq 0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl $0x5, (%rax)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0xffffffff, (%rax,%rcx,8) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0x0, 0x4(%rax,%rcx,8)
jmp 0x1228f
jmp 0x12291
jmp 0x12293
jmp 0x12295
movq -0x78(%rbp), %rdi
callq 0x2100
movq -0x78(%rbp), %rdi
movl $0x20, %r8d
xorl %r9d, %r9d
movl %r8d, %esi
movl %r8d, %edx
movl %r8d, %ecx
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0x2120
movq -0x78(%rbp), %rdi
movl $0x20, %r9d
movl %r9d, %esi
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
movl $0x20, (%rsp)
movl $0x20, 0x8(%rsp)
movl $0x20, 0x10(%rsp)
callq 0x2120
movq -0x78(%rbp), %rdi
callq 0x2030
movq -0x78(%rbp), %rdi
callq 0x2100
movq -0x78(%rbp), %rdi
callq 0x2110
movl -0x34(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)