// File: /workspace/github_cpp_makefile_star2_O3/tap3edit[P]tap3xml/TapInfo.cpp
// Function: TapInfo::_findtreeversion(treenode*, int)
void TapInfo::_findtreeversion(treenode *tree, int depth)
{
    vector<treenode *>::iterator    vii;
    int                 i;

    if (depth>2)
        return;

    pair<string, string> types[] =
    {
        pair<string,string>("transferBatch",   "TAP"),      /* Tap file */
        pair<string,string>("notification",    "TAP"),      /* Notification file */
        pair<string,string>("returnBatch",     "RAP"),      /* Rap file */
        pair<string,string>("acknowledgement", "ACK")       /* Acknowledgment file */
    };

    pair<string, int *> version[] =
    {
        pair<string,int *>("specificationVersionNumber",    &_version),
        pair<string,int *>("releaseVersionNumber",          &_release),
        pair<string,int *>("rapSpecificationVersionNumber", &_suplversion),
        pair<string,int *>("rapReleaseVersionNumber",       &_suplrelease)
    };

    for (i=0;i<4;i++)
        if (tree->tagname==types[i].first)
            _type=types[i].second;

    if (tree->children!=NULL)
    {
        for (vii=tree->children->begin();vii!=tree->children->end();vii++)
        {
            for (i=0;i<4;i++)
            {
                if ((*vii)->tagname==version[i].first)
                    if ( (*vii)->value!=NULL )
                        *(version[i].second)=atoi((*(*vii)->value).c_str());
            }
        }
    }

    if (_version<0)
    {
        if (tree->children!=NULL)
        {
            _findtreeversion((*tree->children)[0],depth+1);
        }
    }


    return;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
cmpl $0x2, %edx
jg 0x80f8
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xd488(%rip), %rsi      # 0x152fc
leaq 0xd330(%rip), %rbp      # 0x151ab
leaq 0xc0(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rdx
callq 0x8474
leaq 0x100(%rsp), %r13
leaq 0xd46d(%rip), %rsi      # 0x1530a
movq %r13, %rdi
movq %rbp, %rdx
callq 0x84f2
leaq 0x140(%rsp), %r13
leaq 0xd460(%rip), %rsi      # 0x15317
leaq 0xd2e9(%rip), %rdx      # 0x151a7
movq %r13, %rdi
callq 0x8570
leaq 0x180(%rsp), %r13
leaq 0xd44e(%rip), %rsi      # 0x15323
leaq 0xd3f8(%rip), %rdx      # 0x152d4
movq %r13, %rdi
callq 0x85ee
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xd43f(%rip), %rsi      # 0x15333
leaq 0xd452(%rip), %rdx      # 0x1534d
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x70e2
leaq 0x8(%rbx), %rbp
leaq 0x48(%rsp), %r13
movq %rbp, -0x8(%r13)
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xd429(%rip), %rsi      # 0x1534e
leaq 0xd436(%rip), %rdx      # 0x15362
movq %r13, %rdi
callq 0x70e2
movq %rbp, 0x18(%rsp)
leaq 0x10(%rbx), %rax
leaq 0x70(%rsp), %r13
movq %rax, -0x8(%r13)
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xd40a(%rip), %rsi      # 0x15363
leaq 0xd420(%rip), %rdx      # 0x15380
movq %r13, %rdi
callq 0x70e2
leaq 0xc(%rbx), %rax
leaq 0x98(%rsp), %r13
movq %rax, -0x8(%r13)
leaq 0xa8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xd3f6(%rip), %rsi      # 0x15381
leaq 0xd406(%rip), %rdx      # 0x15398
movq %r13, %rdi
callq 0x70e2
leaq 0x14(%rbx), %rax
movq %rax, 0xb8(%rsp)
movq %rbx, 0x8(%rsp)
leaq 0x18(%rbx), %r12
movl $0x4, %ebx
leaq 0xe0(%rsp), %r13
movq 0x8(%r15), %rdx
cmpq -0x18(%r13), %rdx
jne 0x7fe6
testq %rdx, %rdx
je 0x7fdb
movq -0x20(%r13), %rsi
movq (%r15), %rdi
callq 0x42f0
testl %eax, %eax
jne 0x7fe6
movq %r12, %rdi
movq %r13, %rsi
callq 0x4180
addq $0x40, %r13
decq %rbx
jne 0x7fbc
movl %r14d, 0x4(%rsp)
movq 0x50(%r15), %rax
testq %rax, %rax
je 0x808d
movq (%rax), %r13
movq %rax, 0x10(%rsp)
movq 0x8(%rax), %rbx
cmpq %rbx, %r13
je 0x8068
movq (%r13), %r14
movq 0x8(%r14), %r15
xorl %r12d, %r12d
cmpq 0x28(%rsp,%r12), %r15
jne 0x8055
testq %r15, %r15
je 0x803d
movq 0x20(%rsp,%r12), %rsi
movq (%r14), %rdi
movq %r15, %rdx
callq 0x42f0
testl %eax, %eax
jne 0x8055
movq 0x48(%r14), %rax
testq %rax, %rax
je 0x8055
movq (%rax), %rdi
callq 0x44d0
movq 0x40(%rsp,%r12), %rcx
movl %eax, (%rcx)
addq $0x28, %r12
cmpq $0xa0, %r12
jne 0x801d
addq $0x8, %r13
jmp 0x800d
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
movq 0x10(%rsp), %rax
jns 0x808d
movq (%rax), %rax
movq (%rax), %rsi
movl 0x4(%rsp), %edx
incl %edx
movq 0x8(%rsp), %rdi
callq 0x7e4a
movq $-0xa0, %rbx
movq -0x10(%rbp), %rdi
cmpq %rdi, %rbp
je 0x80a9
movq (%rbp), %rsi
incq %rsi
callq 0x42e0
addq $-0x28, %rbp
addq $0x28, %rbx
jne 0x8094
movq $-0x100, %rbx
leaq 0x1b0(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x80d6
movq (%r14), %rsi
incq %rsi
callq 0x42e0
movq -0x30(%r14), %rdi
leaq -0x20(%r14), %rax
cmpq %rdi, %rax
je 0x80ee
movq (%rax), %rsi
incq %rsi
callq 0x42e0
addq $-0x40, %r14
addq $0x40, %rbx
jne 0x80c2
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8151
jmp 0x8110
jmp 0x8110
movq %rax, %rbx
movq -0x28(%r13), %rdi
leaq -0x18(%r13), %rax
cmpq %rdi, %rax
je 0x812b
movq (%rax), %rsi
incq %rsi
callq 0x42e0
addq $-0x28, %r13
cmpq %r12, %r13
jne 0x8113
jmp 0x8180
movq %rax, %rbx
jmp 0x8180
movq %rax, %rbx
addq $-0x40, %r13
movq %r13, %rdi
callq 0x843e
cmpq %r12, %r13
jne 0x813e
jmp 0x81a0
movq %rax, %rbx
xorl %r14d, %r14d
movq 0x98(%rsp,%r14), %rdi
leaq (%r14,%rbp), %rax
cmpq %rdi, %rax
je 0x8173
movq (%rax), %rsi
incq %rsi
callq 0x42e0
addq $-0x28, %r14
cmpq $-0xa0, %r14
jne 0x8157
movl $0xc0, %r14d
leaq (%rsp,%r14), %rdi
addq $0xc0, %rdi
callq 0x843e
addq $-0x40, %r14
cmpq $-0x40, %r14
jne 0x8186
movq %rbx, %rdi
callq 0x4590