// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x68, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x8c3b9(%rip)    # 0x9a480
movaps %xmm0, 0x8c3a2(%rip)    # 0x9a470
xorl %r14d, %r14d
movq %r14, 0x8c3b8(%rip)     # 0x9a490
movl 0x1323e(%rip), %eax     # 0x2131c
movl $0x3c, %ecx
subl %eax, %ecx
movl %ecx, 0x6010d(%rip)     # 0x6e1f8
leal (,%rax,4), %ecx
movl $0xa0, %edx
subl %ecx, %edx
movl %edx, 0x600fd(%rip)     # 0x6e1fc
movl $0x1e, %ecx
subl %eax, %ecx
movl %ecx, 0x600f4(%rip)     # 0x6e200
leaq 0x10(%rsp), %rbx
movq %r14, 0x10(%rbx)
movaps %xmm0, (%rbx)
movl $0x48, %edi
callq 0x5250
movq %rax, (%rbx)
movq %rax, 0x8(%rbx)
leaq 0x48(%rax), %rcx
movq %rcx, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movq %r14, 0x40(%rax)
movq %rcx, 0x8(%rbx)
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movl $0x6, %esi
movq %rbx, %rdx
callq 0x1619a
leaq 0x50(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movaps 0xb82dc(%rip), %xmm0    # 0xc6450
movq 0xb82e5(%rip), %rax     # 0xc6460
leaq 0x30(%rsp), %rbx
movaps (%rbx), %xmm1
movaps %xmm1, 0xb82c6(%rip)    # 0xc6450
movq 0x10(%rbx), %rcx
movq %rcx, 0xb82cb(%rip)     # 0xc6460
movq %rax, 0x10(%rdi)
movaps (%rdi), %xmm1
movaps %xmm0, (%rdi)
movaps %xmm1, (%rbx)
movq $0x0, 0x10(%rbx)
callq 0x1611e
movq %rbx, %rdi
callq 0x1611e
leaq 0x10(%rsp), %rdi
callq 0x1622a
movl $0x5, %ebx
xorl %edi, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0xdc6b
movq %rax, %rdi
callq 0xbacc
decl %ebx
jne 0xe1c6
movl $0x3, %ebx
movl $0x1, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0xdc6b
movq %rax, %rdi
callq 0xbacc
decl %ebx
jne 0xe1ed
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 0xdc6b
movq %rax, %rdi
callq 0xbacc
incl %ebx
jne 0xe238
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 0xdc6b
movq %rax, %rdi
callq 0xbacc
incl %ebx
jne 0xe283
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 0xdc6b
movq %rax, %rdi
callq 0xbacc
incl %ebx
jne 0xe2ce
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 0xdc6b
movq %rax, %rdi
callq 0xbacc
incl %ebx
jne 0xe319
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1622a
movq %rbx, %rdi
callq 0x53d0