// File: /workspace/github_cpp_makefile_star2_O1/arisKoutsou[P]oopproj/./src/game_utils.cpp
// Function: fillMarketItems(Market*, int)
void fillMarketItems(Market* market, int size) {
  for (int i = 0; i != size; ++i) {
    int kind = rng.fromMintoMax(0, 2);
    switch (kind) {
    case 0: {
      string name = weapons[rng.fromMintoMax(0, weapons.size() - 1)];
      Weapon* newWeapon = new Weapon(name);
      market->addItem(newWeapon);
      break;
    }
    case 1: {
      string name = armors[rng.fromMintoMax(0, armors.size() - 1)];
      Armor* newArmor = new Armor(name);
      market->addItem(newArmor);
      break;
    }
    case 2: {
      string name = potions[rng.fromMintoMax(0, potions.size() - 1)];
      Potion* newPotion = new Potion(name);
      market->addItem(newPotion);
      break;
    }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
testl %esi, %esi
je 0x8326
movl %esi, %ebx
movq %rdi, %r14
leaq 0x18(%rsp), %r13
leaq 0x8(%rsp), %r15
xorl %edi, %edi
movl $0x2, %esi
callq 0x4dee
cmpl $0x2, %eax
je 0x823a
cmpl $0x1, %eax
je 0x8179
testl %eax, %eax
jne 0x831e
movq 0x1d20e(%rip), %rsi     # 0x252c8
subq 0x1d1ff(%rip), %rsi     # 0x252c0
shrq $0x5, %rsi
decl %esi
xorl %edi, %edi
callq 0x4dee
cltq
movq 0x1d1e9(%rip), %rcx     # 0x252c0
shlq $0x5, %rax
movq %r13, 0x8(%rsp)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x4cf0
movl $0x48, %edi
callq 0x4290
movq %rax, %r12
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rbp
movq %rbp, %rdi
callq 0x4cf0
movl $0x0, (%rsp)
movq %r12, %rdi
movq %rbp, %rsi
movl $0x19, %edx
movl $0xf, %ecx
movl $0x3, %r8d
movl $0x50, %r9d
callq 0x19890
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x8169
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11d76
jmp 0x8307
movq 0x1d160(%rip), %rsi     # 0x252e0
subq 0x1d151(%rip), %rsi     # 0x252d8
shrq $0x5, %rsi
decl %esi
xorl %edi, %edi
callq 0x4dee
cltq
movq 0x1d13b(%rip), %rcx     # 0x252d8
shlq $0x5, %rax
movq %r13, 0x8(%rsp)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x4cf0
movl $0x48, %edi
callq 0x4290
movq %rax, %r12
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
callq 0x4cf0
movq %r12, %rdi
movq %rbp, %rsi
movl $0x19, %edx
movl $0xf, %ecx
movl $0x3, %r8d
movsd 0x13207(%rip), %xmm0    # 0x1b410
callq 0x19d38
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x822a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11d76
jmp 0x8307
movq 0x1d0b7(%rip), %rsi     # 0x252f8
subq 0x1d0a8(%rip), %rsi     # 0x252f0
shrq $0x5, %rsi
decl %esi
xorl %edi, %edi
callq 0x4dee
cltq
movq 0x1d092(%rip), %rcx     # 0x252f0
shlq $0x5, %rax
movq %r13, 0x8(%rsp)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x4cf0
movl $0x60, %edi
callq 0x4290
movq %rax, %r12
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rbp
movq %rbp, %rdi
callq 0x4cf0
xorps %xmm1, %xmm1
movq %r12, %rdi
movq %rbp, %rsi
movl $0x19, %edx
movl $0xf, %ecx
movl $0x3, %r8d
movsd 0x13143(%rip), %xmm0    # 0x1b410
movsd 0x13143(%rip), %xmm2    # 0x1b418
movl $0x2, %r9d
callq 0x1a0fc
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x82fc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11d76
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x831e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
decl %ebx
jne 0x808d
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x8398
movq 0x58(%rsp), %rsi
jmp 0x836a
jmp 0x8395
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x8398
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x8398
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x83a2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x83a2
movq %rax, %rbx
movl $0x48, %esi
jmp 0x83a7
movq %rax, %rbx
movl $0x60, %esi
movq %r12, %rdi
callq 0x42a0
jmp 0x83b8
jmp 0x83b5
jmp 0x83b5
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x83cf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %rbx, %rdi
callq 0x4430