// File: /workspace/github_cpp_makefile_star2_O3/tap3edit[P]tap3xml/Asn.cpp
// Function: Asn::_compile_tree(tagtype_s*, treenode*)
long Asn::_compile_tree(tagtype_s *tagtype, treenode *tree)
{

    vector<tagelem_s *>*            tagtype_ch;
    vector<treenode *>::iterator    vii;
    vector<tagelem_s *>::iterator   vjj;
    long                            tot_size=0;
    extern map<string, int>         simpletypes_map;
    extern map<int, enc_dec_funcs>  simpletypes;
    AsnItem*                        asnitem;
    bool                            found=false;
    tagtype_s*                      tagtype_pa;
    int                             encoded_size;

    asnitem=new AsnItem();


    /* 1. CHOICE */

    if (tagtype->action==choice)
    {
        if (tree->tag_d != -2)
        {
            if (tree->children!=NULL)
            {

                /* 1.1. We got a fresh CHOICE */

                for (vii=tree->children->begin();vii!=tree->children->end();vii++)
                {
                    tagtype_ch=tagtype->children;

                    if (tagtype_ch!=NULL)
                    {
                        found=false;
                        for (vjj=tagtype_ch->begin();vjj!=tagtype_ch->end();vjj++)
                        {

                            if ( (*vii)->tagname == (*vjj)->elem_name )
                            {
                                (*vii)->tag_d=(*vjj)->elem_type_p->tagid;
                                (*vii)->pc=1;
                                tot_size+=_compile_tree((*vjj)->elem_type_p,(*vii));
                                found=true;
                                break;
                            }
                            else
                            {
                                if ( (*vjj)->elem_type_p->action == choice && !(*vjj)->elem_type_p->tagid)
                                {
                                    /* Could be CHOICE */

                                    (*vii)->tag_d=-2;
                                    tot_size+=_compile_tree((*vjj)->elem_type_p,(*vii));

                                    if ((*vii)->tag_d != -2)
                                        found=true;
                                    else
                                        (*vii)->tag_d=0;
                                }
                            }
                        }
                        if (!found)
                        {
                            cerr << "Error. " << (*vii)->tagname << " not found in specification";
                            err_trace(__FILE__, __LINE__);
                        }
                    }
                    else
                    {
                        cerr << "Error. " << tagtype->type_name << "  without children in tree specification";
                        err_trace(__FILE__, __LINE__);
                    }
                }
            }
            else 
            {
                cerr << "Error. \"" << tree->tagname << "\" (CHOICE) has no children";
                err_trace(__FILE__, __LINE__);
            }
        }
        else
        {
            /* 1.2. We are still analysing previous CHOICE */

            tagtype_ch=tagtype->children;

            if (tagtype_ch!=NULL)
            {
                found=false;
                for (vjj=tagtype_ch->begin();vjj!=tagtype_ch->end();vjj++)
                {

                    if ( tree->tagname == (*vjj)->elem_name )
                    {
                        tree->tag_d=(*vjj)->elem_type_p->tagid;
                        tree->pc=1;
                        tot_size+=_compile_tree((*vjj)->elem_type_p,tree);
                        found=true;
                        break;
                    }
                    else
                    {
                        /* Could be CHOICE */

                        if ( (*vjj)->elem_type_p->action == choice && !(*vjj)->elem_type_p->tagid)
                        {
                            tree->tag_d=-2;
                            tot_size+=_compile_tree((*vjj)->elem_type_p,tree);

                            if (tree->tag_d != -2)
                                found=true;
                        }
                    }
                }

            }
            else
            {
                cerr << "Error. " << tagtype->type_name << "  without children in tree specification";
                err_trace(__FILE__, __LINE__);
            }

            delete asnitem; 
            asnitem = NULL;
            return tot_size;
        }
    }


    /* SEQUENCE */

    if (tagtype->action==sequence)
    {

        tagtype_ch=tagtype->children;
        if (tagtype_ch==NULL)
        {
            cerr << "Error. \"" << tagtype->type_name << "\"  without children in tree specification";
            err_trace(__FILE__, __LINE__);
        }

        if (tree->children!=NULL)
        {
            vjj=tagtype_ch->begin();

            for (vii=tree->children->begin();vii!=tree->children->end();vii++)
            {
                found=false;
                while (vjj!=tagtype_ch->end() && !found)
                {

                    if ( (*vii)->tagname == (*vjj)->elem_name )
                    {
                        (*vii)->tag_d=(*vjj)->elem_type_p->tagid;
                        (*vii)->pc=1;
                        tot_size+=_compile_tree((*vjj)->elem_type_p,(*vii));
                        found=true;
                    }
                    else
                    {
                        if ( (*vjj)->elem_type_p == NULL )
                        {
                            cerr << "Error. Specification incomplete. Type not found for \"" << (*vjj)->elem_name << "\"";
                            err_trace(__FILE__, __LINE__);
                        }

                        if ( (*vjj)->elem_type_p->action == choice && !(*vjj)->elem_type_p->tagid)
                        {
                            (*vii)->tag_d=-2;
                            tot_size+=_compile_tree((*vjj)->elem_type_p,(*vii));

                            if ( (*vii)->tag_d!=-2 )
                                found=true;
                            else
                                (*vii)->tag_d=0;
                                
                        } 

                        if ( !found && !(*vjj)->optional )
                        {
                            cerr << "Error. Expected in tree: " << (*vjj)->elem_name << " found: " << (*vii)->tagname;
                            err_trace(__FILE__, __LINE__);
                        }
                    }
                    vjj++;
                }
                if (!found)
                {
                    cerr << "Error. " << (*vii)->tagname << " not found in specification";
                    err_trace(__FILE__, __LINE__);
                }
            }
            for (;vjj!=tagtype_ch->end();vjj++)
            {
                if ( (*vjj)->optional == false )
                {
                    cerr << "Error. Expected in tree: " << (*vjj)->elem_name << " found: " << (*vii)->tagname;
                    err_trace(__FILE__, __LINE__);
                }
            }
        }
        else
        {
            for (vjj=tagtype_ch->begin();vjj!=tagtype_ch->end();vjj++)
            {
                if ((*vjj)->elem_type_p==NULL)
                {
                    cerr << "Error. Type for \"" << (*vjj)->elem_name << "\" not found in the specification";
                    err_trace(__FILE__, __LINE__);
                }

                if (!(*vjj)->optional)
                {
                    cerr << "Error. Expected \"" << (*vjj)->elem_name << "\" under \"" << tree->tagname << "\"";
                    err_trace(__FILE__, __LINE__);
                }
            }


            /* Tag is composed but empty */

            asnitem->tree(tree);

            tree->pc=1;
            tree->size_d=0;

            encoded_size=asnitem->encode(0).size();
            delete asnitem; 
            asnitem = NULL;
            return encoded_size;
        }
    }


    /* SEQUENCE OF */

    if (tagtype->action==sequenceof)
    {
        if (tree->children!=NULL)
        {
            for (vii=tree->children->begin();vii!=tree->children->end();vii++)
            {
                tagtype_ch=tagtype->children;

                if (tagtype_ch==NULL || tagtype_ch->size()>1)
                {
                    cerr << "Error. " << tagtype->type_name << " (SEQUENCE OF) without or with many children in specification";
                    err_trace(__FILE__, __LINE__);
                }

                tagtype_pa=(*tagtype->children)[0]->elem_type_p;

                if (tagtype_pa->action==choice && !tagtype_pa->tagid)
                    tagtype_ch=tagtype_pa->children;

                found=false;
                if (tagtype_ch!=NULL)
                {
                    for (vjj=tagtype_ch->begin();vjj!=tagtype_ch->end();vjj++)
                    {

                        if ( (*vii)->tagname == (*vjj)->elem_name )
                        {
                            (*vii)->tag_d=(*vjj)->elem_type_p->tagid;
                            (*vii)->pc=1;
                            tot_size+=_compile_tree((*vjj)->elem_type_p,(*vii));
                            found=true;
                            break;
                        }
                    }
                }
                else
                {
                    if (tagtype_pa->action==simpletype)
                    {
                        if ( (*vii)->tagname == (*tagtype->children)[0]->elem_name )
                        {
                            (*vii)->tag_d=tagtype_pa->tagid;
                            (*vii)->pc=0;
                            tot_size+=_compile_tree(tagtype_pa,(*vii));
                            found=true;
                            break;
                        }
                    }
                    else
                    {
                        cerr << "Error. " << tagtype_pa->type_name << "  without children in tree specification";
                        err_trace(__FILE__, __LINE__);
                    }
                }
                if (!found)
                {
                    cerr     << "Error. " << tree->tagname <<"("<< tree->tag_d<<")->" 
                        << (*vii)->tagname << " not found in specification under " 
                        << tagtype->type_name << "(" << tagtype->tagid << ")";
                    if (tagtype_pa->action==choice && !tagtype_pa->tagid)
                        cerr     << "->" << tagtype_pa->type_name << "("<<tagtype_pa->tagid<<")";
                    err_trace(__FILE__, __LINE__);
                }
            }
        }
        else
        {
            /* Tag is composed but empty */

            asnitem->tree(tree);

            tree->pc=1;
            tree->size_d=0;

            encoded_size=asnitem->encode(0).size();
            delete asnitem; 
            asnitem = NULL;
            return encoded_size;
        }
    }


    /* SIMPLE TYPE */

    if (tagtype->action==simpletype)
    {
        if (tree->children==NULL)
        {
            asnitem->tree(tree);

            tree->pc=0;
            tree->type=simpletypes_map[tagtype->type_type];
            tree->size_d=(*simpletypes[tree->type].encode)(*tree->value).size();

            encoded_size=asnitem->encode(0).size();
            delete asnitem; 
            asnitem = NULL;
            return encoded_size;
        }
        else
        {
            cerr << "Error. \"" << tree->tagname << "\" expected to be a simple type but got children";
            err_trace(__FILE__, __LINE__);
        }
    }


    tree->size_d=tot_size;

    asnitem->tree(tree);
    encoded_size=asnitem->encode(0).size();
    delete asnitem; 
    asnitem = NULL;
    return tree->size_d+encoded_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, 0x48(%rsp)
movl $0x48, %edi
callq 0x42d0
movq %rax, 0x30(%rsp)
movq %rax, %rdi
callq 0x12de0
movl 0x44(%r14), %eax
testl %eax, %eax
movq %rbx, 0x28(%rsp)
movq %r14, 0x40(%rsp)
je 0x10c08
movq $0x0, 0x38(%rsp)
jmp 0x11015
cmpl $-0x2, 0x24(%rbx)
jne 0x10ca0
movq 0x50(%r14), %r15
testq %r15, %r15
je 0x10ed3
movq (%r15), %r14
movq 0x8(%r15), %r12
cmpq %r12, %r14
je 0x10f5e
xorl %ebx, %ebx
movq (%r14), %r13
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdx
cmpq 0x8(%r13), %rdx
jne 0x10c65
testq %rdx, %rdx
je 0x11c22
movq (%r13), %rsi
movq 0x28(%rsp), %rax
movq (%rax), %rdi
callq 0x42f0
testl %eax, %eax
je 0x11c22
movq 0x48(%r13), %rsi
cmpl $0x0, 0x44(%rsi)
jne 0x10c92
cmpl $0x0, 0x40(%rsi)
jne 0x10c92
movq 0x28(%rsp), %rdx
movl $0xfffffffe, 0x24(%rdx) # imm = 0xFFFFFFFE
movq 0x48(%rsp), %rdi
callq 0x10bb8
addq %rax, %rbx
movq 0x8(%r15), %r12
addq $0x8, %r14
cmpq %r12, %r14
jne 0x10c31
jmp 0x11c49
movq 0x50(%rbx), %rax
testq %rax, %rax
je 0x10f65
movq (%rax), %r13
cmpq 0x8(%rax), %r13
je 0x11008
leaq 0x18(%rsp), %r15
movq $0x0, 0x38(%rsp)
movq 0x50(%r14), %r12
testq %r12, %r12
je 0x10d79
movq (%r12), %r15
cmpq 0x8(%r12), %r15
je 0x10dee
movq (%r13), %r14
xorl %ebx, %ebx
movq (%r15), %rbp
movq 0x8(%r14), %rdx
cmpq 0x8(%rbp), %rdx
jne 0x10d14
testq %rdx, %rdx
je 0x10e83
movq (%rbp), %rsi
movq (%r14), %rdi
callq 0x42f0
testl %eax, %eax
je 0x10e83
movq 0x48(%rbp), %rsi
cmpl $0x0, 0x44(%rsi)
jne 0x10d55
cmpl $0x0, 0x40(%rsi)
jne 0x10d55
movl $0xfffffffe, 0x24(%r14) # imm = 0xFFFFFFFE
movq 0x48(%rsp), %rdi
movq %r14, %rdx
callq 0x10bb8
addq %rax, 0x38(%rsp)
movq (%r13), %r14
cmpl $-0x2, 0x24(%r14)
jne 0x10d53
movl $0x0, 0x24(%r14)
jmp 0x10d55
movb $0x1, %bl
addq $0x8, %r15
cmpq 0x8(%r12), %r15
jne 0x10cea
testb $0x1, %bl
movq 0x28(%rsp), %rbx
movq 0x40(%rsp), %r14
leaq 0x18(%rsp), %r15
je 0x10df3
jmp 0x10ebc
movl $0x7, %edx
movq 0xc26b(%rip), %r12      # 0x1cff0
movq %r12, %rdi
leaq 0x605b(%rip), %rsi      # 0x16dea
callq 0x4340
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
callq 0x4340
movl $0x28, %edx
movq %rax, %rdi
leaq 0x6081(%rip), %rsi      # 0x16e33
callq 0x4340
movq %r15, 0x8(%rsp)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
leaq 0x5dea(%rip), %rsi      # 0x16bb5
leaq 0x5dea(%rip), %rdx      # 0x16bbc
callq 0x6c96
movl $0x45a, 0x4(%rsp)       # imm = 0x45A
movq %r12, %rdi
leaq 0x4(%rsp), %rsi
callq 0xcde4
jmp 0x10e6a
leaq 0x18(%rsp), %r15
movl $0x7, %edx
movq 0xc1f1(%rip), %r12      # 0x1cff0
movq %r12, %rdi
leaq 0x5fe1(%rip), %rsi      # 0x16dea
callq 0x4340
movq (%r13), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r12, %rdi
leaq 0x8(%rsp), %r12
callq 0x4340
movl $0x1b, %edx
movq %rax, %rdi
leaq 0x5fbd(%rip), %rsi      # 0x16df2
callq 0x4340
movq %r15, 0x8(%rsp)
movq %r12, %rdi
leaq 0x5d6c(%rip), %rsi      # 0x16bb5
leaq 0x5d6c(%rip), %rdx      # 0x16bbc
callq 0x6c96
movl $0x454, 0x4(%rsp)       # imm = 0x454
movq %r12, %rdi
leaq 0x4(%rsp), %rsi
callq 0xcde4
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x10ebc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x10ebc
movq 0x48(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, 0x24(%r14)
orb $0x4, 0x20(%r14)
movq (%r15), %rax
movq 0x48(%rax), %rsi
movq (%r13), %rdx
movq 0x48(%rsp), %rdi
callq 0x10bb8
addq %rax, 0x38(%rsp)
movq 0x28(%rsp), %rbx
movq 0x40(%rsp), %r14
leaq 0x18(%rsp), %r15
addq $0x8, %r13
movq 0x50(%rbx), %rax
cmpq 0x8(%rax), %r13
jne 0x10cc8
jmp 0x11011
movq 0xc116(%rip), %rbx      # 0x1cff0
leaq 0x5f09(%rip), %rsi      # 0x16dea
movl $0x7, %edx
movq %rbx, %rdi
callq 0x4340
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x4340
leaq 0x5f2f(%rip), %rsi      # 0x16e33
movl $0x28, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5c94(%rip), %rsi      # 0x16bb5
leaq 0x5c94(%rip), %rdx      # 0x16bbc
leaq 0x8(%rsp), %rdi
callq 0x6c96
leaq 0x4(%rsp), %rsi
movl $0x48b, (%rsi)          # imm = 0x48B
leaq 0x8(%rsp), %rdi
callq 0xcde4
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x10f5e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
xorl %ebx, %ebx
jmp 0x11c49
movq %rbx, %r14
movq 0xc081(%rip), %rbx      # 0x1cff0
leaq 0x5e98(%rip), %rsi      # 0x16e0e
movl $0x8, %edx
movq %rbx, %rdi
callq 0x4340
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x4340
leaq 0x5e7e(%rip), %rsi      # 0x16e17
movl $0x1a, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5bff(%rip), %rsi      # 0x16bb5
leaq 0x5bff(%rip), %rdx      # 0x16bbc
leaq 0x8(%rsp), %rdi
callq 0x6c96
leaq 0x4(%rsp), %rsi
movl $0x461, (%rsi)          # imm = 0x461
leaq 0x8(%rsp), %rdi
callq 0xcde4
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
movq 0x28(%rsp), %rbx
je 0x10ff8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq $0x0, 0x38(%rsp)
movq 0x40(%rsp), %r14
jmp 0x11011
movq $0x0, 0x38(%rsp)
movl 0x44(%r14), %eax
cmpl $0x1, %eax
jne 0x11477
movq 0x50(%r14), %r13
testq %r13, %r13
jne 0x110bb
movq 0xbfbe(%rip), %rbx      # 0x1cff0
leaq 0x5dd5(%rip), %rsi      # 0x16e0e
movl $0x8, %edx
movq %rbx, %rdi
callq 0x4340
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x4340
leaq 0x5dd6(%rip), %rsi      # 0x16e32
movl $0x29, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5b3c(%rip), %rsi      # 0x16bb5
leaq 0x5b3c(%rip), %rdx      # 0x16bbc
leaq 0x8(%rsp), %rdi
callq 0x6c96
leaq 0x4(%rsp), %rsi
movl $0x49e, (%rsi)          # imm = 0x49E
leaq 0x8(%rsp), %rdi
callq 0xcde4
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
movq 0x28(%rsp), %rbx
je 0x110bb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x50(%rbx), %rax
movq (%r13), %rbp
testq %rax, %rax
movq %r13, 0x50(%rsp)
je 0x1198a
movq (%rax), %r14
cmpq 0x8(%rax), %r14
je 0x11394
movq 0xbf0b(%rip), %rbx      # 0x1cff0
leaq 0x8(%rsp), %r15
cmpq 0x8(%r13), %rbp
je 0x112bb
movq (%r14), %r12
movq (%rbp), %r13
movq 0x8(%r12), %rdx
cmpq 0x8(%r13), %rdx
jne 0x11124
testq %rdx, %rdx
je 0x11348
movq (%r13), %rsi
movq (%r12), %rdi
callq 0x42f0
testl %eax, %eax
je 0x11348
movq 0x48(%r13), %rsi
testq %rsi, %rsi
movq 0x50(%rsp), %r13
jne 0x111ca
movl $0x35, %edx
movq %rbx, %rdi
leaq 0x5b6d(%rip), %rsi      # 0x16cb2
callq 0x4340
movq (%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5ca9(%rip), %rsi      # 0x16e15
callq 0x4340
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
leaq 0x5a30(%rip), %rsi      # 0x16bb5
leaq 0x5a30(%rip), %rdx      # 0x16bbc
callq 0x6c96
movl $0x4b7, 0x4(%rsp)       # imm = 0x4B7
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0xcde4
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x111c2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq (%rbp), %rax
movq 0x48(%rax), %rsi
cmpl $0x0, 0x44(%rsi)
jne 0x11203
cmpl $0x0, 0x40(%rsi)
jne 0x11203
movq (%r14), %rdx
movl $0xfffffffe, 0x24(%rdx) # imm = 0xFFFFFFFE
movq 0x48(%rsp), %rdi
callq 0x10bb8
addq %rax, 0x38(%rsp)
movq (%r14), %rax
cmpl $-0x2, 0x24(%rax)
jne 0x11379
movl $0x0, 0x24(%rax)
movq (%rbp), %rax
cmpb $0x0, 0x40(%rax)
jne 0x112b2
movl $0x19, %edx
movq %rbx, %rdi
leaq 0x5c3c(%rip), %rsi      # 0x16e5c
callq 0x4340
movq (%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movq %rax, %r12
movl $0x8, %edx
movq %rax, %rdi
leaq 0x5c2c(%rip), %rsi      # 0x16e76
callq 0x4340
movq (%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r12, %rdi
callq 0x4340
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
leaq 0x5940(%rip), %rsi      # 0x16bb5
leaq 0x5940(%rip), %rdx      # 0x16bbc
callq 0x6c96
movl $0x4c9, 0x4(%rsp)       # imm = 0x4C9
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0xcde4
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x112b2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
addq $0x8, %rbp
jmp 0x110ea
movl $0x7, %edx
movq %rbx, %rdi
leaq 0x5b20(%rip), %rsi      # 0x16dea
callq 0x4340
movq (%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movl $0x1b, %edx
movq %rax, %rdi
leaq 0x5b02(%rip), %rsi      # 0x16df2
callq 0x4340
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
leaq 0x58ac(%rip), %rsi      # 0x16bb5
leaq 0x58ac(%rip), %rdx      # 0x16bbc
callq 0x6c96
movl $0x4d1, 0x4(%rsp)       # imm = 0x4D1
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0xcde4
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1137d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x1137d
movq 0x48(%r13), %rax
movl 0x40(%rax), %eax
movl %eax, 0x24(%r12)
orb $0x4, 0x20(%r12)
movq (%rbp), %rax
movq 0x48(%rax), %rsi
movq (%r14), %rdx
movq 0x48(%rsp), %rdi
callq 0x10bb8
addq %rax, 0x38(%rsp)
movq 0x50(%rsp), %r13
addq $0x8, %rbp
addq $0x8, %r14
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
cmpq 0x8(%rax), %r14
jne 0x110ea
movq 0x8(%r13), %rax
cmpq %rax, %rbp
je 0x1146d
leaq 0x18(%rsp), %r13
movq 0xbc43(%rip), %rbx      # 0x1cff0
leaq 0x8(%rsp), %r12
movq (%rbp), %rcx
cmpb $0x0, 0x40(%rcx)
jne 0x11460
movl $0x19, %edx
movq %rbx, %rdi
leaq 0x5a8d(%rip), %rsi      # 0x16e5c
callq 0x4340
movq (%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movq %rax, %r15
movl $0x8, %edx
movq %rax, %rdi
leaq 0x5a7d(%rip), %rsi      # 0x16e76
callq 0x4340
movq (%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x4340
movq %r13, 0x8(%rsp)
movq %r12, %rdi
leaq 0x5796(%rip), %rsi      # 0x16bb5
leaq 0x5796(%rip), %rdx      # 0x16bbc
callq 0x6c96
movl $0x4d9, 0x4(%rsp)       # imm = 0x4D9
movq %r12, %rdi
leaq 0x4(%rsp), %rsi
callq 0xcde4
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x11457
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
addq $0x8, %rbp
cmpq %rax, %rbp
jne 0x113b2
movq 0x28(%rsp), %rbx
movq 0x40(%rsp), %r14
movl 0x44(%r14), %eax
cmpl $0x3, %eax
jne 0x1187c
movq 0x50(%rbx), %rax
testq %rax, %rax
je 0x11b17
movq (%rax), %rbp
cmpq 0x8(%rax), %rbp
je 0x11878
leaq 0x18(%rsp), %r12
leaq 0x8(%rsp), %r13
movq 0x50(%r14), %r15
testq %r15, %r15
je 0x114c5
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
cmpq $0x9, %rcx
jb 0x11551
movl $0x7, %edx
movq 0xbb1f(%rip), %rbx      # 0x1cff0
movq %rbx, %rdi
leaq 0x590f(%rip), %rsi      # 0x16dea
callq 0x4340
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x4340
movl $0x3d, %edx
movq %rax, %rdi
leaq 0x59d0(%rip), %rsi      # 0x16ece
callq 0x4340
movq %r12, 0x8(%rsp)
movq %r13, %rdi
leaq 0x56a3(%rip), %rsi      # 0x16bb5
leaq 0x56a3(%rip), %rdx      # 0x16bbc
callq 0x6c96
movl $0x50b, 0x4(%rsp)       # imm = 0x50B
movq %r13, %rdi
leaq 0x4(%rsp), %rsi
callq 0xcde4
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1154a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x50(%r14), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x48(%rax), %rdx
movl 0x44(%rdx), %ecx
testl %ecx, %ecx
jne 0x11569
cmpl $0x0, 0x40(%rdx)
jne 0x11569
movq 0x50(%rdx), %r15
testq %r15, %r15
movq %rdx, 0x50(%rsp)
je 0x115bb
movq (%r15), %r12
movq 0x8(%r15), %rbx
cmpq %rbx, %r12
je 0x116c1
movq (%rbp), %r13
movq 0x8(%r13), %r15
movq (%r12), %r14
cmpq 0x8(%r14), %r15
jne 0x115ad
testq %r15, %r15
je 0x115f3
movq (%r14), %rsi
movq (%r13), %rdi
movq %r15, %rdx
callq 0x42f0
testl %eax, %eax
je 0x115f3
addq $0x8, %r12
cmpq %rbx, %r12
jne 0x1158b
jmp 0x116c1
cmpl $0x2, %ecx
jne 0x11637
movq (%rbp), %rbx
movq 0x8(%rbx), %rdx
cmpq 0x8(%rax), %rdx
jne 0x116c1
testq %rdx, %rdx
je 0x11c66
movq (%rax), %rsi
movq (%rbx), %rdi
callq 0x42f0
testl %eax, %eax
jne 0x116c1
jmp 0x11c66
movq 0x48(%r14), %rax
movl 0x40(%rax), %eax
movl %eax, 0x24(%r13)
orb $0x4, 0x20(%r13)
movq (%r12), %rax
movq 0x48(%rax), %rsi
movq (%rbp), %rdx
movq 0x48(%rsp), %rdi
callq 0x10bb8
addq %rax, 0x38(%rsp)
movq 0x28(%rsp), %rbx
movq 0x40(%rsp), %r14
leaq 0x18(%rsp), %r12
leaq 0x8(%rsp), %r13
jmp 0x11866
movl $0x7, %edx
movq 0xb9ad(%rip), %rbx      # 0x1cff0
movq %rbx, %rdi
leaq 0x579d(%rip), %rsi      # 0x16dea
callq 0x4340
movq 0x50(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movl $0x28, %edx
movq %rax, %rdi
leaq 0x57be(%rip), %rsi      # 0x16e33
callq 0x4340
movq %r12, 0x8(%rsp)
movq %r13, %rdi
leaq 0x552c(%rip), %rsi      # 0x16bb5
leaq 0x552c(%rip), %rdx      # 0x16bbc
callq 0x6c96
movl $0x533, 0x4(%rsp)       # imm = 0x533
movq %r13, %rdi
leaq 0x4(%rsp), %rsi
callq 0xcde4
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x116c1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movl $0x7, %edx
movq 0xb923(%rip), %r14      # 0x1cff0
movq %r14, %rdi
leaq 0x5713(%rip), %rsi      # 0x16dea
callq 0x4340
movq 0x28(%rsp), %rbx
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x4340
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4a95(%rip), %r12      # 0x16197
movq %r12, %rsi
callq 0x4340
movl 0x24(%rbx), %esi
movq %r15, %rdi
callq 0x4560
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
leaq 0x57e5(%rip), %rsi      # 0x16f0c
callq 0x4340
movq (%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x4340
movq %rax, %r15
movl $0x22, %edx
movq %rax, %rdi
leaq 0x57bf(%rip), %rsi      # 0x16f10
callq 0x4340
movq 0x40(%rsp), %r14
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x4340
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x4340
movl 0x40(%r14), %esi
movq %r15, %rdi
callq 0x4560
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4586(%rip), %rsi      # 0x15d1e
callq 0x4340
movq 0x50(%rsp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x11815
cmpl $0x0, 0x40(%rax)
jne 0x11815
movq %rax, %r12
movl $0x2, %edx
movq 0xb833(%rip), %r15      # 0x1cff0
movq %r15, %rdi
leaq 0x5746(%rip), %rsi      # 0x16f0d
callq 0x4340
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x4340
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x49a8(%rip), %rsi      # 0x16197
callq 0x4340
movl 0x40(%r12), %esi
movq %r15, %rdi
callq 0x4560
movl $0x1, %edx
movq %rax, %rdi
leaq 0x450e(%rip), %rsi      # 0x15d1e
callq 0x4340
leaq 0x18(%rsp), %r12
movq %r12, 0x8(%rsp)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
leaq 0x5387(%rip), %rsi      # 0x16bb5
leaq 0x5387(%rip), %rdx      # 0x16bbc
callq 0x6c96
movl $0x53d, 0x4(%rsp)       # imm = 0x53D
movq %r13, %rdi
leaq 0x4(%rsp), %rsi
callq 0xcde4
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x11866
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
addq $0x8, %rbp
movq 0x50(%rbx), %rax
cmpq 0x8(%rax), %rbp
jne 0x114a8
movl 0x44(%r14), %eax
cmpl $0x2, %eax
jne 0x11923
cmpq $0x0, 0x50(%rbx)
je 0x11b78
movq %rbx, %r14
movq 0xb756(%rip), %rbx      # 0x1cff0
leaq 0x556d(%rip), %rsi      # 0x16e0e
movl $0x8, %edx
movq %rbx, %rdi
callq 0x4340
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x4340
leaq 0x566f(%rip), %rsi      # 0x16f33
movl $0x2f, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x52d4(%rip), %rsi      # 0x16bb5
leaq 0x52d4(%rip), %rdx      # 0x16bbc
leaq 0x8(%rsp), %rdi
callq 0x6c96
leaq 0x4(%rsp), %rsi
movl $0x566, (%rsi)          # imm = 0x566
leaq 0x8(%rsp), %rdi
callq 0xcde4
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
movq 0x28(%rsp), %rbx
je 0x11923
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x38(%rsp), %rax
movq %rax, 0x30(%rbx)
movq 0x30(%rsp), %r14
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x8(%rax)
movq (%r14), %rax
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq *0x10(%rax)
movq (%rbx), %rdi
movq 0x8(%rbx), %rbx
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1196e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movslq %ebx, %rbx
movq 0x28(%rsp), %rax
addq 0x30(%rax), %rbx
jmp 0x11c54
cmpq 0x8(%r13), %rbp
je 0x11b05
leaq 0x18(%rsp), %r13
movq 0xb650(%rip), %rbx      # 0x1cff0
leaq 0x8(%rsp), %r12
leaq 0x4(%rsp), %r14
movq (%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x11a3d
movl $0x11, %edx
movq %rbx, %rdi
leaq 0x54b7(%rip), %rsi      # 0x16e7f
callq 0x4340
movq (%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movl $0x20, %edx
movq %rax, %rdi
leaq 0x54a2(%rip), %rsi      # 0x16e91
callq 0x4340
movq %r13, 0x8(%rsp)
movq %r12, %rdi
leaq 0x51b2(%rip), %rsi      # 0x16bb5
leaq 0x51b2(%rip), %rdx      # 0x16bbc
callq 0x6c96
movl $0x4e4, 0x4(%rsp)       # imm = 0x4E4
movq %r12, %rdi
movq %r14, %rsi
callq 0xcde4
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x11a39
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq (%rbp), %rax
cmpb $0x0, 0x40(%rax)
jne 0x11af2
movl $0x11, %edx
movq %rbx, %rdi
leaq 0x545c(%rip), %rsi      # 0x16eb2
callq 0x4340
movq (%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movq %rax, %r15
movl $0x9, %edx
movq %rax, %rdi
leaq 0x5444(%rip), %rsi      # 0x16ec4
callq 0x4340
movq 0x28(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x4340
movl $0x1, %edx
movq %rax, %rdi
leaq 0x536d(%rip), %rsi      # 0x16e15
callq 0x4340
movq %r13, 0x8(%rsp)
movq %r12, %rdi
leaq 0x50f9(%rip), %rsi      # 0x16bb5
leaq 0x50f9(%rip), %rdx      # 0x16bbc
callq 0x6c96
movl $0x4ea, 0x4(%rsp)       # imm = 0x4EA
movq %r12, %rdi
movq %r14, %rsi
callq 0xcde4
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x11af2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
addq $0x8, %rbp
movq 0x50(%rsp), %rax
cmpq 0x8(%rax), %rbp
jne 0x119aa
movq 0x30(%rsp), %r14
movq (%r14), %rax
movq %r14, %rdi
movq 0x28(%rsp), %rbx
jmp 0x11b22
movq 0x30(%rsp), %r14
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x8(%rax)
orb $0x4, 0x20(%rbx)
movq $0x0, 0x30(%rbx)
movq (%r14), %rax
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq *0x10(%rax)
movq (%rbx), %rdi
movq 0x8(%rbx), %rbx
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11b65
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movslq %ebx, %rbx
jmp 0x11c54
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x8(%rax)
andb $-0x5, 0x20(%rbx)
addq $0x20, %r14
leaq 0xbd43(%rip), %rdi      # 0x1d8d8
movq %r14, %rsi
callq 0x127de
movl (%rax), %eax
movl $0xffffff07, %ecx       # imm = 0xFFFFFF07
andl 0x20(%rbx), %ecx
andl $0x1f, %eax
leal (%rcx,%rax,8), %ecx
movw %cx, 0x20(%rbx)
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
leaq 0xbd49(%rip), %rdi      # 0x1d908
callq 0x1285a
movq 0x48(%rbx), %rsi
movq %rbx, %r14
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq *0x8(%rax)
movq 0x8(%rbx), %rax
movq %rax, 0x30(%r14)
movq (%rbx), %rdi
leaq 0x18(%rsp), %r14
cmpq %r14, %rdi
je 0x11bf8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x30(%rsp), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq *0x10(%rax)
movq (%rbx), %rdi
movq 0x8(%rbx), %rbx
cmpq %r14, %rdi
jne 0x11b58
jmp 0x11b65
movq 0x48(%r13), %rax
movl 0x40(%rax), %eax
movq 0x28(%rsp), %rdx
movl %eax, 0x24(%rdx)
orb $0x4, 0x20(%rdx)
movq (%r14), %rax
movq 0x48(%rax), %rsi
movq 0x48(%rsp), %rdi
callq 0x10bb8
addq %rax, %rbx
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x50(%rsp), %rsi
movl 0x40(%rsi), %eax
movl %eax, 0x24(%rbx)
andb $-0x5, 0x20(%rbx)
movq (%rbp), %rdx
movq 0x48(%rsp), %rdi
callq 0x10bb8
addq %rax, 0x38(%rsp)
movq 0x28(%rsp), %rbx
movq 0x40(%rsp), %r14
jmp 0x11878
jmp 0x11ca3
jmp 0x11ca3
jmp 0x11d15
jmp 0x11d15
jmp 0x11ca3
jmp 0x11d15
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
jne 0x11d2c
jmp 0x11d39
jmp 0x11d15
jmp 0x11cfe
jmp 0x11d15
jmp 0x11cc1
jmp 0x11d15
jmp 0x11d15
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x11d2c
jmp 0x11d39
movq %rax, %rbx
movl $0x48, %esi
movq 0x30(%rsp), %rdi
jmp 0x11d34
jmp 0x11ce9
jmp 0x11d15
jmp 0x11d15
jmp 0x11ce9
jmp 0x11d15
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x11d2c
jmp 0x11d39
jmp 0x11cfe
jmp 0x11d15
jmp 0x11d15
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x11d2c
jmp 0x11d39
jmp 0x11d15
jmp 0x11d1a
jmp 0x11d15
jmp 0x11d1a
movq %rax, %rbx
jmp 0x11d39
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11d39
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq %rbx, %rdi
callq 0x4590
nop