// File: tomfunkhouser[P]gaps/apps/conf2sfl/conf2sfl.cpp
// Function: LoadSurfels(gaps::R3SurfelScene*, gaps::RGBDImage*)
static int
LoadSurfels(R3SurfelScene *scene, RGBDImage *image)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();
  if (print_verbose) {
    printf("  Processing %s\n", image->Name());
    fflush(stdout);
  }

  // Get useful variables
  R3Point viewpoint = image->WorldViewpoint();
  R3Vector towards = image->WorldTowards();
  R3Vector up = image->WorldUp();
  R3Matrix intrinsics = image->Intrinsics();
  R4Matrix camera_to_world = image->CameraToWorld().Matrix();
  const char *scan_name = image->Name();
  
  // Print timing message
  RNTime step_time;
  if (print_debug) {
    printf("    A\n");
    fflush(stdout);
    step_time.Read();
  }

  // Get color and depth channels
  R2Grid *red_channel = image->RedChannel();
  R2Grid *green_channel = image->GreenChannel();
  R2Grid *blue_channel = image->BlueChannel();
  R2Grid *depth_channel = image->DepthChannel();
  if (!red_channel || !green_channel || !blue_channel || !depth_channel) {
    RNFail("Unable to read color/depth channels for image %s\n", image->Name());
    return 0;
  }

  // Resample images
  R2Grid depth_image(*depth_channel);
  R2Image color_image(*red_channel, *green_channel, *blue_channel);
  if ((max_image_resolution > 0) && (max_image_resolution != image->NPixels(RN_X))) {
    R3Matrix tmp = intrinsics;
    int xresolution = max_image_resolution;
    int yresolution = (int) (image->NPixels(RN_Y) * xresolution / (double) image->NPixels(RN_X) + 0.5);
    if (!RGBDResampleDepthImage(depth_image, intrinsics, xresolution, yresolution)) return 0;
    if (!RGBDResampleColorImage(color_image, tmp, xresolution, yresolution)) return 0;
  }
  
  // Print timing message
  if (print_debug) {
    printf("    B %g %d %d %g\n", step_time.Elapsed(), depth_image.XResolution(), depth_image.YResolution(), depth_image.Mean());
    fflush(stdout);
    step_time.Read();
  }

  // Create boundary image
  R2Grid boundary_image;
  if (!RGBDCreateBoundaryChannel(depth_image, boundary_image)) return 0;

  // Print timing message
  if (print_debug) {
    printf("    E %g\n", step_time.Elapsed());
    fflush(stdout);
    step_time.Read();
  }

  // Create position images
  R2Grid px_image, py_image, pz_image;
  if (!RGBDCreatePositionChannels(depth_image, px_image, py_image, pz_image, intrinsics, camera_to_world)) return 0;

  // Print timing message
  if (print_debug) {
    printf("    F %g\n", step_time.Elapsed());
    fflush(stdout);
    step_time.Read();
  }

  // Create normal, tangent, and radius images
  R2Grid nx_image, ny_image, nz_image;
  R2Grid tx_image, ty_image, tz_image;
  R2Grid r1_image, r2_image;
  if (!RGBDCreateTangentChannels(depth_image, 
    px_image, py_image, pz_image, boundary_image, 
    nx_image, ny_image, nz_image,
    tx_image, ty_image, tz_image,
    r1_image, r2_image,
    viewpoint, towards, up)) return 0;
  
  // Print timing message
  if (print_debug) {
    printf("    G %g\n", step_time.Elapsed());
    fflush(stdout);
    step_time.Read();
  }

  // Create segmentation
  R3Segmentation *segmentation = NULL;
  if (create_planar_segments) {
    segmentation = CreateSegmentation(px_image, py_image, pz_image,
      nx_image, ny_image, nz_image, tx_image, ty_image, tz_image,
      depth_image, r1_image, r2_image, boundary_image, color_image, 
      viewpoint, towards, up);
  }

  // Print timing message
  if (print_debug) {
    printf("    H %g\n", step_time.Elapsed());
    fflush(stdout);
    step_time.Read();
  }

  // Load surfels
  if (scene) {
    if (segmentation) {
      // Load surfels with segmentation
      LoadSurfels(scene, scan_name, segmentation, depth_image, 
        viewpoint, towards, up, intrinsics);
    }
    else {
      // Load surfels without segmentation
      LoadSurfels(scene, scan_name, segmentation, depth_image, 
        px_image, py_image, pz_image, nx_image, ny_image, nz_image,
        tx_image, ty_image, tz_image, r1_image, r2_image, boundary_image, color_image, 
        viewpoint, towards, up, intrinsics);
    }
  }

  // Print timing message
  if (print_debug) {
    printf("    J %g\n", step_time.Elapsed());
    fflush(stdout);
    step_time.Read();
  }

  // Delete segmentation
  if (segmentation) delete segmentation;
  
  // Print statistics
  if (print_debug) {
    printf("    Total = %.2f\n", start_time.Elapsed());
    fflush(stdout);
  }

  // Return success
  return 1;
}

