// File: /workspace/github_cpp_makefile_star2_O1/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 0x82b0
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
leaq 0xc0(%rsp), %r13
leaq 0xe2b5(%rip), %rsi      # 0x162de
leaq 0xe17b(%rip), %rdx      # 0x161ab
movq %r13, %r12
movq %r13, %rdi
callq 0x865c
leaq 0x100(%rsp), %r12
leaq 0xe2a2(%rip), %rsi      # 0x162ec
leaq 0xe15a(%rip), %rdx      # 0x161ab
movq %r12, %rdi
callq 0x86da
leaq 0x140(%rsp), %r12
leaq 0xe291(%rip), %rsi      # 0x162f9
leaq 0xe138(%rip), %rdx      # 0x161a7
movq %r12, %rdi
callq 0x8758
leaq 0x180(%rsp), %r12
leaq 0xe27f(%rip), %rsi      # 0x16305
leaq 0xe229(%rip), %rdx      # 0x162b6
movq %r12, %rdi
callq 0x87d6
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe270(%rip), %rsi      # 0x16315
leaq 0xe283(%rip), %rdx      # 0x1632f
leaq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0x7296
leaq 0x8(%r14), %rbp
leaq 0x48(%rsp), %r12
movq %rbp, -0x8(%r12)
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe259(%rip), %rsi      # 0x16330
leaq 0xe266(%rip), %rdx      # 0x16344
movq %r12, %rdi
callq 0x7296
movq %rbp, 0x18(%rsp)
leaq 0x10(%r14), %rax
leaq 0x70(%rsp), %r12
movq %rax, -0x8(%r12)
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe239(%rip), %rsi      # 0x16345
leaq 0xe24f(%rip), %rdx      # 0x16362
movq %r12, %rdi
callq 0x7296
leaq 0xc(%r14), %rax
leaq 0x98(%rsp), %r12
movq %rax, -0x8(%r12)
leaq 0xa8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xe224(%rip), %rsi      # 0x16363
leaq 0xe234(%rip), %rdx      # 0x1637a
movq %r12, %rdi
callq 0x7296
movl %ebx, 0xc(%rsp)
leaq 0x14(%r14), %rax
movq %rax, 0xb8(%rsp)
leaq 0x18(%r14), %r12
movl $0x4, %ebx
leaq 0xe0(%rsp), %r13
movq 0x8(%r15), %rdx
cmpq -0x18(%r13), %rdx
jne 0x8199
testq %rdx, %rdx
je 0x818e
movq -0x20(%r13), %rsi
movq (%r15), %rdi
callq 0x42f0
testl %eax, %eax
jne 0x8199
movq %r12, %rdi
movq %r13, %rsi
callq 0x4180
addq $0x40, %r13
decq %rbx
jne 0x816f
movq %r14, 0x10(%rsp)
movq 0x50(%r15), %rax
movq %rax, (%rsp)
testq %rax, %rax
je 0x821a
movq (%rsp), %rax
movq (%rax), %r13
movq 0x8(%rax), %rbx
cmpq %rbx, %r13
je 0x821a
movq (%r13), %r14
movq 0x8(%r14), %r15
xorl %r12d, %r12d
cmpq 0x28(%rsp,%r12), %r15
jne 0x8207
testq %r15, %r15
je 0x81ef
movq 0x20(%rsp,%r12), %rsi
movq (%r14), %rdi
movq %r15, %rdx
callq 0x42f0
testl %eax, %eax
jne 0x8207
movq 0x48(%r14), %rax
testq %rax, %rax
je 0x8207
movq (%rax), %rdi
callq 0x44d0
movq 0x40(%rsp,%r12), %rcx
movl %eax, (%rcx)
addq $0x28, %r12
cmpq $0xa0, %r12
jne 0x81cf
addq $0x8, %r13
jmp 0x81bf
cmpq $0x0, (%rsp)
je 0x8245
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
jns 0x8245
movq (%rsp), %rax
movq (%rax), %rax
movq (%rax), %rsi
movl 0xc(%rsp), %edx
incl %edx
movq 0x10(%rsp), %rdi
callq 0x7ff8
movq $-0xa0, %rbx
movq -0x10(%rbp), %rdi
cmpq %rdi, %rbp
je 0x8261
movq (%rbp), %rsi
incq %rsi
callq 0x42e0
addq $-0x28, %rbp
addq $0x28, %rbx
jne 0x824c
movq $-0x100, %rbx
leaq 0x1b0(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x828e
movq (%r14), %rsi
incq %rsi
callq 0x42e0
movq -0x30(%r14), %rdi
leaq -0x20(%r14), %rax
cmpq %rdi, %rax
je 0x82a6
movq (%rax), %rsi
incq %rsi
callq 0x42e0
addq $-0x40, %r14
addq $0x40, %rbx
jne 0x827a
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8325
jmp 0x82c8
jmp 0x82c8
movq %rax, %rbx
jmp 0x82d3
movq %rax, %rbx
movq %r13, %r12
cmpq %r12, %r13
je 0x8354
leaq 0x20(%rsp), %r14
movq -0x28(%r12), %rdi
leaq -0x18(%r12), %rax
cmpq %rdi, %rax
je 0x82f7
movq (%rax), %rsi
incq %rsi
callq 0x42e0
addq $-0x28, %r12
cmpq %r14, %r12
jne 0x82dd
jmp 0x8354
movq %rax, %rbx
cmpq %r12, %r13
je 0x8374
leaq 0xc0(%rsp), %r14
addq $-0x40, %r12
movq %r12, %rdi
callq 0x8626
cmpq %r14, %r12
jne 0x8312
jmp 0x8374
movq %rax, %rbx
xorl %r14d, %r14d
movq 0x98(%rsp,%r14), %rdi
leaq (%r14,%rbp), %rax
cmpq %rdi, %rax
je 0x8347
movq (%rax), %rsi
incq %rsi
callq 0x42e0
addq $-0x28, %r14
cmpq $-0xa0, %r14
jne 0x832b
movl $0xc0, %r14d
leaq (%rsp,%r14), %rdi
addq $0xc0, %rdi
callq 0x8626
addq $-0x40, %r14
cmpq $-0x40, %r14
jne 0x835a
movq %rbx, %rdi
callq 0x4590