// File: /workspace/github_cpp_makefile_star2_O1/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, 0x11ebdd(%rip)    # 0x1448f4
je 0x269ef
movq 0x11f2b4(%rip), %rdi    # 0x144fd8
addq $0x8, %rdi
xorl %esi, %esi
callq 0x29fd0
movss 0xb62cd(%rip), %xmm0    # 0xdc004
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
movapd %xmm0, %xmm3
callq 0x21e10
movl $0x4100, %edi           # imm = 0x4100
callq 0x211e0
cmpl $0x0, 0x11f287(%rip)    # 0x144fe0
je 0x25d67
movl $0xb44, %edi            # imm = 0xB44
callq 0x211f0
jmp 0x25d71
movl $0xb44, %edi            # imm = 0xB44
callq 0x21800
leaq 0x119c18(%rip), %rdx    # 0x13f990
movl $0x4000, %edi           # imm = 0x4000
movl $0x1203, %esi           # imm = 0x1203
callq 0x22090
leaq 0x119c12(%rip), %rdx    # 0x13f9a0
movl $0x4001, %edi           # imm = 0x4001
movl $0x1203, %esi           # imm = 0x1203
callq 0x22090
cmpl $0x0, 0x11eb50(%rip)    # 0x1448f4
jle 0x2675e
leaq 0xbcdf9(%rip), %r14     # 0xe2baa
leaq 0x10(%rsp), %r15
leaq 0x123043(%rip), %r12    # 0x148e00
xorl %edx, %edx
movl 0x119beb(%rip), %eax    # 0x13f9b0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
setne %cl
movq %rdx, 0x28(%rsp)
cmpq %rax, %rdx
setne %al
testb %al, %cl
jne 0x26746
movq 0x11eafe(%rip), %rax    # 0x1448e8
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rbp
cmpl $0x0, 0x119bba(%rip)    # 0x13f9b4
je 0x25f40
cmpl $0x0, 0x11f1dd(%rip)    # 0x144fe4
jne 0x25e3c
cmpl $0x0, 0x11f1d8(%rip)    # 0x144fe8
jne 0x25e3c
cmpl $0x0, 0x11f1d3(%rip)    # 0x144fec
jne 0x25e3c
cmpl $0x0, 0x11f1ce(%rip)    # 0x144ff0
je 0x25f0f
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
movl $0x772, %esi            # imm = 0x772
jmp 0x25f33
movl $0x4, %edi
callq 0x21190
cmpl $0x0, 0x34(%rbp)
jle 0x25f08
xorl %ebx, %ebx
movq 0x28(%rbp), %rax
movq (%rax,%rbx,8), %r13
cmpl $0x0, 0x11f183(%rip)    # 0x144fe4
je 0x25e6c
leaq 0x98(%r13), %rax
jmp 0x25e8e
cmpl $0x0, 0x11f175(%rip)    # 0x144fe8
je 0x25e7e
leaq 0x9c(%r13), %rax
jmp 0x25e8e
cmpl $0x0, 0x11f167(%rip)    # 0x144fec
je 0x25ed4
leaq 0xa0(%r13), %rax
movslq (%rax), %rax
imulq $-0x193d4bb7, %rax, %rcx # imm = 0xE6C2B449
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x6, %ecx
addl %edx, %ecx
imull $0x47, %ecx, %ecx
negl %ecx
addl %ecx, %eax
incl %eax
cltq
leaq (%rax,%rax,2), %rax
leaq 0x11ea52(%rip), %rcx    # 0x144910
movsd (%rcx,%rax,8), %xmm0
movsd 0x8(%rcx,%rax,8), %xmm1
movsd 0x10(%rcx,%rax,8), %xmm2
callq 0x21e60
movl $0x1, %r14d
movq (%r13,%r14,8), %rdi
addq $0x18, %rdi
callq 0x211b0
incq %r14
cmpq $0x4, %r14
jne 0x25eda
incq %rbx
movslq 0x34(%rbp), %rax
cmpq %rax, %rbx
leaq 0xbcca8(%rip), %r14     # 0xe2baa
jl 0x25e52
callq 0x21c40
jmp 0x25f40
movl $0xb50, %edi            # imm = 0xB50
callq 0x21800
movsd 0xb60ef(%rip), %xmm0    # 0xdc010
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
callq 0x21e60
movl $0x372, %esi            # imm = 0x372
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x138(%rax)
cmpl $0x0, 0x11f0ad(%rip)    # 0x144ff4
je 0x25f77
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
movsd 0xb60b5(%rip), %xmm0    # 0xdc018
callq 0x21e60
movq (%rbp), %rax
movq %rbp, %rdi
xorl %esi, %esi
callq *0x130(%rax)
cmpl $0x0, 0x11f07a(%rip)    # 0x144ff8
je 0x25fec
movss 0xb6080(%rip), %xmm0    # 0xdc008
callq 0x22130
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x21e60
cmpl $0x0, 0x24(%rbp)
jle 0x25fdf
xorl %ebx, %ebx
movq 0x18(%rbp), %rax
movq (%rax,%rbx,8), %rsi
cmpq $0x0, 0x18(%rsi)
je 0x25fc6
cmpq $0x0, 0x20(%rsi)
jne 0x25fd3
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x160(%rax)
incq %rbx
movslq 0x24(%rbp), %rax
cmpq %rax, %rbx
jl 0x25fb0
movss 0xb601d(%rip), %xmm0    # 0xdc004
callq 0x22130
cmpl $0x0, 0x11f009(%rip)    # 0x144ffc
je 0x2605d
cmpl $0x0, 0x11eff4(%rip)    # 0x144ff0
je 0x2600f
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
movl $0x402, %ebx            # imm = 0x402
jmp 0x26033
movl $0xb50, %edi            # imm = 0xB50
callq 0x21800
xorpd %xmm0, %xmm0
xorpd %xmm2, %xmm2
movsd 0xb5ff7(%rip), %xmm1    # 0xdc020
callq 0x21e60
movl $0x2, %ebx
movss 0xb5fd1(%rip), %xmm0    # 0xdc00c
callq 0x210a0
movq (%rbp), %rax
movq %rbp, %rdi
movq %rbx, %rsi
callq *0x128(%rax)
movss 0xb5fac(%rip), %xmm0    # 0xdc004
callq 0x210a0
cmpl $0x0, 0x11ef9c(%rip)    # 0x145000
movq %rbp, (%rsp)
je 0x26169
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
movsd 0xb5fa8(%rip), %xmm0    # 0xdc028
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
callq 0x21e60
movl $0x1, %edi
callq 0x21190
leaq 0xf8(%rbp), %rdi
callq 0x6da60
mulsd 0xb5f85(%rip), %xmm0    # 0xdc030
movsd %xmm0, 0x8(%rsp)
cmpl $0x0, 0x34(%rbp)
leaq 0x60(%rsp), %r15
jle 0x26158
xorl %r13d, %r13d
movq 0x28(%rbp), %rax
movq (%rax,%r13,8), %rbx
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x519e0
testb $0x4, 0xa8(%rbx)
jne 0x260f2
movq (%rbp), %rax
movq %rbp, %rdi
movq %rbx, %rsi
callq *0x2c8(%rax)
addq $0x38, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x76656
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x211b0
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x77016
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq (%rsp), %rbp
callq 0x75ef9
movq %rbx, %rdi
callq 0x211b0
incq %r13
movslq 0x34(%rbp), %rax
cmpq %rax, %r13
jl 0x260c3
callq 0x21c40
leaq 0x10(%rsp), %r15
leaq 0xbca41(%rip), %r14     # 0xe2baa
cmpl $0x0, 0x11ee94(%rip)    # 0x145004
je 0x262aa
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
movsd 0xb5e98(%rip), %xmm0    # 0xdc020
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
callq 0x21e60
movl $0x1, %edi
callq 0x21190
leaq 0xf8(%rbp), %rdi
callq 0x6da60
mulsd 0xb5e85(%rip), %xmm0    # 0xdc038
movsd %xmm0, 0x8(%rsp)
cmpl $0x0, 0x14(%rbp)
leaq 0x60(%rsp), %rdi
jle 0x262a5
xorl %r13d, %r13d
movq 0x8(%rbp), %rax
movq (%rax,%r13,8), %rbx
leaq 0x18(%rbx), %rsi
callq 0x75bbe
testb $0x2, 0x78(%rbx)
jne 0x261f2
movq (%rbp), %rax
movq %rbp, %rdi
movq %rbx, %rsi
callq *0x2b0(%rax)
leaq 0x30(%rbx), %rsi
movq %r15, %rdi
callq 0x76656
cmpl $0x0, 0x11edeb(%rip)    # 0x144ff0
je 0x2621b
movsd 0x58(%rbx), %xmm0
movsd 0x60(%rbx), %xmm1
movsd 0x68(%rbx), %xmm2
callq 0x21e60
movq %r15, %rdi
callq 0x7674c
ucomisd 0xb5e2d(%rip), %xmm0    # 0xdc058
jb 0x26233
sqrtsd %xmm0, %xmm0
jmp 0x26238
callq 0x216b0
leaq 0x60(%rsp), %rbx
xorpd %xmm1, %xmm1
movsd 0xb5dcf(%rip), %xmm2    # 0xdc018
callq 0x21e60
movq %rbx, %rdi
callq 0x211b0
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x77016
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x75ef9
movq %r14, %rdi
callq 0x211b0
incq %r13
movq (%rsp), %rbp
movslq 0x14(%rbp), %rax
cmpq %rax, %r13
movq %rbx, %rdi
leaq 0xbc90b(%rip), %r14     # 0xe2baa
jl 0x261cb
callq 0x21c40
cmpl $0x0, 0x11ed57(%rip)    # 0x145008
je 0x2634a
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x222d0
cmpl $0x0, 0x34(%rbp)
jle 0x2634a
xorl %r13d, %r13d
movq 0x28(%rbp), %rax
movq (%rax,%r13,8), %rbx
movl 0xa4(%rbx), %edx
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21140
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x519e0
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
callq 0x212b0
movb 0x60(%rsp), %al
testb %al, %al
je 0x2633e
leaq 0x61(%rsp), %rbx
movsbl %al, %esi
movq %r12, %rdi
callq 0xcee38
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0x2632a
incq %r13
movslq 0x34(%rbp), %rax
cmpq %rax, %r13
jl 0x262db
cmpl $0x0, 0x11ecbb(%rip)    # 0x14500c
je 0x26418
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
movsd 0xb5c9f(%rip), %xmm0    # 0xdc010
callq 0x21e60
cmpl $0x0, 0x24(%rbp)
jle 0x26418
xorl %ebx, %ebx
movq 0x18(%rbp), %rax
movq (%rax,%rbx,8), %r14
movl 0x30(%r14), %edx
leaq 0x60(%rsp), %rdi
leaq 0xbc810(%rip), %rsi     # 0xe2baa
xorl %eax, %eax
callq 0x21140
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
addq $0x18, %rsi
addq $0x18, %rdx
movq %r15, %rdi
callq 0x765b2
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
movsd 0xb5c57(%rip), %xmm0    # 0xdc020
callq 0x765f8
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movsd 0x40(%rsp), %xmm2
callq 0x212b0
movb 0x60(%rsp), %al
testb %al, %al
je 0x26408
leaq 0x61(%rsp), %r13
movsbl %al, %esi
movq %r12, %rdi
callq 0xcee38
movb (%r13), %al
incq %r13
testb %al, %al
jne 0x263f2
incq %rbx
movslq 0x24(%rbp), %rax
cmpq %rax, %rbx
jl 0x26382
cmpl $0x0, 0x11ebf1(%rip)    # 0x145010
leaq 0xbc784(%rip), %r14     # 0xe2baa
je 0x2655a
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
movsd 0xb5be2(%rip), %xmm0    # 0xdc020
movsd 0xb5bfa(%rip), %xmm1    # 0xdc040
movsd 0xb5bfa(%rip), %xmm2    # 0xdc048
callq 0x21e60
leaq 0xf8(%rbp), %rdi
callq 0x6da60
mulsd 0xb5bb9(%rip), %xmm0    # 0xdc020
mulsd 0xb5be1(%rip), %xmm0    # 0xdc050
movsd %xmm0, (%rsp)
cmpl $0x0, 0x14(%rbp)
jle 0x2655a
xorl %r13d, %r13d
movq 0x8(%rbp), %rax
movq (%rax,%r13,8), %rbx
leaq 0x18(%rbx), %rsi
movq %r15, %rdi
callq 0x75bbe
testb $0x2, 0x78(%rbx)
jne 0x264ab
movq (%rbp), %rax
movq %rbp, %rdi
movq %rbx, %rsi
callq *0x2b0(%rax)
leaq 0x30(%rbx), %rsi
leaq 0x30(%rsp), %rdi
callq 0x76656
movl 0x70(%rbx), %edx
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21140
cmpl $0x0, 0x11eb1e(%rip)    # 0x144ff0
je 0x264e8
movsd 0x58(%rbx), %xmm0
movsd 0x60(%rbx), %xmm1
movsd 0x68(%rbx), %xmm2
callq 0x21e60
leaq 0x160(%rsp), %rbx
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
movsd (%rsp), %xmm0
callq 0x77016
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x75ef9
movsd 0x48(%rsp), %xmm0
movsd 0x50(%rsp), %xmm1
movsd 0x58(%rsp), %xmm2
callq 0x212b0
movb 0x60(%rsp), %al
testb %al, %al
je 0x2654a
leaq 0x61(%rsp), %rbx
movsbl %al, %esi
movq %r12, %rdi
callq 0xcee38
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0x26536
incq %r13
movslq 0x14(%rbp), %rax
cmpq %rax, %r13
jl 0x26481
cmpl $0x0, 0x11eab3(%rip)    # 0x145014
je 0x265fe
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movss 0xb5a83(%rip), %xmm2    # 0xdc004
callq 0x222d0
cmpl $0x0, 0x34(%rbp)
jle 0x265fe
xorl %r13d, %r13d
movq 0x28(%rbp), %rax
movq (%rax,%r13,8), %rbx
movl 0x98(%rbx), %edx
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21140
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x519e0
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
callq 0x212b0
movb 0x60(%rsp), %al
testb %al, %al
je 0x265f2
leaq 0x61(%rsp), %rbx
movsbl %al, %esi
movq %r12, %rdi
callq 0xcee38
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0x265de
incq %r13
movslq 0x34(%rbp), %rax
cmpq %rax, %r13
jl 0x2658f
cmpl $0x0, 0x11ea13(%rip)    # 0x145018
je 0x266a2
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movss 0xb59df(%rip), %xmm2    # 0xdc004
callq 0x222d0
cmpl $0x0, 0x34(%rbp)
jle 0x266a2
xorl %r13d, %r13d
movq 0x28(%rbp), %rax
movq (%rax,%r13,8), %rbx
movl 0x9c(%rbx), %edx
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21140
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x519e0
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
callq 0x212b0
movb 0x60(%rsp), %al
testb %al, %al
je 0x26696
leaq 0x61(%rsp), %rbx
movsbl %al, %esi
movq %r12, %rdi
callq 0xcee38
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0x26682
incq %r13
movslq 0x34(%rbp), %rax
cmpq %rax, %r13
jl 0x26633
cmpl $0x0, 0x11e973(%rip)    # 0x14501c
je 0x26746
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movss 0xb593b(%rip), %xmm2    # 0xdc004
callq 0x222d0
cmpl $0x0, 0x34(%rbp)
jle 0x26746
xorl %r13d, %r13d
movq 0x28(%rbp), %rax
movq (%rax,%r13,8), %rbx
movl 0xa0(%rbx), %edx
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21140
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x519e0
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
callq 0x212b0
movb 0x60(%rsp), %al
testb %al, %al
je 0x2673a
leaq 0x61(%rsp), %rbx
movsbl %al, %esi
movq %r12, %rdi
callq 0xcee38
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0x26726
incq %r13
movslq 0x34(%rbp), %rax
cmpq %rax, %r13
jl 0x266d7
movq 0x28(%rsp), %rdx
incq %rdx
movslq 0x11e19f(%rip), %rax    # 0x1448f4
cmpq %rax, %rdx
jl 0x25dbf
cmpl $0x0, 0x11e8bb(%rip)    # 0x145020
je 0x267d5
movl $0xb50, %edi            # imm = 0xB50
callq 0x21800
movsd 0xb589f(%rip), %xmm0    # 0xdc018
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x21e60
movq 0x11e15b(%rip), %rax    # 0x1448e8
movl $0xf8, %edi
addq (%rax), %rdi
callq 0x6da60
mulsd 0xb587e(%rip), %xmm0    # 0xdc020
mulsd 0xb5886(%rip), %xmm0    # 0xdc030
leaq 0x11e147(%rip), %rsi    # 0x1448f8
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x6ae2a
movl $0x772, %esi            # imm = 0x772
movq %rbx, %rdi
callq 0x469a4
leaq 0x60(%rsp), %rdi
callq 0x6e238
cmpl $0x0, 0x11e848(%rip)    # 0x145024
je 0x269e0
movq 0x11e0ff(%rip), %rax    # 0x1448e8
movl $0xf8, %edi
addq (%rax), %rdi
callq 0x6da60
mulsd 0xb5822(%rip), %xmm0    # 0xdc020
movsd %xmm0, (%rsp)
movl $0xb50, %edi            # imm = 0xB50
callq 0x211f0
movss 0xb57f3(%rip), %xmm0    # 0xdc008
callq 0x22130
movl $0x3, %edi
callq 0x21190
movss 0xb57d8(%rip), %xmm0    # 0xdc004
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x222d0
movsd 0xb57df(%rip), %xmm0    # 0xdc020
mulsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0xb8485(%rip), %rsi     # 0xdecd8
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x77016
leaq 0x121b89(%rip), %rbx    # 0x1483f0
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x75ef9
movq %r15, %rdi
callq 0x211b0
leaq 0xb8407(%rip), %rsi     # 0xdec90
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movsd (%rsp), %xmm0
callq 0x77016
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x75ef9
movq %r15, %rdi
callq 0x211b0
callq 0x21c40
movl $0x3, %edi
callq 0x21190
xorps %xmm0, %xmm0
xorpd %xmm2, %xmm2
movss 0xb5730(%rip), %xmm1    # 0xdc004
callq 0x222d0
leaq 0xb8410(%rip), %rsi     # 0xdecf0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x77016
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x75ef9
movq %r15, %rdi
callq 0x211b0
leaq 0xb8393(%rip), %rsi     # 0xdeca8
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movsd (%rsp), %xmm0
callq 0x77016
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x75ef9
movq %r15, %rdi
callq 0x211b0
callq 0x21c40
movl $0x3, %edi
callq 0x21190
xorps %xmm0, %xmm0
xorpd %xmm1, %xmm1
movss 0xb56a4(%rip), %xmm2    # 0xdc004
callq 0x222d0
leaq 0xb839c(%rip), %rsi     # 0xded08
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x77016
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x75ef9
movq %r15, %rdi
callq 0x211b0
leaq 0xb831f(%rip), %rsi     # 0xdecc0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movsd (%rsp), %xmm0
callq 0x77016
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x75ef9
movq %r15, %rdi
callq 0x211b0
callq 0x21c40
movss 0xb5629(%rip), %xmm0    # 0xdc004
callq 0x22130
cmpq $0x0, 0x11e640(%rip)    # 0x145028
jne 0x26a01
callq 0xced58
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x118fb1(%rip), %esi    # 0x13f9b8
movl 0x118faf(%rip), %edx    # 0x13f9bc
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movl $0x3, %ecx
callq 0x82fa2
movq %rbx, %rdi
callq 0x83a2c
movq 0x11e5fa(%rip), %rsi    # 0x145028
leaq 0x60(%rsp), %rdi
callq 0x84ddc
movl 0x11e592(%rip), %edi    # 0x144fd0
callq 0xd5048
xorl %edi, %edi
callq 0x21af0
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x6e238
jmp 0x26a66
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x8320a
movq %rbx, %rdi
callq 0x220b0