// File: tomfunkhouser[P]gaps/apps/conf2img/RGBDSegmentation.cpp
// Function: gaps::RGBDCreateSegmentationPoints(gaps::R3Segmentation*, gaps::R2Grid const&, gaps::R2Grid const&, gaps::R2Grid const&, gaps::R2Grid const&, gaps::R2Grid const&, gaps::R2Grid const&, gaps::R2Grid const&, gaps::R2Grid const&, gaps::R2Grid const&, gaps::R2Image const&)
static int 
RGBDCreateSegmentationPoints(R3Segmentation *segmentation,
  const R2Grid& px_image, const R2Grid& py_image, const R2Grid& pz_image, 
  const R2Grid& nx_image, const R2Grid& ny_image, const R2Grid& nz_image,
  const R2Grid& depth_image, const R2Grid& radius_image,
  const R2Grid& boundary_image, const R2Image& color_image)
{
  // Allocate points 
  segmentation->point_buffer = new R3SegmentationPoint [ depth_image.NEntries() ];
  if (!segmentation->point_buffer) {
    RNFail("Unable to allocate points\n");
    return 0;
  }

  // Fill points
  for (int ix = 0; ix < depth_image.XResolution(); ix++) {
    for (int iy = 0; iy < depth_image.YResolution(); iy++) {
      int i;
      depth_image.IndicesToIndex(ix, iy, i);
      R3SegmentationPoint *point = &segmentation->point_buffer[i];

      // Check depth
      RNScalar depth = depth_image.GridValue(i);
      if (RNIsNegativeOrZero(depth)) continue;
      if ((max_depth > 0) && (depth > max_depth)) continue;
      point->depth = depth;

      // Get position
      RNScalar px = px_image.GridValue(i);
      RNScalar py = py_image.GridValue(i);
      RNScalar pz = pz_image.GridValue(i);
      point->position.Reset(px, py, pz);

      // Get normal
      RNScalar nx = nx_image.GridValue(i);
      RNScalar ny = ny_image.GridValue(i);
      RNScalar nz = nz_image.GridValue(i);
      point->normal.Reset(nx, ny, nz);

      // Get radius
      RNScalar radius = radius_image.GridValue(i);
      point->radius1 = radius;
      point->radius2 = radius;
      point->area = RN_PI * radius * radius;

      // Get color
      point->color = color_image.PixelRGB(ix, iy);
    
      // Get flags
      point->boundary = (unsigned int) (boundary_image.GridValue(i) + 0.5);

      // Set grid index
      point->data_index = i;

      // Insert point
      segmentation->points.Insert(point);
    }
  }

  // Create kdtree of points
  R3SegmentationPoint tmp; int position_offset = (unsigned char *) &(tmp.position) - (unsigned char *) &tmp;
  segmentation->kdtree = new R3Kdtree<R3SegmentationPoint *>(segmentation->points, position_offset);
  if (!segmentation->kdtree) {
    RNFail("Unable to create kdtree\n");
    return 0;
  }
  
  // Create arrays of neighbor points
  for (int i = 0; i < segmentation->points.NEntries(); i++) {
    R3SegmentationPoint *point = segmentation->points.Kth(i);
    int ix, iy, neighbor_index;
    depth_image.IndexToIndices(point->data_index, ix, iy);
    for (int s = -1; s <= 1; s++) {
      if ((ix+s < 0) || (ix+s >= depth_image.XResolution())) continue;
      for (int t = -1; t <= 1; t++) {
        if ((s == 0) && (t == 0)) continue;
        if ((iy+t < 0) || (iy+t >= depth_image.YResolution())) continue;
        depth_image.IndicesToIndex(ix+s, iy+t, neighbor_index);
        R3SegmentationPoint *neighbor = &segmentation->point_buffer[neighbor_index];

        // Check if across boundary
        if ((point->boundary & RGBD_SHADOW_BOUNDARY) && (neighbor->boundary & RGBD_SILHOUETTE_BOUNDARY)) continue;
        if ((point->boundary & RGBD_SILHOUETTE_BOUNDARY) && (neighbor->boundary & RGBD_SHADOW_BOUNDARY)) continue;

        // Check if too far away
        if (max_neighbor_distance_factor > 0) {
          RNScalar radius = (point->radius1 > neighbor->radius1) ? neighbor->radius1 : point->radius1;
          RNScalar max_neighbor_distance = (radius > 0) ? max_neighbor_distance_factor * radius : 0.25;
          RNScalar dd = R3SquaredDistance(point->position, neighbor->position);
          if (dd > max_neighbor_distance * max_neighbor_distance) continue;
        }

        // Check if too much color difference
        if (max_neighbor_color_difference > 0) {
          RNScalar dr = fabs(point->color.R() - neighbor->color.R());
          if (dr > max_neighbor_color_difference) continue;
          RNScalar dg = fabs(point->color.G() - neighbor->color.G());
          if (dg > max_neighbor_color_difference) continue;
          RNScalar db = fabs(point->color.B() - neighbor->color.B());
          if (db > max_neighbor_color_difference) continue;
        }

        // Check if too much normal angle
        if (max_neighbor_normal_angle > 0) {
          RNScalar dot = fabs(point->normal.Dot(neighbor->normal));
          RNAngle normal_angle = (dot < 1) ? RN_PI_OVER_TWO - acos(dot) : RN_PI_OVER_TWO;
          if (normal_angle > max_neighbor_normal_angle) continue;
        }
        
        // Insert neighbor
        point->neighbors.Insert(neighbor);
      }
    }
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x2e8, %rsp            # imm = 0x2E8
movq 0x310(%rsp), %rax
movq 0x308(%rsp), %rax
movq 0x300(%rsp), %rax
movq 0x2f8(%rsp), %rax
movq 0x2f0(%rsp), %rax
movq %rdi, 0x2d8(%rsp)
movq %rsi, 0x2d0(%rsp)
movq %rdx, 0x2c8(%rsp)
movq %rcx, 0x2c0(%rsp)
movq %r8, 0x2b8(%rsp)
movq %r9, 0x2b0(%rsp)
movq 0x2f8(%rsp), %rdi
callq 0x30fd0
cltq
movq %rax, 0xc8(%rsp)
movl $0xe0, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
setb %al
orb %al, %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, 0xc0(%rsp)
callq 0x24040
movq %rax, %rcx
movq 0xc8(%rsp), %rax
movq %rcx, 0xd0(%rsp)
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, 0xd8(%rsp)
cmpq $0x0, %rax
je 0x31917
movq 0xd8(%rsp), %rax
movq 0xc8(%rsp), %rcx
imulq $0xe0, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0xb0(%rsp)
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0x870d0
jmp 0x318f4
movq 0xb0(%rsp), %rcx
movq 0xa8(%rsp), %rax
addq $0xe0, %rax
cmpq %rcx, %rax
movq %rax, 0xb8(%rsp)
jne 0x318dd
movq 0xd8(%rsp), %rcx
movq 0x2d8(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x2d8(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x319de
leaq 0x1ae05f(%rip), %rdi    # 0x1df9a4
movb $0x0, %al
callq 0x144e00
movl $0x0, 0x2e4(%rsp)
jmp 0x3243f
movq 0xd8(%rsp), %rcx
movq %rax, %rsi
movq 0xa8(%rsp), %rax
movq %rsi, 0x2a8(%rsp)
movl %edx, 0x2a4(%rsp)
cmpq %rax, %rcx
movq %rax, 0xa0(%rsp)
je 0x319c4
movq 0xa0(%rsp), %rdi
addq $-0xe0, %rdi
movq %rdi, 0x98(%rsp)
callq 0x324a0
movq 0xd8(%rsp), %rcx
movq 0x98(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0xa0(%rsp)
jne 0x3198b
movq 0xc0(%rsp), %rsi
movq 0xd0(%rsp), %rdi
callq 0x25480
jmp 0x3244e
movl $0x0, 0x2a0(%rsp)
movl 0x2a0(%rsp), %eax
movl %eax, 0x94(%rsp)
movq 0x2f8(%rsp), %rdi
callq 0x30740
movl %eax, %ecx
movl 0x94(%rsp), %eax
cmpl %ecx, %eax
jge 0x31d5c
movl $0x0, 0x29c(%rsp)
movl 0x29c(%rsp), %eax
movl %eax, 0x90(%rsp)
movq 0x2f8(%rsp), %rdi
callq 0x30760
movl %eax, %ecx
movl 0x90(%rsp), %eax
cmpl %ecx, %eax
jge 0x31d44
movq 0x2f8(%rsp), %rdi
movl 0x2a0(%rsp), %esi
movl 0x29c(%rsp), %edx
leaq 0x298(%rsp), %rcx
callq 0x324c0
movq 0x2d8(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0x298(%rsp), %rcx
imulq $0xe0, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x290(%rsp)
movq 0x2f8(%rsp), %rdi
movl 0x298(%rsp), %esi
callq 0x309d0
movsd %xmm0, 0x288(%rsp)
movsd 0x288(%rsp), %xmm0
leaq 0x21e7b6(%rip), %rax    # 0x250278
movsd (%rax), %xmm1
callq 0x31020
cmpl $0x0, %eax
je 0x31ad5
jmp 0x31d2e
movsd 0x2243c3(%rip), %xmm0   # 0x255ea0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x31afe
movsd 0x288(%rsp), %xmm0
ucomisd 0x2243a9(%rip), %xmm0   # 0x255ea0
jbe 0x31afe
jmp 0x31d2e
movsd 0x288(%rsp), %xmm0
movq 0x290(%rsp), %rax
movsd %xmm0, (%rax)
movq 0x2d0(%rsp), %rdi
movl 0x298(%rsp), %esi
callq 0x309d0
movsd %xmm0, 0x280(%rsp)
movq 0x2c8(%rsp), %rdi
movl 0x298(%rsp), %esi
callq 0x309d0
movsd %xmm0, 0x278(%rsp)
movq 0x2c0(%rsp), %rdi
movl 0x298(%rsp), %esi
callq 0x309d0
movsd %xmm0, 0x270(%rsp)
movq 0x290(%rsp), %rdi
addq $0x8, %rdi
movsd 0x280(%rsp), %xmm0
movsd 0x278(%rsp), %xmm1
movsd 0x270(%rsp), %xmm2
callq 0x324f0
movq 0x2b8(%rsp), %rdi
movl 0x298(%rsp), %esi
callq 0x309d0
movsd %xmm0, 0x268(%rsp)
movq 0x2b0(%rsp), %rdi
movl 0x298(%rsp), %esi
callq 0x309d0
movsd %xmm0, 0x260(%rsp)
movq 0x2f0(%rsp), %rdi
movl 0x298(%rsp), %esi
callq 0x309d0
movsd %xmm0, 0x258(%rsp)
movq 0x290(%rsp), %rdi
addq $0x20, %rdi
movsd 0x268(%rsp), %xmm0
movsd 0x260(%rsp), %xmm1
movsd 0x258(%rsp), %xmm2
callq 0x32530
movq 0x300(%rsp), %rdi
movl 0x298(%rsp), %esi
callq 0x309d0
movsd %xmm0, 0x250(%rsp)
movsd 0x250(%rsp), %xmm0
movq 0x290(%rsp), %rax
movsd %xmm0, 0x50(%rax)
movsd 0x250(%rsp), %xmm0
movq 0x290(%rsp), %rax
movsd %xmm0, 0x58(%rax)
leaq 0x1b28e7(%rip), %rax    # 0x1e4550
movsd (%rax), %xmm0
movsd 0x250(%rsp), %xmm1
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movq 0x290(%rsp), %rax
movsd %xmm0, 0x70(%rax)
movq 0x310(%rsp), %rsi
movl 0x2a0(%rsp), %edx
movl 0x29c(%rsp), %ecx
leaq 0x238(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x1375b0
movq 0x88(%rsp), %rsi
movq 0x290(%rsp), %rdi
addq $0x78, %rdi
callq 0x1407c0
movq 0x308(%rsp), %rdi
movl 0x298(%rsp), %esi
callq 0x309d0
movsd 0x1ad32d(%rip), %xmm1   # 0x1df018
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, %ecx
movq 0x290(%rsp), %rax
movl %ecx, 0xa4(%rax)
movl 0x298(%rsp), %ecx
movq 0x290(%rsp), %rax
movl %ecx, 0xd4(%rax)
movq 0x2d8(%rsp), %rdi
movq 0x290(%rsp), %rsi
callq 0x32570
movl 0x29c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x29c(%rsp)
jmp 0x31a20
jmp 0x31d46
movl 0x2a0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2a0(%rsp)
jmp 0x319e9
leaq 0x158(%rsp), %rdi
callq 0x870d0
movl $0x8, 0x154(%rsp)
movl $0x60, %edi
callq 0x249f0
movq %rax, 0x80(%rsp)
jmp 0x31d88
movq 0x80(%rsp), %rdi
movq 0x2d8(%rsp), %rsi
movl 0x154(%rsp), %edx
callq 0x325a0
jmp 0x31da6
movq 0x80(%rsp), %rcx
movq 0x2d8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x2d8(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x31e38
leaq 0x1adbef(%rip), %rdi    # 0x1df9bf
xorl %eax, %eax
callq 0x144e00
jmp 0x31dd9
movl $0x0, 0x2e4(%rsp)
movl $0x1, 0x150(%rsp)
jmp 0x32421
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
jmp 0x32430
movq 0x80(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
movl $0x60, %esi
callq 0x24a10
jmp 0x32430
movl $0x0, 0x14c(%rsp)
movl 0x14c(%rsp), %eax
movl %eax, 0x78(%rsp)
movq 0x2d8(%rsp), %rdi
callq 0x30560
movl %eax, 0x7c(%rsp)
jmp 0x31e61
movl 0x78(%rsp), %eax
movl 0x7c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x3240b
movq 0x2d8(%rsp), %rdi
movl 0x14c(%rsp), %esi
callq 0x32480
movq %rax, 0x70(%rsp)
jmp 0x31e8c
movq 0x70(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x2f8(%rsp), %rdi
movq 0x140(%rsp), %rax
movl 0xd4(%rax), %esi
leaq 0x13c(%rsp), %rdx
leaq 0x138(%rsp), %rcx
callq 0x31050
jmp 0x31ec6
movl $0xffffffff, 0x130(%rsp) # imm = 0xFFFFFFFF
cmpl $0x1, 0x130(%rsp)
jg 0x323f3
movl 0x13c(%rsp), %eax
addl 0x130(%rsp), %eax
cmpl $0x0, %eax
jl 0x31f25
movl 0x13c(%rsp), %eax
movl 0x130(%rsp), %ecx
addl %ecx, %eax
movl %eax, 0x68(%rsp)
movq 0x2f8(%rsp), %rdi
callq 0x30740
movl %eax, 0x6c(%rsp)
jmp 0x31f19
movl 0x68(%rsp), %eax
movl 0x6c(%rsp), %ecx
cmpl %ecx, %eax
jl 0x31f2a
jmp 0x323dd
movl $0xffffffff, 0x12c(%rsp) # imm = 0xFFFFFFFF
cmpl $0x1, 0x12c(%rsp)
jg 0x323db
cmpl $0x0, 0x130(%rsp)
jne 0x31f5c
cmpl $0x0, 0x12c(%rsp)
jne 0x31f5c
jmp 0x323c5
movl 0x138(%rsp), %eax
addl 0x12c(%rsp), %eax
cmpl $0x0, %eax
jl 0x31fa2
movl 0x138(%rsp), %eax
movl 0x12c(%rsp), %ecx
addl %ecx, %eax
movl %eax, 0x60(%rsp)
movq 0x2f8(%rsp), %rdi
callq 0x30760
movl %eax, 0x64(%rsp)
jmp 0x31f96
movl 0x60(%rsp), %eax
movl 0x64(%rsp), %ecx
cmpl %ecx, %eax
jl 0x31fa7
jmp 0x323c5
movq 0x2f8(%rsp), %rdi
movl 0x13c(%rsp), %esi
movl 0x130(%rsp), %eax
addl %eax, %esi
movl 0x138(%rsp), %edx
movl 0x12c(%rsp), %eax
addl %eax, %edx
leaq 0x134(%rsp), %rcx
callq 0x324c0
jmp 0x31fde
movq 0x2d8(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0x134(%rsp), %rcx
imulq $0xe0, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x120(%rsp)
movq 0x140(%rsp), %rax
movl 0xa4(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x32035
movq 0x120(%rsp), %rax
movl 0xa4(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x32035
jmp 0x323c5
movq 0x140(%rsp), %rax
movl 0xa4(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x32066
movq 0x120(%rsp), %rax
movl 0xa4(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x32066
jmp 0x323c5
movsd 0x21da52(%rip), %xmm0   # 0x24fac0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x32174
movq 0x140(%rsp), %rax
movsd 0x50(%rax), %xmm0
movq 0x120(%rsp), %rax
ucomisd 0x50(%rax), %xmm0
jbe 0x320ac
movq 0x120(%rsp), %rax
movsd 0x50(%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
jmp 0x320bf
movq 0x140(%rsp), %rax
movsd 0x50(%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x118(%rsp)
movsd 0x118(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x320f9
movsd 0x21d9d8(%rip), %xmm0   # 0x24fac0
mulsd 0x118(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
jmp 0x32109
movsd 0x1acf67(%rip), %xmm0   # 0x1df068
movsd %xmm0, 0x50(%rsp)
jmp 0x32109
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x110(%rsp)
movq 0x140(%rsp), %rdi
addq $0x8, %rdi
movq 0x120(%rsp), %rsi
addq $0x8, %rsi
callq 0xad570
movsd %xmm0, 0x48(%rsp)
jmp 0x3213d
movsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x108(%rsp)
movsd 0x108(%rsp), %xmm0
movsd 0x110(%rsp), %xmm1
mulsd 0x110(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x32172
jmp 0x323c5
jmp 0x32174
movsd 0x223d34(%rip), %xmm0   # 0x255eb0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x322d5
movq 0x140(%rsp), %rdi
addq $0x78, %rdi
callq 0x30fa0
movsd %xmm0, 0x40(%rsp)
jmp 0x321a2
movq 0x120(%rsp), %rdi
addq $0x78, %rdi
callq 0x30fa0
movsd %xmm0, 0x38(%rsp)
jmp 0x321bb
movsd 0x38(%rsp), %xmm1
movsd 0x40(%rsp), %xmm0
subsd %xmm1, %xmm0
movaps 0x1aceae(%rip), %xmm1   # 0x1df080
pand %xmm1, %xmm0
movsd %xmm0, 0x100(%rsp)
movsd 0x100(%rsp), %xmm0
ucomisd 0x223cc0(%rip), %xmm0   # 0x255eb0
jbe 0x321f7
jmp 0x323c5
movq 0x140(%rsp), %rdi
addq $0x78, %rdi
callq 0x30fb0
movsd %xmm0, 0x30(%rsp)
jmp 0x32210
movq 0x120(%rsp), %rdi
addq $0x78, %rdi
callq 0x30fb0
movsd %xmm0, 0x28(%rsp)
jmp 0x32229
movsd 0x28(%rsp), %xmm1
movsd 0x30(%rsp), %xmm0
subsd %xmm1, %xmm0
movaps 0x1ace40(%rip), %xmm1   # 0x1df080
pand %xmm1, %xmm0
movsd %xmm0, 0xf8(%rsp)
movsd 0xf8(%rsp), %xmm0
ucomisd 0x223c52(%rip), %xmm0   # 0x255eb0
jbe 0x32265
jmp 0x323c5
movq 0x140(%rsp), %rdi
addq $0x78, %rdi
callq 0x30fc0
movsd %xmm0, 0x20(%rsp)
jmp 0x3227e
movq 0x120(%rsp), %rdi
addq $0x78, %rdi
callq 0x30fc0
movsd %xmm0, 0x18(%rsp)
jmp 0x32297
movsd 0x18(%rsp), %xmm1
movsd 0x20(%rsp), %xmm0
subsd %xmm1, %xmm0
movaps 0x1acdd2(%rip), %xmm1   # 0x1df080
pand %xmm1, %xmm0
movsd %xmm0, 0xf0(%rsp)
movsd 0xf0(%rsp), %xmm0
ucomisd 0x223be4(%rip), %xmm0   # 0x255eb0
jbe 0x322d3
jmp 0x323c5
jmp 0x322d5
movsd 0x223bcb(%rip), %xmm0   # 0x255ea8
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x323a5
movq 0x140(%rsp), %rdi
addq $0x20, %rdi
movq 0x120(%rsp), %rsi
addq $0x20, %rsi
callq 0x107070
movsd %xmm0, 0x10(%rsp)
jmp 0x3230f
movsd 0x10(%rsp), %xmm0
movaps 0x1acd64(%rip), %xmm1   # 0x1df080
pand %xmm1, %xmm0
movsd %xmm0, 0xe8(%rsp)
movsd 0x1accf7(%rip), %xmm0   # 0x1df028
ucomisd 0xe8(%rsp), %xmm0
jbe 0x3236e
leaq 0x1b221d(%rip), %rax    # 0x1e4560
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movsd 0xe8(%rsp), %xmm0
callq 0x24950
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x3237f
leaq 0x1b21eb(%rip), %rax    # 0x1e4560
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0xe0(%rsp)
movsd 0xe0(%rsp), %xmm0
ucomisd 0x223b09(%rip), %xmm0   # 0x255ea8
jbe 0x323a3
jmp 0x323c5
jmp 0x323a5
movq 0x140(%rsp), %rdi
addq $0xb0, %rdi
movq 0x120(%rsp), %rsi
callq 0x32570
jmp 0x323c3
jmp 0x323c5
movl 0x12c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x12c(%rsp)
jmp 0x31f35
jmp 0x323dd
movl 0x130(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x130(%rsp)
jmp 0x31ed1
jmp 0x323f5
movl 0x14c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14c(%rsp)
jmp 0x31e43
movl $0x1, 0x2e4(%rsp)
movl $0x1, 0x150(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x324a0
jmp 0x3243f
leaq 0x158(%rsp), %rdi
callq 0x324a0
jmp 0x3244e
movl 0x2e4(%rsp), %eax
addq $0x2e8, %rsp            # imm = 0x2E8
retq
movq 0x2a8(%rsp), %rdi
callq 0x25290
nopl (%rax,%rax)