// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/apps/mshview/mshview.cpp
// Function: GLUTRedraw()
void GLUTRedraw(void)
{
  // Check meshes
  if (meshes.NEntries() == 0) return;
  
  // Set viewing transformation
  viewer->Camera().Load();

  // Clear window 
  glClearColor(1.0, 1.0, 1.0, 1.0);
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

  // Set backface culling
  if (show_backfacing) glDisable(GL_CULL_FACE);
  else glEnable(GL_CULL_FACE);

  // Set lights
  static GLfloat light0_position[] = { 3.0, 4.0, 5.0, 0.0 };
  glLightfv(GL_LIGHT0, GL_POSITION, light0_position);
  static GLfloat light1_position[] = { -3.0, -2.0, -3.0, 0.0 };
  glLightfv(GL_LIGHT1, GL_POSITION, light1_position);

  // Draw every mesh
  for (int m = 0; m < meshes.NEntries(); m++) {
    R3Mesh *mesh = meshes[m];
    if ((current_mesh != -1) && (m != current_mesh)) continue;

    // Draw faces
    if (show_faces) {
      if (show_materials || show_segments || show_categories) {
        // Draw faces with special colors
        RNGrfxBegin(RN_GRFX_TRIANGLES);
        for (int i = 0; i < mesh->NFaces(); i++) {
          R3MeshFace *face = mesh->Face(i);
          if (show_materials) RNLoadRgb(colors[1 + mesh->FaceMaterial(face)%(ncolors-1)]); 
          else if (show_segments) RNLoadRgb(colors[1 + mesh->FaceSegment(face)%(ncolors-1)]); 
          else if (show_categories) RNLoadRgb(colors[1 + mesh->FaceCategory(face)%(ncolors-1)]); 
          for (int j = 0; j < 3; j++) {
            R3MeshVertex *vertex = mesh->VertexOnFace(face, j);
            R3LoadPoint(mesh->VertexPosition(vertex));
          }
        }
        RNGrfxEnd();
      }
      else {
        // Draw faces
        RNFlags draw_flags = R3_DEFAULT_DRAW_FLAGS;
        if (show_vertex_colors) glDisable(GL_LIGHTING); 
        else { glEnable(GL_LIGHTING); RNLoadRgb(0.8, 0.8, 0.8); draw_flags.Remove(R3_VERTEX_COLORS_DRAW_FLAG); }
        mesh->DrawFaces(draw_flags);
      }
    }

    // Draw edges
    if (show_edges) {
      glDisable(GL_LIGHTING);
      RNLoadRgb(1.0, 0.0, 0.0);
      mesh->DrawEdges(0);
    }

    // Draw boundary edges
    if (show_boundaries) {
      glLineWidth(3);
      glDisable(GL_LIGHTING);
      RNLoadRgb(0.0, 0.0, 0.0);
      for (int i = 0; i < mesh->NEdges(); i++) {
        R3MeshEdge *edge = mesh->Edge(i);
        if (mesh->FaceOnEdge(edge, 0) && mesh->FaceOnEdge(edge, 1)) continue;
        mesh->DrawEdge(edge);
      }
      glLineWidth(1);
    }

    // Draw vertices
    if (show_vertices) {
      RNFlags draw_flags = R3_SURFACES_DRAW_FLAG;
      if (show_vertex_colors) { glDisable(GL_LIGHTING); draw_flags.Add(R3_VERTEX_COLORS_DRAW_FLAG); }
      else { glEnable(GL_LIGHTING); RNLoadRgb(0.0, 0.5, 0.0); }
      glPointSize(5);
      mesh->DrawVertices(draw_flags);
      glPointSize(1);
    }

    // Draw face normals
    if (show_face_normals) {
      glDisable(GL_LIGHTING);
      RNLoadRgb(0.2, 0.2, 0.2);
      RNGrfxBegin(RN_GRFX_LINES);
      RNScalar radius = 0.01 * mesh->BBox().DiagonalLength();
      for (int i = 0; i < mesh->NFaces(); i++) {
        R3MeshFace *face = mesh->Face(i);
        R3Point position = mesh->FaceCentroid(face);
        R3Vector normal = mesh->FaceNormal(face);
        R3LoadPoint(position);
        R3LoadPoint(position + radius * normal);
      }
      RNGrfxEnd();
    }

    // Draw vertex normals
    if (show_vertex_normals) {
      glDisable(GL_LIGHTING);
      RNLoadRgb(0.5, 0.5, 0.5);
      RNGrfxBegin(RN_GRFX_LINES);
      RNScalar radius = 0.0025 * mesh->BBox().DiagonalLength();
      for (int i = 0; i < mesh->NVertices(); i++) {
        R3MeshVertex *vertex = mesh->Vertex(i);
        R3Point position = mesh->VertexPosition(vertex);
        R3Vector normal = mesh->VertexNormal(vertex);
        if (show_vertex_colors) R3LoadRgb(mesh->VertexColor(vertex));
        R3LoadRgb(sqrt(normal.Length()), 0.0, 1.0);
        R3LoadPoint(position);
        R3LoadPoint(position + radius * normal);
      }
      RNGrfxEnd();
    }

    // Draw face names
    if (show_face_names) {
      glDisable(GL_LIGHTING);
      RNLoadRgb(0, 0, 0);
      for (int i = 0; i < mesh->NFaces(); i++) {
        R3MeshFace *face = mesh->Face(i);
        char buffer[256];
        sprintf(buffer, "%d", mesh->FaceID(face));
        R3DrawText(mesh->FaceCentroid(face), buffer);
      }
    }

    // Draw edge names   
    if (show_edge_names) {
      glDisable(GL_LIGHTING);
      RNLoadRgb(0.8, 0.0, 0.0);
      for (int i = 0; i < mesh->NEdges(); i++) {
        R3MeshEdge *edge = mesh->Edge(i);
        char buffer[256];
        sprintf(buffer, "%d", mesh->EdgeID(edge));
        R3DrawText(mesh->EdgeMidpoint(edge), buffer);
      }
    }

    // Draw vertex names
    if (show_vertex_names) {
      glDisable(GL_LIGHTING);
      RNLoadRgb(0.5, 0.3, 0.1);
      RNLength r = 1E-5 * mesh->BBox().DiagonalRadius();
      for (int i = 0; i < mesh->NVertices(); i++) {
        R3MeshVertex *vertex = mesh->Vertex(i);
        R3Point position = mesh->VertexPosition(vertex);
        R3Vector normal = mesh->VertexNormal(vertex);        
        char buffer[256];
        sprintf(buffer, "%d", mesh->VertexID(vertex));
        if (show_vertex_colors) R3LoadRgb(mesh->VertexColor(vertex));
        R3DrawText(position + r * normal, buffer);
      }
    }

    // Draw material names
    if (show_material_names) {
      glDisable(GL_LIGHTING);
      RNLoadRgb(0, 0, 1);
      for (int i = 0; i < mesh->NFaces(); i++) {
        R3MeshFace *face = mesh->Face(i);
        char buffer[256];
        sprintf(buffer, "%d", mesh->FaceMaterial(face));
        R3DrawText(mesh->FaceCentroid(face), buffer);
      }
    }

    // Draw segment names
    if (show_segment_names) {
      glDisable(GL_LIGHTING);
      RNLoadRgb(0, 0, 1);
      for (int i = 0; i < mesh->NFaces(); i++) {
        R3MeshFace *face = mesh->Face(i);
        char buffer[256];
        sprintf(buffer, "%d", mesh->FaceSegment(face));
        R3DrawText(mesh->FaceCentroid(face), buffer);
      }
    }
    
    // Draw category names
    if (show_category_names) {
      glDisable(GL_LIGHTING);
      RNLoadRgb(0, 0, 1);
      for (int i = 0; i < mesh->NFaces(); i++) {
        R3MeshFace *face = mesh->Face(i);
        char buffer[256];
        sprintf(buffer, "%d", mesh->FaceCategory(face));
        R3DrawText(mesh->FaceCentroid(face), buffer);
      }
    }
  }

  // Draw world origin
  if (show_world_origin) {
    glEnable(GL_LIGHTING);
    RNLoadRgb(1.0, 0.0, 0.0);
    RNScalar r = 0.01 * meshes[0]->BBox().DiagonalRadius();
    R3Sphere(world_origin, r).Draw();
  }

  // Draw axes
  if (show_axes) {
    RNScalar d = meshes[0]->BBox().DiagonalRadius();
    glDisable(GL_LIGHTING);
    glLineWidth(3);
    R3BeginLine();
    RNLoadRgb(1, 0, 0);
    R3LoadPoint(R3zero_point + 0.5*d * R3negx_vector);
    R3LoadPoint(R3zero_point + d * R3posx_vector);
    R3EndLine();
    R3BeginLine();
    RNLoadRgb(0, 1, 0);
    R3LoadPoint(R3zero_point + 0.5*d * R3negy_vector);
    R3LoadPoint(R3zero_point + d * R3posy_vector);
    R3EndLine();
    R3BeginLine();
    RNLoadRgb(0, 0, 1);
    R3LoadPoint(R3zero_point + 0.5*d * R3negz_vector);
    R3LoadPoint(R3zero_point + d * R3posz_vector);
    R3EndLine();
    glLineWidth(1);
  }

  // Capture image and exit
  if (image_name) {
    R2Image image(GLUTwindow_width, GLUTwindow_height, 3);
    image.Capture();
    image.Write(image_name);
    GLUTStop();
  }

  // Swap buffers 
  glutSwapBuffers();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
cmpl $0x0, 0x10e85d(%rip)    # 0x133914
je 0x25b4a
movq 0x10ef34(%rip), %rdi    # 0x133ff8
addq $0x8, %rdi
xorl %esi, %esi
callq 0x28fbe
movss 0x9ff2d(%rip), %xmm0    # 0xc5004
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
movapd %xmm0, %xmm3
callq 0x21e20
movl $0x4100, %edi           # imm = 0x4100
callq 0x21200
cmpl $0x0, 0x10ef07(%rip)    # 0x134000
je 0x25107
movl $0xb44, %edi            # imm = 0xB44
callq 0x21210
jmp 0x25111
movl $0xb44, %edi            # imm = 0xB44
callq 0x21810
leaq 0x109898(%rip), %rdx    # 0x12e9b0
movl $0x4000, %edi           # imm = 0x4000
movl $0x1203, %esi           # imm = 0x1203
callq 0x220a0
leaq 0x109892(%rip), %rdx    # 0x12e9c0
movl $0x4001, %edi           # imm = 0x4001
movl $0x1203, %esi           # imm = 0x1203
callq 0x220a0
leaq 0xa67c6(%rip), %rbp     # 0xcb90a
leaq 0x60(%rsp), %r14
leaq 0x18(%rsp), %r15
xorl %edx, %edx
movslq 0x10e7bd(%rip), %rax    # 0x133914
cmpq %rax, %rdx
jge 0x258d3
movl 0x10986a(%rip), %eax    # 0x12e9d0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
setne %cl
movq %rdx, 0x10(%rsp)
cmpq %rax, %rdx
setne %al
testb %al, %cl
jne 0x258c6
movq 0x10e77d(%rip), %rax    # 0x133908
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %r13
cmpl $0x0, 0x109839(%rip)    # 0x12e9d4
je 0x252aa
cmpl $0x0, 0x10ee5c(%rip)    # 0x134004
jne 0x251dd
cmpl $0x0, 0x10ee57(%rip)    # 0x134008
jne 0x251dd
cmpl $0x0, 0x10ee52(%rip)    # 0x13400c
jne 0x251dd
cmpl $0x0, 0x10ee4d(%rip)    # 0x134010
je 0x25279
movl $0xb50, %edi            # imm = 0xB50
callq 0x21210
movl $0x772, %esi            # imm = 0x772
jmp 0x2529d
pushq $0x4
popq %rdi
callq 0x21190
xorl %ebx, %ebx
movslq 0x34(%r13), %rax
cmpq %rax, %rbx
jge 0x2526d
movq %rbp, %r15
movq 0x28(%r13), %rax
movq (%rax,%rbx,8), %r12
movl $0x98, %eax
cmpl $0x0, 0x10edfd(%rip)    # 0x134004
jne 0x25225
movl $0x9c, %eax
cmpl $0x0, 0x10edf3(%rip)    # 0x134008
jne 0x25225
movl $0xa0, %eax
cmpl $0x0, 0x10ede9(%rip)    # 0x13400c
je 0x25247
movl (%r12,%rax), %eax
cltd
pushq $0x47
popq %rcx
idivl %ecx
incl %edx
movslq %edx, %rax
imulq $0x18, %rax, %rdi
leaq 0x10e6f1(%rip), %rax    # 0x133930
addq %rax, %rdi
callq 0x26c14
pushq $0x1
popq %rbp
cmpq $0x4, %rbp
je 0x25262
movq (%r12,%rbp,8), %rdi
addq $0x18, %rdi
callq 0x211b0
incq %rbp
jmp 0x2524a
incq %rbx
movq %r15, %rbp
jmp 0x251e7
callq 0x21c40
leaq 0x18(%rsp), %r15
jmp 0x252aa
movl $0xb50, %edi            # imm = 0xB50
callq 0x21810
movsd 0x9fd9d(%rip), %xmm0    # 0xc5028
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
callq 0x21e70
movl $0x372, %esi            # imm = 0x372
movq (%r13), %rax
movq %r13, %rdi
callq *0x138(%rax)
cmpl $0x0, 0x10ed63(%rip)    # 0x134014
je 0x252e1
movl $0xb50, %edi            # imm = 0xB50
callq 0x21210
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
movsd 0x9fd43(%rip), %xmm0    # 0xc5010
callq 0x21e70
movq (%r13), %rax
movq %r13, %rdi
xorl %esi, %esi
callq *0x130(%rax)
cmpl $0x0, 0x10ed30(%rip)    # 0x134018
je 0x25352
movss 0x9fd16(%rip), %xmm0    # 0xc5008
callq 0x22140
movl $0xb50, %edi            # imm = 0xB50
callq 0x21210
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x21e70
xorl %ebx, %ebx
movslq 0x24(%r13), %rax
cmpq %rax, %rbx
jge 0x25345
movq 0x18(%r13), %rax
movq (%rax,%rbx,8), %rsi
cmpq $0x0, 0x18(%rsi)
je 0x25333
cmpq $0x0, 0x20(%rsi)
jne 0x25340
movq (%r13), %rax
movq %r13, %rdi
callq *0x160(%rax)
incq %rbx
jmp 0x25314
movss 0x9fcb7(%rip), %xmm0    # 0xc5004
callq 0x22140
cmpl $0x0, 0x10ecc3(%rip)    # 0x13401c
je 0x253c1
cmpl $0x0, 0x10ecae(%rip)    # 0x134010
je 0x25375
movl $0xb50, %edi            # imm = 0xB50
callq 0x21210
movl $0x402, %ebx            # imm = 0x402
jmp 0x25397
movl $0xb50, %edi            # imm = 0xB50
callq 0x21810
xorpd %xmm0, %xmm0
xorpd %xmm2, %xmm2
movsd 0x9fc91(%rip), %xmm1    # 0xc5020
callq 0x21e70
pushq $0x2
popq %rbx
movss 0x9fc6d(%rip), %xmm0    # 0xc500c
callq 0x210a0
movq (%r13), %rax
movq %r13, %rdi
movq %rbx, %rsi
callq *0x128(%rax)
movss 0x9fc48(%rip), %xmm0    # 0xc5004
callq 0x210a0
cmpl $0x0, 0x10ec58(%rip)    # 0x134020
je 0x25491
movl $0xb50, %edi            # imm = 0xB50
callq 0x21210
movsd 0x9fc50(%rip), %xmm0    # 0xc5030
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
callq 0x21e70
pushq $0x1
popq %rdi
callq 0x21190
leaq 0xf8(%r13), %rdi
callq 0x63bd0
mulsd 0x9fc0f(%rip), %xmm0    # 0xc5018
movsd %xmm0, 0x8(%rsp)
xorl %r12d, %r12d
movslq 0x34(%r13), %rax
cmpq %rax, %r12
jge 0x2548c
movq 0x28(%r13), %rax
movq (%rax,%r12,8), %rbx
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x4a96a
movq %r13, %rdi
movq %rbx, %rsi
callq 0x26cc4
movq %r15, %rdi
movq %rax, %rsi
callq 0x6b918
movq %r14, %rdi
callq 0x211b0
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x6bffe
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
leaq 0xa6490(%rip), %rbp     # 0xcb90a
callq 0x6b40f
movq %rbx, %rdi
callq 0x211b0
incq %r12
jmp 0x25412
callq 0x21c40
cmpl $0x0, 0x10eb8c(%rip)    # 0x134024
je 0x255a9
movl $0xb50, %edi            # imm = 0xB50
callq 0x21210
movsd 0x9fb70(%rip), %xmm0    # 0xc5020
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
callq 0x21e70
pushq $0x1
popq %rdi
callq 0x21190
leaq 0xf8(%r13), %rdi
callq 0x63bd0
mulsd 0x9fb5f(%rip), %xmm0    # 0xc5038
movsd %xmm0, 0x8(%rsp)
xorl %r12d, %r12d
movslq 0x14(%r13), %rax
cmpq %rax, %r12
jge 0x255a4
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rbx
leaq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x6b158
movq %r13, %rdi
movq %rbx, %rsi
callq 0x26c28
movq %r15, %rdi
movq %rax, %rsi
callq 0x6b918
cmpl $0x0, 0x10eaf0(%rip)    # 0x134010
je 0x2552e
addq $0x58, %rbx
movq %rbx, %rdi
callq 0x26c14
movq %r15, %rdi
callq 0x6ba0e
ucomisd 0x9fb1a(%rip), %xmm0    # 0xc5058
jb 0x25546
sqrtsd %xmm0, %xmm0
jmp 0x2554b
callq 0x216b0
xorpd %xmm1, %xmm1
movsd 0x9fab9(%rip), %xmm2    # 0xc5010
callq 0x21e70
movq %r14, %rdi
callq 0x211b0
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x6bffe
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x6b40f
movq %rbx, %rdi
callq 0x211b0
incq %r12
leaq 0xa636b(%rip), %rbp     # 0xcb90a
jmp 0x254e2
callq 0x21c40
cmpl $0x0, 0x10ea78(%rip)    # 0x134028
je 0x25614
movl $0xb50, %edi            # imm = 0xB50
callq 0x21210
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x22300
xorl %r12d, %r12d
movslq 0x34(%r13), %rax
cmpq %rax, %r12
jge 0x25614
movq 0x28(%r13), %rax
movq (%rax,%r12,8), %rbx
movl 0xa4(%rbx), %edx
movq %r14, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x21140
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x4a96a
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x26c47
incq %r12
jmp 0x255d0
cmpl $0x0, 0x10ea11(%rip)    # 0x13402c
je 0x25680
movl $0xb50, %edi            # imm = 0xB50
callq 0x21210
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
movsd 0x9f9f1(%rip), %xmm0    # 0xc5028
callq 0x21e70
xorl %r12d, %r12d
movslq 0x24(%r13), %rax
cmpq %rax, %r12
jge 0x25680
movq 0x18(%r13), %rax
movq (%rax,%r12,8), %rbx
movl 0x30(%rbx), %edx
movq %r14, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x21140
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x26c60
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x26c47
incq %r12
jmp 0x2563f
cmpl $0x0, 0x10e9a9(%rip)    # 0x134030
je 0x25779
movl $0xb50, %edi            # imm = 0xB50
callq 0x21210
movsd 0x9f981(%rip), %xmm0    # 0xc5020
movsd 0x9f999(%rip), %xmm1    # 0xc5040
movsd 0x9f999(%rip), %xmm2    # 0xc5048
callq 0x21e70
leaq 0xf8(%r13), %rdi
callq 0x26ca4
mulsd 0x9f988(%rip), %xmm0    # 0xc5050
movsd %xmm0, 0x8(%rsp)
xorl %r12d, %r12d
movslq 0x14(%r13), %rax
cmpq %rax, %r12
jge 0x25779
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rbx
leaq 0x18(%rbx), %rsi
movq %r15, %rdi
callq 0x6b158
movq %r13, %rdi
movq %rbx, %rsi
callq 0x26c28
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x6b918
movl 0x70(%rbx), %edx
movq %r14, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x21140
cmpl $0x0, 0x10e8ef(%rip)    # 0x134010
je 0x2572f
addq $0x58, %rbx
movq %rbx, %rdi
callq 0x26c14
leaq 0x160(%rsp), %rbx
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
movsd 0x8(%rsp), %xmm0
callq 0x6bffe
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x6b40f
movq %rbp, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x26c47
incq %r12
leaq 0xa6196(%rip), %rbp     # 0xcb90a
jmp 0x256d1
cmpl $0x0, 0x10e8b4(%rip)    # 0x134034
je 0x257e8
movl $0xb50, %edi            # imm = 0xB50
callq 0x21210
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movss 0x9f868(%rip), %xmm2    # 0xc5004
callq 0x22300
xorl %r12d, %r12d
movslq 0x34(%r13), %rax
cmpq %rax, %r12
jge 0x257e8
movq 0x28(%r13), %rax
movq (%rax,%r12,8), %rbx
movl 0x98(%rbx), %edx
movq %r14, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x21140
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x4a96a
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x26c47
incq %r12
jmp 0x257a4
cmpl $0x0, 0x10e849(%rip)    # 0x134038
je 0x25857
movl $0xb50, %edi            # imm = 0xB50
callq 0x21210
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movss 0x9f7f9(%rip), %xmm2    # 0xc5004
callq 0x22300
xorl %r12d, %r12d
movslq 0x34(%r13), %rax
cmpq %rax, %r12
jge 0x25857
movq 0x28(%r13), %rax
movq (%rax,%r12,8), %rbx
movl 0x9c(%rbx), %edx
movq %r14, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x21140
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x4a96a
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x26c47
incq %r12
jmp 0x25813
cmpl $0x0, 0x10e7de(%rip)    # 0x13403c
je 0x258c6
movl $0xb50, %edi            # imm = 0xB50
callq 0x21210
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movss 0x9f78a(%rip), %xmm2    # 0xc5004
callq 0x22300
xorl %r12d, %r12d
movslq 0x34(%r13), %rax
cmpq %rax, %r12
jge 0x258c6
movq 0x28(%r13), %rax
movq (%rax,%r12,8), %rbx
movl 0xa0(%rbx), %edx
movq %r14, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x21140
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x4a96a
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x26c47
incq %r12
jmp 0x25882
movq 0x10(%rsp), %rdx
incq %rdx
jmp 0x25150
cmpl $0x0, 0x10e766(%rip)    # 0x134040
je 0x25942
movl $0xb50, %edi            # imm = 0xB50
callq 0x21810
movsd 0x9f722(%rip), %xmm0    # 0xc5010
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x21e70
movq 0x10e006(%rip), %rax    # 0x133908
movl $0xf8, %edi
addq (%rax), %rdi
callq 0x26ca4
mulsd 0x9f701(%rip), %xmm0    # 0xc5018
leaq 0x10dffa(%rip), %rsi    # 0x133918
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x61274
movl $0x772, %esi            # imm = 0x772
movq %rbx, %rdi
callq 0x4111a
leaq 0x60(%rsp), %rdi
callq 0x6426e
cmpl $0x0, 0x10e6fb(%rip)    # 0x134044
je 0x25b3b
movq 0x10dfb2(%rip), %rax    # 0x133908
movl $0xf8, %edi
addq (%rax), %rdi
callq 0x26ca4
movsd %xmm0, 0x8(%rsp)
movl $0xb50, %edi            # imm = 0xB50
callq 0x21210
movss 0x9f68d(%rip), %xmm0    # 0xc5008
callq 0x22140
callq 0x26cb4
movss 0x9f677(%rip), %xmm0    # 0xc5004
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x22300
movsd 0x9f67e(%rip), %xmm0    # 0xc5020
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0xa22b3(%rip), %rsi     # 0xc7c68
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x6bffe
leaq 0x111a47(%rip), %rbx    # 0x137410
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6b40f
movq %r15, %rdi
callq 0x211b0
leaq 0xa2235(%rip), %rsi     # 0xc7c20
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x6bffe
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6b40f
movq %r15, %rdi
callq 0x211b0
callq 0x21c40
callq 0x26cb4
xorps %xmm0, %xmm0
xorpd %xmm2, %xmm2
movss 0x9f5d2(%rip), %xmm1    # 0xc5004
callq 0x22300
leaq 0xa2242(%rip), %rsi     # 0xc7c80
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x6bffe
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6b40f
movq %r15, %rdi
callq 0x211b0
leaq 0xa21c5(%rip), %rsi     # 0xc7c38
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x6bffe
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6b40f
movq %r15, %rdi
callq 0x211b0
callq 0x21c40
callq 0x26cb4
xorps %xmm0, %xmm0
xorpd %xmm1, %xmm1
movss 0x9f54a(%rip), %xmm2    # 0xc5004
callq 0x22300
leaq 0xa21d2(%rip), %rsi     # 0xc7c98
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x6bffe
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6b40f
movq %r15, %rdi
callq 0x211b0
leaq 0xa2155(%rip), %rsi     # 0xc7c50
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x6bffe
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6b40f
movq %r15, %rdi
callq 0x211b0
callq 0x21c40
movss 0x9f4ce(%rip), %xmm0    # 0xc5004
callq 0x22140
cmpq $0x0, 0x10e505(%rip)    # 0x134048
jne 0x25b5c
callq 0xb80b2
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x108e76(%rip), %esi    # 0x12e9d8
movl 0x108e74(%rip), %edx    # 0x12e9dc
leaq 0x60(%rsp), %rbx
pushq $0x3
popq %rcx
movq %rbx, %rdi
callq 0x771fa
movq %rbx, %rdi
callq 0x77b8c
movq 0x10e4c1(%rip), %rsi    # 0x134048
leaq 0x60(%rsp), %rdi
callq 0x78e32
callq 0x2508c
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x6426e
jmp 0x25bb2
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x7743c
movq %rbx, %rdi
callq 0x220c0