// File: /workspace/github_cpp_makefile_star2_O2/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
movl %esi, %ebx
movq %rdi, %r14
pushq $0x2
popq %rbp
leaq 0x8(%rsp), %r15
subl $0x1, %ebx
jb 0x720c
xorl %edi, %edi
movl %ebp, %esi
callq 0x4b2c
cmpl $0x2, %eax
je 0x7175
cmpl $0x1, %eax
je 0x70f4
testl %eax, %eax
jne 0x704b
movq 0x1a23e(%rip), %rsi     # 0x212b8
subq 0x1a22f(%rip), %rsi     # 0x212b0
shrq $0x5, %rsi
decl %esi
xorl %edi, %edi
callq 0x4b2c
movslq %eax, %rsi
shlq $0x5, %rsi
addq 0x1a214(%rip), %rsi     # 0x212b0
movq %r15, %rdi
callq 0x4330
pushq $0x48
popq %rdi
callq 0x4260
movq %rax, %r13
leaq 0x68(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x4330
andl $0x0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
pushq $0x19
popq %rdx
pushq $0xf
popq %rcx
pushq $0x3
popq %r8
pushq $0x50
popq %r9
callq 0x139bc
movq %r12, %rdi
callq 0x4470
movq %r14, %rdi
movq %r13, %rsi
callq 0xde1c
jmp 0x71ff
movq 0x1a1d5(%rip), %rsi     # 0x212d0
subq 0x1a1c6(%rip), %rsi     # 0x212c8
shrq $0x5, %rsi
decl %esi
xorl %edi, %edi
callq 0x4b2c
movslq %eax, %rsi
shlq $0x5, %rsi
addq 0x1a1ab(%rip), %rsi     # 0x212c8
movq %r15, %rdi
callq 0x4330
pushq $0x48
popq %rdi
callq 0x4260
movq %rax, %r13
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x4330
movq %r13, %rdi
movq %r12, %rsi
pushq $0x19
popq %rdx
pushq $0xf
popq %rcx
pushq $0x3
popq %r8
movsd 0xe2a8(%rip), %xmm0     # 0x15400
callq 0x13d74
movq %r12, %rdi
callq 0x4470
movq %r14, %rdi
movq %r13, %rsi
callq 0xde1c
jmp 0x71ff
movq 0x1a16c(%rip), %rsi     # 0x212e8
subq 0x1a15d(%rip), %rsi     # 0x212e0
shrq $0x5, %rsi
decl %esi
xorl %edi, %edi
callq 0x4b2c
movslq %eax, %rsi
shlq $0x5, %rsi
addq 0x1a142(%rip), %rsi     # 0x212e0
movq %r15, %rdi
callq 0x4330
pushq $0x60
popq %rdi
callq 0x4260
movq %rax, %r13
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x4330
xorps %xmm1, %xmm1
movq %r13, %rdi
movq %r12, %rsi
pushq $0x19
popq %rdx
pushq $0xf
popq %rcx
pushq $0x3
popq %r8
movsd 0xe224(%rip), %xmm0     # 0x15400
movsd 0xe224(%rip), %xmm2     # 0x15408
movl %ebp, %r9d
callq 0x14080
movq %r12, %rdi
callq 0x4470
movq %r14, %rdi
movq %r13, %rsi
callq 0xde1c
movq %r15, %rdi
callq 0x4470
jmp 0x704b
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x7232
jmp 0x7248
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x4470
jmp 0x724b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x4470
jmp 0x7252
movq %rax, %rbx
pushq $0x48
jmp 0x7254
movq %rax, %rbx
pushq $0x60
popq %rsi
movq %r13, %rdi
callq 0x4270
jmp 0x7266
jmp 0x7263
jmp 0x7263
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4470
movq %rbx, %rdi
callq 0x4410