// File: ticky[P]ps2iconsys/src/obj_to_ps2icon.cpp
// Function: LoadOBJFile()
OBJ_FileLoader* LoadOBJFile()
{
	OBJ_FileLoader* ret = NULL;
	if(verbose_output)
		std::cout << " * Reading OBJ file \"" << obj_input_file << "\"...";
	try {
		ret = new OBJ_FileLoader(obj_input_file);
	} catch(Ghulbus::gbException e) {
		std::cout << "\nFile read error: \"" << obj_input_file << "\"" << std::endl;
		exit(1);
	}
	if(verbose_output)
		std::cout << "done." << std::endl;

	if(obj_mesh_index >= ret->GetNMeshes()) {
		std::cout << "Invalid mesh index. Index given: " << obj_mesh_index << "; Maximum allowed for \"" 
			<< obj_input_file << "\": " << (ret->GetNMeshes() - 1) << std::endl;
		exit(1);
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq $0x0, -0x8(%rbp)
testb $0x1, 0x87e1(%rip)      # 0x18298
je 0xfaea
movq 0x8518(%rip), %rdi      # 0x17fd8
leaq 0x2110(%rip), %rsi      # 0x11bd7
callq 0x21c0
movq %rax, %rdi
movq 0x87a2(%rip), %rsi      # 0x18278
callq 0x21c0
movq %rax, %rdi
leaq 0x2108(%rip), %rsi      # 0x11bed
callq 0x21c0
movl $0x18, %edi
callq 0x21d0
movq %rax, -0x38(%rbp)
jmp 0xfafa
movq -0x38(%rbp), %rdi
movq 0x8773(%rip), %rsi      # 0x18278
callq 0x2700
jmp 0xfb0c
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xfbf5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0xfb41
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x18, %esi
callq 0x21e0
movl -0x14(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xfccb
movq -0x10(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x2240
movq %rax, %rsi
leaq -0x30(%rbp), %rdi
callq 0xf100
movq -0x48(%rbp), %rdi
callq 0x20c0
movq 0x845e(%rip), %rdi      # 0x17fd8
leaq 0x2071(%rip), %rsi      # 0x11bf2
callq 0x21c0
movq %rax, -0x40(%rbp)
jmp 0xfb8c
movq -0x40(%rbp), %rdi
movq 0x86e1(%rip), %rsi      # 0x18278
callq 0x21c0
movq %rax, -0x50(%rbp)
jmp 0xfba2
movq -0x50(%rbp), %rdi
leaq 0x2157(%rip), %rsi      # 0x11d04
callq 0x21c0
movq %rax, -0x58(%rbp)
jmp 0xfbb8
movq -0x58(%rbp), %rdi
movq 0x83fd(%rip), %rsi      # 0x17fc0
callq 0x21f0
jmp 0xfbca
movl $0x1, %edi
callq 0x2220
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xf150
callq 0x2330
jmp 0xfbf0
jmp 0xfccb
testb $0x1, 0x869c(%rip)      # 0x18298
je 0xfc20
movq 0x83d3(%rip), %rdi      # 0x17fd8
leaq 0x209b(%rip), %rsi      # 0x11ca7
callq 0x21c0
movq %rax, %rdi
movq 0x83a5(%rip), %rsi      # 0x17fc0
callq 0x21f0
movl 0x865a(%rip), %eax      # 0x18280
movl %eax, -0x5c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3000
movl %eax, %ecx
movl -0x5c(%rbp), %eax
cmpl %ecx, %eax
jl 0xfcc1
movq 0x8392(%rip), %rdi      # 0x17fd8
leaq 0x1fb9(%rip), %rsi      # 0x11c06
callq 0x21c0
movq %rax, %rdi
movl 0x8625(%rip), %esi      # 0x18280
callq 0x2350
movq %rax, %rdi
leaq 0x1fbe(%rip), %rsi      # 0x11c28
callq 0x21c0
movq %rax, %rdi
movq 0x85ff(%rip), %rsi      # 0x18278
callq 0x21c0
movq %rax, %rdi
leaq 0x1fb8(%rip), %rsi      # 0x11c40
callq 0x21c0
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3000
movq -0x68(%rbp), %rdi
movl %eax, %esi
subl $0x1, %esi
callq 0x2350
movq %rax, %rdi
movq 0x830e(%rip), %rsi      # 0x17fc0
callq 0x21f0
movl $0x1, %edi
callq 0x2220
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x2370
movq %rax, %rdi
callq 0x5470
nopl (%rax)