// File: halsafar[P]libtmx-parser/./src/tmxparser.cpp
// Function: tmxparser::_parsePropertyNode(tinyxml2::XMLElement*, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*)
TmxReturn _parsePropertyNode(tinyxml2::XMLElement* element, TmxPropertyMap_t* outPropertyMap)
{
	if (element == NULL)
	{
		// ignore this, not everything requires properties
		return TmxReturn::kSuccess;
	}

	for (tinyxml2::XMLElement* child = element->FirstChildElement("property"); child != NULL; child = child->NextSiblingElement("property"))
	{
		if (strcmp(child->Name(), "property") == 0)
		{
			if (child->Attribute("name") != NULL && child->Attribute("value") != NULL)
			{
				(*outPropertyMap)[child->Attribute("name")] = child->Attribute("value");
			}
			else
			{
				return TmxReturn::kMalformedPropertyNode;
			}
		}
	}

	return TmxReturn::kSuccess;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x55e6
movl $0x0, -0x4(%rbp)
jmp 0x5755
movq -0x10(%rbp), %rdi
leaq 0x1cc77(%rip), %rsi     # 0x22268
callq 0x7b60
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x574e
movq -0x20(%rbp), %rdi
callq 0x82a0
movq %rax, %rdi
leaq 0x1cc50(%rip), %rsi     # 0x22268
callq 0x4390
cmpl $0x0, %eax
jne 0x5733
movq -0x20(%rbp), %rdi
leaq 0x1cc40(%rip), %rsi     # 0x22271
xorl %eax, %eax
movl %eax, %edx
callq 0x1c710
cmpq $0x0, %rax
je 0x5728
movq -0x20(%rbp), %rdi
leaq 0x1cc27(%rip), %rsi     # 0x22276
xorl %eax, %eax
movl %eax, %edx
callq 0x1c710
cmpq $0x0, %rax
je 0x5728
movq -0x20(%rbp), %rdi
leaq 0x1cc09(%rip), %rsi     # 0x22276
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x80(%rbp)
callq 0x1c710
movq -0x80(%rbp), %rdx
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x1cbdc(%rip), %rsi     # 0x22271
callq 0x1c710
movq %rax, -0x68(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x4480
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x4370
jmp 0x56be
movq -0x70(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x82c0
movq %rax, -0x88(%rbp)
jmp 0x56d4
movq -0x78(%rbp), %rsi
movq -0x88(%rbp), %rdi
callq 0x4360
jmp 0x56e6
leaq -0x40(%rbp), %rdi
callq 0x4508
leaq -0x41(%rbp), %rdi
callq 0x42a0
jmp 0x5731
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x571d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4508
leaq -0x41(%rbp), %rdi
callq 0x42a0
jmp 0x5761
movl $0x6, -0x4(%rbp)
jmp 0x5755
jmp 0x5733
jmp 0x5735
movq -0x20(%rbp), %rdi
leaq 0x1cb28(%rip), %rsi     # 0x22268
callq 0x7f80
movq %rax, -0x20(%rbp)
jmp 0x55fa
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x4470
nopw (%rax,%rax)