// File: /workspace/github_cpp_makefile_star2_O2/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 $0x1d8, %rsp            # imm = 0x1D8
cmpl $0x2, %edx
jg 0x6e8e
movq %rsi, %r15
movq %rdi, %r14
movl %edx, 0xc(%rsp)
leaq 0xb657(%rip), %rsi      # 0x122fc
leaq 0xb4ff(%rip), %rbp      # 0x121ab
leaq 0xd0(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rdx
callq 0x7136
leaq 0x110(%rsp), %r13
leaq 0xb63c(%rip), %rsi      # 0x1230a
movq %r13, %rdi
movq %rbp, %rdx
callq 0x7176
leaq 0x150(%rsp), %r13
leaq 0xb62f(%rip), %rsi      # 0x12317
leaq 0xb4b8(%rip), %rdx      # 0x121a7
movq %r13, %rdi
callq 0x71b6
leaq 0x190(%rsp), %r13
leaq 0xb61d(%rip), %rsi      # 0x12323
leaq 0xb5c7(%rip), %rdx      # 0x122d4
movq %r13, %rdi
callq 0x71f6
leaq 0x8(%r14), %rbx
leaq 0x28(%rsp), %rdx
movq %rbx, (%rdx)
leaq 0xb60b(%rip), %rsi      # 0x12333
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x7236
leaq 0x58(%rsp), %r13
leaq 0x10(%r14), %rax
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xb601(%rip), %rsi      # 0x1234e
movq %r13, %rdi
callq 0x725a
leaq 0x80(%rsp), %r13
leaq 0xc(%r14), %rax
leaq 0x18(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xb5f3(%rip), %rsi      # 0x12363
movq %r13, %rdi
callq 0x727e
leaq 0xa8(%rsp), %r13
leaq 0x14(%r14), %rax
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xb5ee(%rip), %rsi      # 0x12381
movq %r13, %rdi
callq 0x72a2
leaq 0x18(%r14), %r12
leaq 0xf0(%rsp), %r13
xorl %ebp, %ebp
cmpq $0x100, %rbp            # imm = 0x100
je 0x6ddd
leaq (%rsp,%rbp), %rsi
addq $0xd0, %rsi
movq %r15, %rdi
callq 0x70e8
testb %al, %al
je 0x6dd7
movq %r13, %rsi
addq %rbp, %rsi
movq %r12, %rdi
callq 0x4180
addq $0x40, %rbp
jmp 0x6da9
movq 0x50(%r15), %rax
testq %rax, %rax
je 0x6e55
movq (%rax), %r12
cmpq 0x8(%rax), %r12
je 0x6e3c
xorl %r13d, %r13d
cmpq $0xa0, %r13
je 0x6e32
movq (%r12), %rdi
leaq (%rsp,%r13), %rsi
addq $0x30, %rsi
callq 0x70e8
testb %al, %al
je 0x6e2c
movq (%r12), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x6e2c
movq (%rax), %rdi
callq 0x44a0
movq 0x50(%rsp,%r13), %rcx
movl %eax, (%rcx)
addq $0x28, %r13
jmp 0x6df2
addq $0x8, %r12
movq 0x50(%r15), %rax
jmp 0x6de9
cmpl $0x0, (%rbx)
jns 0x6e55
movq (%rax), %rax
movq (%rax), %rsi
movl 0xc(%rsp), %edx
incl %edx
movq %r14, %rdi
callq 0x6c7a
pushq $0x78
popq %rbx
leaq (%rsp,%rbx), %rdi
addq $0x30, %rdi
callq 0x4150
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x6e58
movl $0xc0, %ebx
leaq (%rsp,%rbx), %rdi
addq $0xd0, %rdi
callq 0x70d2
addq $-0x40, %rbx
cmpq $-0x40, %rbx
jne 0x6e74
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6ed7
jmp 0x6ea6
jmp 0x6ea6
movq %rax, %rbx
addq $-0x28, %r13
movq %r13, %rdi
callq 0x4150
cmpq %r12, %r13
jne 0x6ea9
jmp 0x6ef5
movq %rax, %rbx
jmp 0x6ef5
movq %rax, %rbx
addq $-0x40, %r13
movq %r13, %rdi
callq 0x70d2
cmpq %r12, %r13
jne 0x6ec4
jmp 0x6f15
movq %rax, %rbx
pushq $0x78
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x30, %rdi
callq 0x4150
addq $-0x28, %r14
cmpq $-0x28, %r14
jne 0x6ede
movl $0xc0, %r14d
leaq (%rsp,%r14), %rdi
addq $0xd0, %rdi
callq 0x70d2
addq $-0x40, %r14
cmpq $-0x40, %r14
jne 0x6efb
movq %rbx, %rdi
callq 0x4560
nop