// File: 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 %r12
pushq %rbx
subq $0x850, %rsp            # imm = 0x850
movq %rdi, 0x848(%rsp)
movq %rsi, 0x840(%rsp)
movq 0x848(%rsp), %rax
movq %rax, 0x450(%rsp)
movq 0x840(%rsp), %rdi
leaq 0x17dcff(%rip), %rsi    # 0x1a47ad
movb $0x0, %al
callq 0x13810
movq 0x450(%rsp), %rax
movq 0x840(%rsp), %rdi
movq 0x1d0(%rax), %rsi
callq 0x29140
movq 0x450(%rsp), %rax
movq 0x840(%rsp), %rcx
movq %rcx, 0x458(%rsp)
movq 0x8(%rax), %rdi
callq 0x16cf0
movq 0x450(%rsp), %rdi
movl %eax, 0x460(%rsp)
callq 0x16c20
movq 0x450(%rsp), %rdi
movl %eax, 0x464(%rsp)
callq 0x16c40
movq 0x450(%rsp), %rdi
movl %eax, 0x468(%rsp)
callq 0x16c80
movq 0x450(%rsp), %rdi
movl %eax, 0x46c(%rsp)
callq 0x30660
movq 0x450(%rsp), %rdi
movl %eax, %r12d
callq 0x306b0
movq 0x450(%rsp), %rdi
movl %eax, %r15d
callq 0x16c60
movq 0x450(%rsp), %rdi
movl %eax, %r14d
callq 0x16ca0
movq 0x450(%rsp), %rdi
movl %eax, %ebp
callq 0x30700
movq 0x450(%rsp), %rdi
movl %eax, %ebx
callq 0x30750
movq 0x450(%rsp), %rdi
movl %eax, 0x470(%rsp)
callq 0x16cc0
movq 0x450(%rsp), %rdi
movl %eax, 0x474(%rsp)
callq 0x31090
movq 0x458(%rsp), %rdi
movl 0x460(%rsp), %edx
movl 0x464(%rsp), %ecx
movl 0x468(%rsp), %r8d
movl 0x46c(%rsp), %r9d
movl 0x470(%rsp), %r11d
movl 0x474(%rsp), %r10d
leaq 0x17dbc1(%rip), %rsi    # 0x1a47b6
movl %r12d, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebp, 0x18(%rsp)
movl %ebx, 0x20(%rsp)
movl %r11d, 0x28(%rsp)
movl %r10d, 0x30(%rsp)
movl %eax, 0x38(%rsp)
movb $0x0, %al
callq 0x13810
movl $0x0, 0x83c(%rsp)
cmpl $0x3, 0x83c(%rsp)
jge 0x26c5e
movq 0x840(%rsp), %rdi
leaq 0x185512(%rip), %rsi    # 0x1ac156
movb $0x0, %al
callq 0x13810
movl 0x83c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x83c(%rsp)
jmp 0x26c2b
movq 0x840(%rsp), %rdi
leaq 0x184a85(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rdi
leaq 0x18524a(%rip), %rsi    # 0x1abecd
movb $0x0, %al
callq 0x13810
movl $0x0, 0x838(%rsp)
cmpl $0x4, 0x838(%rsp)
jge 0x26d3a
movl $0x0, 0x834(%rsp)
cmpl $0x4, 0x834(%rsp)
jge 0x26d22
movq 0x450(%rsp), %rdi
movq 0x840(%rsp), %rax
movq %rax, 0x448(%rsp)
callq 0x31ac0
movq %rax, %rdi
callq 0x31ae0
movq %rax, %rdi
movl 0x838(%rsp), %esi
callq 0x31af0
movq 0x448(%rsp), %rdi
movslq 0x834(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x17dae8(%rip), %rsi    # 0x1a47f0
movb $0x1, %al
callq 0x13810
movl 0x834(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x834(%rsp)
jmp 0x26cae
jmp 0x26d24
movl 0x838(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x838(%rsp)
jmp 0x26c95
movq 0x840(%rsp), %rdi
leaq 0x1849a9(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl $0x0, 0x830(%rsp)
movq 0x450(%rsp), %rdi
movl 0x830(%rsp), %eax
movl %eax, 0x444(%rsp)
callq 0x31090
movl %eax, %ecx
movl 0x444(%rsp), %eax
cmpl %ecx, %eax
jge 0x26df9
movq 0x840(%rsp), %rdi
leaq 0x17da49(%rip), %rsi    # 0x1a47db
movb $0x0, %al
callq 0x13810
movq 0x450(%rsp), %rdi
movq 0x840(%rsp), %rax
movq %rax, 0x438(%rsp)
movl 0x830(%rsp), %esi
callq 0x310b0
movq 0x438(%rsp), %rdi
movq %rax, %rsi
callq 0x29140
movq 0x840(%rsp), %rdi
leaq 0x184916(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl 0x830(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x830(%rsp)
jmp 0x26d5b
movl $0x0, 0x82c(%rsp)
movq 0x450(%rsp), %rax
movl 0x82c(%rsp), %ecx
movl %ecx, 0x434(%rsp)
movq 0x8(%rax), %rdi
callq 0x16cf0
movl %eax, %ecx
movl 0x434(%rsp), %eax
cmpl %ecx, %eax
jge 0x270a2
movq 0x450(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0x82c(%rsp), %esi
callq 0x30a90
movq %rax, 0x820(%rsp)
movq 0x820(%rsp), %rdi
callq 0x31100
cmpq $0x0, %rax
je 0x26e85
movq 0x820(%rsp), %rdi
callq 0x31100
movq %rax, %rdi
callq 0x31130
movl %eax, 0x430(%rsp)
jmp 0x26e93
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x430(%rsp)
jmp 0x26e93
movl 0x430(%rsp), %eax
movl %eax, 0x81c(%rsp)
movq 0x840(%rsp), %rdi
leaq 0x17d92e(%rip), %rsi    # 0x1a47de
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x408(%rsp)
movq 0x820(%rsp), %rdi
callq 0x31110
movq 0x408(%rsp), %rdi
movq %rax, %rsi
callq 0x29140
movq 0x840(%rsp), %rax
movq %rax, 0x410(%rsp)
movl 0x81c(%rsp), %eax
movl %eax, 0x41c(%rsp)
movq 0x820(%rsp), %rdi
callq 0x31660
movl %eax, 0x420(%rsp)
movq 0x820(%rsp), %rdi
callq 0x186b0
movl %eax, 0x424(%rsp)
movq 0x820(%rsp), %rdi
callq 0x5ecb0
movsd %xmm0, 0x428(%rsp)
movq 0x820(%rsp), %rdi
callq 0x5ecf0
movq 0x410(%rsp), %rdi
movl 0x41c(%rsp), %edx
movl 0x420(%rsp), %ecx
movl 0x424(%rsp), %r8d
movaps %xmm0, %xmm1
movsd 0x428(%rsp), %xmm0
leaq 0x17d863(%rip), %rsi    # 0x1a47e1
xorl %r9d, %r9d
movb $0x2, %al
callq 0x13810
movl $0x0, 0x818(%rsp)
cmpl $0x8, 0x818(%rsp)
jge 0x26fc6
movq 0x840(%rsp), %rdi
leaq 0x1851aa(%rip), %rsi    # 0x1ac156
movb $0x0, %al
callq 0x13810
movl 0x818(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x818(%rsp)
jmp 0x26f93
movq 0x840(%rsp), %rdi
leaq 0x18471d(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl $0x0, 0x814(%rsp)
movl 0x814(%rsp), %eax
movl %eax, 0x404(%rsp)
movq 0x820(%rsp), %rdi
callq 0x186b0
movl %eax, %ecx
movl 0x404(%rsp), %eax
cmpl %ecx, %eax
jge 0x27076
movq 0x820(%rsp), %rdi
movl 0x814(%rsp), %esi
callq 0x186d0
movq %rax, 0x808(%rsp)
movq 0x840(%rsp), %rax
movq %rax, 0x3f8(%rsp)
movq 0x808(%rsp), %rdi
callq 0x31b10
movq 0x3f8(%rsp), %rdi
movl %eax, %edx
leaq 0x17d826(%rip), %rsi    # 0x1a487f
movb $0x0, %al
callq 0x13810
movl 0x814(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x814(%rsp)
jmp 0x26fe7
movq 0x840(%rsp), %rdi
leaq 0x18466d(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl 0x82c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x82c(%rsp)
jmp 0x26e04
movl $0x0, 0x804(%rsp)
movq 0x450(%rsp), %rdi
movl 0x804(%rsp), %eax
movl %eax, 0x3f4(%rsp)
callq 0x16c20
movl %eax, %ecx
movl 0x3f4(%rsp), %eax
cmpl %ecx, %eax
jge 0x2743c
movq 0x450(%rsp), %rdi
movl 0x804(%rsp), %esi
callq 0x185f0
movq %rax, 0x7f8(%rsp)
movq 0x7f8(%rsp), %rdi
callq 0x312c0
cmpq $0x0, %rax
je 0x27126
movq 0x7f8(%rsp), %rdi
callq 0x312c0
movq %rax, %rdi
callq 0x1bf60
movl %eax, 0x3f0(%rsp)
jmp 0x27134
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x3f0(%rsp)
jmp 0x27134
movl 0x3f0(%rsp), %eax
movl %eax, 0x7f4(%rsp)
movq 0x7f8(%rsp), %rax
addq $0x70, %rax
movq %rax, 0x7e8(%rsp)
movq 0x840(%rsp), %rdi
leaq 0x17d68f(%rip), %rsi    # 0x1a47f4
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x3c0(%rsp)
movq 0x7f8(%rsp), %rdi
callq 0x1bf70
movq 0x3c0(%rsp), %rdi
movq %rax, %rsi
callq 0x29140
movq 0x840(%rsp), %rax
movq %rax, 0x3c8(%rsp)
movq 0x7f8(%rsp), %rdi
callq 0x19370
movl %eax, 0x3d4(%rsp)
movl 0x7f4(%rsp), %eax
movl %eax, 0x3d8(%rsp)
movq 0x7f8(%rsp), %rdi
callq 0x1bb10
movl %eax, 0x3dc(%rsp)
movq 0x7f8(%rsp), %rdi
callq 0x18660
movl %eax, 0x3e0(%rsp)
movq 0x7e8(%rsp), %rdi
callq 0x1bc40
movl %eax, 0x3e4(%rsp)
movq 0x7f8(%rsp), %rdi
callq 0x1c0f0
movsd %xmm0, 0x3e8(%rsp)
movq 0x7f8(%rsp), %rdi
callq 0x31b30
movq %rax, 0x7e0(%rsp)
leaq 0x7e0(%rsp), %rdi
callq 0x1c310
movq 0x3c8(%rsp), %rdi
movl 0x3d4(%rsp), %edx
movl 0x3d8(%rsp), %ecx
movl 0x3dc(%rsp), %r8d
movl 0x3e0(%rsp), %r9d
movl 0x3e4(%rsp), %r10d
movsd 0x3e8(%rsp), %xmm0
leaq 0x17d57a(%rip), %rsi    # 0x1a47f7
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x1, %al
callq 0x13810
movl $0x0, 0x7dc(%rsp)
cmpl $0x7, 0x7dc(%rsp)
jge 0x272ca
movq 0x840(%rsp), %rdi
leaq 0x184ea6(%rip), %rsi    # 0x1ac156
movb $0x0, %al
callq 0x13810
movl 0x7dc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7dc(%rsp)
jmp 0x27297
movq 0x840(%rsp), %rdi
leaq 0x184419(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl $0x0, 0x7d8(%rsp)
movl 0x7d8(%rsp), %eax
movl %eax, 0x3bc(%rsp)
movq 0x7e8(%rsp), %rdi
callq 0x1bc40
movl %eax, %ecx
movl 0x3bc(%rsp), %eax
cmpl %ecx, %eax
jge 0x27360
movq 0x840(%rsp), %rax
movq %rax, 0x3b0(%rsp)
movq 0x7e8(%rsp), %rdi
movl 0x7d8(%rsp), %esi
callq 0x18640
movq 0x3b0(%rsp), %rdi
leaq 0x17d544(%rip), %rsi    # 0x1a488a
movb $0x1, %al
callq 0x13810
movl 0x7d8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7d8(%rsp)
jmp 0x272eb
movq 0x840(%rsp), %rdi
leaq 0x184383(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl $0x0, 0x7d4(%rsp)
movl 0x7d4(%rsp), %eax
movl %eax, 0x3ac(%rsp)
movq 0x7f8(%rsp), %rdi
callq 0x18660
movl %eax, %ecx
movl 0x3ac(%rsp), %eax
cmpl %ecx, %eax
jge 0x27410
movq 0x7f8(%rsp), %rdi
movl 0x7d4(%rsp), %esi
callq 0x18680
movq %rax, 0x7c8(%rsp)
movq 0x840(%rsp), %rax
movq %rax, 0x3a0(%rsp)
movq 0x7c8(%rsp), %rdi
callq 0x31130
movq 0x3a0(%rsp), %rdi
movl %eax, %edx
leaq 0x17d48c(%rip), %rsi    # 0x1a487f
movb $0x0, %al
callq 0x13810
movl 0x7d4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7d4(%rsp)
jmp 0x27381
movq 0x840(%rsp), %rdi
leaq 0x1842d3(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl 0x804(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x804(%rsp)
jmp 0x270ad
movl $0x0, 0x7c4(%rsp)
movq 0x450(%rsp), %rdi
movl 0x7c4(%rsp), %eax
movl %eax, 0x39c(%rsp)
callq 0x16c40
movl %eax, %ecx
movl 0x39c(%rsp), %eax
cmpl %ecx, %eax
jge 0x276d4
movq 0x450(%rsp), %rdi
movl 0x7c4(%rsp), %esi
callq 0x307a0
movq %rax, 0x7b8(%rsp)
movl $0x0, 0x7b4(%rsp)
movq 0x7b8(%rsp), %rdi
callq 0x31310
movq %rax, 0x7a8(%rsp)
movq 0x7b8(%rsp), %rdi
callq 0x312f0
cmpq $0x0, %rax
je 0x274e0
movq 0x7b8(%rsp), %rdi
callq 0x312f0
movq %rax, %rdi
callq 0x31300
movl %eax, 0x398(%rsp)
jmp 0x274ee
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x398(%rsp)
jmp 0x274ee
movl 0x398(%rsp), %eax
movl %eax, 0x7a4(%rsp)
movq 0x840(%rsp), %rdi
leaq 0x17d302(%rip), %rsi    # 0x1a480d
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x358(%rsp)
movq 0x7b8(%rsp), %rdi
callq 0x30850
movq 0x358(%rsp), %rdi
movq %rax, %rsi
callq 0x29140
movq 0x840(%rsp), %rax
movq %rax, 0x360(%rsp)
movq 0x7b8(%rsp), %rdi
callq 0x70720
movl %eax, 0x36c(%rsp)
movq 0x7b8(%rsp), %rdi
callq 0x30860
movl %eax, 0x370(%rsp)
movl 0x7b4(%rsp), %eax
movl %eax, 0x374(%rsp)
movl 0x7a4(%rsp), %eax
movl %eax, 0x378(%rsp)
movq 0x7b8(%rsp), %rdi
callq 0x30c50
movl %eax, 0x37c(%rsp)
movq 0x7a8(%rsp), %rdi
callq 0x31b50
movsd %xmm0, 0x380(%rsp)
movq 0x7a8(%rsp), %rdi
callq 0x31b60
movsd %xmm0, 0x388(%rsp)
movq 0x7a8(%rsp), %rdi
callq 0x31b70
movsd %xmm0, 0x390(%rsp)
movq 0x7b8(%rsp), %rdi
callq 0x31320
movq %rax, 0x798(%rsp)
leaq 0x798(%rsp), %rdi
callq 0x1c310
movq 0x360(%rsp), %rdi
movl 0x36c(%rsp), %edx
movl 0x370(%rsp), %ecx
movl 0x374(%rsp), %r8d
movl 0x378(%rsp), %r9d
movl 0x37c(%rsp), %r10d
movsd 0x380(%rsp), %xmm0
movsd 0x388(%rsp), %xmm1
movsd 0x390(%rsp), %xmm2
leaq 0x17d1b5(%rip), %rsi    # 0x1a4810
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x3, %al
callq 0x13810
movl $0x0, 0x794(%rsp)
cmpl $0x3, 0x794(%rsp)
jge 0x276a8
movq 0x840(%rsp), %rdi
leaq 0x184ac8(%rip), %rsi    # 0x1ac156
movb $0x0, %al
callq 0x13810
movl 0x794(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x794(%rsp)
jmp 0x27675
movq 0x840(%rsp), %rdi
leaq 0x18403b(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl 0x7c4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7c4(%rsp)
jmp 0x27447
movl $0x0, 0x790(%rsp)
movq 0x450(%rsp), %rdi
movl 0x790(%rsp), %eax
movl %eax, 0x354(%rsp)
callq 0x16c80
movl %eax, %ecx
movl 0x354(%rsp), %eax
cmpl %ecx, %eax
jge 0x278f1
movq 0x450(%rsp), %rdi
movl 0x790(%rsp), %esi
callq 0x1c120
movq %rax, 0x788(%rsp)
movq 0x840(%rsp), %rdi
leaq 0x17d0f6(%rip), %rsi    # 0x1a482c
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x328(%rsp)
movq 0x788(%rsp), %rdi
callq 0x30960
movq 0x328(%rsp), %rdi
movq %rax, %rsi
callq 0x29140
movq 0x840(%rsp), %rax
movq %rax, 0x330(%rsp)
movq 0x788(%rsp), %rdi
callq 0x31b80
movsd %xmm0, 0x338(%rsp)
movq 0x788(%rsp), %rdi
callq 0x31ba0
movsd %xmm0, 0x340(%rsp)
movq 0x788(%rsp), %rdi
callq 0x31bc0
movsd %xmm0, 0x348(%rsp)
movq 0x788(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x330(%rsp), %rdi
movsd 0x338(%rsp), %xmm0
movsd 0x340(%rsp), %xmm1
movsd 0x348(%rsp), %xmm2
movl %eax, %edx
leaq 0x17d039(%rip), %rsi    # 0x1a482f
movl $0x1, %ecx
movb $0x3, %al
callq 0x13810
movl $0x0, 0x784(%rsp)
cmpl $0x1, 0x784(%rsp)
jge 0x27840
movq 0x840(%rsp), %rdi
leaq 0x184930(%rip), %rsi    # 0x1ac156
movb $0x0, %al
callq 0x13810
movl 0x784(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x784(%rsp)
jmp 0x2780d
movq 0x840(%rsp), %rdi
leaq 0x183ea3(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movq 0x788(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
cmpl $0x3, %eax
jne 0x278d9
movq 0x788(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0x778(%rsp)
movq 0x840(%rsp), %rax
movq %rax, 0x320(%rsp)
cmpq $0x0, 0x778(%rsp)
je 0x278aa
movq 0x778(%rsp), %rax
movq %rax, 0x318(%rsp)
jmp 0x278bb
leaq 0x17cc53(%rip), %rax    # 0x1a4504
movq %rax, 0x318(%rsp)
jmp 0x278bb
movq 0x320(%rsp), %rdi
movq 0x318(%rsp), %rdx
leaq 0x180f79(%rip), %rsi    # 0x1a884b
movb $0x0, %al
callq 0x13810
jmp 0x278db
movl 0x790(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x790(%rsp)
jmp 0x276df
movl $0x0, 0x774(%rsp)
movq 0x450(%rsp), %rdi
movl 0x774(%rsp), %eax
movl %eax, 0x314(%rsp)
callq 0x30660
movl %eax, %ecx
movl 0x314(%rsp), %eax
cmpl %ecx, %eax
jge 0x27b50
movq 0x450(%rsp), %rdi
movl 0x774(%rsp), %esi
callq 0x30680
movq %rax, 0x768(%rsp)
movq 0x840(%rsp), %rax
movq %rax, 0x300(%rsp)
movq 0x768(%rsp), %rdi
callq 0x31380
movl %eax, 0x30c(%rsp)
movq 0x768(%rsp), %rdi
callq 0x30d80
movl %eax, 0x310(%rsp)
movq 0x768(%rsp), %rdi
callq 0x31390
movq 0x300(%rsp), %rdi
movl 0x30c(%rsp), %edx
movl 0x310(%rsp), %ecx
movl %eax, %r8d
leaq 0x17ce96(%rip), %rsi    # 0x1a483f
movb $0x0, %al
callq 0x13810
movl $0x0, 0x764(%rsp)
cmpl $0x4, 0x764(%rsp)
jge 0x279ee
movq 0x840(%rsp), %rdi
leaq 0x184782(%rip), %rsi    # 0x1ac156
movb $0x0, %al
callq 0x13810
movl 0x764(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x764(%rsp)
jmp 0x279bb
movl $0x0, 0x760(%rsp)
movl 0x760(%rsp), %eax
movl %eax, 0x2fc(%rsp)
movq 0x768(%rsp), %rdi
callq 0x30d80
movl %eax, %ecx
movl 0x2fc(%rsp), %eax
cmpl %ecx, %eax
jge 0x27a78
movq 0x840(%rsp), %rax
movq %rax, 0x2f0(%rsp)
movq 0x768(%rsp), %rdi
movl 0x760(%rsp), %esi
callq 0x30da0
movq %rax, %rdi
callq 0x1bf60
movq 0x2f0(%rsp), %rdi
movl %eax, %edx
leaq 0x18356b(%rip), %rsi    # 0x1aafc9
movb $0x0, %al
callq 0x13810
movl 0x760(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x760(%rsp)
jmp 0x279f9
movq 0x840(%rsp), %rdi
leaq 0x183c6b(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl $0x0, 0x75c(%rsp)
movl 0x75c(%rsp), %eax
movl %eax, 0x2ec(%rsp)
movq 0x768(%rsp), %rdi
callq 0x31390
movl %eax, %ecx
movl 0x2ec(%rsp), %eax
cmpl %ecx, %eax
jge 0x27b0e
movq 0x840(%rsp), %rax
movq %rax, 0x2e0(%rsp)
movq 0x768(%rsp), %rdi
movl 0x75c(%rsp), %esi
callq 0x313a0
movq 0x2e0(%rsp), %rdi
leaq 0x17ccfc(%rip), %rsi    # 0x1a47f0
movb $0x1, %al
callq 0x13810
movl 0x75c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x75c(%rsp)
jmp 0x27a99
movq 0x840(%rsp), %rdi
leaq 0x183bd5(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rdi
leaq 0x183bbf(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl 0x774(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x774(%rsp)
jmp 0x278fc
movl $0x0, 0x758(%rsp)
movq 0x450(%rsp), %rdi
movl 0x758(%rsp), %eax
movl %eax, 0x2dc(%rsp)
callq 0x306b0
movl %eax, %ecx
movl 0x2dc(%rsp), %eax
cmpl %ecx, %eax
jge 0x27daf
movq 0x450(%rsp), %rdi
movl 0x758(%rsp), %esi
callq 0x306d0
movq %rax, 0x750(%rsp)
movq 0x840(%rsp), %rax
movq %rax, 0x2c8(%rsp)
movq 0x750(%rsp), %rdi
callq 0x313c0
movl %eax, 0x2d4(%rsp)
movq 0x750(%rsp), %rdi
callq 0x30e40
movl %eax, 0x2d8(%rsp)
movq 0x750(%rsp), %rdi
callq 0x313d0
movq 0x2c8(%rsp), %rdi
movl 0x2d4(%rsp), %edx
movl 0x2d8(%rsp), %ecx
movl %eax, %r8d
leaq 0x17cc43(%rip), %rsi    # 0x1a484b
movb $0x0, %al
callq 0x13810
movl $0x0, 0x74c(%rsp)
cmpl $0x4, 0x74c(%rsp)
jge 0x27c4d
movq 0x840(%rsp), %rdi
leaq 0x184523(%rip), %rsi    # 0x1ac156
movb $0x0, %al
callq 0x13810
movl 0x74c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74c(%rsp)
jmp 0x27c1a
movl $0x0, 0x748(%rsp)
movl 0x748(%rsp), %eax
movl %eax, 0x2c4(%rsp)
movq 0x750(%rsp), %rdi
callq 0x30e40
movl %eax, %ecx
movl 0x2c4(%rsp), %eax
cmpl %ecx, %eax
jge 0x27cd7
movq 0x840(%rsp), %rax
movq %rax, 0x2b8(%rsp)
movq 0x750(%rsp), %rdi
movl 0x748(%rsp), %esi
callq 0x30e60
movq %rax, %rdi
callq 0x31300
movq 0x2b8(%rsp), %rdi
movl %eax, %edx
leaq 0x18330c(%rip), %rsi    # 0x1aafc9
movb $0x0, %al
callq 0x13810
movl 0x748(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x748(%rsp)
jmp 0x27c58
movq 0x840(%rsp), %rdi
leaq 0x183a0c(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl $0x0, 0x744(%rsp)
movl 0x744(%rsp), %eax
movl %eax, 0x2b4(%rsp)
movq 0x750(%rsp), %rdi
callq 0x313d0
movl %eax, %ecx
movl 0x2b4(%rsp), %eax
cmpl %ecx, %eax
jge 0x27d6d
movq 0x840(%rsp), %rax
movq %rax, 0x2a8(%rsp)
movq 0x750(%rsp), %rdi
movl 0x744(%rsp), %esi
callq 0x313e0
movq 0x2a8(%rsp), %rdi
leaq 0x17ca9d(%rip), %rsi    # 0x1a47f0
movb $0x1, %al
callq 0x13810
movl 0x744(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x744(%rsp)
jmp 0x27cf8
movq 0x840(%rsp), %rdi
leaq 0x183976(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rdi
leaq 0x183960(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl 0x758(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x758(%rsp)
jmp 0x27b5b
movl $0x0, 0x740(%rsp)
movq 0x450(%rsp), %rdi
movl 0x740(%rsp), %eax
movl %eax, 0x2a4(%rsp)
callq 0x16c60
movl %eax, %ecx
movl 0x2a4(%rsp), %eax
cmpl %ecx, %eax
jge 0x27f21
movq 0x450(%rsp), %rdi
movl 0x740(%rsp), %esi
callq 0x30630
movq %rax, 0x738(%rsp)
movq 0x738(%rsp), %rdi
callq 0x30ec0
movq %rax, 0x730(%rsp)
movq 0x738(%rsp), %rdi
callq 0x1bca0
movq %rax, 0x728(%rsp)
movq 0x840(%rsp), %rax
movq %rax, 0x288(%rsp)
movq 0x730(%rsp), %rdi
callq 0x1bf60
movl %eax, 0x290(%rsp)
movq 0x728(%rsp), %rdi
callq 0x31300
movl %eax, 0x294(%rsp)
movq 0x738(%rsp), %rdi
callq 0x1bc90
movsd %xmm0, 0x298(%rsp)
movq 0x738(%rsp), %rdi
callq 0x1bc80
movq 0x288(%rsp), %rdi
movl 0x290(%rsp), %edx
movl 0x294(%rsp), %ecx
movsd 0x298(%rsp), %xmm0
movl %eax, %r8d
leaq 0x17c9a7(%rip), %rsi    # 0x1a4857
movb $0x1, %al
callq 0x13810
movl $0x0, 0x724(%rsp)
cmpl $0x4, 0x724(%rsp)
jge 0x27ef5
movq 0x840(%rsp), %rdi
leaq 0x18427b(%rip), %rsi    # 0x1ac156
movb $0x0, %al
callq 0x13810
movl 0x724(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x724(%rsp)
jmp 0x27ec2
movq 0x840(%rsp), %rdi
leaq 0x1837ee(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl 0x740(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x740(%rsp)
jmp 0x27dba
movl $0x0, 0x720(%rsp)
movq 0x450(%rsp), %rdi
movl 0x720(%rsp), %eax
movl %eax, 0x284(%rsp)
callq 0x16ca0
movl %eax, %ecx
movl 0x284(%rsp), %eax
cmpl %ecx, %eax
jge 0x283a8
movq 0x450(%rsp), %rdi
movl 0x720(%rsp), %esi
callq 0x307d0
movq %rax, 0x718(%rsp)
movq 0x718(%rsp), %rdi
callq 0x31bd0
movq %rax, %rsi
leaq 0x700(%rsp), %rdi
callq 0xf8390
movq 0x718(%rsp), %rsi
leaq 0x6e8(%rsp), %rdi
callq 0x31bf0
movq 0x718(%rsp), %rdi
callq 0x31c40
movq %rax, %rsi
leaq 0x6d0(%rsp), %rdi
callq 0xf94f0
movq 0x840(%rsp), %rdi
leaq 0x17c893(%rip), %rsi    # 0x1a4865
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x220(%rsp)
movq 0x718(%rsp), %rdi
callq 0x30870
movq 0x220(%rsp), %rdi
movq %rax, %rsi
callq 0x29140
movq 0x840(%rsp), %rax
movq %rax, 0x228(%rsp)
leaq 0x700(%rsp), %rdi
callq 0x187b0
movsd %xmm0, 0x238(%rsp)
leaq 0x700(%rsp), %rdi
callq 0x187c0
movsd %xmm0, 0x230(%rsp)
leaq 0x700(%rsp), %rdi
callq 0x187a0
movq 0x228(%rsp), %rdi
movsd 0x230(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x238(%rsp), %xmm0
leaq 0x17c7f5(%rip), %rsi    # 0x1a4868
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x240(%rsp)
leaq 0x6e8(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0x250(%rsp)
leaq 0x6e8(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0x248(%rsp)
leaq 0x6e8(%rsp), %rdi
callq 0x31c90
movq 0x240(%rsp), %rdi
movsd 0x248(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x250(%rsp), %xmm0
leaq 0x17c781(%rip), %rsi    # 0x1a4868
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x258(%rsp)
leaq 0x6d0(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0x268(%rsp)
leaq 0x6d0(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0x260(%rsp)
leaq 0x6d0(%rsp), %rdi
callq 0x31c90
movq 0x258(%rsp), %rdi
movsd 0x260(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x268(%rsp), %xmm0
leaq 0x17c70d(%rip), %rsi    # 0x1a4868
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x270(%rsp)
movq 0x718(%rsp), %rdi
callq 0x31410
movsd %xmm0, 0x278(%rsp)
movq 0x718(%rsp), %rdi
callq 0x314f0
cmpq $0x0, %rax
je 0x281b9
movq 0x718(%rsp), %rdi
callq 0x314f0
movq %rax, %rdi
callq 0x31130
movl %eax, 0x21c(%rsp)
jmp 0x281c7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x21c(%rsp)
jmp 0x281c7
movsd 0x278(%rsp), %xmm0
movq 0x270(%rsp), %rdi
movl 0x21c(%rsp), %edx
leaq 0x17c68c(%rip), %rsi    # 0x1a4872
movb $0x1, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x1e0(%rsp)
movq 0x718(%rsp), %rdi
callq 0x31470
movl %eax, 0x1ec(%rsp)
movq 0x718(%rsp), %rdi
callq 0x31490
movq 0x1e0(%rsp), %rdi
movl 0x1ec(%rsp), %edx
movl %eax, %ecx
leaq 0x17c645(%rip), %rsi    # 0x1a487b
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x1f0(%rsp)
movq 0x718(%rsp), %rdi
callq 0x31430
movsd %xmm0, 0x200(%rsp)
movq 0x718(%rsp), %rdi
callq 0x314b0
movq %rax, %rdi
callq 0x308e0
movsd %xmm0, 0x1f8(%rsp)
movq 0x718(%rsp), %rdi
callq 0x314b0
movq %rax, %rdi
callq 0x30910
movq 0x1f0(%rsp), %rdi
movsd 0x1f8(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x200(%rsp), %xmm0
leaq 0x17c5c9(%rip), %rsi    # 0x1a4883
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x208(%rsp)
movq 0x718(%rsp), %rdi
callq 0x314d0
movq %rax, 0x6c8(%rsp)
leaq 0x6c8(%rsp), %rdi
callq 0x1c310
movq 0x208(%rsp), %rdi
movl %eax, %edx
leaq 0x17cdb3(%rip), %rsi    # 0x1a50b7
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x210(%rsp)
movq 0x718(%rsp), %rdi
callq 0x31450
movq 0x210(%rsp), %rdi
leaq 0x17c552(%rip), %rsi    # 0x1a4889
movb $0x1, %al
callq 0x13810
movl $0x0, 0x6c4(%rsp)
cmpl $0x1, 0x6c4(%rsp)
jge 0x2837c
movq 0x840(%rsp), %rdi
leaq 0x183df4(%rip), %rsi    # 0x1ac156
movb $0x0, %al
callq 0x13810
movl 0x6c4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c4(%rsp)
jmp 0x28349
movq 0x840(%rsp), %rdi
leaq 0x183367(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl 0x720(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x720(%rsp)
jmp 0x27f2c
movl $0x0, 0x6c0(%rsp)
movq 0x450(%rsp), %rdi
movl 0x6c0(%rsp), %eax
movl %eax, 0x1dc(%rsp)
callq 0x16cc0
movl %eax, %ecx
movl 0x1dc(%rsp), %eax
cmpl %ecx, %eax
jge 0x28d65
movq 0x450(%rsp), %rdi
movl 0x6c0(%rsp), %esi
callq 0x30800
movq %rax, 0x6b8(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x30940
movq %rax, %rsi
leaq 0x6a0(%rsp), %rdi
callq 0xf8390
movq 0x6b8(%rsp), %rsi
leaq 0x688(%rsp), %rdi
callq 0x31ca0
movq 0x6b8(%rsp), %rdi
callq 0x31cf0
movq %rax, %rsi
leaq 0x670(%rsp), %rdi
callq 0xf94f0
movq 0x840(%rsp), %rdi
leaq 0x17c435(%rip), %rsi    # 0x1a488e
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x178(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x30890
movq 0x178(%rsp), %rdi
movq %rax, %rsi
callq 0x29140
movq 0x840(%rsp), %rax
movq %rax, 0x180(%rsp)
leaq 0x6a0(%rsp), %rdi
callq 0x187b0
movsd %xmm0, 0x190(%rsp)
leaq 0x6a0(%rsp), %rdi
callq 0x187c0
movsd %xmm0, 0x188(%rsp)
leaq 0x6a0(%rsp), %rdi
callq 0x187a0
movq 0x180(%rsp), %rdi
movsd 0x188(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x190(%rsp), %xmm0
leaq 0x17c36e(%rip), %rsi    # 0x1a4868
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x198(%rsp)
leaq 0x688(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0x1a8(%rsp)
leaq 0x688(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0x1a0(%rsp)
leaq 0x688(%rsp), %rdi
callq 0x31c90
movq 0x198(%rsp), %rdi
movsd 0x1a0(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x1a8(%rsp), %xmm0
leaq 0x17c2fa(%rip), %rsi    # 0x1a4868
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x1b0(%rsp)
leaq 0x670(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0x1c0(%rsp)
leaq 0x670(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0x1b8(%rsp)
leaq 0x670(%rsp), %rdi
callq 0x31c90
movq 0x1b0(%rsp), %rdi
movsd 0x1b8(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x1c0(%rsp), %xmm0
leaq 0x17c286(%rip), %rsi    # 0x1a4868
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x1c8(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x31d20
movq 0x1c8(%rsp), %rdi
leaq 0x17c27c(%rip), %rsi    # 0x1a4891
movb $0x1, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x1d0(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x31620
cmpq $0x0, %rax
je 0x2865d
movq 0x6b8(%rsp), %rdi
callq 0x31620
movq %rax, %rdi
callq 0x31650
movl %eax, 0x174(%rsp)
jmp 0x2866b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x174(%rsp)
jmp 0x2866b
movq 0x1d0(%rsp), %rdi
movl 0x174(%rsp), %edx
leaq 0x17c1fd(%rip), %rsi    # 0x1a487e
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x308f0
movl %eax, 0x134(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x30920
movq 0x128(%rsp), %rdi
movl 0x134(%rsp), %edx
movl %eax, %ecx
leaq 0x17c1aa(%rip), %rsi    # 0x1a487b
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x31540
movsd %xmm0, 0x140(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x31560
movq 0x138(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x140(%rsp), %xmm0
leaq 0x17c160(%rip), %rsi    # 0x1a4886
movb $0x2, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x31580
movq %rax, %rdi
callq 0x308e0
movsd %xmm0, 0x150(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x31580
movq %rax, %rdi
callq 0x30910
movq 0x148(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x150(%rsp), %xmm0
leaq 0x17c0fb(%rip), %rsi    # 0x1a4886
movb $0x2, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x158(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x31600
movq %rax, 0x668(%rsp)
leaq 0x668(%rsp), %rdi
callq 0x1c310
movq 0x158(%rsp), %rdi
movl %eax, %edx
leaq 0x17c8e2(%rip), %rsi    # 0x1a50b7
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x160(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x315a0
movq 0x160(%rsp), %rdi
movl %eax, %edx
leaq 0x17c074(%rip), %rsi    # 0x1a487e
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x168(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x31d40
movq 0x168(%rsp), %rdi
movl %eax, %ecx
xorl %edx, %edx
movl $0x1, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edx
leaq 0x17c032(%rip), %rsi    # 0x1a487e
movb $0x0, %al
callq 0x13810
movl $0x0, 0x664(%rsp)
cmpl $0x2, 0x664(%rsp)
jge 0x28891
movq 0x840(%rsp), %rdi
leaq 0x17c020(%rip), %rsi    # 0x1a4897
movb $0x0, %al
callq 0x13810
movl 0x664(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x664(%rsp)
jmp 0x2885e
movq 0x6b8(%rsp), %rdi
callq 0x315a0
cmpl $0x0, %eax
je 0x2893c
movq 0x6b8(%rsp), %rdi
callq 0x315c0
movq %rax, 0x658(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x315e0
movq %rax, 0x650(%rsp)
movq 0x840(%rsp), %rdi
movq 0x658(%rsp), %rax
movsd (%rax), %xmm0
movq 0x658(%rsp), %rax
movsd 0x8(%rax), %xmm1
movq 0x658(%rsp), %rax
movsd 0x10(%rax), %xmm2
leaq 0x17bf7e(%rip), %rsi    # 0x1a4884
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rdi
movq 0x650(%rsp), %rax
movsd (%rax), %xmm0
movq 0x650(%rsp), %rax
movsd 0x8(%rax), %xmm1
leaq 0x17bf52(%rip), %rsi    # 0x1a4887
movb $0x2, %al
callq 0x13810
movq 0x6b8(%rsp), %rdi
callq 0x31d40
cmpl $0x0, %eax
je 0x28d39
movq 0x6b8(%rsp), %rdi
callq 0x31500
movq %rax, 0x648(%rsp)
movq 0x6b8(%rsp), %rdi
callq 0x31520
movq %rax, 0x640(%rsp)
movq 0x648(%rsp), %rsi
leaq 0x5c0(%rsp), %rdi
callq 0xd55b0
movq 0x648(%rsp), %rsi
addq $0x60, %rsi
leaq 0x540(%rsp), %rdi
callq 0xd55b0
leaq 0x528(%rsp), %rdi
leaq 0x5c0(%rsp), %rsi
leaq 0x5d56ef(%rip), %rdx    # 0x5fe0b0
callq 0xdc230
leaq 0x510(%rsp), %rdi
leaq 0x540(%rsp), %rsi
leaq 0x5d56d3(%rip), %rdx    # 0x5fe0b0
callq 0xdc230
leaq 0x4f8(%rsp), %rdi
leaq 0x5c0(%rsp), %rsi
leaq 0x5d584f(%rip), %rdx    # 0x5fe248
callq 0xdbfc0
leaq 0x4e0(%rsp), %rdi
leaq 0x540(%rsp), %rsi
leaq 0x5d5833(%rip), %rdx    # 0x5fe248
callq 0xdbfc0
leaq 0x4c8(%rsp), %rdi
leaq 0x5c0(%rsp), %rsi
leaq 0x5d57b7(%rip), %rdx    # 0x5fe1e8
callq 0xdbfc0
leaq 0x4b0(%rsp), %rdi
leaq 0x540(%rsp), %rsi
leaq 0x5d579b(%rip), %rdx    # 0x5fe1e8
callq 0xdbfc0
movq 0x840(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x528(%rsp), %rdi
callq 0x187b0
movsd %xmm0, 0xa8(%rsp)
leaq 0x528(%rsp), %rdi
callq 0x187c0
movsd %xmm0, 0xa0(%rsp)
leaq 0x528(%rsp), %rdi
callq 0x187a0
movq 0x98(%rsp), %rdi
movsd 0xa0(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0xa8(%rsp), %xmm0
leaq 0x17bdc4(%rip), %rsi    # 0x1a4883
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0xb0(%rsp)
leaq 0x4f8(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0xc0(%rsp)
leaq 0x4f8(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0xb8(%rsp)
leaq 0x4f8(%rsp), %rdi
callq 0x31c90
movq 0xb0(%rsp), %rdi
movsd 0xb8(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0xc0(%rsp), %xmm0
leaq 0x17bd50(%rip), %rsi    # 0x1a4883
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0xc8(%rsp)
leaq 0x4c8(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0xd8(%rsp)
leaq 0x4c8(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0xd0(%rsp)
leaq 0x4c8(%rsp), %rdi
callq 0x31c90
movq 0xc8(%rsp), %rdi
movsd 0xd0(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0xd8(%rsp), %xmm0
leaq 0x17bcdc(%rip), %rsi    # 0x1a4883
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0xe0(%rsp)
leaq 0x510(%rsp), %rdi
callq 0x187b0
movsd %xmm0, 0xf0(%rsp)
leaq 0x510(%rsp), %rdi
callq 0x187c0
movsd %xmm0, 0xe8(%rsp)
leaq 0x510(%rsp), %rdi
callq 0x187a0
movq 0xe0(%rsp), %rdi
movsd 0xe8(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0xf0(%rsp), %xmm0
leaq 0x17bc68(%rip), %rsi    # 0x1a4883
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0xf8(%rsp)
leaq 0x4e0(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0x108(%rsp)
leaq 0x4e0(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0x100(%rsp)
leaq 0x4e0(%rsp), %rdi
callq 0x31c90
movq 0xf8(%rsp), %rdi
movsd 0x100(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x108(%rsp), %xmm0
leaq 0x17bbf4(%rip), %rsi    # 0x1a4883
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rax
movq %rax, 0x110(%rsp)
leaq 0x4b0(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0x120(%rsp)
leaq 0x4b0(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0x118(%rsp)
leaq 0x4b0(%rsp), %rdi
callq 0x31c90
movq 0x110(%rsp), %rdi
movsd 0x118(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x120(%rsp), %xmm0
leaq 0x17bb80(%rip), %rsi    # 0x1a4883
movb $0x3, %al
callq 0x13810
movq 0x840(%rsp), %rdi
movq 0x640(%rsp), %rax
movsd (%rax), %xmm0
movq 0x640(%rsp), %rax
movsd 0x8(%rax), %xmm1
leaq 0x17bb68(%rip), %rsi    # 0x1a489a
movb $0x2, %al
callq 0x13810
movq 0x840(%rsp), %rdi
leaq 0x1829aa(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl 0x6c0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c0(%rsp)
jmp 0x283b3
movl $0x0, 0x4ac(%rsp)
movq 0x450(%rsp), %rdi
movl 0x4ac(%rsp), %eax
movl %eax, 0x94(%rsp)
callq 0x30700
movl %eax, %ecx
movl 0x94(%rsp), %eax
cmpl %ecx, %eax
jge 0x28f36
movq 0x450(%rsp), %rdi
movl 0x4ac(%rsp), %esi
callq 0x30720
movq %rax, 0x4a0(%rsp)
movq 0x840(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x4a0(%rsp), %rdi
callq 0x1bc50
movl %eax, 0x8c(%rsp)
movq 0x4a0(%rsp), %rdi
callq 0x30cc0
movq %rax, %rdi
callq 0x1bf60
movl %eax, 0x90(%rsp)
movq 0x4a0(%rsp), %rdi
callq 0x1bcd0
movq 0x80(%rsp), %rdi
movl 0x8c(%rsp), %edx
movl 0x90(%rsp), %ecx
movl %eax, %r8d
leaq 0x17ba81(%rip), %rsi    # 0x1a48a6
movb $0x0, %al
callq 0x13810
movl $0x0, 0x49c(%rsp)
cmpl $0x4, 0x49c(%rsp)
jge 0x28e6a
movq 0x840(%rsp), %rdi
leaq 0x183306(%rip), %rsi    # 0x1ac156
movb $0x0, %al
callq 0x13810
movl 0x49c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x49c(%rsp)
jmp 0x28e37
movq 0x840(%rsp), %rdi
leaq 0x182879(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl $0x0, 0x498(%rsp)
movl 0x498(%rsp), %eax
movl %eax, 0x7c(%rsp)
movq 0x4a0(%rsp), %rdi
callq 0x1bcd0
movl %eax, %ecx
movl 0x7c(%rsp), %eax
cmpl %ecx, %eax
jge 0x28ef4
movq 0x840(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x4a0(%rsp), %rdi
movl 0x498(%rsp), %esi
callq 0x1bce0
movq 0x70(%rsp), %rdi
leaq 0x17b916(%rip), %rsi    # 0x1a47f0
movb $0x1, %al
callq 0x13810
movl 0x498(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x498(%rsp)
jmp 0x28e8b
movq 0x840(%rsp), %rdi
leaq 0x1827ef(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rdi
leaq 0x1827d9(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl 0x4ac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4ac(%rsp)
jmp 0x28d70
movl $0x0, 0x494(%rsp)
movq 0x450(%rsp), %rdi
movl 0x494(%rsp), %eax
movl %eax, 0x6c(%rsp)
callq 0x30750
movl %eax, %ecx
movl 0x6c(%rsp), %eax
cmpl %ecx, %eax
jge 0x290ef
movq 0x450(%rsp), %rdi
movl 0x494(%rsp), %esi
callq 0x30770
movq %rax, 0x488(%rsp)
movq 0x840(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x488(%rsp), %rdi
callq 0x31340
movl %eax, 0x64(%rsp)
movq 0x488(%rsp), %rdi
callq 0x30d40
movq %rax, %rdi
callq 0x31300
movl %eax, 0x68(%rsp)
movq 0x488(%rsp), %rdi
callq 0x31350
movq 0x58(%rsp), %rdi
movl 0x64(%rsp), %edx
movl 0x68(%rsp), %ecx
movl %eax, %r8d
leaq 0x17b8d4(%rip), %rsi    # 0x1a48b2
movb $0x0, %al
callq 0x13810
movl $0x0, 0x484(%rsp)
cmpl $0x4, 0x484(%rsp)
jge 0x29023
movq 0x840(%rsp), %rdi
leaq 0x18314d(%rip), %rsi    # 0x1ac156
movb $0x0, %al
callq 0x13810
movl 0x484(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x484(%rsp)
jmp 0x28ff0
movq 0x840(%rsp), %rdi
leaq 0x1826c0(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl $0x0, 0x480(%rsp)
movl 0x480(%rsp), %eax
movl %eax, 0x54(%rsp)
movq 0x488(%rsp), %rdi
callq 0x31350
movl %eax, %ecx
movl 0x54(%rsp), %eax
cmpl %ecx, %eax
jge 0x290ad
movq 0x840(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x488(%rsp), %rdi
movl 0x480(%rsp), %esi
callq 0x31360
movq 0x48(%rsp), %rdi
leaq 0x17b75d(%rip), %rsi    # 0x1a47f0
movb $0x1, %al
callq 0x13810
movl 0x480(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x480(%rsp)
jmp 0x29044
movq 0x840(%rsp), %rdi
leaq 0x182636(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movq 0x840(%rsp), %rdi
leaq 0x182620(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl 0x494(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x494(%rsp)
jmp 0x28f41
movq 0x450(%rsp), %rax
addq $0x1e8, %rax            # imm = 0x1E8
movq %rax, 0x40(%rsp)
leaq 0x478(%rsp), %rdi
movl $0x1, %esi
callq 0x1b970
movq 0x40(%rsp), %rdi
movq 0x478(%rsp), %rsi
callq 0x31a80
movl $0x1, %eax
addq $0x850, %rsp            # imm = 0x850
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)