// File: /workspace/github_cpp_makefile_star2_O1/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 0x153341(%rip), %al     # 0x17cad8
testb %al, %al
je 0x2ab6f
cmpl $-0x1, 0x14e206(%rip)   # 0x1779ac
jne 0x297b6
leaq 0x153319(%rip), %rdi    # 0x17cac8
xorl %esi, %esi
callq 0x23fe0
leaq 0x18(%rsp), %rdi
callq 0x944b8
movq %rsp, %rdi
callq 0x94f50
leaq 0x30(%rsp), %rdi
callq 0x94f50
movslq 0x14e1d3(%rip), %rcx    # 0x1779ac
leal 0x1(%rcx), %eax
movl %eax, 0x14e1ca(%rip)    # 0x1779ac
movl 0x153104(%rip), %edx    # 0x17c8ec
testl %edx, %edx
jle 0x29856
cmpl %edx, %eax
jge 0x2aba0
movq 0x1530e5(%rip), %rax    # 0x17c8e0
movq 0x8(%rax,%rcx,8), %rbx
movl $0x1700, %edi           # imm = 0x1700
callq 0x23cd0
callq 0x23c60
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3b334
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x94828
leaq 0x48(%rbx), %rsi
leaq 0x11f0(%rsp), %r14
movq %r14, %rdi
callq 0x95be8
movq %rsp, %rdi
movq %r14, %rsi
callq 0x956fe
addq $0x30, %rbx
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
jmp 0x29963
movl 0x153000(%rip), %ecx    # 0x17c85c
testl %ecx, %ecx
jle 0x2aba0
cmpl %ecx, %eax
jge 0x2aba0
movq 0x152fdd(%rip), %rcx    # 0x17c850
cltq
movq (%rcx,%rax,8), %rbx
cmpl $0x0, 0x28(%rbx)
jne 0x29897
movq (%rbx), %rax
movq %rbx, %rdi
callq *0xf8(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x148(%rax)
movl $0x1701, %edi           # imm = 0x1701
callq 0x23cd0
callq 0x23c60
leaq 0x11f0(%rsp), %r14
movsd 0xde76a(%rip), %xmm0    # 0x108020
movsd 0xde752(%rip), %xmm1    # 0x108010
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3347c
movq %r14, %rdi
callq 0x5e31c
movl $0x1700, %edi           # imm = 0x1700
callq 0x23cd0
callq 0x23c60
leaq 0x30(%rbx), %rdi
callq 0x8ea96
movq %rax, %rdi
callq 0x5e31c
addq $0x38, %rbx
leaq 0x156614(%rip), %rdx    # 0x17ff10
leaq 0x11f0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x92eb2
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x94828
leaq 0xe2ab5(%rip), %rdx     # 0x10c3d8
leaq 0x11f0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x92e3a
movq %rsp, %rdi
movq %r14, %rsi
callq 0x956fe
leaq 0xe2a30(%rip), %rdx     # 0x10c378
leaq 0x11f0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x92e3a
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x956fe
cmpl $0x0, 0x152eed(%rip)    # 0x17c85c
movslq 0x14e036(%rip), %rdx    # 0x1779ac
jle 0x299e8
movq 0x152ed1(%rip), %rax    # 0x17c850
movq (%rax,%rdx,8), %rcx
movq 0x1e0(%rcx), %rax
testq %rax, %rax
jne 0x29996
movq 0x1d8(%rcx), %rax
testq %rax, %rax
leaq 0xdeb61(%rip), %rsi     # 0x108501
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 0x29a01
movb $0x0, (%rax)
jmp 0x29a01
leaq 0xdecd7(%rip), %rsi     # 0x1086c6
leaq 0x11f0(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x23140
cmpb $0x1, 0x153044(%rip)    # 0x17ca4c
jne 0x29a2a
leaq 0xdecba(%rip), %rdi     # 0x1086cb
movq %rbx, %rsi
xorl %eax, %eax
callq 0x23080
movq 0x14d4de(%rip), %rax    # 0x176f00
movq (%rax), %rdi
callq 0x23ac0
xorl %r14d, %r14d
cmpb $0x1, 0x153028(%rip)    # 0x17ca5c
jne 0x29bd7
cmpl $0x0, 0x152ec3(%rip)    # 0x17c904
je 0x29bd7
movslq 0x14df5e(%rip), %rax    # 0x1779ac
movq 0x152dfb(%rip), %rcx    # 0x17c850
movq (%rcx,%rax,8), %r14
movq (%r14), %rax
movq %r14, %rdi
callq *0x108(%rax)
testl %eax, %eax
jne 0x29a7a
leaq 0xdec6f(%rip), %rdi     # 0x1086df
movq %rbx, %rsi
xorl %eax, %eax
callq 0xb672e
movq 0x18(%r14), %rax
movq 0x18(%rax), %rsi
leaq 0x50(%rsp), %rdi
callq 0x9e560
movq (%r14), %rax
movq %r14, %rdi
callq *0x158(%rax)
testl %eax, %eax
jne 0x29aad
leaq 0xdec60(%rip), %rdi     # 0x108703
movq %rbx, %rsi
xorl %eax, %eax
callq 0xb672e
leaq 0x50(%rsp), %rdi
movsd 0xde58e(%rip), %xmm1    # 0x108048
xorpd %xmm0, %xmm0
callq 0xa249a
leaq 0x50(%rsp), %rdi
callq 0x9f350
movl 0x152f8d(%rip), %esi    # 0x17ca60
movl 0x152f8b(%rip), %edx    # 0x17ca64
leaq 0x120(%rsp), %rdi
callq 0x9db18
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
xorl %edi, %edi
callq 0x2ac76
leaq 0x120(%rsp), %rdi
callq 0x2b2ee
movl $0xd0, %edi
callq 0x238d0
movq %rax, %r14
movl 0x152f46(%rip), %esi    # 0x17ca60
movl 0x152f44(%rip), %edx    # 0x17ca64
movq %rax, %rdi
callq 0x9db18
movl 0x152f36(%rip), %edx    # 0x17ca64
imull 0x152f2b(%rip), %edx    # 0x17ca60
testl %edx, %edx
movsd 0xde509(%rip), %xmm5    # 0x108048
jle 0x29bc0
movq 0x108(%rsp), %rax
movq 0x1d8(%rsp), %rcx
movl %edx, %edx
xorl %esi, %esi
xorpd %xmm0, %xmm0
movsd 0xde4ff(%rip), %xmm1    # 0x108060
movsd 0xde4ff(%rip), %xmm2    # 0x108068
movabsq $0x3ff0000000000000, %rdi # imm = 0x3FF0000000000000
movsd (%rax,%rsi,8), %xmm3
ucomisd %xmm5, %xmm3
jne 0x29b80
jnp 0x29bb8
ucomisd %xmm0, %xmm3
jne 0x29b88
jnp 0x29bb8
movsd (%rcx,%rsi,8), %xmm4
ucomisd %xmm5, %xmm4
jne 0x29b95
jnp 0x29bb8
ucomisd %xmm0, %xmm4
jne 0x29b9d
jnp 0x29bb8
divsd %xmm4, %xmm3
ucomisd %xmm3, %xmm1
ja 0x29bb8
ucomisd %xmm2, %xmm3
ja 0x29bb8
movq 0xb8(%r14), %r8
movq %rdi, (%r8,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x29b73
leaq 0x120(%rsp), %rdi
callq 0x9e738
leaq 0x50(%rsp), %rdi
callq 0x9e738
movq 0x152e62(%rip), %rdx    # 0x17ca40
leaq 0xde924(%rip), %rsi     # 0x108509
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpb $0x1, 0x152e9a(%rip)    # 0x17ca98
jne 0x29ca4
leaq 0x1f0(%rsp), %rdi
callq 0xb5b38
testl %eax, %eax
jne 0x29ca4
movl 0x152e41(%rip), %esi    # 0x17ca60
movl 0x152e3f(%rip), %edx    # 0x17ca64
leaq 0x50(%rsp), %rdi
callq 0x9db18
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x2b4e6
leaq 0x50(%rsp), %rdi
callq 0x2b2ee
movsd 0x14dd52(%rip), %xmm0   # 0x1779a0
leaq 0x50(%rsp), %rdi
callq 0xa25fe
leaq 0x50(%rsp), %rdi
movsd 0xde3db(%rip), %xmm0    # 0x108040
movsd 0xde3cb(%rip), %xmm1    # 0x108038
xorpd %xmm2, %xmm2
callq 0xa014c
testq %r14, %r14
je 0x29c88
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
leaq 0x50(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0xa6e3e
leaq 0x50(%rsp), %rdi
callq 0x9e738
movq 0x152d95(%rip), %rdx    # 0x17ca40
leaq 0xdea78(%rip), %rsi     # 0x10872a
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpb $0x1, 0x152dc9(%rip)    # 0x17ca94
jne 0x29d4a
leaq 0x1f0(%rsp), %rdi
callq 0xb5b38
testl %eax, %eax
jne 0x29d4a
movl 0x152d7c(%rip), %esi    # 0x17ca60
movl 0x152d7a(%rip), %edx    # 0x17ca64
leaq 0x50(%rsp), %rdi
movl $0x3, %ecx
callq 0xae246
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x2b4e6
leaq 0x50(%rsp), %rdi
callq 0xaecd0
movq 0x152d29(%rip), %rdx    # 0x17ca40
leaq 0xdea0c(%rip), %rsi     # 0x10872a
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xb0080
leaq 0x50(%rsp), %rdi
callq 0xae4ae
movq 0x152cef(%rip), %rdx    # 0x17ca40
leaq 0xde9e2(%rip), %rsi     # 0x10873a
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpb $0x1, 0x152d2b(%rip)    # 0x17ca9c
jne 0x29dfe
leaq 0x1f0(%rsp), %rdi
callq 0xb5b38
testl %eax, %eax
jne 0x29dfe
movl 0x152cd2(%rip), %esi    # 0x17ca60
movl 0x152cd0(%rip), %edx    # 0x17ca64
leaq 0x50(%rsp), %rdi
movl $0x3, %ecx
callq 0xae246
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x1, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0xaecd0
movq 0x152c75(%rip), %rdx    # 0x17ca40
leaq 0xde968(%rip), %rsi     # 0x10873a
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xb0080
leaq 0x50(%rsp), %rdi
callq 0xae4ae
movq 0x152c3b(%rip), %rdx    # 0x17ca40
leaq 0xde943(%rip), %rsi     # 0x10874f
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x152adf(%rip)    # 0x17c904
je 0x29efd
testb $0x1, 0x152c6e(%rip)    # 0x17caa0
je 0x29efd
leaq 0x1f0(%rsp), %rdi
callq 0xb5b38
testl %eax, %eax
jne 0x29efd
movl 0x152c0d(%rip), %esi    # 0x17ca60
movl 0x152c0b(%rip), %edx    # 0x17ca64
leaq 0x50(%rsp), %rdi
callq 0x9db18
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
xorl %edi, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b2ee
movsd 0x14db17(%rip), %xmm0   # 0x1779a0
leaq 0x50(%rsp), %rdi
callq 0xa25fe
leaq 0x50(%rsp), %rdi
movsd 0xde1a0(%rip), %xmm0    # 0x108040
movsd 0xde190(%rip), %xmm1    # 0x108038
xorpd %xmm2, %xmm2
callq 0xa014c
testq %r14, %r14
je 0x29ec3
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x152b76(%rip), %rdx    # 0x17ca40
leaq 0xde87e(%rip), %rsi     # 0x10874f
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x50(%rsp), %rdi
callq 0x9e738
movq 0x152b3c(%rip), %rdx    # 0x17ca40
leaq 0xde859(%rip), %rsi     # 0x108764
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x1529e0(%rip)    # 0x17c904
je 0x2a095
testb $0x1, 0x152b73(%rip)    # 0x17caa4
je 0x2a095
leaq 0x1f0(%rsp), %rdi
callq 0xb5b38
testl %eax, %eax
jne 0x2a095
movl 0x152b0e(%rip), %esi    # 0x17ca60
movl 0x152b0c(%rip), %edx    # 0x17ca64
leaq 0x50(%rsp), %rdi
callq 0x9db18
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x6, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x29f95
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x152aa4(%rip), %rdx    # 0x17ca40
leaq 0xde7d3(%rip), %rsi     # 0x108776
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x7, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x29ff8
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x152a41(%rip), %rdx    # 0x17ca40
leaq 0xde782(%rip), %rsi     # 0x108788
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x8, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a05b
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x1529de(%rip), %rdx    # 0x17ca40
leaq 0xde6fb(%rip), %rsi     # 0x108764
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x50(%rsp), %rdi
callq 0x9e738
movq 0x1529a4(%rip), %rdx    # 0x17ca40
leaq 0xde6f7(%rip), %rsi     # 0x10879a
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x152848(%rip)    # 0x17c904
je 0x2a22d
testb $0x1, 0x1529df(%rip)    # 0x17caa8
je 0x2a22d
leaq 0x1f0(%rsp), %rdi
callq 0xb5b38
testl %eax, %eax
jne 0x2a22d
movl 0x152976(%rip), %esi    # 0x17ca60
movl 0x152974(%rip), %edx    # 0x17ca64
leaq 0x50(%rsp), %rdi
callq 0x9db18
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x9, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a12d
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x15290c(%rip), %rdx    # 0x17ca40
leaq 0xde672(%rip), %rsi     # 0x1087ad
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0xa, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a190
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x1528a9(%rip), %rdx    # 0x17ca40
leaq 0xde622(%rip), %rsi     # 0x1087c0
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0xb, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a1f3
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x152846(%rip), %rdx    # 0x17ca40
leaq 0xde599(%rip), %rsi     # 0x10879a
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x50(%rsp), %rdi
callq 0x9e738
movq 0x15280c(%rip), %rdx    # 0x17ca40
leaq 0xde598(%rip), %rsi     # 0x1087d3
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x1526b0(%rip)    # 0x17c904
je 0x2a428
testb $0x1, 0x15284b(%rip)    # 0x17caac
je 0x2a428
leaq 0x1f0(%rsp), %rdi
callq 0xb5b38
testl %eax, %eax
jne 0x2a428
movl 0x1527de(%rip), %esi    # 0x17ca60
movl 0x1527dc(%rip), %edx    # 0x17ca64
leaq 0x50(%rsp), %rdi
callq 0x9db18
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0xc, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a2c5
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x152774(%rip), %rdx    # 0x17ca40
leaq 0xde512(%rip), %rsi     # 0x1087e5
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0xd, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a328
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x152711(%rip), %rdx    # 0x17ca40
leaq 0xde4c1(%rip), %rsi     # 0x1087f7
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0xe, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a38b
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x1526ae(%rip), %rdx    # 0x17ca40
leaq 0xde470(%rip), %rsi     # 0x108809
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0xf, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a3ee
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x15264b(%rip), %rdx    # 0x17ca40
leaq 0xde3d7(%rip), %rsi     # 0x1087d3
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x50(%rsp), %rdi
callq 0x9e738
movq 0x152611(%rip), %rdx    # 0x17ca40
leaq 0xde3e5(%rip), %rsi     # 0x10881b
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x1524b5(%rip)    # 0x17c904
je 0x2a623
testb $0x1, 0x152654(%rip)    # 0x17cab0
je 0x2a623
leaq 0x1f0(%rsp), %rdi
callq 0xb5b38
testl %eax, %eax
jne 0x2a623
movl 0x1525e3(%rip), %esi    # 0x17ca60
movl 0x1525e1(%rip), %edx    # 0x17ca64
leaq 0x50(%rsp), %rdi
callq 0x9db18
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x10, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a4c0
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x152579(%rip), %rdx    # 0x17ca40
leaq 0xde360(%rip), %rsi     # 0x10882e
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x11, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a523
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x152516(%rip), %rdx    # 0x17ca40
leaq 0xde310(%rip), %rsi     # 0x108841
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x12, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a586
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x1524b3(%rip), %rdx    # 0x17ca40
leaq 0xde2c0(%rip), %rsi     # 0x108854
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x13, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a5e9
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x152450(%rip), %rdx    # 0x17ca40
leaq 0xde224(%rip), %rsi     # 0x10881b
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x50(%rsp), %rdi
callq 0x9e738
movq 0x152416(%rip), %rdx    # 0x17ca40
leaq 0xde236(%rip), %rsi     # 0x108867
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x1522ba(%rip)    # 0x17c904
je 0x2a6f5
testb $0x1, 0x15245d(%rip)    # 0x17cab4
je 0x2a6f5
leaq 0x1f0(%rsp), %rdi
callq 0xb5b38
testl %eax, %eax
jne 0x2a6f5
movl 0x1523e8(%rip), %esi    # 0x17ca60
movl 0x1523e6(%rip), %edx    # 0x17ca64
leaq 0x50(%rsp), %rdi
callq 0x9db18
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x14, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a6bb
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x15237e(%rip), %rdx    # 0x17ca40
leaq 0xde19e(%rip), %rsi     # 0x108867
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x50(%rsp), %rdi
callq 0x9e738
movq 0x152344(%rip), %rdx    # 0x17ca40
leaq 0xde179(%rip), %rsi     # 0x10887c
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x1521e8(%rip)    # 0x17c904
je 0x2a7c7
testb $0x1, 0x15238f(%rip)    # 0x17cab8
je 0x2a7c7
leaq 0x1f0(%rsp), %rdi
callq 0xb5b38
testl %eax, %eax
jne 0x2a7c7
movl 0x152316(%rip), %esi    # 0x17ca60
movl 0x152314(%rip), %edx    # 0x17ca64
leaq 0x50(%rsp), %rdi
callq 0x9db18
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x2, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a78d
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x1522ac(%rip), %rdx    # 0x17ca40
leaq 0xde0e1(%rip), %rsi     # 0x10887c
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x50(%rsp), %rdi
callq 0x9e738
movq 0x152272(%rip), %rdx    # 0x17ca40
leaq 0xde0bb(%rip), %rsi     # 0x108890
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x152116(%rip)    # 0x17c904
je 0x2a899
testb $0x1, 0x1522c1(%rip)    # 0x17cabc
je 0x2a899
leaq 0x1f0(%rsp), %rdi
callq 0xb5b38
testl %eax, %eax
jne 0x2a899
movl 0x152244(%rip), %esi    # 0x17ca60
movl 0x152242(%rip), %edx    # 0x17ca64
leaq 0x50(%rsp), %rdi
callq 0x9db18
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x3, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a85f
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x1521da(%rip), %rdx    # 0x17ca40
leaq 0xde023(%rip), %rsi     # 0x108890
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x50(%rsp), %rdi
callq 0x9e738
movq 0x1521a0(%rip), %rdx    # 0x17ca40
leaq 0xde001(%rip), %rsi     # 0x1088a8
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x152044(%rip)    # 0x17c904
je 0x2aa6c
testb $0x1, 0x1521f3(%rip)    # 0x17cac0
je 0x2aa6c
leaq 0x1f0(%rsp), %rdi
callq 0xb5b38
testl %eax, %eax
jne 0x2aa6c
movl 0x152172(%rip), %esi    # 0x17ca60
movl 0x152170(%rip), %edx    # 0x17ca64
leaq 0x50(%rsp), %rdi
callq 0x9db18
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x2, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2a931
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movl 0x152129(%rip), %esi    # 0x17ca60
movl 0x152127(%rip), %edx    # 0x17ca64
leaq 0x120(%rsp), %rdi
movl $0x3, %ecx
callq 0xae246
cmpl $0x0, 0x15210a(%rip)    # 0x17ca60
jle 0x2aa40
xorl %ebp, %ebp
movsd 0xdd6e2(%rip), %xmm1    # 0x108048
xorpd %xmm2, %xmm2
leaq 0x120(%rsp), %r15
leaq 0x4c(%rsp), %r12
cmpl $0x0, 0x1520e6(%rip)    # 0x17ca64
jle 0x2aa32
xorl %r13d, %r13d
movq 0x108(%rsp), %rax
movl 0x118(%rsp), %ecx
imull %r13d, %ecx
addl %ebp, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jne 0x2a9ac
jnp 0x2aa22
ucomisd %xmm2, %xmm0
jne 0x2a9b4
jnp 0x2aa22
addsd 0xdd6b4(%rip), %xmm0    # 0x108070
addsd 0xdd654(%rip), %xmm0    # 0x108018
cvttsd2si %xmm0, %eax
movq 0x151f49(%rip), %rcx    # 0x17c918
cltq
movq (%rcx,%rax,8), %rax
movl 0x9c(%rax), %eax
testl %eax, %eax
js 0x2aa22
movl %eax, %ecx
imulq $0x431bde83, %rcx, %rcx # imm = 0x431BDE83
shrq $0x32, %rcx
imull $0xf4240, %ecx, %edx    # imm = 0xF4240
negl %edx
addl %edx, %eax
incl %eax
incb %cl
movb %cl, 0x4c(%rsp)
movb %ah, 0x4d(%rsp)
movb %al, 0x4e(%rsp)
movq %r15, %rdi
movl %ebp, %esi
movl %r13d, %edx
movq %r12, %rcx
callq 0xaeca6
movsd 0xdd62a(%rip), %xmm1    # 0x108048
xorpd %xmm2, %xmm2
incl %r13d
cmpl 0x152038(%rip), %r13d   # 0x17ca64
jl 0x2a987
incl %ebp
cmpl 0x152026(%rip), %ebp    # 0x17ca60
jl 0x2a977
leaq 0x120(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0xb0080
leaq 0x120(%rsp), %rdi
callq 0xae4ae
leaq 0x50(%rsp), %rdi
callq 0x9e738
movq 0x151fcd(%rip), %rdx    # 0x17ca40
leaq 0xdde45(%rip), %rsi     # 0x1088bf
leaq 0x1f0(%rsp), %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
cmpl $0x0, 0x151e71(%rip)    # 0x17c904
je 0x2ab3e
testb $0x1, 0x152024(%rip)    # 0x17cac4
je 0x2ab3e
leaq 0x1f0(%rsp), %rdi
callq 0xb5b38
testl %eax, %eax
jne 0x2ab3e
movl 0x151f9f(%rip), %esi    # 0x17ca60
movl 0x151f9d(%rip), %edx    # 0x17ca64
leaq 0x50(%rsp), %rdi
callq 0x9db18
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x30(%rsp), %rcx
movl $0x5, %edi
callq 0x2ac76
leaq 0x50(%rsp), %rdi
callq 0x2b83c
testq %r14, %r14
je 0x2ab04
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0xa2790
movq 0x151f35(%rip), %rdx    # 0x17ca40
leaq 0xdddad(%rip), %rsi     # 0x1088bf
leaq 0x1f0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x23140
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0xa6e3e
leaq 0x50(%rsp), %rdi
callq 0x9e738
testq %r14, %r14
je 0x2ab58
movq %r14, %rdi
callq 0x9e738
movl $0xd0, %esi
movq %r14, %rdi
callq 0x238f0
callq 0xfa6e4
addq $0x19f8, %rsp           # imm = 0x19F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x151f62(%rip), %rdi    # 0x17cad8
callq 0x24150
testl %eax, %eax
je 0x2979f
leaq 0x151f3e(%rip), %rdi    # 0x17cac8
callq 0xb33f0
leaq 0x151f42(%rip), %rdi    # 0x17cad8
callq 0x235c0
jmp 0x2979f
cmpb $0x1, 0x151ea1(%rip)    # 0x17ca48
jne 0x2abe6
leaq 0x151f18(%rip), %rdi    # 0x17cac8
callq 0xb3452
leaq 0xdd865(%rip), %rdi     # 0x108421
movb $0x1, %al
callq 0x23080
movl 0x14cde3(%rip), %esi    # 0x1779ac
leaq 0xdd868(%rip), %rdi     # 0x108438
xorl %eax, %eax
callq 0x23080
movq 0x14c322(%rip), %rax    # 0x176f00
movq (%rax), %rdi
callq 0x23ac0
xorl %edi, %edi
callq 0x23b20
movq %rax, %rbx
leaq 0x151ee1(%rip), %rdi    # 0x17cad8
callq 0x235a0
jmp 0x2ac6e
jmp 0x2ac54
jmp 0x2ac4f
jmp 0x2ac4f
movq %rax, %rbx
movl $0xd0, %esi
movq %r14, %rdi
callq 0x238f0
jmp 0x2ac38
jmp 0x2ac4f
jmp 0x2ac1a
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xae4ae
jmp 0x2ac6e
jmp 0x2ac4f
jmp 0x2ac4f
jmp 0x2ac4f
jmp 0x2ac4f
jmp 0x2ac4f
jmp 0x2ac4f
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0x9e738
jmp 0x2ac64
jmp 0x2ac4f
jmp 0x2ac4f
jmp 0x2ac4f
jmp 0x2ac4f
movq %rax, %rbx
jmp 0x2ac64
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0xae4ae
leaq 0x50(%rsp), %rdi
callq 0x9e738
movq %rbx, %rdi
callq 0x240e0