// File: /workspace/github_cpp_makefile_star2_O3/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 0x724f(%rip), %rax      # 0xf1e8
cmoveq %rax, %r14
movq %rdi, -0x70(%rbp)
leaq -0x50(%rbp), %r13
xorl %r12d, %r12d
movq %r14, -0x68(%rbp)
testl %r12d, %r12d
je 0x7fc5
movq 0x30(%r15), %rax
testq %rax, %rax
je 0x801c
incl %r12d
movq %rax, %r15
jmp 0x80e0
movq -0x38(%rbp), %r12
movq (%r12), %rsi
testq %rsi, %rsi
leaq 0x7211(%rip), %rax      # 0xf1e8
cmoveq %rax, %rsi
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
leaq -0x29(%rbp), %rdx
callq 0x8a02
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20a0
testl %eax, %eax
je 0x807f
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x80ab
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
jmp 0x80ab
movq %r15, %rbx
movq %rbx, %r15
movq 0x20(%rbx), %rbx
testq %rbx, %rbx
je 0x825d
movq 0x58(%r15), %rax
testq %rax, %rax
jne 0x7fbd
testl %r12d, %r12d
jle 0x824e
decl %r12d
jne 0x801f
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x885a
testq %rax, %rax
je 0x824e
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x885a
movq %rax, -0x38(%rbp)
jmp 0x7fac
movq 0x30(%r12), %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x8099
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
testq %rbx, %rbx
je 0x80ab
movq 0x30(%r12), %r15
movl $0x1, %r12d
jmp 0x80e0
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x885a
testq %rax, %rax
je 0x824e
xorl %r12d, %r12d
movq -0x38(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x885a
movq %rax, -0x38(%rbp)
movq (%r15), %rsi
testq %rsi, %rsi
leaq 0x70fb(%rip), %rax      # 0xf1e8
cmoveq %rax, %rsi
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
leaq -0x29(%rbp), %rdx
callq 0x8a02
movq %rbx, %rdi
movq -0x70(%rbp), %rsi
callq 0x2050
testl %eax, %eax
je 0x812f
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x7fac
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
jmp 0x7fac
movl -0x3c(%rbp), %eax
cmpl $-0x1, %eax
sete %bl
cmpl %eax, %r12d
sete %r14b
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x8154
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
orb %r14b, %bl
movq -0x68(%rbp), %r14
je 0x7fac
movq (%r15), %rbx
testq %rbx, %rbx
leaq 0x707a(%rip), %rax      # 0xf1e8
cmoveq %rax, %rbx
movq %rbx, %rdi
callq 0x20e0
movq 0x6e4f(%rip), %r14      # 0xefd0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x21d0
movl $0x1, %edx
movq %r14, %rdi
leaq 0x334d(%rip), %rsi      # 0xb4eb
callq 0x21d0
movq -0x38(%rbp), %rdi
leaq 0x3163(%rip), %rsi      # 0xb311
xorl %edx, %edx
movl $0x1, %ecx
callq 0x8774
movq 0x8(%rax), %rbx
testq %rbx, %rbx
leaq 0x7020(%rip), %rax      # 0xf1e8
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 0x32fa(%rip), %rsi      # 0xb4eb
callq 0x21d0
movq 0x8(%r15), %rbx
testq %rbx, %rbx
leaq 0x6fe4(%rip), %rax      # 0xf1e8
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 0x7fac
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x357b(%rip), %rdi      # 0xb7df
leaq 0x335f(%rip), %rsi      # 0xb5ca
leaq 0x357c(%rip), %rcx      # 0xb7ee
movl $0x3ee, %edx            # imm = 0x3EE
callq 0x2130
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r13, %rdi
je 0x8294
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x2330