// File: /workspace/github_cpp_makefile_star2_O2/harry830622[P]floorplanner/src/floorplanner.cpp
// Function: Floorplanner::FastSA()
void Floorplanner::FastSA() {
  const double initial_uphill_probability = 0.99;
  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;
  const int c = 100;
  const int k = 7;

  if (is_drawing_) {
    drawing_ = Json::object();
    drawing_["config"] = {{"initialTemperature", initial_temperature},
                          {"c", c},
                          {"k", k},
                          {"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;

    double total_delta_cost = 0.0;
    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) {
        total_delta_cost += delta_cost;

        ++num_accepted_floorplans;
        floorplan = new_floorplan;
        last_cost = cost;

        const double outline_width = database_.outline_width();
        const double outline_height = database_.outline_height();
        if (new_floorplan.width() <= outline_width &&
            new_floorplan.height() <= outline_height) {
          ++num_feasible_floorplans;
          if (cost < best_cost) {
            best_floorplan_ = new_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) {
          total_delta_cost += delta_cost;

          ++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 << "    total_delta_cost: " << total_delta_cost << 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));

    const double average_delta_cost = abs(total_delta_cost / num_perturbations);
    if (nth_iteration >= 1 && nth_iteration < k) {
      temperature =
          initial_temperature * average_delta_cost / (nth_iteration + 1) / c;
    } else {
      temperature =
          initial_temperature * average_delta_cost / (nth_iteration + 1);
    }

    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 $0x358, %rsp            # imm = 0x358
movq %rdi, %rbx
movsd 0x68(%rdi), %xmm0
divsd 0xa647(%rip), %xmm0     # 0x1b700
movsd %xmm0, 0x40(%rsp)
movsd %xmm0, 0x68(%rsp)
movq (%rdi), %rdi
callq 0x8d3c
movl %eax, %ebp
movq (%rbx), %rdi
callq 0x8d3c
imull %ebp, %eax
leal (%rax,%rax,2), %eax
movl %eax, 0x14(%rsp)
movsd 0x8(%rbx), %xmm0
movapd %xmm0, 0x30(%rsp)
movl $0x64, 0x7c(%rsp)
movl $0x7, 0x78(%rsp)
cmpb $0x1, 0x31(%rbx)
jne 0x1136e
leaq 0x2a0(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd1f4
leaq 0x118(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xd4fc
movq %r14, %rdi
callq 0xd290
leaq 0xa64c(%rip), %rsi      # 0x1b787
leaq 0x2b0(%rsp), %rdi
callq 0x12084
leaq 0x2c0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x1209e
leaq 0x1f8(%rsp), %r14
leaq 0x2b0(%rsp), %rsi
pushq $0x2
popq %rdx
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
movq %r14, %rdi
callq 0xd2e8
leaq 0x208(%rsp), %r14
leaq 0xa736(%rip), %rsi      # 0x1b8c1
leaq 0xe0(%rsp), %rdi
callq 0xd6e2
leaq 0xf0(%rsp), %rdi
leaq 0x7c(%rsp), %rsi
callq 0x120d2
leaq 0xe0(%rsp), %rsi
pushq $0x2
popq %rdx
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
movq %r14, %rdi
callq 0xd2e8
leaq 0x218(%rsp), %r14
leaq 0xaf9b(%rip), %rsi      # 0x1c16e
leaq 0xc0(%rsp), %rdi
callq 0xd6e2
leaq 0xd0(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x120d2
leaq 0xc0(%rsp), %rsi
pushq $0x2
popq %rdx
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
movq %r14, %rdi
callq 0xd2e8
leaq 0x228(%rsp), %r14
leaq 0xa57f(%rip), %rsi      # 0x1b79a
leaq 0x98(%rsp), %rdi
callq 0x120b8
leaq 0xa8(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0x120d2
leaq 0x98(%rsp), %rsi
pushq $0x2
popq %rdx
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
movq %r14, %rdi
callq 0xd2e8
leaq 0x168(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
pushq $0x4
popq %rdx
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
callq 0xd2e8
leaq 0xa531(%rip), %rsi      # 0x1b7ab
movq %r15, %rdi
callq 0xd3fa
leaq 0x168(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0xd4fc
movq %r14, %rdi
callq 0xd290
pushq $0x30
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
callq 0xd290
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x112a1
pushq $0x10
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x98, %rdi
callq 0xd290
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x112bf
pushq $0x10
popq %r14
leaq (%rsp,%r14), %rdi
addq $0xc0, %rdi
callq 0xd290
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x112dd
pushq $0x10
popq %r14
leaq (%rsp,%r14), %rdi
addq $0xe0, %rdi
callq 0xd290
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x112fb
pushq $0x10
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x2b0, %rdi            # imm = 0x2B0
callq 0xd290
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x11319
leaq 0x158(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd5e8
leaq 0xa467(%rip), %rsi      # 0x1b7b2
movq %r15, %rdi
callq 0xd3fa
leaq 0x158(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0xd4fc
movq %r14, %rdi
callq 0xd290
leaq 0x70(%rbx), %rsi
leaq 0x1f8(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x48(%rsp)
callq 0x11ef8
movq (%rbx), %rsi
movq %r14, %rdi
callq 0xb566
cmpb $0x1, 0x31(%rbx)
jne 0x113e3
leaq 0x1f8(%rsp), %rdi
callq 0xacba
leaq 0x148(%rsp), %rdi
movq %rax, %rsi
callq 0xe86a
leaq 0x118(%rbx), %rdi
leaq 0xa3fa(%rip), %rsi      # 0x1b7bd
callq 0xd3fa
leaq 0x148(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0xd4fc
movq %r14, %rdi
callq 0xd290
movsd 0xa2fd(%rip), %xmm2     # 0x1b6e8
movapd 0x30(%rsp), %xmm0
subsd %xmm0, %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
movapd 0xa32f(%rip), %xmm1     # 0x1b730
movapd %xmm2, 0x100(%rsp)
mulpd %xmm2, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
leaq 0x1f8(%rsp), %rsi
movq %rbx, %rdi
movapd %xmm1, 0x110(%rsp)
callq 0xfdc6
movapd %xmm0, %xmm1
movsd 0x40(%rsp), %xmm0
divsd 0xa2c7(%rip), %xmm0     # 0x1b708
movsd %xmm0, 0x40(%rsp)
movsd 0x68(%rsp), %xmm0
leaq 0xc0(%rsp), %rax
movsd %xmm0, (%rax)
leaq 0x118(%rbx), %rax
movq %rax, 0x18(%rsp)
movapd 0x110(%rsp), %xmm2
movapd 0x100(%rsp), %xmm3
subpd %xmm2, %xmm3
movapd %xmm3, 0x100(%rsp)
movq $0x0, 0x50(%rsp)
leaq 0x2b0(%rsp), %r13
leaq 0xe0(%rsp), %rbp
leaq 0x1c8(%rsp), %r14
movsd %xmm1, 0xb8(%rsp)
movsd %xmm1, 0x60(%rsp)
movapd %xmm2, 0x80(%rsp)
ucomisd 0x40(%rsp), %xmm0
jbe 0x11cb4
andl $0x0, 0x10(%rsp)
cmpb $0x0, 0x31(%rbx)
je 0x1157d
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd1f4
leaq 0x1e8(%rsp), %r15
movq %r15, %rdi
leaq 0xc0(%rsp), %rsi
callq 0x120ec
movq %r13, %rdi
leaq 0xa2c8(%rip), %rsi      # 0x1b7ce
callq 0xd3fa
movq %rax, %rdi
movq %r15, %rsi
callq 0xd4fc
movq %r15, %rdi
callq 0xd290
leaq 0x138(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd5e8
movq %r13, %rdi
leaq 0xaa01(%rip), %rsi      # 0x1bf3a
callq 0xd3fa
movq %rax, %rdi
leaq 0x138(%rsp), %r15
movq %r15, %rsi
callq 0xd4fc
movq %r15, %rdi
callq 0xd290
movq 0x18(%rsp), %rdi
leaq 0xa24d(%rip), %rsi      # 0x1b7b2
callq 0xd3fa
movq %rax, %rdi
movq %r13, %rsi
callq 0x12106
movq %r13, %rdi
callq 0xd290
movq 0x50(%rsp), %rax
incl %eax
movl %eax, 0x2c(%rsp)
movapd 0x80(%rsp), %xmm0
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
movapd %xmm0, 0x120(%rsp)
xorl %r15d, %r15d
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
xorl %ecx, %ecx
movl 0x14(%rsp), %eax
movl %ecx, 0x74(%rsp)
cmpl %eax, %ecx
jge 0x119fe
movq %r13, %rdi
leaq 0x1f8(%rsp), %rsi
callq 0x11ef8
movq (%rbx), %rsi
movq %r13, %rdi
callq 0xacf6
movq (%rbx), %rsi
movq %r13, %rdi
callq 0xb566
movq %rbx, %rdi
movq %r13, %rsi
movapd 0x120(%rsp), %xmm0
movapd 0x80(%rsp), %xmm1
callq 0xfdc6
movsd %xmm0, 0x98(%rsp)
subsd 0x60(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
movapd 0x30(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp)
jbe 0x117b7
leaq 0x1f8(%rsp), %rdi
movq %r13, %rsi
callq 0x11fee
movsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
movq (%rbx), %rdi
callq 0x8d06
movsd %xmm0, 0x30(%rsp)
movq (%rbx), %rdi
callq 0x8d0c
movsd %xmm0, 0x58(%rsp)
movq %r13, %rdi
callq 0xaccc
movsd 0x30(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x116c7
movq %r13, %rdi
callq 0xacd2
movsd 0x58(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x116c7
incl 0x10(%rsp)
movsd 0xb8(%rsp), %xmm0
ucomisd 0x98(%rsp), %xmm0
jbe 0x116c7
movq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x11fee
movsd 0x98(%rsp), %xmm0
movsd %xmm0, 0xb8(%rsp)
incl %r15d
cmpb $0x1, 0x31(%rbx)
jne 0x119df
leaq 0x1f8(%rsp), %rdi
callq 0xacba
movq %rbp, %rdi
movq %rax, %rsi
callq 0xe86a
movq %rbx, %r12
movq %r14, %rbx
movb $0x1, 0xf(%rsp)
leaq 0x1d8(%rsp), %r14
movq %r14, %rdi
leaq 0xf(%rsp), %rsi
callq 0x121d2
movq %rbp, %rdi
leaq 0xa0c4(%rip), %rsi      # 0x1b7da
callq 0xd3fa
movq %rax, %rdi
movq %r14, %rsi
callq 0xd4fc
movq %r14, %rdi
callq 0xd290
movq %rbx, %r13
movq %rbx, %rdi
leaq 0x98(%rsp), %rsi
callq 0x1209e
movq %rbp, %r14
movq %rbp, %rdi
leaq 0xa097(%rip), %rsi      # 0x1b7e5
callq 0xd3fa
movq %rax, %rdi
movq %r13, %rsi
callq 0xd4fc
movq %r13, %rdi
callq 0xd290
movq 0x18(%rsp), %rdi
leaq 0xa040(%rip), %rsi      # 0x1b7b2
callq 0xd3fa
movq %r14, %rbp
movq %rax, %rdi
callq 0x121ec
movq %rax, %rdi
leaq 0xa7ae(%rip), %rsi      # 0x1bf3a
callq 0xd3fa
movq %rax, %rdi
movq %rbp, %rsi
callq 0x12106
movq %rbp, %rdi
callq 0xd290
movq %rbx, %r14
movq %r12, %rbx
leaq 0x2b0(%rsp), %r13
jmp 0x119df
xorpd 0x9f81(%rip), %xmm0     # 0x1b740
divsd 0xc0(%rsp), %xmm0
callq 0x7680
movsd %xmm0, 0x58(%rsp)
callq 0x7120
cvtsi2sd %eax, %xmm0
divsd 0x9f3c(%rip), %xmm0     # 0x1b720
movsd 0x58(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x118f1
leaq 0x1f8(%rsp), %rdi
movq %r13, %rsi
callq 0x11fee
incl %r15d
movsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
cmpb $0x1, 0x31(%rbx)
jne 0x119df
movl %r15d, %r12d
leaq 0x1f8(%rsp), %rdi
callq 0xacba
movq %rbp, %rdi
movq %rax, %rsi
callq 0xe86a
movb $0x1, 0xf(%rsp)
leaq 0x1b8(%rsp), %r15
movq %r15, %rdi
leaq 0xf(%rsp), %rsi
callq 0x121d2
movq %rbp, %rdi
leaq 0x9f7b(%rip), %rsi      # 0x1b7da
callq 0xd3fa
movq %rax, %rdi
movq %r15, %rsi
callq 0xd4fc
movq %r15, %rdi
callq 0xd290
leaq 0x1a8(%rsp), %r15
movq %r15, %rdi
leaq 0x98(%rsp), %rsi
callq 0x1209e
movq %rbp, %rdi
leaq 0x9f4c(%rip), %rsi      # 0x1b7e5
callq 0xd3fa
movq %rax, %rdi
movq %r15, %rsi
callq 0xd4fc
movq %r15, %rdi
callq 0xd290
movq 0x18(%rsp), %rdi
leaq 0x9ef5(%rip), %rsi      # 0x1b7b2
callq 0xd3fa
movq %rax, %rdi
callq 0x121ec
movq %rax, %rdi
leaq 0xa666(%rip), %rsi      # 0x1bf3a
callq 0xd3fa
movq %rax, %rdi
movq %rbp, %rsi
callq 0x12106
movq %rbp, %rdi
callq 0xd290
jmp 0x119ce
cmpb $0x1, 0x31(%rbx)
jne 0x119d3
movl %r15d, %r12d
movq %r13, %rdi
callq 0xacba
movq %rbp, %rdi
movq %rax, %rsi
callq 0xe86a
movb $0x0, 0xf(%rsp)
leaq 0x198(%rsp), %r15
movq %r15, %rdi
leaq 0xf(%rsp), %rsi
callq 0x121d2
movq %rbp, %rdi
leaq 0x9ea5(%rip), %rsi      # 0x1b7da
callq 0xd3fa
movq %rax, %rdi
movq %r15, %rsi
callq 0xd4fc
movq %r15, %rdi
callq 0xd290
leaq 0x188(%rsp), %r15
movq %r15, %rdi
leaq 0x98(%rsp), %rsi
callq 0x1209e
movq %rbp, %rdi
leaq 0x9e76(%rip), %rsi      # 0x1b7e5
callq 0xd3fa
movq %rax, %rdi
movq %r15, %rsi
callq 0xd4fc
movq %r15, %rdi
callq 0xd290
movq 0x18(%rsp), %rdi
leaq 0x9e1f(%rip), %rsi      # 0x1b7b2
callq 0xd3fa
movq %rax, %rdi
callq 0x121ec
movq %rax, %rdi
leaq 0xa590(%rip), %rsi      # 0x1bf3a
callq 0xd3fa
movq %rax, %rdi
movq %rbp, %rsi
callq 0x12106
movq %rbp, %rdi
callq 0xd290
movapd 0x30(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movl %r12d, %r15d
jmp 0x119df
movapd 0x30(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r13, %rdi
callq 0x11fb2
movl 0x74(%rsp), %ecx
incl %ecx
movsd 0x20(%rsp), %xmm0
movapd %xmm0, 0x30(%rsp)
jmp 0x115ad
cmpb $0x0, 0x30(%rbx)
je 0x11b9c
movq 0x18591(%rip), %rdi     # 0x29fa0
leaq 0x9dd4(%rip), %rsi      # 0x1b7ea
callq 0x7380
movq %rax, %rdi
movl 0x2c(%rsp), %esi
callq 0x7640
movq %rax, %rdi
callq 0x71c0
movq 0x1856a(%rip), %rdi     # 0x29fa0
leaq 0x9dbf(%rip), %rsi      # 0x1b7fc
callq 0x7380
movsd 0xc0(%rsp), %xmm0
movq %rax, %rdi
callq 0x75a0
movq %rax, %rdi
callq 0x71c0
movq 0x1853e(%rip), %rdi     # 0x29fa0
leaq 0x9e5a(%rip), %rsi      # 0x1b8c3
callq 0x7380
movq %rax, %rdi
movapd 0x30(%rsp), %xmm0
callq 0x75a0
movq %rax, %rdi
callq 0x71c0
movq 0x18515(%rip), %rdi     # 0x29fa0
leaq 0x9d7c(%rip), %rsi      # 0x1b80e
callq 0x7380
movq %rax, %rdi
movl %r15d, %esi
callq 0x7640
movq %rax, %rdi
callq 0x71c0
movq 0x184ef(%rip), %rdi     # 0x29fa0
leaq 0x9d74(%rip), %rsi      # 0x1b82c
callq 0x7380
movl 0x10(%rsp), %esi
movq %rax, %rdi
callq 0x7640
movq %rax, %rdi
callq 0x71c0
movq 0x184c8(%rip), %rdi     # 0x29fa0
leaq 0x9d6b(%rip), %rsi      # 0x1b84a
callq 0x7380
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x7640
movq %rax, %rdi
callq 0x71c0
movq 0x184a1(%rip), %rdi     # 0x29fa0
leaq 0x9d5c(%rip), %rsi      # 0x1b862
callq 0x7380
movq %rax, %rdi
movapd 0x120(%rsp), %xmm0
callq 0x75a0
movq %rax, %rdi
leaq 0x9d51(%rip), %rsi      # 0x1b877
callq 0x7380
movq %rax, %rdi
movapd 0x80(%rsp), %xmm0
callq 0x75a0
movq %rax, %rdi
callq 0x71c0
movq 0x18455(%rip), %rdi     # 0x29fa0
leaq 0x9d36(%rip), %rsi      # 0x1b888
callq 0x7380
movq %rax, %r12
movq 0x48(%rsp), %rdi
callq 0xacd8
movq %r12, %rdi
callq 0x75a0
movq %rax, %rdi
leaq 0x9d22(%rip), %rsi      # 0x1b898
callq 0x7380
movq %rax, %r12
movq 0x48(%rsp), %rdi
callq 0xace4
movq %r12, %rdi
callq 0x75a0
movq %rax, %rdi
callq 0x71c0
movl 0x14(%rsp), %eax
cvtsi2sd %r15d, %xmm0
cvtsi2sd %eax, %xmm2
divsd %xmm2, %xmm0
movsd 0x9b5f(%rip), %xmm1     # 0x1b710
ucomisd %xmm0, %xmm1
ja 0x11cb4
movapd 0x30(%rsp), %xmm1
movsd %xmm2, 0x20(%rsp)
divsd %xmm2, %xmm1
andpd 0x9b7d(%rip), %xmm1     # 0x1b750
movq 0x50(%rsp), %rcx
leal 0x2(%rcx), %eax
mulsd 0x68(%rsp), %xmm1
cvtsi2sd %eax, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
divsd 0x9b03(%rip), %xmm0     # 0x1b6f8
cmpl $0x6, %ecx
jb 0x11bfe
movapd %xmm1, %xmm0
cvtsi2sdl 0x10(%rsp), %xmm1
movapd %xmm1, 0x80(%rsp)
movsd %xmm0, 0xc0(%rsp)
cmpb $0x1, 0x31(%rbx)
jne 0x11c78
movq 0x18(%rsp), %rdi
leaq 0x9b8a(%rip), %rsi      # 0x1b7b2
callq 0xd3fa
movq %rax, %rdi
callq 0x121ec
movq %rax, %r15
leaq 0x178(%rsp), %r12
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq 0x12216
movq %r15, %rdi
leaq 0x9c54(%rip), %rsi      # 0x1b8ab
callq 0xd3fa
movq %rax, %rdi
movq %r12, %rsi
callq 0xd4fc
movq %r12, %rdi
callq 0xd290
movsd 0xc0(%rsp), %xmm0
movapd 0x80(%rsp), %xmm1
divsd 0x20(%rsp), %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd 0x100(%rsp), %xmm1
addpd 0x110(%rsp), %xmm1
movapd %xmm1, 0x80(%rsp)
movl 0x2c(%rsp), %eax
movq %rax, 0x50(%rsp)
jmp 0x114bd
leaq 0x1f8(%rsp), %rdi
callq 0x11fb2
addq $0x358, %rsp            # imm = 0x358
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
callq 0xd290
jmp 0x11ef0
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
callq 0xd290
jmp 0x11d0d
movq %rax, %rbx
leaq 0x148(%rsp), %rdi
jmp 0x11e49
movq %rax, %rbx
pushq $0x30
popq %r15
leaq (%rsp,%r15), %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
callq 0xd290
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x11d11
xorl %ebp, %ebp
jmp 0x11d35
movq %rax, %rbx
movb $0x1, %bpl
pushq $0x10
popq %r15
leaq (%rsp,%r15), %rdi
addq $0x98, %rdi
callq 0xd290
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x11d39
jmp 0x11d5d
jmp 0x11d57
movq %rax, %rbx
movb $0x1, %bpl
pushq $0x10
popq %r15
leaq (%rsp,%r15), %rdi
addq $0xc0, %rdi
callq 0xd290
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x11d61
jmp 0x11d85
jmp 0x11d7f
movq %rax, %rbx
movb $0x1, %bpl
pushq $0x10
popq %r15
leaq (%rsp,%r15), %rdi
addq $0xe0, %rdi
callq 0xd290
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x11d89
jmp 0x11dad
jmp 0x11da7
movq %rax, %rbx
movb $0x1, %bpl
pushq $0x10
popq %r15
leaq (%rsp,%r15), %rdi
addq $0x2b0, %rdi            # imm = 0x2B0
callq 0xd290
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x11db1
leaq 0x1f8(%rsp), %r15
cmpq %r14, %r15
setne %al
andb %al, %bpl
cmpb $0x1, %bpl
jne 0x11ef0
addq $-0x10, %r14
movq %r14, %rdi
callq 0xd290
cmpq %r15, %r14
jne 0x11de6
jmp 0x11ef0
movq %rax, %rbx
jmp 0x11ef0
jmp 0x11eb8
jmp 0x11eb8
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
jmp 0x11e49
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
jmp 0x11e33
movq %rax, %rbx
leaq 0x1e8(%rsp), %rdi
callq 0xd290
jmp 0x11e41
jmp 0x11eb8
jmp 0x11eb8
movq %rax, %rbx
leaq 0x2b0(%rsp), %rdi
callq 0xd290
jmp 0x11ee3
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
jmp 0x11ea5
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
jmp 0x11ea5
movq %rax, %rbx
leaq 0x1a8(%rsp), %rdi
jmp 0x11ea5
movq %rax, %rbx
leaq 0x188(%rsp), %rdi
jmp 0x11ea5
jmp 0x11ed3
jmp 0x11ed3
jmp 0x11ed3
movq %rax, %rbx
leaq 0x1d8(%rsp), %rdi
jmp 0x11ea5
movq %rax, %rbx
leaq 0x1c8(%rsp), %rdi
callq 0xd290
jmp 0x11ec2
jmp 0x11eb8
jmp 0x11ed3
jmp 0x11ed3
jmp 0x11ebf
jmp 0x11ed3
jmp 0x11ebf
movq %rax, %rbx
jmp 0x11ee3
jmp 0x11ed3
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0xd290
jmp 0x11ed6
jmp 0x11ed3
movq %rax, %rbx
leaq 0x2b0(%rsp), %rdi
callq 0x11fb2
leaq 0x1f8(%rsp), %rdi
callq 0x11fb2
movq %rbx, %rdi
callq 0x7660