// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/nrt2xml.cpp
// Function: main
int main(int argc, char **argv)
{

    string buff, filein, fileout, option, path_env, path_item;
    string::size_type slash_pos = 0, i = 0, j = 0;
    char path_delim = '\0';



    /* 1. Variables setup */

    extern enc_dec_funcs edf[];
    extern map<string, int> simpletypes_map;
    extern map<int, enc_dec_funcs> simpletypes;


    /* Note: this was set originally into global.cpp but     */
    /*       Windows unfortunately does not support the      */
    /*       initialization of maps, so I should put it here */

    simpletypes_map.insert(pair<string,int>("OCTET STRING", 0));
    simpletypes_map.insert(pair<string,int>("INTEGER",      1));
    simpletypes_map.insert(pair<string,int>("BCDString",    2));
    simpletypes_map.insert(pair<string,int>("AsciiString",  3));
    simpletypes_map.insert(pair<string,int>("Currency",     4));
    simpletypes_map.insert(pair<string,int>("HexString",    5));
    simpletypes_map.insert(pair<string,int>("NumberString", 6));
    
    simpletypes.insert(pair<int, enc_dec_funcs>(0, edf[2]));
    simpletypes.insert(pair<int, enc_dec_funcs>(1, edf[1]));
    simpletypes.insert(pair<int, enc_dec_funcs>(2, edf[3]));
    simpletypes.insert(pair<int, enc_dec_funcs>(3, edf[0]));
    simpletypes.insert(pair<int, enc_dec_funcs>(4, edf[0]));
    simpletypes.insert(pair<int, enc_dec_funcs>(5, edf[0]));
    simpletypes.insert(pair<int, enc_dec_funcs>(6, edf[0]));


    /* 2. Arrange Directory to find the specifications ASN.1 */

    if (getenv(TAP3XML_SPEC_VAR)!=NULL)     /* a. nrt2xml environment variable */
        specdir_list.push_back(getenv(TAP3XML_SPEC_VAR));

    if (getenv("HOME")!=NULL)               /* b. unix $HOME/Spec/ */
        specdir_list.push_back(string(getenv("HOME"))+"/"+SPEC_DIR);

    if (getenv("HOMEPATH")!=NULL)           /* c. windows %HOMEPATH%\Spec\ */
        specdir_list.push_back(string(getenv("HOMEPATH"))+"/"+SPEC_DIR);

    if ((slash_pos = string(argv[0]).find_last_of("/\\")) != string::npos) /* e. path of the binary */
        specdir_list.push_back(string(argv[0]).substr(0,slash_pos)+"/"+SPEC_DIR);

    if (getenv("PATH")!=NULL) {             /* f. parse the PATH environment variable */
        path_env = getenv("PATH");

        if (path_env.find("\\") != string::npos)
            path_delim = ';'; /* windows */
        else
            path_delim = ':'; /* unix */

        i = 0;
        j = path_env.find(path_delim);
        for (;j < path_env.length(); i = ++j, j = path_env.find(path_delim, j))
        {
            if (j != string::npos)
                path_item = path_env.substr(i, j-i);
            else
                path_item = path_env.substr(i, path_env.length()-i);

            specdir_list.push_back(path_item+"/"+SPEC_DIR);
        }
    }

    specdir_list.push_back(SPEC_DIR); /* f. ./Specs directory */


    /* 3. Checking arguments */

    if ( argc!=3 && argc!=4)
        help();

    option=string(argv[1]);
    if ( option != "-a" && option != "-x" )
        help();

    filein =string(argv[2]);
    if (argc==3)
    {
        if (filein.find_last_of("/") != string::npos)           // unix style
            fileout=filein.substr(filein.find_last_of("/")+1,string::npos);
        {
            if (filein.find_last_of("\\") != string::npos)      // windows style 
                fileout=filein.substr(filein.find_last_of("\\")+1,string::npos);
            else
                fileout=filein;
        }

        if (option == "-a")
            fileout+=".asn";
        else
            fileout="";
        //fileout+=(option=="-a" ? ".asn" : ".xml");
    }
    else
        fileout=string(argv[3]);


    /* 4. NRT -> XML Conversion */

    if ( option == "-x" )
    {
        string      header = XML_HEADER;

        Buffin*     bfin_asn= new Buffin(filein,0);
        Buffout*    bfout_asn = NULL;

        string      spec_filename;
        
        treenode*   tree = new treenode();

        NrtInfo*    nrtinfo = new NrtInfo();
        nrtinfo->buffin(bfin_asn);

        if(nrtinfo->type()=="ERR")
        {
            cerr << "Error. Unable to get version of file: " << filein << endl;
            exit(1);
        }

        spec_filename=get_specfilename(nrtinfo);

        Asn *asn=new Asn();
        asn->specfile(spec_filename);
        asn->specroot("Nrtrde");
        asn->buffin(bfin_asn);
        asn->tree(tree);
        asn->decode();

        if (fileout == "")
            bfout_asn= new Buffout();
        else
            bfout_asn= new Buffout(fileout);

        Xml *xml=new Xml();
        xml->buffout(bfout_asn);
        xml->tree(tree);
        xml->set_header(&header);
        xml->encode();

        delete xml;
        delete bfout_asn;
        delete asn;
        delete nrtinfo;
        free_treenode(tree);
        delete bfin_asn;
    }


    /* 5. XML -> NRT Conversion */

    if ( option == "-a" )
    {
        string    spec_filename;
        
        treenode *tree=new treenode();

        Xml *xml=new Xml();
        xml->ifile(filein);
        xml->tree(tree);
        xml->decode();
        NrtInfo *nrtinfo=  new NrtInfo();
        nrtinfo->tree(tree);

        if(nrtinfo->type()=="ERR")
        {
            cerr << "Error. Unable to get version of file: " << filein << endl;
            exit(1);
        }

        spec_filename=get_specfilename(nrtinfo);

        Asn *asn=new Asn();
        asn->specfile(spec_filename);
        asn->specroot("Nrtrde");
        asn->ofile(fileout);
        asn->tree(tree);
        asn->encode();

        delete asn;
        delete nrtinfo;
        delete xml;
        free_treenode(tree);

    }


    exit(0);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rsi, %rbx
movl %edi, %r14d
leaq 0x1c8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0xa8(%rsp), %rdx
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, (%rax)
movb %cl, (%rdx)
leaq 0xc8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0x108(%rsp), %rdx
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, (%rax)
movb %cl, (%rdx)
leaq 0x1a8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0x30(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0xc52e(%rip), %rsi      # 0x11004
movq %rsp, %rdi
callq 0x5c00
leaq 0x15df3(%rip), %rdi     # 0x1a8d8
movq %rsp, %rsi
callq 0x5eaa
movq %rsp, %rdi
callq 0x4150
leaq 0x30(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0xc50a(%rip), %rsi      # 0x11011
movq %rsp, %rdi
callq 0x5c22
leaq 0x15dc2(%rip), %rdi     # 0x1a8d8
movq %rsp, %rsi
callq 0x5eaa
movq %rsp, %rdi
callq 0x4150
leaq 0x30(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0xc4e1(%rip), %rsi      # 0x11019
movq %rsp, %rdi
callq 0x5c44
leaq 0x15d91(%rip), %rdi     # 0x1a8d8
movq %rsp, %rsi
callq 0x5eaa
movq %rsp, %rdi
callq 0x4150
leaq 0x30(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0xc4ba(%rip), %rsi      # 0x11023
movq %rsp, %rdi
callq 0x5c66
leaq 0x15d60(%rip), %rdi     # 0x1a8d8
movq %rsp, %rsi
callq 0x5eaa
movq %rsp, %rdi
callq 0x4150
leaq 0x30(%rsp), %rdx
movl $0x4, (%rdx)
leaq 0xc495(%rip), %rsi      # 0x1102f
movq %rsp, %rdi
callq 0x5c88
leaq 0x15d2f(%rip), %rdi     # 0x1a8d8
movq %rsp, %rsi
callq 0x5eaa
movq %rsp, %rdi
callq 0x4150
leaq 0x30(%rsp), %rdx
movl $0x5, (%rdx)
leaq 0xc46d(%rip), %rsi      # 0x11038
movq %rsp, %rdi
callq 0x5c44
leaq 0x15cfe(%rip), %rdi     # 0x1a8d8
movq %rsp, %rsi
callq 0x5eaa
movq %rsp, %rdi
callq 0x4150
leaq 0x30(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0xc446(%rip), %rsi      # 0x11042
movq %rsp, %rdi
callq 0x5c00
leaq 0x15ccd(%rip), %rdi     # 0x1a8d8
movq %rsp, %rsi
callq 0x5eaa
movq %rsp, %r15
movq %r15, %rdi
callq 0x4150
andl $0x0, (%r15)
leaq 0x156f7(%rip), %r12     # 0x1a320
movups 0x20(%r12), %xmm0
movups %xmm0, 0x8(%r15)
leaq 0x15ccd(%rip), %rdi     # 0x1a908
movq %rsp, %rsi
callq 0x60c4
movq %rsp, %rsi
movl $0x1, (%rsi)
movups 0x10(%r12), %xmm0
movups %xmm0, 0x8(%rsi)
leaq 0x15cab(%rip), %rdi     # 0x1a908
callq 0x60c4
movq %rsp, %rsi
movl $0x2, (%rsi)
movups 0x30(%r12), %xmm0
movups %xmm0, 0x8(%rsi)
leaq 0x15c8c(%rip), %rdi     # 0x1a908
callq 0x60c4
movq %rsp, %rsi
movl $0x3, (%rsi)
movups (%r12), %xmm0
movups %xmm0, 0x8(%rsi)
leaq 0x15c6e(%rip), %rdi     # 0x1a908
callq 0x60c4
movq %rsp, %rsi
movl $0x4, (%rsi)
movups (%r12), %xmm0
movups %xmm0, 0x8(%rsi)
leaq 0x15c50(%rip), %rdi     # 0x1a908
callq 0x60c4
movq %rsp, %rsi
movl $0x5, (%rsi)
movups (%r12), %xmm0
movups %xmm0, 0x8(%rsi)
leaq 0x15c32(%rip), %rdi     # 0x1a908
callq 0x60c4
movq %rsp, %rsi
movl $0x6, (%rsi)
movups (%r12), %xmm0
movups %xmm0, 0x8(%rsi)
leaq 0x15c14(%rip), %rdi     # 0x1a908
callq 0x60c4
leaq 0xc34f(%rip), %rdi      # 0x1104f
callq 0x4350
testq %rax, %rax
jne 0x4dc4
leaq 0xc347(%rip), %rdi      # 0x1105c
callq 0x4350
testq %rax, %rax
jne 0x4dfc
leaq 0xc33d(%rip), %rdi      # 0x11067
callq 0x4350
testq %rax, %rax
jne 0x4e77
movq (%rbx), %rsi
movq %rsp, %rdi
leaq 0x30(%rsp), %rdx
callq 0x5caa
leaq 0xc321(%rip), %rsi      # 0x11070
movq %rsp, %r12
pushq $-0x1
popq %rdx
movq %r12, %rdi
callq 0x4270
movq %rax, %r15
movq %r12, %rdi
callq 0x4150
cmpq $-0x1, %r15
jne 0x4ef2
leaq 0xc2f2(%rip), %rdi      # 0x1106b
callq 0x4350
testq %rax, %rax
jne 0x4f85
leaq 0xc2d3(%rip), %rsi      # 0x11061
movq %rsp, %rdi
leaq 0x30(%rsp), %rdx
callq 0x5caa
leaq 0x155de(%rip), %rdi     # 0x1a380
movq %rsp, %rsi
callq 0x6248
movq %rsp, %rdi
callq 0x4150
leal -0x5(%r14), %eax
cmpl $-0x2, %eax
jae 0x506b
callq 0x5972
leaq 0xc284(%rip), %rdi      # 0x1104f
callq 0x4350
movq %rsp, %rdi
leaq 0x30(%rsp), %rdx
movq %rax, %rsi
callq 0x5caa
leaq 0x15599(%rip), %rdi     # 0x1a380
movq %rsp, %rsi
callq 0x6248
movq %rsp, %rdi
callq 0x4150
jmp 0x4d0e
leaq 0xc259(%rip), %rdi      # 0x1105c
callq 0x4350
leaq 0x58(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
movq %rax, %rsi
callq 0x5caa
leaq 0xe395(%rip), %rdx      # 0x131b9
leaq 0x30(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x5ce5
leaq 0xc227(%rip), %rdx      # 0x11061
movq %rsp, %rdi
leaq 0x30(%rsp), %rsi
callq 0x5ce5
leaq 0x15532(%rip), %rdi     # 0x1a380
movq %rsp, %rsi
callq 0x6248
movq %rsp, %rdi
callq 0x4150
leaq 0x30(%rsp), %rdi
callq 0x4150
leaq 0x58(%rsp), %rdi
callq 0x4150
jmp 0x4d23
leaq 0xc1e9(%rip), %rdi      # 0x11067
callq 0x4350
leaq 0x58(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
movq %rax, %rsi
callq 0x5caa
leaq 0xe31a(%rip), %rdx      # 0x131b9
leaq 0x30(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x5ce5
leaq 0xc1ac(%rip), %rdx      # 0x11061
movq %rsp, %rdi
leaq 0x30(%rsp), %rsi
callq 0x5ce5
leaq 0x154b7(%rip), %rdi     # 0x1a380
movq %rsp, %rsi
callq 0x6248
movq %rsp, %rdi
callq 0x4150
leaq 0x30(%rsp), %rdi
callq 0x4150
leaq 0x58(%rsp), %rdi
callq 0x4150
jmp 0x4d38
movq (%rbx), %rsi
leaq 0xd8(%rsp), %rdi
leaq 0x57(%rsp), %rdx
callq 0x5caa
leaq 0x58(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x42d0
leaq 0xe294(%rip), %rdx      # 0x131b9
leaq 0x30(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x5ce5
leaq 0xc126(%rip), %rdx      # 0x11061
movq %rsp, %rdi
leaq 0x30(%rsp), %rsi
callq 0x5ce5
leaq 0x15431(%rip), %rdi     # 0x1a380
movq %rsp, %rsi
callq 0x6248
movq %rsp, %rdi
callq 0x4150
leaq 0x30(%rsp), %rdi
callq 0x4150
leaq 0x58(%rsp), %rdi
callq 0x4150
leaq 0xd8(%rsp), %rdi
callq 0x4150
jmp 0x4d72
leaq 0xf8(%rsp), %rdi
movq %rax, %rsi
callq 0x45b0
leaq 0xc0d5(%rip), %rsi      # 0x11071
xorl %r13d, %r13d
leaq 0xf8(%rsp), %rdi
xorl %edx, %edx
callq 0x45e0
cmpq $-0x1, %rax
sete %al
xorb $0x3b, %al
movzbl %al, %eax
movl %eax, 0x28(%rsp)
movq %rsp, %r12
leaq 0xf8(%rsp), %r15
movq %r15, %rdi
movl 0x28(%rsp), %esi
movq %r13, %rdx
callq 0x43c0
cmpq 0x100(%rsp), %rax
jae 0x4d87
movq %rax, %rbp
movq %rax, %rcx
subq %r13, %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x42d0
leaq 0x198(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x4360
movq %r12, %rdi
callq 0x4150
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
leaq 0xe18f(%rip), %rdx      # 0x131b9
callq 0x5d04
movq %r12, %rdi
movq %r13, %rsi
leaq 0xc025(%rip), %rdx      # 0x11061
callq 0x5ce5
leaq 0x15338(%rip), %rdi     # 0x1a380
movq %r12, %rsi
callq 0x6248
movq %r12, %rdi
callq 0x4150
movq %r13, %rdi
callq 0x4150
incq %rbp
movq %rbp, %r13
jmp 0x4fc1
movq 0x8(%rbx), %rsi
movq %rsp, %rdi
leaq 0x30(%rsp), %rdx
callq 0x5caa
leaq 0xb8(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x4360
movq %r12, %rdi
callq 0x4150
leaq 0xbfd2(%rip), %rsi      # 0x11073
movq %r15, %rdi
callq 0x5d3c
testb %al, %al
je 0x50c9
leaq 0xbfc2(%rip), %rsi      # 0x11076
leaq 0xb8(%rsp), %rdi
callq 0x5d3c
testb %al, %al
jne 0x4dbf
movq 0x10(%rbx), %rsi
movq %rsp, %rdi
leaq 0x30(%rsp), %rdx
callq 0x5caa
leaq 0x78(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x4360
movq %r15, %rdi
callq 0x4150
cmpl $0x3, %r14d
jne 0x5193
leaq 0xe0b6(%rip), %rsi      # 0x131b9
leaq 0x78(%rsp), %rdi
pushq $-0x1
popq %rdx
callq 0x4270
cmpq $-0x1, %rax
je 0x515e
leaq 0xe09c(%rip), %rsi      # 0x131b9
leaq 0x78(%rsp), %rbx
pushq $-0x1
popq %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4270
leaq 0x1(%rax), %rdx
movq %rsp, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x42d0
leaq 0x98(%rsp), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x4360
movq %rbx, %rdi
callq 0x4150
leaq 0xbf0c(%rip), %rsi      # 0x11071
leaq 0x78(%rsp), %rdi
pushq $-0x1
popq %rdx
callq 0x4270
cmpq $-0x1, %rax
jne 0x52d3
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x4180
jmp 0x531b
movq 0x18(%rbx), %rsi
movq %rsp, %rdi
leaq 0x30(%rsp), %rdx
callq 0x5caa
leaq 0x98(%rsp), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x4360
movq %rbx, %rdi
callq 0x4150
leaq 0xbeb0(%rip), %rsi      # 0x11076
leaq 0xb8(%rsp), %rdi
callq 0x5d46
testb %al, %al
je 0x553a
leaq 0xbe9c(%rip), %rsi      # 0x1107e
movq %rsp, %rdi
leaq 0x30(%rsp), %rdx
callq 0x5caa
movl $0x238, %edi            # imm = 0x238
callq 0x42b0
movq %rax, %r14
leaq 0x178(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x4420
leaq 0x178(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0xb97a
leaq 0x178(%rsp), %rdi
callq 0x4150
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
pushq $0x58
popq %rdi
callq 0x42b0
movq %rax, %r15
movq %rax, %rdi
callq 0x5d54
pushq $0x30
popq %rdi
callq 0x42b0
movq %rax, %r12
movq %rax, %rdi
callq 0x6410
movq %r12, %rdi
movq %r14, %rsi
callq 0x6428
leaq 0x58(%rsp), %rdi
movq %r12, %rsi
callq 0x697e
leaq 0xbef8(%rip), %rsi      # 0x1117b
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
callq 0x5d46
movl %eax, %ebp
movq %rbx, %rdi
callq 0x4150
testb %bpl, %bpl
je 0x5365
movq 0x14d46(%rip), %rdi     # 0x19ff0
leaq 0xbece(%rip), %rsi      # 0x1117f
callq 0x4290
leaq 0x78(%rsp), %rsi
movq %rax, %rdi
callq 0x4250
movq %rax, %rdi
callq 0x4160
pushq $0x1
popq %rdi
callq 0x4340
leaq 0xbd97(%rip), %rsi      # 0x11071
leaq 0x78(%rsp), %rbx
pushq $-0x1
popq %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4270
leaq 0x1(%rax), %rdx
movq %rsp, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x42d0
leaq 0x98(%rsp), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x4360
movq %rbx, %rdi
callq 0x4150
leaq 0xbd51(%rip), %rsi      # 0x11073
leaq 0xb8(%rsp), %rdi
callq 0x5d46
testb %al, %al
je 0x534c
leaq 0xbd3f(%rip), %rsi      # 0x11079
leaq 0x98(%rsp), %rdi
callq 0x45a0
jmp 0x51bf
leaq 0xd6bd(%rip), %rsi      # 0x12a10
leaq 0x98(%rsp), %rdi
callq 0x45b0
jmp 0x51bf
leaq 0x58(%rsp), %rdi
movq %r12, %rsi
callq 0x59be
leaq 0x30(%rsp), %rdi
leaq 0x58(%rsp), %rbx
movq %rbx, %rsi
callq 0x4360
movq %rbx, %rdi
callq 0x4150
movl $0x90, %edi
callq 0x42b0
movq %rax, %r13
movq %rax, %rdi
callq 0xc0d0
leaq 0x30(%rsp), %rsi
movq %r13, %rdi
callq 0xede6
leaq 0xbdf1(%rip), %rsi      # 0x111a6
leaq 0x158(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x5caa
leaq 0x158(%rsp), %rsi
movq %r13, %rdi
callq 0xef58
leaq 0x158(%rsp), %rdi
callq 0x4150
movq %r13, %rdi
movq %r14, %rsi
callq 0xc16c
movq %r13, %rdi
movq %r15, %rsi
callq 0xefd2
movq %r13, %rdi
callq 0xc3f4
leaq 0xd607(%rip), %rsi      # 0x12a10
leaq 0x98(%rsp), %rdi
callq 0x5d46
testb %al, %al
je 0x5435
movl $0x220, %edi            # imm = 0x220
callq 0x42b0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0xbefc
jmp 0x5478
movl $0x220, %edi            # imm = 0x220
callq 0x42b0
movq %rax, 0x28(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x4420
leaq 0x138(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0xbf72
leaq 0x138(%rsp), %rdi
callq 0x4150
pushq $0x38
popq %rdi
callq 0x42b0
movq %rax, %rbp
movq %rax, %rdi
callq 0x10490
movq %rbp, %rdi
movq 0x28(%rsp), %rsi
callq 0x107aa
movq %rbp, %rdi
movq %r15, %rsi
callq 0x107b0
movq %rsp, %rsi
movq %rbp, %rdi
callq 0x107b6
movq %rbp, %rdi
callq 0x105b0
movq %rbp, %rdi
callq 0x107bc
pushq $0x38
popq %rsi
movq %rbp, %rdi
callq 0x42c0
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0xc084
movl $0x220, %esi            # imm = 0x220
movq %rbx, %rdi
callq 0x42c0
movq %r13, %rdi
callq 0xf3c4
movl $0x90, %esi
movq %r13, %rdi
callq 0x42c0
movq %r12, %rdi
callq 0x6990
pushq $0x30
popq %rsi
movq %r12, %rdi
callq 0x42c0
movq %r15, %rdi
callq 0xb7a9
movq %r14, %rdi
callq 0xbeb6
movl $0x238, %esi            # imm = 0x238
movq %r14, %rdi
callq 0x42c0
leaq 0x30(%rsp), %rdi
callq 0x4150
movq %rsp, %rdi
callq 0x4150
leaq 0xbb32(%rip), %rsi      # 0x11073
leaq 0xb8(%rsp), %rdi
callq 0x5d46
testb %al, %al
je 0x5711
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
pushq $0x58
popq %rdi
callq 0x42b0
movq %rax, %r14
movq %rax, %rdi
callq 0x5d54
pushq $0x38
popq %rdi
callq 0x42b0
movq %rax, %r15
movq %rax, %rdi
callq 0x10490
leaq 0x78(%rsp), %rsi
movq %r15, %rdi
callq 0x10710
movq %r15, %rdi
movq %r14, %rsi
callq 0x107b0
movq %r15, %rdi
callq 0x104da
pushq $0x30
popq %rdi
callq 0x42b0
movq %rax, %r12
movq %rax, %rdi
callq 0x6410
movq %r12, %rdi
movq %r14, %rsi
callq 0x6942
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0x697e
leaq 0xbb9c(%rip), %rsi      # 0x1117b
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x5d46
movl %eax, %ebp
movq %rbx, %rdi
callq 0x4150
testb %bpl, %bpl
je 0x5628
movq 0x149ee(%rip), %rdi     # 0x19ff0
leaq 0xbb76(%rip), %rsi      # 0x1117f
callq 0x4290
leaq 0x78(%rsp), %rsi
movq %rax, %rdi
callq 0x4250
movq %rax, %rdi
callq 0x4160
jmp 0x52cb
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0x59be
movq %rsp, %rdi
leaq 0x30(%rsp), %rbx
movq %rbx, %rsi
callq 0x4360
movq %rbx, %rdi
callq 0x4150
movl $0x90, %edi
callq 0x42b0
movq %rax, %r13
movq %rax, %rdi
callq 0xc0d0
movq %rsp, %rsi
movq %r13, %rdi
callq 0xede6
leaq 0xbb32(%rip), %rsi      # 0x111a6
leaq 0x118(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x5caa
leaq 0x118(%rsp), %rsi
movq %r13, %rdi
callq 0xef58
leaq 0x118(%rsp), %rdi
callq 0x4150
leaq 0x98(%rsp), %rsi
movq %r13, %rdi
callq 0xef62
movq %r13, %rdi
movq %r14, %rsi
callq 0xefd2
movq %r13, %rdi
callq 0xecb2
movq %r13, %rdi
callq 0xf3c4
movl $0x90, %esi
movq %r13, %rdi
callq 0x42c0
movq %r12, %rdi
callq 0x6990
pushq $0x30
popq %rsi
movq %r12, %rdi
callq 0x42c0
movq %r15, %rdi
callq 0x107bc
pushq $0x38
popq %rsi
movq %r15, %rdi
callq 0x42c0
movq %r14, %rdi
callq 0xb7a9
movq %rsp, %rdi
callq 0x4150
xorl %edi, %edi
callq 0x4340
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
jmp 0x57e9
jmp 0x590f
jmp 0x57e1
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %rbp, %rdi
jmp 0x57cf
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
callq 0x4150
jmp 0x5757
jmp 0x5754
movq %rax, %rbx
movl $0x220, %esi            # imm = 0x220
movq 0x28(%rsp), %rdi
jmp 0x57cf
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
callq 0x4150
jmp 0x57e4
movq %rax, %rbx
movl $0x90, %esi
movq %r13, %rdi
jmp 0x581d
jmp 0x57e1
jmp 0x590f
jmp 0x590f
movq %rax, %rbx
movl $0x90, %esi
movq %r13, %rdi
jmp 0x57cf
jmp 0x57e1
jmp 0x590f
jmp 0x57e1
movq %rax, %rbx
pushq $0x30
popq %rsi
movq %r12, %rdi
jmp 0x581d
jmp 0x57e1
jmp 0x590f
movq %rax, %rbx
pushq $0x30
popq %rsi
movq %r12, %rdi
jmp 0x57cf
jmp 0x57e1
movq %rax, %rbx
pushq $0x58
popq %rsi
movq %r15, %rdi
callq 0x42c0
jmp 0x57e4
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r15, %rdi
jmp 0x581d
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4150
jmp 0x5912
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
callq 0x4150
jmp 0x5815
jmp 0x590f
movq %rax, %rbx
pushq $0x58
popq %rsi
jmp 0x581a
movq %rax, %rbx
movl $0x238, %esi            # imm = 0x238
movq %r14, %rdi
callq 0x42c0
jmp 0x5912
jmp 0x590f
jmp 0x590f
jmp 0x591c
jmp 0x591c
jmp 0x591c
jmp 0x591c
jmp 0x591c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4150
jmp 0x5883
jmp 0x591c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4150
jmp 0x586c
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x5915
jmp 0x591c
jmp 0x591c
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4150
jmp 0x5892
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x4150
jmp 0x58a5
jmp 0x590f
jmp 0x58b3
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
jmp 0x5915
jmp 0x591c
jmp 0x591c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4150
jmp 0x58c7
jmp 0x58c4
jmp 0x591c
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4150
jmp 0x58d8
jmp 0x58d5
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0x5915
jmp 0x591c
jmp 0x591c
jmp 0x590f
jmp 0x591c
jmp 0x591c
jmp 0x591c
jmp 0x591c
jmp 0x591c
jmp 0x591c
jmp 0x591c
jmp 0x591c
jmp 0x591c
jmp 0x590f
jmp 0x591c
jmp 0x590f
jmp 0x591c
jmp 0x590f
jmp 0x591c
jmp 0x590f
jmp 0x591c
jmp 0x590f
jmp 0x591c
jmp 0x590f
jmp 0x591c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4150
jmp 0x591f
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
callq 0x4150
leaq 0xf8(%rsp), %rdi
callq 0x4150
leaq 0xb8(%rsp), %rdi
callq 0x4150
leaq 0x98(%rsp), %rdi
callq 0x4150
leaq 0x78(%rsp), %rdi
callq 0x4150
leaq 0x1b8(%rsp), %rdi
callq 0x4150
movq %rbx, %rdi
callq 0x4560