// File: ticky[P]ps2iconsys/src/ps2icon_to_obj.cpp
// Function: LoadPS2Icon()
PS2Icon* LoadPS2Icon()
{
	PS2Icon* ret = NULL;
	if(verbose_output)
		std::cout << " * Reading PS2Icon file \"" << ps2_input_file << "\"...\n";
	try {
		ret = new PS2Icon(ps2_input_file);
	} catch( std::exception e ) {
		std::cout << "File read error: \"" << ps2_input_file << "\"" << std::endl;
		exit(1);
	}
	if(verbose_output)
		std::cout << " **  Found geometry - " << ret->GetNVertices() << " vertices, " 
			<< ret->GetNShapes() << " shapes." << std::endl;
	if(ret->GetNFrames() > 1) {
		std::cout << " **  Found animation - " << ret->GetNFrames() << " frames." << std::endl;
	}
	if(verbose_output)
		std::cout << " *  done." << std::endl;
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq $0x0, -0x8(%rbp)
testb $0x1, 0x89f9(%rip)      # 0x18280
je 0xf8ba
movq 0x8748(%rip), %rdi      # 0x17fd8
leaq 0x21a8(%rip), %rsi      # 0x11a3f
callq 0x21b0
movq %rax, %rdi
movq 0x89c2(%rip), %rsi      # 0x18268
callq 0x21b0
movq %rax, %rdi
leaq 0x21a4(%rip), %rsi      # 0x11a59
callq 0x21b0
movl $0x10068, %edi          # imm = 0x10068
callq 0x21c0
movq %rax, -0x28(%rbp)
jmp 0xf8ca
movq -0x28(%rbp), %rdi
movq 0x8993(%rip), %rsi      # 0x18268
callq 0x9e60
jmp 0xf8dc
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xf9c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0xf911
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x10068, %esi          # imm = 0x10068
callq 0x21d0
movl -0x14(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xfaca
movq -0x10(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x2220
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0xc690
movq -0x38(%rbp), %rdi
callq 0x20c0
movq 0x868e(%rip), %rdi      # 0x17fd8
leaq 0x210e(%rip), %rsi      # 0x11a5f
callq 0x21b0
movq %rax, -0x30(%rbp)
jmp 0xf95c
movq -0x30(%rbp), %rdi
movq 0x8901(%rip), %rsi      # 0x18268
callq 0x21b0
movq %rax, -0x40(%rbp)
jmp 0xf972
movq -0x40(%rbp), %rdi
leaq 0x20f3(%rip), %rsi      # 0x11a70
callq 0x21b0
movq %rax, -0x48(%rbp)
jmp 0xf988
movq -0x48(%rbp), %rdi
movq 0x862d(%rip), %rsi      # 0x17fc0
callq 0x21e0
jmp 0xf99a
movl $0x1, %edi
callq 0x2210
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x2390
callq 0x2300
jmp 0xf9c0
jmp 0xfaca
testb $0x1, 0x88b4(%rip)      # 0x18280
je 0xfa3e
movq 0x8603(%rip), %rdi      # 0x17fd8
leaq 0x2096(%rip), %rsi      # 0x11a72
callq 0x21b0
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
callq 0xb800
movq -0x58(%rbp), %rdi
movl %eax, %esi
callq 0x2320
movq %rax, %rdi
leaq 0x2086(%rip), %rsi      # 0x11a89
callq 0x21b0
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0xb860
movq -0x50(%rbp), %rdi
movl %eax, %esi
callq 0x2320
movq %rax, %rdi
leaq 0x206b(%rip), %rsi      # 0x11a95
callq 0x21b0
movq %rax, %rdi
movq 0x8587(%rip), %rsi      # 0x17fc0
callq 0x21e0
movq -0x8(%rbp), %rdi
callq 0xb8c0
cmpl $0x1, %eax
jle 0xfa95
movq 0x8585(%rip), %rdi      # 0x17fd8
leaq 0x2044(%rip), %rsi      # 0x11a9e
callq 0x21b0
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
callq 0xb8c0
movq -0x60(%rbp), %rdi
movl %eax, %esi
callq 0x2320
movq %rax, %rdi
leaq 0x2035(%rip), %rsi      # 0x11ab6
callq 0x21b0
movq %rax, %rdi
movq 0x8530(%rip), %rsi      # 0x17fc0
callq 0x21e0
testb $0x1, 0x87e4(%rip)      # 0x18280
je 0xfac0
movq 0x8533(%rip), %rdi      # 0x17fd8
leaq 0x2013(%rip), %rsi      # 0x11abf
callq 0x21b0
movq %rax, %rdi
movq 0x8505(%rip), %rsi      # 0x17fc0
callq 0x21e0
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x2340
movq %rax, %rdi
callq 0x5440
nopl (%rax,%rax)