// File: /workspace/github_cpp_makefile_star2_O1/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 0xf503
movq %rax, 0x8(%r13)
movq 0x30(%r13), %rax
cmpq %rax, 0x38(%r13)
je 0xf511
movq %rax, 0x38(%r13)
movq 0x48(%r13), %rax
cmpq %rax, 0x50(%r13)
je 0xf51f
movq %rax, 0x50(%r13)
movq 0x78(%r13), %rax
cmpq %rax, 0x80(%r13)
je 0xf533
movq %rax, 0x80(%r13)
movq (%r12), %r15
movq 0x8(%r12), %rbx
cmpq %r15, %rbx
je 0xf55d
movq %r15, %r14
movq %r14, %rdi
callq 0x1b78a
addq $0xe0, %r14
cmpq %rbx, %r14
jne 0xf544
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 0xf5cf
leaq 0x78(%rsp), %r14
leaq 0x2d2b3(%rip), %rsi     # 0x3c851
movl $0x12, %edx
movq %r14, %rdi
callq 0x6470
testq %rbp, %rbp
je 0xf6dc
movq %rbp, %rdi
callq 0x61a0
movq %r14, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x6470
jmp 0xf6f8
movq 0x430(%rsp), %rax
testq %rax, %rax
leaq 0x2d069(%rip), %r14     # 0x3c64a
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 0x1bc8a
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0xf62c
movq 0x10(%rsp), %rcx
cmpb $0x2f, -0x1(%rcx,%rax)
je 0xf62c
leaq 0x10(%rsp), %rdi
movl $0x2f, %esi
callq 0x6360
leaq 0x3edbd(%rip), %rbp     # 0x4e3f0
leaq 0x38(%rsp), %rdi
movq %rbp, -0x8(%rdi)
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
callq 0x1cfe4
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 0xf83a
addq $0x20, %rsp
movl %eax, %ebx
movq %rbp, 0x30(%rsp)
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0xf6bc
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6400
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0xf77d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6400
jmp 0xf77d
movq 0x78(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x98(%rsp,%rax), %esi
orl $0x1, %esi
callq 0x6680
leaq 0x300fb(%rip), %rsi     # 0x3f7fa
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 0xf77b
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 0xf77b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6400
xorl %ebx, %ebx
leaq 0x1f0(%rsp), %rdi
callq 0x60b0
movq 0x3f7cf(%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 0xf7df
movq %rax, %rbx
movq %rbp, 0x30(%rsp)
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0xf7e2
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6400
jmp 0xf7e2
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0xf807
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6400
jmp 0xf807
jmp 0xf804
jmp 0xf804
movq %rax, %rbx
jmp 0xf814
movq %rax, %rbx
leaq 0x1f0(%rsp), %rdi
callq 0x60b0
movq 0x3f745(%rip), %rsi     # 0x4ef60
leaq 0x68(%rsp), %rdi
callq 0x62e0
leaq 0xe8(%rsp), %rdi
callq 0x6100
movq %rbx, %rdi
callq 0x66e0