// File: /workspace/github_cpp_makefile_star2_O1/harry830622[P]floorplanner/src/floorplanner.cpp
// Function: Floorplanner::SA()
void Floorplanner::SA() {
  const double initial_uphill_probability = 0.99;
  const double r = 0.75;
  const double initial_temperature =
      average_uphill_cost_ / (-1 * log(initial_uphill_probability));
  const int num_perturbations =
      database_.num_macros() * database_.num_macros() * 3;
  const double frozen_temperature = initial_temperature / 1.0e50;
  const double frozen_acceptance_rate = 0.01;
  const double alpha = alpha_;
  const double beta = (1 - alpha);
  const double adaptive_alpha_base = alpha / 4.0;
  const double adaptive_beta_base = beta / 4.0;

  if (is_drawing_) {
    drawing_ = Json::object();
    drawing_["config"] = {{"initialTemperature", initial_temperature},
                          {"r", r},
                          {"numPerturbations", num_perturbations}};
    drawing_["iterations"] = Json::array();
  }

  Floorplan floorplan(best_floorplan_);
  floorplan.Pack(database_);

  if (is_drawing_) {
    drawing_["initialFloorplan"] = floorplan.drawing();
  }

  double adaptive_alpha = adaptive_alpha_base;
  double adaptive_beta = adaptive_beta_base;
  double best_cost = ComputeCost(floorplan, adaptive_alpha, adaptive_beta);
  double last_cost = best_cost;
  double temperature = initial_temperature;
  int nth_iteration = 0;
  while (temperature > frozen_temperature) {
    ++nth_iteration;

    int num_accepted_floorplans = 0;
    int num_feasible_floorplans = 0;

    if (is_drawing_) {
      Json iteration = Json::object();
      iteration["temperature"] = temperature;
      iteration["floorplans"] = Json::array();
      drawing_["iterations"].push_back(iteration);
    }

    for (int i = 0; i < num_perturbations; ++i) {
      Floorplan new_floorplan(floorplan);
      new_floorplan.Perturb(database_);
      new_floorplan.Pack(database_);

      const double cost =
          ComputeCost(new_floorplan, adaptive_alpha, adaptive_beta);
      const double delta_cost = cost - last_cost;
      if (delta_cost < 0) {
        ++num_accepted_floorplans;
        floorplan = new_floorplan;
        last_cost = cost;

        const double outline_width = database_.outline_width();
        const double outline_height = database_.outline_height();
        if (floorplan.width() <= outline_width &&
            floorplan.height() <= outline_height) {
          ++num_feasible_floorplans;
          if (cost < best_cost) {
            best_floorplan_ = floorplan;
            best_cost = cost;
          }
        }

        if (is_drawing_) {
          Json floorplan_drawing = floorplan.drawing();
          floorplan_drawing["isAccepted"] = true;
          floorplan_drawing["cost"] = cost;
          Json& iteration = drawing_["iterations"].back();
          iteration["floorplans"].push_back(floorplan_drawing);
        }
      } else {
        const double p = exp(-1 * delta_cost / temperature);
        if (rand() / static_cast<double>(RAND_MAX) < p) {
          ++num_accepted_floorplans;
          floorplan = new_floorplan;
          last_cost = cost;

          if (is_drawing_) {
            Json floorplan_drawing = floorplan.drawing();
            floorplan_drawing["isAccepted"] = true;
            floorplan_drawing["cost"] = cost;
            Json& iteration = drawing_["iterations"].back();
            iteration["floorplans"].push_back(floorplan_drawing);
          }
        } else {
          if (is_drawing_) {
            Json new_floorplan_drawing = new_floorplan.drawing();
            new_floorplan_drawing["isAccepted"] = false;
            new_floorplan_drawing["cost"] = cost;
            Json& iteration = drawing_["iterations"].back();
            iteration["floorplans"].push_back(new_floorplan_drawing);
          }
        }
      }
    }

    if (is_verbose_) {
      cout << "  nth_iteration: " << nth_iteration << endl;
      cout << "    temperature: " << temperature << endl;
      cout << "    num_accepted_floorplans: " << num_accepted_floorplans
           << endl;
      cout << "    num_feasible_floorplans: " << num_feasible_floorplans
           << endl;
      cout << "    num_perturbations: " << num_perturbations << endl;
      cout << "    adaptive_alpha: " << adaptive_alpha
           << "\tadaptive_beta: " << adaptive_beta << endl;
      cout << "    Best area: " << best_floorplan_.area()
           << "\tBest wirelength: " << best_floorplan_.wirelength() << endl;
    }

    if (num_accepted_floorplans / static_cast<double>(num_perturbations) <
        frozen_acceptance_rate) {
      break;
    }

    adaptive_alpha =
        adaptive_alpha_base +
        (alpha - adaptive_alpha_base) *
            (num_feasible_floorplans / static_cast<double>(num_perturbations));
    adaptive_beta =
        adaptive_beta_base +
        (beta - adaptive_beta_base) *
            (num_feasible_floorplans / static_cast<double>(num_perturbations));

    temperature *= r;

    if (is_drawing_) {
      Json& iteration = drawing_["iterations"].back();
      iteration["numFeasibleFloorplans"] = num_feasible_floorplans;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x338, %rsp            # imm = 0x338
movq %rdi, %rbx
movsd 0x68(%rdi), %xmm0
divsd 0xfc45(%rip), %xmm0     # 0x216f8
movsd %xmm0, 0x10(%rsp)
movq (%rdi), %rdi
callq 0x8404
movl %eax, %ebp
movq (%rbx), %rdi
callq 0x8404
imull %ebp, %eax
leal (%rax,%rax,2), %ebp
movsd 0x8(%rbx), %xmm0
movsd %xmm0, 0x58(%rsp)
cmpb $0x1, 0x31(%rbx)
movl %ebp, 0x20(%rsp)
jne 0x11e16
leaq 0x328(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xe168
leaq 0x118(%rbx), %r15
movq %r14, %rdi
callq 0xe608
movb 0x118(%rbx), %al
movb (%r14), %cl
movb %cl, 0x118(%rbx)
movb %al, (%r14)
movq 0x120(%rbx), %rax
movq 0x8(%r14), %rcx
movq %rcx, 0x120(%rbx)
movq %rax, 0x8(%r14)
movq %r15, %rdi
callq 0xe608
movq %r14, %rdi
callq 0xe0e0
leaq 0x230(%rsp), %rdi
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
leaq 0xfc00(%rip), %rsi      # 0x21767
callq 0x151f0
leaq 0x230(%rsp), %r12
movq %r12, %rdi
callq 0xe608
leaq 0x240(%rsp), %r14
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r14, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x103bc
movq %r14, %rdi
callq 0xe608
leaq 0x150(%rsp), %r14
movl $0x2, %edx
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0xe168
leaq 0x160(%rsp), %r14
leaq 0x38(%rsp), %rdi
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
leaq 0xfa49(%rip), %rsi      # 0x21631
callq 0x10329
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0xe608
leaq 0x48(%rsp), %r13
movb $0x0, (%r13)
movq $0x0, 0x8(%r13)
movsd 0xfaf4(%rip), %xmm0     # 0x21708
movq %r13, %rdi
callq 0x103bc
movq %r13, %rdi
callq 0xe608
movl $0x2, %edx
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0xe168
leaq 0x170(%rsp), %r14
leaq 0x308(%rsp), %rdi
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
leaq 0xfb19(%rip), %rsi      # 0x2177a
callq 0x15283
leaq 0x308(%rsp), %r12
movq %r12, %rdi
callq 0xe608
leaq 0x318(%rsp), %r13
movslq 0x20(%rsp), %rax
movb $0x5, (%r13)
movq %rax, 0x8(%r13)
movq %r13, %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe608
movl $0x2, %edx
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0xe168
leaq 0x2f8(%rsp), %rdi
leaq 0x150(%rsp), %rsi
movl $0x3, %edx
movl $0x1, %ecx
movl $0x2, %r8d
callq 0xe168
leaq 0xfaa8(%rip), %rsi      # 0x2178b
movq %r15, %rdi
callq 0xe2b0
movq %rax, %r12
leaq 0x2f8(%rsp), %r14
movq %r14, %rdi
callq 0xe608
movb (%r12), %al
movb (%r14), %cl
movb %cl, (%r12)
movb %al, (%r14)
movq 0x8(%r12), %rax
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%r12)
movq %rax, 0x8(%r14)
movq %r12, %rdi
callq 0xe608
movq %r14, %rdi
callq 0xe0e0
movl $0x20, %r14d
leaq (%rsp,%r14), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0xe0e0
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x11d34
movl $0x10, %r14d
movl 0x20(%rsp), %ebp
leaq (%rsp,%r14), %rdi
addq $0x308, %rdi            # imm = 0x308
callq 0xe0e0
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x11d58
movl $0x10, %r14d
leaq (%rsp,%r14), %rdi
addq $0x38, %rdi
callq 0xe0e0
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x11d78
movl $0x10, %r14d
leaq (%rsp,%r14), %rdi
addq $0x230, %rdi            # imm = 0x230
callq 0xe0e0
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x11d95
leaq 0x2e8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0xe168
leaq 0xf9c3(%rip), %rsi      # 0x21792
movq %r15, %rdi
callq 0xe2b0
movq %rax, %r14
leaq 0x2e8(%rsp), %r15
movq %r15, %rdi
callq 0xe608
movb (%r14), %al
movb (%r15), %cl
movb %cl, (%r14)
movb %al, (%r15)
movq 0x8(%r14), %rax
movq 0x8(%r15), %rcx
movq %rcx, 0x8(%r14)
movq %rax, 0x8(%r15)
movq %r14, %rdi
callq 0xe608
movq %r15, %rdi
callq 0xe0e0
leaq 0x70(%rbx), %rsi
leaq 0x150(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x78(%rsp)
callq 0x149a6
movq (%rbx), %rsi
movq %r14, %rdi
callq 0xb4e8
cmpb $0x1, 0x31(%rbx)
jne 0x11eaf
leaq 0x150(%rsp), %rdi
callq 0xa8c0
leaq 0x2d8(%rsp), %rdi
movq %rax, %rsi
callq 0xf382
leaq 0x118(%rbx), %rdi
leaq 0xf932(%rip), %rsi      # 0x2179d
callq 0xe2b0
movq %rax, %r14
leaq 0x2d8(%rsp), %r15
movq %r15, %rdi
callq 0xe608
movb (%r14), %al
movb (%r15), %cl
movb %cl, (%r14)
movb %al, (%r15)
movq 0x8(%r14), %rax
movq 0x8(%r15), %rcx
movq %rcx, 0x8(%r14)
movq %rax, 0x8(%r15)
movq %r14, %rdi
callq 0xe608
movq %r15, %rdi
callq 0xe0e0
movsd 0xf821(%rip), %xmm2     # 0x216d8
movsd 0x58(%rsp), %xmm0
subsd %xmm0, %xmm2
movsd 0xf807(%rip), %xmm1     # 0x216d0
mulsd %xmm1, %xmm0
movsd %xmm2, 0x70(%rsp)
mulsd %xmm2, %xmm1
leaq 0x150(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movsd %xmm0, 0x130(%rsp)
movsd %xmm1, 0x138(%rsp)
callq 0x10c68
movapd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
divsd 0xf7f2(%rip), %xmm0     # 0x21700
movsd %xmm0, 0x200(%rsp)
leaq 0x118(%rbx), %rax
movq %rax, 0x28(%rsp)
movl $0x80, %eax
leaq (%r14,%rax), %rcx
movq %rcx, 0x88(%rsp)
leaq 0x230(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x148(%rsp)
movl $0x98, %eax
addq %rax, %rcx
movq %rcx, 0xa8(%rsp)
leaq (%r14,%rax), %rcx
movq %rcx, 0x80(%rsp)
addq %rbx, %rax
movq %rax, 0x228(%rsp)
leaq 0xb0(%rbx), %rax
movq %rax, 0x220(%rsp)
leaq 0xc8(%rbx), %rax
movq %rax, 0x218(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd %xmm0, 0x1f8(%rsp)
movsd 0x130(%rsp), %xmm0
movsd 0x58(%rsp), %xmm2
subsd %xmm0, %xmm2
movsd %xmm2, 0x58(%rsp)
movsd 0x138(%rsp), %xmm2
movsd 0x70(%rsp), %xmm3
subsd %xmm2, %xmm3
movsd %xmm3, 0x70(%rsp)
movsd %xmm2, 0x98(%rsp)
movsd %xmm1, 0x140(%rsp)
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0xa0(%rsp)
leaq 0xf0(%rbx), %rax
movq %rax, 0x210(%rsp)
leaq 0x108(%rbx), %rax
movq %rax, 0x208(%rsp)
leaq 0x60(%rsp), %r13
leaq 0x38(%rsp), %r14
movl $0x0, 0x34(%rsp)
movsd 0x10(%rsp), %xmm0
ucomisd 0x200(%rsp), %xmm0
jbe 0x12e6e
cmpb $0x1, 0x31(%rbx)
jne 0x12170
leaq 0x230(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xe168
movb $0x0, 0x60(%rsp)
movq $0x0, 0x68(%rsp)
movq %r13, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x103bc
movq %r13, %rdi
callq 0xe608
movq %r15, %rdi
leaq 0xf726(%rip), %rsi      # 0x217ae
callq 0xe2b0
movq %rax, %r15
movq %r13, %rdi
callq 0xe608
movb (%r15), %al
movb 0x60(%rsp), %cl
movb %cl, (%r15)
movb %al, 0x60(%rsp)
movq 0x8(%r15), %rax
movq 0x68(%rsp), %rcx
movq %rcx, 0x8(%r15)
movq %rax, 0x68(%rsp)
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe0e0
leaq 0x120(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0xe168
leaq 0x230(%rsp), %rdi
leaq 0xfe2a(%rip), %rsi      # 0x21f1a
callq 0xe2b0
movq %rax, %r15
leaq 0x120(%rsp), %r13
movq %r13, %rdi
callq 0xe608
movb (%r15), %al
movb 0x120(%rsp), %cl
movb %cl, (%r15)
movb %al, 0x120(%rsp)
movq 0x8(%r15), %rax
movq 0x128(%rsp), %rcx
movq %rcx, 0x8(%r15)
movq %rax, 0x128(%rsp)
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe0e0
movq 0x28(%rsp), %rdi
leaq 0xf642(%rip), %rsi      # 0x21792
callq 0xe2b0
leaq 0x230(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x14b08
movq %r15, %rdi
callq 0xe0e0
testl %ebp, %ebp
jle 0x12a6c
xorl %r13d, %r13d
movl %ebp, %r12d
movl $0x0, 0x24(%rsp)
leaq 0x230(%rsp), %r15
movq %r15, %rdi
leaq 0x150(%rsp), %rsi
callq 0x149a6
movq (%rbx), %rsi
movq %r15, %rdi
callq 0xa924
movq (%rbx), %rsi
movq %r15, %rdi
callq 0xb4e8
movq %rbx, %rdi
movq %r15, %rsi
movsd 0xa0(%rsp), %xmm0
movsd 0x98(%rsp), %xmm1
callq 0x10c68
movsd %xmm0, 0x8(%rsp)
subsd 0x18(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x12596
movupd 0x230(%rsp), %xmm0
movupd 0x240(%rsp), %xmm1
movapd %xmm0, 0x150(%rsp)
movapd %xmm1, 0x160(%rsp)
movl 0x250(%rsp), %eax
movl %eax, 0x170(%rsp)
leaq 0x178(%rsp), %rdi
leaq 0x258(%rsp), %rsi
callq 0x15104
leaq 0x190(%rsp), %rdi
leaq 0x270(%rsp), %rsi
callq 0x14e54
leaq 0x1a8(%rsp), %rdi
leaq 0x288(%rsp), %rsi
callq 0x14f2a
movq 0x88(%rsp), %rdi
movq 0x148(%rsp), %rsi
callq 0x14fca
movq %r14, %rdi
movq 0xa8(%rsp), %rsi
callq 0xf382
movq %r14, %rdi
callq 0xe608
movb 0x1e8(%rsp), %al
movb 0x38(%rsp), %cl
movb %cl, 0x1e8(%rsp)
movb %al, 0x38(%rsp)
movq 0x1f0(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x1f0(%rsp)
movq %rax, 0x40(%rsp)
movq 0x80(%rsp), %rdi
callq 0xe608
movq %r14, %rdi
callq 0xe0e0
movq (%rbx), %rdi
callq 0x83be
movsd %xmm0, 0x18(%rsp)
movq (%rbx), %rdi
callq 0x83c4
movsd %xmm0, 0x90(%rsp)
leaq 0x150(%rsp), %rdi
callq 0xa8d2
movsd 0x18(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x1242c
leaq 0x150(%rsp), %rdi
callq 0xa8d8
movsd 0x90(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x1242c
incl 0x24(%rsp)
movsd 0x140(%rsp), %xmm0
ucomisd 0x8(%rsp), %xmm0
jbe 0x1242c
movapd 0x150(%rsp), %xmm0
movapd 0x160(%rsp), %xmm1
movq 0x78(%rsp), %rax
movupd %xmm1, 0x10(%rax)
movupd %xmm0, (%rax)
movl 0x170(%rsp), %eax
movl %eax, 0x90(%rbx)
movq 0x228(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x15104
movq 0x220(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x14e54
movq 0x218(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x14f2a
movq 0x210(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x14fca
movq %r14, %rdi
movq 0x80(%rsp), %rsi
callq 0xf382
movq %r14, %rdi
callq 0xe608
movb 0x108(%rbx), %al
movb 0x38(%rsp), %cl
movb %cl, 0x108(%rbx)
movb %al, 0x38(%rsp)
movq 0x110(%rbx), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x110(%rbx)
movq %rax, 0x40(%rsp)
movq 0x208(%rsp), %rdi
callq 0xe608
movq %r14, %rdi
callq 0xe0e0
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x140(%rsp)
incl %r13d
cmpb $0x1, 0x31(%rbx)
jne 0x1283a
leaq 0x150(%rsp), %rdi
callq 0xa8c0
movq %r14, %rdi
movq %rax, %rsi
callq 0xf382
movl %r13d, %ebp
movb $0x4, 0x110(%rsp)
movq $0x1, 0x118(%rsp)
leaq 0x110(%rsp), %r13
movq %r13, %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe608
movq %r14, %rdi
leaq 0xf330(%rip), %rsi      # 0x217ba
callq 0xe2b0
movq %rax, %r15
movq %r13, %rdi
callq 0xe608
movb (%r15), %al
movb 0x110(%rsp), %cl
movb %cl, (%r15)
movb %al, 0x110(%rsp)
movq 0x8(%r15), %rax
movq 0x118(%rsp), %rcx
movq %rcx, 0x8(%r15)
movq %rax, 0x118(%rsp)
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe0e0
movb $0x0, 0x100(%rsp)
movq $0x0, 0x108(%rsp)
leaq 0x100(%rsp), %r13
movq %r13, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x103bc
movq %r13, %rdi
callq 0xe608
movq %r14, %rdi
leaq 0xf2b3(%rip), %rsi      # 0x217c5
callq 0xe2b0
movq %rax, %r15
movq %r13, %rdi
callq 0xe608
movb (%r15), %al
movb 0x100(%rsp), %cl
movb %cl, (%r15)
movb %al, 0x100(%rsp)
movq 0x8(%r15), %rax
movq 0x108(%rsp), %rcx
movq %rcx, 0x8(%r15)
movq %rax, 0x108(%rsp)
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe0e0
movq 0x28(%rsp), %rdi
leaq 0xf228(%rip), %rsi      # 0x21792
callq 0xe2b0
movq %rax, %rdi
callq 0x14c10
movq %rax, %rdi
leaq 0xf999(%rip), %rsi      # 0x21f1a
callq 0xe2b0
movq %rax, %rdi
movq %r14, %rsi
callq 0x14b08
jmp 0x12821
xorpd 0xf182(%rip), %xmm0     # 0x21720
divsd 0x10(%rsp), %xmm0
callq 0x6660
movsd %xmm0, 0x90(%rsp)
callq 0x6100
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0xf14a(%rip), %xmm0     # 0x21710
movsd 0x90(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x1284b
movupd 0x230(%rsp), %xmm0
movupd 0x240(%rsp), %xmm1
movapd %xmm0, 0x150(%rsp)
movapd %xmm1, 0x160(%rsp)
movl 0x250(%rsp), %eax
movl %eax, 0x170(%rsp)
leaq 0x178(%rsp), %rdi
leaq 0x258(%rsp), %rsi
callq 0x15104
leaq 0x190(%rsp), %rdi
leaq 0x270(%rsp), %rsi
callq 0x14e54
leaq 0x1a8(%rsp), %rdi
leaq 0x288(%rsp), %rsi
callq 0x14f2a
movq 0x88(%rsp), %rdi
movq 0x148(%rsp), %rsi
callq 0x14fca
movq %r14, %rdi
movq 0xa8(%rsp), %rsi
callq 0xf382
incl %r13d
movq %r14, %rdi
callq 0xe608
movb 0x1e8(%rsp), %al
movb 0x38(%rsp), %cl
movb %cl, 0x1e8(%rsp)
movb %al, 0x38(%rsp)
movq 0x1f0(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x1f0(%rsp)
movq %rax, 0x40(%rsp)
movq 0x80(%rsp), %rdi
callq 0xe608
movq %r14, %rdi
callq 0xe0e0
cmpb $0x1, 0x31(%rbx)
jne 0x1283a
movl %r13d, %ebp
leaq 0x150(%rsp), %rdi
callq 0xa8c0
movq %r14, %rdi
movq %rax, %rsi
callq 0xf382
movb $0x4, 0xf0(%rsp)
movq $0x1, 0xf8(%rsp)
leaq 0xf0(%rsp), %r13
movq %r13, %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe608
movq %r14, %rdi
leaq 0xf0a0(%rip), %rsi      # 0x217ba
callq 0xe2b0
movq %rax, %r15
movq %r13, %rdi
callq 0xe608
movb (%r15), %al
movb 0xf0(%rsp), %cl
movb %cl, (%r15)
movb %al, 0xf0(%rsp)
movq 0x8(%r15), %rax
movq 0xf8(%rsp), %rcx
movq %rcx, 0x8(%r15)
movq %rax, 0xf8(%rsp)
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe0e0
movb $0x0, 0xe0(%rsp)
movq $0x0, 0xe8(%rsp)
leaq 0xe0(%rsp), %r13
movq %r13, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x103bc
movq %r13, %rdi
callq 0xe608
movq %r14, %rdi
leaq 0xf023(%rip), %rsi      # 0x217c5
callq 0xe2b0
movq %rax, %r15
movq %r13, %rdi
callq 0xe608
movb (%r15), %al
movb 0xe0(%rsp), %cl
movb %cl, (%r15)
movb %al, 0xe0(%rsp)
movq 0x8(%r15), %rax
movq 0xe8(%rsp), %rcx
movq %rcx, 0x8(%r15)
movq %rax, 0xe8(%rsp)
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe0e0
movq 0x28(%rsp), %rdi
leaq 0xef98(%rip), %rsi      # 0x21792
callq 0xe2b0
movq %rax, %rdi
callq 0x14c10
movq %rax, %rdi
leaq 0xf709(%rip), %rsi      # 0x21f1a
callq 0xe2b0
movq %rax, %rdi
movq %r14, %rsi
callq 0x14b08
movq %r14, %rdi
callq 0xe0e0
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
jmp 0x129b5
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
jmp 0x129b8
cmpb $0x1, 0x31(%rbx)
jne 0x129b8
movl %r13d, %ebp
leaq 0x230(%rsp), %rdi
callq 0xa8c0
movq %r14, %rdi
movq %rax, %rsi
callq 0xf382
movq $0x0, 0xd8(%rsp)
movb $0x4, 0xd0(%rsp)
leaq 0xd0(%rsp), %r13
movq %r13, %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe608
movq %r14, %rdi
leaq 0xef14(%rip), %rsi      # 0x217ba
callq 0xe2b0
movq %rax, %r15
movq %r13, %rdi
callq 0xe608
movb (%r15), %al
movb 0xd0(%rsp), %cl
movb %cl, (%r15)
movb %al, 0xd0(%rsp)
movq 0x8(%r15), %rax
movq 0xd8(%rsp), %rcx
movq %rcx, 0x8(%r15)
movq %rax, 0xd8(%rsp)
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe0e0
movb $0x0, 0xc0(%rsp)
movq $0x0, 0xc8(%rsp)
leaq 0xc0(%rsp), %r13
movq %r13, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x103bc
movq %r13, %rdi
callq 0xe608
movq %r14, %rdi
leaq 0xee97(%rip), %rsi      # 0x217c5
callq 0xe2b0
movq %rax, %r15
movq %r13, %rdi
callq 0xe608
movb (%r15), %al
movb 0xc0(%rsp), %cl
movb %cl, (%r15)
movb %al, 0xc0(%rsp)
movq 0x8(%r15), %rax
movq 0xc8(%rsp), %rcx
movq %rcx, 0x8(%r15)
movq %rax, 0xc8(%rsp)
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe0e0
movq 0x28(%rsp), %rdi
leaq 0xee0c(%rip), %rsi      # 0x21792
callq 0xe2b0
movq %rax, %rdi
callq 0x14c10
movq %rax, %rdi
leaq 0xf57d(%rip), %rsi      # 0x21f1a
callq 0xe2b0
movq %rax, %rdi
movq %r14, %rsi
callq 0x14b08
movq %r14, %rdi
callq 0xe0e0
movl %ebp, %r13d
movq 0xa8(%rsp), %rdi
callq 0xe0e0
movq 0x2b0(%rsp), %rdi
testq %rdi, %rdi
je 0x129e2
movq 0x2c0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x288(%rsp), %rdi
testq %rdi, %rdi
je 0x12a27
movq 0x2a8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
xorl %eax, %eax
movq %rax, 0x288(%rsp)
movl %eax, 0x290(%rsp)
movq %rax, 0x298(%rsp)
movl %eax, 0x2a0(%rsp)
movq %rax, 0x2a8(%rsp)
movq 0x270(%rsp), %rdi
testq %rdi, %rdi
je 0x12a44
movq 0x280(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x258(%rsp), %rdi
testq %rdi, %rdi
je 0x12a61
movq 0x268(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
decl %r12d
jne 0x12186
jmp 0x12a77
movl $0x0, 0x24(%rsp)
xorl %r13d, %r13d
incl 0x34(%rsp)
cmpb $0x0, 0x30(%rbx)
movl 0x20(%rsp), %ebp
movl 0x24(%rsp), %r12d
je 0x12d26
movl $0x11, %edx
movq 0x1a506(%rip), %rdi     # 0x2cfa0
leaq 0xed29(%rip), %rsi      # 0x217ca
callq 0x63f0
movq 0x1a4f3(%rip), %rdi     # 0x2cfa0
movl 0x34(%rsp), %esi
callq 0x6620
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %r15, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movl $0x11, %edx
movq 0x1a4b4(%rip), %rdi     # 0x2cfa0
leaq 0xece9(%rip), %rsi      # 0x217dc
callq 0x63f0
movq 0x1a4a1(%rip), %rdi     # 0x2cfa0
movsd 0x10(%rsp), %xmm0
callq 0x6580
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %r15, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movl $0x1d, %edx
movq 0x1a460(%rip), %rdi     # 0x2cfa0
leaq 0xeca7(%rip), %rsi      # 0x217ee
callq 0x63f0
movq 0x1a44d(%rip), %rdi     # 0x2cfa0
movl %r13d, %esi
callq 0x6620
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %r15, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movl $0x1d, %edx
movq 0x1a40f(%rip), %rdi     # 0x2cfa0
leaq 0xec74(%rip), %rsi      # 0x2180c
callq 0x63f0
movq 0x1a3fc(%rip), %rdi     # 0x2cfa0
movl %r12d, %esi
callq 0x6620
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %r15, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movl $0x17, %edx
movq 0x1a3be(%rip), %rdi     # 0x2cfa0
leaq 0xec41(%rip), %rsi      # 0x2182a
callq 0x63f0
movq 0x1a3ab(%rip), %rdi     # 0x2cfa0
movl %ebp, %esi
callq 0x6620
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %r15, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movl $0x14, %edx
movq 0x1a36e(%rip), %rdi     # 0x2cfa0
leaq 0xec09(%rip), %rsi      # 0x21842
callq 0x63f0
movq 0x1a35b(%rip), %rdi     # 0x2cfa0
movsd 0xa0(%rsp), %xmm0
callq 0x6580
movq %rax, %r15
movl $0x10, %edx
movq %rax, %rdi
leaq 0xebf2(%rip), %rsi      # 0x21857
callq 0x63f0
movq %r15, %rdi
movsd 0x98(%rsp), %xmm0
callq 0x6580
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %r15, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movl $0xf, %edx
movq 0x1a2ef(%rip), %rdi     # 0x2cfa0
leaq 0xebb0(%rip), %rsi      # 0x21868
callq 0x63f0
movq 0x78(%rsp), %rdi
callq 0xa8de
movq 0x1a2d2(%rip), %rdi     # 0x2cfa0
callq 0x6580
movq %rax, %r15
movl $0x12, %edx
movq %rax, %rdi
leaq 0xeb93(%rip), %rsi      # 0x21878
callq 0x63f0
movq 0x78(%rsp), %rdi
callq 0xa8ea
movq %r15, %rdi
callq 0x6580
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %r15, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
xorps %xmm2, %xmm2
cvtsi2sd %r13d, %xmm2
movsd 0x1f8(%rsp), %xmm0
divsd %xmm0, %xmm2
movsd 0xe9d5(%rip), %xmm1     # 0x21718
movsd %xmm2, 0x8(%rsp)
ucomisd %xmm2, %xmm1
ja 0x12e55
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
divsd %xmm0, %xmm1
movsd 0x58(%rsp), %xmm0
mulsd %xmm1, %xmm0
addsd 0x130(%rsp), %xmm0
movsd %xmm0, 0xa0(%rsp)
mulsd 0x70(%rsp), %xmm1
addsd 0x138(%rsp), %xmm1
movsd %xmm1, 0x98(%rsp)
movsd 0x10(%rsp), %xmm0
mulsd 0xe967(%rip), %xmm0     # 0x21708
movsd %xmm0, 0x10(%rsp)
cmpb $0x1, 0x31(%rbx)
leaq 0x60(%rsp), %r13
jne 0x12e5a
movq 0x28(%rsp), %rdi
leaq 0xe9d0(%rip), %rsi      # 0x21792
callq 0xe2b0
movq %rax, %rdi
callq 0x14c10
movq %rax, %r15
movslq %r12d, %rax
movb $0x5, 0xb0(%rsp)
movq %rax, 0xb8(%rsp)
leaq 0xb0(%rsp), %r12
movq %r12, %rdi
callq 0xe608
movq %r12, %rdi
callq 0xe608
movq %r15, %rdi
leaq 0xea84(%rip), %rsi      # 0x2188b
callq 0xe2b0
movq %rax, %r15
movq %r12, %rdi
callq 0xe608
movb (%r15), %al
movb 0xb0(%rsp), %cl
movb %cl, (%r15)
movb %al, 0xb0(%rsp)
movq 0x8(%r15), %rax
movq 0xb8(%rsp), %rcx
movq %rcx, 0x8(%r15)
movq %rax, 0xb8(%rsp)
movq %r15, %rdi
callq 0xe608
movq %r12, %rdi
callq 0xe0e0
jmp 0x12e5a
leaq 0x60(%rsp), %r13
movsd 0xe8b6(%rip), %xmm0     # 0x21718
ucomisd 0x8(%rsp), %xmm0
jbe 0x1201f
leaq 0x1e8(%rsp), %rbx
movq %rbx, %rdi
callq 0xe0e0
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x12e97
movq 0x1e0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x1a8(%rsp), %rdi
testq %rdi, %rdi
je 0x12edc
movq 0x1c8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
xorl %eax, %eax
movq %rax, 0x1a8(%rsp)
movl %eax, 0x1b0(%rsp)
movq %rax, 0x1b8(%rsp)
movl %eax, 0x1c0(%rsp)
movq %rax, 0x1c8(%rsp)
movq 0x190(%rsp), %rdi
testq %rdi, %rdi
je 0x12ef9
movq 0x1a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x178(%rsp), %rdi
testq %rdi, %rdi
je 0x12f16
movq 0x188(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
addq $0x338, %rsp            # imm = 0x338
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x2e8(%rsp), %rdi
callq 0xe0e0
jmp 0x1312e
movq %rax, %rbx
leaq 0x2d8(%rsp), %rdi
jmp 0x1308a
movq %rax, %rbx
leaq 0x2f8(%rsp), %rdi
callq 0xe0e0
jmp 0x12f62
movq %rax, %rbx
movl $0x20, %r15d
leaq (%rsp,%r15), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0xe0e0
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x12f68
xorl %ebp, %ebp
jmp 0x12f8c
movq %rax, %rbx
movb $0x1, %bpl
movl $0x10, %r15d
leaq (%rsp,%r15), %rdi
addq $0x308, %rdi            # imm = 0x308
callq 0xe0e0
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x12f92
jmp 0x12fb6
jmp 0x12fb0
movq %rax, %rbx
movb $0x1, %bpl
movl $0x10, %r15d
leaq (%rsp,%r15), %rdi
addq $0x38, %rdi
callq 0xe0e0
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x12fbc
jmp 0x12fdd
jmp 0x12fd7
movq %rax, %rbx
movb $0x1, %bpl
movl $0x10, %r15d
leaq (%rsp,%r15), %rdi
addq $0x230, %rdi            # imm = 0x230
callq 0xe0e0
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x12fe3
leaq 0x150(%rsp), %r15
cmpq %r14, %r15
setne %al
testb %bpl, %bpl
je 0x1312e
testb %al, %al
je 0x1312e
addq $-0x10, %r14
movq %r14, %rdi
callq 0xe0e0
cmpq %r15, %r14
jne 0x1301c
jmp 0x1312e
movq %rax, %rbx
leaq 0x150(%rsp), %r14
movb $0x1, %bpl
jmp 0x12ffd
jmp 0x13106
jmp 0x13106
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
jmp 0x1308a
jmp 0x13106
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
jmp 0x13073
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0xe0e0
jmp 0x13082
jmp 0x13106
movq %rax, %rbx
leaq 0x230(%rsp), %rdi
callq 0xe0e0
jmp 0x13121
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
jmp 0x130e4
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
jmp 0x130e4
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
jmp 0x130e4
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
jmp 0x130e4
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
jmp 0x130e4
jmp 0x13111
jmp 0x13111
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0xe0e0
jmp 0x130f6
jmp 0x13111
jmp 0x130f3
jmp 0x13111
jmp 0x130f3
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0xe0e0
jmp 0x13114
jmp 0x13111
jmp 0x13106
movq %rax, %rbx
jmp 0x13121
jmp 0x13111
jmp 0x13111
jmp 0x13111
movq %rax, %rbx
leaq 0x230(%rsp), %rdi
callq 0x14a9e
leaq 0x150(%rsp), %rdi
callq 0x14a9e
movq %rbx, %rdi
callq 0x6640