// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectProperty.cpp
// Function: gaps::R3SurfelObjectProperty::UpdateOperands()
void R3SurfelObjectProperty::
UpdateOperands(void)
{
  // Check if already uptodate
  if (noperands > 0) return;

  // Check object
  if (!object) return;

  // Check property type
  switch(type) {
  case R3_SURFEL_OBJECT_PCA_PROPERTY: {
    // PCA Properties
    // noperands = 21
    // operands[0-2]: centroid
    // operands[3-5]: xyz of axis1
    // operands[6-8]: xyz of axis2
    // operands[9-11]: xyz of axis3
    // operands[12-14]: variances
    // operands[15-20]: extents 

    // Allocate operands
    noperands = 21;
    operands = new RNScalar [ noperands ];
    for (int i = 0; i < noperands; i++) operands[i] = 0;

    // Create pointset
    R3SurfelPointSet *pointset = object->PointSet();
    if (!pointset) return;
    if (pointset->NPoints() < 3) { delete pointset; return; }

    // Compute principle axes
    RNScalar variances[3];
    R3Point centroid = pointset->Centroid();
    R3Triad triad = pointset->PrincipleAxes(&centroid, variances);

    // Check if positive z of triad is facing away from viewpoint(s)
    int npositive = 0, nnegative = 0;
    R3Plane plane(centroid, triad.Axis(2));
    for (int i = 0; i < pointset->NPoints(); i++) {
      R3SurfelPoint *point = pointset->Point(i);
      R3SurfelBlock *block = point->Block();
      if (!block) continue;
      R3SurfelNode *node = block->Node();
      if (!node) continue;
      R3SurfelScan *scan = node->Scan();
      if (!scan) continue;
      RNScalar d = R3SignedDistance(plane, scan->Viewpoint());
      if (d < 0) nnegative++;
      else if (d > 0) npositive++;
    }

    // Rotate triad so that z is not backfacing to viewpoints
    if (nnegative > npositive) triad = R3Triad(triad[0], -triad[1], -triad[2]);

    // Find extents
    R3Box extent = R3null_box;
    for (int i = 0; i < pointset->NPoints(); i++) {
      R3SurfelPoint *point = pointset->Point(i);
      R3Point position = point->Position();
      R3Vector vector = position - centroid;
      RNScalar x = triad.Axis(0).Dot(vector);
      RNScalar y = triad.Axis(1).Dot(vector);
      RNScalar z = triad.Axis(2).Dot(vector);
      extent.Union(R3Point(x, y, z));
    }

    // Fill operands
    operands[0] = centroid.X();
    operands[1] = centroid.Y();
    operands[2] = centroid.Z();
    operands[3] = triad.Axis(0).X();
    operands[4] = triad.Axis(0).Y();
    operands[5] = triad.Axis(0).Z();
    operands[6] = triad.Axis(1).X();
    operands[7] = triad.Axis(1).Y();
    operands[8] = triad.Axis(1).Z();
    operands[9] = triad.Axis(2).X();
    operands[10] = triad.Axis(2).Y();
    operands[11] = triad.Axis(2).Z();
    operands[12] = variances[0];
    operands[13] = variances[1];
    operands[14] = variances[2];
    operands[15] = extent[0][0];
    operands[16] = extent[0][1];
    operands[17] = extent[0][2];
    operands[18] = extent[1][0];
    operands[19] = extent[1][1];
    operands[20] = extent[1][2];

    // Delete pointset
    delete pointset;
    break; }

  case R3_SURFEL_OBJECT_AMODAL_OBB_PROPERTY: {
    // PCA Properties
    // noperands = 16
    // operands[0-2]: centroid
    // operands[3-5]: xyz of axis1
    // operands[6-8]: xyz of axis2
    // operands[9-11]: xyz of axis3
    // operands[12-14]: radii
    // operands[15]: confidence
    // operands[16]: originator
    // operands[17-19]: reserved

    // Allocate operands
    noperands = 20;
    operands = new RNScalar [ noperands ];
    for (int i = 0; i < noperands; i++) operands[i] = 0;

    // Estimate obb
    R3OrientedBox obb = EstimateOrientedBBox(object);
    double confidence = 0.01;
    int originator = R3_SURFEL_MACHINE_ORIGINATOR;
    
    // Fill operands
    operands[0] = obb.Center().X();
    operands[1] = obb.Center().Y();
    operands[2] = obb.Center().Z();
    operands[3] = obb.Axis(0).X();
    operands[4] = obb.Axis(0).Y();
    operands[5] = obb.Axis(0).Z();
    operands[6] = obb.Axis(1).X();
    operands[7] = obb.Axis(1).Y();
    operands[8] = obb.Axis(1).Z();
    operands[9] = obb.Axis(2).X();
    operands[10] = obb.Axis(2).Y();
    operands[11] = obb.Axis(2).Z();
    operands[12] = obb.Radius(0);
    operands[13] = obb.Radius(1);
    operands[14] = obb.Radius(2);
    operands[15] = confidence;
    operands[16] = originator;
    operands[17] = 0;
    operands[18] = 0;
    operands[19] = 0;
    break; }
  }

  // Mark scene as dirty
  if (scene) scene->SetDirty();
}

