// File: /workspace/github_cpp_makefile_star2_O3/essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: init_items()
void init_items()
{
	for(int i=0;i<WAVELENGTHS;i++)
	{rm_devices[i] = NULL;}
	ammo[PISTOL] = 60-difficulty;
	ammo[RIFLE] = 160 - 4*difficulty;
	ammo[CANNON] = 30-difficulty;
	dev_inv = std::vector<std::vector<std::vector<item*>>>(DEVICE_TYPES,(std::vector<std::vector<item*>>(DEVICE_CONFIGURATIONS)));
	item* dev;
	for(int i=0;i<5;i++)
	{
		dev = add_device(LOW_EXPLOSIVE,-1,-1,true);
		device_to_inventory(dev);
	}
	for(int i=0;i<3;i++)
	{
		dev = add_device(HIGH_EXPLOSIVE,-1,-1,true);
		device_to_inventory(dev);
	}
	for(int i=rand()%3+1;i<5;i++)
	{
		dev = add_device(HOLOGRAM_PROJECTOR,-1,-1,true);
		device_to_inventory(dev);
	}
	for(int i=rand()%3+1;i<5;i++)
	{
		dev = add_device(NOISE_GENERATOR,-1,-1,true);
		device_to_inventory(dev);
	}
	for(int i=rand()%3+1;i<5;i++)
	{
		dev = add_device(SCENT_GENERATOR,-1,-1,true);
		device_to_inventory(dev);
	}
	for(int i=rand()%3+1;i<5;i++)
	{
		dev = add_device(BRAIN_SLICE,-1,-1,true);
		device_to_inventory(dev);
	}
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x8c8f1(%rip)    # 0x9a470
movaps %xmm0, 0x8c8da(%rip)    # 0x9a460
xorl %ebx, %ebx
movq %rbx, 0x8c8f1(%rip)     # 0x9a480
movl 0x13777(%rip), %eax     # 0x2130c
movl $0x3c, %ecx
subl %eax, %ecx
movl %ecx, 0x60646(%rip)     # 0x6e1e8
leal (,%rax,4), %ecx
movl $0xa0, %edx
subl %ecx, %edx
movl %edx, 0x60636(%rip)     # 0x6e1ec
movl $0x1e, %ecx
subl %eax, %ecx
movl %ecx, 0x6062d(%rip)     # 0x6e1f0
movl $0x48, %edi
callq 0x5250
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x48(%rax), %rcx
movq %rcx, 0x10(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movq %rbx, 0x40(%rax)
movq %rcx, 0x8(%rdx)
leaq 0x20(%rsp), %rdi
leaq 0x7(%rsp), %rcx
movl $0x6, %esi
callq 0x15a3a
movq 0xb883e(%rip), %rax     # 0xc6450
leaq 0x20(%rsp), %rbx
movaps (%rbx), %xmm0
movq 0x10(%rbx), %rcx
movq %rcx, 0xb882b(%rip)     # 0xc6450
movaps 0xb8814(%rip), %xmm1    # 0xc6440
movaps %xmm0, 0xb880d(%rip)    # 0xc6440
leaq 0x40(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
callq 0x159ce
movq %rbx, %rdi
callq 0x159ce
leaq 0x8(%rsp), %rdi
callq 0x15aca
movl $0x5, %ebx
xorl %edi, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0xd74d
movq %rax, %rdi
callq 0xb712
decl %ebx
jne 0xdc69
movl $0x3, %ebx
movl $0x1, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0xd74d
movq %rax, %rdi
callq 0xb712
decl %ebx
jne 0xdc90
callq 0x5070
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
negl %ecx
leal (%rax,%rcx), %ebx
addl $-0x4, %ebx
movl $0x2, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0xd74d
movq %rax, %rdi
callq 0xb712
incl %ebx
jne 0xdcdb
callq 0x5070
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
negl %ecx
leal (%rax,%rcx), %ebx
addl $-0x4, %ebx
movl $0x3, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0xd74d
movq %rax, %rdi
callq 0xb712
incl %ebx
jne 0xdd26
callq 0x5070
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
negl %ecx
leal (%rax,%rcx), %ebx
addl $-0x4, %ebx
movl $0x4, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0xd74d
movq %rax, %rdi
callq 0xb712
incl %ebx
jne 0xdd71
callq 0x5070
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
negl %ecx
leal (%rax,%rcx), %ebx
addl $-0x4, %ebx
movl $0x5, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0xd74d
movq %rax, %rdi
callq 0xb712
incl %ebx
jne 0xddbc
addq $0x60, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x15aca
movq %rbx, %rdi
callq 0x53d0