// File: m-wiesner[P]Jotto/Jotto.cpp
// Function: main
int main(int argc, char** argv)
{
    string path_to_dict = "./text_files/wordlist.txt";
    char read_rules;
    char play_to_end;
    int level;
    cout << "========================================";
    cout << "========================================" << endl;
    cout << "                                !!  JOTTO  !!";
    cout << "                                " << endl;
    cout << "========================================";
    cout << "========================================" << endl;

    cout << "Do you want to read the rules? (y)/(n)";
    do
    {   if (!(cin >> read_rules))
        {
            exit (0);
        }
    } while ((read_rules != 'y' && read_rules != 'n') && (cout << "Enter (y) or (n)."));
    
    if (read_rules == 'y')
    {
        print_intro();      
    }



    cout << endl << endl << endl;
    cout << "========================================";
    cout << "========================================" << endl;
    cout << "                                !! START GAME !!";
    cout << "                                " << endl;
    

    print_level();
    do
    {
        if(!(cin >> level))
        {
            exit(0);
        }
        cout << "LEVEL: " << level << endl;
    } while (((level != 1) && (level != 2) && (level !=3)) && (cout << "Enter a level (1-3)"));
    


    // Default names
    string name1 = "AI1";
    string name2 = "AI2";

    srand((int)time(0));
    Guesser *g1;
    Guesser *g2;
  
    g1 = new ManualGuesser(name1, path_to_dict); 
    //switch (level)
    //{
    //    case 0: cout << "Enter your name: ";
    //            cin >> name1;
    //            g1 = new ManualGuesser(name1, path_to_dict);
    //            break;
    //    case 1: g1 = new Guesser(name1, path_to_dict); break;
    //    case 2: g1 = new RandomGuesser(name1, path_to_dict); break;
    //    case 3: g1 = new MaxinfoGuesser(name1, path_to_dict); break;
    //}

    switch (level)
    {
        case 0: cout << "Enter your name: ";
                cin >> name1;
                g2 = new ManualGuesser(name1, path_to_dict);
                break;
        case 1: g2 = new Guesser(name2, path_to_dict); break;
        case 2: g2 = new RandomGuesser(name2, path_to_dict); break;
        case 3: g2 = new MaxinfoGuesser(name2, path_to_dict); break;
    }

    ScoreKeeper sk(g1, g2);
  
    clear_screen(3); 
   
    int turnnumber = 1; 
    cout << " ========= Turn " << turnnumber << " ============== " << endl;
    while (sk.give_turn_to(g1) && sk.give_turn_to(g2))
    {
        clear_screen(3);
        cout << " ========= Turn " << turnnumber << " ============== " << endl;
        g1->update();
        g2->update();
        ++turnnumber;
    }

    cout << "Do you want to keep guessing? (y)/(n)";
    do
    {   if(!(cin >> play_to_end))
        {
            cout << "Codeword were ..." << endl;
            sk.print_codewords();
            exit(0);
        }
    } while ((play_to_end != 'y' && play_to_end != 'n') && (cout << "Enter (y) or (n)."));
    
    if (play_to_end == 'y')
    {
        while(sk.give_turn_to(g1))
        {
            clear_screen(3);
            cout << " ========= Turn " << turnnumber << " ============== " << endl;
            g1->update();
            ++turnnumber;
        }
    } 
    else
    {
        cout << "Codewords were ..." << endl;
        sk.print_codewords();
    } 
    delete g1;
    delete g2;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x3470
movq -0xf0(%rbp), %rdx
leaq 0x989d(%rip), %rsi      # 0xd014
leaq -0x30(%rbp), %rdi
callq 0x4800
jmp 0x3782
leaq -0x31(%rbp), %rdi
callq 0x3320
movq 0x10836(%rip), %rdi     # 0x13fc8
leaq 0x9895(%rip), %rsi      # 0xd02e
callq 0x32a0
jmp 0x37a0
movq 0x10821(%rip), %rdi     # 0x13fc8
leaq 0x9880(%rip), %rsi      # 0xd02e
callq 0x32a0
movq %rax, -0xf8(%rbp)
jmp 0x37bc
movq -0xf8(%rbp), %rdi
movq 0x107ee(%rip), %rsi     # 0x13fb8
callq 0x32f0
jmp 0x37d1
movq 0x107f0(%rip), %rdi     # 0x13fc8
leaq 0x9878(%rip), %rsi      # 0xd057
callq 0x32a0
jmp 0x37e6
movq 0x107db(%rip), %rdi     # 0x13fc8
leaq 0x9891(%rip), %rsi      # 0xd085
callq 0x32a0
movq %rax, -0x100(%rbp)
jmp 0x3802
movq -0x100(%rbp), %rdi
movq 0x107a8(%rip), %rsi     # 0x13fb8
callq 0x32f0
jmp 0x3817
movq 0x107aa(%rip), %rdi     # 0x13fc8
leaq 0x9809(%rip), %rsi      # 0xd02e
callq 0x32a0
jmp 0x382c
movq 0x10795(%rip), %rdi     # 0x13fc8
leaq 0x97f4(%rip), %rsi      # 0xd02e
callq 0x32a0
movq %rax, -0x108(%rbp)
jmp 0x3848
movq -0x108(%rbp), %rdi
movq 0x10762(%rip), %rsi     # 0x13fb8
callq 0x32f0
jmp 0x385d
movq 0x10764(%rip), %rdi     # 0x13fc8
leaq 0x983b(%rip), %rsi      # 0xd0a6
callq 0x32a0
jmp 0x3872
jmp 0x3874
movq 0x10765(%rip), %rdi     # 0x13fe0
leaq -0x45(%rbp), %rsi
callq 0x33d0
movq %rax, -0x110(%rbp)
jmp 0x388d
movq -0x110(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3140
movb %al, -0x111(%rbp)
jmp 0x38ab
movb -0x111(%rbp), %al
testb $0x1, %al
jne 0x38b7
jmp 0x38e9
xorl %edi, %edi
callq 0x3370
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x3320
jmp 0x4314
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x430b
jmp 0x38eb
movsbl -0x45(%rbp), %ecx
xorl %eax, %eax
cmpl $0x79, %ecx
movb %al, -0x112(%rbp)
je 0x3955
movsbl -0x45(%rbp), %ecx
xorl %eax, %eax
cmpl $0x6e, %ecx
movb %al, -0x112(%rbp)
je 0x3955
movq 0x106b4(%rip), %rdi     # 0x13fc8
leaq 0x97b2(%rip), %rsi      # 0xd0cd
callq 0x32a0
movq %rax, -0x120(%rbp)
jmp 0x3929
movq -0x120(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x33a0
movb %al, -0x121(%rbp)
jmp 0x3947
movb -0x121(%rbp), %al
movb %al, -0x112(%rbp)
jmp 0x3955
movb -0x112(%rbp), %al
testb $0x1, %al
jne 0x3874
movsbl -0x45(%rbp), %eax
cmpl $0x79, %eax
jne 0x3975
callq 0x4320
jmp 0x3973
jmp 0x3975
movq 0x1064c(%rip), %rdi     # 0x13fc8
movq 0x10635(%rip), %rsi     # 0x13fb8
callq 0x32f0
movq %rax, -0x130(%rbp)
jmp 0x3991
movq -0x130(%rbp), %rdi
movq 0x10619(%rip), %rsi     # 0x13fb8
callq 0x32f0
movq %rax, -0x138(%rbp)
jmp 0x39ad
movq -0x138(%rbp), %rdi
movq 0x105fd(%rip), %rsi     # 0x13fb8
callq 0x32f0
jmp 0x39c2
movq 0x105ff(%rip), %rdi     # 0x13fc8
leaq 0x965e(%rip), %rsi      # 0xd02e
callq 0x32a0
jmp 0x39d7
movq 0x105ea(%rip), %rdi     # 0x13fc8
leaq 0x9649(%rip), %rsi      # 0xd02e
callq 0x32a0
movq %rax, -0x140(%rbp)
jmp 0x39f3
movq -0x140(%rbp), %rdi
movq 0x105b7(%rip), %rsi     # 0x13fb8
callq 0x32f0
jmp 0x3a08
movq 0x105b9(%rip), %rdi     # 0x13fc8
leaq 0x96c9(%rip), %rsi      # 0xd0df
callq 0x32a0
jmp 0x3a1d
movq 0x105a4(%rip), %rdi     # 0x13fc8
leaq 0x965a(%rip), %rsi      # 0xd085
callq 0x32a0
movq %rax, -0x148(%rbp)
jmp 0x3a39
movq -0x148(%rbp), %rdi
movq 0x10571(%rip), %rsi     # 0x13fb8
callq 0x32f0
jmp 0x3a4e
callq 0x4690
jmp 0x3a55
jmp 0x3a57
movq 0x10582(%rip), %rdi     # 0x13fe0
leaq -0x4c(%rbp), %rsi
callq 0x3180
movq %rax, -0x150(%rbp)
jmp 0x3a70
movq -0x150(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3140
movb %al, -0x151(%rbp)
jmp 0x3a8e
movb -0x151(%rbp), %al
testb $0x1, %al
jne 0x3a9a
jmp 0x3aa1
xorl %edi, %edi
callq 0x3370
movq 0x10520(%rip), %rdi     # 0x13fc8
leaq 0x9661(%rip), %rsi      # 0xd110
callq 0x32a0
movq %rax, -0x160(%rbp)
jmp 0x3abd
movq -0x160(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0x3450
movq %rax, -0x168(%rbp)
jmp 0x3ad5
movq -0x168(%rbp), %rdi
movq 0x104d5(%rip), %rsi     # 0x13fb8
callq 0x32f0
jmp 0x3aea
jmp 0x3aec
xorl %eax, %eax
cmpl $0x1, -0x4c(%rbp)
movb %al, -0x169(%rbp)
je 0x3b5e
xorl %eax, %eax
cmpl $0x2, -0x4c(%rbp)
movb %al, -0x169(%rbp)
je 0x3b5e
xorl %eax, %eax
cmpl $0x3, -0x4c(%rbp)
movb %al, -0x169(%rbp)
je 0x3b5e
movq 0x104ab(%rip), %rdi     # 0x13fc8
leaq 0x95f4(%rip), %rsi      # 0xd118
callq 0x32a0
movq %rax, -0x178(%rbp)
jmp 0x3b32
movq -0x178(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x33a0
movb %al, -0x179(%rbp)
jmp 0x3b50
movb -0x179(%rbp), %al
movb %al, -0x169(%rbp)
jmp 0x3b5e
movb -0x169(%rbp), %al
testb $0x1, %al
jne 0x3a57
leaq -0x71(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x3470
movq -0x188(%rbp), %rdx
leaq 0x95a2(%rip), %rsi      # 0xd12c
leaq -0x70(%rbp), %rdi
callq 0x4800
jmp 0x3b95
leaq -0x71(%rbp), %rdi
callq 0x3320
leaq -0x99(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x3470
movq -0x190(%rbp), %rdx
leaq 0x9571(%rip), %rsi      # 0xd130
leaq -0x98(%rbp), %rdi
callq 0x4800
jmp 0x3bcd
leaq -0x99(%rbp), %rdi
callq 0x3320
xorl %eax, %eax
movl %eax, %edi
callq 0x3280
movl %eax, %edi
callq 0x3290
movl $0x58, %edi
callq 0x32b0
movq %rax, -0x198(%rbp)
jmp 0x3bfc
movq -0x198(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x9410
jmp 0x3c12
movq -0x198(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl -0x4c(%rbp), %eax
movq %rax, -0x1a0(%rbp)
subq $0x3, %rax
ja 0x3e5a
movq -0x1a0(%rbp), %rax
leaq 0x93c2(%rip), %rcx      # 0xd004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x71(%rbp), %rdi
callq 0x3320
jmp 0x430b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x99(%rbp), %rdi
callq 0x3320
jmp 0x4302
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x42f6
movq -0x198(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x58, %esi
callq 0x32c0
jmp 0x42f6
movq 0x1030c(%rip), %rdi     # 0x13fc8
leaq 0x9471(%rip), %rsi      # 0xd134
callq 0x32a0
jmp 0x3cca
movq 0x1030f(%rip), %rdi     # 0x13fe0
leaq -0x70(%rbp), %rsi
callq 0x33b0
jmp 0x3cdc
movl $0x58, %edi
callq 0x32b0
movq %rax, -0x1a8(%rbp)
jmp 0x3cef
movq -0x1a8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x9410
jmp 0x3d05
movq -0x1a8(%rbp), %rax
movq %rax, -0xb0(%rbp)
jmp 0x3e5a
movq -0x1a8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x58, %esi
callq 0x32c0
jmp 0x42f6
movl $0x58, %edi
callq 0x32b0
movq %rax, -0x1b0(%rbp)
jmp 0x3d4d
movq -0x1b0(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x7be0
jmp 0x3d66
movq -0x1b0(%rbp), %rax
movq %rax, -0xb0(%rbp)
jmp 0x3e5a
movq -0x1b0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x58, %esi
callq 0x32c0
jmp 0x42f6
movl $0x58, %edi
callq 0x32b0
movq %rax, -0x1b8(%rbp)
jmp 0x3dae
movq -0x1b8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x99f0
jmp 0x3dc7
movq -0x1b8(%rbp), %rax
movq %rax, -0xb0(%rbp)
jmp 0x3e5a
movq -0x1b8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x58, %esi
callq 0x32c0
jmp 0x42f6
movl $0x58, %edi
callq 0x32b0
movq %rax, -0x1c0(%rbp)
jmp 0x3e0f
movq -0x1c0(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0xa1c0
jmp 0x3e28
movq -0x1c0(%rbp), %rax
movq %rax, -0xb0(%rbp)
jmp 0x3e5a
movq -0x1c0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x58, %esi
callq 0x32c0
jmp 0x42f6
movq -0xa8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq -0xe0(%rbp), %rdi
callq 0xa610
jmp 0x3e76
movl $0x3, %edi
callq 0x47c0
jmp 0x3e82
movl $0x1, -0xe4(%rbp)
movq 0x10135(%rip), %rdi     # 0x13fc8
leaq 0x92ac(%rip), %rsi      # 0xd146
callq 0x32a0
movq %rax, -0x1c8(%rbp)
jmp 0x3ea8
movq -0x1c8(%rbp), %rdi
movl -0xe4(%rbp), %esi
callq 0x3450
movq %rax, -0x1d0(%rbp)
jmp 0x3ec3
movq -0x1d0(%rbp), %rdi
leaq 0x9286(%rip), %rsi      # 0xd157
callq 0x32a0
movq %rax, -0x1d8(%rbp)
jmp 0x3edf
movq -0x1d8(%rbp), %rdi
movq 0x100cb(%rip), %rsi     # 0x13fb8
callq 0x32f0
jmp 0x3ef4
jmp 0x3ef6
movq -0xa8(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0xa7e0
movb %al, -0x1d9(%rbp)
jmp 0x3f11
movb -0x1d9(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x1da(%rbp)
jne 0x3f26
jmp 0x3f4f
movq -0xb0(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0xa7e0
movb %al, -0x1db(%rbp)
jmp 0x3f41
movb -0x1db(%rbp), %al
movb %al, -0x1da(%rbp)
jmp 0x3f4f
movb -0x1da(%rbp), %al
testb $0x1, %al
jne 0x3f5e
jmp 0x4027
movl $0x3, %edi
callq 0x47c0
jmp 0x3f6a
movq 0x10057(%rip), %rdi     # 0x13fc8
leaq 0x91ce(%rip), %rsi      # 0xd146
callq 0x32a0
movq %rax, -0x1e8(%rbp)
jmp 0x3f86
movq -0x1e8(%rbp), %rdi
movl -0xe4(%rbp), %esi
callq 0x3450
movq %rax, -0x1f0(%rbp)
jmp 0x3fa1
movq -0x1f0(%rbp), %rdi
leaq 0x91a8(%rip), %rsi      # 0xd157
callq 0x32a0
movq %rax, -0x1f8(%rbp)
jmp 0x3fbd
movq -0x1f8(%rbp), %rdi
movq 0xffed(%rip), %rsi      # 0x13fb8
callq 0x32f0
jmp 0x3fd2
movq -0xa8(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x3fe4
movq -0xb0(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x3ff6
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x3ef6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x4900
jmp 0x42f6
movq 0xff9a(%rip), %rdi      # 0x13fc8
leaq 0x9133(%rip), %rsi      # 0xd168
callq 0x32a0
jmp 0x403c
jmp 0x403e
movq 0xff9b(%rip), %rdi      # 0x13fe0
leaq -0x46(%rbp), %rsi
callq 0x33d0
movq %rax, -0x200(%rbp)
jmp 0x4057
movq -0x200(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3140
movb %al, -0x201(%rbp)
jmp 0x4075
movb -0x201(%rbp), %al
testb $0x1, %al
jne 0x4081
jmp 0x40c7
movq 0xff40(%rip), %rdi      # 0x13fc8
leaq 0x90ff(%rip), %rsi      # 0xd18e
callq 0x32a0
movq %rax, -0x210(%rbp)
jmp 0x409d
movq -0x210(%rbp), %rdi
movq 0xff0d(%rip), %rsi      # 0x13fb8
callq 0x32f0
jmp 0x40b2
leaq -0xe0(%rbp), %rdi
callq 0xabd0
jmp 0x40c0
xorl %edi, %edi
callq 0x3370
jmp 0x40c9
movsbl -0x46(%rbp), %ecx
xorl %eax, %eax
cmpl $0x79, %ecx
movb %al, -0x211(%rbp)
je 0x4133
movsbl -0x46(%rbp), %ecx
xorl %eax, %eax
cmpl $0x6e, %ecx
movb %al, -0x211(%rbp)
je 0x4133
movq 0xfed6(%rip), %rdi      # 0x13fc8
leaq 0x8fd4(%rip), %rsi      # 0xd0cd
callq 0x32a0
movq %rax, -0x220(%rbp)
jmp 0x4107
movq -0x220(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x33a0
movb %al, -0x221(%rbp)
jmp 0x4125
movb -0x221(%rbp), %al
movb %al, -0x211(%rbp)
jmp 0x4133
movb -0x211(%rbp), %al
testb $0x1, %al
jne 0x403e
movsbl -0x46(%rbp), %eax
cmpl $0x79, %eax
jne 0x4216
jmp 0x4150
movq -0xa8(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0xa7e0
movb %al, -0x222(%rbp)
jmp 0x416b
movb -0x222(%rbp), %al
testb $0x1, %al
jne 0x417a
jmp 0x4214
movl $0x3, %edi
callq 0x47c0
jmp 0x4186
movq 0xfe3b(%rip), %rdi      # 0x13fc8
leaq 0x8fb2(%rip), %rsi      # 0xd146
callq 0x32a0
movq %rax, -0x230(%rbp)
jmp 0x41a2
movq -0x230(%rbp), %rdi
movl -0xe4(%rbp), %esi
callq 0x3450
movq %rax, -0x238(%rbp)
jmp 0x41bd
movq -0x238(%rbp), %rdi
leaq 0x8f8c(%rip), %rsi      # 0xd157
callq 0x32a0
movq %rax, -0x240(%rbp)
jmp 0x41d9
movq -0x240(%rbp), %rdi
movq 0xfdd1(%rip), %rsi      # 0x13fb8
callq 0x32f0
jmp 0x41ee
movq -0xa8(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x4200
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x4150
jmp 0x4257
movq 0xfdab(%rip), %rdi      # 0x13fc8
leaq 0x8f7c(%rip), %rsi      # 0xd1a0
callq 0x32a0
movq %rax, -0x248(%rbp)
jmp 0x4232
movq -0x248(%rbp), %rdi
movq 0xfd78(%rip), %rsi      # 0x13fb8
callq 0x32f0
jmp 0x4247
leaq -0xe0(%rbp), %rdi
callq 0xabd0
jmp 0x4255
jmp 0x4257
movq -0xa8(%rbp), %rax
movq %rax, -0x250(%rbp)
cmpq $0x0, %rax
je 0x4288
movq -0x250(%rbp), %rdi
callq 0x48b0
movq -0x250(%rbp), %rdi
movl $0x58, %esi
callq 0x32c0
movq -0xb0(%rbp), %rax
movq %rax, -0x258(%rbp)
cmpq $0x0, %rax
je 0x42b9
movq -0x258(%rbp), %rdi
callq 0x48b0
movq -0x258(%rbp), %rdi
movl $0x58, %esi
callq 0x32c0
movl $0x0, -0x4(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x4900
leaq -0x98(%rbp), %rdi
callq 0x3190
leaq -0x70(%rbp), %rdi
callq 0x3190
leaq -0x30(%rbp), %rdi
callq 0x3190
movl -0x4(%rbp), %eax
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
leaq -0x98(%rbp), %rdi
callq 0x3190
leaq -0x70(%rbp), %rdi
callq 0x3190
leaq -0x30(%rbp), %rdi
callq 0x3190
movq -0x40(%rbp), %rdi
callq 0x3460
nopl (%rax)