// Assembly:
subq $0x518, %rsp            # imm = 0x518
movq %rdi, 0x510(%rsp)
movq 0x510(%rsp), %rax
movq %rax, 0x258(%rsp)
cmpl $0x0, 0x28(%rax)
jle 0x6d96a
jmp 0x6ea34
movq 0x258(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x6d97e
jmp 0x6ea34
movq 0x258(%rsp), %rax
movl 0x2c(%rax), %eax
movl %eax, 0x254(%rsp)
subl $0x1, %eax
je 0x6d9ac
jmp 0x6d997
movl 0x254(%rsp), %eax
subl $0x2, %eax
je 0x6e4e8
jmp 0x6ea14
movq 0x258(%rsp), %rax
movl $0x15, 0x28(%rax)
movslq 0x28(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x13030
movq %rax, %rcx
movq 0x258(%rsp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, 0x50c(%rsp)
movq 0x258(%rsp), %rcx
movl 0x50c(%rsp), %eax
cmpl 0x28(%rcx), %eax
jge 0x6da3d
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x50c(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl 0x50c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50c(%rsp)
jmp 0x6d9fa
movq 0x258(%rsp), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
xorps %xmm0, %xmm0
callq 0x19ad0
movq %rax, 0x500(%rsp)
cmpq $0x0, 0x500(%rsp)
jne 0x6da6b
jmp 0x6ea34
movq 0x500(%rsp), %rdi
callq 0x18700
cmpl $0x3, %eax
jge 0x6daa6
movq 0x500(%rsp), %rax
movq %rax, 0x248(%rsp)
cmpq $0x0, %rax
je 0x6daa1
movq 0x248(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x6ea34
movq 0x500(%rsp), %rsi
leaq 0x4c8(%rsp), %rdi
callq 0x560c0
movq 0x500(%rsp), %rsi
leaq 0x4e0(%rsp), %rcx
leaq 0x480(%rsp), %rdi
leaq 0x4c8(%rsp), %rdx
callq 0x56280
movl $0x0, 0x47c(%rsp)
movl $0x0, 0x478(%rsp)
leaq 0x480(%rsp), %rdi
movl $0x2, %esi
callq 0x32100
movq %rax, %rdx
leaq 0x458(%rsp), %rdi
leaq 0x4c8(%rsp), %rsi
callq 0xf5ab0
movl $0x0, 0x454(%rsp)
movl 0x454(%rsp), %eax
movl %eax, 0x244(%rsp)
movq 0x500(%rsp), %rdi
callq 0x18700
movl %eax, %ecx
movl 0x244(%rsp), %eax
cmpl %ecx, %eax
jge 0x6dc68
movq 0x500(%rsp), %rdi
movl 0x454(%rsp), %esi
callq 0x18710
movq %rax, 0x448(%rsp)
movq 0x448(%rsp), %rdi
callq 0x44cb0
movq %rax, 0x440(%rsp)
cmpq $0x0, 0x440(%rsp)
jne 0x6db98
jmp 0x6dc52
movq 0x440(%rsp), %rdi
callq 0x43710
movq %rax, 0x438(%rsp)
cmpq $0x0, 0x438(%rsp)
jne 0x6dbbd
jmp 0x6dc52
movq 0x438(%rsp), %rdi
movl $0x1, %esi
callq 0x5f430
movq %rax, 0x430(%rsp)
cmpq $0x0, 0x430(%rsp)
jne 0x6dbe4
jmp 0x6dc52
movq 0x430(%rsp), %rdi
callq 0x31bd0
movq %rax, %rsi
leaq 0x458(%rsp), %rdi
callq 0x8eb30
movsd %xmm0, 0x428(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x428(%rsp), %xmm0
jbe 0x6dc2b
movl 0x478(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x478(%rsp)
jmp 0x6dc50
movsd 0x428(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x6dc4e
movl 0x47c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x47c(%rsp)
jmp 0x6dc50
jmp 0x6dc52
movl 0x454(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x454(%rsp)
jmp 0x6db2b
movl 0x478(%rsp), %eax
cmpl 0x47c(%rsp), %eax
jle 0x6dd11
leaq 0x480(%rsp), %rdi
xorl %esi, %esi
callq 0x44220
movq %rax, 0x238(%rsp)
leaq 0x480(%rsp), %rdi
movl $0x1, %esi
callq 0x44220
movq %rax, %rsi
leaq 0x3c8(%rsp), %rdi
callq 0xfa7a0
leaq 0x480(%rsp), %rdi
movl $0x2, %esi
callq 0x44220
movq %rax, %rsi
leaq 0x3b0(%rsp), %rdi
callq 0xfa7a0
movq 0x238(%rsp), %rsi
leaq 0x3e0(%rsp), %rdi
leaq 0x3c8(%rsp), %rdx
leaq 0x3b0(%rsp), %rcx
callq 0xd5c80
leaq 0x480(%rsp), %rdi
leaq 0x3e0(%rsp), %rsi
callq 0x45830
leaq 0x378(%rsp), %rdi
leaq 0x18f5e8(%rip), %rsi    # 0x1fd308
callq 0xc9de0
movl $0x0, 0x374(%rsp)
movl 0x374(%rsp), %eax
movl %eax, 0x230(%rsp)
movq 0x500(%rsp), %rdi
callq 0x18700
movl %eax, 0x234(%rsp)
jmp 0x6dd54
movl 0x230(%rsp), %eax
movl 0x234(%rsp), %ecx
cmpl %ecx, %eax
jge 0x6df34
movq 0x500(%rsp), %rdi
movl 0x374(%rsp), %esi
callq 0x18710
movq %rax, 0x228(%rsp)
jmp 0x6dd88
movq 0x228(%rsp), %rax
movq %rax, 0x358(%rsp)
movq 0x358(%rsp), %rsi
leaq 0x340(%rsp), %rdi
callq 0x18730
jmp 0x6ddaf
leaq 0x328(%rsp), %rdi
leaq 0x340(%rsp), %rsi
leaq 0x4c8(%rsp), %rdx
callq 0xf86b0
jmp 0x6ddce
leaq 0x480(%rsp), %rdi
xorl %esi, %esi
callq 0x32100
movq %rax, 0x220(%rsp)
jmp 0x6dde7
movq 0x220(%rsp), %rdi
leaq 0x328(%rsp), %rsi
callq 0xf9ac0
movsd %xmm0, 0x218(%rsp)
jmp 0x6de07
movsd 0x218(%rsp), %xmm0
movsd %xmm0, 0x320(%rsp)
leaq 0x480(%rsp), %rdi
movl $0x1, %esi
callq 0x32100
movq %rax, 0x210(%rsp)
jmp 0x6de35
movq 0x210(%rsp), %rdi
leaq 0x328(%rsp), %rsi
callq 0xf9ac0
movsd %xmm0, 0x208(%rsp)
jmp 0x6de55
movsd 0x208(%rsp), %xmm0
movsd %xmm0, 0x318(%rsp)
leaq 0x480(%rsp), %rdi
movl $0x2, %esi
callq 0x32100
movq %rax, 0x200(%rsp)
jmp 0x6de83
movq 0x200(%rsp), %rdi
leaq 0x328(%rsp), %rsi
callq 0xf9ac0
movsd %xmm0, 0x1f8(%rsp)
jmp 0x6dea3
movsd 0x1f8(%rsp), %xmm0
movsd %xmm0, 0x310(%rsp)
movsd 0x320(%rsp), %xmm0
movsd 0x318(%rsp), %xmm1
movsd 0x310(%rsp), %xmm2
leaq 0x2f8(%rsp), %rdi
callq 0xf8350
jmp 0x6dedf
leaq 0x378(%rsp), %rdi
leaq 0x2f8(%rsp), %rsi
callq 0xcb9d0
jmp 0x6def6
jmp 0x6def8
movl 0x374(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x374(%rsp)
jmp 0x6dd30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x368(%rsp)
movl %eax, 0x364(%rsp)
leaq 0x378(%rsp), %rdi
callq 0x1b990
jmp 0x6ea3c
leaq 0x4c8(%rsp), %rdi
callq 0x187b0
movsd %xmm0, 0x1f0(%rsp)
jmp 0x6df4c
movsd 0x1f0(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, (%rax)
leaq 0x4c8(%rsp), %rdi
callq 0x187c0
movsd %xmm0, 0x1e8(%rsp)
jmp 0x6df7d
movsd 0x1e8(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x8(%rax)
leaq 0x4c8(%rsp), %rdi
callq 0x187a0
movsd %xmm0, 0x1e0(%rsp)
jmp 0x6dfaf
movsd 0x1e0(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x10(%rax)
leaq 0x480(%rsp), %rdi
xorl %esi, %esi
callq 0x32100
movq %rax, 0x1d8(%rsp)
jmp 0x6dfe2
movq 0x1d8(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0x1d0(%rsp)
jmp 0x6dffa
movsd 0x1d0(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x18(%rax)
leaq 0x480(%rsp), %rdi
xorl %esi, %esi
callq 0x32100
movq %rax, 0x1c8(%rsp)
jmp 0x6e02d
movq 0x1c8(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0x1c0(%rsp)
jmp 0x6e045
movsd 0x1c0(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x20(%rax)
leaq 0x480(%rsp), %rdi
xorl %esi, %esi
callq 0x32100
movq %rax, 0x1b8(%rsp)
jmp 0x6e078
movq 0x1b8(%rsp), %rdi
callq 0x31c90
movsd %xmm0, 0x1b0(%rsp)
jmp 0x6e090
movsd 0x1b0(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x28(%rax)
leaq 0x480(%rsp), %rdi
movl $0x1, %esi
callq 0x32100
movq %rax, 0x1a8(%rsp)
jmp 0x6e0c6
movq 0x1a8(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0x1a0(%rsp)
jmp 0x6e0de
movsd 0x1a0(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x30(%rax)
leaq 0x480(%rsp), %rdi
movl $0x1, %esi
callq 0x32100
movq %rax, 0x198(%rsp)
jmp 0x6e114
movq 0x198(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0x190(%rsp)
jmp 0x6e12c
movsd 0x190(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x38(%rax)
leaq 0x480(%rsp), %rdi
movl $0x1, %esi
callq 0x32100
movq %rax, 0x188(%rsp)
jmp 0x6e162
movq 0x188(%rsp), %rdi
callq 0x31c90
movsd %xmm0, 0x180(%rsp)
jmp 0x6e17a
movsd 0x180(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x40(%rax)
leaq 0x480(%rsp), %rdi
movl $0x2, %esi
callq 0x32100
movq %rax, 0x178(%rsp)
jmp 0x6e1b0
movq 0x178(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0x170(%rsp)
jmp 0x6e1c8
movsd 0x170(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x48(%rax)
leaq 0x480(%rsp), %rdi
movl $0x2, %esi
callq 0x32100
movq %rax, 0x168(%rsp)
jmp 0x6e1fe
movq 0x168(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0x160(%rsp)
jmp 0x6e216
movsd 0x160(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x50(%rax)
leaq 0x480(%rsp), %rdi
movl $0x2, %esi
callq 0x32100
movq %rax, 0x158(%rsp)
jmp 0x6e24c
movq 0x158(%rsp), %rdi
callq 0x31c90
movsd %xmm0, 0x150(%rsp)
jmp 0x6e264
movq 0x258(%rsp), %rax
movsd 0x150(%rsp), %xmm0
movq 0x20(%rax), %rcx
movsd %xmm0, 0x58(%rcx)
movsd 0x4e0(%rsp), %xmm0
movq 0x20(%rax), %rcx
movsd %xmm0, 0x60(%rcx)
movsd 0x4e8(%rsp), %xmm0
movq 0x20(%rax), %rcx
movsd %xmm0, 0x68(%rcx)
movsd 0x4f0(%rsp), %xmm0
movq 0x20(%rax), %rax
movsd %xmm0, 0x70(%rax)
leaq 0x378(%rsp), %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, 0x148(%rsp)
jmp 0x6e2cd
movq 0x148(%rsp), %rdi
xorl %esi, %esi
callq 0x1bde0
movq %rax, 0x140(%rsp)
jmp 0x6e2e6
movq 0x258(%rsp), %rax
movq 0x140(%rsp), %rcx
movsd (%rcx), %xmm0
movq 0x20(%rax), %rax
movsd %xmm0, 0x78(%rax)
leaq 0x378(%rsp), %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, 0x138(%rsp)
jmp 0x6e31c
movq 0x138(%rsp), %rdi
movl $0x1, %esi
callq 0x1bde0
movq %rax, 0x130(%rsp)
jmp 0x6e338
movq 0x258(%rsp), %rax
movq 0x130(%rsp), %rcx
movsd (%rcx), %xmm0
movq 0x20(%rax), %rax
movsd %xmm0, 0x80(%rax)
leaq 0x378(%rsp), %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, 0x128(%rsp)
jmp 0x6e371
movq 0x128(%rsp), %rdi
movl $0x2, %esi
callq 0x1bde0
movq %rax, 0x120(%rsp)
jmp 0x6e38d
movq 0x258(%rsp), %rax
movq 0x120(%rsp), %rcx
movsd (%rcx), %xmm0
movq 0x20(%rax), %rax
movsd %xmm0, 0x88(%rax)
leaq 0x378(%rsp), %rdi
movl $0x1, %esi
callq 0x1bda0
movq %rax, 0x118(%rsp)
jmp 0x6e3c9
movq 0x118(%rsp), %rdi
xorl %esi, %esi
callq 0x1bde0
movq %rax, 0x110(%rsp)
jmp 0x6e3e2
movq 0x258(%rsp), %rax
movq 0x110(%rsp), %rcx
movsd (%rcx), %xmm0
movq 0x20(%rax), %rax
movsd %xmm0, 0x90(%rax)
leaq 0x378(%rsp), %rdi
movl $0x1, %esi
callq 0x1bda0
movq %rax, 0x108(%rsp)
jmp 0x6e41e
movq 0x108(%rsp), %rdi
movl $0x1, %esi
callq 0x1bde0
movq %rax, 0x100(%rsp)
jmp 0x6e43a
movq 0x258(%rsp), %rax
movq 0x100(%rsp), %rcx
movsd (%rcx), %xmm0
movq 0x20(%rax), %rax
movsd %xmm0, 0x98(%rax)
leaq 0x378(%rsp), %rdi
movl $0x1, %esi
callq 0x1bda0
movq %rax, 0xf8(%rsp)
jmp 0x6e476
movq 0xf8(%rsp), %rdi
movl $0x2, %esi
callq 0x1bde0
movq %rax, 0xf0(%rsp)
jmp 0x6e492
movq 0x258(%rsp), %rax
movq 0xf0(%rsp), %rcx
movsd (%rcx), %xmm0
movq 0x20(%rax), %rax
movsd %xmm0, 0xa0(%rax)
movq 0x500(%rsp), %rax
movq %rax, 0xe8(%rsp)
cmpq $0x0, %rax
je 0x6e4d6
movq 0xe8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x378(%rsp), %rdi
callq 0x1b990
jmp 0x6ea14
movq 0x258(%rsp), %rax
movl $0x14, 0x28(%rax)
movslq 0x28(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x13030
movq %rax, %rcx
movq 0x258(%rsp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, 0x2f4(%rsp)
movq 0x258(%rsp), %rcx
movl 0x2f4(%rsp), %eax
cmpl 0x28(%rcx), %eax
jge 0x6e579
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x2f4(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl 0x2f4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2f4(%rsp)
jmp 0x6e536
movq 0x258(%rsp), %rax
movq 0x18(%rax), %rsi
leaq 0x270(%rsp), %rdi
movq %rdi, 0xd8(%rsp)
callq 0x3e060
movq 0xd8(%rsp), %rdi
movabsq $0x3f847ae147ae147b, %rax # imm = 0x3F847AE147AE147B
movq %rax, 0x268(%rsp)
movl $0x1, 0x264(%rsp)
callq 0x43aa0
movq %rax, 0xe0(%rsp)
jmp 0x6e5ce
movq 0xe0(%rsp), %rdi
callq 0x187b0
movsd %xmm0, 0xd0(%rsp)
jmp 0x6e5e6
movsd 0xd0(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, (%rax)
leaq 0x270(%rsp), %rdi
callq 0x43aa0
movq %rax, 0xc8(%rsp)
jmp 0x6e616
movq 0xc8(%rsp), %rdi
callq 0x187c0
movsd %xmm0, 0xc0(%rsp)
jmp 0x6e62e
movsd 0xc0(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x8(%rax)
leaq 0x270(%rsp), %rdi
callq 0x43aa0
movq %rax, 0xb8(%rsp)
jmp 0x6e65f
movq 0xb8(%rsp), %rdi
callq 0x187a0
movsd %xmm0, 0xb0(%rsp)
jmp 0x6e677
movsd 0xb0(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x10(%rax)
leaq 0x270(%rsp), %rdi
xorl %esi, %esi
callq 0x43ac0
movq %rax, 0xa8(%rsp)
jmp 0x6e6aa
movq 0xa8(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0xa0(%rsp)
jmp 0x6e6c2
movsd 0xa0(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x18(%rax)
leaq 0x270(%rsp), %rdi
xorl %esi, %esi
callq 0x43ac0
movq %rax, 0x98(%rsp)
jmp 0x6e6f5
movq 0x98(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0x90(%rsp)
jmp 0x6e70d
movsd 0x90(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x20(%rax)
leaq 0x270(%rsp), %rdi
xorl %esi, %esi
callq 0x43ac0
movq %rax, 0x88(%rsp)
jmp 0x6e740
movq 0x88(%rsp), %rdi
callq 0x31c90
movsd %xmm0, 0x80(%rsp)
jmp 0x6e758
movsd 0x80(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x28(%rax)
leaq 0x270(%rsp), %rdi
movl $0x1, %esi
callq 0x43ac0
movq %rax, 0x78(%rsp)
jmp 0x6e78b
movq 0x78(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0x70(%rsp)
jmp 0x6e79d
movsd 0x70(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x30(%rax)
leaq 0x270(%rsp), %rdi
movl $0x1, %esi
callq 0x43ac0
movq %rax, 0x68(%rsp)
jmp 0x6e7cd
movq 0x68(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0x60(%rsp)
jmp 0x6e7df
movsd 0x60(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x38(%rax)
leaq 0x270(%rsp), %rdi
movl $0x1, %esi
callq 0x43ac0
movq %rax, 0x58(%rsp)
jmp 0x6e80f
movq 0x58(%rsp), %rdi
callq 0x31c90
movsd %xmm0, 0x50(%rsp)
jmp 0x6e821
movsd 0x50(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x40(%rax)
leaq 0x270(%rsp), %rdi
movl $0x2, %esi
callq 0x43ac0
movq %rax, 0x48(%rsp)
jmp 0x6e851
movq 0x48(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0x40(%rsp)
jmp 0x6e863
movsd 0x40(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x48(%rax)
leaq 0x270(%rsp), %rdi
movl $0x2, %esi
callq 0x43ac0
movq %rax, 0x38(%rsp)
jmp 0x6e893
movq 0x38(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0x30(%rsp)
jmp 0x6e8a5
movsd 0x30(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x50(%rax)
leaq 0x270(%rsp), %rdi
movl $0x2, %esi
callq 0x43ac0
movq %rax, 0x28(%rsp)
jmp 0x6e8d5
movq 0x28(%rsp), %rdi
callq 0x31c90
movsd %xmm0, 0x20(%rsp)
jmp 0x6e8e7
movsd 0x20(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x58(%rax)
leaq 0x270(%rsp), %rdi
xorl %esi, %esi
callq 0x1c270
movsd %xmm0, 0x18(%rsp)
jmp 0x6e915
movsd 0x18(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x60(%rax)
leaq 0x270(%rsp), %rdi
movl $0x1, %esi
callq 0x1c270
movsd %xmm0, 0x10(%rsp)
jmp 0x6e946
movsd 0x10(%rsp), %xmm0
movq 0x258(%rsp), %rax
movq 0x20(%rax), %rax
movsd %xmm0, 0x68(%rax)
leaq 0x270(%rsp), %rdi
movl $0x2, %esi
callq 0x1c270
movsd %xmm0, 0x8(%rsp)
jmp 0x6e977
movq 0x258(%rsp), %rax
movsd 0x8(%rsp), %xmm0
movq 0x20(%rax), %rcx
movsd %xmm0, 0x70(%rcx)
movsd 0x268(%rsp), %xmm0
movq 0x20(%rax), %rcx
movsd %xmm0, 0x78(%rcx)
cvtsi2sdl 0x264(%rsp), %xmm0
movq 0x20(%rax), %rcx
movsd %xmm0, 0x80(%rcx)
movq 0x20(%rax), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, 0x88(%rcx)
movq 0x20(%rax), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, 0x90(%rcx)
movq 0x20(%rax), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x98(%rax)
leaq 0x270(%rsp), %rdi
callq 0x1bd00
jmp 0x6ea14
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x368(%rsp)
movl %eax, 0x364(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x1bd00
jmp 0x6ea3c
movq 0x258(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x6ea34
movq 0x258(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1bea0
addq $0x518, %rsp            # imm = 0x518
retq
movq 0x368(%rsp), %rdi
callq 0x13970
nopl (%rax)