// File: 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 %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x1edd0
leaq -0x20(%rbp), %rdi
callq 0x1f070
leaq -0x30(%rbp), %rdi
callq 0x1f090
movq -0x10(%rbp), %rdi
callq 0x1f0b0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0xf5a0
movq %rax, -0x40(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1f0e0
testb $0x1, %al
jne 0x18656
jmp 0x18802
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq 0x20(%rax), %rax
cmpq $0x0, 0x50(%rax)
jne 0x186e4
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq 0x20(%rax), %rdi
addq $0x20, %rdi
callq 0x4250
cmpq $0x0, %rax
je 0x186df
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq -0x80(%rbp), %rdi
movq 0x20(%rax), %rsi
addq $0x20, %rsi
callq 0x1f130
cmpq $0x0, %rax
je 0x186dd
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq -0x88(%rbp), %rdi
movq 0x20(%rax), %rsi
addq $0x20, %rsi
callq 0xf160
movq (%rax), %rax
movb $0x1, 0x48(%rax)
jmp 0x186df
jmp 0x187ec
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq 0x20(%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x10a10
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
callq 0x108a0
movq %rax, -0x50(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x1edf0
testb $0x1, %al
jne 0x18731
jmp 0x187ea
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x1ee30
movq -0x90(%rbp), %rdi
movq (%rax), %rsi
addq $0x20, %rsi
callq 0x1f130
cmpq $0x0, %rax
je 0x187d4
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x1ee30
movq -0xa8(%rbp), %rdi
movq (%rax), %rsi
addq $0x20, %rsi
callq 0xf160
movq (%rax), %rax
movq %rax, -0xa0(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x1ee30
movq -0xa0(%rbp), %rcx
movq (%rax), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x1ee30
movq -0x98(%rbp), %rdi
movq (%rax), %rsi
addq $0x20, %rsi
callq 0xf160
movq (%rax), %rax
movb $0x1, 0x48(%rax)
jmp 0x187d6
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1ee50
movq %rax, -0x58(%rbp)
jmp 0x1870e
jmp 0x187ec
jmp 0x187ee
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x1f190
movq %rax, -0x60(%rbp)
jmp 0x18633
movq -0x10(%rbp), %rdi
callq 0x1f0b0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0xf5a0
movq %rax, -0x70(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x1f0e0
testb $0x1, %al
jne 0x1883a
jmp 0x189e2
jmp 0x1883c
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq 0x20(%rax), %rcx
xorl %eax, %eax
cmpl $0x2, 0x44(%rcx)
movb %al, -0xa9(%rbp)
jne 0x188bc
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq -0xb8(%rbp), %rdi
movq 0x20(%rax), %rsi
addq $0x20, %rsi
callq 0x1f130
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0xa9(%rbp)
je 0x188bc
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq 0x20(%rax), %rsi
addq $0x20, %rsi
leaq 0x19120(%rip), %rdi     # 0x319c8
callq 0x1f1d0
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
movb %al, -0xa9(%rbp)
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x188cb
jmp 0x189cc
movq -0x10(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq -0xe8(%rbp), %rdi
movq 0x20(%rax), %rsi
addq $0x20, %rsi
callq 0xf160
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0xe0(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq -0xe0(%rbp), %rcx
movq 0x20(%rax), %rax
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq -0xd8(%rbp), %rdi
movq 0x20(%rax), %rsi
addq $0x20, %rsi
callq 0xf160
movq (%rax), %rax
movl 0x44(%rax), %eax
movl %eax, -0xcc(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1f110
movl -0xcc(%rbp), %ecx
movq 0x20(%rax), %rax
movl %ecx, 0x44(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq -0xc8(%rbp), %rdi
movq 0x20(%rax), %rsi
addq $0x20, %rsi
callq 0xf160
movq (%rax), %rax
addq $0x20, %rax
movq %rax, -0xc0(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq -0xc0(%rbp), %rsi
movq 0x20(%rax), %rdi
addq $0x20, %rdi
callq 0x4050
leaq -0x20(%rbp), %rdi
callq 0x1f110
movq 0x20(%rax), %rax
movb $0x1, 0x49(%rax)
jmp 0x1883c
jmp 0x189ce
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x1f190
movq %rax, -0x78(%rbp)
jmp 0x18817
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax,%rax)