// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/apps/msh2msh/msh2msh.cpp
// Function: main
int main(int argc, char **argv)
{
  // Check number of arguments
  if (!ParseArgs(argc, argv)) exit(1);

  // Read mesh
  R3Mesh *mesh = ReadMesh(input_mesh_name);
  if (!mesh) exit(-1);

  // Merge meshes from list
  if (merge_list_name) {
    if (!MergeList(mesh, merge_list_name)) exit(-1);
  }

  // Rotate so that principal axes are aligned with canonical coordinate frame
  if (rotate_by_pca) {
    R3Point centroid = mesh->Centroid();
    R3Triad triad = mesh->PrincipleAxes(&centroid);
    R3Affine rotation = R3identity_affine;
    rotation.Translate(centroid.Vector());
    rotation.Transform(R3Affine(triad.InverseMatrix()));
    rotation.Translate(-centroid.Vector());
    xform.Transform(rotation);
  }

  // Scale based on mesh area
  if (scale_by_area) {
    RNArea area = mesh->Area();
    if (area > 0) xform.Scale(1 / sqrt(area));
  }

  // Scale based on principal component analysis
  if (scale_by_pca) {
    RNScalar variances[3];
    R3Point centroid = mesh->Centroid();
    mesh->PrincipleAxes(&centroid, variances);
    if (variances[0] > 0) xform.Scale(1.0 / sqrt(variances[0]));
  }

  // Center mesh at origin
  if (translate_by_centroid) {
    // R3Point centroid = R3zero_point;
    // for (int i = 0; i < mesh->NVertices(); i++) {
    //   R3MeshVertex *vertex = mesh->Vertex(i);
    //   centroid += mesh->VertexPosition(vertex);
    // }
    // if (mesh->NVertices() > 0) centroid /= mesh->NVertices();
    R3Point centroid = mesh->Centroid();
    xform.Translate(-centroid.Vector());
  }

  // Normalize translation, rotation, and scale
  if (align_by_pca) {
    xform = mesh->PCANormalizationTransformation();
  }

  // Transform 
  if (!xform.IsIdentity()) {
    mesh->Transform(xform);
  }

  // Delete interior faces
  if (delete_interior_faces) {
    DeleteInteriorFaces(mesh);
  }

  // Remove small components
  if (min_component_area > 0) {
    DeleteSmallConnectedComponents(mesh, min_component_area);
  }

  // Clean 
  if (clean) {
    mesh->DeleteUnusedEdges();
    mesh->DeleteUnusedVertices();
  }

  // Flip every face
  if (flip_faces) {
    for (int i = 0; i < mesh->NFaces(); i++) {
      mesh->FlipFace(mesh->Face(i));
    }
  }

  // Fill holes
  if (fill_holes) {
    mesh->FillHoles();
  }

  // Smooth
  if (smooth_factor > 0) {
    mesh->Smooth(smooth_factor);
  }

  // Subdivide edges that are too long
  if (max_edge_length > 0) {
    mesh->SubdivideLongEdges(max_edge_length);
  }

  // Split edges that are too long
  if (min_edge_length > 0) {
    mesh->CollapseShortEdges(min_edge_length);
  }

  // Swap edges
  if (swap_edges) {
    mesh->SwapEdges();
  }

  // Transfer colors
  if (source_mesh_name) {
    CopyFromSource(mesh, source_mesh_name);
  }
  
  // Write mesh
  if (!WriteMesh(mesh, output_mesh_name)) exit(-1);

  // Write transformation
  if (!xform.IsIdentity() && output_xform_name) {
    if (!WriteMatrix(xform.Matrix(), output_xform_name)) exit(-1);
  }

  // Return success 
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x13a8, %rsp           # imm = 0x13A8
callq 0x10b3c
testl %eax, %eax
je 0x12b17
movq 0xc6471(%rip), %r14     # 0xd7bb8
leaq 0x3a0(%rsp), %rbx
movq %rbx, %rdi
callq 0x67438
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe700
movl $0x138, %edi            # imm = 0x138
callq 0xe430
movq %rax, %r15
movq %rax, %rdi
callq 0x2045c
movq (%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
callq *0x180(%rax)
testl %eax, %eax
je 0x12b21
cmpl $0x0, 0xc65c0(%rip)     # 0xd7d54
je 0x11802
leaq 0x88bfa(%rip), %rdi     # 0x9a397
callq 0xe690
leaq 0x3a0(%rsp), %rdi
callq 0x6749a
leaq 0x88b0a(%rip), %rdi     # 0x9a2c0
movb $0x1, %al
callq 0xe070
movl 0x34(%r15), %esi
leaq 0x88aab(%rip), %rdi     # 0x9a273
xorl %eax, %eax
callq 0xe070
movl 0x24(%r15), %esi
leaq 0x88aa9(%rip), %rdi     # 0x9a283
xorl %eax, %eax
callq 0xe070
movl 0x14(%r15), %esi
leaq 0x88aa7(%rip), %rdi     # 0x9a293
xorl %eax, %eax
callq 0xe070
movq 0xc5776(%rip), %rax     # 0xd6f70
movq (%rax), %rdi
callq 0xe500
movq %r15, (%rsp)
movq 0xc63cb(%rip), %r15     # 0xd7bd8
testq %r15, %r15
je 0x118b2
leaq 0x8d146(%rip), %rsi     # 0x9e963
movq %r15, %rdi
callq 0xe510
testq %rax, %rax
je 0x12b2c
movq %rax, %r14
leaq 0x8af98(%rip), %rsi     # 0x9c7d0
leaq 0x3a0(%rsp), %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0xe7e0
cmpl $0x1, %eax
jne 0x118aa
leaq 0x220(%rsp), %r15
leaq 0x3a0(%rsp), %r12
leaq 0x8af6a(%rip), %r13     # 0x9c7d0
movq %r15, %rdi
callq 0x2045c
movq %r15, %rdi
movq %r12, %rsi
callq 0x2d450
testl %eax, %eax
je 0x12b00
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x2cda2
movq %r15, %rdi
callq 0x2099a
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0xe7e0
cmpl $0x1, %eax
je 0x11866
movq %r14, %rdi
callq 0xe420
cmpl $0x0, 0xc648f(%rip)     # 0xd7d48
movq (%rsp), %r15
je 0x11a2d
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x209f8
leaq 0xa8(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x2102a
leaq 0xc2f39(%rip), %rax     # 0xd4828
addq $0x10, %rax
leaq 0x3a8(%rsp), %r14
movq %rax, -0x8(%r14)
leaq 0xc69ca(%rip), %r15     # 0xd82d0
leaq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0x3ca06
movl $0x88, %esi
addq %rsi, %rbx
addq 0xc56bf(%rip), %rsi     # 0xd6fe0
movq %rbx, %rdi
callq 0x3ca06
movq 0x108(%r15), %rax
movq %rax, 0x4a8(%rsp)
movsd 0x40(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movsd 0x50(%rsp), %xmm2
leaq 0x220(%rsp), %rdi
callq 0x40b9e
leaq 0x220(%rsp), %rsi
movq %r14, %rdi
callq 0x3db40
andb $-0x3, 0x4a8(%rsp)
leaq 0x150(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x3b490
movq (%rsp), %r15
leaq 0x220(%rsp), %rdi
leaq 0x150(%rsp), %rsi
xorl %edx, %edx
callq 0x3a722
leaq 0x3a0(%rsp), %rdi
leaq 0x220(%rsp), %rsi
callq 0x3a8de
leaq 0x220(%rsp), %rdi
callq 0x3a770
movsd 0x40(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movsd 0x50(%rsp), %xmm2
leaq 0x150(%rsp), %rdi
callq 0x40b9e
leaq 0x220(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x417d8
leaq 0x220(%rsp), %rsi
movq %r14, %rdi
callq 0x3db40
leaq 0x3a0(%rsp), %rsi
andb $-0x3, 0x108(%rsi)
leaq 0xc61f5(%rip), %rdi     # 0xd7c10
callq 0x3a8de
leaq 0x3a0(%rsp), %rdi
callq 0x3a770
cmpl $0x0, 0xc630c(%rip)     # 0xd7d40
je 0x11a78
movq %r15, %rdi
callq 0x20bba
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x11a78
jb 0x11a50
sqrtsd %xmm0, %xmm0
jmp 0x11a55
callq 0xe330
movsd 0x885b3(%rip), %xmm1    # 0x9a010
divsd %xmm0, %xmm1
leaq 0xc61b0(%rip), %rdi     # 0xd7c18
movapd %xmm1, %xmm0
callq 0x3dcee
andb $-0x3, 0xc62a0(%rip)    # 0xd7d18
cmpl $0x0, 0xc62c5(%rip)     # 0xd7d44
je 0x11af1
leaq 0x150(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x209f8
leaq 0x3a0(%rsp), %rdi
leaq 0x220(%rsp), %r14
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x2102a
movsd (%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x11af1
jb 0x11ac9
sqrtsd %xmm0, %xmm0
jmp 0x11ace
callq 0xe330
movsd 0x8853a(%rip), %xmm1    # 0x9a010
divsd %xmm0, %xmm1
leaq 0xc6137(%rip), %rdi     # 0xd7c18
movapd %xmm1, %xmm0
callq 0x3dcee
andb $-0x3, 0xc6227(%rip)    # 0xd7d18
cmpl $0x0, 0xc6258(%rip)     # 0xd7d50
je 0x11b54
leaq 0x3a0(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x209f8
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movsd 0x10(%rbx), %xmm2
leaq 0x150(%rsp), %rbx
movq %rbx, %rdi
callq 0x40b9e
leaq 0x220(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x417d8
leaq 0xc60d3(%rip), %rdi     # 0xd7c18
movq %r14, %rsi
callq 0x3db40
andb $-0x3, 0xc61c4(%rip)    # 0xd7d18
cmpl $0x0, 0xc61f1(%rip)     # 0xd7d4c
je 0x11bc9
leaq 0x3a0(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x215d8
leaq 0x3a8(%rsp), %rsi
leaq 0xc6089(%rip), %rdi     # 0xd7c18
callq 0x3e5ea
movl $0x88, %eax
addq %rax, %rbx
leaq 0xc606d(%rip), %rdi     # 0xd7c10
addq %rax, %rdi
movq %rbx, %rsi
callq 0x3e5ea
leaq 0x3a0(%rsp), %rdi
movq 0x108(%rdi), %rax
movq %rax, 0xc6154(%rip)     # 0xd7d18
callq 0x3a770
leaq 0xc6040(%rip), %rdi     # 0xd7c10
callq 0x3a7e0
testl %eax, %eax
jne 0x11bec
movq (%r15), %rax
leaq 0xc602d(%rip), %rsi     # 0xd7c10
movq %r15, %rdi
callq *0x118(%rax)
cmpl $0x0, 0xc600d(%rip)     # 0xd7c00
je 0x12298
leaq 0x360(%rsp), %rbx
movq %rbx, %rdi
callq 0x67438
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe700
movq %r15, %rbx
addq $0xf8, %rbx
movq 0xf8(%r15), %rax
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq *0x68(%rax)
movq %rbx, %rdi
callq 0x38070
movapd %xmm0, %xmm2
mulsd 0x883d5(%rip), %xmm2    # 0x9a018
movapd %xmm2, 0x10(%rsp)
movapd 0x883ff(%rip), %xmm0    # 0x9a050
xorpd %xmm2, %xmm0
leaq 0xa8(%rsp), %rbx
movq %rbx, %rdi
movapd %xmm0, %xmm1
movapd %xmm2, %xmm3
callq 0x5d564
movapd 0x10(%rsp), %xmm0
mulsd 0x883a5(%rip), %xmm0    # 0x9a020
leaq 0x220(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x51824
leaq 0x150(%rsp), %rdi
leaq 0x220(%rsp), %rsi
callq 0x51afc
movsd 0x2d0(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0xc5e7f(%rip), %rax     # 0xd7b38
movsd (%rax), %xmm0
movapd %xmm0, 0x20(%rsp)
movslq 0x34(%r15), %r14
leaq (,%r14,4), %rbx
testq %r14, %r14
movq $-0x1, %rdi
cmovnsq %rbx, %rdi
callq 0xe030
movq %rax, %r13
movapd 0x88363(%rip), %xmm2    # 0x9a050
movapd 0x20(%rsp), %xmm4
xorpd %xmm4, %xmm2
movsd 0x88311(%rip), %xmm0    # 0x9a010
movapd 0x10(%rsp), %xmm3
divsd %xmm3, %xmm0
cmpnlesd %xmm3, %xmm2
movapd %xmm2, %xmm1
andpd %xmm0, %xmm1
cmpnlesd %xmm4, %xmm3
andpd %xmm0, %xmm3
andnpd %xmm3, %xmm2
orpd %xmm1, %xmm2
movapd %xmm2, 0x70(%rsp)
testl %r14d, %r14d
jle 0x11d3f
movq %r13, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xe250
movapd 0x70(%rsp), %xmm0
mulsd %xmm0, %xmm0
movapd %xmm0, 0x70(%rsp)
leaq 0x3a8(%rsp), %r14
leaq 0x8ae1a(%rip), %rax     # 0x9cb78
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %eax, %eax
leaq 0xc2ab7(%rip), %rcx     # 0xd4828
addq $0x10, %rcx
movq %rcx, 0x98(%rsp)
leaq 0xc654c(%rip), %rcx     # 0xd82d0
addq $0x8, %rcx
movq %rcx, 0x90(%rsp)
movl $0x88, %ecx
addq 0xc5244(%rip), %rcx     # 0xd6fe0
movq %rcx, 0x88(%rsp)
leaq 0x138(%rsp), %r12
leaq 0x220(%rsp), %rbp
leaq 0x3a0(%rsp), %rbx
movq %r13, 0x80(%rsp)
movq %rax, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x3a0(%rsp)
movq %r14, %rdi
movq 0x90(%rsp), %rsi
callq 0x3ca06
leaq 0x428(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x3ca06
leaq 0xc64c8(%rip), %rax     # 0xd82d0
movq 0x108(%rax), %rax
movq %rax, 0x4a8(%rsp)
movq %r12, %rdi
callq 0x418a6
callq 0x697b0
mulsd 0x8(%rsp), %xmm0
movq %r14, %rdi
movq %r12, %rsi
callq 0x3e16a
andb $-0x3, 0x4a8(%rsp)
movq %r12, %rdi
callq 0x418a6
callq 0x697b0
mulsd 0x8(%rsp), %xmm0
movq %r14, %rdi
movq %r12, %rsi
callq 0x3e16a
andb $-0x3, 0x4a8(%rsp)
movq %r12, %rdi
callq 0x418a6
callq 0x697b0
mulsd 0x8(%rsp), %xmm0
movq %r14, %rdi
movq %r12, %rsi
callq 0x3e16a
andb $-0x3, 0x4a8(%rsp)
movsd 0x40(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movsd 0x50(%rsp), %xmm2
leaq 0x58(%rsp), %rdi
callq 0x40b9e
movq %r12, %rdi
leaq 0x58(%rsp), %rsi
callq 0x417d8
movq %r14, %rdi
movq %r12, %rsi
callq 0x3db40
andb $-0x3, 0x4a8(%rsp)
movq %rbp, %rdi
movsd 0x88158(%rip), %xmm0    # 0x9a028
callq 0x53220
leaq 0xc5c6c(%rip), %rax     # 0xd7b48
movsd (%rax), %xmm0
leaq 0x150(%rsp), %rdi
callq 0x53220
movl 0x34(%r15), %eax
testl %eax, %eax
jle 0x120bc
xorl %r13d, %r13d
movq 0x28(%r15), %rax
movq (%rax,%r13,8), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %r15
movq 0x18(%rax), %r14
addq $0x18, %rsi
movq %r12, %rdi
callq 0x4011a
addq $0x18, %r15
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x4011a
addq $0x18, %r14
leaq 0x120(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4011a
movq %r12, %rdi
movq %rbx, %rsi
callq 0x40a20
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
callq 0x40a20
movq %r15, %rdi
movq %rbx, %rsi
callq 0x40a20
movsd 0x138(%rsp), %xmm0
movsd 0x140(%rsp), %xmm1
leaq 0x110(%rsp), %rdi
callq 0x6026e
movsd 0x58(%rsp), %xmm0
movsd 0x60(%rsp), %xmm1
leaq 0x100(%rsp), %rdi
callq 0x6026e
movsd 0x120(%rsp), %xmm0
movsd 0x128(%rsp), %xmm1
leaq 0xf0(%rsp), %rdi
callq 0x6026e
movsd 0x148(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x68(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x130(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x110(%rsp), %xmm0
movsd 0x118(%rsp), %xmm1
leaq 0x390(%rsp), %rdi
movq %rbp, %rsi
callq 0x583de
movsd 0x100(%rsp), %xmm0
movsd 0x108(%rsp), %xmm1
leaq 0x380(%rsp), %rdi
movq %rbp, %rsi
callq 0x583de
movsd 0xf0(%rsp), %xmm0
movsd 0xf8(%rsp), %xmm1
leaq 0x370(%rsp), %rdi
movq %rbp, %rsi
callq 0x583de
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movq %rbp, %rdi
leaq 0x390(%rsp), %rsi
leaq 0x380(%rsp), %rdx
leaq 0x370(%rsp), %rcx
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
movsd 0x10(%rsp), %xmm3
movsd 0x20(%rsp), %xmm4
movsd 0x38(%rsp), %xmm5
leaq 0x150(%rsp), %r8
callq 0x57b16
incq %r13
movq (%rsp), %r15
movslq 0x34(%r15), %rax
cmpq %rax, %r13
jl 0x11efc
movq 0x80(%rsp), %r13
leaq 0x3a8(%rsp), %r14
movslq 0x2ec(%rsp), %rcx
testq %rcx, %rcx
jle 0x1210e
movq 0x2d8(%rsp), %rdx
xorl %esi, %esi
movsd (%rdx,%rsi,8), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x12106
addsd 0x87f2e(%rip), %xmm0    # 0x9a018
cvttsd2si %xmm0, %edi
testl %edi, %edi
sets %r8b
cmpl %edi, %eax
setle %r9b
orb %r8b, %r9b
jne 0x12106
movl %edi, %edi
incl (%r13,%rdi,4)
incq %rsi
cmpq %rsi, %rcx
jne 0x120d3
movq %rbx, %rdi
callq 0x3a770
movq 0xa0(%rsp), %rax
incl %eax
cmpl $0x64, %eax
jne 0x11dc4
leaq 0x3a0(%rsp), %rdi
callq 0x679d4
cmpl $0x0, 0x34(%r15)
movq %r15, %rcx
jle 0x121ca
xorl %r15d, %r15d
leaq 0x3a0(%rsp), %rbx
movq 0x28(%rcx), %rax
movq (%rax,%r15,8), %r14
testb $0x2, 0xa8(%r14)
jne 0x12171
movq (%rsp), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x2c0(%rax)
movsd 0x90(%r14), %xmm0
mulsd 0x87eae(%rip), %xmm0    # 0x9a030
divsd 0x70(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl (%r13,%r15,4), %xmm1
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
mulsd 0x87e96(%rip), %xmm0    # 0x9a038
ucomisd %xmm0, %xmm1
ja 0x121ba
movl 0x3ac(%rsp), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x67a6a
incq %r15
movq (%rsp), %rcx
movslq 0x34(%rcx), %rax
cmpq %rax, %r15
jl 0x1214f
cmpl $0x0, 0x3ac(%rsp)
movq %rcx, %r15
jle 0x121fe
xorl %ebx, %ebx
movq 0x3a0(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq (%r15), %rax
movq %r15, %rdi
callq *0x70(%rax)
incq %rbx
movslq 0x3ac(%rsp), %rax
cmpq %rax, %rbx
jl 0x121d9
cmpl $0x0, 0xc5b4f(%rip)     # 0xd7d54
je 0x12264
leaq 0x88197(%rip), %rdi     # 0x9a3a5
callq 0xe690
leaq 0x360(%rsp), %rdi
callq 0x6749a
leaq 0x88097(%rip), %rdi     # 0x9a2be
movb $0x1, %al
callq 0xe070
movl 0x3ac(%rsp), %esi
leaq 0x8809b(%rip), %rdi     # 0x9a2d7
xorl %eax, %eax
callq 0xe070
movl 0x34(%r15), %esi
leaq 0x880a3(%rip), %rdi     # 0x9a2f1
xorl %eax, %eax
callq 0xe070
movq 0xc4d14(%rip), %rax     # 0xd6f70
movq (%rax), %rdi
callq 0xe500
leaq 0x3a0(%rsp), %rdi
callq 0x67a3e
leaq 0x150(%rsp), %rdi
callq 0x51cd4
leaq 0x220(%rsp), %rdi
callq 0x51cd4
leaq 0xa8(%rsp), %rdi
callq 0x5dddc
movsd 0xc5a90(%rip), %xmm1    # 0xd7d30
xorpd %xmm0, %xmm0
movsd %xmm1, 0x38(%rsp)
ucomisd %xmm0, %xmm1
jbe 0x125e8
leaq 0x3a0(%rsp), %rbx
movq %rbx, %rdi
callq 0x67438
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe700
movslq 0x34(%r15), %rbx
testq %rbx, %rbx
je 0x125e8
movl %ebx, %ebp
shlq $0x2, %rbx
testl %ebp, %ebp
movq $-0x1, %rdi
cmovnsq %rbx, %rdi
callq 0xe030
movq %rax, %r14
testl %ebp, %ebp
jle 0x1230a
movq %r14, %rdi
movl $0xff, %esi
movq %rbx, %rdx
callq 0xe250
leaq 0x220(%rsp), %rdi
callq 0x679d4
movl 0x34(%r15), %eax
testl %eax, %eax
jle 0x12501
movq $0x0, 0x20(%rsp)
leaq 0xc513d(%rip), %rbp     # 0xd7470
leaq 0x150(%rsp), %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
movslq %r12d, %r12
cmpl $0x0, (%r14,%r12,4)
js 0x12358
incq %r12
cmpl %r12d, %eax
jne 0x12344
jmp 0x1250d
movl %r13d, 0x8(%rsp)
movq (%rsp), %rax
movq 0x28(%rax), %rax
movq (%rax,%r12,8), %r13
testq %r13, %r13
je 0x12af6
incl (%rbp)
movq %r15, %rdi
callq 0x679d4
leaq 0xa8(%rsp), %rdi
callq 0x679d4
movl 0x15c(%rsp), %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x67a6a
movl (%rbp), %eax
movl %eax, 0xb8(%r13)
movl 0x15c(%rsp), %eax
xorpd %xmm0, %xmm0
testl %eax, %eax
je 0x12485
movsd %xmm0, 0x10(%rsp)
movq 0x150(%rsp), %rcx
movslq %eax, %rsi
movq -0x8(%rcx,%rsi,8), %r13
decl %esi
movq %r15, %rdi
callq 0x67bf4
movl 0xb4(%rsp), %edx
leaq 0xa8(%rsp), %rdi
movq %r13, %rsi
callq 0x67a6a
testb $0x2, 0xa8(%r13)
jne 0x1240a
movq (%rsp), %rdi
movq (%rdi), %rax
movq %r13, %rsi
callq *0x2c0(%rax)
movsd 0x10(%rsp), %xmm0
addsd 0x90(%r13), %xmm0
movsd %xmm0, 0x10(%rsp)
movslq 0xa4(%r13), %rax
movq 0x20(%rsp), %rcx
movl %ecx, (%r14,%rax,4)
movl $0x4, %ebx
movq (%r13,%rbx,8), %rax
movq 0x18(%rax), %rsi
cmpq %r13, %rsi
jne 0x12446
movq 0x20(%rax), %rsi
testq %rsi, %rsi
je 0x1246b
movl (%rbp), %eax
cmpl %eax, 0xb8(%rsi)
je 0x1246b
movl %eax, 0xb8(%rsi)
movl 0x15c(%rsp), %edx
movq %r15, %rdi
callq 0x67a6a
incq %rbx
cmpq $0x7, %rbx
jne 0x12434
movl 0x15c(%rsp), %eax
testl %eax, %eax
jne 0x123bf
jmp 0x1248b
movsd %xmm0, 0x10(%rsp)
cmpl $0x0, 0xb4(%rsp)
je 0x124c2
movsd 0x38(%rsp), %xmm0
ucomisd 0x10(%rsp), %xmm0
jbe 0x124c9
leaq 0x220(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x67d26
movl 0x8(%rsp), %r13d
incl %r13d
jmp 0x124ce
movl 0x8(%rsp), %r13d
jmp 0x124da
movl 0x8(%rsp), %r13d
movq 0x20(%rsp), %rax
incl %eax
movq %rax, 0x20(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x67a3e
movq %r15, %rdi
callq 0x67a3e
movq (%rsp), %rax
movl 0x34(%rax), %eax
cmpl %r12d, %eax
jg 0x12341
jmp 0x1250d
xorl %r13d, %r13d
movq $0x0, 0x20(%rsp)
cmpl $0x0, 0x22c(%rsp)
movq (%rsp), %r15
jle 0x12542
xorl %ebx, %ebx
movq 0x220(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq (%r15), %rax
movq %r15, %rdi
callq *0x70(%rax)
incq %rbx
movslq 0x22c(%rsp), %rax
cmpq %rax, %rbx
jl 0x1251d
movq %r14, %rdi
callq 0xe580
cmpl $0x0, 0xc5803(%rip)     # 0xd7d54
je 0x125db
leaq 0x87e64(%rip), %rdi     # 0x9a3c2
callq 0xe690
leaq 0x3a0(%rsp), %rdi
callq 0x6749a
leaq 0x87d47(%rip), %rdi     # 0x9a2be
movb $0x1, %al
callq 0xe070
leaq 0x87d88(%rip), %rdi     # 0x9a30d
movl %r13d, %esi
xorl %eax, %eax
callq 0xe070
movl 0x22c(%rsp), %esi
leaq 0x87d3a(%rip), %rdi     # 0x9a2d7
xorl %eax, %eax
callq 0xe070
movq 0x20(%rsp), %rsi
subl %r13d, %esi
leaq 0x87d79(%rip), %rdi     # 0x9a32c
xorl %eax, %eax
callq 0xe070
movl 0x34(%r15), %esi
leaq 0x87d2c(%rip), %rdi     # 0x9a2f1
xorl %eax, %eax
callq 0xe070
movq 0xc499d(%rip), %rax     # 0xd6f70
movq (%rax), %rdi
callq 0xe500
leaq 0x220(%rsp), %rdi
callq 0x67a3e
cmpl $0x0, 0xc5605(%rip)     # 0xd7bf4
je 0x12606
movq (%r15), %rax
movq %r15, %rdi
callq *0x80(%rax)
movq (%r15), %rax
movq %r15, %rdi
callq *0x78(%rax)
cmpl $0x0, 0xc55e3(%rip)     # 0xd7bf0
je 0x12638
cmpl $0x0, 0x34(%r15)
jle 0x12638
xorl %ebx, %ebx
movq (%r15), %rax
movq 0x28(%r15), %rcx
movq (%rcx,%rbx,8), %rsi
movq %r15, %rdi
callq *0xe0(%rax)
incq %rbx
movslq 0x34(%r15), %rax
cmpq %rax, %rbx
jl 0x12618
cmpl $0x0, 0xc55bd(%rip)     # 0xd7bfc
je 0x12651
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movq %r15, %rdi
callq 0x273fc
movsd 0xc55af(%rip), %xmm0    # 0xd7c08
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x12673
movq (%r15), %rax
movq %r15, %rdi
callq *0xf8(%rax)
xorpd %xmm1, %xmm1
movsd 0xc56ad(%rip), %xmm0    # 0xd7d28
ucomisd %xmm1, %xmm0
jbe 0x12689
movq %r15, %rdi
callq 0x2602e
movsd 0xc568f(%rip), %xmm0    # 0xd7d20
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x126a3
movq %r15, %rdi
callq 0x25de0
cmpl $0x0, 0xc554e(%rip)     # 0xd7bf8
je 0x126bc
movsd 0x8798c(%rip), %xmm0    # 0x9a040
movq %r15, %rdi
callq 0x268a0
movq 0xc550d(%rip), %rbx     # 0xd7bd0
testq %rbx, %rbx
je 0x129ab
leaq 0x3a0(%rsp), %r14
movq %r14, %rdi
callq 0x2045c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2d450
testl %eax, %eax
je 0x1299e
leaq 0xa8(%rsp), %rdi
leaq 0x3a0(%rsp), %rsi
callq 0x12d14
cmpl $0x0, 0xc54d5(%rip)     # 0xd7be0
je 0x1289a
cmpl $0x0, 0x14(%r15)
jle 0x12991
xorl %ebx, %ebx
leaq 0x150(%rsp), %r12
leaq 0x220(%rsp), %r14
movq 0x8(%r15), %rax
movq (%rax,%rbx,8), %r13
leaq 0x58(%r13), %rbp
movq %rbp, %rdi
leaq 0xc7cdc(%rip), %rsi     # 0xda420
callq 0x678da
leaq 0x170(%rsp), %rdi
callq 0x40108
movq %r14, %r15
addq $0x18, %r13
leaq 0xc53e4(%rip), %rax     # 0xd7b48
movsd (%rax), %xmm1
xorpd %xmm0, %xmm0
leaq 0xa8(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x14730
movl 0x150(%rsp), %eax
cmpl $0x3, %eax
je 0x1281b
cmpl $0x2, %eax
je 0x127bb
cmpl $0x1, %eax
jne 0x12881
movq 0x158(%rsp), %rsi
addq $0x58, %rsi
movq %rbp, %rdi
callq 0x678da
jmp 0x12881
movq 0x160(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq $0x18, %rsi
addq $0x18, %rdx
movq %r15, %rdi
callq 0x3f58e
movq %r15, %rdi
movq %r13, %rsi
callq 0x3f834
movsd 0x268(%rsp), %xmm1
mulsd 0x87821(%rip), %xmm1    # 0x9a018
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setbe %al
movq 0x160(%rsp), %rcx
movq 0x8(%rcx,%rax,8), %rsi
addq $0x58, %rsi
movq %rbp, %rdi
callq 0x678da
jmp 0x12881
movq 0x168(%rsp), %rdx
movq %r15, %rdi
leaq 0x3a0(%rsp), %rsi
movq %r13, %rcx
callq 0x2253e
movsd 0x220(%rsp), %xmm0
movsd 0x228(%rsp), %xmm1
movsd 0x230(%rsp), %xmm2
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0x40b9e
movq %r15, %rdi
callq 0x40d26
movq 0x168(%rsp), %rcx
cltq
movq 0x8(%rcx,%rax,8), %rsi
addq $0x58, %rsi
movq %rbp, %rdi
callq 0x678da
incq %rbx
movq (%rsp), %r15
movslq 0x14(%r15), %rax
cmpq %rax, %rbx
jl 0x1272e
jmp 0x12991
cmpl $0x0, 0xc5343(%rip)     # 0xd7be4
jne 0x128b9
cmpl $0x0, 0xc533e(%rip)     # 0xd7be8
jne 0x128b9
cmpl $0x0, 0xc5339(%rip)     # 0xd7bec
je 0x12991
cmpl $0x0, 0x34(%r15)
jle 0x12991
xorl %ebp, %ebp
leaq 0x150(%rsp), %r14
leaq 0xa8(%rsp), %rbx
leaq 0x220(%rsp), %r12
movq 0x28(%r15), %rax
movq (%rax,%rbp,8), %r13
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x20b46
leaq 0x240(%rsp), %rdi
callq 0x40108
leaq 0xc5240(%rip), %rax     # 0xd7b48
movsd (%rax), %xmm1
xorpd %xmm0, %xmm0
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x14730
cmpl $0x0, 0xc52ba(%rip)     # 0xd7be4
je 0x12941
movq 0x238(%rsp), %rax
movl 0xa0(%rax), %eax
movl %eax, 0xa0(%r13)
cmpl $0x0, 0xc52a0(%rip)     # 0xd7be8
je 0x1295f
movq 0x238(%rsp), %rax
movl 0x9c(%rax), %eax
movl %eax, 0x9c(%r13)
cmpl $0x0, 0xc5286(%rip)     # 0xd7bec
je 0x1297d
movq 0x238(%rsp), %rax
movl 0x98(%rax), %eax
movl %eax, 0x98(%r13)
incq %rbp
movq (%rsp), %r15
movslq 0x34(%r15), %rax
cmpq %rax, %rbp
jl 0x128de
leaq 0xa8(%rsp), %rdi
callq 0x12e2e
leaq 0x3a0(%rsp), %rdi
callq 0x2099a
movq 0xc520e(%rip), %rbx     # 0xd7bc0
leaq 0x3a0(%rsp), %r14
movq %r14, %rdi
callq 0x67438
movq %r14, %rdi
xorl %esi, %esi
callq 0xe700
movq (%r15), %rax
movq %r15, %rdi
movq %rbx, %rsi
callq *0x1d0(%rax)
testl %eax, %eax
je 0x12b0d
cmpl $0x0, 0xc536a(%rip)     # 0xd7d54
je 0x12a5d
leaq 0x8795a(%rip), %rdi     # 0x9a34d
movq %rbx, %rsi
xorl %eax, %eax
callq 0xe070
leaq 0x3a0(%rsp), %rdi
callq 0x6749a
leaq 0x878af(%rip), %rdi     # 0x9a2c0
movb $0x1, %al
callq 0xe070
movl 0x34(%r15), %esi
leaq 0x87850(%rip), %rdi     # 0x9a273
xorl %eax, %eax
callq 0xe070
movl 0x24(%r15), %esi
leaq 0x8784e(%rip), %rdi     # 0x9a283
xorl %eax, %eax
callq 0xe070
movl 0x14(%r15), %esi
leaq 0x8784c(%rip), %rdi     # 0x9a293
xorl %eax, %eax
callq 0xe070
movq 0xc451b(%rip), %rax     # 0xd6f70
movq (%rax), %rdi
callq 0xe500
leaq 0xc51ac(%rip), %rdi     # 0xd7c10
callq 0x3a7e0
testl %eax, %eax
sete %al
movq 0xc5153(%rip), %r14     # 0xd7bc8
testq %r14, %r14
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x12ae2
leaq 0x894b1(%rip), %rsi     # 0x9bf3a
movq %r14, %rdi
callq 0xe510
testq %rax, %rax
je 0x12b38
movq %rax, %rbx
leaq 0xc5174(%rip), %r15     # 0xd7c18
xorl %r12d, %r12d
leaq 0x878b5(%rip), %r14     # 0x9a363
xorl %r13d, %r13d
movsd (%r15,%r13,8), %xmm0
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0xe610
incq %r13
cmpq $0x4, %r13
jne 0x12ab1
incq %r12
addq $0x20, %r15
cmpq $0x4, %r12
jne 0x12aae
movq %rbx, %rdi
callq 0xe420
xorl %eax, %eax
addq $0x13a8, %rsp           # imm = 0x13A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%rsp), %r13d
jmp 0x1250d
leaq 0x220(%rsp), %rdi
callq 0x2099a
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0xe530
movl $0x1, %edi
callq 0xe530
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
jmp 0x12b0d
leaq 0x87773(%rip), %rdi     # 0x9a2a6
movq %r15, %rsi
jmp 0x12b42
leaq 0x87714(%rip), %rdi     # 0x9a253
movq %r14, %rsi
xorl %eax, %eax
callq 0x69b9a
jmp 0x12b0d
movq %rax, %rbx
jmp 0x12c50
jmp 0x12bf6
jmp 0x12bf6
jmp 0x12c40
jmp 0x12c19
jmp 0x12b6b
jmp 0x12b73
movq %rax, %rbx
jmp 0x12c0d
movq %rax, %rbx
jmp 0x12ca2
jmp 0x12bdb
movq %rax, %rbx
jmp 0x12caf
movq %rax, %rbx
jmp 0x12cbc
movq %rax, %rbx
leaq 0x220(%rsp), %rdi
callq 0x3a770
jmp 0x12bde
movq %rax, %rbx
movl $0x138, %esi            # imm = 0x138
movq %r15, %rdi
callq 0xe440
jmp 0x12cc9
jmp 0x12bfd
jmp 0x12bfd
jmp 0x12bfd
jmp 0x12bfd
jmp 0x12bfd
jmp 0x12bdb
jmp 0x12bdb
jmp 0x12bdb
movq %rax, %rbx
leaq 0x3a0(%rsp), %rdi
callq 0x3ae04
jmp 0x12cc9
jmp 0x12bfd
movq %rax, %rbx
leaq 0x3a0(%rsp), %rdi
callq 0x3a770
jmp 0x12cc9
jmp 0x12bfd
jmp 0x12bfd
jmp 0x12bfd
movq %rax, %rbx
jmp 0x12c5d
jmp 0x12c40
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x12e2e
leaq 0x3a0(%rsp), %rdi
jmp 0x12c36
jmp 0x12c19
movq %rax, %rbx
leaq 0x3a0(%rsp), %rdi
callq 0x67a3e
jmp 0x12ca2
movq %rax, %rbx
leaq 0x220(%rsp), %rdi
callq 0x2099a
jmp 0x12cc9
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x67a3e
leaq 0x150(%rsp), %rdi
callq 0x67a3e
leaq 0x220(%rsp), %rdi
callq 0x67a3e
jmp 0x12cc9
jmp 0x12c92
movq %rax, %rbx
leaq 0x3a0(%rsp), %rdi
callq 0x3ae04
jmp 0x12ca2
jmp 0x12c92
jmp 0x12c92
jmp 0x12c92
jmp 0x12c92
jmp 0x12c92
jmp 0x12c92
jmp 0x12c92
jmp 0x12c92
jmp 0x12c92
movq %rax, %rbx
leaq 0x3a0(%rsp), %rdi
callq 0x3a770
leaq 0x150(%rsp), %rdi
callq 0x51cd4
leaq 0x220(%rsp), %rdi
callq 0x51cd4
leaq 0xa8(%rsp), %rdi
callq 0x5dddc
movq %rbx, %rdi
callq 0xe780
nop