// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::WriteBinaryStream(_IO_FILE*)
int R3SurfelScene::
WriteBinaryStream(FILE *fp) 
{
  // Write file header
  if (!WriteBinaryString(fp, "SSB 1.1", 16)) {
    RNFail("Unable to write to %s\n", filename);
    return 0;
  }

  // Write scene header
  WriteBinaryString(fp, name);
  WriteBinaryInteger(fp, tree->NNodes());
  WriteBinaryInteger(fp, NObjects());
  WriteBinaryInteger(fp, NLabels());
  WriteBinaryInteger(fp, NFeatures());
  WriteBinaryInteger(fp, NObjectRelationships());
  WriteBinaryInteger(fp, NLabelRelationships());
  WriteBinaryInteger(fp, NLabelAssignments());
  WriteBinaryInteger(fp, NScans());
  WriteBinaryInteger(fp, NObjectProperties());
  WriteBinaryInteger(fp, NLabelProperties());
  WriteBinaryInteger(fp, NImages());
  WriteBinaryInteger(fp, NComments());
  for (int j = 0; j < 3; j++) WriteBinaryInteger(fp, 0);

  // Write transformation
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      WriteBinaryDouble(fp, Transformation().Matrix()[i][j]);
    }
  }

  // Write comments
  for (int i = 0; i < NComments(); i++) {
    WriteBinaryString(fp, Comment(i));
  }

  // Write nodes
  for (int i = 0; i < tree->NNodes(); i++) {
    R3SurfelNode *node = tree->Node(i);
    int parent_index = (node->Parent()) ? node->Parent()->TreeIndex() : -1;
    WriteBinaryString(fp, node->Name());
    WriteBinaryInteger(fp, parent_index);
    WriteBinaryInteger(fp, node->NParts());
    WriteBinaryInteger(fp, node->NBlocks());
    WriteBinaryDouble(fp, node->Complexity());
    WriteBinaryDouble(fp, node->Resolution());
    for (int j = 0; j < 8; j++) WriteBinaryInteger(fp, 0);
    for (int j = 0; j < node->NBlocks(); j++) {
      R3SurfelBlock *block = node->Block(j);
      WriteBinaryInteger(fp, block->DatabaseIndex());
    }
  }

  // Write objects
  for (int i = 0; i < NObjects(); i++) {
    R3SurfelObject *object = Object(i);
    int parent_index = (object->Parent()) ? object->Parent()->SceneIndex() : -1;
    const R3SurfelFeatureVector& feature_vector = object->FeatureVector();
    WriteBinaryString(fp, object->Name());
    WriteBinaryInteger(fp, object->Identifier());
    WriteBinaryInteger(fp, parent_index);
    WriteBinaryInteger(fp, object->NParts());
    WriteBinaryInteger(fp, object->NNodes());
    WriteBinaryInteger(fp, feature_vector.NValues());
    WriteBinaryDouble(fp, object->Complexity());
    WriteBinaryInteger(fp, object->Flags());
    for (int j = 0; j < 7; j++) WriteBinaryInteger(fp, 0);
    for (int j = 0; j < feature_vector.NValues(); j++) {
      WriteBinaryDouble(fp, feature_vector.Value(j));
    }
    for (int j = 0; j < object->NNodes(); j++) {
      R3SurfelNode *node = object->Node(j);
      WriteBinaryInteger(fp, node->TreeIndex());
    }
  }

  // Write labels
  for (int i = 0; i < NLabels(); i++) {
    R3SurfelLabel *label = Label(i);
    const RNRgb& color = label->Color();
    int parent_index = (label->Parent()) ? label->Parent()->SceneIndex() : -1;
    WriteBinaryString(fp, label->Name());
    WriteBinaryInteger(fp, label->Identifier());
    WriteBinaryInteger(fp, label->AssignmentKeystroke());
    WriteBinaryInteger(fp, parent_index);
    WriteBinaryInteger(fp, label->NParts());
    WriteBinaryDouble(fp, color.R());
    WriteBinaryDouble(fp, color.G());
    WriteBinaryDouble(fp, color.B());
    WriteBinaryInteger(fp, label->Flags());
    for (int j = 0; j < 3; j++) WriteBinaryInteger(fp, 0);
  }

  // Write features
  for (int i = 0; i < NFeatures(); i++) {
    R3SurfelFeature *feature = Feature(i);
    WriteBinaryString(fp, feature->Name());
    WriteBinaryDouble(fp, feature->Minimum());
    WriteBinaryDouble(fp, feature->Maximum());
    WriteBinaryDouble(fp, feature->Weight());
    WriteBinaryInteger(fp, feature->Type());
    for (int j = 0; j < 4; j++) WriteBinaryInteger(fp, 0);
    if (feature->Type() == R3_SURFEL_OVERHEAD_GRID_FEATURE_TYPE) {
      WriteBinaryString(fp, ((R3SurfelOverheadGridFeature *) feature)->filename);
    }
  }

  // Write object relationships
  for (int i = 0; i < NObjectRelationships(); i++) {
    R3SurfelObjectRelationship *relationship = ObjectRelationship(i);
    WriteBinaryInteger(fp, relationship->Type());
    WriteBinaryInteger(fp, relationship->NObjects());
    WriteBinaryInteger(fp, relationship->NOperands());
    for (int j = 0; j < 4; j++) WriteBinaryInteger(fp, 0);
    for (int j = 0; j < relationship->NObjects(); j++) 
      WriteBinaryInteger(fp, relationship->Object(j)->SceneIndex());
    for (int j = 0; j < relationship->NOperands(); j++) 
      WriteBinaryDouble(fp, relationship->Operand(j));
  }

  // Write label relationships
  for (int i = 0; i < NLabelRelationships(); i++) {
    R3SurfelLabelRelationship *relationship = LabelRelationship(i);
    WriteBinaryInteger(fp, relationship->Type());
    WriteBinaryInteger(fp, relationship->NLabels());
    WriteBinaryInteger(fp, relationship->NOperands());
    for (int j = 0; j < 4; j++) WriteBinaryInteger(fp, 0);
    for (int j = 0; j < relationship->NLabels(); j++) 
      WriteBinaryInteger(fp, relationship->Label(j)->SceneIndex());
    for (int j = 0; j < relationship->NOperands(); j++) 
      WriteBinaryDouble(fp, relationship->Operand(j));
  }

  // Write assignments
  for (int i = 0; i < NLabelAssignments(); i++) {
    R3SurfelLabelAssignment *assignment = LabelAssignment(i);
    R3SurfelObject *object = assignment->Object();
    R3SurfelLabel *label = assignment->Label();
    WriteBinaryInteger(fp, object->SceneIndex());
    WriteBinaryInteger(fp, label->SceneIndex());
    WriteBinaryDouble(fp, assignment->Confidence());
    WriteBinaryInteger(fp, assignment->Originator());
    for (int j = 0; j < 4; j++) WriteBinaryInteger(fp, 0);
  }

  // Write scans
  for (int i = 0; i < NScans(); i++) {
    R3SurfelScan *scan = Scan(i);
    WriteBinaryString(fp, scan->Name());
    WriteBinaryDouble(fp, scan->Viewpoint().X());
    WriteBinaryDouble(fp, scan->Viewpoint().Y());
    WriteBinaryDouble(fp, scan->Viewpoint().Z());
    WriteBinaryDouble(fp, scan->Towards().X());
    WriteBinaryDouble(fp, scan->Towards().Y());
    WriteBinaryDouble(fp, scan->Towards().Z());
    WriteBinaryDouble(fp, scan->Up().X());
    WriteBinaryDouble(fp, scan->Up().Y());
    WriteBinaryDouble(fp, scan->Up().Z());
    WriteBinaryDouble(fp, scan->Timestamp());
    WriteBinaryInteger(fp, (scan->Node()) ? scan->Node()->TreeIndex() : -1);
    WriteBinaryInteger(fp, scan->ImageWidth());
    WriteBinaryInteger(fp, scan->ImageHeight());
    WriteBinaryDouble(fp, scan->XFocal());
    WriteBinaryDouble(fp, scan->ImageCenter().X());
    WriteBinaryDouble(fp, scan->ImageCenter().Y());
    WriteBinaryInteger(fp, scan->Flags());
    WriteBinaryDouble(fp, scan->YFocal());
    for (int j = 0; j < 4; j++) WriteBinaryInteger(fp, 0);
  }

  // Write images
  for (int i = 0; i < NImages(); i++) {
    R3SurfelImage *image = Image(i);
    WriteBinaryString(fp, image->Name());
    WriteBinaryDouble(fp, image->Viewpoint().X());
    WriteBinaryDouble(fp, image->Viewpoint().Y());
    WriteBinaryDouble(fp, image->Viewpoint().Z());
    WriteBinaryDouble(fp, image->Towards().X());
    WriteBinaryDouble(fp, image->Towards().Y());
    WriteBinaryDouble(fp, image->Towards().Z());
    WriteBinaryDouble(fp, image->Up().X());
    WriteBinaryDouble(fp, image->Up().Y());
    WriteBinaryDouble(fp, image->Up().Z());
    WriteBinaryDouble(fp, image->Timestamp());
    WriteBinaryInteger(fp, (image->scan) ? image->scan->SceneIndex() : -1);
    WriteBinaryInteger(fp, image->ImageWidth());
    WriteBinaryInteger(fp, image->ImageHeight());
    WriteBinaryDouble(fp, image->XFocal());
    WriteBinaryDouble(fp, image->YFocal());
    WriteBinaryDouble(fp, image->ImageCenter().X());
    WriteBinaryDouble(fp, image->ImageCenter().Y());
    WriteBinaryInteger(fp, image->Flags());
    WriteBinaryInteger(fp, image->DistortionType());
    WriteBinaryInteger(fp, (image->HasRollingShutter()) ? 1 : 0);
    for (int j = 0; j < 3; j++) WriteBinaryInteger(fp, 0);

    // Write extra image parameters
    if (image->DistortionType() != R3_SURFEL_NO_DISTORTION) {
      const RNScalar *radial_distortion = image->RadialDistortion();
      const RNScalar *tangential_distortion = image->TangentialDistortion();
      WriteBinaryDouble(fp, radial_distortion[0]);
      WriteBinaryDouble(fp, radial_distortion[1]);
      WriteBinaryDouble(fp, radial_distortion[2]);
      WriteBinaryDouble(fp, tangential_distortion[0]);
      WriteBinaryDouble(fp, tangential_distortion[1]);
    }
    if (image->HasRollingShutter()) {
      const R3CoordSystem *rs_poses = image->RollingShutterPoses();
      const RNScalar *rs_timestamps = image->RollingShutterTimestamps();
      R4Matrix camera_to_world0 = rs_poses[0].Matrix();
      R4Matrix camera_to_world1 = rs_poses[1].Matrix();
      R3Point viewpoint0 = camera_to_world0 * R3zero_point;
      R3Point viewpoint1 = camera_to_world1 * R3zero_point;
      R3Vector towards0 = camera_to_world0 * R3negz_vector;
      R3Vector towards1 = camera_to_world1 * R3negz_vector;
      R3Vector up0 = camera_to_world0 * R3posy_vector;
      R3Vector up1 = camera_to_world1 * R3posy_vector;
      WriteBinaryDouble(fp, viewpoint0.X());
      WriteBinaryDouble(fp, viewpoint0.Y());
      WriteBinaryDouble(fp, viewpoint0.Z());
      WriteBinaryDouble(fp, towards0.X());
      WriteBinaryDouble(fp, towards0.Y());
      WriteBinaryDouble(fp, towards0.Z());
      WriteBinaryDouble(fp, up0.X());
      WriteBinaryDouble(fp, up0.Y());
      WriteBinaryDouble(fp, up0.Z());
      WriteBinaryDouble(fp, viewpoint1.X());
      WriteBinaryDouble(fp, viewpoint1.Y());
      WriteBinaryDouble(fp, viewpoint1.Z());
      WriteBinaryDouble(fp, towards1.X());
      WriteBinaryDouble(fp, towards1.Y());
      WriteBinaryDouble(fp, towards1.Z());
      WriteBinaryDouble(fp, up1.X());
      WriteBinaryDouble(fp, up1.Y());
      WriteBinaryDouble(fp, up1.Z());
      WriteBinaryDouble(fp, rs_timestamps[0]);
      WriteBinaryDouble(fp, rs_timestamps[1]);
    }
  }

  // Write object properties
  for (int i = 0; i < NObjectProperties(); i++) {
    R3SurfelObjectProperty *property = ObjectProperty(i);
    WriteBinaryInteger(fp, property->Type());
    WriteBinaryInteger(fp, property->Object()->SceneIndex());
    WriteBinaryInteger(fp, property->NOperands());
    for (int j = 0; j < 4; j++) WriteBinaryInteger(fp, 0);
    for (int j = 0; j < property->NOperands(); j++) 
      WriteBinaryDouble(fp, property->Operand(j));
  }

  // Write label properties
  for (int i = 0; i < NLabelProperties(); i++) {
    R3SurfelLabelProperty *property = LabelProperty(i);
    WriteBinaryInteger(fp, property->Type());
    WriteBinaryInteger(fp, property->Label()->SceneIndex());
    WriteBinaryInteger(fp, property->NOperands());
    for (int j = 0; j < 4; j++) WriteBinaryInteger(fp, 0);
    for (int j = 0; j < property->NOperands(); j++) 
      WriteBinaryDouble(fp, property->Operand(j));
  }

  // Mark scene as clean
  flags.Remove(R3_SURFEL_SCENE_DIRTY_FLAG);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa961e(%rip), %rsi     # 0xc8912
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0x20010
testl %eax, %eax
je 0x1ffe5
movq 0x1d0(%rbx), %rsi
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x20010
movq 0x8(%rbx), %rax
movl 0x24(%rax), %esi
movq %r14, %rdi
callq 0x20091
movl 0x1c(%rbx), %esi
movq %r14, %rdi
callq 0x20091
movl 0x2c(%rbx), %esi
movq %r14, %rdi
callq 0x20091
movl 0xac(%rbx), %esi
movq %r14, %rdi
callq 0x20091
movl 0x5c(%rbx), %esi
movq %r14, %rdi
callq 0x20091
movl 0x6c(%rbx), %esi
movq %r14, %rdi
callq 0x20091
movl 0x7c(%rbx), %esi
movq %r14, %rdi
callq 0x20091
movl 0x8c(%rbx), %esi
movq %r14, %rdi
callq 0x20091
movl 0x3c(%rbx), %esi
movq %r14, %rdi
callq 0x20091
movl 0x4c(%rbx), %esi
movq %r14, %rdi
callq 0x20091
movl 0x9c(%rbx), %esi
movq %r14, %rdi
callq 0x20091
movl 0x1e4(%rbx), %esi
movq %r14, %rdi
callq 0x20091
pushq $0x3
popq %rbp
subl $0x1, %ebp
jb 0x1f3c3
movq %r14, %rdi
xorl %esi, %esi
callq 0x20091
jmp 0x1f3b2
leaq 0xb8(%rbx), %r15
xorl %r12d, %r12d
cmpq $0x4, %r12
je 0x1f3f8
xorl %r13d, %r13d
cmpq $0x4, %r13
je 0x1f3ef
movsd (%r15,%r13,8), %xmm0
movq %r14, %rdi
callq 0x200be
incq %r13
jmp 0x1f3d6
incq %r12
addq $0x20, %r15
jmp 0x1f3cd
xorl %r15d, %r15d
movslq 0x1e4(%rbx), %rax
cmpq %rax, %r15
jge 0x1f424
movq 0x1d8(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x20010
incq %r15
jmp 0x1f3fb
xorl %r12d, %r12d
pushq $0x8
popq %r13
movq 0x8(%rbx), %rax
movslq 0x24(%rax), %rcx
cmpq %rcx, %r12
jge 0x1f4eb
movq 0x18(%rax), %rax
movq (%rax,%r12,8), %r15
movq 0x28(%r15), %rax
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x1f453
movl 0x20(%rax), %ebp
movq 0xb8(%r15), %rsi
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x20010
movq %r14, %rdi
movl %ebp, %esi
callq 0x20091
movl 0x3c(%r15), %esi
movq %r14, %rdi
callq 0x20091
movl 0x4c(%r15), %esi
movq %r14, %rdi
callq 0x20091
movq %r15, %rdi
callq 0x3365c
movq %r14, %rdi
callq 0x200be
movq %r15, %rdi
callq 0x33680
movq %r14, %rdi
callq 0x200be
movl %r13d, %ebp
subl $0x1, %ebp
jb 0x1f4bd
movq %r14, %rdi
xorl %esi, %esi
callq 0x20091
jmp 0x1f4ac
xorl %ebp, %ebp
movslq 0x4c(%r15), %rax
cmpq %rax, %rbp
jge 0x1f4e3
movq 0x40(%r15), %rax
movq (%rax,%rbp,8), %rax
movl 0xa0(%rax), %esi
movq %r14, %rdi
callq 0x20091
incq %rbp
jmp 0x1f4bf
incq %r12
jmp 0x1f42b
xorl %r13d, %r13d
movslq 0x1c(%rbx), %rax
cmpq %rax, %r13
jge 0x1f5f5
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %r15
movq 0x18(%r15), %rax
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x1f512
movl 0x10(%rax), %ebp
movq %r15, %rdi
callq 0x16a48
movq %rax, %r12
movq 0x88(%r15), %rsi
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x20010
movq %r15, %rdi
callq 0x1683e
movq %r14, %rdi
movl %eax, %esi
callq 0x20091
movq %r14, %rdi
movl %ebp, %esi
callq 0x20091
movl 0x2c(%r15), %esi
movq %r14, %rdi
callq 0x20091
movl 0x6c(%r15), %esi
movq %r14, %rdi
callq 0x20091
movl 0x10(%r12), %esi
movq %r14, %rdi
callq 0x20091
movsd 0x98(%r15), %xmm0
movq %r14, %rdi
callq 0x200be
movl 0xe8(%r15), %esi
movq %r14, %rdi
callq 0x20091
pushq $0x7
popq %rbp
subl $0x1, %ebp
jb 0x1f5a6
movq %r14, %rdi
xorl %esi, %esi
callq 0x20091
jmp 0x1f595
xorl %ebp, %ebp
movslq 0x10(%r12), %rax
cmpq %rax, %rbp
jge 0x1f5c9
movq 0x8(%r12), %rax
movsd (%rax,%rbp,8), %xmm0
movq %r14, %rdi
callq 0x200be
incq %rbp
jmp 0x1f5a8
xorl %r12d, %r12d
movslq 0x6c(%r15), %rax
cmpq %rax, %r12
jge 0x1f5ed
movq 0x60(%r15), %rax
movq (%rax,%r12,8), %rax
movl 0x20(%rax), %esi
movq %r14, %rdi
callq 0x20091
incq %r12
jmp 0x1f5cc
incq %r13
jmp 0x1f4ee
xorl %r12d, %r12d
pushq $0x3
popq %r13
movslq 0x2c(%rbx), %rax
cmpq %rax, %r12
jge 0x1f6bd
movq 0x20(%rbx), %rax
movq (%rax,%r12,8), %r15
movq 0x18(%r15), %rax
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x1f620
movl 0x10(%rax), %ebp
movq 0x60(%r15), %rsi
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x20010
movq %r15, %rdi
callq 0x3b59e
movq %r14, %rdi
movl %eax, %esi
callq 0x20091
movl 0x6c(%r15), %esi
movq %r14, %rdi
callq 0x20091
movq %r14, %rdi
movl %ebp, %esi
callq 0x20091
movl 0x2c(%r15), %esi
movq %r14, %rdi
callq 0x20091
movsd 0x70(%r15), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x78(%r15), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x80(%r15), %xmm0
movq %r14, %rdi
callq 0x200be
movl 0x88(%r15), %esi
movq %r14, %rdi
callq 0x20091
movl %r13d, %ebp
subl $0x1, %ebp
jb 0x1f6b5
movq %r14, %rdi
xorl %esi, %esi
callq 0x20091
jmp 0x1f6a4
incq %r12
jmp 0x1f5fc
xorl %r12d, %r12d
pushq $0x4
popq %rbp
movslq 0xac(%rbx), %rax
cmpq %rax, %r12
jge 0x1f768
movq 0xa0(%rbx), %rax
movq (%rax,%r12,8), %r15
movq 0x18(%r15), %rsi
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x20010
movsd 0x20(%r15), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x28(%r15), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x30(%r15), %xmm0
movq %r14, %rdi
callq 0x200be
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movl %eax, %esi
callq 0x20091
movl %ebp, %r13d
subl $0x1, %r13d
jb 0x1f741
movq %r14, %rdi
xorl %esi, %esi
callq 0x20091
jmp 0x1f72f
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
cmpl $0x3, %eax
jne 0x1f760
movq 0x48(%r15), %rsi
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x20010
incq %r12
jmp 0x1f6c3
xorl %r15d, %r15d
pushq $0x4
popq %rbp
movslq 0x5c(%rbx), %rax
cmpq %rax, %r15
jge 0x1f812
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %r12
movl 0x34(%r12), %esi
movq %r14, %rdi
callq 0x20091
movl 0x24(%r12), %esi
movq %r14, %rdi
callq 0x20091
movl 0x30(%r12), %esi
movq %r14, %rdi
callq 0x20091
movl %ebp, %r13d
subl $0x1, %r13d
jb 0x1f7bf
movq %r14, %rdi
xorl %esi, %esi
callq 0x20091
jmp 0x1f7ad
xorl %r13d, %r13d
movslq 0x24(%r12), %rax
cmpq %rax, %r13
jge 0x1f7e5
movq 0x18(%r12), %rax
movq (%rax,%r13,8), %rax
movl 0x10(%rax), %esi
movq %r14, %rdi
callq 0x20091
incq %r13
jmp 0x1f7c2
xorl %r13d, %r13d
movslq 0x30(%r12), %rax
cmpq %rax, %r13
jge 0x1f80a
movq 0x28(%r12), %rax
movsd (%rax,%r13,8), %xmm0
movq %r14, %rdi
callq 0x200be
incq %r13
jmp 0x1f7e8
incq %r15
jmp 0x1f76e
xorl %r15d, %r15d
pushq $0x4
popq %rbp
movslq 0x6c(%rbx), %rax
cmpq %rax, %r15
jge 0x1f8bc
movq 0x60(%rbx), %rax
movq (%rax,%r15,8), %r12
movl 0x34(%r12), %esi
movq %r14, %rdi
callq 0x20091
movl 0x24(%r12), %esi
movq %r14, %rdi
callq 0x20091
movl 0x30(%r12), %esi
movq %r14, %rdi
callq 0x20091
movl %ebp, %r13d
subl $0x1, %r13d
jb 0x1f869
movq %r14, %rdi
xorl %esi, %esi
callq 0x20091
jmp 0x1f857
xorl %r13d, %r13d
movslq 0x24(%r12), %rax
cmpq %rax, %r13
jge 0x1f88f
movq 0x18(%r12), %rax
movq (%rax,%r13,8), %rax
movl 0x10(%rax), %esi
movq %r14, %rdi
callq 0x20091
incq %r13
jmp 0x1f86c
xorl %r13d, %r13d
movslq 0x30(%r12), %rax
cmpq %rax, %r13
jge 0x1f8b4
movq 0x28(%r12), %rax
movsd (%rax,%r13,8), %xmm0
movq %r14, %rdi
callq 0x200be
incq %r13
jmp 0x1f892
incq %r15
jmp 0x1f818
xorl %r15d, %r15d
pushq $0x4
popq %rbp
movslq 0x7c(%rbx), %rax
cmpq %rax, %r15
jge 0x1f92a
movq 0x70(%rbx), %rax
movq (%rax,%r15,8), %r12
movq 0x18(%r12), %rax
movq 0x28(%r12), %r13
movl 0x10(%rax), %esi
movq %r14, %rdi
callq 0x20091
movl 0x10(%r13), %esi
movq %r14, %rdi
callq 0x20091
movsd 0x38(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movl 0x40(%r12), %esi
movq %r14, %rdi
callq 0x20091
movl %ebp, %r12d
subl $0x1, %r12d
jb 0x1f925
movq %r14, %rdi
xorl %esi, %esi
callq 0x20091
jmp 0x1f913
incq %r15
jmp 0x1f8c2
xorl %r13d, %r13d
leaq 0x98(%rsp), %r15
movslq 0x8c(%rbx), %rax
cmpq %rax, %r13
jge 0x1fab7
movq 0x80(%rbx), %rax
movq (%rax,%r13,8), %rbp
movq 0xb8(%rbp), %rsi
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x20010
movsd 0x28(%rbp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x30(%rbp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x38(%rbp), %xmm0
movq %r14, %rdi
callq 0x200be
leaq 0x70(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x792e2
movsd 0x98(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movq %r15, %rdi
movq %r12, %rsi
callq 0x792e2
movsd 0xa0(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movq %r15, %rdi
movq %r12, %rsi
callq 0x792e2
movsd 0xa8(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x58(%rbp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x60(%rbp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x68(%rbp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x88(%rbp), %xmm0
movq %r14, %rdi
callq 0x200be
movq 0x18(%rbp), %rax
pushq $-0x1
popq %rsi
testq %rax, %rax
je 0x1fa29
movl 0x20(%rax), %esi
movq %r14, %rdi
callq 0x20091
movl 0x90(%rbp), %esi
movq %r14, %rdi
callq 0x20091
movl 0x94(%rbp), %esi
movq %r14, %rdi
callq 0x20091
movsd 0xa8(%rbp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x98(%rbp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0xa0(%rbp), %xmm0
movq %r14, %rdi
callq 0x200be
movl 0xc0(%rbp), %esi
movq %r14, %rdi
callq 0x20091
movsd 0xb0(%rbp), %xmm0
movq %r14, %rdi
callq 0x200be
pushq $0x4
popq %rbp
subl $0x1, %ebp
jb 0x1faaf
movq %r14, %rdi
xorl %esi, %esi
callq 0x20091
jmp 0x1fa9e
incq %r13
jmp 0x1f935
movq $0x0, (%rsp)
leaq 0x98(%rsp), %r13
movslq 0x9c(%rbx), %rax
cmpq %rax, (%rsp)
jge 0x1fed9
movq 0x90(%rbx), %rax
movq (%rsp), %rcx
movq (%rax,%rcx,8), %r12
movq 0x1c0(%r12), %rsi
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x20010
movsd 0x30(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x38(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x40(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
leaq 0x78(%r12), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x792e2
movsd 0x98(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movq %r13, %rdi
movq %rbp, %rsi
callq 0x792e2
movsd 0xa0(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movq %r13, %rdi
movq %rbp, %rsi
callq 0x792e2
movsd 0xa8(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x60(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x68(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x70(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x90(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movq 0x18(%r12), %rax
pushq $-0x1
popq %rsi
testq %rax, %rax
je 0x1fbd1
movl 0x10(%rax), %esi
movq %r14, %rdi
callq 0x20091
movl 0x98(%r12), %esi
movq %r14, %rdi
callq 0x20091
movl 0x9c(%r12), %esi
movq %r14, %rdi
callq 0x20091
movsd 0xb0(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0xb8(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0xa0(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0xa8(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movl 0x1c8(%r12), %esi
movq %r14, %rdi
callq 0x20091
movl 0xc0(%r12), %esi
movq %r14, %rdi
callq 0x20091
movl 0x1c8(%r12), %esi
andl $0x1, %esi
movq %r14, %rdi
callq 0x20091
pushq $0x3
popq %rbp
subl $0x1, %ebp
jb 0x1fc88
movq %r14, %rdi
xorl %esi, %esi
callq 0x20091
jmp 0x1fc77
cmpl $0x0, 0xc0(%r12)
je 0x1fced
movsd 0xc8(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0xd0(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0xd8(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0xe0(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0xe8(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
testb $0x1, 0x1c8(%r12)
je 0x1fed0
leaq 0xf0(%r12), %rsi
movq %r13, %rdi
callq 0x66f38
leaq 0x150(%r12), %rsi
leaq 0x118(%rsp), %rdi
callq 0x66f38
leaq 0x80(%rsp), %rdi
movq %r13, %rsi
movq %rbx, %rbp
leaq 0x50695a(%rip), %rbx    # 0x526690
movq %rbx, %rdx
callq 0x6a31b
leaq 0x68(%rsp), %rdi
leaq 0x118(%rsp), %r15
movq %r15, %rsi
movq %rbx, %rdx
movq %rbp, %rbx
callq 0x6a31b
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
leaq 0xb0498(%rip), %rbp     # 0xd0200
movq %rbp, %rdx
callq 0x6a2a3
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x6a2a3
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
leaq 0xb0411(%rip), %rbp     # 0xd01a0
movq %rbp, %rdx
callq 0x6a2a3
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x6a2a3
movsd 0x80(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x88(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x90(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x50(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x58(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x60(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x20(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x28(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x30(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x68(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x70(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x78(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x38(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x40(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x48(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x8(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x10(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x18(%rsp), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x1b0(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
movsd 0x1b8(%r12), %xmm0
movq %r14, %rdi
callq 0x200be
incq (%rsp)
jmp 0x1fac7
xorl %r15d, %r15d
pushq $0x4
popq %rbp
movslq 0x3c(%rbx), %rax
cmpq %rax, %r15
jge 0x1ff59
movq 0x30(%rbx), %rax
movq (%rax,%r15,8), %r12
movl 0x2c(%r12), %esi
movq %r14, %rdi
callq 0x20091
movq 0x18(%r12), %rax
movl 0x10(%rax), %esi
movq %r14, %rdi
callq 0x20091
movl 0x28(%r12), %esi
movq %r14, %rdi
callq 0x20091
movl %ebp, %r13d
subl $0x1, %r13d
jb 0x1ff2f
movq %r14, %rdi
xorl %esi, %esi
callq 0x20091
jmp 0x1ff1d
xorl %r13d, %r13d
movslq 0x28(%r12), %rax
cmpq %rax, %r13
jge 0x1ff54
movq 0x20(%r12), %rax
movsd (%rax,%r13,8), %xmm0
movq %r14, %rdi
callq 0x200be
incq %r13
jmp 0x1ff32
incq %r15
jmp 0x1fedf
xorl %r15d, %r15d
pushq $0x4
popq %rbp
movslq 0x4c(%rbx), %rax
cmpq %rax, %r15
jge 0x1ffd9
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %r12
movl 0x2c(%r12), %esi
movq %r14, %rdi
callq 0x20091
movq 0x18(%r12), %rax
movl 0x10(%rax), %esi
movq %r14, %rdi
callq 0x20091
movl 0x28(%r12), %esi
movq %r14, %rdi
callq 0x20091
movl %ebp, %r13d
subl $0x1, %r13d
jb 0x1ffaf
movq %r14, %rdi
xorl %esi, %esi
callq 0x20091
jmp 0x1ff9d
xorl %r13d, %r13d
movslq 0x28(%r12), %rax
cmpq %rax, %r13
jge 0x1ffd4
movq 0x20(%r12), %rax
movsd (%rax,%r13,8), %xmm0
movq %r14, %rdi
callq 0x200be
incq %r13
jmp 0x1ffb2
incq %r15
jmp 0x1ff5f
andb $-0x2, 0x1e8(%rbx)
pushq $0x1
popq %rbx
jmp 0x1fffc
movq 0x1c0(%rbx), %rsi
leaq 0xa8927(%rip), %rdi     # 0xc891a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x9ce26
movl %ebx, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq