// File: /workspace/github_c_makefile_star2_O0/S01den[P]Lost_CavernRL/interface.c
// Function: printInventory
void printInventory(WINDOW *win, int component, int exoticBlood, int gem, Player player, Inventory inventory[], Drug drugList[], Weapons listWeapons[], Armor listArmors[])
{
	char *typeOfDrugs[] = {"VACCIN","STEROID","ANTIDOTE","STIMULANT","HALLUCINOGEN","MEDIPAC","NEUROPARALYSANT"};
	int i = 0;

	wborder(win, '|', '|', '-', '-', '+', '+', '+', '+');
	wattron(win,A_UNDERLINE);
	mvwprintw(win,1,1,"Inventory");
	wattroff(win,A_UNDERLINE);
	mvwprintw(win,2,1,"Electronic components: %d",component);
	mvwprintw(win,3,1,"Exotic blood: %d",exoticBlood);
	mvwprintw(win,4,1,"Gems: %d",gem);

	for(i = 0; i < player.inventorySize; i++)
	{
		if(inventory[i].type == -1)
		{
			mvwprintw(win,6+i,1,"                    ");
		}
		else if(inventory[i].type == 0)
		{
			Weapons weaponHold = listWeapons[inventory[i].object];
			switch(weaponHold.rarity)
			{
				case 1:
					wattron(win,COLOR_PAIR(22));
					if(weaponHold.type == 0)
						mvwprintw(win,6+i,1,"%c) /",49+i);
					else
						mvwprintw(win,6+i,1,"%c) ;",49+i);
					mvwprintw(win, 6+i,2,": %s",weaponHold.name);
					wattroff(win, COLOR_PAIR(22));
					break;
				case 2:
					wattron(win,COLOR_PAIR(166));
					if(weaponHold.type == 0)
						mvwprintw(win,6+i,1,"%c) /",49+i);
					else
						mvwprintw(win,6+i,1,"%c) ;",49+i);
					mvwprintw(win, 6+i,2,": %s",weaponHold.name);
					wattroff(win, COLOR_PAIR(166));
					break;
				case 3:
					wattron(win,COLOR_PAIR(12));
					if(weaponHold.type == 0)
						mvwprintw(win,6+i,1,"%c) /",49+i);
					else
						mvwprintw(win,6+i,1,"%c) ;",49+i);
					mvwprintw(win, 6+i,2,": %s",weaponHold.name);
					wattroff(win, COLOR_PAIR(12));
					break;
			}
		}
		else if(inventory[i].type == 1)
		{
			Armor armorHold = listArmors[inventory[i].object];
			switch(armorHold.rarity)
			{
				case 1:
					wattron(win,COLOR_PAIR(22));
					mvwprintw(win,6+i,1,"%c) ] : %s", 49+i, armorHold.name);
					wattroff(win, COLOR_PAIR(22));
					break;
				case 2:
					wattron(win,COLOR_PAIR(166));
					mvwprintw(win,6+i,1,"%c) ] : %s", 49+i, armorHold.name);
					wattroff(win, COLOR_PAIR(166));
					break;
				case 3:
					wattron(win,COLOR_PAIR(12));
					mvwprintw(win,6+i,1,"%c) ] : %s", 49+i, armorHold.name);
					wattroff(win, COLOR_PAIR(12));
					break;
			}
		}
		else if(inventory[i].type == 2)
		{
			int colorDrug = drugList[inventory[i].object].color;
			int discovered = drugList[inventory[i].object].discovered;
			int typeDrugUsed = drugList[inventory[i].object].type;

			wattron(win,COLOR_PAIR(colorDrug));
			if(discovered == 0)
			{
				mvwprintw(win, 6+i,1,"%c) ! : UNKNOWN DRUG", 49+i);
			}
			else
			{
				mvwprintw(win,6+i,1,"%c) ! : %s", 49+i, typeOfDrugs[typeDrugUsed]);
			}
			wattroff(win,COLOR_PAIR(colorDrug));
		}
		else if(inventory[i].type == 3)
		{
			switch(inventory[i].object)
			{
				case 1:
					wattron(win,COLOR_PAIR(47));
					mvwprintw(win,6+i,1,"%c) * : NUCLEAR CHARGE",49+i);
					wattroff(win,COLOR_PAIR(47));
					break;
				case 2:
					wattron(win,COLOR_PAIR(124));
					mvwprintw(win,6+i,1,"%c) ~ : SHIELD",49+i);
					wattroff(win,COLOR_PAIR(124));
					break;
				case 3:
					wattron(win,COLOR_PAIR(22));
					mvwprintw(win,6+i,1,"%c) = : ELECTRIC TRAP",49+i);
					wattroff(win,COLOR_PAIR(22));
					break;
				case 4:
					wattron(win,COLOR_PAIR(23));
					mvwprintw(win,6+i,1,"%c) = : PARALYSING TRAP",49+i);
					wattroff(win,COLOR_PAIR(23));
					break;
				case 5:
					wattron(win,COLOR_PAIR(COLOR_LAVA));
					mvwprintw(win,6+i,1,"%c) * : LAVA BUCKET",49+i);
					wattroff(win,COLOR_PAIR(COLOR_LAVA));
					break;
				case 6:
					wattron(win,COLOR_PAIR(12));
					mvwprintw(win,6+i,1,"THE CLONE CAPSULE");
					wattroff(win,COLOR_PAIR(12));	
					break;
				default:
					break;
			}
		}
		else
		{
			break;
		}
	}

	wrefresh(win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq 0x58(%rbp), %rax
movq 0x50(%rbp), %rax
leaq 0x10(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
leaq -0x60(%rbp), %rdi
leaq 0x10402(%rip), %rsi     # 0x1cc20
movl $0x38, %edx
callq 0x2200
movl $0x0, -0x64(%rbp)
movq -0x8(%rbp), %rdi
movl $0x7c, %edx
movl $0x2d, %r8d
movl $0x2b, %r9d
movl %edx, %esi
movl %r8d, %ecx
movl $0x2b, (%rsp)
movl $0x2b, 0x8(%rsp)
movl $0x2b, 0x10(%rsp)
callq 0x2120
movq -0x8(%rbp), %rdi
movl $0x20000, %esi          # imm = 0x20000
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl $0x1, %edx
leaq 0xc874(%rip), %rcx      # 0x190fb
movl %edx, %esi
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x20000, %esi          # imm = 0x20000
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %r8d
movl $0x2, %esi
movl $0x1, %edx
leaq 0xc84a(%rip), %rcx      # 0x19105
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %r8d
movl $0x3, %esi
movl $0x1, %edx
leaq 0xc844(%rip), %rcx      # 0x1911f
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %r8d
movl $0x4, %esi
movl $0x1, %edx
leaq 0xc835(%rip), %rcx      # 0x19130
movb $0x0, %al
callq 0x2070
movl $0x0, -0x64(%rbp)
movq -0xf8(%rbp), %rcx
movl -0x64(%rbp), %eax
cmpl 0x3c(%rcx), %eax
jge 0xd077
movq -0x20(%rbp), %rax
movslq -0x64(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,8)
jne 0xc94c
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl $0x1, %edx
leaq 0xb793(%rip), %rcx      # 0x180d3
movb $0x0, %al
callq 0x2070
jmp 0xd067
movq -0x20(%rbp), %rax
movslq -0x64(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,8)
jne 0xcbba
movq 0x50(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x64(%rbp), %rdx
movslq 0x4(%rcx,%rdx,8), %rcx
shlq $0x6, %rcx
movups (%rax,%rcx), %xmm0
movups 0x10(%rax,%rcx), %xmm1
movups 0x20(%rax,%rcx), %xmm2
movups 0x30(%rax,%rcx), %xmm3
movaps %xmm3, -0x80(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0xfc(%rbp)
subl $0x1, %eax
je 0xc9d4
jmp 0xc9af
movl -0xfc(%rbp), %eax
subl $0x2, %eax
je 0xca76
jmp 0xc9c0
movl -0xfc(%rbp), %eax
subl $0x3, %eax
je 0xcb18
jmp 0xcbb5
movq -0x8(%rbp), %rdi
movl $0x1600, %esi           # imm = 0x1600
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
cmpl $0x0, -0x8c(%rbp)
jne 0xca16
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movl $0x1, %edx
leaq 0xc72c(%rip), %rcx      # 0x19139
movb $0x0, %al
callq 0x2070
jmp 0xca3b
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movl $0x1, %edx
leaq 0xc70b(%rip), %rcx      # 0x1913f
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movq -0xb0(%rbp), %r8
movl $0x2, %edx
leaq 0xc713(%rip), %rcx      # 0x1916b
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x1600, %esi           # imm = 0x1600
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0xcbb5
movq -0x8(%rbp), %rdi
movl $0xa600, %esi           # imm = 0xA600
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
cmpl $0x0, -0x8c(%rbp)
jne 0xcab8
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movl $0x1, %edx
leaq 0xc68a(%rip), %rcx      # 0x19139
movb $0x0, %al
callq 0x2070
jmp 0xcadd
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movl $0x1, %edx
leaq 0xc669(%rip), %rcx      # 0x1913f
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movq -0xb0(%rbp), %r8
movl $0x2, %edx
leaq 0xc671(%rip), %rcx      # 0x1916b
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0xa600, %esi           # imm = 0xA600
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0xcbb5
movq -0x8(%rbp), %rdi
movl $0xc00, %esi            # imm = 0xC00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
cmpl $0x0, -0x8c(%rbp)
jne 0xcb5a
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movl $0x1, %edx
leaq 0xc5e8(%rip), %rcx      # 0x19139
movb $0x0, %al
callq 0x2070
jmp 0xcb7f
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movl $0x1, %edx
leaq 0xc5c7(%rip), %rcx      # 0x1913f
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movq -0xb0(%rbp), %r8
movl $0x2, %edx
leaq 0xc5cf(%rip), %rcx      # 0x1916b
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0xc00, %esi            # imm = 0xC00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0xd065
movq -0x20(%rbp), %rax
movslq -0x64(%rbp), %rcx
cmpl $0x1, (%rax,%rcx,8)
jne 0xcd38
movq 0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x64(%rbp), %rdx
movslq 0x4(%rcx,%rdx,8), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movups (%rax,%rcx), %xmm0
movups 0x10(%rax,%rcx), %xmm1
movups 0x20(%rax,%rcx), %xmm2
movaps %xmm2, -0xc0(%rbp)
movaps %xmm1, -0xd0(%rbp)
movaps %xmm0, -0xe0(%rbp)
movl -0xbc(%rbp), %eax
movl %eax, -0x100(%rbp)
subl $0x1, %eax
je 0xcc3c
jmp 0xcc1b
movl -0x100(%rbp), %eax
subl $0x2, %eax
je 0xcc91
jmp 0xcc28
movl -0x100(%rbp), %eax
subl $0x3, %eax
je 0xcce3
jmp 0xcd33
movq -0x8(%rbp), %rdi
movl $0x1600, %esi           # imm = 0x1600
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movq -0xe0(%rbp), %r9
movl $0x1, %edx
leaq 0xc4d2(%rip), %rcx      # 0x19145
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x1600, %esi           # imm = 0x1600
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0xcd33
movq -0x8(%rbp), %rdi
movl $0xa600, %esi           # imm = 0xA600
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movq -0xe0(%rbp), %r9
movl $0x1, %edx
leaq 0xc47d(%rip), %rcx      # 0x19145
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0xa600, %esi           # imm = 0xA600
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0xcd33
movq -0x8(%rbp), %rdi
movl $0xc00, %esi            # imm = 0xC00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movq -0xe0(%rbp), %r9
movl $0x1, %edx
leaq 0xc42b(%rip), %rcx      # 0x19145
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0xc00, %esi            # imm = 0xC00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0xd063
movq -0x20(%rbp), %rax
movslq -0x64(%rbp), %rcx
cmpl $0x2, (%rax,%rcx,8)
jne 0xce4a
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x64(%rbp), %rdx
movslq 0x4(%rcx,%rdx,8), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xe4(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x64(%rbp), %rdx
movslq 0x4(%rcx,%rdx,8), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, -0xe8(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x64(%rbp), %rdx
movslq 0x4(%rcx,%rdx,8), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0xec(%rbp)
movq -0x8(%rbp), %rdi
movl -0xe4(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
cmpl $0x0, -0xe8(%rbp)
jne 0xcdf8
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movl $0x1, %edx
leaq 0xc361(%rip), %rcx      # 0x19150
movb $0x0, %al
callq 0x2070
jmp 0xce29
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movslq -0xec(%rbp), %rax
movq -0x60(%rbp,%rax,8), %r9
movl $0x1, %edx
leaq 0xc343(%rip), %rcx      # 0x19165
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl -0xe4(%rbp), %esi
shll $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0xd061
movq -0x20(%rbp), %rax
movslq -0x64(%rbp), %rcx
cmpl $0x3, (%rax,%rcx,8)
jne 0xd05d
movq -0x20(%rbp), %rax
movslq -0x64(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x108(%rbp)
subl $0x5, %eax
ja 0xd059
movq -0x108(%rbp), %rax
leaq 0xc102(%rip), %rcx      # 0x18f8c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movl $0x2f00, %esi           # imm = 0x2F00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movl $0x1, %edx
leaq 0xc2ad(%rip), %rcx      # 0x19170
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x2f00, %esi           # imm = 0x2F00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0xd05b
movq -0x8(%rbp), %rdi
movl $0x7c00, %esi           # imm = 0x7C00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movl $0x1, %edx
leaq 0xc276(%rip), %rcx      # 0x19187
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x7c00, %esi           # imm = 0x7C00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0xd05b
movq -0x8(%rbp), %rdi
movl $0x1600, %esi           # imm = 0x1600
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movl $0x1, %edx
leaq 0xc237(%rip), %rcx      # 0x19196
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x1600, %esi           # imm = 0x1600
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0xd05b
movq -0x8(%rbp), %rdi
movl $0x1700, %esi           # imm = 0x1700
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movl $0x1, %edx
leaq 0xc1ff(%rip), %rcx      # 0x191ac
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0x1700, %esi           # imm = 0x1700
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0xd05b
movq -0x8(%rbp), %rdi
movl $0xf500, %esi           # imm = 0xF500
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl -0x64(%rbp), %r8d
addl $0x31, %r8d
movl $0x1, %edx
leaq 0xc1c9(%rip), %rcx      # 0x191c4
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0xf500, %esi           # imm = 0xF500
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0xd05b
movq -0x8(%rbp), %rdi
movl $0xc00, %esi            # imm = 0xC00
xorl %eax, %eax
movl %eax, %edx
callq 0x21d0
movq -0x8(%rbp), %rdi
movl -0x64(%rbp), %esi
addl $0x6, %esi
movl $0x1, %edx
leaq 0xc19a(%rip), %rcx      # 0x191d8
movb $0x0, %al
callq 0x2070
movq -0x8(%rbp), %rdi
movl $0xc00, %esi            # imm = 0xC00
xorl %eax, %eax
movl %eax, %edx
callq 0x2060
jmp 0xd05b
jmp 0xd05b
jmp 0xd05f
jmp 0xd077
jmp 0xd061
jmp 0xd063
jmp 0xd065
jmp 0xd067
jmp 0xd069
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xc909
movq -0x8(%rbp), %rdi
callq 0x2100
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopl (%rax)