// File: /workspace/github_cpp_makefile_star2_O3/tap3edit[P]tap3xml/Asn.cpp
// Function: Asn::_compile_spec(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, tagtype_s*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, tagtype_s*>>>*)
void Asn::_compile_spec(map<string,tagtype_s *> *spec_tree)
{

    vector<tagelem_s *>::iterator       vii;
    map<string,tagtype_s *>::iterator   mii;
    vector<tagelem_s *>*                children;
    map<string,int>::iterator           mjj;
    extern map<string, int>             simpletypes_map;




    /* 1. Compile. Build Tree */

    for(mii=spec_tree->begin();mii!=spec_tree->end();mii++)
    {

        if (mii->second->children==NULL )
        {
            if (mii->second->type_type.size())
            {
                if ( spec_tree->count(mii->second->type_type) )
                {
                    (*spec_tree)[mii->second->type_type]->checked=true;
                }
            }
        } 
        else 
        {

            children=mii->second->children;

            for(vii=children->begin();vii!=children->end();vii++)
            {
                if ( spec_tree->count((*vii)->elem_type) )
                {
                    (*vii)->elem_type_p=(*spec_tree)[(*vii)->elem_type];
                    (*spec_tree)[(*vii)->elem_type]->checked=true;
                }
            }
        }
    }


    /* 2. Arrange Simple types */

    /* Note: some simple types are in fact SEQUENCE or CHOICE    */
    /*       so we need to replace this simple types with their  */
    /*       SEQUENCE or CHOICE values.                          */

    for(mii=spec_tree->begin();mii!=spec_tree->end();mii++)
    {

        while ( mii->second->action==simpletype && 
            spec_tree->count(mii->second->type_type) && 
            !simpletypes_map.count(mii->second->type_type) 
        )
        {
            mii->second->children=(*spec_tree)[mii->second->type_type]->children;
            mii->second->action=(*spec_tree)[mii->second->type_type]->action;
            mii->second->type_type=(*spec_tree)[mii->second->type_type]->type_type;
            mii->second->modified=true;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq 0x18(%rsi), %r14
leaq 0x8(%rsi), %r12
cmpq %r12, %r14
je 0xe58b
movq 0x40(%r14), %rsi
movq 0x50(%rsi), %r15
testq %r15, %r15
je 0xe544
movq (%r15), %r13
cmpq 0x8(%r15), %r13
je 0xe573
movq (%r13), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x12cca
cmpq %r12, %rax
je 0xe53e
movq (%r13), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xa082
movq (%rax), %rax
movq (%r13), %rcx
movq %rax, 0x48(%rcx)
movq (%r13), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xa082
movq (%rax), %rax
movb $0x1, 0x48(%rax)
addq $0x8, %r13
jmp 0xe4f1
cmpq $0x0, 0x28(%rsi)
je 0xe573
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x12cca
cmpq %r12, %rax
je 0xe573
movq 0x40(%r14), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xa082
movq (%rax), %rax
movb $0x1, 0x48(%rax)
movq %r14, %rdi
callq 0x41f0
movq %rax, %r14
cmpq %r12, %rax
jne 0xe4e1
movq 0x18(%rbx), %r14
cmpq %r12, %r14
je 0xe64c
leaq 0xf33d(%rip), %r15      # 0x1d8d8
leaq 0x8(%r15), %r13
movq 0x40(%r14), %rsi
cmpl $0x2, 0x44(%rsi)
jne 0xe638
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x12cca
cmpq %r12, %rax
je 0xe638
movq 0x40(%r14), %rsi
addq $0x20, %rsi
movq %r15, %rdi
callq 0x12d54
cmpq %r13, %rax
jne 0xe638
movq 0x40(%r14), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xa082
movq (%rax), %rax
movq 0x50(%rax), %rax
movq 0x40(%r14), %rsi
movq %rax, 0x50(%rsi)
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xa082
movq (%rax), %rax
movl 0x44(%rax), %eax
movq 0x40(%r14), %rsi
movl %eax, 0x44(%rsi)
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xa082
movq (%rax), %rsi
addq $0x20, %rsi
movq 0x40(%r14), %rdi
addq $0x20, %rdi
callq 0x4180
movq 0x40(%r14), %rsi
movb $0x1, 0x49(%rsi)
jmp 0xe5a3
movq %r14, %rdi
callq 0x41f0
movq %rax, %r14
cmpq %r12, %rax
jne 0xe59f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq