// File: /workspace/github_cpp_makefile_star2_O1/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 0x8630
movl %esi, %ebx
movq %rdi, %r14
leaq 0x18(%rsp), %r13
leaq 0x8(%rsp), %r15
xorl %edi, %edi
movl $0x2, %esi
callq 0x4dee
movl %eax, %r12d
movq 0x1cefb(%rip), %rsi     # 0x25310
subq 0x1ceec(%rip), %rsi     # 0x25308
shrq $0x5, %rsi
decl %esi
xorl %edi, %edi
callq 0x4dee
cltq
movq 0x1ced6(%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 0x8588
cmpl $0x1, %r12d
je 0x84fa
testl %r12d, %r12d
jne 0x8611
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 0x12f4f(%rip), %xmm0    # 0x1b410
pushq $0x3
pushq $0x64
callq 0x12a7c
addq $0x10, %rsp
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x84ea
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11dfa
jmp 0x8611
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 0x12ed9(%rip), %xmm0    # 0x1b428
pushq $0x2
pushq $0x64
callq 0x11f7c
addq $0x10, %rsp
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x8578
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11dfa
jmp 0x8611
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 0x12e43(%rip), %xmm0    # 0x1b420
pushq $0x1
pushq $0x64
callq 0x124fc
addq $0x10, %rsp
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8606
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11dfa
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x8628
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
decl %ebx
jne 0x83ff
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 0x8661
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x86af
jmp 0x86ac
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x86aa
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x86aa
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x86a5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x86af
movq %rax, %rbx
jmp 0x86af
movq %rax, %rbx
movl $0x58, %esi
movq %r12, %rdi
callq 0x42a0
jmp 0x86c5
jmp 0x86c2
jmp 0x86c2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x86dc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %rbx, %rdi
callq 0x4430