// File: saumya-prakash[P]AssemblerEmulator/emu.cpp
// Function: main
int main(int argc, char** argv)
{
    cout<<unitbuf;
    cin.tie(&cout);

    if(argc==1)
    {
        cout<<"No input file specified"<<endl;
        return EXIT_FAILURE;
    }

    Emulator e1(argv[1]);

    int loading = e1.loader();

    if(loading)
        cout<<"Object file loaded successfully"<<endl<<endl;
    
    else
    {
        cout<<"Error in loading object file"<<endl;
        cout<<"Process terminated"<<endl;
        return EXIT_FAILURE;
    }

    print_options();
    cout<<endl;

    char c;     // interact with the user
    do
    {
        cin>>c;

        switch(c)
        {
            case 'a':       // execute all instructions in one go
                        if(e1.get_program_status()==-1)     // program in fault state
                        {
                            cout<<e1.get_fault_cause()<<endl<<endl;
                            break;
                        }

                        if(e1.get_program_status()==0)
                        {
                            cout<<"Program finished execution"<<endl<<endl;
                            break;
                        }
                        
                        while(e1.get_program_status()==1)
                            e1.execute();
                        
                        if(e1.get_program_status()==-1)     // program in fault state after completing execution
                        {
                            cout<<e1.get_fault_cause()<<endl<<endl;
                            break;
                        }

                        cout<<"Total instructions executed = "<<e1.instructions_executed()<<endl;
                        cout<<endl;
                        break;


            case 't':       // execute a single instruction with trace
                        if(e1.get_program_status()==-1)
                        {
                            cout<<e1.get_fault_cause()<<endl;
                            cout<<endl;
                            break;
                        }

                        if(e1.get_program_status()==0)
                        {   cout<<"Program finished execution"<<endl;
                            cout<<endl;
                            break;
                        }

                        cout<<e1.execute()<<endl;
                        cout<<endl;
                        break;

            case 's':   // execute all instrutions with trace
                        if(e1.get_program_status()==-1)     // program in fault state
                        {
                            cout<<e1.get_fault_cause()<<endl<<endl;
                            break;
                        }

                        if(e1.get_program_status()==0)
                        {
                            cout<<"Program finished execution"<<endl<<endl;
                            break;
                        }
                        

                        while(e1.get_program_status()==1)
                            cout<<e1.execute()<<endl;
                        cout<<endl;
                
                        cout<<"Total instructions executed = "<<e1.instructions_executed()<<endl;
                        cout<<endl;
                        break;


            case 'n':       // print specified number of instructions
                        {
                            int a = 0;
                            cin>>a;
                            int i = 0;
                            while(i<a && e1.get_program_status()==1)
                            {
                                i++;
                                cout<<e1.execute()<<endl;
                            }
                            cout<<endl;
                        }
                        
                        break;

            case 'q':       // show current architectural state
                        cout<<e1.current_state()<<endl;
                        cout<<endl;
                        break;
                        

            case 'u':       // disassemble
                        e1.disassemble(cout);
                        cout<<endl;
                        break;



            case 'd':       // outputs memory dump
                        e1.memory_dump(cout);
                        break; 


            case 'c':   // number of instructions executed thus far
                        cout<<"Number of instructions executed = "<<e1.instructions_executed()<<endl;
                        cout<<endl;
                        break;

            case 'x':       // QUIT
                        cout<<"Emulation terminated"<<endl;
                        cout<<endl;
                        break;

                        
            default:    cout<<"Invalid option"<<endl;
                        print_options();
                        cout<<endl;

                        continue;
                        break;
        }


    } while (c!='x');
    

    cout<<nounitbuf;
    return EXIT_SUCCESS;
}

