// File: openflightmaps[P]ofm2xplane/main.cpp
// Function: search_all_nodes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, rapidxml::xml_node<char>*, std::basic_ofstream<char, std::char_traits<char>>&)
void search_all_nodes(string target, xml_node<> *start, ofstream &out)
{
    xml_node<> * current=start;
	int ebene=0;
	out << current->name() << endl << endl;
	while(true)
	{
	    if(current->first_node()!=NULL && current->first_node()->name()[0] != '\0')
		{
			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--;
			current=current->parent();
			goto sibparent;
		}
		break;
		
		check:
		string s(current->name());
		if(s.compare(target)==0)
			out << current->value() << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rdi
callq 0xce80
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x3200
movq %rax, %rdi
movq 0xa3af(%rip), %rsi      # 0x15fc0
callq 0x3240
movq %rax, %rdi
movq 0xa3a0(%rip), %rsi      # 0x15fc0
callq 0x3240
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xca70
cmpq $0x0, %rax
je 0xbc89
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xca70
movq %rax, %rdi
callq 0xce80
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xbc89
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xca70
movq %rax, -0x20(%rbp)
jmp 0xbcf3
jmp 0xbc8b
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xcb50
cmpq $0x0, %rax
je 0xbcc1
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xcb50
movq %rax, -0x20(%rbp)
jmp 0xbcf3
movq -0x20(%rbp), %rdi
callq 0xcec0
cmpq $0x0, %rax
je 0xbcee
cmpl $0x0, -0x24(%rbp)
jle 0xbcee
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0xcec0
movq %rax, -0x20(%rbp)
jmp 0xbc8b
jmp 0xbdd5
movq -0x20(%rbp), %rdi
callq 0xce80
movq %rax, -0x80(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x3450
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0xcdd0
jmp 0xbd20
leaq -0x49(%rbp), %rdi
callq 0x3260
movq -0x70(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x3040
movl %eax, -0x84(%rbp)
jmp 0xbd3e
movl -0x84(%rbp), %eax
cmpl $0x0, %eax
jne 0xbdc7
movq -0x18(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x20(%rbp), %rdi
callq 0xcd90
movq %rax, -0x90(%rbp)
jmp 0xbd66
movq -0x90(%rbp), %rsi
movq -0x98(%rbp), %rdi
callq 0x3200
movq %rax, -0xa0(%rbp)
jmp 0xbd82
movq -0xa0(%rbp), %rdi
movq 0xa230(%rip), %rsi      # 0x15fc0
callq 0x3240
jmp 0xbd97
jmp 0xbdc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0x3260
jmp 0xbdde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3160
jmp 0xbdde
leaq -0x48(%rbp), %rdi
callq 0x3160
jmp 0xbc25
addq $0xa0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x3440
nopw (%rax,%rax)