// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/tiny_obj_loader.h
// Function: tinyobj::LoadObj(tinyobj::attrib_t*, std::vector<tinyobj::shape_t, std::allocator<tinyobj::shape_t>>*, std::vector<tinyobj::material_t, std::allocator<tinyobj::material_t>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, char const*, char const*, bool, bool)
bool LoadObj(attrib_t *attrib, std::vector<shape_t> *shapes,
             std::vector<material_t> *materials, std::string *warn,
             std::string *err, const char *filename, const char *mtl_basedir,
             bool trianglulate, bool default_vcols_fallback) {
  attrib->vertices.clear();
  attrib->normals.clear();
  attrib->texcoords.clear();
  attrib->colors.clear();
  shapes->clear();

  std::stringstream errss;

  std::ifstream ifs(filename);
  if (!ifs) {
    errss << "Cannot open file [" << filename << "]" << std::endl;
    if (err) {
      (*err) = errss.str();
    }
    return false;
  }

  std::string baseDir = mtl_basedir ? mtl_basedir : "";
  if (!baseDir.empty()) {
#ifndef _WIN32
    const char dirsep = '/';
#else
    const char dirsep = '\\';
#endif
    if (baseDir[baseDir.length() - 1] != dirsep) baseDir += dirsep;
  }
  MaterialFileReader matFileReader(baseDir);

  return LoadObj(attrib, shapes, materials, warn, err, &ifs, &matFileReader,
                 trianglulate, default_vcols_fallback);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
movq %r9, %rbp
movq %r8, 0x8(%rsp)
movq %rcx, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq %rsi, %r12
movq %rdi, %r13
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0xf1a1
movq %rax, 0x8(%r13)
movq 0x30(%r13), %rax
cmpq %rax, 0x38(%r13)
je 0xf1af
movq %rax, 0x38(%r13)
movq 0x48(%r13), %rax
cmpq %rax, 0x50(%r13)
je 0xf1bd
movq %rax, 0x50(%r13)
movq 0x78(%r13), %rax
cmpq %rax, 0x80(%r13)
je 0xf1d1
movq %rax, 0x80(%r13)
movq (%r12), %r15
movq 0x8(%r12), %rbx
cmpq %r15, %rbx
je 0xf1fb
movq %r15, %r14
movq %r14, %rdi
callq 0x1ae1c
addq $0xe0, %r14
cmpq %rbx, %r14
jne 0xf1e2
movq %r15, 0x8(%r12)
leaq 0x68(%rsp), %rdi
callq 0x62a0
leaq 0x1f0(%rsp), %rdi
movq %rbp, %rsi
movl $0x8, %edx
callq 0x6720
movq 0x1f0(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x210(%rsp,%rax)
je 0xf26d
leaq 0x78(%rsp), %r14
leaq 0x2d7a0(%rip), %rsi     # 0x3c9dc
movl $0x12, %edx
movq %r14, %rdi
callq 0x6470
testq %rbp, %rbp
je 0xf2e1
movq %rbp, %rdi
callq 0x61a0
movq %r14, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x6470
jmp 0xf2fd
movq 0x430(%rsp), %rax
testq %rax, %rax
leaq 0x2d56b(%rip), %r14     # 0x3c7ea
cmovneq %rax, %r14
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq %r14, %rdi
callq 0x61a0
leaq (%rax,%r14), %rdx
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x1b32e
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
testq %rdx, %rdx
je 0xf387
cmpb $0x2f, -0x1(%rsi,%rdx)
je 0xf389
leaq 0x10(%rsp), %rdi
movl $0x2f, %esi
callq 0x6360
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
jmp 0xf389
movq 0x78(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x98(%rsp,%rax), %esi
orl $0x1, %esi
callq 0x6680
leaq 0x3075e(%rip), %rsi     # 0x3fa62
movl $0x1, %edx
movq %r14, %rdi
callq 0x6470
movq 0x78(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6280
movq 0x8(%rsp), %rbx
testq %rbx, %rbx
je 0xf380
leaq 0x80(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x6620
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x64a0
movq (%r14), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xf380
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6400
xorl %ebx, %ebx
jmp 0xf426
xorl %edx, %edx
leaq 0x3f048(%rip), %rbp     # 0x4e3d8
leaq 0x38(%rsp), %rdi
movq %rbp, -0x8(%rdi)
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
addq %rsi, %rdx
callq 0x1c6de
movb 0x438(%rsp), %al
subq $0x8, %rsp
movzbl 0x448(%rsp), %r10d
movzbl %al, %eax
leaq 0x38(%rsp), %r11
leaq 0x1f8(%rsp), %r9
movq %r13, %rdi
movq %r12, %rsi
movq 0x60(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq 0x10(%rsp), %r8
pushq %r10
pushq %rax
pushq %r11
callq 0xf4e3
addq $0x20, %rsp
movl %eax, %ebx
movq %rbp, 0x30(%rsp)
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0xf40f
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6400
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0xf426
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6400
leaq 0x1f0(%rsp), %rdi
callq 0x60b0
movq 0x3fb26(%rip), %rsi     # 0x4ef60
leaq 0x68(%rsp), %rdi
callq 0x62e0
leaq 0xe8(%rsp), %rdi
callq 0x6100
movl %ebx, %eax
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf488
movq %rax, %rbx
movq %rbp, 0x30(%rsp)
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0xf48b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6400
jmp 0xf48b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0xf4b0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6400
jmp 0xf4b0
jmp 0xf4ad
jmp 0xf4ad
movq %rax, %rbx
jmp 0xf4bd
movq %rax, %rbx
leaq 0x1f0(%rsp), %rdi
callq 0x60b0
movq 0x3fa9c(%rip), %rsi     # 0x4ef60
leaq 0x68(%rsp), %rdi
callq 0x62e0
leaq 0xe8(%rsp), %rdi
callq 0x6100
movq %rbx, %rdi
callq 0x66e0