// File: /workspace/github_cpp_makefile_star2_O3/arisKoutsou[P]oopproj/./src/game_utils.cpp
// Function: fillMarketSpells(Market*, int)
void fillMarketSpells(Market* market, int size) {
  for (int i = 0; i != size; ++i) {
    int kind = rng.fromMintoMax(0, 2);
    string name = spells[rng.fromMintoMax(0, spells.size() - 1)];
    switch (kind) {
    case 0: {
      FireSpell* newFireSpell = new FireSpell(name);
      market->addSpell(newFireSpell);
      break;
    }
    case 1: {
      IceSpell* newIceSpell = new IceSpell(name);
      market->addSpell(newIceSpell);
      break;
    }
    case 2: {
      LightningSpell* newLightningSpell = new LightningSpell(name);
      market->addSpell(newLightningSpell);
      break;
    }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
testl %esi, %esi
je 0x8691
movl %esi, %ebx
movq %rdi, %r14
leaq 0x18(%rsp), %r13
leaq 0x8(%rsp), %r15
xorl %edi, %edi
movl $0x2, %esi
callq 0x4df6
movl %eax, %r12d
movq 0x1ce9a(%rip), %rsi     # 0x25310
subq 0x1ce8b(%rip), %rsi     # 0x25308
shrq $0x5, %rsi
decl %esi
xorl %edi, %edi
callq 0x4df6
cltq
movq 0x1ce75(%rip), %rcx     # 0x25308
shlq $0x5, %rax
movq %r13, 0x8(%rsp)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x4cf0
cmpl $0x2, %r12d
je 0x85e9
cmpl $0x1, %r12d
je 0x855b
testl %r12d, %r12d
jne 0x8672
movl $0x58, %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
movq %r12, %rdi
movq %rbp, %rsi
movl $0x14, %edx
movl $0x1, %ecx
movl $0xa, %r8d
movl $0x50, %r9d
movsd 0x12eee(%rip), %xmm0    # 0x1b410
pushq $0x3
pushq $0x64
callq 0x12af0
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x854b
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11e66
jmp 0x8672
movl $0x58, %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 $0x14, %edx
movl $0x1, %ecx
movl $0xa, %r8d
movl $0x50, %r9d
movsd 0x12e78(%rip), %xmm0    # 0x1b428
pushq $0x2
pushq $0x64
callq 0x11ff0
addq $0x10, %rsp
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x85d9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11e66
jmp 0x8672
movl $0x58, %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
movq %r12, %rdi
movq %rbp, %rsi
movl $0x14, %edx
movl $0x1, %ecx
movl $0xa, %r8d
movl $0x50, %r9d
movsd 0x12de2(%rip), %xmm0    # 0x1b420
pushq $0x1
pushq $0x64
callq 0x12570
addq $0x10, %rsp
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8667
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11e66
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x8689
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
decl %ebx
jne 0x8460
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 0x86c2
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x8710
jmp 0x870d
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x870b
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x870b
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8706
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x8710
movq %rax, %rbx
jmp 0x8710
movq %rax, %rbx
movl $0x58, %esi
movq %r12, %rdi
callq 0x42a0
jmp 0x8726
jmp 0x8723
jmp 0x8723
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x873d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %rbx, %rdi
callq 0x4430