// File: /workspace/github_cpp_makefile_star2_O1/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 0xec21
movq 0x40(%r14), %rsi
movq 0x50(%rsi), %r15
testq %r15, %r15
je 0xebde
movq (%r15), %r13
cmpq 0x8(%r15), %r13
je 0xec0d
movq (%r13), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x133b2
cmpq %r12, %rax
je 0xebd8
movq (%r13), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xa304
movq (%rax), %rax
movq (%r13), %rcx
movq %rax, 0x48(%rcx)
movq (%r13), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xa304
movq (%rax), %rax
movb $0x1, 0x48(%rax)
addq $0x8, %r13
jmp 0xeb8b
cmpq $0x0, 0x28(%rsi)
je 0xec0d
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x133b2
cmpq %r12, %rax
je 0xec0d
movq 0x40(%r14), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xa304
movq (%rax), %rax
movb $0x1, 0x48(%rax)
movq %r14, %rdi
callq 0x41f0
movq %rax, %r14
cmpq %r12, %rax
jne 0xeb7b
movq 0x18(%rbx), %r14
cmpq %r12, %r14
je 0xece6
leaq 0xeca3(%rip), %r15      # 0x1d8d8
leaq 0x8(%r15), %r13
movq 0x40(%r14), %rsi
cmpl $0x2, 0x44(%rsi)
jne 0xecd2
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x133b2
cmpq %r12, %rax
je 0xecd2
movq 0x40(%r14), %rsi
addq $0x20, %rsi
movq %r15, %rdi
callq 0x1343c
cmpq %r13, %rax
jne 0xecd2
movq 0x40(%r14), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xa304
movq (%rax), %rax
movq 0x50(%rax), %rax
movq 0x40(%r14), %rsi
movq %rax, 0x50(%rsi)
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xa304
movq (%rax), %rax
movl 0x44(%rax), %eax
movq 0x40(%r14), %rsi
movl %eax, 0x44(%rsi)
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xa304
movq (%rax), %rsi
addq $0x20, %rsi
movq 0x40(%r14), %rdi
addq $0x20, %rdi
callq 0x4180
movq 0x40(%r14), %rsi
movb $0x1, 0x49(%rsi)
jmp 0xec3d
movq %r14, %rdi
callq 0x41f0
movq %rax, %r14
cmpq %r12, %rax
jne 0xec39
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq