// File: /workspace/github_cpp_makefile_star2_O3/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 0x8387
movl %esi, %ebx
movq %rdi, %r14
leaq 0x18(%rsp), %r13
leaq 0x8(%rsp), %r15
xorl %edi, %edi
movl $0x2, %esi
callq 0x4df6
cmpl $0x2, %eax
je 0x829b
cmpl $0x1, %eax
je 0x81da
testl %eax, %eax
jne 0x837f
movq 0x1d1ad(%rip), %rsi     # 0x252c8
subq 0x1d19e(%rip), %rsi     # 0x252c0
shrq $0x5, %rsi
decl %esi
xorl %edi, %edi
callq 0x4df6
cltq
movq 0x1d188(%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 0x198ec
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x81ca
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11de2
jmp 0x8368
movq 0x1d0ff(%rip), %rsi     # 0x252e0
subq 0x1d0f0(%rip), %rsi     # 0x252d8
shrq $0x5, %rsi
decl %esi
xorl %edi, %edi
callq 0x4df6
cltq
movq 0x1d0da(%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 0x131a6(%rip), %xmm0    # 0x1b410
callq 0x19dbc
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x828b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11de2
jmp 0x8368
movq 0x1d056(%rip), %rsi     # 0x252f8
subq 0x1d047(%rip), %rsi     # 0x252f0
shrq $0x5, %rsi
decl %esi
xorl %edi, %edi
callq 0x4df6
cltq
movq 0x1d031(%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 0x130e2(%rip), %xmm0    # 0x1b410
movsd 0x130e2(%rip), %xmm2    # 0x1b418
movl $0x2, %r9d
callq 0x1a1a0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x835d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11de2
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x837f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
decl %ebx
jne 0x80ee
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 0x83f9
movq 0x58(%rsp), %rsi
jmp 0x83cb
jmp 0x83f6
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x83f9
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x83f9
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8403
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x8403
movq %rax, %rbx
movl $0x48, %esi
jmp 0x8408
movq %rax, %rbx
movl $0x60, %esi
movq %r12, %rdi
callq 0x42a0
jmp 0x8419
jmp 0x8416
jmp 0x8416
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x8430
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %rbx, %rdi
callq 0x4430