// File: /workspace/github_cpp_makefile_star2_O1/hzeller[P]gcode-multi-shell-extrude/multi-shell-extrude.cc
// Function: main
int main(int argc, char *argv[]) {
  ParamHeadline h1("Screw-data from template");
  StringParam fun_init    ("AABBBAABBBAABBB", "screw-template", 't', "Template string for screw.");
  FloatParam thread_depth (-1, "thread-depth", 'd',   "Depth of thread, initial-size/5 if negative");
  FloatParam twist        (0.0, "twist",        0,    "Twist ratio of angle per radius fraction (good -0.3..0.3)");

  ParamHeadline h2("Screw-data from polygon file");
  StringParam polygon_file("", "polygon-file", 'D',  "File describing polygon. Files with x y pairs");

  ParamHeadline h3("General Parameters");
  FloatParam total_height (-1,    "height", 'h', "Total height to be printed (must set)");
  FloatParam pitch        (30.0,  "pitch",  'p', "Millimeter height a full turn takes. "
                           "Negative for left-turning screw; 0 for straight hull.");
  FloatParam initial_size (10.0, "size",    's', "Polygon sizing parameter. Means radius if from "
                           "--screw-template, factor for --polygon-file");
  Vector2DParam center_offset(Vector2D(0.0, 0.0), "center-offset", 0, "Rotation-center offset into polygon.");
  BoolParam  auto_center(false, "auto-center", 0, "Automatically center around centroid.");
  FloatParam pump         (0.0,   "pump",    0, "Pump polygon as if the center was not a dot, but a circle of this radius");
  IntParam screw_count    (2,     "number", 'n', "Number of screws to be printed");
  FloatParam initial_shell(0,     "start-offset", 0, "Initial offset for first polygon");
  FloatParam shell_increment(1.2, "offset", 'R', "Offset increment between screws - the clearance");
  FloatParam lock_offset  (-1,    "lock-offset", 0, "EXPERIMENTAL offset to stop screw at end; Approx value: (offset - shell_thickness)/2 + 0.05");
  FloatParam brim(0, "brim", 0, "Add brim of this size on the bottom for better stability");
  FloatParam brim_spiral_factor(0.55, "brim-spiral-factor", 0,
                               "Distance between spirals in brim as factor of shell-thickness");
  FloatParam brim_smooth_radius(0, "brim-smooth-radius", 0, "Smoothing of brim connection to polygon to not get lost in inner details");
  BoolParam vessel(false, "vessel", 0, "Make a vessel with closed bottom");

  ParamHeadline h4("Quality");
  FloatParam layer_height (0.16,  "layer-height", 'l', "Height of each layer");
  FloatParam shell_thickness(0.8, "shell-thickness", 0, "Thickness of shell");
  FloatParam feed_mm_per_sec(100, "feed-rate",    'f', "maximum, in mm/s");
  FloatParam min_layer_time(3,    "layer-time",   'T', "Min time per layer; upper bound for feed-rate");
  FloatParam fan_on (0.3,  "fan-on-height", 0, "Height to switch on fan");
  FloatParam elephant_foot_multiplier (0.9,  "slender-elephant", 0, "Extrusion multiplier at first two layer heights to prevent elephant foot");
  FloatParam retract_amount (1.2, "retract", 0, "Millimeter of retract");
  FloatParam first_layer_feed_multiplier (0.7, "first-layer-speed", 0, "Feedrate multiplier for first layer");
  ParamHeadline h5("Printer Parameters");
  FloatParam nozzle_diameter(0.4, "nozzle-diameter", 0, "Diameter of extruder nozzle");
  FloatParam bed_temp(-1, "bed-temp", 0, "Bed temperature.");
  FloatParam temperature(190, "temperature", 0, "Extrusion temperature.");
  FloatParam temp_variation(0, "temperature-variation", 0, "Temperature variation around --temperature, e.g. to get dark lines in wood filament.");
  FloatParam filament_diameter(1.75, "filament-diameter", 0, "Diameter of filament");
  Vector2DParam machine_limit(Vector2D(150.0,150.0), "bed-size",    'L',  "x/y size limit of your printbed.");
  Vector2DParam head_offset(Vector2D(45.0,45.0),"head-offset", 'o', "dx/dy offset per print.");
  Vector2DParam edge_offset(Vector2D(5.0,5.0), "edge-offset",  0,  "Offset from the edge of the bed (bottom left origin).");

  // Output options
  ParamHeadline h6("Output Options");
  BoolParam do_postscript(false, "postscript", 'P', "PostScript output instead of GCode output");
  FloatParam postscript_thick_factor(1.0, "ps-thick-factor", 0, "Line thickness factor for shell size. Chooser smaller (e.g. 0.1) to better see overlaps");
  BoolParam matryoshka(false,    "nested",      0, "For PostScript: show nested (Matryoshka doll style)");

  if (!SetParametersFromCommandline(argc, argv)) {
    return ParameterUsage(argv[0]);
  }

  if (total_height < 0) {
    fprintf(stderr, "\n--height needs to be set\n\n");
    return ParameterUsage(argv[0]);
  }

  if (thread_depth < 0)
    thread_depth = initial_size / 5;

  if (matryoshka && !do_postscript) {
    fprintf(stderr, "Matryoshka mode only valid with postscript\n");
    return ParameterUsage(argv[0]);
  }

  // Calculated values from input parameters.
  const double nozzle_radius = nozzle_diameter / 2;
  const double filament_radius = filament_diameter / 2;
  const double shell_thickness_factor = shell_thickness / nozzle_diameter;

  matryoshka = matryoshka & do_postscript;   // Formulate it this way.

  // Get polygon we'll be working on; either from rotational input or file.
  Polygon input_polygon = (polygon_file.get().empty()
                           ? RotationalPolygon(fun_init.get().c_str(),
                                               initial_size,
                                               thread_depth, twist)
                           : ReadPolygon(polygon_file, initial_size));

  // Add pump if needed.
  if (pump > 0) {
    input_polygon = RadialPumpPolygon(input_polygon, pump);
  }

  if (auto_center) {
    center_offset = Centroid(input_polygon);
    center_offset = Vector2D(0,0) - center_offset;
  }

  // .. and offsetting
  if (center_offset->x != 0 || center_offset->y != 0) {
    input_polygon = OffsetCenter(input_polygon,
                                 center_offset->x, center_offset->y);
  }

  const Polygon base_polygon = input_polygon;
  if (base_polygon.empty()) {
    fprintf(stderr, "Polygon empty\n");
    return 1;
  }
  if (base_polygon.size() < 3) {
    fprintf(stderr, "Polygon is a %sgon :) Need at least 3 vertices.\n",
            base_polygon.size() == 1 ? "Mono" : "Duo");
    return 1;
  }

  // Determine limits
  if (matryoshka) {
    Polygon biggst_polygon
      = PolygonOffset(base_polygon,
                      initial_shell + (screw_count-1) * shell_increment);
    double max_radius = GetRadius(biggst_polygon) + brim;
    Vector2D poly_radius(max_radius + 5, max_radius + 5);
    machine_limit = poly_radius * 2;
    edge_offset = poly_radius;  // In matryoshka-case, edge_offset is center
  } else {
    const Vector2D max_machine = machine_limit - edge_offset;
    Vector2D pos = edge_offset;
    float radius = GetRadius(PolygonOffset(base_polygon, initial_shell));
    Vector2D screw_dimension(2 * (radius + brim), 2*(radius + brim));
    for (int i = 0; i < screw_count; ++i) {
      Vector2D new_pos = pos + screw_dimension;
      if (new_pos.x > max_machine.x || new_pos.y > max_machine.y) {
        fprintf(stderr, "With currently configured bedsize and printhead-offset, "
                "only %d screws fit (radius is %.1fmm)\n"
                "Configure your machine constraints with -L <x/y> -o < dx,dy> "
                "(currently -L %.0f,%.0f -o %.0f,%.0f)\n", i, radius,
                machine_limit->x, machine_limit->y,
                head_offset->x, head_offset->y);
        screw_count = i;
        break;
      }
      pos = new_pos + head_offset;
      screw_dimension = screw_dimension
        + Vector2D(shell_increment, shell_increment) * 2;
    }
    pos = pos - head_offset;
    // Now, pos is the largest corner. We can offset
    // the edge_offset now to the difference to center things.
    edge_offset = edge_offset + (max_machine - pos - edge_offset) / 2;
  }

  const double filament_extrusion_factor = shell_thickness_factor *
    (nozzle_radius * (layer_height/2)) / (filament_radius*filament_radius);

  Printer *printer = NULL;
  if (do_postscript) {
    total_height = std::min(total_height.get(),
                            3 * layer_height); // not needed more.
    // no move lines w/ Matryoshka
    printer = CreatePostscriptPrinter(!matryoshka,
                                      postscript_thick_factor * shell_thickness);
  } else {
    printer = CreateGCodePrinter(filament_extrusion_factor, retract_amount,
                                 temperature, bed_temp);
  }
  printer->Preamble(machine_limit, feed_mm_per_sec);

  printer->Comment("https://github.com/hzeller/gcode-multi-shell-extrude\n");
  printer->Comment("\n");
  printer->Comment(" ");
  for (int i = 0; i < argc; ++i)
    printf("%s ", argv[i]);
  printf("\n");
  printer->Comment("\n");
  if (!polygon_file.get().empty()) {
    printer->Comment("Polygon from polygon-file '%s'\n",
                     polygon_file.get().c_str());
    printer->Comment("size-factor=%.1f\n", initial_size.get());
  } else {
    printer->Comment("Polygon from screw template '%s'\n",
                     fun_init.get().c_str());
    printer->Comment("thread-depth=%.1fmm size=%.1fmm (radius)\n",
                     thread_depth.get(), initial_size.get());
  }
  printer->Comment("h=%.1fmm n=%d (shell-increment=%.1fmm)\n",
                   total_height.get(), screw_count.get(), shell_increment.get());
  printer->Comment("feed=%.1fmm/s (maximum; layer time at least %.1f s)\n",
                   feed_mm_per_sec.get(), min_layer_time.get());
  printer->Comment("pitch=%.1fmm/turn layer-height=%.3f\n",
                   pitch.get(), layer_height.get());
  printer->Comment("machine limits: bed: (%.0f/%.0f):  "
                  "head-offset: (%.0f,%.0f)\n",
                   machine_limit->x, machine_limit->y,
                   head_offset->x, head_offset->y);
  printer->Comment("----\n");

  printer->Init(machine_limit, feed_mm_per_sec);

  // How much the whole system should rotate per mm height.
  const double rotation_per_mm = (fabs(pitch) < 0.1) ? 0 : 1.0 / pitch;

  double total_time = 0;
  double total_travel = 0;

  constexpr float kHoverPos = 10.0;  // Hovering over screws while moving
  Vector2D center = edge_offset;
  printer->SetSpeed(feed_mm_per_sec);  // initial speed.
  for (int i = 0; i < screw_count; ++i) {
    const float current_offset = initial_shell + i * shell_increment;
    Polygon polygon = PolygonOffset(base_polygon, current_offset);
    if (polygon.size() == 0) {
      fprintf(stderr, "Polygon offset %.1f results in empty polygon\n",
              initial_shell + i * shell_increment);
      continue;
    }
    const double radius = GetRadius(polygon);
    Vector2D screw_radius(radius + brim, radius + brim);
    if (!matryoshka) {
      // We start here.
      center = center + screw_radius;
    }
    printer->MoveTo(center, i > 0 ? total_height + kHoverPos : kHoverPos);
    const float polygon_len = CalcPolygonLen(polygon);
    const float area = polygon_len * total_height * 2;  // inside and out.
    float layer_feedrate =  polygon_len / min_layer_time;
    layer_feedrate = std::min(layer_feedrate, feed_mm_per_sec.get());
    printer->ResetExtrude();
    printer->SetSpeed(layer_feedrate);
    printer->Comment("Screw #%d, polygon-offset=%.1f\n",
                     i+1, initial_shell + i * shell_increment);
    if (vessel) {
      const float spiral_layer_distance = shell_thickness * brim_spiral_factor;
      printer->Comment("Create vessel-bottom\n");
      printer->SetColor(0.5, 0, 0.5);
      CreateBottomPlate(polygon, printer, center,
                        0, -radius, spiral_layer_distance);
      // TODO: make this multi-layer.
      printer->GoZPos(2);
    }

    if (brim > 0) {
      const float spiral_layer_distance = shell_thickness * brim_spiral_factor;
      int layers = (int) ceil(brim / spiral_layer_distance);
      Polygon brim_polygon = polygon;
      if (brim_smooth_radius > 0)
        brim_polygon = PolygonOffset(PolygonOffset(polygon, brim_smooth_radius), -brim_smooth_radius);
      printer->Comment("Create brim\n");
      printer->SetColor(0, 0.5, 0);
      CreateBottomPlate(brim_polygon, printer, center,
                        layers * spiral_layer_distance, spiral_layer_distance/2,
                        spiral_layer_distance);
    }
    ExtrusionParams params = {
      .feedrate = layer_feedrate,
      .layer_height = layer_height,
      .total_height = total_height,
      .rotation_per_mm = rotation_per_mm,
      .lock_offset = lock_offset,
      .fan_on_height = fan_on,
      .elephant_foot_multiplier = elephant_foot_multiplier,
      .first_layer_feedrate_multiplier = first_layer_feed_multiplier,
      .base_temp = temperature,
      .temp_variation = temp_variation
    };

    CreateExtrusion(polygon, printer, center, params);
    const double travel = printer->GetExtrusionDistance();  // since last reset.
    total_travel += travel;
    total_time += travel / layer_feedrate;  // roughly (without acceleration)
    printer->SetSpeed(feed_mm_per_sec);
    printer->Retract();
    printer->GoZPos(total_height + kHoverPos);
    if (!matryoshka) {
      center = center + screw_radius + head_offset;
    }
    if (!do_postscript) {
      fprintf(stderr, "Screw-surface (out+in) for offset %.1f: ~%.1f cm²\n",
              current_offset, area / 100);
    }
  }

  printer->Postamble();
  if (!do_postscript) {  // doesn't make sense to print for PostScript
    int t = (int)total_time;
    const int hours = t / 3600;
    t %= 3600;
    const int minutes = t / 60;
    const int seconds = t % 60;
    fprintf(stderr, "Total time >= %02d:%02d:%02d; %.2fm filament\n", hours,
            minutes, seconds, total_travel * filament_extrusion_factor / 1000);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x938, %rsp            # imm = 0x938
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x1032f(%rip), %rcx     # 0x14132
leaq 0x918(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x802c
leaq 0x17afa(%rip), %r15     # 0x1b918
movq %r15, (%r14)
leaq 0x3d0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x10317(%rip), %rsi     # 0x1414b
leaq 0x1031f(%rip), %rdx     # 0x1415a
leaq 0x3c0(%rsp), %rdi
callq 0x6706
leaq 0x1030c(%rip), %rsi     # 0x1415b
leaq 0x10314(%rip), %rcx     # 0x1416a
leaq 0x190(%rsp), %rdi
movl $0x74, %edx
callq 0x802c
leaq 0x17b09(%rip), %rax     # 0x1b978
leaq 0x1b0(%rsp), %rdi
movq %rax, -0x20(%rdi)
leaq 0x1c0(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x3c0(%rsp), %rsi
movq 0x3c8(%rsp), %rdx
addq %rsi, %rdx
callq 0x699a
movq 0x3c0(%rsp), %rdi
cmpq %r14, %rdi
je 0x3ebc
movq 0x3d0(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x102c2(%rip), %rsi     # 0x14185
leaq 0x102c8(%rip), %rcx     # 0x14192
leaq 0x4c0(%rsp), %rdi
movl $0x64, %edx
callq 0x802c
leaq 0x17ae5(%rip), %r12     # 0x1b9c8
movq %r12, 0x4c0(%rsp)
movl $0xbf800000, 0x4e0(%rsp) # imm = 0xBF800000
leaq 0x102c1(%rip), %rsi     # 0x141be
leaq 0x102c0(%rip), %rcx     # 0x141c4
leaq 0x850(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x850(%rsp)
movl $0x0, 0x870(%rsp)
leaq 0x102d1(%rip), %rcx     # 0x141fe
leaq 0x8f8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x802c
movq %r15, 0x8f8(%rsp)
leaq 0x310(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x11321(%rip), %rdx     # 0x1527a
leaq 0x300(%rsp), %rdi
movq %rdx, %rsi
callq 0x6706
leaq 0x103c1(%rip), %rsi     # 0x14331
leaq 0x102a4(%rip), %rcx     # 0x1421b
leaq 0x98(%rsp), %rdi
movl $0x44, %edx
callq 0x802c
leaq 0xb8(%rsp), %rdi
leaq 0x179e0(%rip), %rax     # 0x1b978
movq %rax, -0x20(%rdi)
leaq 0xc8(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x300(%rsp), %rsi
movq 0x308(%rsp), %rdx
addq %rsi, %rdx
callq 0x699a
movq 0x300(%rsp), %rdi
cmpq %r13, %rdi
je 0x3fdd
movq 0x310(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x10265(%rip), %rcx     # 0x14249
leaq 0x8d8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x802c
movq %r15, 0x8d8(%rsp)
leaq 0x1067a(%rip), %rsi     # 0x1467e
leaq 0x10251(%rip), %rcx     # 0x1425c
leaq 0x200(%rsp), %rdi
movl $0x68, %edx
callq 0x802c
movq %r12, 0x200(%rsp)
movl $0xbf800000, 0x220(%rsp) # imm = 0xBF800000
leaq 0x1024b(%rip), %rsi     # 0x14282
leaq 0x1024a(%rip), %rcx     # 0x14288
leaq 0x620(%rsp), %rdi
movl $0x70, %edx
callq 0x802c
movq %r12, 0x620(%rsp)
movl $0x41f00000, 0x640(%rsp) # imm = 0x41F00000
leaq 0x107eb(%rip), %rsi     # 0x14855
leaq 0x10272(%rip), %rcx     # 0x142e3
leaq 0x448(%rsp), %rdi
movl $0x73, %edx
callq 0x802c
movl %ebp, %r14d
movq %r12, 0x448(%rsp)
movl $0x41200000, 0x468(%rsp) # imm = 0x41200000
leaq 0x1029e(%rip), %rsi     # 0x1433e
leaq 0x102a5(%rip), %rcx     # 0x1434c
leaq 0x4e8(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
leaq 0x1795b(%rip), %rbp     # 0x1ba18
movq %rbp, 0x4e8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x508(%rsp)
leaq 0x1029a(%rip), %rsi     # 0x14371
leaq 0x1029f(%rip), %rcx     # 0x1437d
leaq 0x828(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
leaq 0x17974(%rip), %r13     # 0x1ba68
movq %r13, 0x828(%rsp)
movb $0x0, 0x848(%rsp)
leaq 0x10298(%rip), %rsi     # 0x143a3
leaq 0x10296(%rip), %rcx     # 0x143a8
leaq 0x800(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x800(%rsp)
movl $0x0, 0x820(%rsp)
leaq 0x102b6(%rip), %rsi     # 0x143f1
leaq 0x102b6(%rip), %rcx     # 0x143f8
leaq 0x398(%rsp), %rdi
movl $0x6e, %edx
callq 0x802c
leaq 0x1795d(%rip), %rax     # 0x1bab8
movq %rax, 0x398(%rsp)
movl $0x2, 0x3b8(%rsp)
leaq 0x102a2(%rip), %rsi     # 0x14417
leaq 0x102a8(%rip), %rcx     # 0x14424
leaq 0x420(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x420(%rsp)
movl $0x0, 0x440(%rsp)
leaq 0x106db(%rip), %rsi     # 0x14880
leaq 0x10299(%rip), %rcx     # 0x14445
leaq 0x370(%rsp), %rdi
movl $0x52, %edx
callq 0x802c
movq %r12, 0x370(%rsp)
movl $0x3f99999a, 0x390(%rsp) # imm = 0x3F99999A
leaq 0x1029d(%rip), %rsi     # 0x14475
leaq 0x102a2(%rip), %rcx     # 0x14481
leaq 0x7d8(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x7d8(%rsp)
movl $0xbf800000, 0x7f8(%rsp) # imm = 0xBF800000
leaq 0x102d5(%rip), %rsi     # 0x144dd
leaq 0x102d3(%rip), %rcx     # 0x144e2
leaq 0x498(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x498(%rsp)
movl $0x0, 0x4b8(%rsp)
leaq 0x102e3(%rip), %rsi     # 0x1451b
leaq 0x102ef(%rip), %rcx     # 0x1452e
leaq 0x5f8(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x5f8(%rsp)
movl $0x3f0ccccd, 0x618(%rsp) # imm = 0x3F0CCCCD
leaq 0x10304(%rip), %rsi     # 0x1456c
leaq 0x10310(%rip), %rcx     # 0x1457f
leaq 0x5d0(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x5d0(%rsp)
movl $0x0, 0x5f0(%rsp)
leaq 0x10330(%rip), %rsi     # 0x145c8
leaq 0x10330(%rip), %rcx     # 0x145cf
leaq 0x7b0(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r13, 0x7b0(%rsp)
movb $0x0, 0x7d0(%rsp)
leaq 0x1032b(%rip), %rcx     # 0x145f0
leaq 0x8b8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x802c
movq %r15, 0x8b8(%rsp)
leaq 0x10313(%rip), %rsi     # 0x145f8
leaq 0x10319(%rip), %rcx     # 0x14605
leaq 0x518(%rsp), %rdi
movl $0x6c, %edx
callq 0x802c
movq %r12, 0x518(%rsp)
movl $0x3e23d70a, 0x538(%rsp) # imm = 0x3E23D70A
leaq 0x10244(%rip), %rsi     # 0x1455c
leaq 0x102fb(%rip), %rcx     # 0x1461a
leaq 0x470(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x470(%rsp)
movl $0x3f4ccccd, 0x490(%rsp) # imm = 0x3F4CCCCD
leaq 0x10325(%rip), %rsi     # 0x1466d
leaq 0x102de(%rip), %rcx     # 0x1462d
leaq 0x348(%rsp), %rdi
movl $0x66, %edx
callq 0x802c
movq %r12, 0x348(%rsp)
movl $0x42c80000, 0x368(%rsp) # imm = 0x42C80000
leaq 0x102c3(%rip), %rsi     # 0x1463e
leaq 0x102c7(%rip), %rcx     # 0x14649
leaq 0x5a8(%rsp), %rdi
movl $0x54, %edx
callq 0x802c
movq %r12, 0x5a8(%rsp)
movl $0x40400000, 0x5c8(%rsp) # imm = 0x40400000
leaq 0x102c9(%rip), %rsi     # 0x14677
leaq 0x102d0(%rip), %rcx     # 0x14685
leaq 0x788(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x788(%rsp)
movl $0x3e99999a, 0x7a8(%rsp) # imm = 0x3E99999A
leaq 0x102bf(%rip), %rsi     # 0x1469d
leaq 0x102c9(%rip), %rcx     # 0x146ae
leaq 0x760(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x760(%rsp)
movl $0x3f666666, 0x780(%rsp) # imm = 0x3F666666
leaq 0x102f7(%rip), %rsi     # 0x14705
leaq 0x102e2(%rip), %rcx     # 0x146f7
leaq 0x738(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x738(%rsp)
movl $0x3f99999a, 0x758(%rsp) # imm = 0x3F99999A
leaq 0x102cf(%rip), %rsi     # 0x1470d
leaq 0x102da(%rip), %rcx     # 0x1471f
leaq 0x710(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x710(%rsp)
movl $0x3f333333, 0x730(%rsp) # imm = 0x3F333333
leaq 0x102d5(%rip), %rcx     # 0x14743
leaq 0x898(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x802c
movq %r15, 0x898(%rsp)
leaq 0x102c8(%rip), %rsi     # 0x14756
leaq 0x102d1(%rip), %rcx     # 0x14766
leaq 0x6e8(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x6e8(%rsp)
movl $0x3ecccccd, 0x708(%rsp) # imm = 0x3ECCCCCD
leaq 0x102c4(%rip), %rsi     # 0x14782
leaq 0x102c6(%rip), %rcx     # 0x1478b
leaq 0x6c0(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x6c0(%rsp)
movl $0xbf800000, 0x6e0(%rsp) # imm = 0xBF800000
leaq 0x102ae(%rip), %rsi     # 0x1479c
leaq 0x102b3(%rip), %rcx     # 0x147a8
leaq 0x580(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x580(%rsp)
movl $0x433e0000, 0x5a0(%rsp) # imm = 0x433E0000
leaq 0x102a1(%rip), %rsi     # 0x147bf
leaq 0x102b0(%rip), %rcx     # 0x147d5
leaq 0x698(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x698(%rsp)
movl $0x0, 0x6b8(%rsp)
leaq 0x102dc(%rip), %rsi     # 0x1482a
leaq 0x102e7(%rip), %rcx     # 0x1483c
leaq 0x670(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x670(%rsp)
movl $0x3fe00000, 0x690(%rsp) # imm = 0x3FE00000
leaq 0x102d3(%rip), %rsi     # 0x14851
leaq 0x102d5(%rip), %rcx     # 0x1485a
leaq 0x258(%rsp), %rdi
movl $0x4c, %edx
callq 0x802c
movq %rbp, 0x258(%rsp)
movabsq $0x4062c00000000000, %rax # imm = 0x4062C00000000000
movq %rax, 0x278(%rsp)
movq %rax, 0x280(%rsp)
leaq 0x102bb(%rip), %rsi     # 0x1487b
leaq 0x102c0(%rip), %rcx     # 0x14887
leaq 0x1d0(%rsp), %rdi
movl $0x6f, %edx
callq 0x802c
movq %rbp, 0x1d0(%rsp)
movabsq $0x4046800000000000, %rax # imm = 0x4046800000000000
movq %rax, 0x1f0(%rsp)
movq %rax, 0x1f8(%rsp)
leaq 0x1029d(%rip), %rsi     # 0x1489f
leaq 0x102a2(%rip), %rcx     # 0x148ab
leaq 0x228(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %rbp, 0x228(%rsp)
movabsq $0x4014000000000000, %rax # imm = 0x4014000000000000
movq %rax, 0x248(%rsp)
movq %rax, 0x250(%rsp)
leaq 0x102a0(%rip), %rcx     # 0x148e1
leaq 0x878(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x802c
movq %r15, 0x878(%rsp)
leaq 0x1028f(%rip), %rsi     # 0x148f0
leaq 0x10293(%rip), %rcx     # 0x148fb
leaq 0x3f8(%rsp), %rdi
movl $0x50, %edx
callq 0x802c
movl %r14d, %ebp
movq %r13, 0x3f8(%rsp)
movb $0x0, 0x418(%rsp)
leaq 0x10291(%rip), %rsi     # 0x14925
leaq 0x1029a(%rip), %rcx     # 0x14935
leaq 0x648(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r12, 0x648(%rsp)
movl $0x3f800000, 0x668(%rsp) # imm = 0x3F800000
leaq 0x102c9(%rip), %rsi     # 0x1498d
leaq 0x102c9(%rip), %rcx     # 0x14994
leaq 0x320(%rsp), %rdi
xorl %edx, %edx
callq 0x802c
movq %r13, 0x320(%rsp)
movb $0x0, 0x340(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
callq 0x82d9
testb %al, %al
je 0x5f28
xorps %xmm0, %xmm0
ucomiss 0x220(%rsp), %xmm0
ja 0x5ef7
ucomiss 0x4e0(%rsp), %xmm0
jbe 0x4731
movss 0x468(%rsp), %xmm0
divss 0xf9a8(%rip), %xmm0     # 0x140d0
movss %xmm0, 0x4e0(%rsp)
movb 0x340(%rsp), %al
cmpb $0x1, %al
jne 0x474a
cmpb $0x0, 0x418(%rsp)
je 0x5f23
movss 0x708(%rsp), %xmm0
movss %xmm0, 0x140(%rsp)
movss 0x690(%rsp), %xmm0
mulss 0xf967(%rip), %xmm0     # 0x140d4
movss %xmm0, 0x8c(%rsp)
andb 0x418(%rsp), %al
movss 0x490(%rsp), %xmm0
movss %xmm0, 0x88(%rsp)
movb %al, 0x340(%rsp)
cmpq $0x0, 0xc0(%rsp)
je 0x47c4
xorps %xmm0, %xmm0
cvtss2sd 0x468(%rsp), %xmm0
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x3a6f
jmp 0x47f7
movq 0x1b0(%rsp), %rsi
xorps %xmm0, %xmm0
cvtss2sd 0x468(%rsp), %xmm0
cvtss2sd 0x4e0(%rsp), %xmm1
cvtss2sd 0x870(%rsp), %xmm2
leaq 0xd8(%rsp), %rdi
callq 0x6a54
movss 0x820(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x4878
cvtss2sd %xmm0, %xmm0
movq %rsp, %rdi
leaq 0xd8(%rsp), %rsi
callq 0x3c47
movq 0xd8(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movq (%rsp), %rax
movq %rax, 0xd8(%rsp)
movups 0x8(%rsp), %xmm0
movups %xmm0, 0xe0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x4862
subq %rdi, %rsi
callq 0x3220
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4878
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
cmpb $0x1, 0x848(%rsp)
jne 0x48b0
leaq 0xd8(%rsp), %rdi
callq 0x86b8
xorps %xmm2, %xmm2
xorpd %xmm3, %xmm3
subsd %xmm0, %xmm3
subsd %xmm1, %xmm2
movsd %xmm3, 0x508(%rsp)
movsd %xmm2, 0x510(%rsp)
movsd 0x508(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x48d6
jp 0x48d6
movsd 0x510(%rsp), %xmm2
ucomisd %xmm1, %xmm2
jne 0x48d6
jnp 0x494f
movsd 0x510(%rsp), %xmm1
movq %rsp, %rdi
leaq 0xd8(%rsp), %rsi
callq 0x39b4
movq 0xd8(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movq (%rsp), %rax
movq %rax, 0xd8(%rsp)
movupd 0x8(%rsp), %xmm0
movupd %xmm0, 0xe0(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x4939
subq %rdi, %rsi
callq 0x3220
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x494f
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
leaq 0x150(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x64f8
movq 0x150(%rsp), %rax
movq 0x158(%rsp), %rdi
cmpq %rdi, %rax
je 0x5efe
subq %rax, %rdi
cmpq $0x20, %rdi
jbe 0x5f05
cmpb $0x1, 0x340(%rsp)
jne 0x4a57
movl 0x3b8(%rsp), %eax
decl %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss 0x390(%rsp), %xmm0
addss 0x440(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movq %rsp, %rdi
leaq 0x150(%rsp), %rsi
xorl %edx, %edx
callq 0x6f1c
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
je 0x4b54
movsd 0xf629(%rip), %xmm3     # 0x14010
movl $0x8, %r14d
xorl %r15d, %r15d
xorpd %xmm2, %xmm2
movsd -0x8(%rax,%r14), %xmm0
movsd (%rax,%r14), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
jb 0x4a19
sqrtsd %xmm0, %xmm0
jmp 0x4a2e
movsd %xmm3, 0x20(%rsp)
callq 0x31a0
movsd 0x20(%rsp), %xmm3
xorpd %xmm2, %xmm2
maxsd %xmm3, %xmm0
incq %r15
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
addq $0x10, %r14
movapd %xmm0, %xmm3
cmpq %rcx, %r15
jb 0x49f4
jmp 0x4b5c
movsd 0x248(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x250(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x278(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x280(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x440(%rsp), %xmm0
movq %rsp, %rdi
leaq 0x150(%rsp), %rsi
xorl %edx, %edx
callq 0x6f1c
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
movsd 0x38(%rsp), %xmm7
movsd 0x58(%rsp), %xmm8
je 0x4bbb
movsd 0xf53b(%rip), %xmm3     # 0x14010
movl $0x8, %r14d
xorl %r15d, %r15d
xorpd %xmm2, %xmm2
movsd -0x8(%rax,%r14), %xmm0
movsd (%rax,%r14), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
jb 0x4b07
sqrtsd %xmm0, %xmm0
jmp 0x4b29
movsd %xmm3, 0x60(%rsp)
callq 0x31a0
movsd 0x60(%rsp), %xmm3
xorpd %xmm2, %xmm2
movsd 0x58(%rsp), %xmm8
movsd 0x38(%rsp), %xmm7
maxsd %xmm3, %xmm0
incq %r15
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
addq $0x10, %r14
movapd %xmm0, %xmm3
cmpq %rcx, %r15
jb 0x4ae2
cvtsd2ss %xmm0, %xmm9
jmp 0x4bc4
movsd 0xf4b4(%rip), %xmm0     # 0x14010
xorps %xmm1, %xmm1
cvtss2sd 0x4b8(%rsp), %xmm1
addsd %xmm0, %xmm1
addsd 0xf4ac(%rip), %xmm1     # 0x14020
movsd %xmm1, 0x248(%rsp)
movsd %xmm1, 0x250(%rsp)
addsd %xmm1, %xmm1
movsd %xmm1, 0x278(%rsp)
movsd %xmm1, 0x280(%rsp)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4d20
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
jmp 0x4d20
movss 0xf514(%rip), %xmm9     # 0x140d8
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4bf5
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
movss %xmm9, 0x60(%rsp)
callq 0x3220
movss 0x60(%rsp), %xmm9
movsd 0x58(%rsp), %xmm8
movsd 0x38(%rsp), %xmm7
movsd 0x20(%rsp), %xmm0
subsd %xmm8, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x18(%rsp), %xmm0
subsd %xmm7, %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x3b8(%rsp), %eax
testl %eax, %eax
jle 0x4cad
movss 0x4b8(%rsp), %xmm0
addss %xmm9, %xmm0
addss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x1f0(%rsp), %xmm1
xorps %xmm2, %xmm2
cvtss2sd 0x390(%rsp), %xmm2
movsd 0x1f8(%rsp), %xmm3
addsd %xmm2, %xmm2
xorl %r14d, %r14d
movaps %xmm0, %xmm5
movaps %xmm5, %xmm4
addsd %xmm8, %xmm4
ucomisd 0x20(%rsp), %xmm4
ja 0x5fae
movaps %xmm0, %xmm6
addsd %xmm7, %xmm6
ucomisd 0x18(%rsp), %xmm6
ja 0x5fae
addsd %xmm1, %xmm4
addsd %xmm3, %xmm6
addsd %xmm2, %xmm5
addsd %xmm2, %xmm0
incl %r14d
movapd %xmm6, %xmm7
movapd %xmm4, %xmm8
cmpl %r14d, %eax
jne 0x4c63
jmp 0x4cb6
movapd %xmm8, %xmm4
movapd %xmm7, %xmm6
subsd 0x1f0(%rsp), %xmm4
subsd 0x1f8(%rsp), %xmm6
movsd 0x20(%rsp), %xmm3
subsd %xmm4, %xmm3
movsd 0x18(%rsp), %xmm4
subsd %xmm6, %xmm4
movsd 0x248(%rsp), %xmm0
movsd 0x250(%rsp), %xmm1
subsd %xmm0, %xmm3
subsd %xmm1, %xmm4
movsd 0xf31a(%rip), %xmm2     # 0x14018
mulsd %xmm2, %xmm3
mulsd %xmm2, %xmm4
addsd %xmm0, %xmm3
addsd %xmm1, %xmm4
movsd %xmm3, 0x248(%rsp)
movsd %xmm4, 0x250(%rsp)
movss 0x140(%rsp), %xmm0
movss 0x88(%rsp), %xmm3
divss %xmm0, %xmm3
mulss 0xf396(%rip), %xmm0     # 0x140d4
xorps %xmm1, %xmm1
cvtss2sd %xmm0, %xmm1
xorps %xmm2, %xmm2
cvtss2sd 0x8c(%rsp), %xmm2
cvtss2sd %xmm3, %xmm3
movss 0x538(%rsp), %xmm5
movss 0xf36e(%rip), %xmm4     # 0x140d4
mulss %xmm5, %xmm4
xorps %xmm0, %xmm0
cvtss2sd %xmm4, %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm3, %xmm0
mulsd %xmm2, %xmm2
divsd %xmm2, %xmm0
cmpb $0x1, 0x418(%rsp)
movsd %xmm0, 0x288(%rsp)
jne 0x4dd6
mulss 0xf340(%rip), %xmm5     # 0x140dc
minss 0x220(%rsp), %xmm5
movss %xmm5, 0x220(%rsp)
movzbl 0x340(%rsp), %edi
movss 0x668(%rsp), %xmm0
mulss 0x490(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
xorl $0x1, %edi
callq 0x778f
jmp 0x4dff
xorps %xmm1, %xmm1
cvtss2sd 0x758(%rsp), %xmm1
xorps %xmm2, %xmm2
cvtss2sd 0x5a0(%rsp), %xmm2
xorps %xmm3, %xmm3
cvtss2sd 0x6e0(%rsp), %xmm3
callq 0x7714
movq %rax, %r14
leaq 0x278(%rsp), %r15
xorps %xmm0, %xmm0
cvtss2sd 0x368(%rsp), %xmm0
movq (%rax), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *(%rax)
movq (%r14), %rcx
leaq 0xfcf0(%rip), %rsi      # 0x14b1b
movq %r14, %rdi
xorl %eax, %eax
callq *0x18(%rcx)
movq (%r14), %rcx
leaq 0x1043c(%rip), %rsi     # 0x15279
movq %r14, %rdi
xorl %eax, %eax
callq *0x18(%rcx)
movq (%r14), %rcx
leaq 0x10471(%rip), %rsi     # 0x152c0
movq %r14, %rdi
xorl %eax, %eax
callq *0x18(%rcx)
testl %ebp, %ebp
jle 0x4e7d
movl %ebp, %r13d
leaq 0xfcec(%rip), %r12      # 0x14b51
xorl %ebp, %ebp
movq (%rbx,%rbp,8), %rsi
movq %r12, %rdi
xorl %eax, %eax
callq 0x3040
incq %rbp
cmpq %rbp, %r13
jne 0x4e67
movl $0xa, %edi
callq 0x32b0
movq (%r14), %rcx
leaq 0x103e8(%rip), %rsi     # 0x15279
movq %r14, %rdi
xorl %eax, %eax
callq *0x18(%rcx)
cmpq $0x0, 0xc0(%rsp)
movq (%r14), %rax
movq 0x18(%rax), %rcx
je 0x4ee1
movq 0xb8(%rsp), %rdx
leaq 0xfc9b(%rip), %rsi      # 0x14b55
movq %r14, %rdi
xorl %eax, %eax
callq *%rcx
xorps %xmm0, %xmm0
cvtss2sd 0x468(%rsp), %xmm0
movq (%r14), %rcx
leaq 0xfc9e(%rip), %rsi      # 0x14b75
movq %r14, %rdi
movb $0x1, %al
callq *0x18(%rcx)
jmp 0x4f21
movq 0x1b0(%rsp), %rdx
leaq 0xfc97(%rip), %rsi      # 0x14b87
movq %r14, %rdi
xorl %eax, %eax
callq *%rcx
xorps %xmm0, %xmm0
cvtss2sd 0x4e0(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x468(%rsp), %xmm1
movq (%r14), %rcx
leaq 0xfc90(%rip), %rsi      # 0x14ba9
movq %r14, %rdi
movb $0x2, %al
callq *0x18(%rcx)
xorps %xmm0, %xmm0
cvtss2sd 0x220(%rsp), %xmm0
movl 0x3b8(%rsp), %edx
xorps %xmm1, %xmm1
cvtss2sd 0x390(%rsp), %xmm1
movq (%r14), %rcx
leaq 0xfc89(%rip), %rsi      # 0x14bd3
movq %r14, %rdi
movb $0x2, %al
callq *0x18(%rcx)
xorps %xmm0, %xmm0
cvtss2sd 0x368(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x5c8(%rsp), %xmm1
movq (%r14), %rcx
leaq 0xfc87(%rip), %rsi      # 0x14bfb
movq %r14, %rdi
movb $0x2, %al
callq *0x18(%rcx)
xorps %xmm0, %xmm0
cvtss2sd 0x640(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x538(%rsp), %xmm1
movq (%r14), %rcx
leaq 0xfc92(%rip), %rsi      # 0x14c30
movq %r14, %rdi
movb $0x2, %al
callq *0x18(%rcx)
movsd 0x278(%rsp), %xmm0
movsd 0x280(%rsp), %xmm1
movsd 0x1f0(%rsp), %xmm2
movsd 0x1f8(%rsp), %xmm3
movq (%r14), %rcx
leaq 0xfc81(%rip), %rsi      # 0x14c55
movq %r14, %rdi
movb $0x4, %al
callq *0x18(%rcx)
movq (%r14), %rcx
leaq 0xfcac(%rip), %rsi      # 0x14c92
movq %r14, %rdi
xorl %eax, %eax
callq *0x18(%rcx)
xorps %xmm0, %xmm0
cvtss2sd 0x368(%rsp), %xmm0
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x8(%rax)
leaq 0x248(%rsp), %rax
movss 0x640(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0x40(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x368(%rsp), %xmm0
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
cmpl $0x0, 0x3b8(%rsp)
jle 0x5e8f
movaps 0x20(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
andps 0xf046(%rip), %xmm1     # 0x140a0
xorps %xmm2, %xmm2
cvtss2sd %xmm1, %xmm2
movsd 0xefbf(%rip), %xmm1     # 0x14028
cmpltsd 0xefbe(%rip), %xmm2     # 0x14030
divsd %xmm0, %xmm1
andnpd %xmm1, %xmm2
movapd %xmm2, 0x540(%rsp)
leaq 0x70(%rsp), %rbx
xorl %r15d, %r15d
xorpd %xmm0, %xmm0
movsd %xmm0, 0x120(%rsp)
movsd %xmm0, 0x110(%rsp)
xorps %xmm1, %xmm1
cvtsi2ss %r15d, %xmm1
movss 0x390(%rsp), %xmm0
movss %xmm1, 0x18(%rsp)
mulss %xmm1, %xmm0
addss 0x440(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0xf8(%rsp), %rdi
leaq 0x150(%rsp), %rsi
movsd %xmm0, 0x290(%rsp)
xorl %edx, %edx
callq 0x6f1c
movq 0xf8(%rsp), %rax
cmpq %rax, 0x100(%rsp)
je 0x5e25
movq %r15, 0x168(%rsp)
movl $0x8, %r15d
xorl %r12d, %r12d
movsd 0xeef8(%rip), %xmm2     # 0x14010
movsd -0x8(%rax,%r15), %xmm0
movsd (%rax,%r15), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd 0xeecf(%rip), %xmm0     # 0x14008
jb 0x5141
sqrtsd %xmm0, %xmm0
jmp 0x5152
movsd %xmm2, 0x20(%rsp)
callq 0x31a0
movsd 0x20(%rsp), %xmm2
maxsd %xmm2, %xmm0
incq %r12
movq 0xf8(%rsp), %rax
movq 0x100(%rsp), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
addq $0x10, %r15
movapd %xmm0, %xmm2
cmpq %rcx, %r12
jb 0x5118
xorps %xmm2, %xmm2
cvtss2sd 0x4b8(%rsp), %xmm2
movsd %xmm0, 0x58(%rsp)
addsd %xmm0, %xmm2
cmpb $0x0, 0x340(%rsp)
jne 0x51bd
movsd 0x40(%rsp), %xmm0
addsd %xmm2, %xmm0
movsd 0x48(%rsp), %xmm1
addsd %xmm2, %xmm1
movsd %xmm0, 0x40(%rsp)
movsd %xmm1, 0x48(%rsp)
movsd %xmm2, 0x298(%rsp)
movss 0x220(%rsp), %xmm1
addss 0xef09(%rip), %xmm1     # 0x140e0
movsd 0xee59(%rip), %xmm0     # 0x14038
movq 0x168(%rsp), %r12
testl %r12d, %r12d
leaq 0x3e0(%rsp), %r15
je 0x51fb
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movq (%r14), %rax
movq %r14, %rdi
leaq 0x40(%rsp), %rsi
callq *0x48(%rax)
leaq 0xf8(%rsp), %rdi
callq 0x38bc
xorps %xmm1, %xmm1
cvtsd2ss %xmm0, %xmm1
movss 0x220(%rsp), %xmm0
movss %xmm1, 0x20(%rsp)
mulss %xmm1, %xmm0
movss %xmm0, 0x148(%rsp)
movss 0x5c8(%rsp), %xmm0
movss %xmm0, 0x38(%rsp)
movss 0x368(%rsp), %xmm0
movss %xmm0, 0x60(%rsp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x30(%rax)
movss 0x20(%rsp), %xmm0
divss 0x38(%rsp), %xmm0
movss 0x60(%rsp), %xmm1
minss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movq (%r14), %rax
movq %r14, %rdi
movsd %xmm0, 0x118(%rsp)
callq *0x28(%rax)
leal 0x1(%r12), %edx
movss 0x18(%rsp), %xmm0
mulss 0x390(%rsp), %xmm0
addss 0x440(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movq (%r14), %rcx
movq %r14, %rdi
leaq 0xfa09(%rip), %rsi      # 0x14cc6
movb $0x1, %al
callq *0x18(%rcx)
cmpb $0x1, 0x7d0(%rsp)
jne 0x5350
movss 0x490(%rsp), %xmm0
mulss 0x618(%rsp), %xmm0
movss %xmm0, 0x20(%rsp)
movq (%r14), %rcx
movq %r14, %rdi
leaq 0xf9f1(%rip), %rsi      # 0x14ce6
xorl %eax, %eax
callq *0x18(%rcx)
movq (%r14), %rax
xorps %xmm1, %xmm1
movq %r14, %rdi
movss 0xedc9(%rip), %xmm0     # 0x140d4
movaps %xmm0, %xmm2
callq *0x68(%rax)
xorps %xmm1, %xmm1
cvtsd2ss 0x58(%rsp), %xmm1
xorps 0xed8f(%rip), %xmm1     # 0x140b0
xorps %xmm0, %xmm0
leaq 0xf8(%rsp), %rdi
movq %r14, %rsi
leaq 0x40(%rsp), %rdx
movss 0x20(%rsp), %xmm2
callq 0x61fe
movq (%r14), %rax
movq %r14, %rdi
movsd 0xecf3(%rip), %xmm0     # 0x14040
callq *0x40(%rax)
movss 0x4b8(%rsp), %xmm0
ucomiss 0xed88(%rip), %xmm0     # 0x140e8
jbe 0x54d0
movss 0x490(%rsp), %xmm1
mulss 0x618(%rsp), %xmm1
movss %xmm1, 0x20(%rsp)
divss %xmm1, %xmm0
callq 0x3120
movss %xmm0, 0x18(%rsp)
movq %rsp, %rdi
leaq 0xf8(%rsp), %rsi
callq 0x64f8
movss 0x5f0(%rsp), %xmm0
ucomiss 0xed3b(%rip), %xmm0     # 0x140e8
jbe 0x545e
cvtss2sd %xmm0, %xmm0
movq %r15, %rdi
leaq 0xf8(%rsp), %rsi
xorl %edx, %edx
callq 0x6f1c
movss 0x5f0(%rsp), %xmm0
xorps 0xecd7(%rip), %xmm0     # 0x140b0
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x6f1c
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x70(%rsp), %rax
movq %rax, (%rsp)
movups 0x78(%rsp), %xmm0
movups %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
testq %rdi, %rdi
je 0x5427
subq %rdi, %rsi
callq 0x3220
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x5441
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
movq 0x3e0(%rsp), %rdi
testq %rdi, %rdi
je 0x545e
movq 0x3f0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
movq (%r14), %rcx
movq %r14, %rdi
leaq 0xf891(%rip), %rsi      # 0x14cfc
xorl %eax, %eax
callq *0x18(%rcx)
movq (%r14), %rax
xorps %xmm0, %xmm0
xorpd %xmm2, %xmm2
movq %r14, %rdi
movss 0xec4f(%rip), %xmm1     # 0x140d4
callq *0x68(%rax)
cvttss2si 0x18(%rsp), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss 0x20(%rsp), %xmm2
mulss %xmm2, %xmm0
movaps %xmm2, %xmm1
mulss 0xec2a(%rip), %xmm1     # 0x140d4
movq %rsp, %rdi
movq %r14, %rsi
leaq 0x40(%rsp), %rdx
callq 0x61fe
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x54d0
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
movss 0x538(%rsp), %xmm0
movss %xmm0, 0x20(%rsp)
movss 0x220(%rsp), %xmm0
movss %xmm0, 0x18(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x7a8(%rsp), %xmm0
movsd %xmm0, 0x2d0(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x780(%rsp), %xmm0
movaps %xmm0, 0x570(%rsp)
movss 0x7f8(%rsp), %xmm0
movss %xmm0, 0x6c(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x730(%rsp), %xmm0
movsd %xmm0, 0x170(%rsp)
movss 0x5a0(%rsp), %xmm0
movss %xmm0, 0x60(%rsp)
movss 0x6b8(%rsp), %xmm0
movss %xmm0, 0x38(%rsp)
movsd 0x40(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movq (%r14), %rcx
movq %r14, %rdi
leaq 0xf7f9(%rip), %rsi      # 0x14d6b
movb $0x2, %al
callq *0x18(%rcx)
movq (%r14), %rax
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
xorpd %xmm2, %xmm2
movq %r14, %rdi
callq *0x68(%rax)
xorps %xmm1, %xmm1
cvtss2sd 0x20(%rsp), %xmm1
movapd 0x540(%rsp), %xmm0
movsd %xmm1, 0x128(%rsp)
mulsd %xmm1, %xmm0
addsd %xmm0, %xmm0
mulsd 0xea92(%rip), %xmm0     # 0x14048
movsd %xmm0, 0x180(%rsp)
movq (%r14), %rax
movq %r14, %rdi
xorl %esi, %esi
callq *0x58(%rax)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movss 0x18(%rsp), %xmm0
ucomiss 0xeaff(%rip), %xmm0     # 0x140e8
jbe 0x5d06
cvtss2sd %xmm0, %xmm3
xorps %xmm1, %xmm1
cvtss2sd 0x6c(%rsp), %xmm1
movss 0xead0(%rip), %xmm0     # 0x140d4
movss 0x20(%rsp), %xmm4
mulss %xmm0, %xmm4
xorps %xmm2, %xmm2
cvtss2sd %xmm4, %xmm2
movsd %xmm2, 0x2a8(%rsp)
mulss %xmm0, %xmm4
xorps %xmm0, %xmm0
cvtss2sd %xmm4, %xmm0
movsd %xmm0, 0x2f0(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x38(%rsp), %xmm0
movsd %xmm0, 0x2c8(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x60(%rsp), %xmm0
movsd %xmm0, 0x2c0(%rsp)
movaps %xmm3, %xmm0
addsd 0xe9ef(%rip), %xmm0     # 0x14050
movsd %xmm0, 0x2a0(%rsp)
movaps %xmm1, 0x560(%rsp)
xorps 0xea47(%rip), %xmm1     # 0x140c0
movaps %xmm1, 0x550(%rsp)
movsd 0x118(%rsp), %xmm2
movapd %xmm2, %xmm0
divsd 0xe9c2(%rip), %xmm0     # 0x14058
movsd 0xe9c2(%rip), %xmm1     # 0x14060
minsd %xmm0, %xmm1
movsd %xmm1, 0x2b0(%rsp)
movsd 0x128(%rsp), %xmm1
movapd %xmm1, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x138(%rsp)
movapd %xmm1, %xmm0
mulsd 0xe997(%rip), %xmm0     # 0x14068
movsd %xmm0, 0x2e0(%rsp)
movsd 0xe946(%rip), %xmm4     # 0x14028
movsd 0x170(%rsp), %xmm0
subsd %xmm0, %xmm4
movsd %xmm4, 0x2d8(%rsp)
mulsd %xmm0, %xmm2
movsd %xmm2, 0x2f8(%rsp)
mulsd 0xe963(%rip), %xmm1     # 0x14070
movsd %xmm3, 0x2b8(%rsp)
addsd %xmm3, %xmm1
movsd %xmm1, 0x2e8(%rsp)
movl $0x0, 0xf4(%rsp)
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
movsd %xmm0, 0x130(%rsp)
xorl %r12d, %r12d
movsd %xmm0, 0x188(%rsp)
movsd %xmm0, 0x178(%rsp)
movsd %xmm1, 0x90(%rsp)
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movl %r12d, %r15d
cvtss2sd %xmm0, %xmm0
mulsd 0xe905(%rip), %xmm0     # 0x14078
divsd 0xe905(%rip), %xmm0     # 0x14080
callq 0x3090
mulsd 0x2c8(%rsp), %xmm0
addsd 0x2c0(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movq (%r14), %rax
movq %r14, %rdi
callq *0x20(%rax)
testl %r15d, %r15d
je 0x58a5
cmpl $0x1, %r15d
je 0x5870
movl %r15d, %r12d
cmpl $0x2, %r15d
jne 0x5943
movss 0x6c(%rsp), %xmm0
ucomiss 0xe918(%rip), %xmm0     # 0x140e8
movl $0x2, %r12d
jbe 0x5943
movsd 0x90(%rsp), %xmm0
ucomisd 0x2a0(%rsp), %xmm0
jbe 0x5943
movq %rbx, %rdi
leaq 0xf8(%rsp), %rsi
movaps 0x550(%rsp), %xmm0
xorl %edx, %edx
callq 0x6f1c
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x70(%rsp), %rax
movq %rax, (%rsp)
movups 0x78(%rsp), %xmm0
movups %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
testq %rdi, %rdi
je 0x584b
subq %rdi, %rsi
callq 0x3220
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x5865
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
movl $0x3, %r12d
jmp 0x5943
movss 0x6c(%rsp), %xmm0
ucomiss 0xe86b(%rip), %xmm0     # 0x140e8
movl $0x1, %r12d
jbe 0x5943
movsd 0x90(%rsp), %xmm0
ucomisd 0xe7be(%rip), %xmm0     # 0x14058
ja 0x592d
jmp 0x5943
movss 0x6c(%rsp), %xmm0
ucomiss 0xe836(%rip), %xmm0     # 0x140e8
jbe 0x592d
movq %rbx, %rdi
leaq 0xf8(%rsp), %rsi
movaps 0x560(%rsp), %xmm0
xorl %edx, %edx
callq 0x6f1c
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x70(%rsp), %rax
movq %rax, (%rsp)
movups 0x78(%rsp), %xmm0
movups %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
testq %rdi, %rdi
je 0x590b
subq %rdi, %rsi
callq 0x3220
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x5925
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
movl $0x1, %r12d
jmp 0x5943
movl $0x2, %r12d
movq %rsp, %rdi
leaq 0xf8(%rsp), %rsi
callq 0x65ca
cmpl %r15d, %r12d
je 0x59ae
movq %rsp, %rdi
callq 0x38bc
movsd %xmm0, 0x178(%rsp)
movq (%r14), %rax
movq %r14, %rdi
movsd 0x2b0(%rsp), %xmm0
callq *0x28(%rax)
movq (%rsp), %rax
movsd (%rax), %xmm0
addsd 0x40(%rsp), %xmm0
movsd 0x8(%rax), %xmm1
addsd 0x48(%rsp), %xmm1
movsd %xmm0, 0x70(%rsp)
movsd %xmm1, 0x78(%rsp)
movsd 0x90(%rsp), %xmm0
addsd 0x2a8(%rsp), %xmm0
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x48(%rax)
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
shrq $0x4, %rcx
testl %ecx, %ecx
jle 0x5c91
xorl %r15d, %r15d
xorl %r13d, %r13d
testq %r15, %r15
je 0x5a08
movsd (%rax,%r15), %xmm0
subsd -0x10(%rax,%r15), %xmm0
movsd 0x8(%rax,%r15), %xmm1
subsd -0x8(%rax,%r15), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd 0xe608(%rip), %xmm0     # 0x14008
jb 0x5a0d
sqrtsd %xmm0, %xmm0
jmp 0x5a12
xorps %xmm0, %xmm0
jmp 0x5a23
callq 0x31a0
movsd 0x188(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd %xmm0, 0x188(%rsp)
divsd 0x178(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
mulsd 0x180(%rsp), %xmm0
addsd 0x130(%rsp), %xmm0
movq (%rsp), %rbp
xorps %xmm1, %xmm1
cvtsd2ss %xmm0, %xmm1
movss %xmm1, 0x20(%rsp)
movsd (%rbp,%r15), %xmm0
movsd %xmm0, 0x60(%rsp)
movaps %xmm1, %xmm0
callq 0x3180
movss %xmm0, 0x8c(%rsp)
movsd 0x8(%rbp,%r15), %xmm0
movsd %xmm0, 0x140(%rsp)
movss 0x20(%rsp), %xmm0
callq 0x31c0
movss %xmm0, 0x88(%rsp)
movsd 0x8(%rbp,%r15), %xmm0
movsd %xmm0, 0x58(%rsp)
movss 0x20(%rsp), %xmm0
callq 0x3180
movss %xmm0, 0x14c(%rsp)
movsd (%rbp,%r15), %xmm0
movsd %xmm0, 0x38(%rsp)
movss 0x20(%rsp), %xmm0
callq 0x31c0
movsd 0x18(%rsp), %xmm1
movss %xmm0, 0x20(%rsp)
mulsd 0x128(%rsp), %xmm1
addsd 0x90(%rsp), %xmm1
movsd 0x138(%rsp), %xmm0
ucomisd %xmm1, %xmm0
movsd 0x2f8(%rsp), %xmm0
movsd %xmm1, 0x18(%rsp)
ja 0x5b68
movsd 0x2e0(%rsp), %xmm0
ucomisd %xmm1, %xmm0
movsd 0x118(%rsp), %xmm0
jbe 0x5b68
movapd %xmm1, %xmm0
movsd 0x138(%rsp), %xmm1
subsd %xmm1, %xmm0
divsd %xmm1, %xmm0
mulsd 0x2d8(%rsp), %xmm0
addsd 0x170(%rsp), %xmm0
mulsd 0x118(%rsp), %xmm0
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
jmp 0x5b71
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
xorps %xmm0, %xmm0
cvtss2sd 0x8c(%rsp), %xmm0
movsd 0x60(%rsp), %xmm1
mulsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd 0x88(%rsp), %xmm0
movsd 0x140(%rsp), %xmm2
mulsd %xmm0, %xmm2
subsd %xmm2, %xmm1
xorps %xmm0, %xmm0
cvtss2sd 0x14c(%rsp), %xmm0
movsd 0x58(%rsp), %xmm3
mulsd %xmm0, %xmm3
xorps %xmm0, %xmm0
cvtss2sd 0x20(%rsp), %xmm0
movsd 0x38(%rsp), %xmm2
mulsd %xmm0, %xmm2
addsd %xmm3, %xmm2
movsd 0x18(%rsp), %xmm3
ucomisd 0x2f0(%rsp), %xmm3
jbe 0x5c46
movsd 0x2e8(%rsp), %xmm0
ucomisd %xmm3, %xmm0
jbe 0x5c46
addsd 0x40(%rsp), %xmm1
addsd 0x48(%rsp), %xmm2
movsd %xmm1, 0x70(%rsp)
movsd %xmm2, 0x78(%rsp)
movapd %xmm3, %xmm1
cmpltsd 0x138(%rsp), %xmm1
movapd %xmm1, %xmm0
andpd 0x570(%rsp), %xmm0
movsd 0xe3fc(%rip), %xmm2     # 0x14028
andnpd %xmm2, %xmm1
orpd %xmm0, %xmm1
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
movapd %xmm3, %xmm0
callq *0x50(%rax)
jmp 0x5c6e
addsd 0x40(%rsp), %xmm1
addsd 0x48(%rsp), %xmm2
movsd %xmm1, 0x70(%rsp)
movsd %xmm2, 0x78(%rsp)
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
movapd %xmm3, %xmm0
callq *0x48(%rax)
incq %r13
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
shrq $0x4, %rcx
movslq %ecx, %rcx
addq $0x10, %r15
cmpq %rcx, %r13
jl 0x59cc
movsd 0x90(%rsp), %xmm0
ucomisd 0x2d0(%rsp), %xmm0
jbe 0x5cc6
testb $0x1, 0xf4(%rsp)
jne 0x5cc6
movq (%r14), %rax
movb $0x1, %cl
movl %ecx, 0xf4(%rsp)
movq %r14, %rdi
movl $0x1, %esi
callq *0x58(%rax)
movsd 0x90(%rsp), %xmm1
addsd 0x128(%rsp), %xmm1
movsd 0x130(%rsp), %xmm0
addsd 0x180(%rsp), %xmm0
movsd %xmm0, 0x130(%rsp)
movsd 0x2b8(%rsp), %xmm0
ucomisd %xmm1, %xmm0
ja 0x5754
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5d1c
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
movq (%r14), %rax
movq %r14, %rdi
callq *0x60(%rax)
movsd %xmm0, 0x20(%rsp)
movq 0x168(%rsp), %r15
xorps %xmm0, %xmm0
cvtss2sd 0x368(%rsp), %xmm0
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
movq (%r14), %rax
movq %r14, %rdi
callq *0x38(%rax)
movss 0x220(%rsp), %xmm0
addss 0xe37e(%rip), %xmm0     # 0x140e0
cvtss2sd %xmm0, %xmm0
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
cmpb $0x0, 0x340(%rsp)
jne 0x5db0
movsd 0x40(%rsp), %xmm0
movsd 0x298(%rsp), %xmm1
addsd %xmm1, %xmm0
addsd 0x48(%rsp), %xmm1
addsd 0x1f0(%rsp), %xmm0
addsd 0x1f8(%rsp), %xmm1
movsd %xmm0, 0x40(%rsp)
movsd %xmm1, 0x48(%rsp)
movsd 0x110(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x110(%rsp)
divsd 0x118(%rsp), %xmm1
movsd 0x120(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x120(%rsp)
cmpb $0x0, 0x418(%rsp)
je 0x5e42
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0x5e12
movq 0x108(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
incl %r15d
cmpl 0x3b8(%rsp), %r15d
jl 0x50a1
jmp 0x5e84
leaq 0x440(%rsp), %rdi
leaq 0x390(%rsp), %rsi
movss 0x18(%rsp), %xmm0
callq 0x3430
jmp 0x5df5
movss 0x148(%rsp), %xmm0
addss %xmm0, %xmm0
movq 0x16182(%rip), %rax     # 0x1bfd8
movq (%rax), %rdi
divss 0xe283(%rip), %xmm0     # 0x140e4
xorps %xmm1, %xmm1
cvtss2sd %xmm0, %xmm1
leaq 0xee9a(%rip), %rsi      # 0x14d09
movsd 0x290(%rsp), %xmm0
movb $0x2, %al
callq 0x32c0
jmp 0x5df5
cvttsd2si 0x120(%rsp), %ebx
jmp 0x5e9d
xorl %ebx, %ebx
xorps %xmm0, %xmm0
movsd %xmm0, 0x110(%rsp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
cmpb $0x0, 0x418(%rsp)
movsd 0x288(%rsp), %xmm0
je 0x5f11
xorl %ebx, %ebx
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x5ed8
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x5f32
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
jmp 0x5f32
callq 0x34fb
jmp 0x5f28
callq 0x34d9
jmp 0x5f0a
callq 0x34a2
movl $0x1, %ebx
jmp 0x5ebb
movl %ebx, %edi
movsd 0x110(%rsp), %xmm1
callq 0x345d
jmp 0x5eb9
callq 0x340e
movq (%rbx), %rdi
callq 0x3572
movl %eax, %ebx
leaq 0x15a3f(%rip), %rax     # 0x1b978
movq %rax, 0x98(%rsp)
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x5f66
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x15a0b(%rip), %rax     # 0x1b978
movq %rax, 0x190(%rsp)
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x5f9a
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x3220
movl %ebx, %eax
addq $0x938, %rsp            # imm = 0x938
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x16023(%rip), %rax     # 0x1bfd8
movq (%rax), %rdi
xorps %xmm0, %xmm0
cvtss2sd %xmm9, %xmm0
movsd 0x278(%rsp), %xmm1
movsd 0x280(%rsp), %xmm2
movsd 0x1f0(%rsp), %xmm3
movsd 0x1f8(%rsp), %xmm4
leaq 0xea6e(%rip), %rsi      # 0x14a59
movl %r14d, %edx
movb $0x5, %al
movsd %xmm7, 0x38(%rsp)
movsd %xmm8, 0x58(%rsp)
callq 0x32c0
movl %r14d, 0x3b8(%rsp)
movsd 0x58(%rsp), %xmm4
movsd 0x38(%rsp), %xmm6
jmp 0x4cb6
jmp 0x60fe
jmp 0x60fe
jmp 0x602b
jmp 0x602b
jmp 0x602b
movq %rax, %rbx
jmp 0x6173
jmp 0x6092
jmp 0x60fe
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x6092
jmp 0x608a
jmp 0x608a
jmp 0x608a
movq %rax, %rbx
jmp 0x61c4
movq %rax, %rbx
jmp 0x6190
movq %rax, %rbx
movq 0x3e0(%rsp), %rdi
testq %rdi, %rdi
je 0x6123
movq 0x3f0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
jmp 0x6123
jmp 0x6120
movq %rax, %rbx
movq 0x300(%rsp), %rdi
cmpq %r13, %rdi
je 0x61c4
movq 0x310(%rsp), %rsi
jmp 0x61bc
movq %rax, %rbx
movq 0x3c0(%rsp), %rdi
cmpq %r14, %rdi
jne 0x61eb
jmp 0x61f6
jmp 0x610f
jmp 0x60fe
jmp 0x610f
movq %rax, %rbx
jmp 0x6156
jmp 0x6120
jmp 0x6120
jmp 0x6120
jmp 0x610f
jmp 0x610f
jmp 0x610f
movq %rax, %rbx
jmp 0x6139
jmp 0x6120
jmp 0x6120
jmp 0x6120
jmp 0x6120
jmp 0x6120
jmp 0x6120
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6139
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0x6156
movq 0x108(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x6173
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x6190
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
leaq 0xc8(%rsp), %rcx
leaq 0x157d9(%rip), %rax     # 0x1b978
movq %rax, 0x98(%rsp)
movq 0xb8(%rsp), %rdi
cmpq %rcx, %rdi
je 0x61c4
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3220
leaq 0x1c0(%rsp), %rax
leaq 0x157a5(%rip), %rcx     # 0x1b978
movq %rcx, 0x190(%rsp)
movq 0x1b0(%rsp), %rdi
movq %rax, %r14
cmpq %rax, %rdi
je 0x61f6
movq (%r14), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x3380