LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
imull $0x5, -0x4(%rbp), %esi
leaq 0xa802(%rip), %rdi      # 0x225ec
leaq 0xab40(%rip), %rdx      # 0x22931
leaq 0xa90d(%rip), %rcx      # 0x22705
movb $0x0, %al
callq 0x4060
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
imull $0x5, -0x4(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x4100
movl -0x1c(%rbp), %esi
movq %rax, %rcx
leaq 0xa8e4(%rip), %rdi      # 0x2270d
leaq 0xab01(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x4(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4100
movl -0x18(%rbp), %esi
movq %rax, %rcx
leaq 0xa8c9(%rip), %rdi      # 0x2271d
leaq 0xaad6(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x4(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x60(%rax), %ecx
leaq 0xa8b9(%rip), %rdi      # 0x2272d
leaq 0xaab6(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x4(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x64(%rax), %ecx
leaq 0xa8a8(%rip), %rdi      # 0x2273c
leaq 0xaa96(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
callq 0x4100
movl -0x14(%rbp), %esi
movq %rax, %rcx
leaq 0xa889(%rip), %rdi      # 0x2274c
leaq 0xaa67(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x11d90
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x11dc0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x18d10
testb $0x1, %al
jne 0x182ff
jmp 0x183b6
imull $0x5, -0x4(%rbp), %esi
leaq 0xa2e2(%rip), %rdi      # 0x225ec
leaq 0xa620(%rip), %rdx      # 0x22931
leaq 0xa44e(%rip), %rcx      # 0x22766
movb $0x0, %al
callq 0x4060
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x30(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18d50
movl -0x30(%rbp), %esi
movl (%rax), %ecx
leaq 0xa4cd(%rip), %rdi      # 0x22811
leaq 0xa5e6(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18d50
movl -0x2c(%rbp), %esi
movl 0x4(%rax), %ecx
leaq 0xa4af(%rip), %rdi      # 0x2281e
leaq 0xa5bb(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18d50
movl -0x28(%rbp), %esi
movl 0x8(%rax), %ecx
leaq 0xa49a(%rip), %rdi      # 0x22834
leaq 0xa590(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
leaq -0x18(%rbp), %rdi
callq 0x18d70
jmp 0x182dc
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x18d90
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x18e00
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x18dc0
testb $0x1, %al
jne 0x183ff
jmp 0x18562
imull $0x5, -0x4(%rbp), %esi
leaq 0xa1e2(%rip), %rdi      # 0x225ec
leaq 0xa520(%rip), %rdx      # 0x22931
leaq 0xa433(%rip), %rcx      # 0x2284b
movb $0x0, %al
callq 0x4060
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x40(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18e30
movq %rax, %rdi
callq 0x4100
movl -0x40(%rbp), %esi
movq %rax, %rcx
leaq 0xa1c8(%rip), %rdi      # 0x22615
leaq 0xa4dd(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x3c(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18e50
movl -0x3c(%rbp), %esi
movl 0x20(%rax), %ecx
leaq 0xa2b5(%rip), %rdi      # 0x2272d
leaq 0xa4b2(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18e50
movl -0x38(%rbp), %esi
movl 0x24(%rax), %ecx
leaq 0xa299(%rip), %rdi      # 0x2273c
leaq 0xa487(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x34(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18e50
movl -0x34(%rbp), %esi
movss 0x28(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0xa20f(%rip), %rdi      # 0x226e3
leaq 0xa456(%rip), %rdx      # 0x22931
movb $0x1, %al
callq 0x4060
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x30(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18e50
movl -0x30(%rbp), %esi
movb 0x2c(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
leaq 0xa1f0(%rip), %rdi      # 0x226f4
leaq 0xa426(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18e30
movl -0x2c(%rbp), %edi
movq %rax, %rsi
addq $0x30, %rsi
callq 0x17800
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18e30
movl -0x28(%rbp), %edi
movq %rax, %rsi
addq $0x68, %rsi
callq 0x182c0
leaq -0x18(%rbp), %rdi
callq 0x18e70
jmp 0x183dc
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
leaq 0xa062(%rip), %rdi      # 0x225ec
xorl %esi, %esi
leaq 0xa39e(%rip), %rdx      # 0x22931
leaq 0xa2b9(%rip), %rcx      # 0x22853
movb $0x0, %al
callq 0x4060
movl $0x1, -0xc(%rbp)
imull $0x5, -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4100
movl -0x14(%rbp), %esi
movq %rax, %rcx
leaq 0xa294(%rip), %rdi      # 0x22859
leaq 0xa365(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0xc(%rbp), %esi
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
leaq 0xa285(%rip), %rdi      # 0x2286a
leaq 0xa345(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0xc(%rbp), %esi
movq -0x8(%rbp), %rax
movl 0x24(%rax), %ecx
leaq 0xa128(%rip), %rdi      # 0x2272d
leaq 0xa325(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0xc(%rbp), %esi
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
leaq 0xa117(%rip), %rdi      # 0x2273c
leaq 0xa305(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0xc(%rbp), %esi
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
leaq 0xa23a(%rip), %rdi      # 0x2287f
leaq 0xa2e5(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0xc(%rbp), %esi
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
leaq 0xa22d(%rip), %rdi      # 0x22892
leaq 0xa2c5(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
callq 0x4100
movl -0x10(%rbp), %esi
movq %rax, %rcx
leaq 0xa212(%rip), %rdi      # 0x228a6
leaq 0xa296(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
movl -0xc(%rbp), %edi
addl $0x1, %edi
movq -0x8(%rbp), %rsi
addq $0x78, %rsi
callq 0x17800
movl -0xc(%rbp), %edi
addl $0x1, %edi
movq -0x8(%rbp), %rsi
addq $0xb0, %rsi
callq 0x180a0
movl -0xc(%rbp), %edi
addl $0x1, %edi
movq -0x8(%rbp), %rsi
addq $0xc8, %rsi
callq 0x183c0
movl -0xc(%rbp), %edi
addl $0x1, %edi
movq -0x8(%rbp), %rsi
addq $0xe0, %rsi
callq 0x17c40
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl (%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x1983d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1983b
movq -0x18(%rbp), %rdi
callq 0x4310
jmp 0x1983d
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq $0x0, 0x8(%rax)
movq $0x0, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq -0x10(%rbp), %rax
jne 0x19880
jmp 0x198c3
movq -0x10(%rbp), %rdi
callq 0x19800
movq -0x18(%rbp), %rax
movl (%rax), %edx
movq -0x10(%rbp), %rcx
movl %edx, (%rcx)
movq 0x8(%rax), %rdx
movq -0x10(%rbp), %rcx
movq %rdx, 0x8(%rcx)
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rcx
movq %rdx, 0x10(%rcx)
movl $0x0, (%rax)
movq $0x0, 0x8(%rax)
movq $0x0, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
callq 0x19800
movq -0x10(%rbp), %rdi
callq 0x4120
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x1, %rdi
callq 0x4040
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x1, %rdx
callq 0x41f0
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
addq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0x14(%rbp), %ecx
orl $0x200, %ecx            # imm = 0x200
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
movq -0x20(%rbp), %rdi
callq 0x4120
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x199eb
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x31(%rbp), %ecx
cmpl %ecx, %eax
jne 0x199dd
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x4150
cmpl $0x0, %eax
jne 0x199dd
movq -0x48(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x24(%rbp), %ecx
callq 0x1ed90
movq -0x18(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x199f3
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x1998d
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x19a28
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x19a35
movq $0x0, -0x8(%rbp)
jmp 0x19ac1
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x29(%rbp)
je 0x19a7b
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x19a66
movq -0x18(%rbp), %rax
movzbl (%rax), %edi
callq 0x1ede0
movb %al, -0x2a(%rbp)
jmp 0x19a75
movq -0x18(%rbp), %rax
movzbl (%rax), %edi
callq 0x1ee50
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x19a84
jmp 0x19a92
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x19a3d
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x19ab9
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %ecx, %ecx
callq 0x1ed90
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x19ac1
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x8(%rax), %rdi
callq 0x1eeb0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, 0x8(%rax)
je 0x19b9e
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpb $0x0, (%rax)
je 0x19b9e
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x19b97
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x1eed0
testb $0x1, %al
jne 0x19b43
jmp 0x19b71
movq -0x10(%rbp), %rdi
callq 0x1eeb0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x19b5e
jmp 0x19b97
movq -0x18(%rbp), %rax
movb $0x20, (%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movb (%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x19b28
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xef, %eax
jne 0x1a19a
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xbb, %eax
jne 0x1a19a
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0xbf, %eax
jne 0x1a19a
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
movq -0x8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: 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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x1a4c0
testb $0x1, %al
jne 0x1a56a
jmp 0x1a584
movl -0x1c(%rbp), %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
andb $0x1, %cl
movb %cl, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x1a5da
movq -0x10(%rbp), %rdi
leaq 0x84b3(%rip), %rsi      # 0x22a42
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
callq 0x1ef10
testb $0x1, %al
jne 0x1a59f
jmp 0x1a5ac
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x1a5da
movq -0x10(%rbp), %rdi
leaq 0x8490(%rip), %rsi      # 0x22a47
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
callq 0x1ef10
testb $0x1, %al
jne 0x1a5c7
jmp 0x1a5d4
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x1a5da
jmp 0x1a5d6
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
testb $0x1, %al
jne 0x1a978
jmp 0x1a9b3
movq -0x20(%rbp), %rdi
callq 0x1f340
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1a9b1
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
callq *0x70(%rax)
testb $0x1, %al
jne 0x1a9a0
jmp 0x1a9b1
jmp 0x1a9a2
movq -0x18(%rbp), %rdi
callq 0x1f360
movq %rax, -0x18(%rbp)
jmp 0x1a985
jmp 0x1a9b3
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLNode::DeleteChildren()
void XMLNode::DeleteChildren()
{
    while( _firstChild ) {
        XMLNode* node = _firstChild;
        Unlink( node );

        DeleteNode( node );
    }
    _firstChild = _lastChild = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x1aaef
movq -0x18(%rbp), %rdi
movq 0x30(%rdi), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rsi
callq 0x1ab10
movq -0x10(%rbp), %rdi
callq 0x1ac40
jmp 0x1aac4
movq -0x18(%rbp), %rax
movq $0x0, 0x38(%rax)
movq $0x0, 0x30(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLNode::Unlink(tinyxml2::XMLNode*)
void XMLNode::Unlink( XMLNode* child )
{
    if ( child == _firstChild ) {
        _firstChild = _firstChild->_next;
    }
    if ( child == _lastChild ) {
        _lastChild = _lastChild->_prev;
    }

    if ( child->_prev ) {
        child->_prev->_next = child->_next;
    }
    if ( child->_next ) {
        child->_next->_prev = child->_prev;
    }
	child->_parent = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq 0x30(%rcx), %rax
jne 0x1ab3e
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rcx
movq 0x48(%rcx), %rcx
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
cmpq 0x38(%rcx), %rax
jne 0x1ab5c
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rcx
movq 0x40(%rcx), %rcx
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x1ab7b
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x1ab9a
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLNode::DeleteNode(tinyxml2::XMLNode*)
void XMLNode::DeleteNode( XMLNode* node )
{
    if ( node == 0 ) {
        return;
    }
    MemPool* pool = node->_memPool;
    node->~XMLNode();
    pool->Free( node );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x1ac55
jmp 0x1ac7c
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq (%rdi), %rax
callq *0x80(%rax)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq (%rdi), %rax
callq *0x20(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLNode::InsertEndChild(tinyxml2::XMLNode*)
XMLNode* XMLNode::InsertEndChild( XMLNode* addThis )
{
	if (addThis->_document != _document)
		return 0;

	if (addThis->_parent)
		addThis->_parent->Unlink( addThis );
	else
	   addThis->_memPool->SetTracked();

    if ( _lastChild ) {
        TIXMLASSERT( _firstChild );
        TIXMLASSERT( _lastChild->_next == 0 );
        _lastChild->_next = addThis;
        addThis->_prev = _lastChild;
        _lastChild = addThis;

        addThis->_next = 0;
    }
    else {
        TIXMLASSERT( _firstChild == 0 );
        _firstChild = _lastChild = addThis;

        addThis->_prev = 0;
        addThis->_next = 0;
    }
    addThis->_parent = this;
    return addThis;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpq 0x8(%rcx), %rax
je 0x1ace3
movq $0x0, -0x8(%rbp)
jmp 0x1ad88
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1ad01
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x1ab10
jmp 0x1ad0f
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x1ad4c
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rdx
movq 0x38(%rax), %rcx
movq %rdx, 0x48(%rcx)
movq 0x38(%rax), %rdx
movq -0x18(%rbp), %rcx
movq %rdx, 0x40(%rcx)
movq -0x18(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x48(%rax)
jmp 0x1ad74
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLNode::InsertFirstChild(tinyxml2::XMLNode*)
XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis )
{
	if (addThis->_document != _document)
		return 0;

	if (addThis->_parent)
		addThis->_parent->Unlink( addThis );
	else
	   addThis->_memPool->SetTracked();

    if ( _firstChild ) {
        TIXMLASSERT( _lastChild );
        TIXMLASSERT( _firstChild->_prev == 0 );

        _firstChild->_prev = addThis;
        addThis->_next = _firstChild;
        _firstChild = addThis;

        addThis->_prev = 0;
    }
    else {
        TIXMLASSERT( _lastChild == 0 );
        _firstChild = _lastChild = addThis;

        addThis->_prev = 0;
        addThis->_next = 0;
    }
    addThis->_parent = this;
    return addThis;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpq 0x8(%rcx), %rax
je 0x1add3
movq $0x0, -0x8(%rbp)
jmp 0x1ae78
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1adf1
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x1ab10
jmp 0x1adff
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x1ae3c
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rdx
movq 0x30(%rax), %rcx
movq %rdx, 0x40(%rcx)
movq 0x30(%rax), %rdx
movq -0x18(%rbp), %rcx
movq %rdx, 0x48(%rcx)
movq -0x18(%rbp), %rcx
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x40(%rax)
jmp 0x1ae64
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLNode::InsertAfterChild(tinyxml2::XMLNode*, tinyxml2::XMLNode*)
XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis )
{
	if (addThis->_document != _document)
		return 0;

    TIXMLASSERT( afterThis->_parent == this );

    if ( afterThis->_parent != this ) {
        return 0;
    }

    if ( afterThis->_next == 0 ) {
        // The last node or the only node.
        return InsertEndChild( addThis );
    }
	if (addThis->_parent)
		addThis->_parent->Unlink( addThis );
	else
	   addThis->_memPool->SetTracked();
    addThis->_prev = afterThis;
    addThis->_next = afterThis->_next;
    afterThis->_next->_prev = addThis;
    afterThis->_next = addThis;
    addThis->_parent = this;
    return addThis;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpq 0x8(%rcx), %rax
je 0x1aec7
movq $0x0, -0x8(%rbp)
jmp 0x1af78
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
cmpq %rcx, 0x10(%rax)
je 0x1aee2
movq $0x0, -0x8(%rbp)
jmp 0x1af78
movq -0x18(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x1af00
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1acb0
movq %rax, -0x8(%rbp)
jmp 0x1af78
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1af1e
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x1ab10
jmp 0x1af2c
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rax
movq %rdx, 0x40(%rax)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rdx
movq -0x20(%rbp), %rax
movq %rdx, 0x48(%rax)
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq %rdx, 0x40(%rax)
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
movq %rdx, 0x48(%rax)
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLNode::FirstChildElement(char const*) const
const XMLElement* XMLNode::FirstChildElement( const char* value ) const
{
    for( XMLNode* node=_firstChild; node; node=node->_next ) {
        XMLElement* element = node->ToElement();
        if ( element ) {
            if ( !value || XMLUtil::StringEqual( element->Name(), value ) ) {
                return element;
            }
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1b00a
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1affa
cmpq $0x0, -0x18(%rbp)
je 0x1afee
movq -0x28(%rbp), %rdi
callq 0x82a0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
callq 0x1ef10
testb $0x1, %al
jne 0x1afee
jmp 0x1aff8
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b012
jmp 0x1affa
jmp 0x1affc
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x1afac
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLNode::LastChildElement(char const*) const
const XMLElement* XMLNode::LastChildElement( const char* value ) const
{
    for( XMLNode* node=_lastChild; node; node=node->_prev ) {
        XMLElement* element = node->ToElement();
        if ( element ) {
            if ( !value || XMLUtil::StringEqual( element->Name(), value ) ) {
                return element;
            }
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1b09a
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1b08a
cmpq $0x0, -0x18(%rbp)
je 0x1b07e
movq -0x28(%rbp), %rdi
callq 0x82a0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
callq 0x1ef10
testb $0x1, %al
jne 0x1b07e
jmp 0x1b088
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b0a2
jmp 0x1b08a
jmp 0x1b08c
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x1b03c
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLNode::NextSiblingElement(char const*) const
const XMLElement* XMLNode::NextSiblingElement( const char* value ) const
{
    for( XMLNode* node=this->_next; node; node = node->_next ) {
        const XMLElement* element = node->ToElement();
        if ( element
                && (!value || XMLUtil::StringEqual( value, node->Value() ))) {
            return element;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1b130
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1b120
cmpq $0x0, -0x18(%rbp)
je 0x1b116
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1abc0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
callq 0x1ef10
testb $0x1, %al
jne 0x1b116
jmp 0x1b120
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b138
jmp 0x1b122
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x1b0cc
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLNode::PreviousSiblingElement(char const*) const
const XMLElement* XMLNode::PreviousSiblingElement( const char* value ) const
{
    for( XMLNode* node=_prev; node; node = node->_prev ) {
        const XMLElement* element = node->ToElement();
        if ( element
                && (!value || XMLUtil::StringEqual( value, node->Value() ))) {
            return element;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1b1d0
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1b1c0
cmpq $0x0, -0x18(%rbp)
je 0x1b1b6
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1abc0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
callq 0x1ef10
testb $0x1, %al
jne 0x1b1b6
jmp 0x1b1c0
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b1d8
jmp 0x1b1c2
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x1b16c
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLText::ParseDeep(char*, tinyxml2::StrPair*)
char* XMLText::ParseDeep( char* p, StrPair* )
{
    const char* start = p;
    if ( this->CData() ) {
        p = _value.ParseText( p, "]]>", StrPair::NEEDS_NEWLINE_NORMALIZATION );
        if ( !p ) {
            _document->SetError( XML_ERROR_PARSING_CDATA, start, 0 );
        }
        return p;
    }
    else {
        int flags = _document->ProcessEntities() ? StrPair::TEXT_ELEMENT : StrPair::TEXT_ELEMENT_LEAVE_ENTITIES;
        if ( _document->WhitespaceMode() == COLLAPSE_WHITESPACE ) {
            flags |= StrPair::COLLAPSE_WHITESPACE;
        }

        p = _value.ParseText( p, "<", flags );
        if ( !p ) {
            _document->SetError( XML_ERROR_PARSING_TEXT, start, 0 );
        }
        if ( p && *p ) {
            return p-1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x1f440
testb $0x1, %al
jne 0x1b5df
jmp 0x1b62e
movq -0x38(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
leaq 0x7479(%rip), %rdx      # 0x22a6b
movl $0x2, %ecx
callq 0x19950
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1b621
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rdx
movl $0xb, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x1b580
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1b6d5
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1f460
movb %al, %sil
movq -0x38(%rbp), %rax
movl $0x2, %ecx
movl $0x3, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
movl %ecx, -0x2c(%rbp)
movq 0x8(%rax), %rdi
callq 0x1f480
cmpl $0x1, %eax
jne 0x1b66d
movl -0x2c(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
movl -0x2c(%rbp), %ecx
leaq 0x73e6(%rip), %rdx      # 0x22a69
callq 0x19950
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1b6ad
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rdx
movl $0xa, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x1b580
cmpq $0x0, -0x18(%rbp)
je 0x1b6cb
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1b6cb
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x1b6d5
jmp 0x1b6cd
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLText::ShallowClone(tinyxml2::XMLDocument*) const
XMLNode* XMLText::ShallowClone( XMLDocument* doc ) const
{
    if ( !doc ) {
        doc = _document;
    }
    XMLText* text = doc->NewText( Value() );	// fixme: this will always allocate memory. Intern?
    text->SetCData( this->CData() );
    return text;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1b70b
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x1abc0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x1b760
movq -0x20(%rbp), %rdi
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x1f440
movq -0x28(%rbp), %rdi
movzbl %al, %esi
andl $0x1, %esi
callq 0x1f220
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLDocument::NewText(char const*)
XMLText* XMLDocument::NewText( const char* str )
{
    XMLText* text = new (_textPool.Alloc()) XMLText( this );
    text->_memPool = &_textPool;
    text->SetValue( str );
    return text;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0x180, %rdi            # imm = 0x180
callq 0x1f0e0
movq -0x20(%rbp), %rsi
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
callq 0x1f1e0
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rax, -0x18(%rbp)
addq $0x180, %rcx            # imm = 0x180
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x1abe0
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLComment::ParseDeep(char*, tinyxml2::StrPair*)
char* XMLComment::ParseDeep( char* p, StrPair* )
{
    // Comment parses as text.
    const char* start = p;
    p = _value.ParseText( p, "-->", StrPair::COMMENT );
    if ( p == 0 ) {
        _document->SetError( XML_ERROR_PARSING_COMMENT, start, 0 );
    }
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
leaq 0x73b4(%rip), %rdx      # 0x22ce7
movl $0x2, %ecx
callq 0x19950
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1b962
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rdx
movl $0xc, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x1b580
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLComment::ShallowClone(tinyxml2::XMLDocument*) const
XMLNode* XMLComment::ShallowClone( XMLDocument* doc ) const
{
    if ( !doc ) {
        doc = _document;
    }
    XMLComment* comment = doc->NewComment( Value() );	// fixme: this will always allocate memory. Intern?
    return comment;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1b99b
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x1abc0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x1b9d0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLDocument::NewComment(char const*)
XMLComment* XMLDocument::NewComment( const char* str )
{
    XMLComment* comment = new (_commentPool.Alloc()) XMLComment( this );
    comment->_memPool = &_commentPool;
    comment->SetValue( str );
    return comment;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0x200, %rdi            # imm = 0x200
callq 0x1efe0
movq -0x20(%rbp), %rsi
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
callq 0x1b870
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rax, -0x18(%rbp)
addq $0x200, %rcx            # imm = 0x200
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x1abe0
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLDeclaration::ParseDeep(char*, tinyxml2::StrPair*)
char* XMLDeclaration::ParseDeep( char* p, StrPair* )
{
    // Declaration parses as text.
    const char* start = p;
    p = _value.ParseText( p, "?>", StrPair::NEEDS_NEWLINE_NORMALIZATION );
    if ( p == 0 ) {
        _document->SetError( XML_ERROR_PARSING_DECLARATION, start, 0 );
    }
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
leaq 0x714c(%rip), %rdx      # 0x22cef
movl $0x2, %ecx
callq 0x19950
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1bbd2
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rdx
movl $0xd, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x1b580
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLDocument::NewDeclaration(char const*)
XMLDeclaration* XMLDocument::NewDeclaration( const char* str )
{
    XMLDeclaration* dec = new (_commentPool.Alloc()) XMLDeclaration( this );
    dec->_memPool = &_commentPool;
    dec->SetValue( str ? str : "xml version=\"1.0\" encoding=\"UTF-8\"" );
    return dec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x200, %rdi            # imm = 0x200
callq 0x1efe0
movq -0x28(%rbp), %rsi
movq %rax, %rdi
movq %rdi, -0x30(%rbp)
callq 0x1bae0
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rax, -0x18(%rbp)
addq $0x200, %rcx            # imm = 0x200
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1bca8
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x1bcb5
leaq 0x6faa(%rip), %rax      # 0x22c59
movq %rax, -0x38(%rbp)
jmp 0x1bcb5
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rsi
xorl %edx, %edx
callq 0x1abe0
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLUnknown::ParseDeep(char*, tinyxml2::StrPair*)
char* XMLUnknown::ParseDeep( char* p, StrPair* )
{
    // Unknown parses as text.
    const char* start = p;

    p = _value.ParseText( p, ">", StrPair::NEEDS_NEWLINE_NORMALIZATION );
    if ( !p ) {
        _document->SetError( XML_ERROR_PARSING_UNKNOWN, start, 0 );
    }
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
leaq 0x6eb6(%rip), %rdx      # 0x22ce9
movl $0x2, %ecx
callq 0x19950
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1be62
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rdx
movl $0xe, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x1b580
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: halsafar[P]libtmx-parser/./libs/tinyxml2/tinyxml2.cpp
// Function: tinyxml2::XMLUnknown::ShallowClone(tinyxml2::XMLDocument*) const
XMLNode* XMLUnknown::ShallowClone( XMLDocument* doc ) const
{
    if ( !doc ) {
        doc = _document;
    }
    XMLUnknown* text = doc->NewUnknown( Value() );	// fixme: this will always allocate memory. Intern?
    return text;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1be9b
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x1abc0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x1bed0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)