// File: /workspace/github_cpp_makefile_star2_O1/openflightmaps[P]ofm2xplane/main.cpp
// Function: search_in(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, rapidxml::xml_node<char>*, int)
void search_in(string target, xml_node<> *start,int l)
{
    xml_node<> * current;
    char* my_type=start->name();
	int ebene=0;
	while(true)
	{
        if(ebene==0)
        {
    	    if(string(start->name()).compare(my_type)==0 && start->first_node()!=NULL)
    		{
    			ebene++;
    			current=start->first_node();
    			goto check;
    		}else
    		{
                if(start->next_sibling(my_type)!=NULL)
                {
                    start=start->next_sibling(my_type);
                    goto check;
                }
            }
        }
        else
        {
            if(current->first_node()!=NULL)
            {
                ebene++;
                current=current->first_node();
                goto check;
            }
    		sibparent:
    		if(current->next_sibling()!=NULL)
    		{
    			current=current->next_sibling();
    			goto check;
    		}
    		if(current->parent()!=NULL && ebene > 0)
    		{
    			ebene--;
    			if(ebene==0)
    			{
    			    start=current->parent();
    			    if(start->next_sibling(my_type)!=NULL)
    			        start=start->next_sibling(my_type);
    			    else
    			        break;
    			    continue;
                }
    			else
    			{
    			    current=current->parent();
    			    goto sibparent;
                }
    		}
        }
		break;
		
		check:
		if(string(current->name()).compare(target)==0 && (l==-1 || l==ebene))
			cout << current->name() << "\t" << start->first_node("txtName")->value() << "\t" <<  current->value() << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, -0x3c(%rbp)
movq %rsi, -0x38(%rbp)
movq (%rsi), %r14
testq %r14, %r14
leaq 0x72d6(%rip), %rax      # 0xf1f0
cmoveq %rax, %r14
movq %rdi, -0x70(%rbp)
leaq -0x50(%rbp), %r13
xorl %r12d, %r12d
movq %r14, -0x68(%rbp)
testl %r12d, %r12d
je 0x7f46
movq 0x30(%r15), %rax
testq %rax, %rax
je 0x7f9d
incl %r12d
movq %rax, %r15
jmp 0x8061
movq -0x38(%rbp), %r12
movq (%r12), %rsi
testq %rsi, %rsi
leaq 0x7298(%rip), %rax      # 0xf1f0
cmoveq %rax, %rsi
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
leaq -0x29(%rbp), %rdx
callq 0x8a4c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20a0
testl %eax, %eax
je 0x8000
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x802c
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
jmp 0x802c
movq %r15, %rbx
movq %rbx, %r15
movq 0x20(%rbx), %rbx
testq %rbx, %rbx
je 0x81de
movq 0x58(%r15), %rax
testq %rax, %rax
jne 0x7f3e
testl %r12d, %r12d
jle 0x81cf
decl %r12d
jne 0x7fa0
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x8822
testq %rax, %rax
je 0x81cf
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x8822
movq %rax, -0x38(%rbp)
jmp 0x7f2d
movq 0x30(%r12), %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x801a
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
testq %rbx, %rbx
je 0x802c
movq 0x30(%r12), %r15
movl $0x1, %r12d
jmp 0x8061
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x8822
testq %rax, %rax
je 0x81cf
xorl %r12d, %r12d
movq -0x38(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x8822
movq %rax, -0x38(%rbp)
movq (%r15), %rsi
testq %rsi, %rsi
leaq 0x7182(%rip), %rax      # 0xf1f0
cmoveq %rax, %rsi
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
leaq -0x29(%rbp), %rdx
callq 0x8a4c
movq %rbx, %rdi
movq -0x70(%rbp), %rsi
callq 0x2050
testl %eax, %eax
je 0x80b0
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x7f2d
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
jmp 0x7f2d
movl -0x3c(%rbp), %eax
cmpl $-0x1, %eax
sete %bl
cmpl %eax, %r12d
sete %r14b
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x80d5
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
orb %r14b, %bl
movq -0x68(%rbp), %r14
je 0x7f2d
movq (%r15), %rbx
testq %rbx, %rbx
leaq 0x7101(%rip), %rax      # 0xf1f0
cmoveq %rax, %rbx
movq %rbx, %rdi
callq 0x20e0
movq 0x6ece(%rip), %r14      # 0xefd0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x21d0
movl $0x1, %edx
movq %r14, %rdi
leaq 0x33cc(%rip), %rsi      # 0xb4eb
callq 0x21d0
movq -0x38(%rbp), %rdi
leaq 0x31e2(%rip), %rsi      # 0xb311
xorl %edx, %edx
movl $0x1, %ecx
callq 0x86f4
movq 0x8(%rax), %rbx
testq %rbx, %rbx
leaq 0x70a7(%rip), %rax      # 0xf1f0
cmoveq %rax, %rbx
movq %rbx, %rdi
callq 0x20e0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x21d0
movl $0x1, %edx
movq %r14, %rdi
leaq 0x3379(%rip), %rsi      # 0xb4eb
callq 0x21d0
movq 0x8(%r15), %rbx
testq %rbx, %rbx
leaq 0x706b(%rip), %rax      # 0xf1f0
cmoveq %rax, %rbx
movq %rbx, %rdi
callq 0x20e0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x21d0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %r14, %rdi
movq -0x68(%rbp), %r14
callq 0x2040
movq %rax, %rdi
callq 0x2140
jmp 0x7f2d
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x35fa(%rip), %rdi      # 0xb7df
leaq 0x33de(%rip), %rsi      # 0xb5ca
leaq 0x35fb(%rip), %rcx      # 0xb7ee
movl $0x3ee, %edx            # imm = 0x3EE
callq 0x2130
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x8215
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x2340