// File: /workspace/github_cpp_makefile_star2_O1/kongrigoriou[P]Text-Based-RPG/src/main.cpp
// Function: main
int main(void){

    Squad team;
    Market m(&team);
    Grid grid(&m, &team);

    //Armors
    ifstream Armors;
    Armors.open("./data/Armors.txt");

    string name;
    int price, lvl, def;
    if(Armors.is_open()){
        while (Armors >> name >> price >> lvl >> def){
            m.AddArmor(name, price, lvl, def);
        }
    }else{
        cout << "File Armors could not be opened." << endl;
        return 1;
    }

    //Weapons
    ifstream Weapons;
    Weapons.open("./data/Weapons.txt");

    int dmg, hands;
    if(Weapons.is_open()){
        // cout << "-----------------------------------------------------------------------" << endl;
        while (Weapons >> name >> price >> lvl >> dmg >> hands){
            cout << name << price << endl;
            m.AddWeapon(name, price, lvl, hands, dmg);
        }
    }else{
        cout << "File Weapons could not be opened." << endl;
        return 1;
    }

    //Potions
    ifstream Potions;
    Potions.open("./data/Potions.txt");

    string buff;
    if(Potions.is_open()){
        // cout << "-----------------------------------------------------------------------" << endl;
        while (Potions >> name >> price >> lvl >> buff >> dmg){         //dmg aka buff%
            m.AddPotion(name, buff, lvl, price, dmg);
        }
    }else{
        cout << "File Potions could not be opened." << endl;
        return 1;
    }

    //Fire Spells
    ifstream FireSpells;
    FireSpells.open("./data/FireSpells.txt");

    int rounds, magic;
    if(FireSpells.is_open()){
        // cout << "-----------------------------------------------------------------------" << endl;
        while (FireSpells >> name >> price >> lvl >> magic >> dmg >> rounds){         //dmg aka buff%
            m.AddFireSpell(name, price, lvl, dmg, magic, rounds);
        }
    }else{
        cout << "File FireSpells could not be opened." << endl;
        return 1;
    }

    //Ice Spells
    ifstream IceSpells;
    IceSpells.open("./data/IceSpells.txt");

    if(IceSpells.is_open()){
        // cout << "-----------------------------------------------------------------------" << endl;
        while (IceSpells >> name >> price >> lvl >> magic >> dmg >> rounds){         //dmg aka buff%
            m.AddIceSpell(name, price, lvl, dmg, magic, rounds);
        }
    }else{
        cout << "File IceSpells could not be opened." << endl;
        return 1;
    }

    //Lighting Spells
    ifstream LightingSpells;
    LightingSpells.open("./data/LightingSpells.txt");

    if(LightingSpells.is_open()){
        // cout << "-----------------------------------------------------------------------" << endl;
        while (LightingSpells >> name >> price >> lvl >> magic >> dmg >> rounds){         //dmg aka buff%
            m.AddLightingSpell(name, price, lvl, dmg, magic, rounds);
        }
    }else{
        cout << "File LightingSpells could not be opened." << endl;
        return 1;
    }

    //Dragons
    ifstream Dragons;
    Dragons.open("./data/Dragons.txt");

    int hp, ag;
    if(Dragons.is_open()){
        // cout << "-----------------------------------------------------------------------" << endl;
        while (Dragons >> name >> hp >> dmg >> def >> ag >> lvl){
            grid.insert_Dragon(name, hp, dmg, def, ag, lvl);
            cout <<"Dragon here: " << name << endl;
            cout << "With Damage: " << dmg << endl; 
        }
    }else{
        cout << "File Dragons could not be opened." << endl;
        return 1;
    }

    //Exoskeletons
    ifstream Exoskeletons;
    Exoskeletons.open("./data/Exoskeletons.txt");

    if(Exoskeletons.is_open()){
        // cout << "-----------------------------------------------------------------------" << endl;
        while (Exoskeletons >> name >> hp >> dmg >> def >> ag >> lvl){
            grid.insert_Exoskeleton(name, hp, dmg, def, ag, lvl);
        }
    }else{
        cout << "File Exoskeletons could not be opened." << endl;
        return 1;
    }

    //Spirits
    ifstream Spirits;
    Spirits.open("./data/Spirits.txt");

    if(Spirits.is_open()){
        // cout << "-----------------------------------------------------------------------" << endl;
        while (Spirits >> name >> hp >> dmg >> def >> ag >> lvl){
            grid.insert_Spirit(name, hp, dmg, def, ag, lvl);
        }
    }else{
        cout << "File Spirits could not be opened." << endl;
        return 1;
    }

    //Warriors
    ifstream Warriors;
    Warriors.open("./data/Warriors.txt");

    int dex;
    if(Warriors.is_open()){
        // cout << "-----------------------------------------------------------------------" << endl;
        while (Warriors >> name >> hp >> magic >> dmg >> ag >> dex){
            team.insert_Warrior(name, hp, magic, dmg, ag, dex);
        }
    }else{
        cout << "File Spirits could not be opened." << endl;
        return 1;
    }

    // //Paladins
    // ifstream Paladins;
    // Paladins.open("./data/Paladins.txt");

    // if(Paladins.is_open()){
    //     cout << "-----------------------------------------------------------------------" << endl;
    //     while (Paladins >> name >> hp >> magic >> dmg >> ag >> dex){
    //         team.insert_Paladin(name, hp, magic, dmg, ag, dex);
    //     }
    // }else{
    //     cout << "File Paladins could not be opened." << endl;
    //     return 1;
    // }

    //leipoun ta arxeia gia sorcerers/paladins

    grid.gameplay();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1798, %rsp           # imm = 0x1798
leaq -0x2d8(%rbp), %rbx
movq %rbx, %rdi
callq 0xce68
leaq -0x278(%rbp), %rdi
movq %rbx, %rsi
callq 0x786c
leaq -0x368(%rbp), %rdi
leaq -0x278(%rbp), %rsi
leaq -0x2d8(%rbp), %rdx
callq 0x9c34
leaq -0x17b8(%rbp), %rdi
callq 0x31b0
leaq 0xaab9(%rip), %rsi      # 0xe004
leaq -0x17b8(%rbp), %rdi
movl $0x8, %edx
callq 0x30f0
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq -0x1740(%rbp), %rdi
callq 0x3060
testb %al, %al
je 0x3634
leaq -0x1e8(%rbp), %r15
leaq -0x30(%rbp), %r12
leaq -0x44(%rbp), %r13
leaq -0x1f8(%rbp), %rbx
leaq -0x278(%rbp), %r14
leaq -0x17b8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x31e0
movq %rax, %rdi
leaq -0x34(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x30e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x30e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3684
movq %r15, -0x1f8(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x47b8
movl -0x34(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x44(%rbp), %r8d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7a96
movq -0x1f8(%rbp), %rdi
cmpq %r15, %rdi
je 0x35a1
movq -0x1e8(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x35a1
movq 0x10995(%rip), %rbx     # 0x13fd0
leaq 0xa9d4(%rip), %rsi      # 0xe016
movl $0x20, %edx
movq %rbx, %rdi
callq 0x31c0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3160
movsbl %al, %esi
movq 0x10963(%rip), %rdi     # 0x13fd0
callq 0x3040
movl $0x1, %ebx
movq %rax, %rdi
callq 0x3100
jmp 0x441b
leaq -0x15b0(%rbp), %rdi
callq 0x31b0
leaq 0xa9a0(%rip), %rsi      # 0xe037
leaq -0x15b0(%rbp), %rdi
movl $0x8, %edx
leaq -0x58(%rbp), %r15
callq 0x30f0
leaq -0x1538(%rbp), %rdi
callq 0x3060
testb %al, %al
je 0x37d0
leaq -0x1c8(%rbp), %r12
leaq -0x2c(%rbp), %r13
leaq -0x98(%rbp), %rbx
leaq -0x1d8(%rbp), %r14
leaq -0x15b0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x31e0
movq %rax, %rdi
leaq -0x34(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
leaq -0x30(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x30e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x30e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3820
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq 0x10898(%rip), %rdi     # 0x13fd0
callq 0x31c0
movl -0x34(%rbp), %esi
movq %rax, %rdi
callq 0x3210
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3160
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq %r12, -0x1d8(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x47b8
movl -0x34(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x98(%rbp), %r8d
movl -0x2c(%rbp), %r9d
leaq -0x278(%rbp), %rdi
movq %r14, %rsi
callq 0x79b2
movq -0x1d8(%rbp), %rdi
cmpq %r12, %rdi
je 0x36d9
movq -0x1c8(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x36d9
movq 0x107f9(%rip), %rbx     # 0x13fd0
leaq 0xa86c(%rip), %rsi      # 0xe04a
movl $0x21, %edx
movq %rbx, %rdi
callq 0x31c0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3160
movsbl %al, %esi
movq 0x107c7(%rip), %rdi     # 0x13fd0
callq 0x3040
movl $0x1, %ebx
movq %rax, %rdi
callq 0x3100
jmp 0x440f
leaq -0x13a8(%rbp), %rdi
callq 0x31b0
leaq 0xa839(%rip), %rsi      # 0xe06c
leaq -0x13a8(%rbp), %rdi
movl $0x8, %edx
callq 0x30f0
leaq -0x80(%rbp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq -0x1330(%rbp), %rdi
callq 0x3060
testb %al, %al
je 0x3976
leaq -0x1a8(%rbp), %r12
leaq -0x188(%rbp), %r13
leaq -0x2c(%rbp), %rbx
leaq -0x1b8(%rbp), %r14
leaq -0x198(%rbp), %r15
leaq -0x13a8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x31e0
movq %rax, %rdi
leaq -0x34(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
leaq -0x30(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
leaq -0x90(%rbp), %rsi
callq 0x31e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x30e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x39ca
movq %r12, -0x1b8(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x47b8
movq %r13, -0x198(%rbp)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x47b8
movl -0x30(%rbp), %ecx
movl -0x34(%rbp), %r8d
movl -0x2c(%rbp), %r9d
leaq -0x278(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x7b74
movq -0x198(%rbp), %rdi
cmpq %r13, %rdi
je 0x3952
movq -0x188(%rbp), %rsi
incq %rsi
callq 0x3190
movq -0x1b8(%rbp), %rdi
cmpq %r12, %rdi
je 0x388c
movq -0x1a8(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x388c
movq 0x10653(%rip), %rbx     # 0x13fd0
leaq 0xa6fb(%rip), %rsi      # 0xe07f
movl $0x21, %edx
movq %rbx, %rdi
leaq -0x58(%rbp), %r15
callq 0x31c0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3160
movsbl %al, %esi
movq 0x1061d(%rip), %rdi     # 0x13fd0
callq 0x3040
movl $0x1, %ebx
movq %rax, %rdi
callq 0x3100
jmp 0x43eb
leaq -0x11a0(%rbp), %rdi
callq 0x31b0
leaq 0xa6c4(%rip), %rsi      # 0xe0a1
leaq -0x11a0(%rbp), %rdi
movl $0x8, %edx
leaq -0x58(%rbp), %r15
leaq -0x80(%rbp), %r14
callq 0x30f0
leaq -0x1128(%rbp), %rdi
callq 0x3060
testb %al, %al
je 0x3ae0
leaq -0x168(%rbp), %r12
leaq -0x40(%rbp), %r13
leaq -0x2c(%rbp), %rbx
leaq -0x6c(%rbp), %r14
leaq -0x178(%rbp), %r15
leaq -0x11a0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x31e0
movq %rax, %rdi
leaq -0x34(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
leaq -0x30(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x30e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x30e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x30e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3b30
movq %r12, -0x178(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x47b8
movl -0x34(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x2c(%rbp), %r8d
movl -0x40(%rbp), %r9d
movl -0x6c(%rbp), %eax
movl %eax, (%rsp)
leaq -0x278(%rbp), %rdi
movq %r15, %rsi
callq 0x7d98
movq -0x178(%rbp), %rdi
cmpq %r12, %rdi
je 0x3a24
movq -0x168(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x3a24
movq 0x104e9(%rip), %rbx     # 0x13fd0
leaq 0xa5c9(%rip), %rsi      # 0xe0b7
movl $0x24, %edx
movq %rbx, %rdi
callq 0x31c0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3160
movsbl %al, %esi
movq 0x104b7(%rip), %rdi     # 0x13fd0
callq 0x3040
movl $0x1, %ebx
movq %rax, %rdi
callq 0x3100
jmp 0x43df
leaq -0xf98(%rbp), %rdi
callq 0x31b0
leaq 0xa599(%rip), %rsi      # 0xe0dc
leaq -0xf98(%rbp), %rdi
movl $0x8, %edx
leaq -0x58(%rbp), %r15
leaq -0x80(%rbp), %r14
callq 0x30f0
leaq -0xf20(%rbp), %rdi
callq 0x3060
testb %al, %al
je 0x3c46
leaq -0x148(%rbp), %r12
leaq -0x40(%rbp), %r13
leaq -0x2c(%rbp), %rbx
leaq -0x6c(%rbp), %r14
leaq -0x158(%rbp), %r15
leaq -0xf98(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x31e0
movq %rax, %rdi
leaq -0x34(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
leaq -0x30(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x30e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x30e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x30e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3c96
movq %r12, -0x158(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x47b8
movl -0x34(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x2c(%rbp), %r8d
movl -0x40(%rbp), %r9d
movl -0x6c(%rbp), %eax
movl %eax, (%rsp)
leaq -0x278(%rbp), %rdi
movq %r15, %rsi
callq 0x7cae
movq -0x158(%rbp), %rdi
cmpq %r12, %rdi
je 0x3b8a
movq -0x148(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x3b8a
movq 0x10383(%rip), %rbx     # 0x13fd0
leaq 0xa49d(%rip), %rsi      # 0xe0f1
movl $0x23, %edx
movq %rbx, %rdi
callq 0x31c0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3160
movsbl %al, %esi
movq 0x10351(%rip), %rdi     # 0x13fd0
callq 0x3040
movl $0x1, %ebx
movq %rax, %rdi
callq 0x3100
jmp 0x43d3
leaq -0xd90(%rbp), %rdi
callq 0x31b0
leaq 0xa46c(%rip), %rsi      # 0xe115
leaq -0xd90(%rbp), %rdi
movl $0x8, %edx
leaq -0x58(%rbp), %r15
leaq -0x80(%rbp), %r14
callq 0x30f0
leaq -0xd18(%rbp), %rdi
callq 0x3060
testb %al, %al
je 0x3dac
leaq -0x128(%rbp), %r12
leaq -0x40(%rbp), %r13
leaq -0x2c(%rbp), %rbx
leaq -0x6c(%rbp), %r14
leaq -0x138(%rbp), %r15
leaq -0xd90(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x31e0
movq %rax, %rdi
leaq -0x34(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
leaq -0x30(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x30e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x30e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x30e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3dda
movq %r12, -0x138(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x47b8
movl -0x34(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x2c(%rbp), %r8d
movl -0x40(%rbp), %r9d
movl -0x6c(%rbp), %eax
movl %eax, (%rsp)
leaq -0x278(%rbp), %rdi
movq %r15, %rsi
callq 0x7e82
movq -0x138(%rbp), %rdi
cmpq %r12, %rdi
je 0x3cf0
movq -0x128(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x3cf0
movq 0x1021d(%rip), %rdi     # 0x13fd0
leaq 0xa375(%rip), %rsi      # 0xe12f
movl $0x28, %edx
callq 0x31c0
movl $0x1, %ebx
movq 0x10200(%rip), %rdi     # 0x13fd0
callq 0x30c0
jmp 0x43c7
leaq -0xb88(%rbp), %rdi
callq 0x31b0
leaq 0xa36b(%rip), %rsi      # 0xe158
leaq -0xb88(%rbp), %rdi
movl $0x8, %edx
leaq -0x58(%rbp), %r15
leaq -0x80(%rbp), %r14
callq 0x30f0
leaq -0xb10(%rbp), %rdi
callq 0x3060
testb %al, %al
je 0x3f84
leaq -0x108(%rbp), %rbx
leaq -0x30(%rbp), %r14
leaq -0x118(%rbp), %r15
movq 0x1019d(%rip), %r12     # 0x13fd0
leaq -0xb88(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x31e0
movq %rax, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
leaq -0x44(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
leaq -0x38(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x30e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3fb2
movq %rbx, -0x118(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x47b8
movl -0x3c(%rbp), %edx
movl -0x2c(%rbp), %ecx
movl -0x44(%rbp), %r8d
movl -0x38(%rbp), %r9d
movl -0x30(%rbp), %eax
movl %eax, (%rsp)
leaq -0x368(%rbp), %rdi
movq %r15, %rsi
callq 0xa134
movq -0x118(%rbp), %rdi
cmpq %rbx, %rdi
je 0x3ee8
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x3190
movl $0xd, %edx
movq %r12, %rdi
leaq 0xa274(%rip), %rsi      # 0xe16b
callq 0x31c0
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r12, %rdi
callq 0x31c0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3160
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movl $0xd, %edx
movq %r12, %rdi
leaq 0xa234(%rip), %rsi      # 0xe179
callq 0x31c0
movl -0x2c(%rbp), %esi
movq %r12, %rdi
callq 0x3210
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3160
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
jmp 0x3e33
movq 0x10045(%rip), %rdi     # 0x13fd0
leaq 0xa1f5(%rip), %rsi      # 0xe187
movl $0x21, %edx
callq 0x31c0
movl $0x1, %ebx
movq 0x10028(%rip), %rdi     # 0x13fd0
callq 0x30c0
jmp 0x43bb
leaq -0x980(%rbp), %rdi
callq 0x31b0
leaq 0xa1e4(%rip), %rsi      # 0xe1a9
leaq -0x980(%rbp), %rdi
movl $0x8, %edx
leaq -0x58(%rbp), %r15
leaq -0x80(%rbp), %r14
callq 0x30f0
leaq -0x908(%rbp), %rdi
callq 0x3060
testb %al, %al
je 0x40c8
leaq -0xe8(%rbp), %r12
leaq -0x44(%rbp), %r13
leaq -0x38(%rbp), %rbx
leaq -0x30(%rbp), %r14
leaq -0xf8(%rbp), %r15
leaq -0x980(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x31e0
movq %rax, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x30e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x30e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x30e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x40f6
movq %r12, -0xf8(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x47b8
movl -0x3c(%rbp), %edx
movl -0x2c(%rbp), %ecx
movl -0x44(%rbp), %r8d
movl -0x38(%rbp), %r9d
movl -0x30(%rbp), %eax
movl %eax, (%rsp)
leaq -0x368(%rbp), %rdi
movq %r15, %rsi
callq 0xa21e
movq -0xf8(%rbp), %rdi
cmpq %r12, %rdi
je 0x400c
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x400c
movq 0xff01(%rip), %rdi      # 0x13fd0
leaq 0xa0eb(%rip), %rsi      # 0xe1c1
movl $0x26, %edx
callq 0x31c0
movl $0x1, %ebx
movq 0xfee4(%rip), %rdi      # 0x13fd0
callq 0x30c0
jmp 0x43af
leaq -0x778(%rbp), %rdi
callq 0x31b0
leaq 0xa0df(%rip), %rsi      # 0xe1e8
leaq -0x778(%rbp), %rdi
movl $0x8, %edx
leaq -0x58(%rbp), %r15
leaq -0x80(%rbp), %r14
callq 0x30f0
leaq -0x700(%rbp), %rdi
callq 0x3060
testb %al, %al
je 0x420c
leaq -0xc8(%rbp), %r12
leaq -0x44(%rbp), %r13
leaq -0x38(%rbp), %rbx
leaq -0x30(%rbp), %r14
leaq -0xd8(%rbp), %r15
leaq -0x778(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x31e0
movq %rax, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x30e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x30e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x30e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x423a
movq %r12, -0xd8(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x47b8
movl -0x3c(%rbp), %edx
movl -0x2c(%rbp), %ecx
movl -0x44(%rbp), %r8d
movl -0x38(%rbp), %r9d
movl -0x30(%rbp), %eax
movl %eax, (%rsp)
leaq -0x368(%rbp), %rdi
movq %r15, %rsi
callq 0xa308
movq -0xd8(%rbp), %rdi
cmpq %r12, %rdi
je 0x4150
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x4150
movq 0xfdbd(%rip), %rdi      # 0x13fd0
leaq 0x9fe1(%rip), %rsi      # 0xe1fb
movl $0x21, %edx
callq 0x31c0
movl $0x1, %ebx
movq 0xfda0(%rip), %rdi      # 0x13fd0
callq 0x30c0
jmp 0x43a3
leaq -0x570(%rbp), %rdi
callq 0x31b0
leaq 0x9fd0(%rip), %rsi      # 0xe21d
leaq -0x570(%rbp), %rdi
movl $0x8, %edx
leaq -0x58(%rbp), %r15
leaq -0x80(%rbp), %r14
callq 0x30f0
leaq -0x4f8(%rbp), %rdi
callq 0x3060
testb %al, %al
je 0x4356
leaq -0xa8(%rbp), %r12
leaq -0x2c(%rbp), %r13
leaq -0x38(%rbp), %rbx
leaq -0x94(%rbp), %r14
leaq -0xb8(%rbp), %r15
leaq -0x570(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x31e0
movq %rax, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
leaq -0x40(%rbp), %rsi
callq 0x30e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x30e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x30e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x30e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4381
movq %r12, -0xb8(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x47b8
movl -0x3c(%rbp), %edx
movl -0x40(%rbp), %ecx
movl -0x2c(%rbp), %r8d
movl -0x38(%rbp), %r9d
movl -0x94(%rbp), %eax
movl %eax, (%rsp)
leaq -0x2d8(%rbp), %rdi
movq %r15, %rsi
callq 0xcf6a
movq -0xb8(%rbp), %rdi
cmpq %r12, %rdi
je 0x4297
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x4297
movq 0xfc73(%rip), %rdi      # 0x13fd0
leaq 0x9e97(%rip), %rsi      # 0xe1fb
movl $0x21, %edx
callq 0x31c0
movl $0x1, %ebx
movq 0xfc56(%rip), %rdi      # 0x13fd0
callq 0x30c0
jmp 0x4397
xorl %ebx, %ebx
leaq -0x368(%rbp), %rdi
leaq -0x58(%rbp), %r15
leaq -0x80(%rbp), %r14
callq 0xb2a8
leaq -0x570(%rbp), %rdi
callq 0x3070
leaq -0x778(%rbp), %rdi
callq 0x3070
leaq -0x980(%rbp), %rdi
callq 0x3070
leaq -0xb88(%rbp), %rdi
callq 0x3070
leaq -0xd90(%rbp), %rdi
callq 0x3070
leaq -0xf98(%rbp), %rdi
callq 0x3070
leaq -0x11a0(%rbp), %rdi
callq 0x3070
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x4403
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x3190
leaq -0x13a8(%rbp), %rdi
callq 0x3070
leaq -0x15b0(%rbp), %rdi
callq 0x3070
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x4430
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3190
leaq -0x17b8(%rbp), %rdi
callq 0x3070
leaq -0x368(%rbp), %rdi
callq 0xc2ae
leaq -0x278(%rbp), %rdi
callq 0x78c4
leaq -0x2d8(%rbp), %rdi
callq 0xceac
movl %ebx, %eax
addq $0x1798, %rsp           # imm = 0x1798
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4536
jmp 0x4580
jmp 0x4536
jmp 0x45c4
jmp 0x4580
jmp 0x46a2
jmp 0x45c4
jmp 0x46a2
jmp 0x46a2
jmp 0x4656
movq %rax, %r14
movq -0xb8(%rbp), %rdi
cmpq %r12, %rdi
je 0x4539
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x4539
jmp 0x46bf
movq %rax, %r14
movq -0xd8(%rbp), %rdi
cmpq %r12, %rdi
je 0x4583
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x4583
jmp 0x4656
jmp 0x46f0
movq %rax, %r14
movq -0xf8(%rbp), %rdi
cmpq %r12, %rdi
je 0x45c7
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x45c7
jmp 0x46f0
jmp 0x4721
jmp 0x46bf
movq %rax, %r14
leaq -0x570(%rbp), %rdi
callq 0x3070
jmp 0x4583
movq %rax, %r14
movq -0x118(%rbp), %rdi
cmpq %rbx, %rdi
je 0x46a5
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x46a5
jmp 0x46f0
movq %rax, %r14
jmp 0x4740
jmp 0x4757
movq %rax, %r14
leaq -0x778(%rbp), %rdi
callq 0x3070
jmp 0x45c7
movq %rax, %r14
movq -0x138(%rbp), %rdi
cmpq %r12, %rdi
je 0x46b1
movq -0x128(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x46b1
jmp 0x4721
jmp 0x45ff
jmp 0x474e
movq %rax, %r14
leaq -0x980(%rbp), %rdi
callq 0x3070
jmp 0x46a5
movq %rax, %r14
movq -0x158(%rbp), %rdi
cmpq %r12, %rdi
je 0x46c2
movq -0x148(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x46c2
movq %rax, %r14
jmp 0x475e
movq %rax, %r14
jmp 0x477f
movq %rax, %r14
jmp 0x478b
movq %rax, %r14
jmp 0x4797
movq %rax, %r14
jmp 0x47a3
movq %rax, %r14
movq -0x178(%rbp), %rdi
cmpq %r12, %rdi
je 0x46f3
movq -0x168(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x46f3
movq %rax, %r14
jmp 0x476a
movq %rax, %r14
jmp 0x46b1
movq %rax, %r14
movq -0x198(%rbp), %rdi
cmpq %r13, %rdi
je 0x467e
movq -0x188(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x467e
movq %rax, %r14
movq -0x1b8(%rbp), %rdi
cmpq %r12, %rdi
je 0x4724
movq -0x1a8(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x4724
movq %rax, %r14
leaq -0xb88(%rbp), %rdi
callq 0x3070
leaq -0xd90(%rbp), %rdi
callq 0x3070
jmp 0x46c2
movq %rax, %r14
leaq -0xf98(%rbp), %rdi
callq 0x3070
jmp 0x46f3
movq %rax, %r14
movq -0x1d8(%rbp), %rdi
cmpq %r12, %rdi
je 0x475a
movq -0x1c8(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x475a
movq %rax, %r14
leaq -0x11a0(%rbp), %rdi
callq 0x3070
jmp 0x4724
movq %rax, %r14
movq -0x1f8(%rbp), %rdi
cmpq %r15, %rdi
je 0x4751
movq -0x1e8(%rbp), %rsi
incq %rsi
callq 0x3190
jmp 0x4751
movq %rax, %r14
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x4740
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x3190
leaq -0x13a8(%rbp), %rdi
callq 0x3070
jmp 0x475a
movq %rax, %r14
leaq -0x58(%rbp), %r15
jmp 0x476a
movq %rax, %r14
leaq -0x58(%rbp), %r15
leaq -0x15b0(%rbp), %rdi
callq 0x3070
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x477f
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3190
leaq -0x17b8(%rbp), %rdi
callq 0x3070
leaq -0x368(%rbp), %rdi
callq 0xc2ae
leaq -0x278(%rbp), %rdi
callq 0x78c4
leaq -0x2d8(%rbp), %rdi
callq 0xceac
movq %r14, %rdi
callq 0x3220
nop