// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/apps/conf2img/conf2img.cpp
// Function: Redraw()
static void
Redraw(void)
{
  // Statistics variables
  static RNTime start_time;
  if (current_image_index == -1) start_time.Read(); 
  char output_image_filename[4096];

  // Get camera and name for next image
  R3Point target_viewpoint;
  R3Vector target_towards, target_up;
  if (!LoadNextCamera(target_viewpoint, target_towards, target_up)) {
    if (print_verbose) {
      printf("  Time = %.2f seconds\n", start_time.Elapsed());
      printf("  # Images = %d\n", current_image_index);
      fflush(stdout);
    }
    exit(0);
  }

  // Get image name
  char image_name_buffer[2048];
  char *name = image_name_buffer;
  if (configuration.NImages() > 0) {
    RGBDImage *image = configuration.Image(current_image_index);
    const char *filename = image->DepthFilename();
    if (!filename) filename = image->ColorFilename();
    if (!filename) filename = "default";
    strncpy(image_name_buffer, filename, 2047);
    if (strrchr(image_name_buffer, '/')) name = strrchr(image_name_buffer, '/')+1;
    char *endp = strrchr(name, '.');
    if (endp) *endp = '\0';
  }
  else {
    sprintf(image_name_buffer, "%06d", current_image_index);
  }

  // Print debug statement
  if (print_debug) {
    printf("  Rendering %s ...\n", name);
    fflush(stdout);
  }

  // Create mask image
  R2Grid *mask_image = NULL;
  if (mask_by_filled_depth && !mesh.IsEmpty()) {
    // Get filled depth image
    RGBDImage *image = configuration.Image(current_image_index);
    if (!image->ReadDepthChannel()) RNAbort("Unable to read depth channel for %s", name);
    R2Grid filled_depth_image(*image->DepthChannel());
    if (!image->ReleaseDepthChannel()) RNAbort("Unable to release depth channel for %s", name);
    filled_depth_image.Substitute(0.0, R2_GRID_UNKNOWN_VALUE);
    filled_depth_image.FillHoles();

    // Get rendered depth image
    R2Grid rendered_depth_image(width, height);
    RenderMesh(mesh, BLACK_RENDERING, target_viewpoint, target_towards, target_up);
    if (!CaptureDepth(rendered_depth_image)) RNAbort("Unable to capture depth for %s", name);

    // Create mask
    mask_image = new R2Grid(width, height);
    for (int i = 0; i < width*height; i++) {
      RNScalar filled_depth_value = filled_depth_image.GridValue(i);
      if (filled_depth_value == R2_GRID_UNKNOWN_VALUE) continue;
      if (filled_depth_value == 0) continue;
      RNScalar rendered_depth_value = rendered_depth_image.GridValue(i);
      if (rendered_depth_value == R2_GRID_UNKNOWN_VALUE) continue;
      if (rendered_depth_value == 0) continue;
      RNScalar ratio = filled_depth_value / rendered_depth_value;
      if ((ratio < 0.8) || (ratio > 1.25)) continue;
      mask_image->SetGridValue(i, 1);
    }
  }

  // Capture and write depth image
  sprintf(output_image_filename, "%s/%s_depth.png", output_image_directory, name);
  if (capture_depth_images && !RNFileExists(output_image_filename)) {
    R2Grid depth_image(width, height);
    RenderConfiguration(configuration, target_viewpoint, target_towards, target_up);
    if (CaptureDepth(depth_image)) {
      depth_image.Multiply(png_distance_scale);
      depth_image.Threshold(65535, R2_GRID_KEEP_VALUE, 0);
      if (mask_image) depth_image.Mask(*mask_image);
      depth_image.WriteFile(output_image_filename);
    }
  }

  // Capture and write color image
  sprintf(output_image_filename, "%s/%s_color.jpg", output_image_directory, name);
  if (capture_color_images && !RNFileExists(output_image_filename)) {
    R2Image color_image(width, height, 3);
    RenderConfiguration(configuration, target_viewpoint, target_towards, target_up);
    if (CaptureColor(color_image)) {
      sprintf(output_image_filename, "%s/%s_color.jpg", output_image_directory, name);
      color_image.Write(output_image_filename);
    }
  }

  // Capture and write mesh color image
  sprintf(output_image_filename, "%s/%s_mesh_color.jpg", output_image_directory, name);
  if (capture_mesh_color_images && !RNFileExists(output_image_filename)) {
    R2Image color_image(width, height, 3);
    RenderMesh(mesh, COLOR_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureColor(color_image)) {
      sprintf(output_image_filename, "%s/%s_mesh_color.jpg", output_image_directory, name);
      color_image.Write(output_image_filename);
    }
  }

  // Capture and write mesh depth image
  sprintf(output_image_filename, "%s/%s_mesh_depth.png", output_image_directory, name);
  if (!mesh.IsEmpty() && capture_mesh_depth_images && !RNFileExists(output_image_filename)) {
    R2Grid depth_image(width, height);
    RenderMesh(mesh, BLACK_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureDepth(depth_image)) {
      depth_image.Multiply(png_distance_scale);
      depth_image.Threshold(65535, R2_GRID_KEEP_VALUE, 0);
      if (mask_image) depth_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_depth.png", output_image_directory, name);
      depth_image.WriteFile(output_image_filename);
    }
  }

  // Capture and write mesh position images (in camera coordinates)
  sprintf(output_image_filename, "%s/%s_mesh_pz.png", output_image_directory, name);
  if (!mesh.IsEmpty() && capture_mesh_position_images && !RNFileExists(output_image_filename)) {
    R2Grid position_image(width, height);
    RenderMesh(mesh, CAMERA_PX_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(position_image)) {
      if (mask_image) position_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_px.png", output_image_directory, name);
      position_image.WriteFile(output_image_filename);
    }
    RenderMesh(mesh, CAMERA_PY_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(position_image)) {
      if (mask_image) position_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_py.png", output_image_directory, name);
      position_image.WriteFile(output_image_filename);
    }
    RenderMesh(mesh, CAMERA_PZ_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(position_image)) {
      if (mask_image) position_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_pz.png", output_image_directory, name);
      position_image.WriteFile(output_image_filename);
    }
  }

  // Capture and write mesh position images (in world coordinates)
  sprintf(output_image_filename, "%s/%s_mesh_wpz.png", output_image_directory, name);
  if (!mesh.IsEmpty() && capture_mesh_wposition_images && !RNFileExists(output_image_filename)) {
    R2Grid position_image(width, height);
    RenderMesh(mesh, WORLD_PX_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(position_image)) {
      if (mask_image) position_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_wpx.png", output_image_directory, name);
      position_image.WriteFile(output_image_filename);
    }
    RenderMesh(mesh, WORLD_PY_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(position_image)) {
      if (mask_image) position_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_wpy.png", output_image_directory, name);
      position_image.WriteFile(output_image_filename);
    }
    RenderMesh(mesh, WORLD_PZ_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(position_image)) {
      if (mask_image) position_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_wpz.png", output_image_directory, name);
      position_image.WriteFile(output_image_filename);
    }
  }

  // Capture and write mesh normal images (in camera coordinates)
  sprintf(output_image_filename, "%s/%s_mesh_nd.png", output_image_directory, name);
  if (!mesh.IsEmpty() && capture_mesh_normal_images && !RNFileExists(output_image_filename)) {
    R2Grid normal_image(width, height);
    RenderMesh(mesh, CAMERA_NX_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(normal_image)) {
      if (mask_image) normal_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_nx.png", output_image_directory, name);
      normal_image.WriteFile(output_image_filename);
    }
    RenderMesh(mesh, CAMERA_NY_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(normal_image)) {
      if (mask_image) normal_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_ny.png", output_image_directory, name);
      normal_image.WriteFile(output_image_filename);
    }
    RenderMesh(mesh, CAMERA_NZ_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(normal_image)) {
      if (mask_image) normal_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_nz.png", output_image_directory, name);
      normal_image.WriteFile(output_image_filename);
    }
    RenderMesh(mesh, CAMERA_ND_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(normal_image)) {
      if (mask_image) normal_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_nd.png", output_image_directory, name);
      normal_image.WriteFile(output_image_filename);
    }
  }

  // Capture and write mesh normal images (in world coordinates)
  sprintf(output_image_filename, "%s/%s_mesh_wnd.png", output_image_directory, name);
  if (!mesh.IsEmpty() && capture_mesh_wnormal_images && !RNFileExists(output_image_filename)) {
    R2Grid normal_image(width, height);
    RenderMesh(mesh, WORLD_NX_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(normal_image)) {
      if (mask_image) normal_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_wnx.png", output_image_directory, name);
      normal_image.WriteFile(output_image_filename);
    }
    RenderMesh(mesh, WORLD_NY_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(normal_image)) {
      if (mask_image) normal_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_wny.png", output_image_directory, name);
      normal_image.WriteFile(output_image_filename);
    }
    RenderMesh(mesh, WORLD_NZ_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(normal_image)) {
      if (mask_image) normal_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_wnz.png", output_image_directory, name);
      normal_image.WriteFile(output_image_filename);
    }
    RenderMesh(mesh, WORLD_ND_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(normal_image)) {
      if (mask_image) normal_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_wnd.png", output_image_directory, name);
      normal_image.WriteFile(output_image_filename);
    }
  }

  // Capture and write mesh ndotv image
  sprintf(output_image_filename, "%s/%s_mesh_ndotv.png", output_image_directory, name);
  if (!mesh.IsEmpty() && capture_mesh_ndotv_images && !RNFileExists(output_image_filename)) {
    R2Grid ndotv_image(width, height);
    RenderMesh(mesh, NDOTV_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(ndotv_image)) {
      if (mask_image) ndotv_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_ndotv.png", output_image_directory, name);
      ndotv_image.WriteFile(output_image_filename);
    }
  }
  
  // Capture and write mesh face ID image
  sprintf(output_image_filename, "%s/%s_mesh_face.pfm", output_image_directory, name);
  if (!mesh.IsEmpty() && capture_mesh_face_images && !RNFileExists(output_image_filename)) {
    R2Grid face_image(width, height);
    RenderMesh(mesh, FACE_INDEX_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(face_image)) {
      if (mask_image) face_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_face.pfm", output_image_directory, name);
      face_image.WriteFile(output_image_filename);
    }
  }

  // Capture and write mesh material ID image
  sprintf(output_image_filename, "%s/%s_mesh_material.png", output_image_directory, name);
  if (!mesh.IsEmpty() && capture_mesh_material_images && !RNFileExists(output_image_filename)) {
    R2Grid material_image(width, height);
    RenderMesh(mesh, FACE_MATERIAL_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(material_image)) {
      if (mask_image) material_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_material.png", output_image_directory, name);
      material_image.WriteFile(output_image_filename);
    }
  }

  // Capture and write mesh segment ID image
  sprintf(output_image_filename, "%s/%s_mesh_segment.png", output_image_directory, name);
  if (!mesh.IsEmpty() && capture_mesh_segment_images && !RNFileExists(output_image_filename)) {
    R2Grid face_image(width, height);
    RenderMesh(mesh, FACE_INDEX_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(face_image)) {
      if (mask_image) face_image.Mask(*mask_image);
      R2Image segment_image(width, height, 3);
      for (int ix = 0; ix < width; ix++) {
        for (int iy = 0; iy < height; iy++) { 
          RNScalar face_value = face_image.GridValue(ix, iy);
          if ((face_value == R2_GRID_UNKNOWN_VALUE) || (face_value == 0)) continue;
          int face_index = (int) (face_value - 1.0 + 0.5);
          assert((face_index >= 0) && (face_index < mesh.NFaces()));
          R3MeshFace *face = mesh.Face(face_index);
          int segment = mesh.FaceSegment(face);
          if (segment < 0) continue;
          int region_index = (segment / 1000000) + 1;
          assert(region_index < 256);
          int object_index = (segment % 1000000) + 1;
          assert((object_index >> 8) < 256);
          unsigned char pixel[4];
          pixel[0] = region_index;
          pixel[1] = (object_index>>8) & 0xFF;
          pixel[2] = object_index & 0xFF;
          segment_image.SetPixel(ix, iy, pixel);
        }
      }
      segment_image.Write(output_image_filename);
    }
  }

  // Capture and write mesh category ID image
  sprintf(output_image_filename, "%s/%s_mesh_category.png", output_image_directory, name);
  if (!mesh.IsEmpty() && capture_mesh_category_images && !RNFileExists(output_image_filename)) {
    R2Grid category_image(width, height);
    RenderMesh(mesh, FACE_CATEGORY_RENDERING, target_viewpoint, target_towards, target_up);
    if (CaptureInteger(category_image)) {
      if (mask_image) category_image.Mask(*mask_image);
      sprintf(output_image_filename, "%s/%s_mesh_category.png", output_image_directory, name);
      category_image.WriteFile(output_image_filename);
    }
  }

  // Delete mask image
  if (mask_image) delete mask_image;
    
#ifdef USE_GLUT
  // Redraw
  glutPostRedisplay();
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x19f8, %rsp           # imm = 0x19F8
movb 0x1503e9(%rip), %al     # 0x179ad8
testb %al, %al
je 0x2aace
cmpl $-0x1, 0x14b2ae(%rip)   # 0x1749ac
jne 0x2970e
leaq 0x1503c1(%rip), %rdi    # 0x179ac8
xorl %esi, %esi
callq 0x23fd0
leaq 0x18(%rsp), %rdi
callq 0x930b4
movq %rsp, %rdi
callq 0x93b48
leaq 0x30(%rsp), %rdi
callq 0x93b48
movslq 0x14b27b(%rip), %rcx    # 0x1749ac
leal 0x1(%rcx), %eax
movl %eax, 0x14b272(%rip)    # 0x1749ac
movl 0x1501ac(%rip), %edx    # 0x1798ec
testl %edx, %edx
jle 0x297ae
cmpl %edx, %eax
jge 0x2aaff
movq 0x15018d(%rip), %rax    # 0x1798e0
movq 0x8(%rax,%rcx,8), %rbx
movl $0x1700, %edi           # imm = 0x1700
callq 0x23cc0
callq 0x23c50
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3b028
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x9341e
leaq 0x48(%rbx), %rsi
leaq 0x11f0(%rsp), %r14
movq %r14, %rdi
callq 0x94784
movq %rsp, %rdi
movq %r14, %rsi
callq 0x942d6
addq $0x30, %rbx
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
jmp 0x298bb
movl 0x1500a8(%rip), %ecx    # 0x17985c
testl %ecx, %ecx
jle 0x2aaff
cmpl %ecx, %eax
jge 0x2aaff
movq 0x150085(%rip), %rcx    # 0x179850
cltq
movq (%rcx,%rax,8), %rbx
cmpl $0x0, 0x28(%rbx)
jne 0x297ef
movq (%rbx), %rax
movq %rbx, %rdi
callq *0xf8(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x148(%rax)
movl $0x1701, %edi           # imm = 0x1701
callq 0x23cc0
callq 0x23c50
leaq 0x11f0(%rsp), %r14
movsd 0xdb812(%rip), %xmm0    # 0x105020
movsd 0xdb7fa(%rip), %xmm1    # 0x105010
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3320e
movq %r14, %rdi
callq 0x5d870
movl $0x1700, %edi           # imm = 0x1700
callq 0x23cc0
callq 0x23c50
leaq 0x30(%rbx), %rdi
callq 0x8d73a
movq %rax, %rdi
callq 0x5d870
addq $0x38, %rbx
leaq 0x1536bc(%rip), %rdx    # 0x17cf10
leaq 0x11f0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x91aae
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x9341e
leaq 0xdfb3d(%rip), %rdx     # 0x1093b8
leaq 0x11f0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x91a36
movq %rsp, %rdi
movq %r14, %rsi
callq 0x942d6
leaq 0xdfab8(%rip), %rdx     # 0x109358
leaq 0x11f0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x91a36
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x942d6
cmpl $0x0, 0x14ff95(%rip)    # 0x17985c
movslq 0x14b0de(%rip), %rdx    # 0x1749ac
jle 0x29940
movq 0x14ff79(%rip), %rax    # 0x179850
movq (%rax,%rdx,8), %rcx
movq 0x1e0(%rcx), %rax
testq %rax, %rax
jne 0x298ee
movq 0x1d8(%rcx), %rax
testq %rax, %rax
leaq 0xdbc06(%rip), %rsi     # 0x1054fe
cmovneq %rax, %rsi
leaq 0x11f0(%rsp), %r14
movl $0x7ff, %edx            # imm = 0x7FF
movq %r14, %rdi
callq 0x23420
movq %r14, %rdi
movl $0x2f, %esi
callq 0x239c0
leaq 0x1(%rax), %rbx
testq %rax, %rax
cmoveq %r14, %rbx
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x239c0
testq %rax, %rax
je 0x29959
movb $0x0, (%rax)
jmp 0x29959
leaq 0xdbd7c(%rip), %rsi     # 0x1056c3
leaq 0x11f0(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x23140
cmpb $0x1, 0x1500ec(%rip)    # 0x179a4c
jne 0x29982
leaq 0xdbd5f(%rip), %rdi     # 0x1056c8
movq %rbx, %rsi
xorl %eax, %eax
callq 0x23080
movq 0x14a586(%rip), %rax    # 0x173f00
movq (%rax), %rdi
callq 0x23ab0
xorl %r14d, %r14d
cmpb $0x1, 0x1500d0(%rip)    # 0x179a5c
jne 0x29b2f
cmpl $0x0, 0x14ff6b(%rip)    # 0x179904
je 0x29b2f
movslq 0x14b006(%rip), %rax    # 0x1749ac
movq 0x14fea3(%rip), %rcx    # 0x179850
movq (%rcx,%rax,8), %r14
movq (%r14), %rax
movq %r14, %rdi
callq *0x108(%rax)
testl %eax, %eax
jne 0x299d2
leaq 0xdbd14(%rip), %rdi     # 0x1056dc
movq %rbx, %rsi
xorl %eax, %eax
callq 0xb4e22
movq 0x18(%r14), %rax
movq 0x18(%rax), %rsi
leaq 0x50(%rsp), %rdi
callq 0x9d018
movq (%r14), %rax
movq %r14, %rdi
callq *0x158(%rax)
testl %eax, %eax
jne 0x29a05
leaq 0xdbd05(%rip), %rdi     # 0x105700
movq %rbx, %rsi
xorl %eax, %eax
callq 0xb4e22
leaq 0x50(%rsp), %rdi
movsd 0xdb636(%rip), %xmm1    # 0x105048
xorpd %xmm0, %xmm0
callq 0xa0e8c
leaq 0x50(%rsp), %rdi
callq 0x9de1c
movl 0x150035(%rip), %esi    # 0x179a60
movl 0x150033(%rip), %edx    # 0x179a64
leaq 0x120(%rsp), %rdi
callq 0x9c5bc
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
xorl %edi, %edi
callq 0x2abd5
leaq 0x120(%rsp), %rdi
callq 0x2b24d
movl $0xd0, %edi
callq 0x238d0
movq %rax, %r14
movl 0x14ffee(%rip), %esi    # 0x179a60
movl 0x14ffec(%rip), %edx    # 0x179a64
movq %rax, %rdi
callq 0x9c5bc
movl 0x14ffde(%rip), %edx    # 0x179a64
imull 0x14ffd3(%rip), %edx    # 0x179a60
testl %edx, %edx
movsd 0xdb5b1(%rip), %xmm5    # 0x105048
jle 0x29b18
movq 0x108(%rsp), %rax
movq 0x1d8(%rsp), %rcx
movl %edx, %edx
xorl %esi, %esi
xorpd %xmm0, %xmm0
movsd 0xdb5a7(%rip), %xmm1    # 0x105060
movsd 0xdb5a7(%rip), %xmm2    # 0x105068
movabsq $0x3ff0000000000000, %rdi # imm = 0x3FF0000000000000
movsd (%rax,%rsi,8), %xmm3
ucomisd %xmm5, %xmm3
jne 0x29ad8
jnp 0x29b10
ucomisd %xmm0, %xmm3
jne 0x29ae0
jnp 0x29b10
movsd (%rcx,%rsi,8), %xmm4
ucomisd %xmm5, %xmm4
jne 0x29aed
jnp 0x29b10
ucomisd %xmm0, %xmm4
jne 0x29af5
jnp 0x29b10
divsd %xmm4, %xmm3
ucomisd %xmm3, %xmm1
ja 0x29b10
ucomisd %xmm2, %xmm3
ja 0x29b10
movq 0xb8(%r14), %r8
movq %rdi, (%r8,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x29acb
leaq 0x120(%rsp), %rdi
callq 0x9d1f0
leaq 0x50(%rsp), %rdi
callq 0x9d1f0
movq 0x14ff0a(%rip), %rdx    # 0x179a40
leaq 0xdb9c9(%rip), %rsi     # 0x105506
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpb $0x1, 0x14ff42(%rip)    # 0x179a98
jne 0x29bfc
leaq 0x1f0(%rsp), %rdi
callq 0xb42d0
testl %eax, %eax
jne 0x29bfc
movl 0x14fee9(%rip), %esi    # 0x179a60
movl 0x14fee7(%rip), %edx    # 0x179a64
leaq 0x50(%rsp), %rdi
callq 0x9c5bc
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x2b459
leaq 0x50(%rsp), %rdi
callq 0x2b24d
movsd 0x14adfa(%rip), %xmm0   # 0x1749a0
leaq 0x50(%rsp), %rdi
callq 0xa0ff0
leaq 0x50(%rsp), %rdi
movsd 0xdb483(%rip), %xmm0    # 0x105040
movsd 0xdb473(%rip), %xmm1    # 0x105038
xorpd %xmm2, %xmm2
callq 0x9ebd2
testq %r14, %r14
je 0x29be0
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
leaq 0x50(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0xa57be
leaq 0x50(%rsp), %rdi
callq 0x9d1f0
movq 0x14fe3d(%rip), %rdx    # 0x179a40
leaq 0xdbb1d(%rip), %rsi     # 0x105727
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpb $0x1, 0x14fe71(%rip)    # 0x179a94
jne 0x29ca2
leaq 0x1f0(%rsp), %rdi
callq 0xb42d0
testl %eax, %eax
jne 0x29ca2
movl 0x14fe24(%rip), %esi    # 0x179a60
movl 0x14fe22(%rip), %edx    # 0x179a64
leaq 0x50(%rsp), %rdi
movl $0x3, %ecx
callq 0xacc16
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x2b459
leaq 0x50(%rsp), %rdi
callq 0xad6a0
movq 0x14fdd1(%rip), %rdx    # 0x179a40
leaq 0xdbab1(%rip), %rsi     # 0x105727
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xaea94
leaq 0x50(%rsp), %rdi
callq 0xace70
movq 0x14fd97(%rip), %rdx    # 0x179a40
leaq 0xdba87(%rip), %rsi     # 0x105737
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpb $0x1, 0x14fdd3(%rip)    # 0x179a9c
jne 0x29d56
leaq 0x1f0(%rsp), %rdi
callq 0xb42d0
testl %eax, %eax
jne 0x29d56
movl 0x14fd7a(%rip), %esi    # 0x179a60
movl 0x14fd78(%rip), %edx    # 0x179a64
leaq 0x50(%rsp), %rdi
movl $0x3, %ecx
callq 0xacc16
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x1, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0xad6a0
movq 0x14fd1d(%rip), %rdx    # 0x179a40
leaq 0xdba0d(%rip), %rsi     # 0x105737
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xaea94
leaq 0x50(%rsp), %rdi
callq 0xace70
movq 0x14fce3(%rip), %rdx    # 0x179a40
leaq 0xdb9e8(%rip), %rsi     # 0x10574c
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x14fb87(%rip)    # 0x179904
je 0x29e55
testb $0x1, 0x14fd16(%rip)    # 0x179aa0
je 0x29e55
leaq 0x1f0(%rsp), %rdi
callq 0xb42d0
testl %eax, %eax
jne 0x29e55
movl 0x14fcb5(%rip), %esi    # 0x179a60
movl 0x14fcb3(%rip), %edx    # 0x179a64
leaq 0x50(%rsp), %rdi
callq 0x9c5bc
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
xorl %edi, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b24d
movsd 0x14abbf(%rip), %xmm0   # 0x1749a0
leaq 0x50(%rsp), %rdi
callq 0xa0ff0
leaq 0x50(%rsp), %rdi
movsd 0xdb248(%rip), %xmm0    # 0x105040
movsd 0xdb238(%rip), %xmm1    # 0x105038
xorpd %xmm2, %xmm2
callq 0x9ebd2
testq %r14, %r14
je 0x29e1b
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14fc1e(%rip), %rdx    # 0x179a40
leaq 0xdb923(%rip), %rsi     # 0x10574c
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x50(%rsp), %rdi
callq 0x9d1f0
movq 0x14fbe4(%rip), %rdx    # 0x179a40
leaq 0xdb8fe(%rip), %rsi     # 0x105761
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x14fa88(%rip)    # 0x179904
je 0x29fed
testb $0x1, 0x14fc1b(%rip)    # 0x179aa4
je 0x29fed
leaq 0x1f0(%rsp), %rdi
callq 0xb42d0
testl %eax, %eax
jne 0x29fed
movl 0x14fbb6(%rip), %esi    # 0x179a60
movl 0x14fbb4(%rip), %edx    # 0x179a64
leaq 0x50(%rsp), %rdi
callq 0x9c5bc
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x6, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x29eed
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14fb4c(%rip), %rdx    # 0x179a40
leaq 0xdb878(%rip), %rsi     # 0x105773
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x7, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x29f50
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14fae9(%rip), %rdx    # 0x179a40
leaq 0xdb827(%rip), %rsi     # 0x105785
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x8, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x29fb3
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14fa86(%rip), %rdx    # 0x179a40
leaq 0xdb7a0(%rip), %rsi     # 0x105761
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x50(%rsp), %rdi
callq 0x9d1f0
movq 0x14fa4c(%rip), %rdx    # 0x179a40
leaq 0xdb79c(%rip), %rsi     # 0x105797
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x14f8f0(%rip)    # 0x179904
je 0x2a185
testb $0x1, 0x14fa87(%rip)    # 0x179aa8
je 0x2a185
leaq 0x1f0(%rsp), %rdi
callq 0xb42d0
testl %eax, %eax
jne 0x2a185
movl 0x14fa1e(%rip), %esi    # 0x179a60
movl 0x14fa1c(%rip), %edx    # 0x179a64
leaq 0x50(%rsp), %rdi
callq 0x9c5bc
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x9, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a085
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f9b4(%rip), %rdx    # 0x179a40
leaq 0xdb717(%rip), %rsi     # 0x1057aa
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0xa, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a0e8
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f951(%rip), %rdx    # 0x179a40
leaq 0xdb6c7(%rip), %rsi     # 0x1057bd
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0xb, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a14b
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f8ee(%rip), %rdx    # 0x179a40
leaq 0xdb63e(%rip), %rsi     # 0x105797
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x50(%rsp), %rdi
callq 0x9d1f0
movq 0x14f8b4(%rip), %rdx    # 0x179a40
leaq 0xdb63d(%rip), %rsi     # 0x1057d0
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x14f758(%rip)    # 0x179904
je 0x2a380
testb $0x1, 0x14f8f3(%rip)    # 0x179aac
je 0x2a380
leaq 0x1f0(%rsp), %rdi
callq 0xb42d0
testl %eax, %eax
jne 0x2a380
movl 0x14f886(%rip), %esi    # 0x179a60
movl 0x14f884(%rip), %edx    # 0x179a64
leaq 0x50(%rsp), %rdi
callq 0x9c5bc
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0xc, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a21d
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f81c(%rip), %rdx    # 0x179a40
leaq 0xdb5b7(%rip), %rsi     # 0x1057e2
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0xd, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a280
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f7b9(%rip), %rdx    # 0x179a40
leaq 0xdb566(%rip), %rsi     # 0x1057f4
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0xe, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a2e3
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f756(%rip), %rdx    # 0x179a40
leaq 0xdb515(%rip), %rsi     # 0x105806
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0xf, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a346
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f6f3(%rip), %rdx    # 0x179a40
leaq 0xdb47c(%rip), %rsi     # 0x1057d0
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x50(%rsp), %rdi
callq 0x9d1f0
movq 0x14f6b9(%rip), %rdx    # 0x179a40
leaq 0xdb48a(%rip), %rsi     # 0x105818
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x14f55d(%rip)    # 0x179904
je 0x2a57b
testb $0x1, 0x14f6fc(%rip)    # 0x179ab0
je 0x2a57b
leaq 0x1f0(%rsp), %rdi
callq 0xb42d0
testl %eax, %eax
jne 0x2a57b
movl 0x14f68b(%rip), %esi    # 0x179a60
movl 0x14f689(%rip), %edx    # 0x179a64
leaq 0x50(%rsp), %rdi
callq 0x9c5bc
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x10, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a418
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f621(%rip), %rdx    # 0x179a40
leaq 0xdb405(%rip), %rsi     # 0x10582b
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x11, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a47b
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f5be(%rip), %rdx    # 0x179a40
leaq 0xdb3b5(%rip), %rsi     # 0x10583e
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x12, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a4de
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f55b(%rip), %rdx    # 0x179a40
leaq 0xdb365(%rip), %rsi     # 0x105851
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x13, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a541
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f4f8(%rip), %rdx    # 0x179a40
leaq 0xdb2c9(%rip), %rsi     # 0x105818
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x50(%rsp), %rdi
callq 0x9d1f0
movq 0x14f4be(%rip), %rdx    # 0x179a40
leaq 0xdb2db(%rip), %rsi     # 0x105864
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x14f362(%rip)    # 0x179904
je 0x2a64d
testb $0x1, 0x14f505(%rip)    # 0x179ab4
je 0x2a64d
leaq 0x1f0(%rsp), %rdi
callq 0xb42d0
testl %eax, %eax
jne 0x2a64d
movl 0x14f490(%rip), %esi    # 0x179a60
movl 0x14f48e(%rip), %edx    # 0x179a64
leaq 0x50(%rsp), %rdi
callq 0x9c5bc
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x14, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a613
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f426(%rip), %rdx    # 0x179a40
leaq 0xdb243(%rip), %rsi     # 0x105864
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x50(%rsp), %rdi
callq 0x9d1f0
movq 0x14f3ec(%rip), %rdx    # 0x179a40
leaq 0xdb21e(%rip), %rsi     # 0x105879
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x14f290(%rip)    # 0x179904
je 0x2a71f
testb $0x1, 0x14f437(%rip)    # 0x179ab8
je 0x2a71f
leaq 0x1f0(%rsp), %rdi
callq 0xb42d0
testl %eax, %eax
jne 0x2a71f
movl 0x14f3be(%rip), %esi    # 0x179a60
movl 0x14f3bc(%rip), %edx    # 0x179a64
leaq 0x50(%rsp), %rdi
callq 0x9c5bc
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x2, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a6e5
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f354(%rip), %rdx    # 0x179a40
leaq 0xdb186(%rip), %rsi     # 0x105879
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x50(%rsp), %rdi
callq 0x9d1f0
movq 0x14f31a(%rip), %rdx    # 0x179a40
leaq 0xdb160(%rip), %rsi     # 0x10588d
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x14f1be(%rip)    # 0x179904
je 0x2a7f1
testb $0x1, 0x14f369(%rip)    # 0x179abc
je 0x2a7f1
leaq 0x1f0(%rsp), %rdi
callq 0xb42d0
testl %eax, %eax
jne 0x2a7f1
movl 0x14f2ec(%rip), %esi    # 0x179a60
movl 0x14f2ea(%rip), %edx    # 0x179a64
leaq 0x50(%rsp), %rdi
callq 0x9c5bc
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x3, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a7b7
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14f282(%rip), %rdx    # 0x179a40
leaq 0xdb0c8(%rip), %rsi     # 0x10588d
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x50(%rsp), %rdi
callq 0x9d1f0
movq 0x14f248(%rip), %rdx    # 0x179a40
leaq 0xdb0a6(%rip), %rsi     # 0x1058a5
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x14f0ec(%rip)    # 0x179904
je 0x2a9cb
testb $0x1, 0x14f29b(%rip)    # 0x179ac0
je 0x2a9cb
leaq 0x1f0(%rsp), %rdi
callq 0xb42d0
testl %eax, %eax
jne 0x2a9cb
movl 0x14f21a(%rip), %esi    # 0x179a60
movl 0x14f218(%rip), %edx    # 0x179a64
leaq 0x50(%rsp), %rdi
callq 0x9c5bc
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x2, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2a889
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movl 0x14f1d1(%rip), %esi    # 0x179a60
movl 0x14f1cf(%rip), %edx    # 0x179a64
leaq 0x120(%rsp), %rdi
movl $0x3, %ecx
callq 0xacc16
movl 0x14f1b3(%rip), %ecx    # 0x179a60
testl %ecx, %ecx
jle 0x2a99f
xorl %ebp, %ebp
movl 0x14f1a7(%rip), %eax    # 0x179a64
movsd 0xda783(%rip), %xmm1    # 0x105048
xorpd %xmm2, %xmm2
leaq 0x120(%rsp), %r15
leaq 0x4c(%rsp), %r12
testl %eax, %eax
jle 0x2a995
xorl %r13d, %r13d
movq 0x108(%rsp), %rcx
movl 0x118(%rsp), %edx
imull %r13d, %edx
addl %ebp, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
ucomisd %xmm1, %xmm0
jne 0x2a906
jnp 0x2a983
ucomisd %xmm2, %xmm0
jne 0x2a90e
jnp 0x2a983
addsd 0xda75a(%rip), %xmm0    # 0x105070
addsd 0xda6fa(%rip), %xmm0    # 0x105018
cvttsd2si %xmm0, %ecx
movq 0x14efef(%rip), %rdx    # 0x179918
movslq %ecx, %rcx
movq (%rdx,%rcx,8), %rcx
movl 0x9c(%rcx), %ecx
testl %ecx, %ecx
js 0x2a983
movl %ecx, %eax
imulq $0x431bde83, %rax, %rax # imm = 0x431BDE83
shrq $0x32, %rax
imull $0xf4240, %eax, %edx    # imm = 0xF4240
negl %edx
addl %edx, %ecx
incl %ecx
incb %al
movb %al, 0x4c(%rsp)
movb %ch, 0x4d(%rsp)
movb %cl, 0x4e(%rsp)
movq %r15, %rdi
movl %ebp, %esi
movl %r13d, %edx
movq %r12, %rcx
callq 0xad676
movl 0x14f0ed(%rip), %eax    # 0x179a64
movsd 0xda6c9(%rip), %xmm1    # 0x105048
xorpd %xmm2, %xmm2
incl %r13d
cmpl %eax, %r13d
jl 0x2a8e1
movl 0x14f0cb(%rip), %ecx    # 0x179a60
incl %ebp
cmpl %ecx, %ebp
jl 0x2a8d6
leaq 0x120(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0xaea94
leaq 0x120(%rsp), %rdi
callq 0xace70
leaq 0x50(%rsp), %rdi
callq 0x9d1f0
movq 0x14f06e(%rip), %rdx    # 0x179a40
leaq 0xdaee3(%rip), %rsi     # 0x1058bc
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x14ef12(%rip)    # 0x179904
je 0x2aa9d
testb $0x1, 0x14f0c5(%rip)    # 0x179ac4
je 0x2aa9d
leaq 0x1f0(%rsp), %rdi
callq 0xb42d0
testl %eax, %eax
jne 0x2aa9d
movl 0x14f040(%rip), %esi    # 0x179a60
movl 0x14f03e(%rip), %edx    # 0x179a64
leaq 0x50(%rsp), %rdi
callq 0x9c5bc
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x5, %edi
callq 0x2abd5
leaq 0x50(%rsp), %rdi
callq 0x2b7b4
testq %r14, %r14
je 0x2aa63
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa1184
movq 0x14efd6(%rip), %rdx    # 0x179a40
leaq 0xdae4b(%rip), %rsi     # 0x1058bc
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa57be
leaq 0x50(%rsp), %rdi
callq 0x9d1f0
testq %r14, %r14
je 0x2aab7
movq %r14, %rdi
callq 0x9d1f0
movl $0xd0, %esi
movq %r14, %rdi
callq 0x238f0
callq 0xf8390
addq $0x19f8, %rsp           # imm = 0x19F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x14f003(%rip), %rdi    # 0x179ad8
callq 0x24140
testl %eax, %eax
je 0x296f7
leaq 0x14efdf(%rip), %rdi    # 0x179ac8
callq 0xb1df0
leaq 0x14efe3(%rip), %rdi    # 0x179ad8
callq 0x235c0
jmp 0x296f7
cmpb $0x1, 0x14ef42(%rip)    # 0x179a48
jne 0x2ab45
leaq 0x14efb9(%rip), %rdi    # 0x179ac8
callq 0xb1e52
leaq 0xda903(%rip), %rdi     # 0x10541e
movb $0x1, %al
callq 0x23080
movl 0x149e84(%rip), %esi    # 0x1749ac
leaq 0xda906(%rip), %rdi     # 0x105435
xorl %eax, %eax
callq 0x23080
movq 0x1493c3(%rip), %rax    # 0x173f00
movq (%rax), %rdi
callq 0x23ab0
xorl %edi, %edi
callq 0x23b10
movq %rax, %rbx
leaq 0x14ef82(%rip), %rdi    # 0x179ad8
callq 0x235a0
jmp 0x2abcd
jmp 0x2abb3
jmp 0x2abae
jmp 0x2abae
movq %rax, %rbx
movl $0xd0, %esi
movq %r14, %rdi
callq 0x238f0
jmp 0x2ab97
jmp 0x2abae
jmp 0x2ab79
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xace70
jmp 0x2abcd
jmp 0x2abae
jmp 0x2abae
jmp 0x2abae
jmp 0x2abae
jmp 0x2abae
jmp 0x2abae
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0x9d1f0
jmp 0x2abc3
jmp 0x2abae
jmp 0x2abae
jmp 0x2abae
jmp 0x2abae
movq %rax, %rbx
jmp 0x2abc3
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0xace70
leaq 0x50(%rsp), %rdi
callq 0x9d1f0
movq %rbx, %rdi
callq 0x240d0