// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::WriteAsciiStream(_IO_FILE*)
int R3SurfelScene::
WriteAsciiStream(FILE *fp)
{
  // Write header
  fprintf(fp, "SSA 1.1\n");

  // Write scene header
  WriteAsciiString(fp, name);
  fprintf(fp, " %d %d %d %d %d %d %d %d %d %d %d %d", 
    tree->NNodes(), NObjects(), NLabels(), NFeatures(),
    NObjectRelationships(), NLabelRelationships(), 
    NLabelAssignments(), NScans(), 
    NObjectProperties(), NLabelProperties(),
    NImages(), NComments());
  for (int j = 0; j < 3; j++) fprintf(fp, " 0");
  fprintf(fp, "\n");

  // Write transformation
  fprintf(fp, "T");
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      fprintf(fp, " %g", Transformation().Matrix()[i][j]);
    }
  }
  fprintf(fp, "\n");

  // Write comments
  for (int i = 0; i < NComments(); i++) {
    fprintf(fp, "C ");
    WriteAsciiString(fp, Comment(i));
    fprintf(fp, "\n");
  }

  // Write nodes
  for (int i = 0; i < tree->NNodes(); i++) {
    R3SurfelNode *node = tree->Node(i);
    int parent_index = (node->Parent()) ? node->Parent()->TreeIndex() : -1;
    fprintf(fp, "N ");
    WriteAsciiString(fp, node->Name());
    fprintf(fp, " %d %d %d %d %g %g", parent_index, node->NParts(), node->NBlocks(), 0, node->Complexity(), node->Resolution());
    for (int j = 0; j < 8; j++) fprintf(fp, " 0");
    fprintf(fp, "\n");
    for (int j = 0; j < node->NBlocks(); j++) {
      R3SurfelBlock *block = node->Block(j);
      fprintf(fp, "%d ", block->DatabaseIndex());
    }
    fprintf(fp, "\n");
  }

  // 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();
    const R3SurfelFeatureVector& feature_vector = object->feature_vector;
    fprintf(fp, "O ");
    WriteAsciiString(fp, object->Name());
    fprintf(fp, " %d %d %d %d %d %g %u", object->Identifier(), parent_index, object->NParts(), object->NNodes(), 
            feature_vector.NValues(), object->Complexity(), (unsigned int) object->Flags());
    for (int j = 0; j < 7; j++) fprintf(fp, " 0");
    fprintf(fp, "\n");
    for (int j = 0; j < feature_vector.NValues(); j++) {
      fprintf(fp, "%g ", feature_vector.Value(j));
    }
    fprintf(fp, "\n");
    for (int j = 0; j < object->NNodes(); j++) {
      R3SurfelNode *node = object->Node(j);
      fprintf(fp, "%d ", node->TreeIndex());
    }
    fprintf(fp, "\n");
  }

  // Write labels
  for (int i = 0; i < NLabels(); i++) {
    R3SurfelLabel *label = Label(i);
    int dummy = 0;
    const RNRgb& color = label->Color();
    int parent_index = (label->Parent()) ? label->Parent()->SceneIndex() : -1;
    fprintf(fp, "L ");
    WriteAsciiString(fp, label->Name());
    fprintf(fp, " %d %d %d %d %d %g %g %g %u", label->Identifier(), label->AssignmentKeystroke(), 
      dummy, parent_index, label->NParts(), color.R(), color.G(), color.B(),
      (unsigned int) label->Flags());
    for (int j = 0; j < 3; j++) fprintf(fp, " 0");
    fprintf(fp, "\n");
  }

  // Write features
  for (int i = 0; i < NFeatures(); i++) {
    R3SurfelFeature *feature = Feature(i);
    fprintf(fp, "F ");
    WriteAsciiString(fp, feature->Name());
    fprintf(fp, " %g %g %g %d %d", feature->Minimum(), feature->Maximum(), feature->Weight(), feature->Type(), 1);
    for (int j = 0; j < 1; j++) fprintf(fp, " 0");
    fprintf(fp, "\n");
    if (feature->Type() == R3_SURFEL_OVERHEAD_GRID_FEATURE_TYPE) {
      const char *filename = ((R3SurfelOverheadGridFeature *) feature)->filename;
      fprintf(fp, "%s\n", (filename) ? filename : "None");
    }
  }

  // Write object relationships
  for (int i = 0; i < NObjectRelationships(); i++) {
    R3SurfelObjectRelationship *relationship = ObjectRelationship(i);
    fprintf(fp, "OR %d %d %d", relationship->Type(), relationship->NObjects(), relationship->NOperands());
    for (int j = 0; j < 4; j++) fprintf(fp, " 0");
    for (int j = 0; j < relationship->NObjects(); j++) fprintf(fp, " %d", relationship->Object(j)->SceneIndex());
    fprintf(fp, "\n");
    for (int j = 0; j < relationship->NOperands(); j++) fprintf(fp, " %g", relationship->Operand(j));
    fprintf(fp, "\n");
    fprintf(fp, "\n");
  }

  // Write label relationships
  for (int i = 0; i < NLabelRelationships(); i++) {
    R3SurfelLabelRelationship *relationship = LabelRelationship(i);
    fprintf(fp, "LR %d %d %d", relationship->Type(), relationship->NLabels(), relationship->NOperands());
    for (int j = 0; j < 4; j++) fprintf(fp, " 0");
    for (int j = 0; j < relationship->NLabels(); j++) fprintf(fp, " %d", relationship->Label(j)->SceneIndex());
    fprintf(fp, "\n");
    for (int j = 0; j < relationship->NOperands(); j++) fprintf(fp, " %g", relationship->Operand(j));
    fprintf(fp, "\n");
    fprintf(fp, "\n");
  }

  // Write assignments
  for (int i = 0; i < NLabelAssignments(); i++) {
    R3SurfelLabelAssignment *assignment = LabelAssignment(i);
    R3SurfelObject *object = assignment->Object();
    R3SurfelLabel *label = assignment->Label();
    fprintf(fp, "A %d %d %g %d", object->SceneIndex(), label->SceneIndex(), assignment->Confidence(), assignment->Originator());
    for (int j = 0; j < 4; j++) fprintf(fp, " 0");
    fprintf(fp, "\n");
  }

  // Write scans
  for (int i = 0; i < NScans(); i++) {
    R3SurfelScan *scan = Scan(i);
    R3Point viewpoint = scan->Viewpoint();
    R3Vector towards = scan->Towards();
    R3Vector up = scan->Up();
    fprintf(fp, "S ");
    WriteAsciiString(fp, scan->Name());
    fprintf(fp, " %g %g %g", viewpoint.X(), viewpoint.Y(), viewpoint.Z());
    fprintf(fp, " %g %g %g", towards.X(), towards.Y(), towards.Z());
    fprintf(fp, " %g %g %g", up.X(), up.Y(), up.Z());
    fprintf(fp, " %.6f %d", scan->Timestamp(), (scan->Node()) ? scan->Node()->TreeIndex() : -1);
    fprintf(fp, " %d %d ", scan->ImageWidth(), scan->ImageHeight());
    fprintf(fp, " %g %g %g ", scan->XFocal(), scan->ImageCenter().X(), scan->ImageCenter().Y());
    fprintf(fp, " %u ", (unsigned int) scan->Flags());
    fprintf(fp, " %g ", scan->YFocal());
    for (int j = 0; j < 1; j++) fprintf(fp, " 0");
    fprintf(fp, "\n");
  }

  // Write images
  for (int i = 0; i < NImages(); i++) {
    R3SurfelImage *image = Image(i);
    R3Point viewpoint = image->Viewpoint();
    R3Vector towards = image->Towards();
    R3Vector up = image->Up();
    fprintf(fp, "I ");
    WriteAsciiString(fp, image->Name());
    fprintf(fp, " %g %g %g", viewpoint.X(), viewpoint.Y(), viewpoint.Z());
    fprintf(fp, " %g %g %g", towards.X(), towards.Y(), towards.Z());
    fprintf(fp, " %g %g %g", up.X(), up.Y(), up.Z());
    fprintf(fp, " %.6f", image->Timestamp());
    fprintf(fp, " %d ", (image->Scan()) ? image->Scan()->SceneIndex() : -1);
    fprintf(fp, " %d %d ", image->ImageWidth(), image->ImageHeight());
    fprintf(fp, " %g %g ", image->XFocal(), image->YFocal());
    fprintf(fp, " %g %g ", image->ImageCenter().X(), image->ImageCenter().Y());
    fprintf(fp, " %u ", (unsigned int) image->Flags());
    fprintf(fp, " %d ", image->DistortionType());
    fprintf(fp, " %d ", (image->HasRollingShutter()) ? 1 : 0);
    for (int j = 0; j < 2; j++) fprintf(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();
      fprintf(fp, "%g %g %g ", radial_distortion[0], radial_distortion[1], radial_distortion[2]);
      fprintf(fp, "%g %g ", tangential_distortion[0], 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;
      fprintf(fp, " %g %g %g ", viewpoint0.X(), viewpoint0.Y(), viewpoint0.Z());
      fprintf(fp, " %g %g %g ", towards0.X(), towards0.Y(), towards0.Z());
      fprintf(fp, " %g %g %g ", up0.X(), up0.Y(), up0.Z());
      fprintf(fp, " %g %g %g ", viewpoint1.X(), viewpoint1.Y(), viewpoint1.Z());
      fprintf(fp, " %g %g %g ", towards1.X(), towards1.Y(), towards1.Z());
      fprintf(fp, " %g %g %g ", up1.X(), up1.Y(), up1.Z());
      fprintf(fp, " %.9f %.9f ", rs_timestamps[0], rs_timestamps[1]);
    }
    fprintf(fp, "\n");
  }

  // Write object properties
  for (int i = 0; i < NObjectProperties(); i++) {
    R3SurfelObjectProperty *property = ObjectProperty(i);
    fprintf(fp, "OP %d %d %d", property->Type(), property->Object()->SceneIndex(), property->NOperands());
    for (int j = 0; j < 4; j++) fprintf(fp, " 0");
    fprintf(fp, "\n");
    for (int j = 0; j < property->NOperands(); j++) fprintf(fp, " %g", property->Operand(j));
    fprintf(fp, "\n");
    fprintf(fp, "\n");
  }

  // Write label properties
  for (int i = 0; i < NLabelProperties(); i++) {
    R3SurfelLabelProperty *property = LabelProperty(i);
    fprintf(fp, "LP %d %d %d", property->Type(), property->Label()->SceneIndex(), property->NOperands());
    for (int j = 0; j < 4; j++) fprintf(fp, " 0");
    fprintf(fp, "\n");
    for (int j = 0; j < property->NOperands(); j++) fprintf(fp, " %g", property->Operand(j));
    fprintf(fp, "\n");
    fprintf(fp, "\n");
  }

  // 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 $0x1f8, %rsp            # imm = 0x1F8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc0e5d(%rip), %rdi     # 0xde7d1
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x139a0
movq 0x1d0(%rbx), %rsi
movq %r14, %rdi
callq 0x1e9d4
movq 0x8(%rbx), %rax
movl 0x24(%rax), %edx
movl 0x1c(%rbx), %ecx
movl 0x2c(%rbx), %r8d
movl 0xac(%rbx), %r9d
movl 0x5c(%rbx), %eax
movq %rax, 0x8(%rsp)
movl 0x6c(%rbx), %eax
movq %rax, 0x10(%rsp)
movl 0x7c(%rbx), %r11d
movl 0x8c(%rbx), %r15d
movl 0x3c(%rbx), %r12d
movl 0x4c(%rbx), %r13d
movl 0x9c(%rbx), %ebp
movq %rbx, (%rsp)
movl 0x1e4(%rbx), %r10d
leaq 0xc0df5(%rip), %rsi     # 0xde7da
movq %r14, %rdi
xorl %eax, %eax
pushq %r10
pushq %rbp
pushq %r13
pushq %r12
pushq %r15
pushq %r11
pushq 0x40(%rsp)
pushq 0x40(%rsp)
callq 0x13740
addq $0x40, %rsp
movl $0x3, %ebp
leaq 0xccca4(%rip), %rbx     # 0xea6b6
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rcx
callq 0x139a0
decl %ebp
jne 0x1da12
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
movl $0x54, %edi
movq %r14, %rsi
callq 0x13670
movq (%rsp), %rax
leaq 0xb8(%rax), %rbx
xorl %r12d, %r12d
leaq 0xc0dba(%rip), %r15     # 0xde814
xorl %r13d, %r13d
movsd (%rbx,%r13,8), %xmm0
movq %r14, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x13740
incq %r13
cmpq $0x4, %r13
jne 0x1da5d
incq %r12
addq $0x20, %rbx
cmpq $0x4, %r12
jne 0x1da5a
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
movq (%rsp), %rdx
cmpl $0x0, 0x1e4(%rdx)
jle 0x1daf5
xorl %ebx, %ebx
leaq 0xc0d56(%rip), %r15     # 0xde7ff
movl $0x2, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rcx
callq 0x139a0
movq (%rsp), %rax
movq 0x1d8(%rax), %rax
movq (%rax,%rbx,8), %rsi
movq %r14, %rdi
callq 0x1e9d4
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
movq (%rsp), %rdx
incq %rbx
movslq 0x1e4(%rdx), %rax
cmpq %rax, %rbx
jl 0x1daa9
movq 0x8(%rdx), %rax
cmpl $0x0, 0x24(%rax)
jle 0x1dc2a
leaq 0xccbac(%rip), %r13     # 0xea6b6
leaq 0xc0d92(%rip), %rbp     # 0xde8a3
xorl %ebx, %ebx
movq 0x18(%rax), %rax
movq (%rax,%rbx,8), %r15
movq 0x28(%r15), %rax
testq %rax, %rax
je 0x1db2d
movl 0x20(%rax), %eax
movl %eax, 0x8(%rsp)
jmp 0x1db35
movl $0xffffffff, 0x8(%rsp)  # imm = 0xFFFFFFFF
movl $0x2, %esi
movl $0x1, %edx
leaq 0xc0cbc(%rip), %rdi     # 0xde802
movq %r14, %rcx
callq 0x139a0
movq 0xb8(%r15), %rsi
movq %r14, %rdi
callq 0x1e9d4
movl 0x3c(%r15), %eax
movl %eax, 0x10(%rsp)
movl 0x4c(%r15), %r12d
movq %r15, %rdi
callq 0x3770e
movsd %xmm0, 0x18(%rsp)
movq %r15, %rdi
callq 0x37730
movaps %xmm0, %xmm1
movq %r14, %rdi
leaq 0xc0c79(%rip), %rsi     # 0xde805
movl 0x8(%rsp), %edx
movl 0x10(%rsp), %ecx
movl %r12d, %r8d
xorl %r9d, %r9d
movsd 0x18(%rsp), %xmm0
movb $0x2, %al
callq 0x13740
movl $0x8, %r12d
movl $0x2, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %r14, %rcx
callq 0x139a0
decl %r12d
jne 0x1dbad
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
cmpl $0x0, 0x4c(%r15)
jle 0x1dc05
xorl %r12d, %r12d
movq 0x40(%r15), %rax
movq (%rax,%r12,8), %rax
movl 0xa0(%rax), %edx
movq %r14, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x13740
incq %r12
movslq 0x4c(%r15), %rax
cmpq %rax, %r12
jl 0x1dbde
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
incq %rbx
movq (%rsp), %rdx
movq 0x8(%rdx), %rax
movslq 0x24(%rax), %rcx
cmpq %rcx, %rbx
jl 0x1db13
cmpl $0x0, 0x1c(%rdx)
jle 0x1dda0
leaq 0xcca7b(%rip), %r13     # 0xea6b6
leaq 0xc0c6c(%rip), %rbp     # 0xde8ae
leaq 0xc0c5a(%rip), %r15     # 0xde8a3
xorl %ecx, %ecx
movq 0x10(%rdx), %rax
movq (%rax,%rcx,8), %r12
movq 0x18(%r12), %rax
testq %rax, %rax
movq %rcx, 0x8(%rsp)
je 0x1dc67
movl 0x10(%rax), %ebx
jmp 0x1dc6c
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0x2, %esi
movl $0x1, %edx
leaq 0xc0b9b(%rip), %rdi     # 0xde818
movq %r14, %rcx
callq 0x139a0
movq 0x88(%r12), %rsi
movq %r14, %rdi
callq 0x1e9d4
movq %r12, %rdi
callq 0x17098
movl 0x2c(%r12), %r8d
movl 0x6c(%r12), %r9d
movl 0x80(%r12), %r10d
movsd 0x98(%r12), %xmm0
movl 0xe8(%r12), %r11d
movq %r14, %rdi
leaq 0xc0b50(%rip), %rsi     # 0xde81b
movl %eax, %edx
movl %ebx, %ecx
movb $0x1, %al
pushq %r11
pushq %r10
callq 0x13740
addq $0x10, %rsp
movl $0x7, %ebx
movl $0x2, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %r14, %rcx
callq 0x139a0
decl %ebx
jne 0x1dce3
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
cmpl $0x0, 0x80(%r12)
jle 0x1dd3d
xorl %ebx, %ebx
movq 0x78(%r12), %rax
movsd (%rax,%rbx,8), %xmm0
movq %r14, %rdi
movq %rbp, %rsi
movb $0x1, %al
callq 0x13740
incq %rbx
movslq 0x80(%r12), %rax
cmpq %rax, %rbx
jl 0x1dd16
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
cmpl $0x0, 0x6c(%r12)
jle 0x1dd7a
xorl %ebx, %ebx
movq 0x60(%r12), %rax
movq (%rax,%rbx,8), %rax
movl 0x20(%rax), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x13740
incq %rbx
movslq 0x6c(%r12), %rax
cmpq %rax, %rbx
jl 0x1dd54
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
movq 0x8(%rsp), %rcx
incq %rcx
movq (%rsp), %rdx
movslq 0x1c(%rdx), %rax
cmpq %rax, %rcx
jl 0x1dc4b
cmpl $0x0, 0x2c(%rdx)
jle 0x1de82
xorl %ebx, %ebx
leaq 0xc0a81(%rip), %r12     # 0xde834
leaq 0xcc8fc(%rip), %r13     # 0xea6b6
movq 0x20(%rdx), %rax
movq (%rax,%rbx,8), %r15
movq 0x18(%r15), %rax
testq %rax, %rax
je 0x1ddd0
movl 0x10(%rax), %ebp
jmp 0x1ddd5
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl $0x2, %esi
movl $0x1, %edx
leaq 0xc0a4b(%rip), %rdi     # 0xde831
movq %r14, %rcx
callq 0x139a0
movq 0x60(%r15), %rsi
movq %r14, %rdi
callq 0x1e9d4
movq %r15, %rdi
callq 0x40828
movl 0x2c(%r15), %r10d
movl 0x6c(%r15), %ecx
movsd 0x70(%r15), %xmm0
movsd 0x78(%r15), %xmm1
movsd 0x80(%r15), %xmm2
movl 0x88(%r15), %r11d
movq %r14, %rdi
movq %r12, %rsi
movl %eax, %edx
xorl %r8d, %r8d
movl %ebp, %r9d
movb $0x3, %al
pushq %r11
pushq %r10
callq 0x13740
addq $0x10, %rsp
movl $0x3, %ebp
movl $0x2, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %r14, %rcx
callq 0x139a0
decl %ebp
jne 0x1de48
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
incq %rbx
movq (%rsp), %rdx
movslq 0x2c(%rdx), %rax
cmpq %rax, %rbx
jl 0x1ddba
cmpl $0x0, 0xac(%rdx)
jle 0x1df8e
leaq 0xc09ba(%rip), %r15     # 0xde850
leaq 0xc09b6(%rip), %r12     # 0xde853
leaq 0xcc812(%rip), %r13     # 0xea6b6
xorl %ebx, %ebx
movq 0xa0(%rdx), %rax
movq (%rax,%rbx,8), %rbp
movl $0x2, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rcx
callq 0x139a0
movq 0x18(%rbp), %rsi
movq %r14, %rdi
callq 0x1e9d4
movsd 0x20(%rbp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x28(%rbp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x30(%rbp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %r12, %rsi
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
movl %eax, %edx
movl $0x1, %ecx
movb $0x3, %al
callq 0x13740
movl $0x2, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %r14, %rcx
callq 0x139a0
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x10(%rax)
cmpl $0x3, %eax
jne 0x1df77
movq 0x48(%rbp), %rdx
testq %rdx, %rdx
leaq 0xc05ca(%rip), %rax     # 0xde52c
cmoveq %rax, %rdx
movq %r14, %rdi
leaq 0xc8dc5(%rip), %rsi     # 0xe6d35
xorl %eax, %eax
callq 0x13740
incq %rbx
movq (%rsp), %rdx
movslq 0xac(%rdx), %rax
cmpq %rax, %rbx
jl 0x1dea6
cmpl $0x0, 0x5c(%rdx)
jle 0x1e08f
leaq 0xcc717(%rip), %r12     # 0xea6b6
leaq 0xcb553(%rip), %r13     # 0xe94f9
leaq 0xc0867(%rip), %rbp     # 0xde814
xorl %ecx, %ecx
movq 0x50(%rdx), %rax
movq %rcx, 0x8(%rsp)
movq (%rax,%rcx,8), %r15
movl 0x34(%r15), %edx
movl 0x24(%r15), %ecx
movl 0x30(%r15), %r8d
movq %r14, %rdi
leaq 0xc0891(%rip), %rsi     # 0xde863
xorl %eax, %eax
callq 0x13740
movl $0x4, %ebx
movl $0x2, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x139a0
decl %ebx
jne 0x1dfde
cmpl $0x0, 0x24(%r15)
jle 0x1e024
xorl %ebx, %ebx
movq 0x18(%r15), %rax
movq (%rax,%rbx,8), %rax
movl 0x10(%rax), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x13740
incq %rbx
movslq 0x24(%r15), %rax
cmpq %rax, %rbx
jl 0x1e000
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
cmpl $0x0, 0x30(%r15)
jle 0x1e05c
xorl %ebx, %ebx
movq 0x28(%r15), %rax
movsd (%rax,%rbx,8), %xmm0
movq %r14, %rdi
movq %rbp, %rsi
movb $0x1, %al
callq 0x13740
incq %rbx
movslq 0x30(%r15), %rax
cmpq %rax, %rbx
jl 0x1e03a
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
movq 0x8(%rsp), %rcx
incq %rcx
movq (%rsp), %rdx
movslq 0x5c(%rdx), %rax
cmpq %rax, %rcx
jl 0x1dfaf
cmpl $0x0, 0x6c(%rdx)
jle 0x1e190
leaq 0xcc616(%rip), %r12     # 0xea6b6
leaq 0xcb452(%rip), %r13     # 0xe94f9
leaq 0xc0766(%rip), %rbp     # 0xde814
xorl %ecx, %ecx
movq 0x60(%rdx), %rax
movq %rcx, 0x8(%rsp)
movq (%rax,%rcx,8), %r15
movl 0x34(%r15), %edx
movl 0x24(%r15), %ecx
movl 0x30(%r15), %r8d
movq %r14, %rdi
leaq 0xc079c(%rip), %rsi     # 0xde86f
xorl %eax, %eax
callq 0x13740
movl $0x4, %ebx
movl $0x2, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x139a0
decl %ebx
jne 0x1e0df
cmpl $0x0, 0x24(%r15)
jle 0x1e125
xorl %ebx, %ebx
movq 0x18(%r15), %rax
movq (%rax,%rbx,8), %rax
movl 0x10(%rax), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x13740
incq %rbx
movslq 0x24(%r15), %rax
cmpq %rax, %rbx
jl 0x1e101
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
cmpl $0x0, 0x30(%r15)
jle 0x1e15d
xorl %ebx, %ebx
movq 0x28(%r15), %rax
movsd (%rax,%rbx,8), %xmm0
movq %r14, %rdi
movq %rbp, %rsi
movb $0x1, %al
callq 0x13740
incq %rbx
movslq 0x30(%r15), %rax
cmpq %rax, %rbx
jl 0x1e13b
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
movq 0x8(%rsp), %rcx
incq %rcx
movq (%rsp), %rdx
movslq 0x6c(%rdx), %rax
cmpq %rax, %rcx
jl 0x1e0b0
cmpl $0x0, 0x7c(%rdx)
jle 0x1e20d
xorl %ebx, %ebx
leaq 0xc06dc(%rip), %r15     # 0xde87b
leaq 0xcc510(%rip), %r12     # 0xea6b6
movq 0x70(%rdx), %rax
movq (%rax,%rbx,8), %rax
movq 0x18(%rax), %rcx
movq 0x28(%rax), %rsi
movl 0x10(%rcx), %edx
movl 0x10(%rsi), %ecx
movsd 0x38(%rax), %xmm0
movl 0x40(%rax), %r8d
movq %r14, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x13740
movl $0x4, %ebp
movl $0x2, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x139a0
decl %ebp
jne 0x1e1d7
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
incq %rbx
movq (%rsp), %rdx
movslq 0x7c(%rdx), %rax
cmpq %rax, %rbx
jl 0x1e1a6
cmpl $0x0, 0x8c(%rdx)
jle 0x1e3ef
leaq 0xc066b(%rip), %r15     # 0xde88c
leaq 0xc0685(%rip), %r13     # 0xde8ad
leaq 0xcc487(%rip), %rbp     # 0xea6b6
xorl %ebx, %ebx
movq 0x80(%rdx), %rax
movq (%rax,%rbx,8), %r12
leaq 0x28(%r12), %rsi
leaq 0xf8(%rsp), %rdi
callq 0x84d8e
leaq 0x70(%r12), %rsi
leaq 0x178(%rsp), %rdi
callq 0x864ac
leaq 0x58(%r12), %rsi
leaq 0x20(%rsp), %rdi
callq 0x85826
movl $0x2, %esi
movl $0x1, %edx
leaq 0xc0609(%rip), %rdi     # 0xde889
movq %r14, %rcx
callq 0x139a0
movq 0xb8(%r12), %rsi
movq %r14, %rdi
callq 0x1e9d4
movsd 0xf8(%rsp), %xmm0
movsd 0x100(%rsp), %xmm1
movsd 0x108(%rsp), %xmm2
movq %r14, %rdi
movq %r15, %rsi
movb $0x3, %al
callq 0x13740
movsd 0x178(%rsp), %xmm0
movsd 0x180(%rsp), %xmm1
movsd 0x188(%rsp), %xmm2
movq %r14, %rdi
movq %r15, %rsi
movb $0x3, %al
callq 0x13740
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movq %r14, %rdi
movq %r15, %rsi
movb $0x3, %al
callq 0x13740
movq 0x18(%r12), %rax
testq %rax, %rax
je 0x1e316
movl 0x20(%rax), %edx
jmp 0x1e31b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movsd 0x88(%r12), %xmm0
movq %r14, %rdi
leaq 0xc0567(%rip), %rsi     # 0xde896
movb $0x1, %al
callq 0x13740
movl 0x90(%r12), %edx
movl 0x94(%r12), %ecx
movq %r14, %rdi
leaq 0xc054f(%rip), %rsi     # 0xde89f
xorl %eax, %eax
callq 0x13740
movsd 0xa8(%r12), %xmm0
movsd 0x98(%r12), %xmm1
movsd 0xa0(%r12), %xmm2
movq %r14, %rdi
leaq 0xc0528(%rip), %rsi     # 0xde8a7
movb $0x3, %al
callq 0x13740
movl 0xc0(%r12), %edx
movq %r14, %rdi
leaq 0xc0bf1(%rip), %rsi     # 0xdef89
xorl %eax, %eax
callq 0x13740
movsd 0xb0(%r12), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x13740
movl $0x2, %esi
movl $0x1, %edx
movq %rbp, %rdi
movq %r14, %rcx
callq 0x139a0
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
incq %rbx
movq (%rsp), %rdx
movslq 0x8c(%rdx), %rax
cmpq %rax, %rbx
jl 0x1e231
cmpl $0x0, 0x9c(%rdx)
jle 0x1e826
leaq 0xc04b8(%rip), %rbp     # 0xde8bb
xorl %ebx, %ebx
movq 0x90(%rdx), %rax
movq (%rax,%rbx,8), %r15
leaq 0x30(%r15), %rsi
leaq 0x20(%rsp), %rdi
callq 0x84d8e
leaq 0x78(%r15), %rsi
leaq 0xe0(%rsp), %rdi
callq 0x864ac
leaq 0x60(%r15), %rsi
leaq 0xc8(%rsp), %rdi
callq 0x85826
movl $0x2, %esi
movl $0x1, %edx
leaq 0xc0461(%rip), %rdi     # 0xde8b2
movq %r14, %rcx
callq 0x139a0
movq 0x1c0(%r15), %rsi
movq %r14, %rdi
callq 0x1e9d4
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movq %r14, %rdi
leaq 0xc0408(%rip), %r13     # 0xde88c
movq %r13, %rsi
movb $0x3, %al
callq 0x13740
movsd 0xe0(%rsp), %xmm0
movsd 0xe8(%rsp), %xmm1
movsd 0xf0(%rsp), %xmm2
movq %r14, %rdi
movq %r13, %rsi
movb $0x3, %al
callq 0x13740
movsd 0xc8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm1
movsd 0xd8(%rsp), %xmm2
movq %r14, %rdi
movq %r13, %rsi
movb $0x3, %al
callq 0x13740
movsd 0x90(%r15), %xmm0
movq %r14, %rdi
leaq 0xc03c4(%rip), %rsi     # 0xde8b5
movb $0x1, %al
callq 0x13740
movq 0x18(%r15), %rax
testq %rax, %rax
je 0x1e506
movl 0x10(%rax), %edx
jmp 0x1e50b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rdi
leaq 0xc038d(%rip), %r13     # 0xde8a2
movq %r13, %rsi
xorl %eax, %eax
callq 0x13740
movl 0x98(%r15), %edx
movl 0x9c(%r15), %ecx
movq %r14, %rdi
leaq 0xc0368(%rip), %rsi     # 0xde89f
xorl %eax, %eax
callq 0x13740
movsd 0xb0(%r15), %xmm0
movsd 0xb8(%r15), %xmm1
movq %r14, %rdi
leaq 0xc0350(%rip), %r12     # 0xde8aa
movq %r12, %rsi
movb $0x2, %al
callq 0x13740
movsd 0xa0(%r15), %xmm0
movsd 0xa8(%r15), %xmm1
movq %r14, %rdi
movq %r12, %rsi
movb $0x2, %al
callq 0x13740
movl 0x1c8(%r15), %edx
movq %r14, %rdi
leaq 0xc09f5(%rip), %rsi     # 0xdef89
xorl %eax, %eax
callq 0x13740
movl 0xc0(%r15), %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x13740
movl 0x1c8(%r15), %edx
andl $0x1, %edx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x13740
movl $0x1, %r13d
movl $0x2, %esi
movl $0x1, %edx
movq %rbp, %rdi
movq %r14, %rcx
callq 0x139a0
decl %r13d
je 0x1e5cc
cmpl $0x0, 0xc0(%r15)
je 0x1e63f
movsd 0xc8(%r15), %xmm0
movsd 0xd0(%r15), %xmm1
movsd 0xd8(%r15), %xmm2
movq %r14, %rdi
leaq 0xc0293(%rip), %rsi     # 0xde8a8
movb $0x3, %al
callq 0x13740
movsd 0xe0(%r15), %xmm0
movsd 0xe8(%r15), %xmm1
movq %r14, %rdi
leaq 0xc0273(%rip), %rsi     # 0xde8ab
movb $0x2, %al
callq 0x13740
testb $0x1, 0x1c8(%r15)
je 0x1e802
leaq 0xf0(%r15), %rsi
leaq 0xf8(%rsp), %r12
movq %r12, %rdi
callq 0x7142e
leaq 0x150(%r15), %rsi
leaq 0x178(%rsp), %r13
movq %r13, %rdi
callq 0x7142e
leaq 0xb0(%rsp), %rdi
movq %r12, %rsi
leaq 0x517fe3(%rip), %r12    # 0x536670
movq %r12, %rdx
callq 0x7514e
leaq 0x98(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x7514e
leaq 0x80(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0xc7bb9(%rip), %r12     # 0xe6278
movq %r12, %rdx
callq 0x750d6
leaq 0x68(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x750d6
leaq 0x50(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0xc7b2d(%rip), %r12     # 0xe6218
movq %r12, %rdx
callq 0x750d6
leaq 0x38(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x750d6
movsd 0xb0(%rsp), %xmm0
movsd 0xb8(%rsp), %xmm1
movsd 0xc0(%rsp), %xmm2
movq %r14, %rdi
leaq 0xc017f(%rip), %r12     # 0xde8a7
movq %r12, %rsi
movb $0x3, %al
callq 0x13740
movsd 0x80(%rsp), %xmm0
movsd 0x88(%rsp), %xmm1
movsd 0x90(%rsp), %xmm2
movq %r14, %rdi
movq %r12, %rsi
movb $0x3, %al
callq 0x13740
movsd 0x50(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movsd 0x60(%rsp), %xmm2
movq %r14, %rdi
movq %r12, %rsi
movb $0x3, %al
callq 0x13740
movsd 0x98(%rsp), %xmm0
movsd 0xa0(%rsp), %xmm1
movsd 0xa8(%rsp), %xmm2
movq %r14, %rdi
movq %r12, %rsi
movb $0x3, %al
callq 0x13740
movsd 0x68(%rsp), %xmm0
movsd 0x70(%rsp), %xmm1
movsd 0x78(%rsp), %xmm2
movq %r14, %rdi
movq %r12, %rsi
movb $0x3, %al
callq 0x13740
movsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x48(%rsp), %xmm2
movq %r14, %rdi
movq %r12, %rsi
movb $0x3, %al
callq 0x13740
movsd 0x1b0(%r15), %xmm0
movsd 0x1b8(%r15), %xmm1
movq %r14, %rdi
leaq 0xc00c3(%rip), %rsi     # 0xde8be
movb $0x2, %al
callq 0x13740
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
incq %rbx
movq (%rsp), %rdx
movslq 0x9c(%rdx), %rax
cmpq %rax, %rbx
jl 0x1e405
cmpl $0x0, 0x3c(%rdx)
jle 0x1e8ee
leaq 0xcbe7f(%rip), %r12     # 0xea6b6
leaq 0xbffd6(%rip), %r13     # 0xde814
xorl %ebx, %ebx
movq 0x30(%rdx), %rax
movq (%rax,%rbx,8), %rbp
movl 0x2c(%rbp), %edx
movq 0x18(%rbp), %rax
movl 0x10(%rax), %ecx
movl 0x28(%rbp), %r8d
movq %r14, %rdi
leaq 0xc006a(%rip), %rsi     # 0xde8ca
xorl %eax, %eax
callq 0x13740
movl $0x4, %r15d
movl $0x2, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x139a0
decl %r15d
jne 0x1e86d
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
cmpl $0x0, 0x28(%rbp)
jle 0x1e8c0
xorl %r15d, %r15d
movq 0x20(%rbp), %rax
movsd (%rax,%r15,8), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x13740
incq %r15
movslq 0x28(%rbp), %rax
cmpq %rax, %r15
jl 0x1e89d
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
incq %rbx
movq (%rsp), %rdx
movslq 0x3c(%rdx), %rax
cmpq %rax, %rbx
jl 0x1e840
cmpl $0x0, 0x4c(%rdx)
jle 0x1e9b6
leaq 0xcbdb7(%rip), %r12     # 0xea6b6
leaq 0xbff0e(%rip), %r13     # 0xde814
xorl %ebx, %ebx
movq 0x40(%rdx), %rax
movq (%rax,%rbx,8), %rbp
movl 0x2c(%rbp), %edx
movq 0x18(%rbp), %rax
movl 0x10(%rax), %ecx
movl 0x28(%rbp), %r8d
movq %r14, %rdi
leaq 0xbffae(%rip), %rsi     # 0xde8d6
xorl %eax, %eax
callq 0x13740
movl $0x4, %r15d
movl $0x2, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x139a0
decl %r15d
jne 0x1e935
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
cmpl $0x0, 0x28(%rbp)
jle 0x1e988
xorl %r15d, %r15d
movq 0x20(%rbp), %rax
movsd (%rax,%r15,8), %xmm0
movq %r14, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x13740
incq %r15
movslq 0x28(%rbp), %rax
cmpq %rax, %r15
jl 0x1e965
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
movl $0xa, %edi
movq %r14, %rsi
callq 0x13670
incq %rbx
movq (%rsp), %rdx
movslq 0x4c(%rdx), %rax
cmpq %rax, %rbx
jl 0x1e908
andb $-0x2, 0x1e8(%rdx)
movl $0x1, %eax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq