// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
cmpb $0x1, 0x6381(%rip)      # 0xf280
jne 0x8f73
movq 0x60d0(%rip), %rbx      # 0xefd8
leaq 0x1c66(%rip), %rsi      # 0xab75
movl $0x15, %edx
movq %rbx, %rdi
callq 0x21f0
movq 0x633d(%rip), %r14      # 0xf260
testq %r14, %r14
je 0x8f44
movq %r14, %rdi
callq 0x20c0
movq 0x60a1(%rip), %rdi      # 0xefd8
movq %r14, %rsi
movq %rax, %rdx
callq 0x21f0
jmp 0x8f5b
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x2310
movq 0x6076(%rip), %rdi      # 0xefd8
leaq 0x1c22(%rip), %rsi      # 0xab8b
movl $0x4, %edx
callq 0x21f0
movl $0x18, %edi
callq 0x21c0
movq %rax, %rbx
movq 0x62d9(%rip), %rsi      # 0xf260
movq %rax, %rdi
callq 0x27dc
cmpb $0x0, 0x62ea(%rip)      # 0xf280
je 0x8fda
movq 0x6039(%rip), %r14      # 0xefd8
leaq 0x1c9f(%rip), %rsi      # 0xac45
movl $0x5, %edx
movq %r14, %rdi
callq 0x21f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movl 0x6288(%rip), %ebp      # 0xf268
movq %rbx, %rdi
callq 0x2d3c
cmpl %eax, %ebp
jge 0x8ffa
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x5fd7(%rip), %rdi      # 0xefd8
leaq 0x1b9c(%rip), %rsi      # 0xaba4
callq 0x21b0
movl 0x6255(%rip), %esi      # 0xf268
movq %rax, %rdi
callq 0x2330
leaq 0x1ba4(%rip), %rsi      # 0xabc6
movq %rax, %rdi
callq 0x21b0
movq 0x622f(%rip), %rsi      # 0xf260
movq %rax, %rdi
callq 0x21b0
leaq 0x1b9e(%rip), %rsi      # 0xabde
movq %rax, %rdi
callq 0x21b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2d3c
leal -0x1(%rax), %esi
movq %r14, %rdi
callq 0x2330
movq %rax, %rdi
callq 0x20d0
movl $0x1, %edi
callq 0x2210
movq %rdx, %r15
movq %rax, %r14
movl $0x18, %esi
movq %rbx, %rdi
callq 0x21d0
jmp 0x908b
movq %rdx, %r15
movq %rax, %r14
cmpl $0x1, %r15d
jne 0x910b
movq %r14, %rdi
callq 0x2230
movq %rsp, %rdi
movq %rax, %rsi
callq 0x860a
movq %r14, %rdi
callq 0x20b0
movq 0x5f25(%rip), %rdi      # 0xefd8
leaq 0x1ad6(%rip), %rsi      # 0xab90
movl $0x13, %edx
callq 0x21f0
movq 0x6195(%rip), %rsi      # 0xf260
movq 0x5f06(%rip), %rdi      # 0xefd8
callq 0x21b0
movq %rax, %rbx
leaq 0x1bc1(%rip), %rsi      # 0xaca2
movl $0x1, %edx
movq %rax, %rdi
callq 0x21f0
movq %rbx, %rdi
callq 0x20d0
jmp 0x9066
movq %rax, %r14
movq %rsp, %rdi
callq 0x8624
callq 0x2300
movq %r14, %rdi
callq 0x2350
movq %rax, %rdi
callq 0x7292