// File: /workspace/github_cpp_makefile_star2_O1/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 $0xf8, %rsp
movl %r9d, %ebp
movq %rdx, %rbx
movq %rdi, %r14
movl %ecx, 0x4(%rsp)
movq (%rsi), %rax
cmpq 0x8(%rsi), %rax
jne 0x12ddc
movq 0x18(%rsi), %rax
cmpq 0x20(%rsi), %rax
je 0x13a99
xorl %eax, %eax
movl %eax, 0xb0(%rsp)
testb %al, %al
jne 0x13a7e
movq %rsi, 0x10(%rsp)
movq %r14, %rdi
movq %r8, %rsi
callq 0x6200
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
cmpq 0x8(%rdi), %rax
je 0x13858
movq %rbx, 0xe8(%rsp)
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x1383f
leaq 0x20(%r14), %rcx
movq %rcx, 0x20(%rsp)
leaq 0x38(%r14), %rcx
movq %rcx, 0xa0(%rsp)
leaq 0x50(%r14), %rcx
movq %rcx, 0x98(%rsp)
leaq 0x68(%r14), %rcx
movq %rcx, 0x90(%rsp)
movss 0x29626(%rip), %xmm8    # 0x3c480
xorl %r15d, %r15d
movl %ebp, 0xac(%rsp)
movq %r15, %rcx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %r10
movq 0x10(%rax,%rcx), %rbx
subq %r10, %rbx
sarq $0x2, %rbx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rbx
cmpq $0x3, %rbx
jb 0x13825
leaq (%rax,%rcx), %rdx
movq %rdx, 0x18(%rsp)
leaq (%rax,%rcx), %rdx
addq $0x8, %rdx
testb %bpl, %bpl
movq %rdx, 0xc0(%rsp)
je 0x13627
movq %r15, 0xf0(%rsp)
movq 0x130(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rax), %r8
movq %rcx, 0x8(%rsp)
subq %rcx, %r8
sarq $0x2, %r8
movq %rbx, %r9
negq %r9
movl $0x2, %r13d
movl $0x1, %r11d
movq %r10, 0x78(%rsp)
movl $0x1, %ebp
movslq (%r10), %r12
leaq 0x1(%r11), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %rbx
leaq (%r12,%r12,2), %r15
addq $0x2, %r15
movl $0x7, %eax
cmpq %r8, %r15
jae 0x13020
movq %r9, %r15
addq %r11, %r15
cmovneq %r11, %r15
leaq (%r15,%r15,2), %r15
movq 0x78(%rsp), %rdi
movslq (%rdi,%r15,4), %r15
leaq (%r15,%r15,2), %rsi
addq $0x2, %rsi
cmpq %r8, %rsi
jae 0x13020
leaq (%rdx,%rdx,2), %rdx
movslq (%rdi,%rdx,4), %rdx
leaq (%rdx,%rdx,2), %rsi
addq $0x2, %rsi
cmpq %r8, %rsi
jae 0x13020
leaq (%r12,%r12,2), %rax
leaq (%r15,%r15,2), %rsi
leaq (%rdx,%rdx,2), %rdx
movq 0x8(%rsp), %rdi
movss (%rdi,%rsi,4), %xmm4
movss 0x4(%rdi,%rsi,4), %xmm3
movss 0x8(%rdi,%rsi,4), %xmm0
movss (%rdi,%rdx,4), %xmm5
subss %xmm4, %xmm5
subss (%rdi,%rax,4), %xmm4
movss 0x4(%rdi,%rdx,4), %xmm1
subss %xmm3, %xmm1
subss 0x4(%rdi,%rax,4), %xmm3
movss 0x8(%rdi,%rdx,4), %xmm6
subss %xmm0, %xmm6
subss 0x8(%rdi,%rax,4), %xmm0
movaps %xmm1, %xmm7
mulss %xmm0, %xmm7
movaps %xmm3, %xmm2
mulss %xmm6, %xmm2
subss %xmm7, %xmm2
movaps 0x294ac(%rip), %xmm7    # 0x3c470
andps %xmm7, %xmm2
mulss %xmm4, %xmm6
mulss %xmm5, %xmm0
subss %xmm6, %xmm0
andps %xmm7, %xmm0
mulss %xmm5, %xmm3
mulss %xmm4, %xmm1
subss %xmm3, %xmm1
andps %xmm7, %xmm1
ucomiss %xmm8, %xmm1
ja 0x12ff9
ucomiss %xmm8, %xmm2
ja 0x12ff9
xorl %eax, %eax
ucomiss %xmm8, %xmm0
jbe 0x13020
ucomiss %xmm1, %xmm2
movl $0x5, %eax
jbe 0x13008
ucomiss %xmm0, %xmm2
ja 0x13020
ucomiss %xmm0, %xmm1
movq %r13, %rdx
movl $0x1, %esi
cmovaq %rsi, %rdx
ucomiss %xmm2, %xmm1
cmovaq %rdx, %r13
xorl %ebp, %ebp
cmpl $0x7, %eax
je 0x13029
testl %eax, %eax
jne 0x13041
leaq (%r9,%r11), %rax
incq %rax
addq $0xc, %r10
movq %rcx, %r11
cmpq $0x1, %rax
jne 0x12ef5
movq 0x130(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq $0x1, %rbx
movl $0x0, %edx
sbbq %rbx, %rdx
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rsp)
movl $0x1, %edi
movq 0x78(%rsp), %r8
movss 0x291ae(%rip), %xmm2    # 0x3c22c
cmpq %rdi, %rbx
movl $0x0, %r11d
cmovneq %rdi, %r11
movslq (%r8), %rsi
leaq (%rsi,%rsi,2), %r9
leaq (%r9,%rbp), %r10
cmpq %rcx, %r10
jae 0x130f5
addq %r13, %r9
cmpq %rcx, %r9
jae 0x130f5
leaq (%r11,%r11,2), %rsi
movq 0x78(%rsp), %r11
movslq (%r11,%rsi,4), %rsi
leaq (%rsi,%rsi,2), %r11
leaq (%r11,%rbp), %r15
cmpq %rcx, %r15
jae 0x130f5
addq %r13, %r11
cmpq %rcx, %r11
jae 0x130f5
movss (%rax,%r10,4), %xmm0
movss (%rax,%r15,4), %xmm1
mulss (%rax,%r9,4), %xmm1
mulss (%rax,%r11,4), %xmm0
subss %xmm1, %xmm0
mulss %xmm2, %xmm0
movss 0x8(%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0x8(%rsp)
leaq (%rdx,%rdi), %rsi
incq %rsi
incq %rdi
addq $0xc, %r8
cmpq $0x1, %rsi
jne 0x1307e
movq 0x18(%rsp), %rbx
movq (%rbx), %rax
movq %rax, 0xc8(%rsp)
leaq 0xd0(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x1bebc
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x60(%rsp)
movdqa %xmm0, 0x50(%rsp)
movl $0xffffffff, 0x70(%rsp) # imm = 0xFFFFFFFF
movq 0xd0(%rsp), %rcx
movq 0xd8(%rsp), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
movq %rdx, %rax
sarq $0x2, %rax
movabsq $-0x5555555555555555, %rdi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdi, %rax
cmpq $0x4, %rax
jb 0x1359c
movq 0x10(%rbx), %r15
subq 0x8(%rbx), %r15
je 0x1359c
subq %rcx, %rsi
sarq $0x2, %rsi
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rsi
sarq $0x2, %r15
imulq %rdx, %r15
xorl %r12d, %r12d
movq %rax, %rbx
cmpq %rax, %r12
movl $0x0, %edx
cmovbq %rdx, %rax
subq %rax, %r12
decq %r15
movq 0x130(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %r8
subq %rdi, %r8
sarq $0x2, %r8
leaq 0x50(%rsp), %r9
xorl %r10d, %r10d
leaq (%r12,%r10), %rax
xorl %edx, %edx
divq %rbx
leaq (%rdx,%rdx,2), %rax
movl 0x8(%rcx,%rax,4), %edx
movl %edx, 0x8(%r9)
movq (%rcx,%rax,4), %rax
movq %rax, (%r9)
cltq
leaq (%rax,%rax,2), %rax
leaq (%rax,%rbp), %rdx
cmpq %r8, %rdx
jae 0x13229
addq %r13, %rax
cmpq %r8, %rax
jae 0x13229
movss (%rdi,%rdx,4), %xmm0
movss %xmm0, 0x84(%rsp,%r10,4)
movd (%rdi,%rax,4), %xmm0
jmp 0x13239
movl $0x0, 0x84(%rsp,%r10,4)
pxor %xmm0, %xmm0
movd %xmm0, 0xb4(%rsp,%r10,4)
incq %r10
addq $0xc, %r9
cmpq $0x3, %r10
jne 0x131e0
cmpq %rbx, %rsi
cmovneq %rbx, %r15
movss 0x88(%rsp), %xmm0
movss 0x8c(%rsp), %xmm1
subss %xmm0, %xmm1
subss 0x84(%rsp), %xmm0
movss 0xb8(%rsp), %xmm2
movss 0xbc(%rsp), %xmm3
subss %xmm2, %xmm3
subss 0xb4(%rsp), %xmm2
mulss %xmm2, %xmm1
mulss %xmm0, %xmm3
subss %xmm1, %xmm3
mulss 0x8(%rsp), %xmm3
xorps %xmm0, %xmm0
ucomiss %xmm3, %xmm0
jbe 0x132b7
incq %r12
jmp 0x13562
cmpq $0x4, %rbx
jb 0x133dd
movq 0x130(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdi
subq %rsi, %rdi
sarq $0x2, %rdi
movl $0x3, %r9d
xorl %r8d, %r8d
leaq (%r9,%r12), %rax
xorl %edx, %edx
divq %rbx
leaq (%rdx,%rdx,2), %rax
movslq (%rcx,%rax,4), %rax
leaq (%rax,%rax,2), %rdx
leaq (%rdx,%rbp), %r10
movl $0x12, %eax
cmpq %rdi, %r10
jae 0x133be
addq %r13, %rdx
cmpq %rdi, %rdx
jae 0x133be
movss (%rsi,%r10,4), %xmm0
movss (%rsi,%rdx,4), %xmm1
movl $0x2, %eax
xorl %r11d, %r11d
xorl %edx, %edx
movq %rax, %r10
movq %r11, %rax
movss 0xb4(%rsp,%r11,4), %xmm3
movss 0xb4(%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 0x1339d
movss 0x84(%rsp,%r10,4), %xmm4
movss 0x84(%rsp,%rax,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 0x1339d
xorl %r10d, %r10d
testl %edx, %edx
sete %r10b
movl %r10d, %edx
leaq 0x1(%rax), %r11
cmpq $0x3, %r11
jne 0x13328
xorl %eax, %eax
testl %edx, %edx
setne %al
movzbl %r8b, %r8d
movl $0x1, %edx
cmovnel %edx, %r8d
shll $0x4, %eax
cmpl $0x12, %eax
je 0x133c7
testl %eax, %eax
jne 0x133d3
incq %r9
cmpq %rbx, %r9
jne 0x132e0
testb $0x1, %r8b
jne 0x132af
movl 0x50(%rsp), %eax
movl %eax, 0x44(%rsp)
movq 0x54(%rsp), %rax
rolq $0x20, %rax
movq %rax, 0x48(%rsp)
movl 0x5c(%rsp), %eax
movl %eax, 0x38(%rsp)
movq 0x60(%rsp), %rax
rolq $0x20, %rax
movq %rax, 0x3c(%rsp)
movl 0x68(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq 0x6c(%rsp), %rax
rolq $0x20, %rax
movq %rax, 0x30(%rsp)
movq 0x28(%r14), %rsi
cmpq 0x30(%r14), %rsi
je 0x1343f
movl 0x4c(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x44(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x28(%r14)
jmp 0x1344e
movq 0x20(%rsp), %rdi
leaq 0x44(%rsp), %rdx
callq 0x1d0be
movq 0x28(%r14), %rsi
cmpq 0x30(%r14), %rsi
je 0x1346e
movl 0x40(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x38(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x28(%r14)
jmp 0x1347d
movq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x1d0be
movq 0x28(%r14), %rsi
cmpq 0x30(%r14), %rsi
je 0x1349d
movl 0x34(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x2c(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x28(%r14)
jmp 0x134ac
movq 0x20(%rsp), %rdi
leaq 0x2c(%rsp), %rdx
callq 0x1d0be
movb $0x3, 0x3(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0x3(%rsp), %rsi
callq 0x1bf70
movq 0x58(%r14), %rsi
cmpq 0x60(%r14), %rsi
je 0x134dd
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x58(%r14)
jmp 0x134ef
movq 0x98(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0xc31e
movq 0x70(%r14), %rsi
cmpq 0x78(%r14), %rsi
je 0x1350c
movq 0x18(%rsp), %rax
movl (%rax), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x70(%r14)
jmp 0x1351e
movq 0x90(%rsp), %rdi
movq 0x18(%rsp), %rdx
callq 0x1c08e
leaq 0x1(%r12), %rax
xorl %edx, %edx
divq %rbx
leaq 0x1(%rdx), %rax
cmpq %rbx, %rax
jae 0x13559
movq 0xd0(%rsp), %rcx
leaq (%rax,%rax,2), %rsi
leaq (%rdx,%rdx,2), %rdx
movl 0x8(%rcx,%rsi,4), %edi
movl %edi, 0x8(%rcx,%rdx,4)
movq (%rcx,%rsi,4), %rsi
movq %rsi, (%rcx,%rdx,4)
movq %rax, %rdx
incq %rax
jmp 0x1352c
addq $-0xc, 0xd8(%rsp)
movq 0xd0(%rsp), %rcx
movq 0xd8(%rsp), %rdx
subq %rcx, %rdx
movq %rdx, %rax
sarq $0x2, %rax
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rax
cmpq $0x4, %rax
jb 0x1359c
movq %rbx, %rsi
testq %r15, %r15
jne 0x131ad
cmpq $0x24, %rdx
movl 0xac(%rsp), %ebp
movq 0xf0(%rsp), %r15
jne 0x137fa
movl (%rcx), %eax
movl 0x4(%rcx), %edx
movl 0x8(%rcx), %esi
movl 0xc(%rcx), %edi
movl 0x10(%rcx), %r8d
movl 0x14(%rcx), %r9d
movl 0x18(%rcx), %r10d
movl 0x1c(%rcx), %r11d
movl 0x20(%rcx), %ecx
movl %eax, 0x44(%rsp)
movl %esi, 0x48(%rsp)
movl %edx, 0x4c(%rsp)
movl %edi, 0x38(%rsp)
movl %r9d, 0x3c(%rsp)
movl %r8d, 0x40(%rsp)
movl %r10d, 0x2c(%rsp)
movl %ecx, 0x30(%rsp)
movl %r11d, 0x34(%rsp)
movq 0x28(%r14), %rsi
cmpq 0x30(%r14), %rsi
je 0x1371d
movl 0x4c(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x44(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x28(%r14)
movq 0x18(%rsp), %rbx
jmp 0x13731
movl $0x8, %r12d
movq %rbx, %r13
movq (%rdx), %rax
movl -0x8(%rax,%r12), %ecx
movl %ecx, 0x50(%rsp)
movl (%rax,%r12), %ecx
movl %ecx, 0x54(%rsp)
movl -0x4(%rax,%r12), %eax
movl %eax, 0x58(%rsp)
movq 0x28(%r14), %rsi
cmpq 0x30(%r14), %rsi
je 0x1366d
movl 0x58(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x50(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x28(%r14)
jmp 0x13684
movq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x1d0be
movq 0xc0(%rsp), %rdx
addq $0xc, %r12
decq %r13
jne 0x13630
movb %bl, 0x50(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1bf70
movq 0x58(%r14), %rsi
cmpq 0x60(%r14), %rsi
je 0x136bd
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x58(%r14)
jmp 0x136cf
movq 0x98(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0xc31e
movq 0x10(%rsp), %rdi
movss 0x28da3(%rip), %xmm8    # 0x3c480
movq 0x18(%rsp), %rdx
movq 0x70(%r14), %rsi
cmpq 0x78(%r14), %rsi
je 0x136fd
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x70(%r14)
jmp 0x13825
movq 0x90(%rsp), %rdi
callq 0x1c08e
movss 0x28d6d(%rip), %xmm8    # 0x3c480
movq 0x10(%rsp), %rdi
jmp 0x13825
movq 0x20(%rsp), %rdi
leaq 0x44(%rsp), %rdx
callq 0x1d0be
movq 0x18(%rsp), %rbx
movq 0x28(%r14), %rsi
cmpq 0x30(%r14), %rsi
je 0x13751
movl 0x40(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x38(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x28(%r14)
jmp 0x13760
movq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x1d0be
movq 0x28(%r14), %rsi
cmpq 0x30(%r14), %rsi
je 0x13780
movl 0x34(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x2c(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x28(%r14)
jmp 0x1378f
movq 0x20(%rsp), %rdi
leaq 0x2c(%rsp), %rdx
callq 0x1d0be
movb $0x3, 0x3(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0x3(%rsp), %rsi
callq 0x1bf70
movq 0x58(%r14), %rsi
cmpq 0x60(%r14), %rsi
je 0x137c0
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x58(%r14)
jmp 0x137d2
movq 0x98(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0xc31e
movq 0x70(%r14), %rsi
cmpq 0x78(%r14), %rsi
je 0x137ea
movl (%rbx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x70(%r14)
jmp 0x137fa
movq 0x90(%rsp), %rdi
movq %rbx, %rdx
callq 0x1c08e
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x13817
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6400
movq 0x10(%rsp), %rdi
movss 0x28c5b(%rip), %xmm8    # 0x3c480
incq %r15
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rcx, %r15
jb 0x12e64
leaq 0x80(%r14), %rdi
movq 0xe8(%rsp), %rsi
callq 0x1bde6
movq 0x10(%rsp), %rdi
movq 0x18(%rdi), %rax
cmpq 0x20(%rdi), %rax
je 0x13993
movq 0x20(%rdi), %rax
cmpq 0x18(%rdi), %rax
je 0x13993
leaq 0x98(%r14), %rax
movq %rax, 0x8(%rsp)
leaq 0xb0(%r14), %rax
movq %rax, 0x78(%rsp)
xorl %ebx, %ebx
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
movq 0x18(%rdi), %rcx
leaq (%rbx,%rbx,2), %r12
movq (%rcx,%r12,8), %rax
movq 0x8(%rcx,%r12,8), %rcx
subq %rax, %rcx
je 0x13938
movl $0x8, %r13d
xorl %r15d, %r15d
movl -0x8(%rax,%r13), %ecx
movl %ecx, 0x50(%rsp)
movl (%rax,%r13), %ecx
movl %ecx, 0x54(%rsp)
movl -0x4(%rax,%r13), %eax
movl %eax, 0x58(%rsp)
movq 0xa0(%r14), %rsi
cmpq 0xa8(%r14), %rsi
je 0x138fe
movl 0x58(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x50(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0xa0(%r14)
jmp 0x13912
movq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x1d0be
movq 0x10(%rsp), %rdi
incq %r15
movq 0x18(%rdi), %rcx
movq (%rcx,%r12,8), %rax
movq 0x8(%rcx,%r12,8), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
imulq %rbp, %rcx
addq $0xc, %r13
cmpq %rcx, %r15
jb 0x138bb
jmp 0x13940
sarq $0x2, %rcx
imulq %rbp, %rcx
movl %ecx, 0x50(%rsp)
movq 0xb8(%r14), %rsi
cmpq 0xc0(%r14), %rsi
je 0x13963
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xb8(%r14)
jmp 0x13977
movq 0x78(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x1cc7e
movq 0x10(%rsp), %rdi
movq 0x20(%rdi), %rax
subq 0x18(%rdi), %rax
incq %rbx
sarq $0x3, %rax
imulq %rbp, %rax
cmpq %rax, %rbx
jb 0x13898
movq 0x30(%rdi), %rax
cmpq 0x38(%rdi), %rax
je 0x13a7e
movq 0x38(%rdi), %rax
cmpq 0x30(%rdi), %rax
je 0x13a7e
leaq 0xc8(%r14), %rax
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
movq 0x30(%rdi), %rcx
leaq (%rbx,%rbx,2), %rbp
movq (%rcx,%rbp,8), %rax
cmpq %rax, 0x8(%rcx,%rbp,8)
je 0x13a62
movl $0x8, %r12d
xorl %r15d, %r15d
movl -0x8(%rax,%r12), %ecx
movl %ecx, 0x50(%rsp)
movl (%rax,%r12), %ecx
movl %ecx, 0x54(%rsp)
movl -0x4(%rax,%r12), %eax
movl %eax, 0x58(%rsp)
movq 0xd0(%r14), %rsi
cmpq 0xd8(%r14), %rsi
je 0x13a2a
movl 0x58(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x50(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0xd0(%r14)
jmp 0x13a3e
movq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x1d0be
movq 0x10(%rsp), %rdi
incq %r15
movq 0x30(%rdi), %rcx
movq (%rcx,%rbp,8), %rax
movq 0x8(%rcx,%rbp,8), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
imulq %r13, %rcx
addq $0xc, %r12
cmpq %rcx, %r15
jb 0x139e7
movq 0x38(%rdi), %rax
subq 0x30(%rdi), %rax
incq %rbx
sarq $0x3, %rax
imulq %r13, %rax
cmpq %rax, %rbx
jb 0x139c7
movl 0xb0(%rsp), %eax
xorb $0x1, %al
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%rsi), %rax
cmpq 0x38(%rsi), %rax
sete %al
jmp 0x12dde
jmp 0x13aaf
jmp 0x13aaf
jmp 0x13aaf
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x13acf
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6400
movq %rbx, %rdi
callq 0x66e0