// File: 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
subq $0x1aa0, %rsp           # imm = 0x1AA0
movl $0x0, -0x4(%rbp)
leaq -0x68(%rbp), %rdi
movq %rdi, -0x17b8(%rbp)
callq 0x12d70
movq -0x17b8(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
callq 0xb430
jmp 0x36a7
leaq -0x188(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0xe920
jmp 0x36c0
leaq -0x390(%rbp), %rdi
callq 0x3260
jmp 0x36ce
leaq 0x1192f(%rip), %rsi     # 0x15004
leaq -0x390(%rbp), %rdi
movl $0x8, %edx
callq 0x3130
jmp 0x36e8
leaq -0x3b0(%rbp), %rdi
callq 0x32c0
leaq -0x390(%rbp), %rdi
callq 0x32f0
movb %al, -0x17b9(%rbp)
jmp 0x3708
movb -0x17b9(%rbp), %al
testb $0x1, %al
jne 0x3717
jmp 0x389c
jmp 0x3719
leaq -0x390(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x32a0
movq %rax, -0x17c8(%rbp)
jmp 0x3735
movq -0x17c8(%rbp), %rdi
leaq -0x3b4(%rbp), %rsi
callq 0x3110
movq %rax, -0x17d0(%rbp)
jmp 0x3751
movq -0x17d0(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x3110
movq %rax, -0x17d8(%rbp)
jmp 0x376d
movq -0x17d8(%rbp), %rdi
leaq -0x3bc(%rbp), %rsi
callq 0x3110
movq %rax, -0x17e0(%rbp)
jmp 0x3789
movq -0x17e0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3290
movb %al, -0x17e1(%rbp)
jmp 0x37a7
movb -0x17e1(%rbp), %al
testb $0x1, %al
jne 0x37b6
jmp 0x389a
leaq -0x3e0(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x30c0
jmp 0x37cb
movl -0x3b4(%rbp), %edx
movl -0x3b8(%rbp), %ecx
movl -0x3bc(%rbp), %r8d
leaq -0xe8(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
callq 0xb610
jmp 0x37f3
leaq -0x3e0(%rbp), %rdi
callq 0x3120
jmp 0x3719
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4d83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4d77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4d6b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4d5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4d53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
leaq -0x3e0(%rbp), %rdi
callq 0x3120
jmp 0x4d53
jmp 0x38e3
movq 0x1b72d(%rip), %rdi     # 0x1efd0
leaq 0x1176c(%rip), %rsi     # 0x15016
callq 0x31e0
movq %rax, -0x17f0(%rbp)
jmp 0x38b8
movq -0x17f0(%rbp), %rdi
movq 0x1b6fa(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0x38cd
movl $0x1, -0x4(%rbp)
movl $0x1, -0x3e4(%rbp)
jmp 0x4c96
leaq -0x5f0(%rbp), %rdi
callq 0x3260
jmp 0x38f1
leaq 0x1173f(%rip), %rsi     # 0x15037
leaq -0x5f0(%rbp), %rdi
movl $0x8, %edx
callq 0x3130
jmp 0x390b
leaq -0x5f0(%rbp), %rdi
callq 0x32f0
movb %al, -0x17f1(%rbp)
jmp 0x391f
movb -0x17f1(%rbp), %al
testb $0x1, %al
jne 0x392e
jmp 0x3ac6
jmp 0x3930
leaq -0x5f0(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x32a0
movq %rax, -0x1800(%rbp)
jmp 0x394c
movq -0x1800(%rbp), %rdi
leaq -0x3b4(%rbp), %rsi
callq 0x3110
movq %rax, -0x1808(%rbp)
jmp 0x3968
movq -0x1808(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x3110
movq %rax, -0x1810(%rbp)
jmp 0x3984
movq -0x1810(%rbp), %rdi
leaq -0x5f4(%rbp), %rsi
callq 0x3110
movq %rax, -0x1818(%rbp)
jmp 0x39a0
movq -0x1818(%rbp), %rdi
leaq -0x5f8(%rbp), %rsi
callq 0x3110
movq %rax, -0x1820(%rbp)
jmp 0x39bc
movq -0x1820(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3290
movb %al, -0x1821(%rbp)
jmp 0x39da
movb -0x1821(%rbp), %al
testb $0x1, %al
jne 0x39e9
jmp 0x3ac4
movq 0x1b5e0(%rip), %rdi     # 0x1efd0
leaq -0x3b0(%rbp), %rsi
callq 0x31b0
movq %rax, -0x1830(%rbp)
jmp 0x3a05
movq -0x1830(%rbp), %rdi
movl -0x3b4(%rbp), %esi
callq 0x3320
movq %rax, -0x1838(%rbp)
jmp 0x3a20
movq -0x1838(%rbp), %rdi
movq 0x1b592(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0x3a35
leaq -0x618(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x30c0
jmp 0x3a4a
movl -0x3b4(%rbp), %edx
movl -0x3b8(%rbp), %ecx
movl -0x5f8(%rbp), %r8d
movl -0x5f4(%rbp), %r9d
leaq -0xe8(%rbp), %rdi
leaq -0x618(%rbp), %rsi
callq 0xb530
jmp 0x3a79
leaq -0x618(%rbp), %rdi
callq 0x3120
jmp 0x3930
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4d47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
leaq -0x618(%rbp), %rdi
callq 0x3120
jmp 0x4d47
jmp 0x3b0d
movq 0x1b503(%rip), %rdi     # 0x1efd0
leaq 0x11576(%rip), %rsi     # 0x1504a
callq 0x31e0
movq %rax, -0x1840(%rbp)
jmp 0x3ae2
movq -0x1840(%rbp), %rdi
movq 0x1b4d0(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0x3af7
movl $0x1, -0x4(%rbp)
movl $0x1, -0x3e4(%rbp)
jmp 0x4c8a
leaq -0x820(%rbp), %rdi
callq 0x3260
jmp 0x3b1b
leaq 0x1154a(%rip), %rsi     # 0x1506c
leaq -0x820(%rbp), %rdi
movl $0x8, %edx
callq 0x3130
jmp 0x3b35
leaq -0x840(%rbp), %rdi
callq 0x32c0
leaq -0x820(%rbp), %rdi
callq 0x32f0
movb %al, -0x1841(%rbp)
jmp 0x3b55
movb -0x1841(%rbp), %al
testb $0x1, %al
jne 0x3b64
jmp 0x3d09
jmp 0x3b66
leaq -0x820(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x32a0
movq %rax, -0x1850(%rbp)
jmp 0x3b82
movq -0x1850(%rbp), %rdi
leaq -0x3b4(%rbp), %rsi
callq 0x3110
movq %rax, -0x1858(%rbp)
jmp 0x3b9e
movq -0x1858(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x3110
movq %rax, -0x1860(%rbp)
jmp 0x3bba
movq -0x1860(%rbp), %rdi
leaq -0x840(%rbp), %rsi
callq 0x32a0
movq %rax, -0x1868(%rbp)
jmp 0x3bd6
movq -0x1868(%rbp), %rdi
leaq -0x5f4(%rbp), %rsi
callq 0x3110
movq %rax, -0x1870(%rbp)
jmp 0x3bf2
movq -0x1870(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3290
movb %al, -0x1871(%rbp)
jmp 0x3c10
movb -0x1871(%rbp), %al
testb $0x1, %al
jne 0x3c1f
jmp 0x3d07
leaq -0x860(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x30c0
jmp 0x3c34
leaq -0x880(%rbp), %rdi
leaq -0x840(%rbp), %rsi
callq 0x30c0
jmp 0x3c49
movl -0x3b8(%rbp), %ecx
movl -0x3b4(%rbp), %r8d
movl -0x5f4(%rbp), %r9d
leaq -0xe8(%rbp), %rdi
leaq -0x860(%rbp), %rsi
leaq -0x880(%rbp), %rdx
callq 0xb6e0
jmp 0x3c79
leaq -0x880(%rbp), %rdi
callq 0x3120
leaq -0x860(%rbp), %rdi
callq 0x3120
jmp 0x3b66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4d3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4d2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x3cf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
leaq -0x880(%rbp), %rdi
callq 0x3120
leaq -0x860(%rbp), %rdi
callq 0x3120
jmp 0x4d2f
jmp 0x3d50
movq 0x1b2c0(%rip), %rdi     # 0x1efd0
leaq 0x11368(%rip), %rsi     # 0x1507f
callq 0x31e0
movq %rax, -0x1880(%rbp)
jmp 0x3d25
movq -0x1880(%rbp), %rdi
movq 0x1b28d(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0x3d3a
movl $0x1, -0x4(%rbp)
movl $0x1, -0x3e4(%rbp)
jmp 0x4c72
leaq -0xa88(%rbp), %rdi
callq 0x3260
jmp 0x3d5e
leaq 0x1133c(%rip), %rsi     # 0x150a1
leaq -0xa88(%rbp), %rdi
movl $0x8, %edx
callq 0x3130
jmp 0x3d78
leaq -0xa88(%rbp), %rdi
callq 0x32f0
movb %al, -0x1881(%rbp)
jmp 0x3d8c
movb -0x1881(%rbp), %al
testb $0x1, %al
jne 0x3d9b
jmp 0x3f0e
jmp 0x3d9d
leaq -0xa88(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x32a0
movq %rax, -0x1890(%rbp)
jmp 0x3db9
movq -0x1890(%rbp), %rdi
leaq -0x3b4(%rbp), %rsi
callq 0x3110
movq %rax, -0x1898(%rbp)
jmp 0x3dd5
movq -0x1898(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x3110
movq %rax, -0x18a0(%rbp)
jmp 0x3df1
movq -0x18a0(%rbp), %rdi
leaq -0xa90(%rbp), %rsi
callq 0x3110
movq %rax, -0x18a8(%rbp)
jmp 0x3e0d
movq -0x18a8(%rbp), %rdi
leaq -0x5f4(%rbp), %rsi
callq 0x3110
movq %rax, -0x18b0(%rbp)
jmp 0x3e29
movq -0x18b0(%rbp), %rdi
leaq -0xa8c(%rbp), %rsi
callq 0x3110
movq %rax, -0x18b8(%rbp)
jmp 0x3e45
movq -0x18b8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3290
movb %al, -0x18b9(%rbp)
jmp 0x3e63
movb -0x18b9(%rbp), %al
testb $0x1, %al
jne 0x3e72
jmp 0x3f0c
leaq -0xab0(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x30c0
jmp 0x3e87
movl -0x3b4(%rbp), %edx
movl -0x3b8(%rbp), %ecx
movl -0x5f4(%rbp), %r8d
movl -0xa90(%rbp), %r9d
movl -0xa8c(%rbp), %esi
movq %rsp, %rax
movl %esi, (%rax)
leaq -0xe8(%rbp), %rdi
leaq -0xab0(%rbp), %rsi
callq 0xb920
jmp 0x3ec1
leaq -0xab0(%rbp), %rdi
callq 0x3120
jmp 0x3d9d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4d23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
leaq -0xab0(%rbp), %rdi
callq 0x3120
jmp 0x4d23
jmp 0x3f55
movq 0x1b0bb(%rip), %rdi     # 0x1efd0
leaq 0x1119b(%rip), %rsi     # 0x150b7
callq 0x31e0
movq %rax, -0x18c8(%rbp)
jmp 0x3f2a
movq -0x18c8(%rbp), %rdi
movq 0x1b088(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0x3f3f
movl $0x1, -0x4(%rbp)
movl $0x1, -0x3e4(%rbp)
jmp 0x4c66
leaq -0xcb8(%rbp), %rdi
callq 0x3260
jmp 0x3f63
leaq 0x11172(%rip), %rsi     # 0x150dc
leaq -0xcb8(%rbp), %rdi
movl $0x8, %edx
callq 0x3130
jmp 0x3f7d
leaq -0xcb8(%rbp), %rdi
callq 0x32f0
movb %al, -0x18c9(%rbp)
jmp 0x3f91
movb -0x18c9(%rbp), %al
testb $0x1, %al
jne 0x3fa0
jmp 0x4113
jmp 0x3fa2
leaq -0xcb8(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x32a0
movq %rax, -0x18d8(%rbp)
jmp 0x3fbe
movq -0x18d8(%rbp), %rdi
leaq -0x3b4(%rbp), %rsi
callq 0x3110
movq %rax, -0x18e0(%rbp)
jmp 0x3fda
movq -0x18e0(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x3110
movq %rax, -0x18e8(%rbp)
jmp 0x3ff6
movq -0x18e8(%rbp), %rdi
leaq -0xa90(%rbp), %rsi
callq 0x3110
movq %rax, -0x18f0(%rbp)
jmp 0x4012
movq -0x18f0(%rbp), %rdi
leaq -0x5f4(%rbp), %rsi
callq 0x3110
movq %rax, -0x18f8(%rbp)
jmp 0x402e
movq -0x18f8(%rbp), %rdi
leaq -0xa8c(%rbp), %rsi
callq 0x3110
movq %rax, -0x1900(%rbp)
jmp 0x404a
movq -0x1900(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3290
movb %al, -0x1901(%rbp)
jmp 0x4068
movb -0x1901(%rbp), %al
testb $0x1, %al
jne 0x4077
jmp 0x4111
leaq -0xcd8(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x30c0
jmp 0x408c
movl -0x3b4(%rbp), %edx
movl -0x3b8(%rbp), %ecx
movl -0x5f4(%rbp), %r8d
movl -0xa90(%rbp), %r9d
movl -0xa8c(%rbp), %esi
movq %rsp, %rax
movl %esi, (%rax)
leaq -0xe8(%rbp), %rdi
leaq -0xcd8(%rbp), %rsi
callq 0xb820
jmp 0x40c6
leaq -0xcd8(%rbp), %rdi
callq 0x3120
jmp 0x3fa2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4d17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
leaq -0xcd8(%rbp), %rdi
callq 0x3120
jmp 0x4d17
jmp 0x415a
movq 0x1aeb6(%rip), %rdi     # 0x1efd0
leaq 0x10fd0(%rip), %rsi     # 0x150f1
callq 0x31e0
movq %rax, -0x1910(%rbp)
jmp 0x412f
movq -0x1910(%rbp), %rdi
movq 0x1ae83(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0x4144
movl $0x1, -0x4(%rbp)
movl $0x1, -0x3e4(%rbp)
jmp 0x4c5a
leaq -0xee0(%rbp), %rdi
callq 0x3260
jmp 0x4168
leaq 0x10fa6(%rip), %rsi     # 0x15115
leaq -0xee0(%rbp), %rdi
movl $0x8, %edx
callq 0x3130
jmp 0x4182
leaq -0xee0(%rbp), %rdi
callq 0x32f0
movb %al, -0x1911(%rbp)
jmp 0x4196
movb -0x1911(%rbp), %al
testb $0x1, %al
jne 0x41a5
jmp 0x4318
jmp 0x41a7
leaq -0xee0(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x32a0
movq %rax, -0x1920(%rbp)
jmp 0x41c3
movq -0x1920(%rbp), %rdi
leaq -0x3b4(%rbp), %rsi
callq 0x3110
movq %rax, -0x1928(%rbp)
jmp 0x41df
movq -0x1928(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x3110
movq %rax, -0x1930(%rbp)
jmp 0x41fb
movq -0x1930(%rbp), %rdi
leaq -0xa90(%rbp), %rsi
callq 0x3110
movq %rax, -0x1938(%rbp)
jmp 0x4217
movq -0x1938(%rbp), %rdi
leaq -0x5f4(%rbp), %rsi
callq 0x3110
movq %rax, -0x1940(%rbp)
jmp 0x4233
movq -0x1940(%rbp), %rdi
leaq -0xa8c(%rbp), %rsi
callq 0x3110
movq %rax, -0x1948(%rbp)
jmp 0x424f
movq -0x1948(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3290
movb %al, -0x1949(%rbp)
jmp 0x426d
movb -0x1949(%rbp), %al
testb $0x1, %al
jne 0x427c
jmp 0x4316
leaq -0xf00(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x30c0
jmp 0x4291
movl -0x3b4(%rbp), %edx
movl -0x3b8(%rbp), %ecx
movl -0x5f4(%rbp), %r8d
movl -0xa90(%rbp), %r9d
movl -0xa8c(%rbp), %esi
movq %rsp, %rax
movl %esi, (%rax)
leaq -0xe8(%rbp), %rdi
leaq -0xf00(%rbp), %rsi
callq 0xba20
jmp 0x42cb
leaq -0xf00(%rbp), %rdi
callq 0x3120
jmp 0x41a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4d0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
leaq -0xf00(%rbp), %rdi
callq 0x3120
jmp 0x4d0b
jmp 0x435f
movq 0x1acb1(%rip), %rdi     # 0x1efd0
leaq 0x10e09(%rip), %rsi     # 0x1512f
callq 0x31e0
movq %rax, -0x1958(%rbp)
jmp 0x4334
movq -0x1958(%rbp), %rdi
movq 0x1ac7e(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0x4349
movl $0x1, -0x4(%rbp)
movl $0x1, -0x3e4(%rbp)
jmp 0x4c4e
leaq -0x1108(%rbp), %rdi
callq 0x3260
jmp 0x436d
leaq 0x10de4(%rip), %rsi     # 0x15158
leaq -0x1108(%rbp), %rdi
movl $0x8, %edx
callq 0x3130
jmp 0x4387
leaq -0x1108(%rbp), %rdi
callq 0x32f0
movb %al, -0x1959(%rbp)
jmp 0x439b
movb -0x1959(%rbp), %al
testb $0x1, %al
jne 0x43aa
jmp 0x45b6
jmp 0x43ac
leaq -0x1108(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x32a0
movq %rax, -0x1968(%rbp)
jmp 0x43c8
movq -0x1968(%rbp), %rdi
leaq -0x110c(%rbp), %rsi
callq 0x3110
movq %rax, -0x1970(%rbp)
jmp 0x43e4
movq -0x1970(%rbp), %rdi
leaq -0x5f4(%rbp), %rsi
callq 0x3110
movq %rax, -0x1978(%rbp)
jmp 0x4400
movq -0x1978(%rbp), %rdi
leaq -0x3bc(%rbp), %rsi
callq 0x3110
movq %rax, -0x1980(%rbp)
jmp 0x441c
movq -0x1980(%rbp), %rdi
leaq -0x1110(%rbp), %rsi
callq 0x3110
movq %rax, -0x1988(%rbp)
jmp 0x4438
movq -0x1988(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x3110
movq %rax, -0x1990(%rbp)
jmp 0x4454
movq -0x1990(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3290
movb %al, -0x1991(%rbp)
jmp 0x4472
movb -0x1991(%rbp), %al
testb $0x1, %al
jne 0x4481
jmp 0x45b4
leaq -0x1130(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x30c0
jmp 0x4496
movl -0x110c(%rbp), %edx
movl -0x5f4(%rbp), %ecx
movl -0x3bc(%rbp), %r8d
movl -0x1110(%rbp), %r9d
movl -0x3b8(%rbp), %esi
movq %rsp, %rax
movl %esi, (%rax)
leaq -0x188(%rbp), %rdi
leaq -0x1130(%rbp), %rsi
callq 0xef40
jmp 0x44d0
leaq -0x1130(%rbp), %rdi
callq 0x3120
movq 0x1aaed(%rip), %rdi     # 0x1efd0
leaq 0x10c81(%rip), %rsi     # 0x1516b
callq 0x31e0
movq %rax, -0x19a0(%rbp)
jmp 0x44f8
movq -0x19a0(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x31b0
movq %rax, -0x19a8(%rbp)
jmp 0x4514
movq -0x19a8(%rbp), %rdi
movq 0x1aa9e(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0x4529
movq 0x1aaa0(%rip), %rdi     # 0x1efd0
leaq 0x10c42(%rip), %rsi     # 0x15179
callq 0x31e0
movq %rax, -0x19b0(%rbp)
jmp 0x4545
movq -0x19b0(%rbp), %rdi
movl -0x5f4(%rbp), %esi
callq 0x3320
movq %rax, -0x19b8(%rbp)
jmp 0x4560
movq -0x19b8(%rbp), %rdi
movq 0x1aa52(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0x4575
jmp 0x43ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4cff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
leaq -0x1130(%rbp), %rdi
callq 0x3120
jmp 0x4cff
jmp 0x45fd
movq 0x1aa13(%rip), %rdi     # 0x1efd0
leaq 0x10bc3(%rip), %rsi     # 0x15187
callq 0x31e0
movq %rax, -0x19c0(%rbp)
jmp 0x45d2
movq -0x19c0(%rbp), %rdi
movq 0x1a9e0(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0x45e7
movl $0x1, -0x4(%rbp)
movl $0x1, -0x3e4(%rbp)
jmp 0x4c42
leaq -0x1338(%rbp), %rdi
callq 0x3260
jmp 0x460b
leaq 0x10b97(%rip), %rsi     # 0x151a9
leaq -0x1338(%rbp), %rdi
movl $0x8, %edx
callq 0x3130
jmp 0x4625
leaq -0x1338(%rbp), %rdi
callq 0x32f0
movb %al, -0x19c1(%rbp)
jmp 0x4639
movb -0x19c1(%rbp), %al
testb $0x1, %al
jne 0x4648
jmp 0x47bb
jmp 0x464a
leaq -0x1338(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x32a0
movq %rax, -0x19d0(%rbp)
jmp 0x4666
movq -0x19d0(%rbp), %rdi
leaq -0x110c(%rbp), %rsi
callq 0x3110
movq %rax, -0x19d8(%rbp)
jmp 0x4682
movq -0x19d8(%rbp), %rdi
leaq -0x5f4(%rbp), %rsi
callq 0x3110
movq %rax, -0x19e0(%rbp)
jmp 0x469e
movq -0x19e0(%rbp), %rdi
leaq -0x3bc(%rbp), %rsi
callq 0x3110
movq %rax, -0x19e8(%rbp)
jmp 0x46ba
movq -0x19e8(%rbp), %rdi
leaq -0x1110(%rbp), %rsi
callq 0x3110
movq %rax, -0x19f0(%rbp)
jmp 0x46d6
movq -0x19f0(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x3110
movq %rax, -0x19f8(%rbp)
jmp 0x46f2
movq -0x19f8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3290
movb %al, -0x19f9(%rbp)
jmp 0x4710
movb -0x19f9(%rbp), %al
testb $0x1, %al
jne 0x471f
jmp 0x47b9
leaq -0x1358(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x30c0
jmp 0x4734
movl -0x110c(%rbp), %edx
movl -0x5f4(%rbp), %ecx
movl -0x3bc(%rbp), %r8d
movl -0x1110(%rbp), %r9d
movl -0x3b8(%rbp), %esi
movq %rsp, %rax
movl %esi, (%rax)
leaq -0x188(%rbp), %rdi
leaq -0x1358(%rbp), %rsi
callq 0xf030
jmp 0x476e
leaq -0x1358(%rbp), %rdi
callq 0x3120
jmp 0x464a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4cf3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
leaq -0x1358(%rbp), %rdi
callq 0x3120
jmp 0x4cf3
jmp 0x4802
movq 0x1a80e(%rip), %rdi     # 0x1efd0
leaq 0x109f8(%rip), %rsi     # 0x151c1
callq 0x31e0
movq %rax, -0x1a08(%rbp)
jmp 0x47d7
movq -0x1a08(%rbp), %rdi
movq 0x1a7db(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0x47ec
movl $0x1, -0x4(%rbp)
movl $0x1, -0x3e4(%rbp)
jmp 0x4c36
leaq -0x1560(%rbp), %rdi
callq 0x3260
jmp 0x4810
leaq 0x109d1(%rip), %rsi     # 0x151e8
leaq -0x1560(%rbp), %rdi
movl $0x8, %edx
callq 0x3130
jmp 0x482a
leaq -0x1560(%rbp), %rdi
callq 0x32f0
movb %al, -0x1a09(%rbp)
jmp 0x483e
movb -0x1a09(%rbp), %al
testb $0x1, %al
jne 0x484d
jmp 0x49c0
jmp 0x484f
leaq -0x1560(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x32a0
movq %rax, -0x1a18(%rbp)
jmp 0x486b
movq -0x1a18(%rbp), %rdi
leaq -0x110c(%rbp), %rsi
callq 0x3110
movq %rax, -0x1a20(%rbp)
jmp 0x4887
movq -0x1a20(%rbp), %rdi
leaq -0x5f4(%rbp), %rsi
callq 0x3110
movq %rax, -0x1a28(%rbp)
jmp 0x48a3
movq -0x1a28(%rbp), %rdi
leaq -0x3bc(%rbp), %rsi
callq 0x3110
movq %rax, -0x1a30(%rbp)
jmp 0x48bf
movq -0x1a30(%rbp), %rdi
leaq -0x1110(%rbp), %rsi
callq 0x3110
movq %rax, -0x1a38(%rbp)
jmp 0x48db
movq -0x1a38(%rbp), %rdi
leaq -0x3b8(%rbp), %rsi
callq 0x3110
movq %rax, -0x1a40(%rbp)
jmp 0x48f7
movq -0x1a40(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3290
movb %al, -0x1a41(%rbp)
jmp 0x4915
movb -0x1a41(%rbp), %al
testb $0x1, %al
jne 0x4924
jmp 0x49be
leaq -0x1580(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x30c0
jmp 0x4939
movl -0x110c(%rbp), %edx
movl -0x5f4(%rbp), %ecx
movl -0x3bc(%rbp), %r8d
movl -0x1110(%rbp), %r9d
movl -0x3b8(%rbp), %esi
movq %rsp, %rax
movl %esi, (%rax)
leaq -0x188(%rbp), %rdi
leaq -0x1580(%rbp), %rsi
callq 0xf120
jmp 0x4973
leaq -0x1580(%rbp), %rdi
callq 0x3120
jmp 0x484f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4ce7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
leaq -0x1580(%rbp), %rdi
callq 0x3120
jmp 0x4ce7
jmp 0x4a07
movq 0x1a609(%rip), %rdi     # 0x1efd0
leaq 0x1082d(%rip), %rsi     # 0x151fb
callq 0x31e0
movq %rax, -0x1a50(%rbp)
jmp 0x49dc
movq -0x1a50(%rbp), %rdi
movq 0x1a5d6(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0x49f1
movl $0x1, -0x4(%rbp)
movl $0x1, -0x3e4(%rbp)
jmp 0x4c2a
leaq -0x1788(%rbp), %rdi
callq 0x3260
jmp 0x4a15
leaq 0x10801(%rip), %rsi     # 0x1521d
leaq -0x1788(%rbp), %rdi
movl $0x8, %edx
callq 0x3130
jmp 0x4a2f
leaq -0x1788(%rbp), %rdi
callq 0x32f0
movb %al, -0x1a51(%rbp)
jmp 0x4a43
movb -0x1a51(%rbp), %al
testb $0x1, %al
jne 0x4a52
jmp 0x4bc2
jmp 0x4a54
leaq -0x1788(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x32a0
movq %rax, -0x1a60(%rbp)
jmp 0x4a70
movq -0x1a60(%rbp), %rdi
leaq -0x110c(%rbp), %rsi
callq 0x3110
movq %rax, -0x1a68(%rbp)
jmp 0x4a8c
movq -0x1a68(%rbp), %rdi
leaq -0xa90(%rbp), %rsi
callq 0x3110
movq %rax, -0x1a70(%rbp)
jmp 0x4aa8
movq -0x1a70(%rbp), %rdi
leaq -0x5f4(%rbp), %rsi
callq 0x3110
movq %rax, -0x1a78(%rbp)
jmp 0x4ac4
movq -0x1a78(%rbp), %rdi
leaq -0x1110(%rbp), %rsi
callq 0x3110
movq %rax, -0x1a80(%rbp)
jmp 0x4ae0
movq -0x1a80(%rbp), %rdi
leaq -0x178c(%rbp), %rsi
callq 0x3110
movq %rax, -0x1a88(%rbp)
jmp 0x4afc
movq -0x1a88(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3290
movb %al, -0x1a89(%rbp)
jmp 0x4b1a
movb -0x1a89(%rbp), %al
testb $0x1, %al
jne 0x4b29
jmp 0x4bc0
leaq -0x17b0(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x30c0
jmp 0x4b3e
movl -0x110c(%rbp), %edx
movl -0xa90(%rbp), %ecx
movl -0x5f4(%rbp), %r8d
movl -0x1110(%rbp), %r9d
movl -0x178c(%rbp), %esi
movq %rsp, %rax
movl %esi, (%rax)
leaq -0x68(%rbp), %rdi
leaq -0x17b0(%rbp), %rsi
callq 0x12e40
jmp 0x4b75
leaq -0x17b0(%rbp), %rdi
callq 0x3120
jmp 0x4a54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
jmp 0x4cdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
leaq -0x17b0(%rbp), %rdi
callq 0x3120
jmp 0x4cdb
jmp 0x4c06
movq 0x1a407(%rip), %rdi     # 0x1efd0
leaq 0x1062b(%rip), %rsi     # 0x151fb
callq 0x31e0
movq %rax, -0x1a98(%rbp)
jmp 0x4bde
movq -0x1a98(%rbp), %rdi
movq 0x1a3d4(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0x4bf3
movl $0x1, -0x4(%rbp)
movl $0x1, -0x3e4(%rbp)
jmp 0x4c1e
leaq -0x188(%rbp), %rdi
callq 0x10360
jmp 0x4c14
movl $0x0, -0x3e4(%rbp)
leaq -0x1788(%rbp), %rdi
callq 0x3060
leaq -0x1560(%rbp), %rdi
callq 0x3060
leaq -0x1338(%rbp), %rdi
callq 0x3060
leaq -0x1108(%rbp), %rdi
callq 0x3060
leaq -0xee0(%rbp), %rdi
callq 0x3060
leaq -0xcb8(%rbp), %rdi
callq 0x3060
leaq -0xa88(%rbp), %rdi
callq 0x3060
leaq -0x840(%rbp), %rdi
callq 0x3120
leaq -0x820(%rbp), %rdi
callq 0x3060
leaq -0x5f0(%rbp), %rdi
callq 0x3060
leaq -0x3b0(%rbp), %rdi
callq 0x3120
leaq -0x390(%rbp), %rdi
callq 0x3060
leaq -0x188(%rbp), %rdi
callq 0x11660
leaq -0xe8(%rbp), %rdi
callq 0xb4a0
leaq -0x68(%rbp), %rdi
callq 0x12dc0
movl -0x4(%rbp), %eax
addq $0x1aa0, %rsp           # imm = 0x1AA0
popq %rbp
retq
leaq -0x1788(%rbp), %rdi
callq 0x3060
leaq -0x1560(%rbp), %rdi
callq 0x3060
leaq -0x1338(%rbp), %rdi
callq 0x3060
leaq -0x1108(%rbp), %rdi
callq 0x3060
leaq -0xee0(%rbp), %rdi
callq 0x3060
leaq -0xcb8(%rbp), %rdi
callq 0x3060
leaq -0xa88(%rbp), %rdi
callq 0x3060
leaq -0x840(%rbp), %rdi
callq 0x3120
leaq -0x820(%rbp), %rdi
callq 0x3060
leaq -0x5f0(%rbp), %rdi
callq 0x3060
leaq -0x3b0(%rbp), %rdi
callq 0x3120
leaq -0x390(%rbp), %rdi
callq 0x3060
leaq -0x188(%rbp), %rdi
callq 0x11660
leaq -0xe8(%rbp), %rdi
callq 0xb4a0
leaq -0x68(%rbp), %rdi
callq 0x12dc0
movq -0xf0(%rbp), %rdi
callq 0x3330
nopl (%rax,%rax)