// Assembly:
subq $0x358, %rsp            # imm = 0x358
movl $0x0, 0x354(%rsp)
movl %edi, 0x350(%rsp)
movq %rsi, 0x348(%rsp)
movq 0xa898(%rip), %rdi      # 0xdfd0
leaq 0xd11(%rip), %rsi       # 0x4450
callq 0x20b0
movq 0xa895(%rip), %rax      # 0xdfe0
movq (%rax), %rax
movq 0xa88b(%rip), %rdi      # 0xdfe0
addq -0x18(%rax), %rdi
movq 0xa870(%rip), %rsi      # 0xdfd0
callq 0x2180
cmpl $0x1, 0x350(%rsp)
jne 0x37a1
movq 0xa85a(%rip), %rdi      # 0xdfd0
leaq 0x6a3a(%rip), %rsi      # 0xa1b7
callq 0x21f0
movq %rax, %rdi
movq 0xa834(%rip), %rsi      # 0xdfc0
callq 0x2240
movl $0x1, 0x354(%rsp)
jmp 0x442d
movq 0x348(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x158(%rsp)
leaq 0x2af(%rsp), %rdi
movq %rdi, 0x160(%rsp)
callq 0x23a0
movq 0x158(%rsp), %rsi
movq 0x160(%rsp), %rdx
leaq 0x2b0(%rsp), %rdi
callq 0x4470
jmp 0x37e9
leaq 0x2d0(%rsp), %rdi
leaq 0x2b0(%rsp), %rsi
callq 0x4530
jmp 0x3800
leaq 0x2b0(%rsp), %rdi
callq 0x2140
leaq 0x2af(%rsp), %rdi
callq 0x2260
leaq 0x2d0(%rsp), %rdi
callq 0x4aa0
movb %al, 0x157(%rsp)
jmp 0x3830
movb 0x157(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x298(%rsp)
cmpl $0x0, 0x298(%rsp)
je 0x3909
movq 0xa778(%rip), %rdi      # 0xdfd0
leaq 0x6970(%rip), %rsi      # 0xa1cf
callq 0x21f0
movq %rax, 0x148(%rsp)
jmp 0x386e
movq 0x148(%rsp), %rdi
movq 0xa743(%rip), %rsi      # 0xdfc0
callq 0x2240
movq %rax, 0x140(%rsp)
jmp 0x388c
movq 0x140(%rsp), %rdi
movq 0xa725(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x38a2
jmp 0x398a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
jmp 0x38de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
leaq 0x2b0(%rsp), %rdi
callq 0x2140
leaq 0x2af(%rsp), %rdi
callq 0x2260
jmp 0x443c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
jmp 0x441e
movq 0xa6c0(%rip), %rdi      # 0xdfd0
leaq 0x68d8(%rip), %rsi      # 0xa1ef
callq 0x21f0
movq %rax, 0x138(%rsp)
jmp 0x3926
movq 0x138(%rsp), %rdi
movq 0xa68b(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x393c
movq 0xa68d(%rip), %rdi      # 0xdfd0
leaq 0x68c2(%rip), %rsi      # 0xa20c
callq 0x21f0
movq %rax, 0x130(%rsp)
jmp 0x3959
movq 0x130(%rsp), %rdi
movq 0xa658(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x396f
movl $0x1, 0x354(%rsp)
movl $0x1, 0x294(%rsp)
jmp 0x440f
callq 0x35b0
jmp 0x3991
movq 0xa638(%rip), %rdi      # 0xdfd0
movq 0xa621(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x39a6
jmp 0x39a8
movq 0xa631(%rip), %rdi      # 0xdfe0
leaq 0x293(%rsp), %rsi
callq 0x22f0
jmp 0x39be
movsbl 0x293(%rsp), %eax
addl $-0x61, %eax
movl %eax, %ecx
movq %rcx, 0x128(%rsp)
subl $0x17, %eax
ja 0x4386
movq 0x128(%rsp), %rax
leaq 0x6619(%rip), %rcx      # 0xa004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2d0(%rsp), %rdi
callq 0x6470
movl %eax, 0x124(%rsp)
jmp 0x3a0a
movl 0x124(%rsp), %eax
cmpl $-0x1, %eax
jne 0x3abb
leaq 0x270(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
callq 0x45f0
jmp 0x3a31
movq 0xa598(%rip), %rdi      # 0xdfd0
leaq 0x270(%rsp), %rsi
callq 0x21d0
movq %rax, 0x118(%rsp)
jmp 0x3a4f
movq 0x118(%rsp), %rdi
movq 0xa562(%rip), %rsi      # 0xdfc0
callq 0x2240
movq %rax, 0x110(%rsp)
jmp 0x3a6d
movq 0x110(%rsp), %rdi
movq 0xa544(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x3a83
leaq 0x270(%rsp), %rdi
callq 0x2140
jmp 0x43d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x2140
jmp 0x441e
leaq 0x2d0(%rsp), %rdi
callq 0x6470
movl %eax, 0x10c(%rsp)
jmp 0x3ad1
movl 0x10c(%rsp), %eax
cmpl $0x0, %eax
jne 0x3b33
movq 0xa4ec(%rip), %rdi      # 0xdfd0
leaq 0x6734(%rip), %rsi      # 0xa21f
callq 0x21f0
movq %rax, 0x100(%rsp)
jmp 0x3afa
movq 0x100(%rsp), %rdi
movq 0xa4b7(%rip), %rsi      # 0xdfc0
callq 0x2240
movq %rax, 0xf8(%rsp)
jmp 0x3b18
movq 0xf8(%rsp), %rdi
movq 0xa499(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x3b2e
jmp 0x43d1
jmp 0x3b35
leaq 0x2d0(%rsp), %rdi
callq 0x6470
movl %eax, 0xf4(%rsp)
jmp 0x3b4b
movl 0xf4(%rsp), %eax
cmpl $0x1, %eax
jne 0x3b7d
leaq 0x250(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
callq 0x4fe0
jmp 0x3b6e
leaq 0x250(%rsp), %rdi
callq 0x2140
jmp 0x3b35
leaq 0x2d0(%rsp), %rdi
callq 0x6470
movl %eax, 0xf0(%rsp)
jmp 0x3b93
movl 0xf0(%rsp), %eax
cmpl $-0x1, %eax
jne 0x3c44
leaq 0x230(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
callq 0x45f0
jmp 0x3bba
movq 0xa40f(%rip), %rdi      # 0xdfd0
leaq 0x230(%rsp), %rsi
callq 0x21d0
movq %rax, 0xe8(%rsp)
jmp 0x3bd8
movq 0xe8(%rsp), %rdi
movq 0xa3d9(%rip), %rsi      # 0xdfc0
callq 0x2240
movq %rax, 0xe0(%rsp)
jmp 0x3bf6
movq 0xe0(%rsp), %rdi
movq 0xa3bb(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x3c0c
leaq 0x230(%rsp), %rdi
callq 0x2140
jmp 0x43d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
leaq 0x230(%rsp), %rdi
callq 0x2140
jmp 0x441e
movq 0xa385(%rip), %rdi      # 0xdfd0
leaq 0x65e8(%rip), %rsi      # 0xa23a
callq 0x21f0
movq %rax, 0xd8(%rsp)
jmp 0x3c61
leaq 0x2d0(%rsp), %rdi
callq 0x4620
movq %rax, 0xd0(%rsp)
jmp 0x3c78
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdi
callq 0x21e0
movq %rax, 0xc8(%rsp)
jmp 0x3c97
movq 0xc8(%rsp), %rdi
movq 0xa31a(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x3cad
movq 0xa31c(%rip), %rdi      # 0xdfd0
movq 0xa305(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x3cc2
jmp 0x43d1
leaq 0x2d0(%rsp), %rdi
callq 0x6470
movl %eax, 0xc4(%rsp)
jmp 0x3cdd
movl 0xc4(%rsp), %eax
cmpl $-0x1, %eax
jne 0x3d85
leaq 0x210(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
callq 0x45f0
jmp 0x3d04
movq 0xa2c5(%rip), %rdi      # 0xdfd0
leaq 0x210(%rsp), %rsi
callq 0x21d0
movq %rax, 0xb8(%rsp)
jmp 0x3d22
movq 0xb8(%rsp), %rdi
movq 0xa28f(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x3d38
leaq 0x210(%rsp), %rdi
callq 0x2140
movq 0xa284(%rip), %rdi      # 0xdfd0
movq 0xa26d(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x3d5a
jmp 0x43d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
leaq 0x210(%rsp), %rdi
callq 0x2140
jmp 0x441e
leaq 0x2d0(%rsp), %rdi
callq 0x6470
movl %eax, 0xb4(%rsp)
jmp 0x3d9b
movl 0xb4(%rsp), %eax
cmpl $0x0, %eax
jne 0x3df4
movq 0xa222(%rip), %rdi      # 0xdfd0
leaq 0x646a(%rip), %rsi      # 0xa21f
callq 0x21f0
movq %rax, 0xa8(%rsp)
jmp 0x3dc4
movq 0xa8(%rsp), %rdi
movq 0xa1ed(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x3dda
movq 0xa1ef(%rip), %rdi      # 0xdfd0
movq 0xa1d8(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x3def
jmp 0x43d1
leaq 0x1f0(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
callq 0x4fe0
jmp 0x3e0b
movq 0xa1be(%rip), %rdi      # 0xdfd0
leaq 0x1f0(%rsp), %rsi
callq 0x21d0
movq %rax, 0xa0(%rsp)
jmp 0x3e29
movq 0xa0(%rsp), %rdi
movq 0xa188(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x3e3f
leaq 0x1f0(%rsp), %rdi
callq 0x2140
movq 0xa17d(%rip), %rdi      # 0xdfd0
movq 0xa166(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x3e61
jmp 0x43d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x2140
jmp 0x441e
leaq 0x2d0(%rsp), %rdi
callq 0x6470
movl %eax, 0x9c(%rsp)
jmp 0x3ea2
movl 0x9c(%rsp), %eax
cmpl $-0x1, %eax
jne 0x3f53
leaq 0x1d0(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
callq 0x45f0
jmp 0x3ec9
movq 0xa100(%rip), %rdi      # 0xdfd0
leaq 0x1d0(%rsp), %rsi
callq 0x21d0
movq %rax, 0x90(%rsp)
jmp 0x3ee7
movq 0x90(%rsp), %rdi
movq 0xa0ca(%rip), %rsi      # 0xdfc0
callq 0x2240
movq %rax, 0x88(%rsp)
jmp 0x3f05
movq 0x88(%rsp), %rdi
movq 0xa0ac(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x3f1b
leaq 0x1d0(%rsp), %rdi
callq 0x2140
jmp 0x43d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
leaq 0x1d0(%rsp), %rdi
callq 0x2140
jmp 0x441e
leaq 0x2d0(%rsp), %rdi
callq 0x6470
movl %eax, 0x84(%rsp)
jmp 0x3f69
movl 0x84(%rsp), %eax
cmpl $0x0, %eax
jne 0x3fbf
movq 0xa054(%rip), %rdi      # 0xdfd0
leaq 0x629c(%rip), %rsi      # 0xa21f
callq 0x21f0
movq %rax, 0x78(%rsp)
jmp 0x3f8f
movq 0x78(%rsp), %rdi
movq 0xa025(%rip), %rsi      # 0xdfc0
callq 0x2240
movq %rax, 0x70(%rsp)
jmp 0x3fa7
movq 0x70(%rsp), %rdi
movq 0xa00d(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x3fba
jmp 0x43d1
jmp 0x3fc1
leaq 0x2d0(%rsp), %rdi
callq 0x6470
movl %eax, 0x6c(%rsp)
jmp 0x3fd4
movl 0x6c(%rsp), %eax
cmpl $0x1, %eax
jne 0x4057
leaq 0x1b0(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
callq 0x4fe0
jmp 0x3ff4
movq 0x9fd5(%rip), %rdi      # 0xdfd0
leaq 0x1b0(%rsp), %rsi
callq 0x21d0
movq %rax, 0x60(%rsp)
jmp 0x400f
movq 0x60(%rsp), %rdi
movq 0x9fa5(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x4022
leaq 0x1b0(%rsp), %rdi
callq 0x2140
jmp 0x3fc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
leaq 0x1b0(%rsp), %rdi
callq 0x2140
jmp 0x441e
movq 0x9f72(%rip), %rdi      # 0xdfd0
movq 0x9f5b(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x406c
movq 0x9f5d(%rip), %rdi      # 0xdfd0
leaq 0x61c0(%rip), %rsi      # 0xa23a
callq 0x21f0
movq %rax, 0x58(%rsp)
jmp 0x4086
leaq 0x2d0(%rsp), %rdi
callq 0x4620
movq %rax, 0x50(%rsp)
jmp 0x409a
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdi
callq 0x21e0
movq %rax, 0x48(%rsp)
jmp 0x40b0
movq 0x48(%rsp), %rdi
movq 0x9f04(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x40c3
movq 0x9f06(%rip), %rdi      # 0xdfd0
movq 0x9eef(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x40d8
jmp 0x43d1
movl $0x0, 0x1ac(%rsp)
movq 0x9ef1(%rip), %rdi      # 0xdfe0
leaq 0x1ac(%rsp), %rsi
callq 0x2130
jmp 0x40fe
movl $0x0, 0x1a8(%rsp)
movl 0x1a8(%rsp), %ecx
xorl %eax, %eax
cmpl 0x1ac(%rsp), %ecx
movb %al, 0x47(%rsp)
jge 0x4140
leaq 0x2d0(%rsp), %rdi
callq 0x6470
movl %eax, 0x40(%rsp)
jmp 0x4132
movl 0x40(%rsp), %eax
cmpl $0x1, %eax
sete %al
movb %al, 0x47(%rsp)
movb 0x47(%rsp), %al
testb $0x1, %al
jne 0x414d
jmp 0x41da
movl 0x1a8(%rsp), %eax
incl %eax
movl %eax, 0x1a8(%rsp)
leaq 0x188(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
callq 0x4fe0
jmp 0x4174
movq 0x9e55(%rip), %rdi      # 0xdfd0
leaq 0x188(%rsp), %rsi
callq 0x21d0
movq %rax, 0x38(%rsp)
jmp 0x418f
movq 0x38(%rsp), %rdi
movq 0x9e25(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x41a2
leaq 0x188(%rsp), %rdi
callq 0x2140
jmp 0x4109
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x2140
jmp 0x441e
movq 0x9def(%rip), %rdi      # 0xdfd0
movq 0x9dd8(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x41ef
jmp 0x43d1
leaq 0x168(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
callq 0x5a00
jmp 0x420b
movq 0x9dbe(%rip), %rdi      # 0xdfd0
leaq 0x168(%rsp), %rsi
callq 0x21d0
movq %rax, 0x30(%rsp)
jmp 0x4226
movq 0x30(%rsp), %rdi
movq 0x9d8e(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x4239
leaq 0x168(%rsp), %rdi
callq 0x2140
movq 0x9d83(%rip), %rdi      # 0xdfd0
movq 0x9d6c(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x425b
jmp 0x43d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x2140
jmp 0x441e
movq 0x9d43(%rip), %rsi      # 0xdfd0
leaq 0x2d0(%rsp), %rdi
callq 0x6630
jmp 0x429c
movq 0x9d2d(%rip), %rdi      # 0xdfd0
movq 0x9d16(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x42b1
jmp 0x43d1
movq 0x9d13(%rip), %rsi      # 0xdfd0
leaq 0x2d0(%rsp), %rdi
callq 0x6980
jmp 0x42cc
jmp 0x43d1
movq 0x9cf8(%rip), %rdi      # 0xdfd0
leaq 0x5f7a(%rip), %rsi      # 0xa259
callq 0x21f0
movq %rax, 0x28(%rsp)
jmp 0x42eb
leaq 0x2d0(%rsp), %rdi
callq 0x4620
movq %rax, 0x20(%rsp)
jmp 0x42ff
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x21e0
movq %rax, 0x18(%rsp)
jmp 0x4315
movq 0x18(%rsp), %rdi
movq 0x9c9f(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x4328
movq 0x9ca1(%rip), %rdi      # 0xdfd0
movq 0x9c8a(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x433d
jmp 0x43d1
movq 0x9c87(%rip), %rdi      # 0xdfd0
leaq 0x5f2c(%rip), %rsi      # 0xa27c
callq 0x21f0
movq %rax, 0x10(%rsp)
jmp 0x435c
movq 0x10(%rsp), %rdi
movq 0x9c58(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x436f
movq 0x9c5a(%rip), %rdi      # 0xdfd0
movq 0x9c43(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x4384
jmp 0x43d1
movq 0x9c43(%rip), %rdi      # 0xdfd0
leaq 0x5efd(%rip), %rsi      # 0xa291
callq 0x21f0
movq %rax, 0x8(%rsp)
jmp 0x43a0
movq 0x8(%rsp), %rdi
movq 0x9c14(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x43b3
callq 0x35b0
jmp 0x43ba
movq 0x9c0f(%rip), %rdi      # 0xdfd0
movq 0x9bf8(%rip), %rsi      # 0xdfc0
callq 0x2240
jmp 0x43cf
jmp 0x43d3
jmp 0x43d3
movsbl 0x293(%rsp), %eax
cmpl $0x78, %eax
jne 0x39a8
movq 0x9be5(%rip), %rdi      # 0xdfd0
leaq 0x23e(%rip), %rsi       # 0x4630
callq 0x20b0
jmp 0x43f9
movl $0x0, 0x354(%rsp)
movl $0x1, 0x294(%rsp)
leaq 0x2d0(%rsp), %rdi
callq 0x4650
jmp 0x442d
leaq 0x2d0(%rsp), %rdi
callq 0x4650
jmp 0x443c
movl 0x354(%rsp), %eax
addq $0x358, %rsp            # imm = 0x358
retq
movq 0x2a0(%rsp), %rdi
callq 0x2390
nopl (%rax)