// File: /workspace/github_cpp_makefile_star2_O2/alan0201tw[P]RayTracer/include/tiny_obj_loader.h
// Function: tinyobj::exportGroupsToShape(tinyobj::shape_t*, tinyobj::PrimGroup const&, std::vector<tinyobj::tag_t, std::allocator<tinyobj::tag_t>> const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, std::vector<float, std::allocator<float>> const&)
static bool exportGroupsToShape(shape_t *shape, const PrimGroup &prim_group,
                                const std::vector<tag_t> &tags,
                                const int material_id, const std::string &name,
                                bool triangulate,
                                const std::vector<real_t> &v) {
  if (prim_group.IsEmpty()) {
    return false;
  }

  shape->name = name;

  // polygon
  if (!prim_group.faceGroup.empty()) {
    // Flatten vertices and indices
    for (size_t i = 0; i < prim_group.faceGroup.size(); i++) {
      const face_t &face = prim_group.faceGroup[i];

      size_t npolys = face.vertex_indices.size();

      if (npolys < 3) {
        // Face must have 3+ vertices.
        continue;
      }

      vertex_index_t i0 = face.vertex_indices[0];
      vertex_index_t i1(-1);
      vertex_index_t i2 = face.vertex_indices[1];

      if (triangulate) {
        // find the two axes to work in
        size_t axes[2] = {1, 2};
        for (size_t k = 0; k < npolys; ++k) {
          i0 = face.vertex_indices[(k + 0) % npolys];
          i1 = face.vertex_indices[(k + 1) % npolys];
          i2 = face.vertex_indices[(k + 2) % npolys];
          size_t vi0 = size_t(i0.v_idx);
          size_t vi1 = size_t(i1.v_idx);
          size_t vi2 = size_t(i2.v_idx);

          if (((3 * vi0 + 2) >= v.size()) || ((3 * vi1 + 2) >= v.size()) ||
              ((3 * vi2 + 2) >= v.size())) {
            // Invalid triangle.
            // FIXME(syoyo): Is it ok to simply skip this invalid triangle?
            continue;
          }
          real_t v0x = v[vi0 * 3 + 0];
          real_t v0y = v[vi0 * 3 + 1];
          real_t v0z = v[vi0 * 3 + 2];
          real_t v1x = v[vi1 * 3 + 0];
          real_t v1y = v[vi1 * 3 + 1];
          real_t v1z = v[vi1 * 3 + 2];
          real_t v2x = v[vi2 * 3 + 0];
          real_t v2y = v[vi2 * 3 + 1];
          real_t v2z = v[vi2 * 3 + 2];
          real_t e0x = v1x - v0x;
          real_t e0y = v1y - v0y;
          real_t e0z = v1z - v0z;
          real_t e1x = v2x - v1x;
          real_t e1y = v2y - v1y;
          real_t e1z = v2z - v1z;
          real_t cx = std::fabs(e0y * e1z - e0z * e1y);
          real_t cy = std::fabs(e0z * e1x - e0x * e1z);
          real_t cz = std::fabs(e0x * e1y - e0y * e1x);
          const real_t epsilon = std::numeric_limits<real_t>::epsilon();
          if (cx > epsilon || cy > epsilon || cz > epsilon) {
            // found a corner
            if (cx > cy && cx > cz) {
            } else {
              axes[0] = 0;
              if (cz > cx && cz > cy) axes[1] = 1;
            }
            break;
          }
        }

        real_t area = 0;
        for (size_t k = 0; k < npolys; ++k) {
          i0 = face.vertex_indices[(k + 0) % npolys];
          i1 = face.vertex_indices[(k + 1) % npolys];
          size_t vi0 = size_t(i0.v_idx);
          size_t vi1 = size_t(i1.v_idx);
          if (((vi0 * 3 + axes[0]) >= v.size()) ||
              ((vi0 * 3 + axes[1]) >= v.size()) ||
              ((vi1 * 3 + axes[0]) >= v.size()) ||
              ((vi1 * 3 + axes[1]) >= v.size())) {
            // Invalid index.
            continue;
          }
          real_t v0x = v[vi0 * 3 + axes[0]];
          real_t v0y = v[vi0 * 3 + axes[1]];
          real_t v1x = v[vi1 * 3 + axes[0]];
          real_t v1y = v[vi1 * 3 + axes[1]];
          area += (v0x * v1y - v0y * v1x) * static_cast<real_t>(0.5);
        }

        face_t remainingFace = face;  // copy
        size_t guess_vert = 0;
        vertex_index_t ind[3];
        real_t vx[3];
        real_t vy[3];

        // How many iterations can we do without decreasing the remaining
        // vertices.
        size_t remainingIterations = face.vertex_indices.size();
        size_t previousRemainingVertices = remainingFace.vertex_indices.size();

        while (remainingFace.vertex_indices.size() > 3 &&
               remainingIterations > 0) {
          npolys = remainingFace.vertex_indices.size();
          if (guess_vert >= npolys) {
            guess_vert -= npolys;
          }

          if (previousRemainingVertices != npolys) {
            // The number of remaining vertices decreased. Reset counters.
            previousRemainingVertices = npolys;
            remainingIterations = npolys;
          } else {
            // We didn't consume a vertex on previous iteration, reduce the
            // available iterations.
            remainingIterations--;
          }

          for (size_t k = 0; k < 3; k++) {
            ind[k] = remainingFace.vertex_indices[(guess_vert + k) % npolys];
            size_t vi = size_t(ind[k].v_idx);
            if (((vi * 3 + axes[0]) >= v.size()) ||
                ((vi * 3 + axes[1]) >= v.size())) {
              // ???
              vx[k] = static_cast<real_t>(0.0);
              vy[k] = static_cast<real_t>(0.0);
            } else {
              vx[k] = v[vi * 3 + axes[0]];
              vy[k] = v[vi * 3 + axes[1]];
            }
          }
          real_t e0x = vx[1] - vx[0];
          real_t e0y = vy[1] - vy[0];
          real_t e1x = vx[2] - vx[1];
          real_t e1y = vy[2] - vy[1];
          real_t cross = e0x * e1y - e0y * e1x;
          // if an internal angle
          if (cross * area < static_cast<real_t>(0.0)) {
            guess_vert += 1;
            continue;
          }

          // check all other verts in case they are inside this triangle
          bool overlap = false;
          for (size_t otherVert = 3; otherVert < npolys; ++otherVert) {
            size_t idx = (guess_vert + otherVert) % npolys;

            if (idx >= remainingFace.vertex_indices.size()) {
              // ???
              continue;
            }

            size_t ovi = size_t(remainingFace.vertex_indices[idx].v_idx);

            if (((ovi * 3 + axes[0]) >= v.size()) ||
                ((ovi * 3 + axes[1]) >= v.size())) {
              // ???
              continue;
            }
            real_t tx = v[ovi * 3 + axes[0]];
            real_t ty = v[ovi * 3 + axes[1]];
            if (pnpoly(3, vx, vy, tx, ty)) {
              overlap = true;
              break;
            }
          }

          if (overlap) {
            guess_vert += 1;
            continue;
          }

          // this triangle is an ear
          {
            index_t idx0, idx1, idx2;
            idx0.vertex_index = ind[0].v_idx;
            idx0.normal_index = ind[0].vn_idx;
            idx0.texcoord_index = ind[0].vt_idx;
            idx1.vertex_index = ind[1].v_idx;
            idx1.normal_index = ind[1].vn_idx;
            idx1.texcoord_index = ind[1].vt_idx;
            idx2.vertex_index = ind[2].v_idx;
            idx2.normal_index = ind[2].vn_idx;
            idx2.texcoord_index = ind[2].vt_idx;

            shape->mesh.indices.push_back(idx0);
            shape->mesh.indices.push_back(idx1);
            shape->mesh.indices.push_back(idx2);

            shape->mesh.num_face_vertices.push_back(3);
            shape->mesh.material_ids.push_back(material_id);
            shape->mesh.smoothing_group_ids.push_back(face.smoothing_group_id);
          }

          // remove v1 from the list
          size_t removed_vert_index = (guess_vert + 1) % npolys;
          while (removed_vert_index + 1 < npolys) {
            remainingFace.vertex_indices[removed_vert_index] =
                remainingFace.vertex_indices[removed_vert_index + 1];
            removed_vert_index += 1;
          }
          remainingFace.vertex_indices.pop_back();
        }

        if (remainingFace.vertex_indices.size() == 3) {
          i0 = remainingFace.vertex_indices[0];
          i1 = remainingFace.vertex_indices[1];
          i2 = remainingFace.vertex_indices[2];
          {
            index_t idx0, idx1, idx2;
            idx0.vertex_index = i0.v_idx;
            idx0.normal_index = i0.vn_idx;
            idx0.texcoord_index = i0.vt_idx;
            idx1.vertex_index = i1.v_idx;
            idx1.normal_index = i1.vn_idx;
            idx1.texcoord_index = i1.vt_idx;
            idx2.vertex_index = i2.v_idx;
            idx2.normal_index = i2.vn_idx;
            idx2.texcoord_index = i2.vt_idx;

            shape->mesh.indices.push_back(idx0);
            shape->mesh.indices.push_back(idx1);
            shape->mesh.indices.push_back(idx2);

            shape->mesh.num_face_vertices.push_back(3);
            shape->mesh.material_ids.push_back(material_id);
            shape->mesh.smoothing_group_ids.push_back(face.smoothing_group_id);
          }
        }
      } else {
        for (size_t k = 0; k < npolys; k++) {
          index_t idx;
          idx.vertex_index = face.vertex_indices[k].v_idx;
          idx.normal_index = face.vertex_indices[k].vn_idx;
          idx.texcoord_index = face.vertex_indices[k].vt_idx;
          shape->mesh.indices.push_back(idx);
        }

        shape->mesh.num_face_vertices.push_back(
            static_cast<unsigned char>(npolys));
        shape->mesh.material_ids.push_back(material_id);  // per face
        shape->mesh.smoothing_group_ids.push_back(
            face.smoothing_group_id);  // per face
      }
    }

    shape->mesh.tags = tags;
  }

  // line
  if (!prim_group.lineGroup.empty()) {
    // Flatten indices
    for (size_t i = 0; i < prim_group.lineGroup.size(); i++) {
      for (size_t j = 0; j < prim_group.lineGroup[i].vertex_indices.size();
           j++) {
        const vertex_index_t &vi = prim_group.lineGroup[i].vertex_indices[j];

        index_t idx;
        idx.vertex_index = vi.v_idx;
        idx.normal_index = vi.vn_idx;
        idx.texcoord_index = vi.vt_idx;

        shape->lines.indices.push_back(idx);
      }

      shape->lines.num_line_vertices.push_back(
          int(prim_group.lineGroup[i].vertex_indices.size()));
    }
  }

  // points
  if (!prim_group.pointsGroup.empty()) {
    // Flatten & convert indices
    for (size_t i = 0; i < prim_group.pointsGroup.size(); i++) {
      for (size_t j = 0; j < prim_group.pointsGroup[i].vertex_indices.size();
           j++) {
        const vertex_index_t &vi = prim_group.pointsGroup[i].vertex_indices[j];

        index_t idx;
        idx.vertex_index = vi.v_idx;
        idx.normal_index = vi.vn_idx;
        idx.texcoord_index = vi.vt_idx;

        shape->points.indices.push_back(idx);
      }
    }
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %r9d, %ebp
movq %r8, %r15
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movq %rsi, %rdi
callq 0x17340
movb %al, 0x7(%rsp)
testb %al, %al
jne 0x10dbf
movq %r14, 0xc8(%rsp)
movq 0x18(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x6220
movq (%rbx), %r13
movq 0x8(%rbx), %rax
cmpq %rax, %r13
je 0x10c6f
leaq 0x20(%r14), %rcx
movq %rcx, 0x8(%rsp)
leaq 0x38(%r14), %rcx
movq %rcx, 0x70(%rsp)
leaq 0x50(%r14), %rcx
movq %rcx, 0x68(%rsp)
leaq 0x68(%r14), %rcx
movq %rcx, 0x60(%rsp)
movss 0x1ffa8(%rip), %xmm6    # 0x30490
xorl %r8d, %r8d
movl %ebp, 0x28(%rsp)
subq %r13, %rax
sarq $0x5, %rax
cmpq %rax, %r8
jae 0x10c5b
movq %r8, %rcx
shlq $0x5, %rcx
movq 0x8(%r13,%rcx), %rsi
movq 0x10(%r13,%rcx), %rax
subq %rsi, %rax
cqto
pushq $0xc
popq %rdi
idivq %rdi
cmpq $0x3, %rax
jb 0x10c12
movq %rax, %r12
addq %rcx, %r13
testb %bpl, %bpl
je 0x1067e
movq %r8, 0xd0(%rsp)
movq 0x110(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %r8
subq %rdi, %r8
sarq $0x2, %r8
movq %r12, %r9
negq %r9
movq %rsi, %r10
pushq $0x1
popq %rcx
movq %r13, 0x20(%rsp)
leaq (%r9,%rcx), %r15
cmpq $0x1, %r15
je 0x1070a
movq %rcx, %r14
movslq (%r10), %r11
incq %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r12
leaq (%r11,%r11,2), %rax
addq $0x2, %rax
cmpq %r8, %rax
jae 0x10675
testq %r15, %r15
cmoveq %r15, %r14
imulq $0xc, %r14, %rax
movslq (%rsi,%rax), %rax
leaq (%rax,%rax,2), %r14
addq $0x2, %r14
cmpq %r8, %r14
jae 0x10675
imulq $0xc, %rdx, %rdx
movslq (%rsi,%rdx), %rdx
leaq (%rdx,%rdx,2), %r14
addq $0x2, %r14
cmpq %r8, %r14
jae 0x10675
leaq (%r11,%r11,2), %r11
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rdx,2), %rdx
movss (%rdi,%rax,4), %xmm4
movss 0x4(%rdi,%rdx,4), %xmm0
movaps %xmm4, %xmm1
subss (%rdi,%r11,4), %xmm1
movsd 0x4(%rdi,%r11,4), %xmm3
movsd 0x4(%rdi,%rax,4), %xmm2
subss %xmm2, %xmm0
shufps $0xd4, %xmm2, %xmm4     # xmm4 = xmm4[0,1],xmm2[1,3]
shufps $0x52, %xmm2, %xmm4     # xmm4 = xmm4[2,0],xmm2[1,1]
subps %xmm3, %xmm2
movss (%rdi,%rdx,4), %xmm5
movss 0x8(%rdi,%rdx,4), %xmm3
unpcklps %xmm5, %xmm3            # xmm3 = xmm3[0],xmm5[0],xmm3[1],xmm5[1]
subps %xmm4, %xmm3
movaps %xmm3, %xmm4
shufps $0x0, %xmm3, %xmm4      # xmm4 = xmm4[0,0],xmm3[0,0]
movss %xmm0, %xmm4            # xmm4 = xmm0[0],xmm4[1,2,3]
mulss %xmm1, %xmm0
shufps $0xd4, %xmm2, %xmm1     # xmm1 = xmm1[0,1],xmm2[1,3]
shufps $0x52, %xmm2, %xmm1     # xmm1 = xmm1[2,0],xmm2[1,1]
mulps %xmm1, %xmm4
movaps %xmm2, %xmm1
mulps %xmm3, %xmm1
subps %xmm4, %xmm1
movaps 0x1fe3d(%rip), %xmm5    # 0x30480
andps %xmm5, %xmm1
pshufd $0x55, %xmm1, %xmm4     # xmm4 = xmm1[1,1,1,1]
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
mulss %xmm2, %xmm3
subss %xmm3, %xmm0
andps %xmm5, %xmm0
ucomiss %xmm6, %xmm0
ja 0x10c21
ucomiss %xmm6, %xmm1
ja 0x10c21
ucomiss %xmm6, %xmm4
ja 0x10c21
addq $0xc, %r10
jmp 0x10563
movq %r8, %rbp
pushq $0x4
popq %r14
movq %r12, %r15
subq $0x1, %r15
jb 0x106c1
movq 0x8(%r13), %rax
movl -0x4(%rax,%r14), %ecx
movl %ecx, 0x30(%rsp)
movq (%rax,%r14), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x34(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x16a44
addq $0xc, %r14
jmp 0x10688
movb %r12b, 0x30(%rsp)
movq 0x70(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x17542
movq 0x68(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0xc100
movq 0x60(%rsp), %rdi
movq %r13, %rsi
callq 0x17376
movq 0x18(%rsp), %r14
movss 0x1fd92(%rip), %xmm6    # 0x30490
movq %rbp, %r8
movl 0x28(%rsp), %ebp
jmp 0x10c12
pushq $0x1
popq %r15
pushq $0x2
popq %r13
xorps %xmm2, %xmm2
xorl %eax, %eax
imulq $0xc, %rax, %rcx
incq %rax
addq %rsi, %rcx
leaq (%r9,%rax), %rdx
cmpq $0x1, %rdx
je 0x107a5
movq %r9, %rdx
addq %rax, %rdx
movl $0x0, %r11d
cmovneq %rax, %r11
movslq (%rcx), %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rdx,%r15), %r10
cmpq %r8, %r10
jae 0x10770
addq %r13, %rdx
cmpq %r8, %rdx
jae 0x10770
imulq $0xc, %r11, %r11
movslq (%rsi,%r11), %r11
leaq (%r11,%r11,2), %r11
leaq (%r11,%r15), %r14
cmpq %r8, %r14
jae 0x10770
addq %r13, %r11
cmpq %r8, %r11
jb 0x10779
incq %rax
addq $0xc, %rcx
jmp 0x10721
movss (%rdi,%r10,4), %xmm0
movss (%rdi,%r14,4), %xmm1
mulss (%rdi,%rdx,4), %xmm1
mulss (%rdi,%r11,4), %xmm0
subss %xmm1, %xmm0
mulss 0x1faa8(%rip), %xmm0    # 0x30244
addss %xmm0, %xmm2
jmp 0x10717
leaq 0xa8(%rsp), %rdi
movq 0x20(%rsp), %r14
movq %r14, %rsi
movss %xmm2, 0x2c(%rsp)
callq 0x17362
movss 0x2c(%rsp), %xmm8
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x40(%rsp)
movdqa %xmm0, 0x30(%rsp)
orl $-0x1, 0x50(%rsp)
movq 0x10(%r14), %rax
subq 0x8(%r14), %rax
cqto
pushq $0xc
popq %rdi
idivq %rdi
movq %rax, %r12
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rcx
movq %rcx, %rax
subq %rsi, %rax
cqto
idivq %rdi
movq %rax, %rbp
xorl %r14d, %r14d
xorps %xmm7, %xmm7
movq %rbp, %r9
subq %rsi, %rcx
movq %rcx, %rax
cqto
pushq $0xc
popq %rdi
idivq %rdi
movq 0x110(%rsp), %rdx
movq (%rdx), %rdi
movq 0x8(%rdx), %r8
subq %rdi, %r8
sarq $0x2, %r8
movq %rax, %rbp
cmpq $0x4, %rbp
jb 0x10b2a
testq %r12, %r12
je 0x10b2a
cmpq %rbp, %r14
movq %rbp, %rax
movl $0x0, %edx
cmovbq %rdx, %rax
subq %rax, %r14
decq %r12
leaq 0x30(%rsp), %r10
xorl %r11d, %r11d
cmpq $0x3, %r11
je 0x108d6
leaq (%r14,%r11), %rax
xorl %edx, %edx
divq %rbp
imulq $0xc, %rdx, %rax
movl 0x8(%rsi,%rax), %edx
movl %edx, 0x8(%r10)
movq (%rsi,%rax), %rax
movq %rax, (%r10)
cltq
leaq (%rax,%rax,2), %rax
leaq (%rax,%r15), %rdx
cmpq %r8, %rdx
jae 0x108b9
addq %r13, %rax
cmpq %r8, %rax
jae 0x108b9
movss (%rdi,%rdx,4), %xmm0
movss %xmm0, 0x54(%rsp,%r11,4)
movd (%rdi,%rax,4), %xmm0
jmp 0x108c3
andl $0x0, 0x54(%rsp,%r11,4)
pxor %xmm0, %xmm0
movd %xmm0, 0x9c(%rsp,%r11,4)
incq %r11
addq $0xc, %r10
jmp 0x1086d
cmpq %rbp, %r9
cmovneq %rbp, %r12
movss 0x58(%rsp), %xmm0
movss 0x5c(%rsp), %xmm1
subss %xmm0, %xmm1
subss 0x54(%rsp), %xmm0
movss 0xa0(%rsp), %xmm2
movss 0xa4(%rsp), %xmm3
subss %xmm2, %xmm3
subss 0x9c(%rsp), %xmm2
mulss %xmm2, %xmm1
mulss %xmm0, %xmm3
subss %xmm1, %xmm3
mulss %xmm8, %xmm3
ucomiss %xmm3, %xmm7
jbe 0x10933
incq %r14
movq %rbp, %r9
jmp 0x1083d
pushq $0x3
popq %r9
cmpq %rbp, %r9
je 0x10a0c
leaq (%r9,%r14), %rax
xorl %edx, %edx
divq %rbp
imulq $0xc, %rdx, %rax
movslq (%rsi,%rax), %rax
leaq (%rax,%rax,2), %rax
leaq (%rax,%r15), %rdx
cmpq %r8, %rdx
jae 0x10a04
addq %r13, %rax
cmpq %r8, %rax
jae 0x10a04
movss (%rdi,%rdx,4), %xmm0
movss (%rdi,%rax,4), %xmm1
xorl %r11d, %r11d
pushq $0x2
popq %r10
xorl %eax, %eax
cmpq $0x3, %r11
je 0x109fc
movq %r11, %rdx
movss 0x9c(%rsp,%r11,4), %xmm3
movss 0x9c(%rsp,%r10,4), %xmm2
movaps %xmm1, %xmm4
cmpnltps %xmm2, %xmm4
movaps %xmm1, %xmm5
cmpltps %xmm3, %xmm5
xorps %xmm4, %xmm5
movd %xmm5, %r11d
testb $0x1, %r11b
jne 0x109f3
movss 0x54(%rsp,%r10,4), %xmm4
movss 0x54(%rsp,%rdx,4), %xmm5
subss %xmm5, %xmm4
movaps %xmm1, %xmm6
subss %xmm3, %xmm6
mulss %xmm4, %xmm6
subss %xmm3, %xmm2
divss %xmm2, %xmm6
addss %xmm5, %xmm6
ucomiss %xmm0, %xmm6
jbe 0x109f3
xorl %r10d, %r10d
testl %eax, %eax
sete %r10b
movl %r10d, %eax
leaq 0x1(%rdx), %r11
movq %rdx, %r10
jmp 0x10981
testl %eax, %eax
jne 0x10928
incq %r9
jmp 0x10937
movl 0x30(%rsp), %eax
movl 0x3c(%rsp), %ecx
movl %eax, 0x90(%rsp)
movq 0x34(%rsp), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x94(%rsp)
movl %ecx, 0x84(%rsp)
movq 0x40(%rsp), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x88(%rsp)
movl 0x48(%rsp), %eax
movl %eax, 0x78(%rsp)
movq 0x4c(%rsp), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x7c(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x16a44
movq 0x8(%rsp), %rdi
leaq 0x84(%rsp), %rsi
callq 0x16a44
movq 0x8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x16a44
movb $0x3, 0x6(%rsp)
movq 0x70(%rsp), %rdi
leaq 0x6(%rsp), %rsi
callq 0x17542
movq 0x68(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0xc100
movq 0x60(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x17376
leaq 0x1(%r14), %rax
xorl %edx, %edx
divq %rbp
xorps %xmm7, %xmm7
movss 0x2c(%rsp), %xmm8
leaq 0x1(%rdx), %rax
cmpq %rbp, %rax
jae 0x10b09
movq 0xb0(%rsp), %rcx
imulq $0xc, %rax, %rsi
imulq $0xc, %rdx, %rdx
movl 0x8(%rcx,%rsi), %edi
movl %edi, 0x8(%rcx,%rdx)
movq (%rcx,%rsi), %rsi
movq %rsi, (%rcx,%rdx)
movq %rax, %rdx
jmp 0x10adb
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rcx
addq $-0xc, %rcx
movq %rcx, 0xb8(%rsp)
jmp 0x10813
cmpq $0x24, %rcx
movq 0x18(%rsp), %r14
movl 0x28(%rsp), %ebp
jne 0x10bf5
movl (%rsi), %eax
movl 0xc(%rsi), %ecx
movl 0x18(%rsi), %edx
movq 0x4(%rsi), %xmm0
movl %eax, 0x90(%rsp)
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x94(%rsp)
movl %ecx, 0x84(%rsp)
movq 0x10(%rsi), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x88(%rsp)
movl %edx, 0x78(%rsp)
movq 0x1c(%rsi), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x7c(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x16a44
movq 0x20(%rsp), %r15
movq 0x8(%rsp), %rdi
leaq 0x84(%rsp), %rsi
callq 0x16a44
movq 0x8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x16a44
movb $0x3, 0x6(%rsp)
movq 0x70(%rsp), %rdi
leaq 0x6(%rsp), %rsi
callq 0x17542
movq 0x68(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0xc100
movq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0x17376
leaq 0xb0(%rsp), %rdi
callq 0x17304
movss 0x1f886(%rip), %xmm6    # 0x30490
movq 0xd0(%rsp), %r8
incq %r8
movq (%rbx), %r13
movq 0x8(%rbx), %rax
jmp 0x104ef
ucomiss %xmm0, %xmm1
jbe 0x10c37
ucomiss %xmm4, %xmm1
pushq $0x1
popq %r15
pushq $0x2
popq %r13
ja 0x10712
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
cmpltps %xmm0, %xmm1
unpcklps %xmm1, %xmm1            # xmm1 = xmm1[0,0,1,1]
movmskpd %xmm1, %eax
xorl %r13d, %r13d
cmpl $0x3, %eax
setne %r13b
incq %r13
xorl %r15d, %r15d
jmp 0x10712
leaq 0x80(%r14), %rdi
movq 0xc8(%rsp), %rsi
callq 0x17394
movq 0x18(%rbx), %rcx
movq 0x20(%rbx), %rax
cmpq %rax, %rcx
je 0x10d33
movq 0x18(%rsp), %rdx
leaq 0x98(%rdx), %r15
addq $0xb0, %rdx
movq %rdx, 0x20(%rsp)
xorl %edi, %edi
leaq 0x30(%rsp), %r13
subq %rcx, %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
cmpq %rax, %rdi
jae 0x10d33
movq %rdi, 0x8(%rsp)
imulq $0x18, %rdi, %r14
pushq $0x4
popq %r12
xorl %ebp, %ebp
movq (%rcx,%r14), %rsi
movq 0x8(%rcx,%r14), %rax
subq %rsi, %rax
cqto
pushq $0xc
popq %rcx
idivq %rcx
cmpq %rax, %rbp
jae 0x10d0d
movl -0x4(%rsi,%r12), %eax
movl %eax, 0x30(%rsp)
movq (%rsi,%r12), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x34(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x16a44
incq %rbp
movq 0x18(%rbx), %rcx
addq $0xc, %r12
jmp 0x10cc2
movl %eax, 0x30(%rsp)
movq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x1825c
movq 0x8(%rsp), %rdi
incq %rdi
movq 0x18(%rbx), %rcx
movq 0x20(%rbx), %rax
jmp 0x10c9f
movq 0x30(%rbx), %rcx
movq 0x38(%rbx), %rax
cmpq %rax, %rcx
je 0x10dbf
addq $0xc8, 0x18(%rsp)
xorl %r12d, %r12d
leaq 0x30(%rsp), %r15
subq %rcx, %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
cmpq %rax, %r12
jae 0x10dbf
imulq $0x18, %r12, %r14
pushq $0x4
popq %rbp
xorl %r13d, %r13d
movq (%rcx,%r14), %rsi
movq 0x8(%rcx,%r14), %rax
subq %rsi, %rax
cqto
pushq $0xc
popq %rdi
idivq %rdi
cmpq %rax, %r13
jae 0x10db6
movl -0x4(%rsi,%rbp), %eax
movl %eax, 0x30(%rsp)
movq (%rsi,%rbp), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x34(%rsp)
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x16a44
incq %r13
movq 0x30(%rbx), %rcx
addq $0xc, %rbp
jmp 0x10d6b
incq %r12
movq 0x38(%rbx), %rax
jmp 0x10d51
movb 0x7(%rsp), %al
xorb $0x1, %al
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10ddd
jmp 0x10ddd
jmp 0x10ddd
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x17304
movq %rbx, %rdi
callq 0x6710