// File: gilecheverria[P]UP_Battle_Project/Game.cpp
// Function: Game::Game()
Game::Game()
{
    // Create the Party objects for the opposing teams
    the_heros = new Party(hero_party_size, HERO);
    the_monsters = new Party(monster_party_size);
    // Create the Battle object
    the_battle = new Battle(*the_heros, *the_monsters);

    // Load the data in the files
    num_heroes = FileIOTemplate<Hero>::readData(hero_database, MAX_HEROS, "heros.bin");
    num_monsters = FileIOTemplate<Monster>::readData(monster_database, MAX_MONSTERS, "monsters.bin");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0x0, (%rax)
movl $0x0, 0x4(%rax)
movl $0x2, 0x8(%rax)
movl $0x3, 0xc(%rax)
addq $0x10, %rax
movq %rax, %rcx
addq $0x120, %rcx            # imm = 0x120
movq %rcx, -0x78(%rbp)
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x5740
movq -0x88(%rbp), %rax
movq -0x78(%rbp), %rcx
addq $0x60, %rax
cmpq %rcx, %rax
movq %rax, -0x70(%rbp)
jne 0x4c98
movq -0x80(%rbp), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, %rcx
addq $0x1a0, %rcx            # imm = 0x1A0
movq %rcx, -0x98(%rbp)
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x57a0
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rcx
addq $0x68, %rax
cmpq %rcx, %rax
movq %rax, -0x90(%rbp)
jne 0x4ce2
movq -0x80(%rbp), %rax
movq $0x0, 0x2d8(%rax)
movq $0x0, 0x2e0(%rax)
movl $0x10, %edi
callq 0x21d0
movq %rax, %rdi
movq -0x80(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0xa8(%rbp)
movl 0x8(%rax), %esi
xorl %edx, %edx
callq 0x3f80
jmp 0x4d54
movq -0x80(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, 0x2d8(%rax)
movl $0x10, %edi
callq 0x21d0
movq %rax, %rdi
movq -0x80(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0xb0(%rbp)
movl 0xc(%rax), %esi
movl $0x1, %edx
callq 0x3f80
jmp 0x4d90
movq -0x80(%rbp), %rax
movq -0xb0(%rbp), %rcx
movq %rcx, 0x2e0(%rax)
movl $0x30, %edi
callq 0x21d0
movq %rax, %rdi
movq -0x80(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0xb8(%rbp)
movq 0x2d8(%rax), %rsi
movq 0x2e0(%rax), %rdx
callq 0x4200
jmp 0x4dd2
movq -0x80(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq %rcx, 0x2d0(%rax)
addq $0x10, %rax
movq %rax, -0xc8(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x2330
movq -0xc0(%rbp), %rdx
leaq 0x16b6(%rip), %rsi      # 0x64c3
leaq -0x38(%rbp), %rdi
callq 0x34b0
jmp 0x4e18
movq -0xc8(%rbp), %rdi
movl $0x3, %esi
leaq -0x38(%rbp), %rdx
callq 0x5800
movl %eax, -0xcc(%rbp)
jmp 0x4e35
movq -0x80(%rbp), %rax
movl -0xcc(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x38(%rbp), %rdi
callq 0x2100
leaq -0x39(%rbp), %rdi
callq 0x2210
movq -0x80(%rbp), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, -0xe0(%rbp)
leaq -0x61(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x2330
movq -0xd8(%rbp), %rdx
leaq 0x164b(%rip), %rsi      # 0x64cd
leaq -0x60(%rbp), %rdi
callq 0x34b0
jmp 0x4e8d
movq -0xe0(%rbp), %rdi
movl $0x4, %esi
leaq -0x60(%rbp), %rdx
callq 0x5880
movl %eax, -0xe4(%rbp)
jmp 0x4eaa
movq -0x80(%rbp), %rax
movl -0xe4(%rbp), %ecx
movl %ecx, 0x4(%rax)
leaq -0x60(%rbp), %rdi
callq 0x2100
leaq -0x61(%rbp), %rdi
callq 0x2210
addq $0xf0, %rsp
popq %rbp
retq
movq -0xa8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x10, %esi
callq 0x21e0
jmp 0x4f8c
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x10, %esi
callq 0x21e0
jmp 0x4f8c
movq -0xb8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x30, %esi
callq 0x21e0
jmp 0x4f8c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x4f55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x2100
leaq -0x39(%rbp), %rdi
callq 0x2210
jmp 0x4f8c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x4f83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x2100
leaq -0x61(%rbp), %rdi
callq 0x2210
movq -0x10(%rbp), %rdi
callq 0x2320
nopw %cs:(%rax,%rax)