// File: 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
subq $0xf0, %rsp
movq %rdi, -0x98(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0xce80
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xbf76
movq -0x10(%rbp), %rdi
callq 0xce80
movq %rax, -0xa8(%rbp)
leaq -0x51(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x3450
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0xcdd0
jmp 0xbe64
movq -0x28(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x30a0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xa9(%rbp)
jne 0xbeb2
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xca70
movq %rax, -0xb8(%rbp)
jmp 0xbe9e
movq -0xb8(%rbp), %rax
cmpq $0x0, %rax
setne %al
movb %al, -0xa9(%rbp)
movb -0xa9(%rbp), %al
movb %al, -0xb9(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3160
leaq -0x51(%rbp), %rdi
callq 0x3260
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0xbedc
jmp 0xbf34
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xca70
movq %rax, -0x20(%rbp)
jmp 0xc07f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xbf26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3160
leaq -0x51(%rbp), %rdi
callq 0x3260
jmp 0xc227
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xcb50
cmpq $0x0, %rax
je 0xbf6f
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xcb50
movq %rax, -0x10(%rbp)
jmp 0xc07f
jmp 0xbf71
jmp 0xc07a
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xca70
cmpq $0x0, %rax
je 0xbfb8
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xca70
movq %rax, -0x20(%rbp)
jmp 0xc07f
jmp 0xbfba
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xcb50
cmpq $0x0, %rax
je 0xbff3
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xcb50
movq %rax, -0x20(%rbp)
jmp 0xc07f
movq -0x20(%rbp), %rdi
callq 0xcec0
cmpq $0x0, %rax
je 0xc078
cmpl $0x0, -0x2c(%rbp)
jle 0xc078
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xc066
movq -0x20(%rbp), %rdi
callq 0xcec0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xcb50
cmpq $0x0, %rax
je 0xc05c
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xcb50
movq %rax, -0x10(%rbp)
jmp 0xc061
jmp 0xc21e
jmp 0xbe21
movq -0x20(%rbp), %rdi
callq 0xcec0
movq %rax, -0x20(%rbp)
jmp 0xbfba
jmp 0xc07a
jmp 0xc21e
movq -0x20(%rbp), %rdi
callq 0xce80
movq %rax, -0xd0(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x3450
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0xcdd0
jmp 0xc0be
movq -0x98(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x3040
movl %eax, -0xd4(%rbp)
jmp 0xc0d9
movl -0xd4(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xd5(%rbp)
jne 0xc115
movb $0x1, %al
cmpl $-0x1, -0x14(%rbp)
movb %al, -0xd6(%rbp)
je 0xc109
movl -0x14(%rbp), %eax
cmpl -0x2c(%rbp), %eax
sete %al
movb %al, -0xd6(%rbp)
movb -0xd6(%rbp), %al
movb %al, -0xd5(%rbp)
movb -0xd5(%rbp), %al
movb %al, -0xd7(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x3160
leaq -0x89(%rbp), %rdi
callq 0x3260
movb -0xd7(%rbp), %al
testb $0x1, %al
jne 0xc148
jmp 0xc219
movq -0x20(%rbp), %rdi
callq 0xce80
movq %rax, %rsi
movq 0x9e7d(%rip), %rdi      # 0x15fd8
callq 0x3200
movq %rax, %rdi
leaq 0x5387(%rip), %rsi      # 0x114f1
callq 0x3200
movq %rax, -0xe8(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x5174(%rip), %rsi      # 0x112f5
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xca70
movq %rax, %rdi
callq 0xcd90
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
callq 0x3200
movq %rax, %rdi
leaq 0x5341(%rip), %rsi      # 0x114f1
callq 0x3200
movq %rax, -0xe0(%rbp)
movq -0x20(%rbp), %rdi
callq 0xcd90
movq -0xe0(%rbp), %rdi
movq %rax, %rsi
callq 0x3200
movq %rax, %rdi
movq 0x9de2(%rip), %rsi      # 0x15fc0
callq 0x3240
jmp 0xc219
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xc20b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x3160
leaq -0x89(%rbp), %rdi
callq 0x3260
jmp 0xc227
jmp 0xbe21
addq $0xf0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x3440