// Assembly:
subq $0xda8, %rsp            # imm = 0xDA8
movq %rdi, 0xd98(%rsp)
movq %rsi, 0xd90(%rsp)
leaq 0xd80(%rsp), %rdi
callq 0x172a30
leaq 0xd80(%rsp), %rdi
callq 0x1ec90
cmpl $0x0, 0x24dbd4(%rip)    # 0x26881c
je 0x1ac77
movq 0xd90(%rsp), %rdi
callq 0x1eff0
movq %rax, %rsi
leaq 0x1e2708(%rip), %rdi    # 0x1fd369
movb $0x0, %al
callq 0x16090
movq 0x244321(%rip), %rax    # 0x25ef90
movq (%rax), %rdi
callq 0x168c0
movq 0xd90(%rsp), %rsi
leaq 0xd68(%rsp), %rdi
callq 0x1ef20
movq 0xd90(%rsp), %rsi
leaq 0xd50(%rsp), %rdi
callq 0x1f010
movq 0xd90(%rsp), %rsi
leaq 0xd38(%rsp), %rdi
callq 0x1f060
movq 0xd90(%rsp), %rdi
callq 0x1f0b0
movq %rax, %rsi
leaq 0xcf0(%rsp), %rdi
callq 0x164400
movq 0xd90(%rsp), %rdi
callq 0x1f0d0
movq %rax, %rdi
callq 0x1efe0
movq %rax, %rsi
leaq 0xc70(%rsp), %rdi
callq 0x10b690
movq 0xd90(%rsp), %rdi
callq 0x1eff0
movq %rax, 0xc68(%rsp)
leaq 0xc58(%rsp), %rdi
callq 0x172a30
cmpl $0x0, 0x24daff(%rip)    # 0x268820
je 0x1ad4d
leaq 0x1e2650(%rip), %rdi    # 0x1fd37a
movb $0x0, %al
callq 0x16090
movq 0x244258(%rip), %rax    # 0x25ef90
movq (%rax), %rdi
callq 0x168c0
leaq 0xc58(%rsp), %rdi
callq 0x1ec90
movq 0xd90(%rsp), %rdi
callq 0x1f0e0
movq %rax, 0xc50(%rsp)
movq 0xd90(%rsp), %rdi
callq 0x1f100
movq %rax, 0xc48(%rsp)
movq 0xd90(%rsp), %rdi
callq 0x1f120
movq %rax, 0xc40(%rsp)
movq 0xd90(%rsp), %rdi
callq 0x1f140
movq %rax, 0xc38(%rsp)
cmpq $0x0, 0xc50(%rsp)
je 0x1adcd
cmpq $0x0, 0xc48(%rsp)
je 0x1adcd
cmpq $0x0, 0xc40(%rsp)
je 0x1adcd
cmpq $0x0, 0xc38(%rsp)
jne 0x1adfb
movq 0xd90(%rsp), %rdi
callq 0x1eff0
movq %rax, %rsi
leaq 0x1e259d(%rip), %rdi    # 0x1fd381
movb $0x0, %al
callq 0x1779b0
movl $0x0, 0xda4(%rsp)
jmp 0x1baa9
movq 0xc38(%rsp), %rsi
leaq 0xb68(%rsp), %rdi
callq 0x145920
movq 0xc50(%rsp), %rsi
movq 0xc48(%rsp), %rdx
movq 0xc40(%rsp), %rcx
leaq 0xb50(%rsp), %rdi
callq 0x169e40
jmp 0x1ae37
cmpl $0x0, 0x24d9ea(%rip)    # 0x268828
jle 0x1affd
movl 0x24d9de(%rip), %eax    # 0x268828
movl %eax, 0x118(%rsp)
movq 0xd90(%rsp), %rdi
xorl %esi, %esi
callq 0x1f160
movl %eax, 0x11c(%rsp)
jmp 0x1ae69
movl 0x118(%rsp), %eax
movl 0x11c(%rsp), %ecx
cmpl %ecx, %eax
je 0x1affd
leaq 0xaf8(%rsp), %rdi
leaq 0xcf0(%rsp), %rsi
callq 0x164400
jmp 0x1ae96
movl 0x24d98c(%rip), %eax    # 0x268828
movl %eax, 0xaf4(%rsp)
movq 0xd90(%rsp), %rdi
movl $0x1, %esi
callq 0x1f160
movl %eax, 0x114(%rsp)
jmp 0x1aebe
movl 0x114(%rsp), %eax
movl 0xaf4(%rsp), %ecx
imull %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x108(%rsp)
movq 0xd90(%rsp), %rdi
xorl %esi, %esi
callq 0x1f160
movl %eax, 0x110(%rsp)
jmp 0x1aef4
movsd 0x108(%rsp), %xmm0
movl 0x110(%rsp), %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd 0x1e211c(%rip), %xmm1   # 0x1fd030
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0xaf0(%rsp)
movl 0xaf4(%rsp), %edx
movl 0xaf0(%rsp), %ecx
leaq 0xb68(%rsp), %rdi
leaq 0xcf0(%rsp), %rsi
callq 0x3a570
movl %eax, 0x104(%rsp)
jmp 0x1af4f
movl 0x104(%rsp), %eax
cmpl $0x0, %eax
jne 0x1afa8
movl $0x0, 0xda4(%rsp)
movl $0x1, 0xaec(%rsp)
jmp 0x1ba71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
jmp 0x1ba9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
jmp 0x1ba8d
movl 0xaf4(%rsp), %edx
movl 0xaf0(%rsp), %ecx
leaq 0xb50(%rsp), %rdi
leaq 0xaf8(%rsp), %rsi
callq 0x3acb0
movl %eax, 0x100(%rsp)
jmp 0x1afd4
movl 0x100(%rsp), %eax
cmpl $0x0, %eax
jne 0x1affb
movl $0x0, 0xda4(%rsp)
movl $0x1, 0xaec(%rsp)
jmp 0x1ba71
jmp 0x1affd
cmpl $0x0, 0x24d81c(%rip)    # 0x268820
je 0x1b0b4
leaq 0xc58(%rsp), %rdi
callq 0x172af0
movsd %xmm0, 0xf8(%rsp)
jmp 0x1b022
leaq 0xb68(%rsp), %rdi
callq 0x1f1a0
movl %eax, 0xf4(%rsp)
jmp 0x1b038
leaq 0xb68(%rsp), %rdi
callq 0x1f1c0
movl %eax, 0xf0(%rsp)
jmp 0x1b04e
leaq 0xb68(%rsp), %rdi
callq 0x146100
movsd %xmm0, 0xe8(%rsp)
jmp 0x1b066
movsd 0xe8(%rsp), %xmm1
movl 0xf0(%rsp), %edx
movl 0xf4(%rsp), %esi
movsd 0xf8(%rsp), %xmm0
leaq 0x1e2326(%rip), %rdi    # 0x1fd3b3
movb $0x2, %al
callq 0x16090
jmp 0x1b096
movq 0x243ef3(%rip), %rax    # 0x25ef90
movq (%rax), %rdi
callq 0x168c0
jmp 0x1b0a7
leaq 0xc58(%rsp), %rdi
callq 0x1ec90
leaq 0xa18(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x144760
jmp 0x1b0c7
leaq 0xb68(%rsp), %rdi
leaq 0xa18(%rsp), %rsi
movsd 0x1e1f59(%rip), %xmm0   # 0x1fd038
callq 0x36f60
movl %eax, 0xe4(%rsp)
jmp 0x1b0ed
movl 0xe4(%rsp), %eax
cmpl $0x0, %eax
jne 0x1b12d
movl $0x0, 0xda4(%rsp)
movl $0x1, 0xaec(%rsp)
jmp 0x1ba53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
jmp 0x1ba62
cmpl $0x0, 0x24d6ec(%rip)    # 0x268820
je 0x1b185
leaq 0xc58(%rsp), %rdi
callq 0x172af0
movsd %xmm0, 0xd8(%rsp)
jmp 0x1b14e
movsd 0xd8(%rsp), %xmm0
leaq 0x1e2268(%rip), %rdi    # 0x1fd3c6
movb $0x1, %al
callq 0x16090
jmp 0x1b167
movq 0x243e22(%rip), %rax    # 0x25ef90
movq (%rax), %rdi
callq 0x168c0
jmp 0x1b178
leaq 0xc58(%rsp), %rdi
callq 0x1ec90
leaq 0x948(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x144760
jmp 0x1b198
leaq 0x878(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x144760
jmp 0x1b1ab
leaq 0x7a8(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x144760
jmp 0x1b1be
leaq 0xb68(%rsp), %rdi
leaq 0x948(%rsp), %rsi
leaq 0x878(%rsp), %rdx
leaq 0x7a8(%rsp), %rcx
leaq 0xcf0(%rsp), %r8
leaq 0xc70(%rsp), %r9
callq 0x36570
movl %eax, 0xd4(%rsp)
jmp 0x1b1fc
movl 0xd4(%rsp), %eax
cmpl $0x0, %eax
jne 0x1b26e
movl $0x0, 0xda4(%rsp)
movl $0x1, 0xaec(%rsp)
jmp 0x1ba01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
jmp 0x1ba44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
jmp 0x1ba37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
jmp 0x1ba2a
cmpl $0x0, 0x24d5ab(%rip)    # 0x268820
je 0x1b2c6
leaq 0xc58(%rsp), %rdi
callq 0x172af0
movsd %xmm0, 0xc8(%rsp)
jmp 0x1b28f
movsd 0xc8(%rsp), %xmm0
leaq 0x1e2131(%rip), %rdi    # 0x1fd3d0
movb $0x1, %al
callq 0x16090
jmp 0x1b2a8
movq 0x243ce1(%rip), %rax    # 0x25ef90
movq (%rax), %rdi
callq 0x168c0
jmp 0x1b2b9
leaq 0xc58(%rsp), %rdi
callq 0x1ec90
leaq 0x6d8(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x144760
jmp 0x1b2d9
leaq 0x608(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x144760
jmp 0x1b2ec
leaq 0x538(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x144760
jmp 0x1b2ff
leaq 0x468(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x144760
jmp 0x1b312
leaq 0x398(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x144760
jmp 0x1b325
leaq 0x2c8(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x144760
jmp 0x1b338
leaq 0x1f8(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x144760
jmp 0x1b34b
leaq 0x128(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x144760
jmp 0x1b35e
movq %rsp, %rax
movq %rax, 0xb8(%rsp)
leaq 0xd38(%rsp), %rcx
movq %rcx, 0x48(%rax)
leaq 0xd50(%rsp), %rcx
movq %rcx, 0x40(%rax)
leaq 0xd68(%rsp), %rcx
movq %rcx, 0x38(%rax)
leaq 0x128(%rsp), %rcx
movq %rcx, 0x30(%rax)
leaq 0x1f8(%rsp), %rcx
movq %rcx, 0x28(%rax)
leaq 0x2c8(%rsp), %rcx
movq %rcx, 0x20(%rax)
leaq 0x398(%rsp), %rcx
movq %rcx, 0x18(%rax)
leaq 0x468(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x538(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x608(%rsp), %rcx
movq %rcx, (%rax)
movl $0x1, 0x58(%rax)
movl $0x2, 0x50(%rax)
leaq 0xb68(%rsp), %rdi
leaq 0x948(%rsp), %rsi
leaq 0x878(%rsp), %rdx
leaq 0x7a8(%rsp), %rcx
leaq 0xa18(%rsp), %r8
leaq 0x6d8(%rsp), %r9
movsd 0x1e1c12(%rip), %xmm0   # 0x1fd038
callq 0x37930
movl %eax, 0xc4(%rsp)
jmp 0x1b434
movl 0xc4(%rsp), %eax
cmpl $0x0, %eax
jne 0x1b534
movl $0x0, 0xda4(%rsp)
movl $0x1, 0xaec(%rsp)
jmp 0x1b93a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
jmp 0x1b9f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
jmp 0x1b9e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
jmp 0x1b9d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
jmp 0x1b9cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
jmp 0x1b9be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
jmp 0x1b9b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
jmp 0x1b9a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb48(%rsp)
movl %eax, 0xb44(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x145c10
jmp 0x1b9a4
cmpl $0x0, 0x24d2e5(%rip)    # 0x268820
je 0x1b58c
leaq 0xc58(%rsp), %rdi
callq 0x172af0
movsd %xmm0, 0xb0(%rsp)
jmp 0x1b555
movsd 0xb0(%rsp), %xmm0
leaq 0x1e1e75(%rip), %rdi    # 0x1fd3da
movb $0x1, %al
callq 0x16090
jmp 0x1b56e
movq 0x243a1b(%rip), %rax    # 0x25ef90
movq (%rax), %rdi
callq 0x168c0
jmp 0x1b57f
leaq 0xc58(%rsp), %rdi
callq 0x1ec90
movq $0x0, 0x120(%rsp)
cmpl $0x0, 0x24d285(%rip)    # 0x268824
je 0x1b682
movq %rsp, %rax
movq %rax, 0xa0(%rsp)
leaq 0xd38(%rsp), %rcx
movq %rcx, 0x50(%rax)
leaq 0xd50(%rsp), %rcx
movq %rcx, 0x48(%rax)
leaq 0xd68(%rsp), %rcx
movq %rcx, 0x40(%rax)
leaq 0xb50(%rsp), %rcx
movq %rcx, 0x38(%rax)
leaq 0xa18(%rsp), %rcx
movq %rcx, 0x30(%rax)
leaq 0x128(%rsp), %rcx
movq %rcx, 0x28(%rax)
leaq 0x1f8(%rsp), %rcx
movq %rcx, 0x20(%rax)
leaq 0xb68(%rsp), %rcx
movq %rcx, 0x18(%rax)
leaq 0x2c8(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x398(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x468(%rsp), %rcx
movq %rcx, (%rax)
leaq 0x948(%rsp), %rdi
leaq 0x878(%rsp), %rsi
leaq 0x7a8(%rsp), %rdx
leaq 0x6d8(%rsp), %rcx
leaq 0x608(%rsp), %r8
leaq 0x538(%rsp), %r9
callq 0x1bad0
movq %rax, 0xa8(%rsp)
jmp 0x1b672
movq 0xa8(%rsp), %rax
movq %rax, 0x120(%rsp)
cmpl $0x0, 0x24d197(%rip)    # 0x268820
je 0x1b6da
leaq 0xc58(%rsp), %rdi
callq 0x172af0
movsd %xmm0, 0x98(%rsp)
jmp 0x1b6a3
movsd 0x98(%rsp), %xmm0
leaq 0x1e1d31(%rip), %rdi    # 0x1fd3e4
movb $0x1, %al
callq 0x16090
jmp 0x1b6bc
movq 0x2438cd(%rip), %rax    # 0x25ef90
movq (%rax), %rdi
callq 0x168c0
jmp 0x1b6cd
leaq 0xc58(%rsp), %rdi
callq 0x1ec90
cmpq $0x0, 0xd98(%rsp)
je 0x1b843
cmpq $0x0, 0x120(%rsp)
je 0x1b74a
movq 0xd98(%rsp), %rdi
movq 0xc68(%rsp), %rsi
movq 0x120(%rsp), %rdx
movq %rsp, %rax
leaq 0xcf0(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0xd38(%rsp), %rcx
movq %rcx, (%rax)
leaq 0xb68(%rsp), %rcx
leaq 0xd68(%rsp), %r8
leaq 0xd50(%rsp), %r9
callq 0x1bdc0
jmp 0x1b745
jmp 0x1b841
movq 0xd98(%rsp), %rdi
movq 0xc68(%rsp), %rsi
movq 0x120(%rsp), %rdx
movq %rsp, %rax
movq %rax, 0x90(%rsp)
leaq 0xcf0(%rsp), %rcx
movq %rcx, 0x70(%rax)
leaq 0xd38(%rsp), %rcx
movq %rcx, 0x68(%rax)
leaq 0xd50(%rsp), %rcx
movq %rcx, 0x60(%rax)
leaq 0xd68(%rsp), %rcx
movq %rcx, 0x58(%rax)
leaq 0xb50(%rsp), %rcx
movq %rcx, 0x50(%rax)
leaq 0xa18(%rsp), %rcx
movq %rcx, 0x48(%rax)
leaq 0x128(%rsp), %rcx
movq %rcx, 0x40(%rax)
leaq 0x1f8(%rsp), %rcx
movq %rcx, 0x38(%rax)
leaq 0x2c8(%rsp), %rcx
movq %rcx, 0x30(%rax)
leaq 0x398(%rsp), %rcx
movq %rcx, 0x28(%rax)
leaq 0x468(%rsp), %rcx
movq %rcx, 0x20(%rax)
leaq 0x538(%rsp), %rcx
movq %rcx, 0x18(%rax)
leaq 0x608(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x6d8(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x7a8(%rsp), %rcx
movq %rcx, (%rax)
leaq 0xb68(%rsp), %rcx
leaq 0x948(%rsp), %r8
leaq 0x878(%rsp), %r9
callq 0x1c510
jmp 0x1b83f
jmp 0x1b841
jmp 0x1b843
cmpl $0x0, 0x24cfd6(%rip)    # 0x268820
je 0x1b89b
leaq 0xc58(%rsp), %rdi
callq 0x172af0
movsd %xmm0, 0x88(%rsp)
jmp 0x1b864
movsd 0x88(%rsp), %xmm0
leaq 0x1e1b7a(%rip), %rdi    # 0x1fd3ee
movb $0x1, %al
callq 0x16090
jmp 0x1b87d
movq 0x24370c(%rip), %rax    # 0x25ef90
movq (%rax), %rdi
callq 0x168c0
jmp 0x1b88e
leaq 0xc58(%rsp), %rdi
callq 0x1ec90
cmpq $0x0, 0x120(%rsp)
je 0x1b8dd
movq 0x120(%rsp), %rax
movq %rax, 0x80(%rsp)
cmpq $0x0, %rax
je 0x1b8db
movq 0x80(%rsp), %rdi
callq 0x42650
movq 0x80(%rsp), %rdi
movl $0xe0, %esi
callq 0x16750
jmp 0x1b8dd
cmpl $0x0, 0x24cf3c(%rip)    # 0x268820
je 0x1b924
leaq 0xd80(%rsp), %rdi
callq 0x172af0
movsd %xmm0, 0x78(%rsp)
jmp 0x1b8fb
movsd 0x78(%rsp), %xmm0
leaq 0x1e1af0(%rip), %rdi    # 0x1fd3f8
movb $0x1, %al
callq 0x16090
jmp 0x1b911
movq 0x243678(%rip), %rax    # 0x25ef90
movq (%rax), %rdi
callq 0x168c0
jmp 0x1b922
jmp 0x1b924
movl $0x1, 0xda4(%rsp)
movl $0x1, 0xaec(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x145c10
leaq 0x1f8(%rsp), %rdi
callq 0x145c10
leaq 0x2c8(%rsp), %rdi
callq 0x145c10
leaq 0x398(%rsp), %rdi
callq 0x145c10
leaq 0x468(%rsp), %rdi
callq 0x145c10
leaq 0x538(%rsp), %rdi
callq 0x145c10
leaq 0x608(%rsp), %rdi
callq 0x145c10
leaq 0x6d8(%rsp), %rdi
callq 0x145c10
jmp 0x1ba01
leaq 0x1f8(%rsp), %rdi
callq 0x145c10
leaq 0x2c8(%rsp), %rdi
callq 0x145c10
leaq 0x398(%rsp), %rdi
callq 0x145c10
leaq 0x468(%rsp), %rdi
callq 0x145c10
leaq 0x538(%rsp), %rdi
callq 0x145c10
leaq 0x608(%rsp), %rdi
callq 0x145c10
leaq 0x6d8(%rsp), %rdi
callq 0x145c10
jmp 0x1ba2a
leaq 0x7a8(%rsp), %rdi
callq 0x145c10
leaq 0x878(%rsp), %rdi
callq 0x145c10
leaq 0x948(%rsp), %rdi
callq 0x145c10
jmp 0x1ba53
leaq 0x7a8(%rsp), %rdi
callq 0x145c10
leaq 0x878(%rsp), %rdi
callq 0x145c10
leaq 0x948(%rsp), %rdi
callq 0x145c10
jmp 0x1ba62
leaq 0xa18(%rsp), %rdi
callq 0x145c10
jmp 0x1ba71
leaq 0xa18(%rsp), %rdi
callq 0x145c10
jmp 0x1ba8d
leaq 0xb50(%rsp), %rdi
callq 0x16a180
leaq 0xb68(%rsp), %rdi
callq 0x145c10
jmp 0x1baa9
leaq 0xb50(%rsp), %rdi
callq 0x16a180
leaq 0xb68(%rsp), %rdi
callq 0x145c10
jmp 0x1bab8
movl 0xda4(%rsp), %eax
addq $0xda8, %rsp            # imm = 0xDA8
retq
movq 0xb48(%rsp), %rdi
callq 0x16ca0
nopw %cs:(%rax,%rax)