// File: 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
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8700
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8770
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x8730
testb $0x1, %al
jne 0x180df
jmp 0x182b9
imull $0x5, -0x4(%rbp), %esi
leaq 0xa502(%rip), %rdi      # 0x225ec
leaq 0xa840(%rip), %rdx      # 0x22931
leaq 0xa6b0(%rip), %rcx      # 0x227a8
movb $0x0, %al
callq 0x4060
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18cf0
movq %rax, %rdi
addq $0x28, %rdi
callq 0x4100
movl -0x4c(%rbp), %esi
movq %rax, %rcx
leaq 0xa4e4(%rip), %rdi      # 0x22615
leaq 0xa7f9(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18cf0
movl -0x48(%rbp), %esi
movl 0x20(%rax), %ecx
leaq 0xa656(%rip), %rdi      # 0x227b2
leaq 0xa7ce(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x44(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18cf0
movl -0x44(%rbp), %esi
movl 0x48(%rax), %ecx
leaq 0xa5a6(%rip), %rdi      # 0x2272d
leaq 0xa7a3(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x40(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18cf0
movl -0x40(%rbp), %esi
movl 0x4c(%rax), %ecx
leaq 0xa58a(%rip), %rdi      # 0x2273c
leaq 0xa778(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x3c(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18cf0
movl -0x3c(%rbp), %esi
movl 0x54(%rax), %ecx
leaq 0xa5e7(%rip), %rdi      # 0x227c4
leaq 0xa74d(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18cf0
movl -0x38(%rbp), %esi
movl 0x50(%rax), %ecx
leaq 0xa5d1(%rip), %rdi      # 0x227d9
leaq 0xa722(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x34(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18cf0
movl -0x34(%rbp), %esi
movl 0x64(%rax), %ecx
leaq 0xa5ba(%rip), %rdi      # 0x227ed
leaq 0xa6f7(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
imull $0x5, -0x24(%rbp), %eax
movl %eax, -0x30(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18cf0
movl -0x30(%rbp), %esi
movl 0x60(%rax), %ecx
leaq 0xa5a1(%rip), %rdi      # 0x227ff
leaq 0xa6cc(%rip), %rdx      # 0x22931
movb $0x0, %al
callq 0x4060
movl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18cf0
movl -0x2c(%rbp), %edi
movq %rax, %rsi
addq $0x68, %rsi
callq 0x17dd0
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x18cf0
movl -0x28(%rbp), %edi
movq %rax, %rsi
addq $0xd0, %rsi
callq 0x17ee0
leaq -0x18(%rbp), %rdi
callq 0x87c0
jmp 0x180bc
addq $0x50, %rsp
popq %rbp
retq
nop