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

    if (depth>2)
        return;

    pair<string, string> types[] =
    {
        pair<string,string>("Nrtrde",          "NRT")       /* Nrt file */
    };

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

    for (i=0;i<1;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<2;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
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xacf0
cmpl $0x2, -0x14(%rbp)
jle 0xa4a5
jmp 0xa8d4
leaq -0x70(%rbp), %rdi
movq %rdi, -0x78(%rbp)
leaq 0x19cf2(%rip), %rsi     # 0x241a6
leaq 0x19dd5(%rip), %rdx     # 0x24290
callq 0xad10
jmp 0xa4c2
movq -0x118(%rbp), %rax
leaq -0xe0(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
addq $0x8, %rax
movq %rax, -0xf0(%rbp)
leaq 0x19db9(%rip), %rsi     # 0x242a2
leaq -0xf0(%rbp), %rdx
callq 0xadf0
jmp 0xa4f7
movq -0x118(%rbp), %rax
leaq -0xb8(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
addq $0xc, %rax
movq %rax, -0xf8(%rbp)
leaq 0x19d9f(%rip), %rsi     # 0x242bd
leaq -0xf8(%rbp), %rdx
callq 0xae70
jmp 0xa52c
movl $0x0, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
jge 0xa674
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rax
leaq -0x70(%rbp), %rsi
shlq $0x6, %rax
addq %rax, %rsi
callq 0xabc0
testb $0x1, %al
jne 0xa55e
jmp 0xa664
movq -0x118(%rbp), %rdi
movslq -0x24(%rbp), %rax
shlq $0x6, %rax
leaq -0x50(%rbp,%rax), %rsi
addq $0x10, %rdi
callq 0x4050
jmp 0xa57d
jmp 0xa664
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
movq -0x78(%rbp), %rax
leaq -0x70(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x120(%rbp)
je 0xa5d3
movq -0x120(%rbp), %rdi
addq $-0x40, %rdi
movq %rdi, -0x128(%rbp)
callq 0xab90
movq -0x128(%rbp), %rax
leaq -0x70(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x120(%rbp)
jne 0xa5a5
jmp 0xa8dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
movq -0xe8(%rbp), %rax
leaq -0xe0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x130(%rbp)
je 0xa632
movq -0x130(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x138(%rbp)
callq 0xacd0
movq -0x138(%rbp), %rax
leaq -0xe0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x130(%rbp)
jne 0xa601
jmp 0xa88b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x148(%rbp)
addq $0x50, %rax
movq %rax, -0x140(%rbp)
jmp 0xa825
jmp 0xa666
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xa533
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0xa780
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xaef0
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xaf60
movq %rax, -0x108(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0xaf20
testb $0x1, %al
jne 0xa6cf
jmp 0xa77e
movl $0x0, -0x24(%rbp)
cmpl $0x2, -0x24(%rbp)
jge 0xa765
leaq -0x20(%rbp), %rdi
callq 0xaf90
movq (%rax), %rdi
movslq -0x24(%rbp), %rax
leaq -0xe0(%rbp), %rsi
imulq $0x28, %rax, %rax
addq %rax, %rsi
callq 0xabc0
testb $0x1, %al
jne 0xa709
jmp 0xa755
leaq -0x20(%rbp), %rdi
callq 0xaf90
movq (%rax), %rax
cmpq $0x0, 0x48(%rax)
je 0xa753
leaq -0x20(%rbp), %rdi
callq 0xaf90
movq (%rax), %rax
movq 0x48(%rax), %rdi
callq 0x4160
movq %rax, %rdi
callq 0x4610
movl %eax, %ecx
movslq -0x24(%rbp), %rdx
leaq -0xe0(%rbp), %rax
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq 0x20(%rax), %rax
movl %ecx, (%rax)
jmp 0xa755
jmp 0xa757
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xa6d6
jmp 0xa767
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xafb0
movq %rax, -0x110(%rbp)
jmp 0xa6a2
jmp 0xa780
movq -0x118(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jge 0xa7c3
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0xa7c1
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xaff0
movq -0x118(%rbp), %rdi
movq (%rax), %rsi
movl -0x14(%rbp), %edx
incl %edx
callq 0xa470
jmp 0xa7bf
jmp 0xa7c1
jmp 0xa7c3
leaq -0xe0(%rbp), %rax
movq %rax, -0x158(%rbp)
addq $0x50, %rax
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x160(%rbp)
callq 0xacd0
movq -0x158(%rbp), %rcx
movq -0x160(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x150(%rbp)
jne 0xa7dc
leaq -0x70(%rbp), %rax
movq %rax, -0x170(%rbp)
addq $0x40, %rax
movq %rax, -0x168(%rbp)
jmp 0xa858
movq -0x140(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x178(%rbp)
callq 0xacd0
movq -0x148(%rbp), %rcx
movq -0x178(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x140(%rbp)
jne 0xa825
jmp 0xa88b
movq -0x168(%rbp), %rdi
addq $-0x40, %rdi
movq %rdi, -0x180(%rbp)
callq 0xab90
movq -0x170(%rbp), %rcx
movq -0x180(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x168(%rbp)
jne 0xa858
jmp 0xa8d4
leaq -0x70(%rbp), %rax
movq %rax, -0x190(%rbp)
addq $0x40, %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rdi
addq $-0x40, %rdi
movq %rdi, -0x198(%rbp)
callq 0xab90
movq -0x190(%rbp), %rcx
movq -0x198(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x188(%rbp)
jne 0xa8a1
jmp 0xa8dd
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x46d0
nopw %cs:(%rax,%rax)