// File: /workspace/github_cpp_makefile_star2_O1/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, %r13
movq %rsi, %r14
movq %rdi, 0x40(%rsp)
movl $0x48, %edi
callq 0x42d0
movq %rax, 0x28(%rsp)
movq %rax, %rdi
callq 0x134c8
cmpl $0x0, 0x44(%r14)
movq %r13, 0x30(%rsp)
movq %r14, 0x48(%rsp)
je 0x11c93
movq $0x0, 0x38(%rsp)
cmpl $0x1, 0x44(%r14)
jne 0x11779
movq 0x50(%r14), %rbp
testq %rbp, %rbp
jne 0x1137f
movq 0xbcf5(%rip), %rbx      # 0x1cff0
leaq 0x5b0c(%rip), %rsi      # 0x16e0e
movl $0x8, %edx
movq %rbx, %rdi
callq 0x4340
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x4340
leaq 0x5b0d(%rip), %rsi      # 0x16e32
movl $0x29, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5873(%rip), %rsi      # 0x16bb5
leaq 0x5873(%rip), %rdx      # 0x16bbc
leaq 0x8(%rsp), %rdi
callq 0x6e3c
leaq 0x4(%rsp), %rsi
movl $0x49e, (%rsi)          # imm = 0x49E
leaq 0x8(%rsp), %rdi
callq 0xd138
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1137f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x50(%r13), %rax
movq (%rbp), %r12
testq %rax, %rax
je 0x11f54
movq %r13, %rcx
movq %rbp, 0x50(%rsp)
movq (%rax), %r13
movq 0x50(%rcx), %rax
cmpq 0x8(%rax), %r13
je 0x11695
leaq 0x8(%rsp), %rbp
movq 0x50(%rsp), %rax
cmpq 0x8(%rax), %r12
je 0x115e0
xorl %ebx, %ebx
movq (%r13), %r15
movq (%r12), %r14
movq 0x8(%r15), %rdx
cmpq 0x8(%r14), %rdx
jne 0x113ed
testq %rdx, %rdx
je 0x114cf
movq (%r14), %rsi
movq (%r15), %rdi
callq 0x42f0
testl %eax, %eax
je 0x114cf
cmpq $0x0, 0x48(%r14)
jne 0x1148e
movq %rbp, %r15
movl $0x35, %edx
movq 0xbbe9(%rip), %r14      # 0x1cff0
movq %r14, %rdi
leaq 0x58a1(%rip), %rsi      # 0x16cb2
callq 0x4340
movq (%r12), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
callq 0x4340
movl $0x1, %edx
movq %rax, %rdi
leaq 0x59dd(%rip), %rsi      # 0x16e15
callq 0x4340
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x5764(%rip), %rsi      # 0x16bb5
leaq 0x5764(%rip), %rdx      # 0x16bbc
callq 0x6e3c
movl $0x4b7, 0x4(%rsp)       # imm = 0x4B7
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0xd138
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1148e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq (%r12), %rax
movq 0x48(%rax), %rsi
cmpl $0x0, 0x44(%rsi)
jne 0x11503
cmpl $0x0, 0x40(%rsi)
jne 0x11503
movq (%r13), %rdx
movl $0xfffffffe, 0x24(%rdx) # imm = 0xFFFFFFFE
movq 0x40(%rsp), %rdi
callq 0x1128e
addq %rax, 0x38(%rsp)
movq (%r13), %rax
cmpl $-0x2, 0x24(%rax)
jne 0x11501
movl $0x0, 0x24(%rax)
jmp 0x11503
movq 0x48(%r14), %rax
movl 0x40(%rax), %eax
movl %eax, 0x24(%r15)
orb $0x4, 0x20(%r15)
movq (%r12), %rax
movq 0x48(%rax), %rsi
movq (%r13), %rdx
movq 0x40(%rsp), %rdi
callq 0x1128e
addq %rax, 0x38(%rsp)
movb $0x1, %bl
jmp 0x115c6
movb $0x1, %bl
testb $0x1, %bl
jne 0x115c6
movq (%r12), %rax
cmpb $0x0, 0x40(%rax)
jne 0x115c6
movl $0x19, %edx
movq 0xbaca(%rip), %r14      # 0x1cff0
movq %r14, %rdi
leaq 0x592c(%rip), %rsi      # 0x16e5c
callq 0x4340
movq (%r12), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
callq 0x4340
movq %rax, %r15
movl $0x8, %edx
movq %rax, %rdi
leaq 0x591c(%rip), %rsi      # 0x16e76
callq 0x4340
movq (%r13), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x4340
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %r14
movq %rbp, %rdi
leaq 0x562c(%rip), %rsi      # 0x16bb5
leaq 0x562c(%rip), %rdx      # 0x16bbc
callq 0x6e3c
movl $0x4c9, 0x4(%rsp)       # imm = 0x4C9
movq %r14, %rdi
leaq 0x4(%rsp), %rsi
callq 0xd138
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x115c6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
addq $0x8, %r12
movq 0x50(%rsp), %rax
cmpq 0x8(%rax), %r12
je 0x115e2
testb $0x1, %bl
je 0x113bf
jmp 0x115e2
xorl %ebx, %ebx
testb $0x1, %bl
jne 0x1167e
movl $0x7, %edx
movq 0xb9f9(%rip), %rbx      # 0x1cff0
movq %rbx, %rdi
leaq 0x57e9(%rip), %rsi      # 0x16dea
callq 0x4340
movq (%r13), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movl $0x1b, %edx
movq %rax, %rdi
leaq 0x57ca(%rip), %rsi      # 0x16df2
callq 0x4340
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x5574(%rip), %rsi      # 0x16bb5
leaq 0x5574(%rip), %rdx      # 0x16bbc
callq 0x6e3c
movl $0x4d1, 0x4(%rsp)       # imm = 0x4D1
movq %rbp, %rdi
leaq 0x4(%rsp), %rsi
callq 0xd138
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1167e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
addq $0x8, %r13
movq 0x30(%rsp), %rax
movq 0x50(%rax), %rax
cmpq 0x8(%rax), %r13
jne 0x113ae
movq 0x50(%rsp), %rbp
cmpq 0x8(%rbp), %r12
je 0x1176f
leaq 0x18(%rsp), %r15
leaq 0x8(%rsp), %r14
movq (%r12), %rax
cmpb $0x0, 0x40(%rax)
jne 0x11761
movl $0x19, %edx
movq 0xb928(%rip), %rbx      # 0x1cff0
movq %rbx, %rdi
leaq 0x578a(%rip), %rsi      # 0x16e5c
callq 0x4340
movq (%r12), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movq %r15, %rbx
movq %rax, %r15
movl $0x8, %edx
movq %rax, %rdi
leaq 0x5777(%rip), %rsi      # 0x16e76
callq 0x4340
movq (%r13), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
movq %rbx, %r15
callq 0x4340
movq %rbx, 0x8(%rsp)
movq %r14, %rdi
leaq 0x548c(%rip), %rsi      # 0x16bb5
leaq 0x548c(%rip), %rdx      # 0x16bbc
callq 0x6e3c
movl $0x4d9, 0x4(%rsp)       # imm = 0x4D9
movq %r14, %rdi
leaq 0x4(%rsp), %rsi
callq 0xd138
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x11761
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
addq $0x8, %r12
cmpq 0x8(%rbp), %r12
jne 0x116ae
movq 0x30(%rsp), %r13
movq 0x48(%rsp), %r14
cmpl $0x3, 0x44(%r14)
jne 0x11b8f
movq 0x50(%r13), %rax
testq %rax, %rax
je 0x120ed
movq (%rax), %rbp
movq 0x50(%r13), %rax
cmpq 0x8(%rax), %rbp
je 0x11b8f
leaq 0x18(%rsp), %rbx
movq 0x50(%r14), %r15
testq %r15, %r15
je 0x117c1
movq 0x8(%r15), %rax
subq (%r15), %rax
cmpq $0x9, %rax
jb 0x1184b
movl $0x7, %edx
movq 0xb823(%rip), %r12      # 0x1cff0
movq %r12, %rdi
leaq 0x5613(%rip), %rsi      # 0x16dea
callq 0x4340
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
leaq 0x8(%rsp), %r12
callq 0x4340
movl $0x3d, %edx
movq %rax, %rdi
leaq 0x56cf(%rip), %rsi      # 0x16ece
callq 0x4340
movq %rbx, 0x8(%rsp)
movq %r12, %rdi
leaq 0x53a2(%rip), %rsi      # 0x16bb5
leaq 0x53a2(%rip), %rdx      # 0x16bbc
callq 0x6e3c
movl $0x50b, 0x4(%rsp)       # imm = 0x50B
movq %r12, %rdi
leaq 0x4(%rsp), %rsi
callq 0xd138
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1184b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x50(%r14), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x48(%rax), %r12
movl 0x44(%r12), %ecx
testl %ecx, %ecx
jne 0x1186f
cmpl $0x0, 0x40(%r12)
jne 0x1186f
movq 0x50(%r12), %r15
testq %r15, %r15
movq %r12, 0x50(%rsp)
je 0x118bb
movq (%r15), %r13
movq 0x8(%r15), %r12
cmpq %r12, %r13
je 0x11904
movq (%rbp), %rbx
movq 0x8(%rbx), %r15
movq (%r13), %r14
cmpq 0x8(%r14), %r15
jne 0x118ae
testq %r15, %r15
je 0x1190d
movq (%r14), %rsi
movq (%rbx), %rdi
movq %r15, %rdx
callq 0x42f0
testl %eax, %eax
je 0x1190d
addq $0x8, %r13
cmpq %r12, %r13
jne 0x1188d
xorl %eax, %eax
jmp 0x11938
cmpl $0x2, %ecx
jne 0x11951
movq (%rbp), %rbx
movq 0x8(%rbx), %rdx
cmpq 0x8(%rax), %rdx
movq 0x30(%rsp), %r13
leaq 0x8(%rsp), %r12
jne 0x118f8
testq %rdx, %rdx
je 0x1236f
movq (%rax), %rsi
movq (%rbx), %rdi
callq 0x42f0
testl %eax, %eax
je 0x1236f
xorl %eax, %eax
leaq 0x18(%rsp), %rbx
jmp 0x119e4
xorl %eax, %eax
movq 0x30(%rsp), %r13
jmp 0x11947
movq 0x48(%r14), %rax
movl 0x40(%rax), %eax
movl %eax, 0x24(%rbx)
orb $0x4, 0x20(%rbx)
movq (%r13), %rax
movq 0x48(%rax), %rsi
movq (%rbp), %rdx
movq 0x40(%rsp), %rdi
callq 0x1128e
addq %rax, 0x38(%rsp)
movb $0x1, %al
movq 0x30(%rsp), %r13
movq 0x48(%rsp), %r14
leaq 0x18(%rsp), %rbx
leaq 0x8(%rsp), %r12
jmp 0x119e4
movl $0x7, %edx
movq 0xb693(%rip), %r15      # 0x1cff0
movq %r15, %rdi
leaq 0x5483(%rip), %rsi      # 0x16dea
callq 0x4340
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x4340
movl $0x28, %edx
movq %rax, %rdi
leaq 0x54a7(%rip), %rsi      # 0x16e33
callq 0x4340
movq %rbx, 0x8(%rsp)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
leaq 0x5210(%rip), %rsi      # 0x16bb5
leaq 0x5210(%rip), %rdx      # 0x16bbc
callq 0x6e3c
movq 0x30(%rsp), %r13
movl $0x533, 0x4(%rsp)       # imm = 0x533
movq %r12, %rdi
leaq 0x4(%rsp), %rsi
callq 0xd138
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x119e2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
xorl %eax, %eax
testb %al, %al
jne 0x11b7d
movl $0x7, %edx
movq 0xb5f8(%rip), %r15      # 0x1cff0
movq %r15, %rdi
leaq 0x53e8(%rip), %rsi      # 0x16dea
callq 0x4340
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r15, %rdi
callq 0x4340
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4768(%rip), %rbx      # 0x16191
movq %rbx, %rsi
callq 0x4340
movl 0x24(%r13), %esi
movq %r15, %rdi
callq 0x4560
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
leaq 0x54bd(%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 0x5497(%rip), %rsi      # 0x16f10
callq 0x4340
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x4340
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4340
movl 0x40(%r14), %esi
movq %r15, %rdi
callq 0x4560
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4263(%rip), %rsi      # 0x15d1e
callq 0x4340
movq 0x50(%rsp), %rbx
cmpl $0x0, 0x44(%rbx)
jne 0x11b31
cmpl $0x0, 0x40(%rbx)
jne 0x11b31
movl $0x2, %edx
movq 0xb513(%rip), %r15      # 0x1cff0
movq %r15, %rdi
leaq 0x5426(%rip), %rsi      # 0x16f0d
callq 0x4340
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0x4340
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4684(%rip), %rsi      # 0x16191
callq 0x4340
movl 0x40(%rbx), %esi
movq %r15, %rdi
callq 0x4560
movl $0x1, %edx
movq %rax, %rdi
leaq 0x41f2(%rip), %rsi      # 0x15d1e
callq 0x4340
leaq 0x18(%rsp), %rbx
movq %rbx, 0x8(%rsp)
movq %r12, %rdi
leaq 0x5070(%rip), %rsi      # 0x16bb5
leaq 0x5070(%rip), %rdx      # 0x16bbc
callq 0x6e3c
movl $0x53d, 0x4(%rsp)       # imm = 0x53D
movq %r12, %rdi
leaq 0x4(%rsp), %rsi
callq 0xd138
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x11b7d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
addq $0x8, %rbp
movq 0x50(%r13), %rax
cmpq 0x8(%rax), %rbp
jne 0x117a7
cmpl $0x2, 0x44(%r14)
jne 0x11c31
cmpq $0x0, 0x50(%r13)
je 0x1214f
movq 0xb444(%rip), %rbx      # 0x1cff0
leaq 0x525b(%rip), %rsi      # 0x16e0e
movl $0x8, %edx
movq %rbx, %rdi
callq 0x4340
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
callq 0x4340
leaq 0x535c(%rip), %rsi      # 0x16f33
movl $0x2f, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x4fc1(%rip), %rsi      # 0x16bb5
leaq 0x4fc1(%rip), %rdx      # 0x16bbc
leaq 0x8(%rsp), %rdi
callq 0x6e3c
leaq 0x4(%rsp), %rsi
movl $0x566, (%rsi)          # imm = 0x566
leaq 0x8(%rsp), %rdi
callq 0xd138
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x11c31
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x38(%rsp), %rax
movq %rax, 0x30(%r13)
movq 0x28(%rsp), %r14
movq (%r14), %rax
movq %r14, %rdi
movq %r13, %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 0x11c7c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movslq %ebx, %rbx
addq 0x30(%r13), %rbx
jmp 0x1235d
cmpl $-0x2, 0x24(%r13)
jne 0x11d1e
movq 0x50(%r14), %r15
testq %r15, %r15
je 0x121f9
movq (%r15), %r14
cmpq 0x8(%r15), %r14
je 0x12284
xorl %ebx, %ebx
movq (%r14), %r12
movq 0x8(%r13), %rdx
cmpq 0x8(%r12), %rdx
jne 0x11ce6
testq %rdx, %rdx
je 0x1232a
movq (%r12), %rsi
movq (%r13), %rdi
callq 0x42f0
testl %eax, %eax
je 0x1232a
movq 0x48(%r12), %rsi
cmpl $0x0, 0x44(%rsi)
jne 0x11d0f
cmpl $0x0, 0x40(%rsi)
jne 0x11d0f
movl $0xfffffffe, 0x24(%r13) # imm = 0xFFFFFFFE
movq 0x40(%rsp), %rdi
movq %r13, %rdx
callq 0x1128e
addq %rax, %rbx
addq $0x8, %r14
cmpq 0x8(%r15), %r14
jne 0x11cba
jmp 0x12352
movq 0x50(%r13), %rax
testq %rax, %rax
je 0x1228b
movq (%rax), %r12
movq 0x50(%r13), %rax
cmpq 0x8(%rax), %r12
je 0x112d3
leaq 0x18(%rsp), %r15
movq $0x0, 0x38(%rsp)
movq 0x50(%r14), %rbx
testq %rbx, %rbx
je 0x11de5
movq (%rbx), %r13
cmpq 0x8(%rbx), %r13
je 0x11e5d
xorl %r15d, %r15d
movq (%r12), %r14
movq (%r13), %rbp
movq 0x8(%r14), %rdx
cmpq 0x8(%rbp), %rdx
jne 0x11d96
testq %rdx, %rdx
je 0x11e62
movq (%rbp), %rsi
movq (%r14), %rdi
callq 0x42f0
testl %eax, %eax
je 0x11e62
movq 0x48(%rbp), %rsi
cmpl $0x0, 0x44(%rsi)
jne 0x11dd6
cmpl $0x0, 0x40(%rsi)
jne 0x11dd6
movl $0xfffffffe, 0x24(%r14) # imm = 0xFFFFFFFE
movq 0x40(%rsp), %rdi
movq %r14, %rdx
callq 0x1128e
addq %rax, 0x38(%rsp)
movq (%r12), %rax
cmpl $-0x2, 0x24(%rax)
jne 0x11dd3
movl $0x0, 0x24(%rax)
jmp 0x11dd6
movb $0x1, %r15b
addq $0x8, %r13
cmpq 0x8(%rbx), %r13
jne 0x11d67
jmp 0x11e90
movl $0x7, %edx
movq 0xb1ff(%rip), %rbx      # 0x1cff0
movq %rbx, %rdi
leaq 0x4fef(%rip), %rsi      # 0x16dea
callq 0x4340
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x4340
movl $0x28, %edx
movq %rax, %rdi
leaq 0x5015(%rip), %rsi      # 0x16e33
callq 0x4340
movq %r15, 0x8(%rsp)
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x4d7e(%rip), %rsi      # 0x16bb5
leaq 0x4d7e(%rip), %rdx      # 0x16bbc
callq 0x6e3c
movl $0x45a, 0x4(%rsp)       # imm = 0x45A
movq %rbx, %rdi
leaq 0x4(%rsp), %rsi
callq 0xd138
jmp 0x11f26
xorl %r15d, %r15d
jmp 0x11e95
movq 0x48(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, 0x24(%r14)
orb $0x4, 0x20(%r14)
movq (%r13), %rax
movq 0x48(%rax), %rsi
movq (%r12), %rdx
movq 0x40(%rsp), %rdi
callq 0x1128e
addq %rax, 0x38(%rsp)
movb $0x1, %r15b
movq 0x48(%rsp), %r14
testb $0x1, %r15b
movq 0x30(%rsp), %r13
je 0x11eaa
leaq 0x18(%rsp), %r15
jmp 0x11f3d
movl $0x7, %edx
movq 0xb13a(%rip), %rbx      # 0x1cff0
movq %rbx, %rdi
leaq 0x4f2a(%rip), %rsi      # 0x16dea
callq 0x4340
movq (%r12), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movl $0x1b, %edx
movq %rax, %rdi
leaq 0x4f0b(%rip), %rsi      # 0x16df2
callq 0x4340
leaq 0x18(%rsp), %r15
movq %r15, 0x8(%rsp)
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x4cb0(%rip), %rsi      # 0x16bb5
leaq 0x4cb0(%rip), %rdx      # 0x16bbc
callq 0x6e3c
movl $0x454, 0x4(%rsp)       # imm = 0x454
movq %rbx, %rdi
leaq 0x4(%rsp), %rsi
callq 0xd138
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x11f3d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
addq $0x8, %r12
movq 0x50(%r13), %rax
cmpq 0x8(%rax), %r12
jne 0x11d4a
jmp 0x112dc
cmpq 0x8(%rbp), %r12
je 0x120c9
leaq 0x18(%rsp), %r14
movq 0xb086(%rip), %rbx      # 0x1cff0
leaq 0x8(%rsp), %r13
movq (%r12), %rax
cmpq $0x0, 0x48(%rax)
jne 0x12000
movl $0x11, %edx
movq %rbx, %rdi
leaq 0x4ef2(%rip), %rsi      # 0x16e7f
callq 0x4340
movq (%r12), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movl $0x20, %edx
movq %rax, %rdi
leaq 0x4edd(%rip), %rsi      # 0x16e91
callq 0x4340
movq %r14, 0x8(%rsp)
movq %r13, %rdi
leaq 0x4bed(%rip), %rsi      # 0x16bb5
leaq 0x4bed(%rip), %rdx      # 0x16bbc
callq 0x6e3c
movl $0x4e4, 0x4(%rsp)       # imm = 0x4E4
movq %r13, %rdi
leaq 0x4(%rsp), %rsi
callq 0xd138
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x12000
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq (%r12), %rax
cmpb $0x0, 0x40(%rax)
jne 0x120bb
movl $0x11, %edx
movq %rbx, %rdi
leaq 0x4e95(%rip), %rsi      # 0x16eb2
callq 0x4340
movq (%r12), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movq %rax, %r15
movl $0x9, %edx
movq %rax, %rdi
leaq 0x4e7d(%rip), %rsi      # 0x16ec4
callq 0x4340
movq 0x30(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x4340
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4da6(%rip), %rsi      # 0x16e15
callq 0x4340
movq %r14, 0x8(%rsp)
movq %r13, %rdi
leaq 0x4b32(%rip), %rsi      # 0x16bb5
leaq 0x4b32(%rip), %rdx      # 0x16bbc
callq 0x6e3c
movl $0x4ea, 0x4(%rsp)       # imm = 0x4EA
movq %r13, %rdi
leaq 0x4(%rsp), %rsi
callq 0xd138
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x120bb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
addq $0x8, %r12
cmpq 0x8(%rbp), %r12
jne 0x11f6f
movq 0x28(%rsp), %r14
movq (%r14), %rax
movq %r14, %rdi
movq 0x30(%rsp), %rbx
movq %rbx, %rsi
callq *0x8(%rax)
orb $0x4, 0x20(%rbx)
movq $0x0, 0x30(%rbx)
jmp 0x1210b
movq 0x28(%rsp), %r14
movq (%r14), %rax
movq %r14, %rdi
movq %r13, %rsi
callq *0x8(%rax)
orb $0x4, 0x20(%r13)
movq $0x0, 0x30(%r13)
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 0x1213c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movslq %ebx, %rbx
jmp 0x1235d
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
movq %r13, %rsi
callq *0x8(%rax)
andb $-0x5, 0x20(%r13)
addq $0x20, %r14
leaq 0xb76b(%rip), %rdi      # 0x1d8d8
movq %r14, %rsi
callq 0x12ec8
movl (%rax), %eax
movl $0xffffff07, %ecx       # imm = 0xFFFFFF07
andl 0x20(%r13), %ecx
andl $0x1f, %eax
leal (%rcx,%rax,8), %ecx
movw %cx, 0x20(%r13)
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
leaq 0xb76f(%rip), %rdi      # 0x1d908
callq 0x12f44
movq 0x48(%r13), %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq *0x8(%rax)
movq 0x8(%rbx), %rax
movq %rax, 0x30(%r13)
movq (%rbx), %rdi
leaq 0x18(%rsp), %r14
cmpq %r14, %rdi
je 0x121cf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x28(%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 0x1212f
jmp 0x1213c
movq 0xadf0(%rip), %rbx      # 0x1cff0
leaq 0x4be3(%rip), %rsi      # 0x16dea
movl $0x7, %edx
movq %rbx, %rdi
callq 0x4340
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x4340
leaq 0x4c09(%rip), %rsi      # 0x16e33
movl $0x28, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x496e(%rip), %rsi      # 0x16bb5
leaq 0x496e(%rip), %rdx      # 0x16bbc
leaq 0x8(%rsp), %rdi
callq 0x6e3c
leaq 0x4(%rsp), %rsi
movl $0x48b, (%rsi)          # imm = 0x48B
leaq 0x8(%rsp), %rdi
callq 0xd138
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x12284
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
xorl %ebx, %ebx
jmp 0x12352
movq 0xad5e(%rip), %rbx      # 0x1cff0
leaq 0x4b75(%rip), %rsi      # 0x16e0e
movl $0x8, %edx
movq %rbx, %rdi
callq 0x4340
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
callq 0x4340
leaq 0x4b5a(%rip), %rsi      # 0x16e17
movl $0x1a, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x48db(%rip), %rsi      # 0x16bb5
leaq 0x48db(%rip), %rdx      # 0x16bbc
leaq 0x8(%rsp), %rdi
callq 0x6e3c
leaq 0x4(%rsp), %rsi
movl $0x461, (%rsi)          # imm = 0x461
leaq 0x8(%rsp), %rdi
callq 0xd138
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x12317
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq $0x0, 0x38(%rsp)
movq 0x48(%rsp), %r14
jmp 0x112dc
movq 0x48(%r12), %rax
movl 0x40(%rax), %eax
movl %eax, 0x24(%r13)
orb $0x4, 0x20(%r13)
movq (%r14), %rax
movq 0x48(%rax), %rsi
movq 0x40(%rsp), %rdi
movq %r13, %rdx
callq 0x1128e
addq %rax, %rbx
movq 0x28(%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 0x40(%rsp), %rdi
callq 0x1128e
addq %rax, 0x38(%rsp)
jmp 0x11b8f
jmp 0x123d3
jmp 0x123d3
jmp 0x12434
jmp 0x12434
jmp 0x123d3
jmp 0x12434
jmp 0x123d3
jmp 0x12434
jmp 0x123f9
jmp 0x12434
jmp 0x123e8
jmp 0x12434
jmp 0x12434
jmp 0x123e8
movq %rax, %rbx
movl $0x48, %esi
movq 0x28(%rsp), %rdi
jmp 0x1242d
jmp 0x123d3
jmp 0x12434
jmp 0x12434
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
jne 0x12425
jmp 0x12437
jmp 0x123f9
jmp 0x12434
jmp 0x12434
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x12425
jmp 0x12437
jmp 0x12434
movq %rbx, %rcx
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rcx, %rdi
jne 0x12425
jmp 0x12437
jmp 0x12413
jmp 0x12434
jmp 0x12413
jmp 0x12434
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x12437
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x12437
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4590
nop