// File: /workspace/github_cpp_makefile_star2_O2/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 0xc32d
movq 0x40(%r14), %rsi
movq 0x50(%rsi), %r15
testq %r15, %r15
je 0xc2ee
movq (%r15), %r13
cmpq 0x8(%r15), %r13
je 0xc31d
movq (%r13), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xf4f8
testq %rax, %rax
je 0xc2e8
movq (%r13), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x8bf6
movq (%rax), %rax
movq (%r13), %rcx
movq %rax, 0x48(%rcx)
movq (%r13), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x8bf6
movq (%rax), %rax
movb $0x1, 0x48(%rax)
addq $0x8, %r13
jmp 0xc29b
cmpq $0x0, 0x28(%rsi)
je 0xc31d
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xf4f8
testq %rax, %rax
je 0xc31d
movq 0x40(%r14), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x8bf6
movq (%rax), %rax
movb $0x1, 0x48(%rax)
movq %r14, %rdi
callq 0x41e0
movq %rax, %r14
jmp 0xc282
movq 0x18(%rbx), %r15
leaq 0xe5a0(%rip), %r14      # 0x1a8d8
cmpq %r12, %r15
je 0xc3ea
movq 0x40(%r15), %rsi
cmpl $0x2, 0x44(%rsi)
jne 0xc3da
addq $0x20, %rsi
movq %rbx, %rdi
callq 0xf4f8
testq %rax, %rax
je 0xc3da
movq 0x40(%r15), %rsi
addq $0x20, %rsi
movq %r14, %rdi
callq 0xf512
testq %rax, %rax
jne 0xc3da
movq 0x40(%r15), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x8bf6
movq (%rax), %rax
movq 0x50(%rax), %rax
movq 0x40(%r15), %rsi
movq %rax, 0x50(%rsi)
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x8bf6
movq (%rax), %rax
movl 0x44(%rax), %eax
movq 0x40(%r15), %rsi
movl %eax, 0x44(%rsi)
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x8bf6
movq (%rax), %rsi
addq $0x20, %rsi
movq 0x40(%r15), %rdi
addq $0x20, %rdi
callq 0x4180
movq 0x40(%r15), %rsi
movb $0x1, 0x49(%rsi)
jmp 0xc345
movq %r15, %rdi
callq 0x41e0
movq %rax, %r15
jmp 0xc338
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq