LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, -0x38(%rbp)
xorl %r12d, %r12d
testq %rdi, %rdi
je 0x5c14
leaq 0xc755(%rip), %rsi      # 0x12258
callq 0xd6a6
testq %rax, %rax
je 0x5c14
movq %rax, %r14
leaq 0xc73d(%rip), %rbx      # 0x12258
leaq 0xc73f(%rip), %r13      # 0x12261
leaq 0xc73d(%rip), %r15      # 0x12266
movq %r14, %rdi
callq 0xd476
movq %rax, %rdi
movq %rbx, %rsi
callq 0x42c0
testl %eax, %eax
jne 0x5bfa
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0xe9e8
movl $0x6, %r12d
testq %rax, %rax
je 0x5c14
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xe9e8
testq %rax, %rax
je 0x5c14
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xe9e8
movq %rax, %r12
movq %r14, %rdi
movq %r13, %rbx
movq %r13, %rsi
xorl %edx, %edx
callq 0xe9e8
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movq %rax, %rsi
leaq -0x29(%rbp), %rdx
callq 0x40e0
movq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0xa8ca
movq %rax, %r13
movq 0x8(%rax), %r15
movq %r12, %rdi
callq 0x4100
movq %r13, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r12, %rcx
movq %rax, %r8
callq 0x4330
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
movq %rbx, %r13
leaq 0xc67a(%rip), %r15      # 0x12266
je 0x5bf3
callq 0x41c0
leaq 0xc65e(%rip), %rbx      # 0x12258
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd84e
movq %rax, %r14
testq %rax, %rax
jne 0x5b29
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x5c3b
callq 0x41c0
movq %rbx, %rdi
callq 0x43d0
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./src/tmxparser.cpp
// Function: tmxparser::_parseLayerNode(tinyxml2::XMLElement*, std::vector<tmxparser::TmxTileset, std::allocator<tmxparser::TmxTileset>> const&, tmxparser::TmxLayer*)
TmxReturn _parseLayerNode(tinyxml2::XMLElement* element, const TmxTilesetCollection_t& tilesets, TmxLayer* outLayer)
{
	TmxReturn error = TmxReturn::kSuccess;

	outLayer->name = element->Attribute("name");
	if (element->Attribute("opacity"))
		outLayer->opacity = element->FloatAttribute("opacity");
	else
		outLayer->opacity = 1.f;
	if (element->Attribute("visible"))
		outLayer->visible = (element->IntAttribute("visible") == 1 ? true : false);
	else
		outLayer->visible = true;
	outLayer->width = element->UnsignedAttribute("width");
	outLayer->height = element->UnsignedAttribute("height");

	error = _parsePropertyNode(element->FirstChildElement("properties"), &outLayer->propertyMap);
	if (error)
	{
		LOGE("Error parsing layer property node...");
		return error;
	}

	// check data node and type
	tinyxml2::XMLElement* dataElement = element->FirstChildElement("data");
	if (dataElement != NULL)
	{
		error = _parseLayerDataNode(dataElement, tilesets, &outLayer->tiles);
	}
	else
	{
		LOGE("Layer missing data node...");
		return TmxReturn::kMissingDataNode;
	}

	return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xc3ca(%rip), %rsi      # 0x12261
xorl %edx, %edx
callq 0xe9e8
movq %rax, %r12
movq 0x8(%rbx), %r13
movq %rax, %rdi
callq 0x4100
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %rax, %r8
callq 0x4330
leaq 0xc4f6(%rip), %rsi      # 0x123bd
movq %r15, %rdi
xorl %edx, %edx
callq 0xe9e8
testq %rax, %rax
je 0x5ee7
leaq 0xc4e0(%rip), %rsi      # 0x123bd
movq %r15, %rdi
callq 0x7936
jmp 0x5eef
movss 0xc115(%rip), %xmm0     # 0x12004
movss %xmm0, 0x28(%rbx)
leaq 0xc4ca(%rip), %rsi      # 0x123c5
movq %r15, %rdi
xorl %edx, %edx
callq 0xe9e8
testq %rax, %rax
je 0x5f22
leaq 0xc4b4(%rip), %rsi      # 0x123c5
movq %r15, %rdi
callq 0x7966
cmpl $0x1, %eax
sete 0x2c(%rbx)
jmp 0x5f26
movb $0x1, 0x2c(%rbx)
leaq 0xc1d1(%rip), %rsi      # 0x120fe
movq %r15, %rdi
callq 0x788e
movl %eax, 0x20(%rbx)
leaq 0xc1c9(%rip), %rsi      # 0x12108
movq %r15, %rdi
callq 0x788e
movl %eax, 0x24(%rbx)
leaq 0xc1da(%rip), %rsi      # 0x1212b
movq %r15, %rdi
callq 0xd6a6
leaq 0x30(%rbx), %rsi
movq %rax, %rdi
callq 0x5adb
testl %eax, %eax
jne 0x5f9d
leaq 0xc494(%rip), %rsi      # 0x12404
movq %r15, %rdi
callq 0xd6a6
testq %rax, %rax
je 0x5fa7
addq $0x68, %rbx
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6bdd
movl %eax, %r12d
callq 0x4714
jmp 0x5fb2
callq 0x4747
movl $0x4, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./src/tmxparser.cpp
// Function: tmxparser::_parseImageNode(tinyxml2::XMLElement*, tmxparser::TmxImage*)
TmxReturn _parseImageNode(tinyxml2::XMLElement* element, TmxImage* outImage)
{
	CHECK_AND_RETRIEVE_REQ_ATTRIBUTE_STRING(element, "source", outImage->source);
	CHECK_AND_RETRIEVE_OPT_ATTRIBUTE_STRING(element, "format", outImage->format);
	CHECK_AND_RETRIEVE_OPT_ATTRIBUTE_STRING(element, "trans", outImage->transparentColor);

	outImage->width = element->UnsignedAttribute("width");
	outImage->height = element->UnsignedAttribute("height");

	return TmxReturn::kSuccess;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xbe3f(%rip), %rsi      # 0x1226c
xorl %edx, %edx
callq 0xe9e8
movq %rax, %r15
leaq 0x20(%rbx), %r12
movq 0x28(%rbx), %r13
movq %rax, %rdi
callq 0x4100
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x4330
cmpq $0x0, 0x28(%rbx)
je 0x6561
leaq 0xbe07(%rip), %rsi      # 0x12273
movq %r14, %rdi
xorl %edx, %edx
callq 0xe9e8
testq %rax, %rax
je 0x64b0
leaq 0xbdf1(%rip), %rsi      # 0x12273
movq %r14, %rdi
xorl %edx, %edx
callq 0xe9e8
movq %rax, %r15
movq 0x8(%rbx), %r12
movq %rax, %rdi
callq 0x4100
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x4330
jmp 0x64c6
movq 0x8(%rbx), %rdx
movl $0x1, %ecx
movq %rbx, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x4410
leaq 0xbdad(%rip), %rsi      # 0x1227a
movq %r14, %rdi
xorl %edx, %edx
callq 0xe9e8
testq %rax, %rax
je 0x6515
leaq 0xbd97(%rip), %rsi      # 0x1227a
movq %r14, %rdi
xorl %edx, %edx
callq 0xe9e8
movq %rax, %r15
leaq 0x40(%rbx), %r12
movq 0x48(%rbx), %r13
movq %rax, %rdi
callq 0x4100
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x4330
jmp 0x652c
leaq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rdx
movl $0x1, %ecx
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x4410
leaq 0xbbcb(%rip), %rsi      # 0x120fe
movq %r14, %rdi
callq 0x788e
movl %eax, 0x60(%rbx)
leaq 0xbbc3(%rip), %rsi      # 0x12108
movq %r14, %rdi
callq 0x788e
movl %eax, 0x64(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4817
movl $0x2, %eax
jmp 0x6552
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./src/tmxparser.cpp
// Function: tmxparser::_parseOffsetNode(tinyxml2::XMLElement*, tmxparser::TmxOffset*)
tmxparser::TmxReturn _parseOffsetNode(tinyxml2::XMLElement* element, TmxOffset* offset)
{
	TmxReturn error = TmxReturn::kSuccess;

	offset->x = 0;
	offset->y = 0;

	if (element->Attribute("x"))
	{
		offset->x = element->IntAttribute("x");
	}

	if (element->Attribute("y"))
	{
		offset->y = element->IntAttribute("y");
	}

	return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq $0x0, (%rsi)
leaq 0xbfd4(%rip), %rsi      # 0x128f5
xorl %edx, %edx
callq 0xe9e8
testq %rax, %rax
je 0x693e
leaq 0xbfc1(%rip), %rsi      # 0x128f5
movq %r14, %rdi
callq 0x7966
movl %eax, (%rbx)
leaq 0xba7e(%rip), %rsi      # 0x123c3
movq %r14, %rdi
xorl %edx, %edx
callq 0xe9e8
testq %rax, %rax
je 0x6966
leaq 0xba68(%rip), %rsi      # 0x123c3
movq %r14, %rdi
callq 0x7966
movl %eax, 0x4(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./src/tmxparser.cpp
// Function: tmxparser::_parseTileDefinitionNode(tinyxml2::XMLElement*, tmxparser::TmxTileDefinition*)
TmxReturn _parseTileDefinitionNode(tinyxml2::XMLElement* element, TmxTileDefinition* outTileDefinition)
{
	TmxReturn error = TmxReturn::kSuccess;

	outTileDefinition->id = element->UnsignedAttribute("id");
	error = _parsePropertyNode(element->FirstChildElement("properties"), &outTileDefinition->propertyMap);
	if (error)
	{
		return error;
	}

	if (element->FirstChildElement("animation") != NULL)
	{
		error = _parseTileAnimationNode(element->FirstChildElement("animation"), &outTileDefinition->animations);
	}

	for (tinyxml2::XMLElement* child = element->FirstChildElement("objectgroup"); child != NULL; child = child->NextSiblingElement("objectgroup"))
	{
		TmxObjectGroup group;
		error = _parseObjectGroupNode(child, &group);
		if (error)
		{
			LOGE("Error processing objectgroup node...");
			return error;
		}

		outTileDefinition->objectgroups.push_back(group);
	}

	return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xba2c(%rip), %rsi      # 0x123ba
callq 0x788e
movl %eax, (%rbx)
leaq 0xb78f(%rip), %rsi      # 0x1212b
movq %r14, %rdi
callq 0xd6a6
leaq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x5adb
movl %eax, %r12d
testl %eax, %eax
je 0x69cc
movl %r12d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb9ca(%rip), %rsi      # 0x1239d
movq %r14, %rdi
callq 0xd6a6
testq %rax, %rax
je 0x69fb
leaq 0xb9b6(%rip), %rsi      # 0x1239d
movq %r14, %rdi
callq 0xd6a6
leaq 0x40(%rbx), %rsi
movq %rax, %rdi
callq 0x6b3d
leaq 0xb7d5(%rip), %rsi      # 0x121d7
movq %r14, %rdi
callq 0xd6a6
testq %rax, %rax
je 0x6b15
movq %rax, %r14
leaq -0xb8(%rbp), %r15
addq $0x58, %rbx
xorl %r13d, %r13d
movq %r15, -0xc8(%rbp)
movq %r13, -0xc0(%rbp)
movb %r13b, -0xb8(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq %r13, -0xa0(%rbp)
movb %r13b, -0x98(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x80(%rbp)
movq $0x1, -0x78(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r15)
movl $0x3f800000, -0x60(%rbp) # imm = 0x3F800000
movq %r13, 0x80(%r15)
movups %xmm0, 0x70(%r15)
movups %xmm0, 0x60(%r15)
movq %r14, %rdi
leaq -0xc8(%rbp), %rsi
callq 0x5fc4
movl %eax, %r12d
testl %eax, %eax
jne 0x6b0a
movq %rbx, %rdi
leaq -0xc8(%rbp), %rsi
callq 0x7756
leaq -0x48(%rbp), %rdi
callq 0x7c10
leaq -0x80(%rbp), %rdi
callq 0x7b34
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x6ad4
callq 0x41c0
movq -0xc8(%rbp), %rdi
cmpq %r15, %rdi
je 0x6ae5
callq 0x41c0
testl %r12d, %r12d
jne 0x6b1d
movq %r14, %rdi
leaq 0xb6e3(%rip), %rsi      # 0x121d7
callq 0xd84e
movq %rax, %r14
testq %rax, %rax
jne 0x6a24
jmp 0x69b7
callq 0x4954
movl %r12d, -0x2c(%rbp)
jmp 0x6aaa
xorl %r12d, %r12d
jmp 0x69b7
movl -0x2c(%rbp), %r12d
jmp 0x69b7
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x7794
movq %rbx, %rdi
callq 0x43d0
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./src/tmxparser.cpp
// Function: tmxparser::_parseTileAnimationNode(tinyxml2::XMLElement*, std::vector<tmxparser::TmxAnimationFrame, std::allocator<tmxparser::TmxAnimationFrame>>*)
TmxReturn _parseTileAnimationNode(tinyxml2::XMLElement* element, TmxAnimationFrameCollection_t* outAnimationCollection)
{
	for (tinyxml2::XMLElement* child = element->FirstChildElement("frame"); child != NULL; child = child->NextSiblingElement("frame"))
	{
		TmxAnimationFrame frame;
		frame.duration = child->FloatAttribute("duration");
		frame.tileId = child->UnsignedAttribute("tileid");

		outAnimationCollection->push_back(frame);
	}

	return kSuccess;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0xb852(%rip), %rsi      # 0x123a7
callq 0xd6a6
testq %rax, %rax
je 0x6bcc
movq %rax, %r14
leaq 0xb844(%rip), %r15      # 0x123ad
leaq 0xb846(%rip), %r12      # 0x123b6
leaq 0xb830(%rip), %r13      # 0x123a7
movq %r14, %rdi
movq %r15, %rsi
callq 0x7936
movss %xmm0, -0x2c(%rbp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x788e
movl %eax, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6bad
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x6bb9
movq %rbx, %rdi
leaq -0x30(%rbp), %rdx
callq 0xb05a
movq %r14, %rdi
movq %r13, %rsi
callq 0xd84e
movq %rax, %r14
testq %rax, %rax
jne 0x6b77
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./src/tmxparser.cpp
// Function: tmxparser::_parseLayerXmlTileNode(tinyxml2::XMLElement*, std::vector<tmxparser::TmxTileset, std::allocator<tmxparser::TmxTileset>> const&, tmxparser::TmxLayerTile*)
TmxReturn _parseLayerXmlTileNode(tinyxml2::XMLElement* element, const TmxTilesetCollection_t& tilesets, TmxLayerTile* outTile)
{
	TmxReturn error = TmxReturn::kSuccess;

	unsigned int gid = element->UnsignedAttribute("gid");

	unsigned int flipXFlag = 0x80000000;
	unsigned int flipYFlag = 0x40000000;
	unsigned int flipDiagonalFlag = 0x20000000;

	outTile->flipX = (gid & flipXFlag ? true : false);
	outTile->flipY = (gid & flipYFlag ? true : false);
	outTile->flipDiagonal = (gid & flipDiagonalFlag ? true : false);
	outTile->gid = (gid & ~(flipXFlag | flipYFlag | flipDiagonalFlag));

	return _calculateTileIndices(tilesets, outTile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
leaq 0xb352(%rip), %rsi      # 0x1236a
callq 0x788e
movl %eax, %ecx
shrl $0x1f, %ecx
movb %cl, 0xc(%rbx)
movl %eax, %ecx
shrl $0x1e, %ecx
andb $0x1, %cl
movb %cl, 0xd(%rbx)
movl %eax, %ecx
shrl $0x1d, %ecx
andb $0x1, %cl
movb %cl, 0xe(%rbx)
andl $0x1fffffff, %eax       # imm = 0x1FFFFFFF
movl %eax, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x7051
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./src/tmxparser.cpp
// Function: tmxparser::_calculateTileIndices(std::vector<tmxparser::TmxTileset, std::allocator<tmxparser::TmxTileset>> const&, tmxparser::TmxLayerTile*)
TmxReturn _calculateTileIndices(const TmxTilesetCollection_t& tilesets, TmxLayerTile* outTile)
{
	outTile->tilesetIndex = 0;
	outTile->tileFlatIndex = 0;

	// exit quickly
	if (outTile->gid == 0)
	{
		return TmxReturn::kSuccess;
	}

	// search for tilesetindex
	// O(n) where n = number of tilesets
	// Generally n will never be high but this method is called from an O(m) method.
	unsigned int index = 0;
	unsigned int lastEndIndex = 1;
	for (auto it = tilesets.begin(); it != tilesets.end(); ++it)
	{
		unsigned int colCount = it->colCount;
		unsigned int rowCount = it->rowCount;
		unsigned int startIndex = it->firstgid;
		unsigned int endIndex = it->firstgid + ( colCount * rowCount );

		if (outTile->gid >= startIndex && outTile->gid < endIndex)
		{
			outTile->tilesetIndex = index;
			outTile->tileFlatIndex = (outTile->gid) - lastEndIndex;

			// done
			return TmxReturn::kSuccess;
		}

		lastEndIndex = endIndex;

		index++;
	}

	// if we made it here, tile indices could not be found
	return TmxReturn::kUnknownTileIndices;
}

// Assembly:
movq $0x0, 0x4(%rsi)
movl (%rsi), %ecx
testl %ecx, %ecx
je 0x70c9
movq (%rdi), %rdx
movq 0x8(%rdi), %rdi
movl $0x8, %eax
cmpq %rdi, %rdx
je 0x70cb
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movl $0x1, %r9d
xorl %r8d, %r8d
movl 0x20(%rdx), %r10d
movl 0x60(%rdx), %r11d
imull 0x64(%rdx), %r11d
addl %r10d, %r11d
cmpl %r10d, %ecx
setb %bl
cmpl %r11d, %ecx
setae %r10b
orb %bl, %r10b
je 0x70a8
incl %r8d
movl %r11d, %r9d
jmp 0x70b6
movl %r8d, 0x4(%rsi)
movl %ecx, %r11d
subl %r9d, %r11d
movl %r11d, 0x8(%rsi)
testb %r10b, %r10b
je 0x70cc
addq $0x108, %rdx            # imm = 0x108
cmpq %rdi, %rdx
jne 0x707e
jmp 0x70ce
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./src/tmxparser.cpp
// Function: tmxparser::calculateTileCoordinatesUV(tmxparser::TmxTileset const&, unsigned int, float, bool, tmxparser::TmxRect&)
TmxReturn calculateTileCoordinatesUV(const TmxTileset& tileset,  unsigned int tileFlatIndex, float pixelCorrection, bool flipY, TmxRect& outRect)
{
	if (tileFlatIndex >= tileset.colCount * tileset.rowCount)
	{
		return TmxReturn::kInvalidTileIndex;
	}

	TileId_t xIndex = tileFlatIndex % tileset.colCount;
	TileId_t yIndex = tileFlatIndex / tileset.colCount;

	unsigned int widthDelta = tileset.tileSpacingInImage + tileset.tileMarginInImage*xIndex;
	unsigned int heightDelta = tileset.tileSpacingInImage + tileset.tileMarginInImage*yIndex;

	float u = (float)((xIndex * tileset.tileWidth) + widthDelta + pixelCorrection) / (float)tileset.image.width;
	float v = (float)((yIndex * tileset.tileHeight) + heightDelta + pixelCorrection) / (float)tileset.image.height;

	float u2 = (float)((( (xIndex+1) * tileset.tileWidth) + widthDelta) - pixelCorrection) / (float)tileset.image.width;
	float v2 = (float)((( (yIndex+1) * tileset.tileHeight) + heightDelta) - pixelCorrection) / (float)tileset.image.height;

	if (flipY)
	{
		float tmpV = v;
		v = 1.f - v2;
		v2 = 1.f - tmpV;
	}

	outRect.u = u;
	outRect.v = v;
	outRect.u2 = u2;
	outRect.v2 = v2;

	return kSuccess;
}

// Assembly:
movl %edx, %r8d
movl 0x64(%rdi), %r9d
movl 0x60(%rdi), %edx
imull %r9d, %edx
movl $0x7, %eax
cmpl %esi, %edx
jbe 0x7621
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %eax
xorl %edx, %edx
divl %r9d
movl %eax, %esi
xorl %eax, %eax
movl 0x50(%rdi), %r11d
movl 0x54(%rdi), %r9d
movl %r9d, %r10d
imull %edx, %r10d
addl %r11d, %r10d
imull %esi, %r9d
addl %r11d, %r9d
movl 0x48(%rdi), %r11d
movl %r11d, %ebx
imull %edx, %ebx
addl %r10d, %ebx
cvtsi2ss %rbx, %xmm1
movl 0xc8(%rdi), %ebx
cvtsi2ss %rbx, %xmm4
movl 0x4c(%rdi), %ebx
addss %xmm0, %xmm1
movl %ebx, %r14d
imull %esi, %r14d
addl %r9d, %r14d
cvtsi2ss %r14, %xmm2
movl 0xcc(%rdi), %edi
cvtsi2ss %rdi, %xmm5
divss %xmm4, %xmm1
addss %xmm0, %xmm2
incl %edx
imull %r11d, %edx
addl %r10d, %edx
cvtsi2ss %rdx, %xmm3
subss %xmm0, %xmm3
divss %xmm4, %xmm3
incl %esi
imull %ebx, %esi
addl %r9d, %esi
xorps %xmm4, %xmm4
cvtsi2ss %rsi, %xmm4
divss %xmm5, %xmm2
subss %xmm0, %xmm4
divss %xmm5, %xmm4
testb %r8b, %r8b
je 0x760a
movss 0xaa0b(%rip), %xmm0     # 0x12004
movaps %xmm0, %xmm5
subss %xmm4, %xmm5
subss %xmm2, %xmm0
movaps %xmm5, %xmm2
movaps %xmm0, %xmm4
movss %xmm1, (%rcx)
movss %xmm2, 0x4(%rcx)
movss %xmm3, 0x8(%rcx)
movss %xmm4, 0xc(%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/main.cpp
// Function: printObjectGroups(int, std::vector<tmxparser::TmxObjectGroup, std::allocator<tmxparser::TmxObjectGroup>> const&)
void printObjectGroups(int depth, const tmxparser::TmxObjectGroupCollection_t& collection)
{
	int nextdepth = depth +1;

	for (auto it = collection.begin(); it != collection.end(); ++it)
	{
		printf_depth(depth, "%s", "<objectgroup>");

		printf_depth(nextdepth, "Name: %s", it->name.c_str());
		printf_depth(nextdepth, "Color: %s", it->color.c_str());
		printf_depth(nextdepth, "Opacity: %f", it->opacity);
		printf_depth(nextdepth, "Visible: %u", it->visible);
		printProperties(nextdepth, it->propertyMap);
		printObjects(nextdepth, it->objects);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r15
cmpq 0x8(%rsi), %r15
je 0xbb1a
movq %rsi, %rbx
movl %edi, %r14d
movl %edi, %eax
incl %r14d
leal (%rax,%rax,4), %eax
movl %eax, -0x2c(%rbp)
leal (%r14,%r14,4), %r12d
leaq 0x6ec8(%rip), %r13      # 0x12936
leaq 0x6b8f(%rip), %rdi      # 0x12604
movl -0x2c(%rbp), %esi
movq %r13, %rdx
leaq 0x6c5c(%rip), %rcx      # 0x126de
xorl %eax, %eax
callq 0x4050
movq (%r15), %rcx
leaq 0x6b9a(%rip), %rdi      # 0x1262d
movl %r12d, %esi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4050
movq 0x20(%r15), %rcx
leaq 0x6c41(%rip), %rdi      # 0x126ec
movl %r12d, %esi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4050
xorps %xmm0, %xmm0
cvtss2sd 0x40(%r15), %xmm0
leaq 0x6c33(%rip), %rdi      # 0x126fb
movl %r12d, %esi
movq %r13, %rdx
movb $0x1, %al
callq 0x4050
movzbl 0x44(%r15), %ecx
leaq 0x6c2b(%rip), %rdi      # 0x1270c
movl %r12d, %esi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4050
leaq 0x48(%r15), %rsi
movl %r14d, %edi
callq 0xb7c0
leaq 0x80(%r15), %rsi
movl %r14d, %edi
callq 0xb83b
addq $0x98, %r15
cmpq 0x8(%rbx), %r15
jne 0xba6e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/main.cpp
// Function: printImageData(int, tmxparser::TmxImage const&)
void printImageData(int depth, const tmxparser::TmxImage& tmximage)
{
	printf_depth(depth, "%s", "<image>");

	depth = depth +1;
	printf_depth(depth, "Source: %s", tmximage.source.c_str());
	printf_depth(depth, "Format: %s", tmximage.format.c_str());
	printf_depth(depth, "Width: %u", tmximage.width);
	printf_depth(depth, "Height: %u", tmximage.height);
	printf_depth(depth, "TransparentColor: %s", tmximage.transparentColor.c_str());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r15d
leal (%r15,%r15,4), %esi
leaq 0x6ac0(%rip), %rdi      # 0x12604
leaq 0x6deb(%rip), %r14      # 0x12936
leaq 0x6bcb(%rip), %rcx      # 0x1271d
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
leal (%r15,%r15,4), %r15d
addl $0x5, %r15d
movq 0x20(%rbx), %rcx
leaq 0x6bb6(%rip), %rdi      # 0x12725
movl %r15d, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
movq (%rbx), %rcx
leaq 0x6baf(%rip), %rdi      # 0x12735
movl %r15d, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
movl 0x60(%rbx), %ecx
leaq 0x6ba8(%rip), %rdi      # 0x12745
movl %r15d, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
movl 0x64(%rbx), %ecx
leaq 0x6ba0(%rip), %rdi      # 0x12754
movl %r15d, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
movq 0x40(%rbx), %rcx
leaq 0x6b98(%rip), %rdi      # 0x12764
movl %r15d, %esi
movq %r14, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4050
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/main.cpp
// Function: printTileDefinition(int, std::unordered_map<unsigned int, tmxparser::TmxTileDefinition, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, tmxparser::TmxTileDefinition>>> const&)
void printTileDefinition(int depth, const tmxparser::TmxTileDefinitionMap_t& map)
{
	for (auto it = map.begin(); it != map.end(); ++it)
	{
		printf_depth(depth, "%s", "<tile>");
		printf_depth(depth+1, "Id: %u", it->second.id);

		printProperties(depth+1, it->second.propertyMap);

		// animations
		printf_depth(depth+1, "%s", "<animation>");
		depth+=2;
		for (auto animIt = it->second.animations.begin(); animIt != it->second.animations.end(); ++animIt)
		{
			printf_depth(depth, "<frame tileId=%u duration=%f>", animIt->tileId, animIt->duration);
		}
		depth-=2;

		printObjectGroups(depth+1, it->second.objectgroups);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x10(%rsi), %rbx
testq %rbx, %rbx
je 0xbcd3
movl %edi, %r15d
movl %edi, %eax
leal (%rax,%rax,4), %ecx
movl %ecx, -0x30(%rbp)
incl %r15d
leal (%rax,%rax,4), %ecx
addl $0x5, %ecx
movl %ecx, -0x2c(%rbp)
leal (%rax,%rax,4), %r12d
addl $0xa, %r12d
leaq 0x6d0f(%rip), %r14      # 0x12936
leaq 0x6b6f(%rip), %r13      # 0x1279d
movl %r15d, -0x34(%rbp)
leaq 0x69cb(%rip), %rdi      # 0x12604
movl -0x30(%rbp), %esi
movq %r14, %rdx
leaq 0x6b38(%rip), %rcx      # 0x1277e
xorl %eax, %eax
callq 0x4050
movl 0x10(%rbx), %ecx
leaq 0x6b2e(%rip), %rdi      # 0x12785
movl -0x2c(%rbp), %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
leaq 0x18(%rbx), %rsi
movl %r15d, %edi
callq 0xb7c0
leaq 0x698d(%rip), %rdi      # 0x12604
movl -0x2c(%rbp), %esi
movq %r14, %rdx
leaq 0x6b0d(%rip), %rcx      # 0x12791
xorl %eax, %eax
callq 0x4050
movq 0x50(%rbx), %r15
cmpq 0x58(%rbx), %r15
je 0xbcb7
movl (%r15), %ecx
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r15), %xmm0
movq %r13, %rdi
movl %r12d, %esi
movq %r14, %rdx
movb $0x1, %al
callq 0x4050
addq $0x8, %r15
jmp 0xbc8f
leaq 0x68(%rbx), %rsi
movl -0x34(%rbp), %r15d
movl %r15d, %edi
callq 0xba37
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xbc32
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/main.cpp
// Function: printTilesets(int, std::vector<tmxparser::TmxTileset, std::allocator<tmxparser::TmxTileset>> const&)
void printTilesets(int depth, const tmxparser::TmxTilesetCollection_t& collection)
{
	for (auto it = collection.begin(); it != collection.end(); ++it)
	{
		printf_depth(depth, "%s", "<tileset>");

		int nextdepth = depth + 1;

		printf_depth(nextdepth, "Name: %s", (*it).name.c_str());
		printf_depth(nextdepth, "FirstGid: %u", (*it).firstgid);
		printf_depth(nextdepth, "Width: %u", (*it).tileWidth);
		printf_depth(nextdepth, "Height: %u", (*it).tileHeight);
		printf_depth(nextdepth, "MarginImage: %u", (*it).tileMarginInImage);
		printf_depth(nextdepth, "SpaceImage: %u", (*it).tileSpacingInImage);
		printf_depth(nextdepth, "rowCount: %u", (*it).colCount);
		printf_depth(nextdepth, "colCount: %u", (*it).rowCount);
		printImageData(nextdepth, (*it).image);
		printTileDefinition(nextdepth, (*it).tileDefinitions);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r15
cmpq 0x8(%rsi), %r15
je 0xbe2e
movq %rsi, %rbx
movl %edi, %r14d
movl %edi, %eax
leal (%rax,%rax,4), %ecx
movl %ecx, -0x2c(%rbp)
incl %r14d
leal (%rax,%rax,4), %r13d
addl $0x5, %r13d
addq $0x68, %r15
leaq 0x6c15(%rip), %r12      # 0x12936
leaq 0x68dc(%rip), %rdi      # 0x12604
movl -0x2c(%rbp), %esi
movq %r12, %rdx
leaq 0x6a8b(%rip), %rcx      # 0x127c0
xorl %eax, %eax
callq 0x4050
movq -0x40(%r15), %rcx
leaq 0x68e6(%rip), %rdi      # 0x1262d
movl %r13d, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4050
movl -0x48(%r15), %ecx
leaq 0x6a6b(%rip), %rdi      # 0x127ca
movl %r13d, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4050
movl -0x20(%r15), %ecx
leaq 0x69ce(%rip), %rdi      # 0x12745
movl %r13d, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4050
movl -0x1c(%r15), %ecx
leaq 0x69c5(%rip), %rdi      # 0x12754
movl %r13d, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4050
movl -0x14(%r15), %ecx
leaq 0x6a35(%rip), %rdi      # 0x127dc
movl %r13d, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4050
movl -0x18(%r15), %ecx
leaq 0x6a32(%rip), %rdi      # 0x127f1
movl %r13d, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4050
movl -0x4(%r15), %ecx
leaq 0x6a2e(%rip), %rdi      # 0x12805
movl %r13d, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4050
movl -0x8(%r15), %ecx
leaq 0x6a28(%rip), %rdi      # 0x12817
movl %r13d, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4050
movl %r14d, %edi
movq %r15, %rsi
callq 0xbb29
leaq 0x68(%r15), %rsi
movl %r14d, %edi
callq 0xbbe3
leaq 0x108(%r15), %rax
addq $0xa0, %r15
cmpq 0x8(%rbx), %r15
movq %rax, %r15
jne 0xbd21
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/main.cpp
// Function: printLayerTiles(int, std::vector<tmxparser::TmxLayerTile, std::allocator<tmxparser::TmxLayerTile>> const&)
void printLayerTiles(int depth, const tmxparser::TmxLayerTileCollection_t& collection)
{
	for (auto it = collection.begin(); it != collection.end(); ++it)
	{
		printf_depth(depth, "%s", "<tile>");

		int nextdepth = depth + 1;

		printf_depth(nextdepth, "Gid: %u", it->gid);
		printf_depth(nextdepth, "tilesetIndex: %u", it->tilesetIndex);
		printf_depth(nextdepth, "tileFlatIndex: %u", it->tileFlatIndex);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r12
cmpq 0x8(%rsi), %r12
je 0xbedd
movq %rsi, %rbx
leal (%rdi,%rdi,4), %r14d
leal (%rdi,%rdi,4), %r15d
addl $0x5, %r15d
leaq 0x6ac8(%rip), %r13      # 0x12936
leaq 0x678f(%rip), %rdi      # 0x12604
movl %r14d, %esi
movq %r13, %rdx
leaq 0x68fc(%rip), %rcx      # 0x1277e
xorl %eax, %eax
callq 0x4050
movl (%r12), %ecx
leaq 0x6995(%rip), %rdi      # 0x12829
movl %r15d, %esi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4050
movl 0x4(%r12), %ecx
leaq 0x6989(%rip), %rdi      # 0x12836
movl %r15d, %esi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4050
movl 0x8(%r12), %ecx
leaq 0x6986(%rip), %rdi      # 0x1284c
movl %r15d, %esi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4050
addq $0x10, %r12
cmpq 0x8(%rbx), %r12
jne 0xbe6e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/main.cpp
// Function: printLayers(int, std::vector<tmxparser::TmxLayer, std::allocator<tmxparser::TmxLayer>> const&)
void printLayers(int depth, const tmxparser::TmxLayerCollection_t& collection)
{
	for (auto it = collection.begin(); it != collection.end(); ++it)
	{
		printf_depth(depth, "%s", "<layer>");

		int nextdepth = depth + 1;

		printf_depth(nextdepth, "Name: %s", it->name.c_str());
		printf_depth(nextdepth, "Width: %u", (*it).width);
		printf_depth(nextdepth, "Height: %u", (*it).height);
		printf_depth(nextdepth, "Opacity: %f", (*it).opacity);
		printf_depth(nextdepth, "Visible: %u", (*it).visible);
		printProperties(nextdepth+1, it->propertyMap);
		printLayerTiles(nextdepth+1, it->tiles);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r15
cmpq 0x8(%rsi), %r15
je 0xbfe5
movq %rsi, %rbx
movl %edi, %r14d
leal (%r14,%r14,4), %eax
movl %eax, -0x2c(%rbp)
leal (%r14,%r14,4), %r12d
addl $0x5, %r12d
addl $0x2, %r14d
leaq 0x6a0f(%rip), %r13      # 0x12936
leaq 0x66d6(%rip), %rdi      # 0x12604
movl -0x2c(%rbp), %esi
movq %r13, %rdx
leaq 0x6928(%rip), %rcx      # 0x12863
xorl %eax, %eax
callq 0x4050
movq (%r15), %rcx
leaq 0x66e1(%rip), %rdi      # 0x1262d
movl %r12d, %esi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4050
movl 0x20(%r15), %ecx
leaq 0x67e1(%rip), %rdi      # 0x12745
movl %r12d, %esi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4050
movl 0x24(%r15), %ecx
leaq 0x67d8(%rip), %rdi      # 0x12754
movl %r12d, %esi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4050
xorps %xmm0, %xmm0
cvtss2sd 0x28(%r15), %xmm0
leaq 0x6762(%rip), %rdi      # 0x126fb
movl %r12d, %esi
movq %r13, %rdx
movb $0x1, %al
callq 0x4050
movzbl 0x2c(%r15), %ecx
leaq 0x675a(%rip), %rdi      # 0x1270c
movl %r12d, %esi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4050
leaq 0x30(%r15), %rsi
movl %r14d, %edi
callq 0xb7c0
leaq 0x68(%r15), %rsi
movl %r14d, %edi
callq 0xbe3d
subq $-0x80, %r15
cmpq 0x8(%rbx), %r15
jne 0xbf27
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/main.cpp
// Function: printTmxMapData(tmxparser::TmxMap const*)
void printTmxMapData(const tmxparser::TmxMap* map)
{
	int depth = 0;

	printf_depth(0, "%s", "<map>");
	depth = 1;
	printf_depth(depth, "Version: %s", map->version.c_str());
	printf_depth(depth, "Orientation: %d", map->orientation);
	printf_depth(depth, "Width: %u", map->width);
	printf_depth(depth, "Height: %u", map->height);
	printf_depth(depth, "TileWidth: %u", map->tileWidth);
	printf_depth(depth, "TileHeight: %u", map->tileHeight);
	printf_depth(depth, "BackgroundColor: %s", map->backgroundColor.c_str());
	printProperties(depth+1, map->propertyMap);
	printTilesets(depth+1, map->tilesetCollection);
	printLayers(depth+1, map->layerCollection);
	printObjectGroups(depth+1, map->objectGroupCollection);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x65ff(%rip), %rdi      # 0x12604
leaq 0x692a(%rip), %r14      # 0x12936
leaq 0x6858(%rip), %rcx      # 0x1286b
xorl %esi, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
movq (%rbx), %rcx
leaq 0x6848(%rip), %rdi      # 0x12871
movl $0x5, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
movl 0x20(%rbx), %ecx
leaq 0x6840(%rip), %rdi      # 0x12882
movl $0x5, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
movl 0x24(%rbx), %ecx
leaq 0x66ea(%rip), %rdi      # 0x12745
movl $0x5, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
movl 0x28(%rbx), %ecx
leaq 0x66e0(%rip), %rdi      # 0x12754
movl $0x5, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
movl 0x2c(%rbx), %ecx
leaq 0x680a(%rip), %rdi      # 0x12897
movl $0x5, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
movl 0x30(%rbx), %ecx
leaq 0x6804(%rip), %rdi      # 0x128aa
movl $0x5, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
movq 0x38(%rbx), %rcx
leaq 0x67fe(%rip), %rdi      # 0x128be
movl $0x5, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4050
leaq 0x78(%rbx), %rsi
movl $0x2, %edi
callq 0xb7c0
leaq 0xb0(%rbx), %rsi
movl $0x2, %edi
callq 0xbce2
leaq 0xc8(%rbx), %rsi
movl $0x2, %edi
callq 0xbeec
addq $0xe0, %rbx
movl $0x2, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xba37
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::StrPair::Reset()
void StrPair::Reset()
{
    if ( _flags & NEEDS_DELETE ) {
        delete [] _start;
    }
    _flags = 0;
    _start = 0;
    _end = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testb $0x2, 0x1(%rdi)
je 0xc67f
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xc67f
callq 0x4280
movl $0x0, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::StrPair::TransferTo(tinyxml2::StrPair*)
void StrPair::TransferTo( StrPair* other )
{
    if ( this == other ) {
        return;
    }
    // This in effect implements the assignment operator by "moving"
    // ownership (as in auto_ptr).

    TIXMLASSERT( other->_flags == 0 );
    TIXMLASSERT( other->_start == 0 );
    TIXMLASSERT( other->_end == 0 );

    other->Reset();

    other->_flags = _flags;
    other->_start = _start;
    other->_end = _end;

    _flags = 0;
    _start = 0;
    _end = 0;
}

// Assembly:
cmpq %rsi, %rdi
je 0xc6e6
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testb $0x2, 0x1(%rsi)
je 0xc6ba
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0xc6ba
callq 0x4280
xorl %eax, %eax
movl %eax, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movl (%rbx), %ecx
movl %ecx, (%r14)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%r14)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%r14)
movl %eax, (%rbx)
movups %xmm0, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::StrPair::SetStr(char const*, int)
void StrPair::SetStr( const char* str, int flags )
{
    Reset();
    size_t len = strlen( str );
    _start = new char[ len+1 ];
    memcpy( _start, str, len+1 );
    _end = _start + len;
    _flags = flags | NEEDS_DELETE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
testb $0x2, 0x1(%rdi)
je 0xc712
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0xc712
callq 0x4280
movl $0x0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq %r15, %rdi
callq 0x4100
movq %rax, %r12
leaq 0x1(%rax), %r13
movq %r13, %rdi
callq 0x4040
movq %r15, %rsi
movq %rax, %r15
movq %rax, 0x8(%r14)
movq %rax, %rdi
movq %r13, %rdx
callq 0x4190
addq %r12, %r15
movq %r15, 0x10(%r14)
orl $0x200, %ebx            # imm = 0x200
movl %ebx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::StrPair::ParseText(char*, char const*, int)
char* StrPair::ParseText( char* p, const char* endTag, int strFlags )
{
    TIXMLASSERT( endTag && *endTag );

    char* start = p;
    char  endChar = *endTag;
    size_t length = strlen( endTag );

    // Inner loop of text parsing.
    while ( *p ) {
        if ( *p == endChar && strncmp( p, endTag, length ) == 0 ) {
            Set( start, p, strFlags );
            return p + length;
        }
        ++p;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r15d
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, -0x38(%rbp)
movb (%rdx), %r12b
movq %rdx, %rdi
callq 0x4100
movq %rax, %rbx
movb (%r14), %al
testb %al, %al
je 0xc7c8
movl %r15d, -0x2c(%rbp)
movq %r14, %r15
cmpb %r12b, %al
jne 0xc7bd
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x4110
testl %eax, %eax
je 0xc7cc
movb 0x1(%r15), %al
incq %r15
testb %al, %al
jne 0xc7a6
xorl %ebx, %ebx
jmp 0xc7e1
movq -0x38(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movl -0x2c(%rbp), %ecx
callq 0x1088e
addq %r15, %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::StrPair::ParseName(char*)
char* StrPair::ParseName( char* p )
{
    if ( !p || !(*p) ) {
        return 0;
    }

    char* const start = p;

    while( *p && ( p == start ? XMLUtil::IsNameStartChar( *p ) : XMLUtil::IsNameChar( *p ) )) {
        ++p;
    }

    if ( p > start ) {
        Set( start, p, 0 );
        return p;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xc8d5
movq %rsi, %r15
cmpb $0x0, (%rsi)
je 0xc8d5
movq %rdi, %r14
movb (%r15), %r13b
movq %r15, %rbx
testb %r13b, %r13b
je 0xc8a2
xorl %ebx, %ebx
testq %rbx, %rbx
je 0xc865
testb %r13b, %r13b
js 0xc892
movzbl %r13b, %r12d
movl %r12d, %edi
callq 0x4370
testl %eax, %eax
jne 0xc892
cmpb $0x3a, %r13b
je 0xc892
cmpl $0x5f, %r12d
je 0xc892
addl $-0x30, %r12d
cmpl $0xa, %r12d
setb %cl
addb $-0x2d, %r13b
cmpb $0x2, %r13b
setb %al
jmp 0xc88c
testb %r13b, %r13b
js 0xc87a
movzbl %r13b, %edi
callq 0x4370
testl %eax, %eax
setne %al
jmp 0xc87c
movb $0x1, %al
cmpb $0x3a, %r13b
sete %cl
orb %al, %cl
cmpb $0x5f, %r13b
sete %al
orb %cl, %al
testb %al, %al
je 0xc89f
movb 0x1(%r15,%rbx), %r13b
incq %rbx
testb %r13b, %r13b
jne 0xc827
addq %r15, %rbx
cmpq %r15, %rbx
jbe 0xc8d5
testb $0x2, 0x1(%r14)
je 0xc8bc
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0xc8bc
callq 0x4280
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq %r15, 0x8(%r14)
movq %rbx, 0x10(%r14)
movl $0x100, (%r14)          # imm = 0x100
jmp 0xc8d7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::StrPair::CollapseWhitespace()
void StrPair::CollapseWhitespace()
{
    // Adjusting _start would cause undefined behavior on delete[]
    TIXMLASSERT( ( _flags & NEEDS_DELETE ) == 0 );
    // Trim leading space.
    _start = XMLUtil::SkipWhiteSpace( _start );

    if ( _start && *_start ) {
        char* p = _start;	// the read pointer
        char* q = _start;	// the write pointer

        while( *p ) {
            if ( XMLUtil::IsWhiteSpace( *p )) {
                p = XMLUtil::SkipWhiteSpace( p );
                if ( *p == 0 ) {
                    break;    // don't write to q; this trims the trailing space.
                }
                *q = ' ';
                ++q;
            }
            *q = *p;
            ++q;
            ++p;
        }
        *q = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movb (%r14), %al
testb %al, %al
js 0xc917
movzbl %al, %edi
callq 0x4060
testl %eax, %eax
je 0xc917
movb 0x1(%r14), %al
incq %r14
jmp 0xc8fe
movq %r14, 0x8(%rbx)
cmpb $0x0, (%r14)
je 0xc97d
movb (%r14), %r15b
testb %r15b, %r15b
je 0xc979
movq %r14, %rbx
testb %r15b, %r15b
js 0xc965
movzbl %r15b, %edi
callq 0x4060
testl %eax, %eax
je 0xc965
testb %r15b, %r15b
js 0xc959
movzbl %r15b, %edi
callq 0x4060
testl %eax, %eax
je 0xc959
movb 0x1(%rbx), %r15b
incq %rbx
jmp 0xc93e
cmpb $0x0, (%rbx)
je 0xc979
movb $0x20, (%r14)
incq %r14
movb (%rbx), %al
movb %al, (%r14)
incq %r14
movb 0x1(%rbx), %r15b
incq %rbx
testb %r15b, %r15b
jne 0xc92c
movb $0x0, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLUtil::ReadBOM(char const*, bool*)
const char* XMLUtil::ReadBOM( const char* p, bool* bom )
{
    *bom = false;
    const unsigned char* pu = reinterpret_cast<const unsigned char*>(p);
    // Check for BOM:
    if (    *(pu+0) == TIXML_UTF_LEAD_0
            && *(pu+1) == TIXML_UTF_LEAD_1
            && *(pu+2) == TIXML_UTF_LEAD_2 ) {
        *bom = true;
        p += 3;
    }
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movb $0x0, (%rsi)
cmpb $-0x11, (%rdi)
jne 0xcca6
cmpb $-0x45, 0x1(%rax)
jne 0xcca6
cmpb $-0x41, 0x2(%rax)
jne 0xcca6
movb $0x1, (%rsi)
addq $0x3, %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLUtil::ConvertUTF32ToUTF8(unsigned long, char*, int*)
void XMLUtil::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length )
{
    const unsigned long BYTE_MASK = 0xBF;
    const unsigned long BYTE_MARK = 0x80;
    const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };

    if (input < 0x80) {
        *length = 1;
    }
    else if ( input < 0x800 ) {
        *length = 2;
    }
    else if ( input < 0x10000 ) {
        *length = 3;
    }
    else if ( input < 0x200000 ) {
        *length = 4;
    }
    else {
        *length = 0;    // This code won't covert this correctly anyway.
        return;
    }

    output += *length;

    // Scary scary fall throughs.
    switch (*length) {
        case 4:
            --output;
            *output = (char)((input | BYTE_MARK) & BYTE_MASK);
            input >>= 6;
        case 3:
            --output;
            *output = (char)((input | BYTE_MARK) & BYTE_MASK);
            input >>= 6;
        case 2:
            --output;
            *output = (char)((input | BYTE_MARK) & BYTE_MASK);
            input >>= 6;
        case 1:
            --output;
            *output = (char)(input | FIRST_BYTE_MARK[*length]);
        default:
            break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movaps %xmm0, -0x20(%rbp)
movaps %xmm0, -0x40(%rbp)
movq $0xc0, -0x30(%rbp)
movq $0xe0, -0x28(%rbp)
movq $0xf0, -0x20(%rbp)
movq $0xf8, -0x18(%rbp)
movq $0xfc, -0x10(%rbp)
movl $0x1, %eax
cmpq $0x80, %rdi
jb 0xcd1b
movl $0x2, %eax
cmpq $0x800, %rdi            # imm = 0x800
jb 0xcd1b
movl $0x3, %eax
cmpq $0x10000, %rdi          # imm = 0x10000
jb 0xcd1b
movl $0x4, %eax
cmpq $0x200000, %rdi         # imm = 0x200000
jae 0xcd77
movl %eax, (%rdx)
leal -0x1(%rax), %ecx
cmpl $0x3, %ecx
ja 0xcd75
movl %eax, %eax
addq %rax, %rsi
leaq 0x5c2b(%rip), %rax      # 0x1295c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl %edi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, -0x1(%rsi)
decq %rsi
shrq $0x6, %rdi
movl %edi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, -0x1(%rsi)
decq %rsi
shrq $0x6, %rdi
movl %edi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, -0x1(%rsi)
decq %rsi
shrq $0x6, %rdi
movslq (%rdx), %rax
orl -0x40(%rbp,%rax,8), %edi
movb %dil, -0x1(%rsi)
popq %rbp
retq
movl $0x0, (%rdx)
jmp 0xcd75
nop
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLUtil::ToBool(char const*, bool*)
bool XMLUtil::ToBool( const char* str, bool* value )
{
    int ival = 0;
    if ( ToInt( str, &ival )) {
        *value = (ival==0) ? false : true;
        return true;
    }
    if ( StringEqual( str, "true" ) ) {
        *value = true;
        return true;
    }
    else if ( StringEqual( str, "false" ) ) {
        *value = false;
        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x14(%rbp), %rdx
movl $0x0, (%rdx)
leaq 0x5bd8(%rip), %rsi      # 0x12a40
xorl %eax, %eax
callq 0x41d0
cmpl $0x1, %eax
jne 0xce80
cmpl $0x0, -0x14(%rbp)
setne %al
jmp 0xcf4b
movb $0x1, %al
leaq 0x5bc8(%rip), %rcx      # 0x12a51
cmpq %rcx, %r14
je 0xcf4b
movb (%r14), %sil
testb %sil, %sil
sete %dl
cmpb $0x74, %sil
jne 0xcedd
movl $0x1, %edi
leaq 0x5ba4(%rip), %rcx      # 0x12a51
movq %rdi, %rsi
movb (%r14,%rdi), %dil
testb %dil, %dil
sete %dl
je 0xcece
cmpb (%rsi,%rcx), %dil
jne 0xcece
leaq 0x1(%rsi), %rdi
cmpl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
jne 0xcead
cmpl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
sete %dil
addq %rsi, %rcx
jmp 0xcedf
xorl %edi, %edi
testb %dil, %dil
jne 0xcf4b
testb %dl, %dl
je 0xceed
cmpb $0x0, (%rcx)
je 0xcf4b
leaq 0x5b62(%rip), %rcx      # 0x12a56
cmpq %rcx, %r14
je 0xcf49
movb (%r14), %dl
testb %dl, %dl
sete %al
cmpb $0x66, %dl
jne 0xcf42
movl $0x1, %esi
leaq 0x5b44(%rip), %rcx      # 0x12a56
movq %rsi, %rdx
movb (%r14,%rsi), %sil
testb %sil, %sil
sete %al
je 0xcf33
cmpb (%rdx,%rcx), %sil
jne 0xcf33
leaq 0x1(%rdx), %rsi
cmpl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
jne 0xcf12
cmpl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
sete %sil
addq %rdx, %rcx
jmp 0xcf44
xorl %esi, %esi
testb %sil, %sil
je 0xcf58
xorl %eax, %eax
movb %al, (%rbx)
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
testb %al, %al
je 0xcf65
xorl %eax, %eax
cmpb $0x0, (%rcx)
jne 0xcf4f
jmp 0xcf4b
xorl %eax, %eax
jmp 0xcf4f
nop
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLDocument::Accept(tinyxml2::XMLVisitor*) const
bool XMLDocument::Accept( XMLVisitor* visitor ) const
{
    if ( visitor->VisitEnter( *this ) ) {
        for ( const XMLNode* node=FirstChild(); node; node=node->NextSibling() ) {
            if ( !node->Accept( visitor ) ) {
                break;
            }
        }
    }
    return visitor->VisitExit( *this );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
movq %rbx, %rsi
callq *0x10(%rax)
movq 0x30(%rbx), %r15
testq %r15, %r15
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xd37e
movq (%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
callq *0x70(%rax)
testb %al, %al
je 0xd37e
movq 0x48(%r15), %r15
testq %r15, %r15
jne 0xd365
movq (%r14), %rax
movq 0x18(%rax), %rax
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
nop