// File: /workspace/github_cpp_makefile_star2_O1/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 $0x398, %rsp            # imm = 0x398
movq %rdi, %rbx
movsd 0x68(%rdi), %xmm0
divsd 0xe5a1(%rip), %xmm0     # 0x216f8
movsd %xmm0, 0x70(%rsp)
movq (%rdi), %rdi
callq 0x8404
movl %eax, %ebp
movq (%rbx), %rdi
callq 0x8404
imull %ebp, %eax
leal (%rax,%rax,2), %r12d
movsd 0x8(%rbx), %xmm0
movsd %xmm0, 0x50(%rsp)
cmpb $0x1, 0x31(%rbx)
movl %r12d, 0x24(%rsp)
jne 0x1354c
leaq 0x388(%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 0x228(%rsp), %rdi
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
leaq 0xe55a(%rip), %rsi      # 0x21767
callq 0x151f0
leaq 0x228(%rsp), %r12
movq %r12, %rdi
callq 0xe608
leaq 0x238(%rsp), %r14
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r14, %rdi
movsd 0x70(%rsp), %xmm0
callq 0x103bc
movq %r14, %rdi
callq 0xe608
leaq 0x180(%rsp), %r14
movl $0x2, %edx
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0xe168
leaq 0x190(%rsp), %r14
leaq 0x30(%rsp), %rdi
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
leaq 0xe613(%rip), %rsi      # 0x218a1
callq 0x10329
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0xe608
leaq 0x40(%rsp), %r13
movb $0x5, (%r13)
movq $0x64, 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 0x1a0(%rsp), %r14
leaq 0x368(%rsp), %rdi
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
leaq 0xee4f(%rip), %rsi      # 0x2214e
callq 0x10329
leaq 0x368(%rsp), %r12
movq %r12, %rdi
callq 0xe608
leaq 0x378(%rsp), %r13
movb $0x5, (%r13)
movq $0x7, 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 0x1b0(%rsp), %r14
leaq 0x348(%rsp), %rdi
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
leaq 0xe404(%rip), %rsi      # 0x2177a
callq 0x15283
leaq 0x348(%rsp), %r12
movq %r12, %rdi
callq 0xe608
leaq 0x358(%rsp), %r13
movslq 0x24(%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 0x338(%rsp), %rdi
leaq 0x180(%rsp), %rsi
movl $0x4, %edx
movl $0x1, %ecx
movl $0x2, %r8d
callq 0xe168
leaq 0xe393(%rip), %rsi      # 0x2178b
movq %r15, %rdi
callq 0xe2b0
movq %rax, %r12
leaq 0x338(%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 $0x30, %r14d
leaq (%rsp,%r14), %rdi
addq $0x180, %rdi            # imm = 0x180
callq 0xe0e0
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x13449
movl $0x10, %r14d
movl 0x24(%rsp), %r12d
leaq (%rsp,%r14), %rdi
addq $0x348, %rdi            # imm = 0x348
callq 0xe0e0
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x1346e
movl $0x10, %r14d
leaq (%rsp,%r14), %rdi
addq $0x368, %rdi            # imm = 0x368
callq 0xe0e0
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x1348e
movl $0x10, %r14d
leaq (%rsp,%r14), %rdi
addq $0x30, %rdi
callq 0xe0e0
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x134ae
movl $0x10, %r14d
leaq (%rsp,%r14), %rdi
addq $0x228, %rdi            # imm = 0x228
callq 0xe0e0
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x134cb
leaq 0x328(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0xe168
leaq 0xe28d(%rip), %rsi      # 0x21792
movq %r15, %rdi
callq 0xe2b0
movq %rax, %r14
leaq 0x328(%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 0x180(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x88(%rsp)
callq 0x149a6
movq (%rbx), %rsi
movq %r14, %rdi
callq 0xb4e8
cmpb $0x1, 0x31(%rbx)
jne 0x135e8
leaq 0x180(%rsp), %rdi
callq 0xa8c0
leaq 0x318(%rsp), %rdi
movq %rax, %rsi
callq 0xf382
leaq 0x118(%rbx), %rdi
leaq 0xe1f9(%rip), %rsi      # 0x2179d
callq 0xe2b0
movq %rax, %r14
leaq 0x318(%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 0xe0e8(%rip), %xmm2     # 0x216d8
movsd 0x50(%rsp), %xmm0
subsd %xmm0, %xmm2
movsd 0xe0ce(%rip), %xmm1     # 0x216d0
mulsd %xmm1, %xmm0
movsd %xmm2, 0x78(%rsp)
mulsd %xmm2, %xmm1
leaq 0x180(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movsd %xmm0, 0x150(%rsp)
movsd %xmm1, 0x158(%rsp)
callq 0x10c68
movsd 0x70(%rsp), %xmm2
movapd %xmm2, %xmm1
divsd 0xe0b9(%rip), %xmm1     # 0x21700
movsd %xmm1, 0x2d0(%rsp)
leaq 0x118(%rbx), %rax
movq %rax, 0x28(%rsp)
movl $0x80, %eax
leaq (%r15,%rax), %rcx
movq %rcx, 0x178(%rsp)
leaq 0x228(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x90(%rsp)
movl $0x98, %eax
addq %rax, %rcx
movq %rcx, 0x58(%rsp)
leaq (%r15,%rax), %rcx
movq %rcx, 0x170(%rsp)
addq %rbx, %rax
movq %rax, 0x2f8(%rsp)
leaq 0xb0(%rbx), %rax
movq %rax, 0x2f0(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
movsd %xmm1, 0x80(%rsp)
leaq 0xc8(%rbx), %rax
movq %rax, 0x2e8(%rsp)
movsd 0x150(%rsp), %xmm1
movsd 0x50(%rsp), %xmm3
subsd %xmm1, %xmm3
movsd %xmm3, 0x50(%rsp)
movsd 0x158(%rsp), %xmm3
movsd 0x78(%rsp), %xmm4
subsd %xmm3, %xmm4
movsd %xmm4, 0x78(%rsp)
movapd %xmm2, 0x130(%rsp)
movsd %xmm3, 0xa8(%rsp)
movsd %xmm0, 0x168(%rsp)
movsd %xmm0, 0x18(%rsp)
movsd %xmm1, 0xa0(%rsp)
leaq 0xf0(%rbx), %rax
movq %rax, 0x2e0(%rsp)
leaq 0x108(%rbx), %rax
movq %rax, 0x2d8(%rsp)
leaq 0x30(%rsp), %r13
xorl %r14d, %r14d
movl %r14d, %eax
movq %rax, 0x160(%rsp)
movapd 0x130(%rsp), %xmm0
ucomisd 0x2d0(%rsp), %xmm0
jbe 0x146b0
cmpb $0x1, 0x31(%rbx)
jne 0x138d3
leaq 0x228(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xe168
movb $0x0, 0x120(%rsp)
movq $0x0, 0x128(%rsp)
leaq 0x120(%rsp), %rbp
movq %rbp, %rdi
movapd 0x130(%rsp), %xmm0
callq 0x103bc
movq %rbp, %rdi
callq 0xe608
movq %r14, %rdi
leaq 0xdfd1(%rip), %rsi      # 0x217ae
callq 0xe2b0
movq %rax, %r15
movq %rbp, %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 %rbp, %rdi
callq 0xe0e0
leaq 0x140(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0xe168
leaq 0x228(%rsp), %rdi
leaq 0xe6c9(%rip), %rsi      # 0x21f1a
callq 0xe2b0
movq %rax, %r15
leaq 0x140(%rsp), %rbp
movq %rbp, %rdi
callq 0xe608
movb (%r15), %al
movb 0x140(%rsp), %cl
movb %cl, (%r15)
movb %al, 0x140(%rsp)
movq 0x8(%r15), %rax
movq 0x148(%rsp), %rcx
movq %rcx, 0x8(%r15)
movq %rax, 0x148(%rsp)
movq %r15, %rdi
callq 0xe608
movq %rbp, %rdi
callq 0xe0e0
movq 0x28(%rsp), %rdi
leaq 0xdee1(%rip), %rsi      # 0x21792
callq 0xe2b0
movq %rax, %rdi
leaq 0x228(%rsp), %rsi
callq 0x14b08
leaq 0x228(%rsp), %rdi
callq 0xe0e0
xorpd %xmm0, %xmm0
testl %r12d, %r12d
jle 0x1420c
movapd %xmm0, 0x60(%rsp)
xorl %r15d, %r15d
movl $0x0, 0x14(%rsp)
leaq 0x228(%rsp), %r14
movq %r14, %rdi
leaq 0x180(%rsp), %rsi
callq 0x149a6
movq (%rbx), %rsi
movq %r14, %rdi
callq 0xa924
movq (%rbx), %rsi
movq %r14, %rdi
callq 0xb4e8
movq %rbx, %rdi
movq %r14, %rsi
movsd 0xa0(%rsp), %xmm0
movsd 0xa8(%rsp), %xmm1
callq 0x10c68
movsd %xmm0, 0x8(%rsp)
movapd %xmm0, %xmm1
subsd 0x18(%rsp), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
movapd %xmm1, 0x300(%rsp)
jbe 0x13d20
movupd 0x228(%rsp), %xmm0
movupd 0x238(%rsp), %xmm1
movapd %xmm0, 0x180(%rsp)
movapd %xmm1, 0x190(%rsp)
movl 0x248(%rsp), %eax
movl %eax, 0x1a0(%rsp)
leaq 0x1a8(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x15104
leaq 0x1c0(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x14e54
leaq 0x1d8(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x14f2a
movq 0x178(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x14fca
movq %r13, %rdi
movq 0x58(%rsp), %rsi
callq 0xf382
movq %r13, %rdi
callq 0xe608
movb 0x218(%rsp), %al
movb 0x30(%rsp), %cl
movb %cl, 0x218(%rsp)
movb %al, 0x30(%rsp)
movq 0x220(%rsp), %rax
movq 0x38(%rsp), %rcx
movq %rcx, 0x220(%rsp)
movq %rax, 0x38(%rsp)
movq 0x170(%rsp), %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe0e0
movq (%rbx), %rdi
callq 0x83be
movsd %xmm0, 0x18(%rsp)
movq (%rbx), %rdi
callq 0x83c4
movsd %xmm0, 0x98(%rsp)
leaq 0x228(%rsp), %rdi
callq 0xa8d2
movsd 0x18(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x13ba1
leaq 0x228(%rsp), %rdi
callq 0xa8d8
movsd 0x98(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x13ba1
incl 0x14(%rsp)
movsd 0x168(%rsp), %xmm0
ucomisd 0x8(%rsp), %xmm0
jbe 0x13ba1
movupd 0x228(%rsp), %xmm0
movupd 0x238(%rsp), %xmm1
movq 0x88(%rsp), %rax
movupd %xmm1, 0x10(%rax)
movupd %xmm0, (%rax)
movl 0x248(%rsp), %eax
movl %eax, 0x90(%rbx)
movq 0x2f8(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x15104
movq 0x2f0(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x14e54
movq 0x2e8(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x14f2a
movq 0x2e0(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x14fca
movq %r13, %rdi
movq 0x58(%rsp), %rsi
callq 0xf382
movq %r13, %rdi
callq 0xe608
movb 0x108(%rbx), %al
movb 0x30(%rsp), %cl
movb %cl, 0x108(%rbx)
movb %al, 0x30(%rsp)
movq 0x110(%rbx), %rax
movq 0x38(%rsp), %rcx
movq %rcx, 0x110(%rbx)
movq %rax, 0x38(%rsp)
movq 0x2d8(%rsp), %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe0e0
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x168(%rsp)
movapd 0x60(%rsp), %xmm0
addsd 0x300(%rsp), %xmm0
movapd %xmm0, 0x60(%rsp)
incl %r15d
cmpb $0x1, 0x31(%rbx)
jne 0x13fdd
leaq 0x180(%rsp), %rdi
callq 0xa8c0
movq %r13, %rdi
movq %rax, %rsi
callq 0xf382
movl %r15d, %r14d
movb $0x4, 0x110(%rsp)
movq $0x1, 0x118(%rsp)
leaq 0x110(%rsp), %r15
movq %r15, %rdi
callq 0xe608
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
leaq 0xdba6(%rip), %rsi      # 0x217ba
callq 0xe2b0
movq %rax, %rbp
movq %r15, %rdi
callq 0xe608
movb (%rbp), %al
movb 0x110(%rsp), %cl
movb %cl, (%rbp)
movb %al, 0x110(%rsp)
movq 0x8(%rbp), %rax
movq 0x118(%rsp), %rcx
movq %rcx, 0x8(%rbp)
movq %rax, 0x118(%rsp)
movq %rbp, %rdi
callq 0xe608
movq %r15, %rdi
callq 0xe0e0
movb $0x0, 0x100(%rsp)
movq $0x0, 0x108(%rsp)
leaq 0x100(%rsp), %r15
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x103bc
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
leaq 0xdb29(%rip), %rsi      # 0x217c5
callq 0xe2b0
movq %rax, %rbp
movq %r15, %rdi
callq 0xe608
movb (%rbp), %al
movb 0x100(%rsp), %cl
movb %cl, (%rbp)
movb %al, 0x100(%rsp)
movq 0x8(%rbp), %rax
movq 0x108(%rsp), %rcx
movq %rcx, 0x8(%rbp)
movq %rax, 0x108(%rsp)
movq %rbp, %rdi
callq 0xe608
movq %r15, %rdi
callq 0xe0e0
movq 0x28(%rsp), %rdi
leaq 0xda9e(%rip), %rsi      # 0x21792
callq 0xe2b0
movq %rax, %rdi
callq 0x14c10
movq %rax, %rdi
leaq 0xe20f(%rip), %rsi      # 0x21f1a
callq 0xe2b0
movq %rax, %rdi
movq %r13, %rsi
callq 0x14b08
jmp 0x13fc4
movapd %xmm1, %xmm0
xorpd 0xd9f4(%rip), %xmm0     # 0x21720
divsd 0x130(%rsp), %xmm0
callq 0x6660
movsd %xmm0, 0x98(%rsp)
callq 0x6100
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0xd9b9(%rip), %xmm0     # 0x21710
movsd 0x98(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x13fee
movupd 0x228(%rsp), %xmm0
movupd 0x238(%rsp), %xmm1
movapd %xmm0, 0x180(%rsp)
movapd %xmm1, 0x190(%rsp)
movl 0x248(%rsp), %eax
movl %eax, 0x1a0(%rsp)
leaq 0x1a8(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x15104
leaq 0x1c0(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x14e54
leaq 0x1d8(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x14f2a
movq 0x178(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x14fca
movq %r13, %rdi
movq 0x58(%rsp), %rsi
callq 0xf382
movapd 0x60(%rsp), %xmm0
addsd 0x300(%rsp), %xmm0
movapd %xmm0, 0x60(%rsp)
incl %r15d
movq %r13, %rdi
callq 0xe608
movb 0x218(%rsp), %al
movb 0x30(%rsp), %cl
movb %cl, 0x218(%rsp)
movb %al, 0x30(%rsp)
movq 0x220(%rsp), %rax
movq 0x38(%rsp), %rcx
movq %rcx, 0x220(%rsp)
movq %rax, 0x38(%rsp)
movq 0x170(%rsp), %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe0e0
cmpb $0x1, 0x31(%rbx)
jne 0x13fdd
movl %r15d, %r14d
leaq 0x180(%rsp), %rdi
callq 0xa8c0
movq %r13, %rdi
movq %rax, %rsi
callq 0xf382
movb $0x4, 0xf0(%rsp)
movq $0x1, 0xf8(%rsp)
leaq 0xf0(%rsp), %r15
movq %r15, %rdi
callq 0xe608
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
leaq 0xd8fd(%rip), %rsi      # 0x217ba
callq 0xe2b0
movq %rax, %rbp
movq %r15, %rdi
callq 0xe608
movb (%rbp), %al
movb 0xf0(%rsp), %cl
movb %cl, (%rbp)
movb %al, 0xf0(%rsp)
movq 0x8(%rbp), %rax
movq 0xf8(%rsp), %rcx
movq %rcx, 0x8(%rbp)
movq %rax, 0xf8(%rsp)
movq %rbp, %rdi
callq 0xe608
movq %r15, %rdi
callq 0xe0e0
movb $0x0, 0xe0(%rsp)
movq $0x0, 0xe8(%rsp)
leaq 0xe0(%rsp), %r15
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x103bc
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
leaq 0xd880(%rip), %rsi      # 0x217c5
callq 0xe2b0
movq %rax, %rbp
movq %r15, %rdi
callq 0xe608
movb (%rbp), %al
movb 0xe0(%rsp), %cl
movb %cl, (%rbp)
movb %al, 0xe0(%rsp)
movq 0x8(%rbp), %rax
movq 0xe8(%rsp), %rcx
movq %rcx, 0x8(%rbp)
movq %rax, 0xe8(%rsp)
movq %rbp, %rdi
callq 0xe608
movq %r15, %rdi
callq 0xe0e0
movq 0x28(%rsp), %rdi
leaq 0xd7f5(%rip), %rsi      # 0x21792
callq 0xe2b0
movq %rax, %rdi
callq 0x14c10
movq %rax, %rdi
leaq 0xdf66(%rip), %rsi      # 0x21f1a
callq 0xe2b0
movq %rax, %rdi
movq %r13, %rsi
callq 0x14b08
movq %r13, %rdi
callq 0xe0e0
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
jmp 0x14158
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
jmp 0x1415b
cmpb $0x1, 0x31(%rbx)
jne 0x1415b
movl %r15d, %r14d
leaq 0x228(%rsp), %rdi
callq 0xa8c0
movq %r13, %rdi
movq %rax, %rsi
callq 0xf382
movq $0x0, 0xd8(%rsp)
movb $0x4, 0xd0(%rsp)
leaq 0xd0(%rsp), %r15
movq %r15, %rdi
callq 0xe608
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
leaq 0xd771(%rip), %rsi      # 0x217ba
callq 0xe2b0
movq %rax, %rbp
movq %r15, %rdi
callq 0xe608
movb (%rbp), %al
movb 0xd0(%rsp), %cl
movb %cl, (%rbp)
movb %al, 0xd0(%rsp)
movq 0x8(%rbp), %rax
movq 0xd8(%rsp), %rcx
movq %rcx, 0x8(%rbp)
movq %rax, 0xd8(%rsp)
movq %rbp, %rdi
callq 0xe608
movq %r15, %rdi
callq 0xe0e0
movb $0x0, 0xc0(%rsp)
movq $0x0, 0xc8(%rsp)
leaq 0xc0(%rsp), %r15
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x103bc
movq %r15, %rdi
callq 0xe608
movq %r13, %rdi
leaq 0xd6f4(%rip), %rsi      # 0x217c5
callq 0xe2b0
movq %rax, %rbp
movq %r15, %rdi
callq 0xe608
movb (%rbp), %al
movb 0xc0(%rsp), %cl
movb %cl, (%rbp)
movb %al, 0xc0(%rsp)
movq 0x8(%rbp), %rax
movq 0xc8(%rsp), %rcx
movq %rcx, 0x8(%rbp)
movq %rax, 0xc8(%rsp)
movq %rbp, %rdi
callq 0xe608
movq %r15, %rdi
callq 0xe0e0
movq 0x28(%rsp), %rdi
leaq 0xd669(%rip), %rsi      # 0x21792
callq 0xe2b0
movq %rax, %rdi
callq 0x14c10
movq %rax, %rdi
leaq 0xddda(%rip), %rsi      # 0x21f1a
callq 0xe2b0
movq %rax, %rdi
movq %r13, %rsi
callq 0x14b08
movq %r13, %rdi
callq 0xe0e0
movl %r14d, %r15d
movq 0x58(%rsp), %rdi
callq 0xe0e0
movq 0x2a8(%rsp), %rdi
testq %rdi, %rdi
je 0x14182
movq 0x2b8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x280(%rsp), %rdi
testq %rdi, %rdi
je 0x141c7
movq 0x2a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
xorl %eax, %eax
movq %rax, 0x280(%rsp)
movl %eax, 0x288(%rsp)
movq %rax, 0x290(%rsp)
movl %eax, 0x298(%rsp)
movq %rax, 0x2a0(%rsp)
movq 0x268(%rsp), %rdi
testq %rdi, %rdi
je 0x141e4
movq 0x278(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x250(%rsp), %rdi
testq %rdi, %rdi
je 0x14201
movq 0x260(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
decl %r12d
jne 0x138f1
jmp 0x1421d
movapd %xmm0, 0x60(%rsp)
movl $0x0, 0x14(%rsp)
xorl %r15d, %r15d
movq 0x160(%rsp), %rax
leal 0x1(%rax), %r14d
cmpb $0x0, 0x30(%rbx)
movl 0x24(%rsp), %r12d
je 0x1452e
movl $0x11, %edx
movq 0x18d5c(%rip), %rdi     # 0x2cfa0
leaq 0xd57f(%rip), %rsi      # 0x217ca
callq 0x63f0
movq 0x18d49(%rip), %rdi     # 0x2cfa0
movl %r14d, %esi
callq 0x6620
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %rbp, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movl $0x11, %edx
movq 0x18d0b(%rip), %rdi     # 0x2cfa0
leaq 0xd540(%rip), %rsi      # 0x217dc
callq 0x63f0
movq 0x18cf8(%rip), %rdi     # 0x2cfa0
movapd 0x130(%rsp), %xmm0
callq 0x6580
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %rbp, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movl $0x16, %edx
movq 0x18cb4(%rip), %rdi     # 0x2cfa0
leaq 0xd5b0(%rip), %rsi      # 0x218a3
callq 0x63f0
movq 0x18ca1(%rip), %rdi     # 0x2cfa0
movapd 0x60(%rsp), %xmm0
callq 0x6580
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %rbp, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movl $0x1d, %edx
movq 0x18c60(%rip), %rdi     # 0x2cfa0
leaq 0xd4a7(%rip), %rsi      # 0x217ee
callq 0x63f0
movq 0x18c4d(%rip), %rdi     # 0x2cfa0
movl %r15d, %esi
callq 0x6620
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %rbp, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movl $0x1d, %edx
movq 0x18c0f(%rip), %rdi     # 0x2cfa0
leaq 0xd474(%rip), %rsi      # 0x2180c
callq 0x63f0
movq 0x18bfc(%rip), %rdi     # 0x2cfa0
movl 0x14(%rsp), %esi
callq 0x6620
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %rbp, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movl $0x17, %edx
movq 0x18bbd(%rip), %rdi     # 0x2cfa0
leaq 0xd440(%rip), %rsi      # 0x2182a
callq 0x63f0
movq 0x18baa(%rip), %rdi     # 0x2cfa0
movl %r12d, %esi
callq 0x6620
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %rbp, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movl $0x14, %edx
movq 0x18b6c(%rip), %rdi     # 0x2cfa0
leaq 0xd407(%rip), %rsi      # 0x21842
callq 0x63f0
movq 0x18b59(%rip), %rdi     # 0x2cfa0
movsd 0xa0(%rsp), %xmm0
callq 0x6580
movq %rax, %rbp
movl $0x10, %edx
movq %rax, %rdi
leaq 0xd3f0(%rip), %rsi      # 0x21857
callq 0x63f0
movq %rbp, %rdi
movsd 0xa8(%rsp), %xmm0
callq 0x6580
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %rbp, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movl $0xf, %edx
movq 0x18aed(%rip), %rdi     # 0x2cfa0
leaq 0xd3ae(%rip), %rsi      # 0x21868
callq 0x63f0
movq 0x88(%rsp), %rdi
callq 0xa8de
movq 0x18acd(%rip), %rdi     # 0x2cfa0
callq 0x6580
movq %rax, %rbp
movl $0x12, %edx
movq %rax, %rdi
leaq 0xd38e(%rip), %rsi      # 0x21878
callq 0x63f0
movq 0x88(%rsp), %rdi
callq 0xa8ea
movq %rbp, %rdi
callq 0x6580
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %rbp, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
divsd 0x80(%rsp), %xmm1
movsd 0xd1d1(%rip), %xmm0     # 0x21718
movsd %xmm1, 0x8(%rsp)
ucomisd %xmm1, %xmm0
ja 0x1469c
movapd 0x60(%rsp), %xmm1
divsd 0x80(%rsp), %xmm1
andpd 0xd1c2(%rip), %xmm1     # 0x21730
movq 0x160(%rsp), %rcx
leal 0x2(%rcx), %eax
mulsd 0x70(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
divsd 0xd15a(%rip), %xmm0     # 0x216f0
movapd %xmm0, 0x130(%rsp)
cmpl $0x6, %ecx
jb 0x145ad
movapd %xmm1, 0x130(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x14(%rsp), %xmm0
divsd 0x80(%rsp), %xmm0
movsd 0x50(%rsp), %xmm1
mulsd %xmm0, %xmm1
addsd 0x150(%rsp), %xmm1
movsd %xmm1, 0xa0(%rsp)
mulsd 0x78(%rsp), %xmm0
addsd 0x158(%rsp), %xmm0
movsd %xmm0, 0xa8(%rsp)
cmpb $0x1, 0x31(%rbx)
jne 0x1469c
movq 0x28(%rsp), %rdi
leaq 0xd189(%rip), %rsi      # 0x21792
callq 0xe2b0
movq %rax, %rdi
callq 0x14c10
movq %rax, %r15
movslq 0x14(%rsp), %rax
movb $0x5, 0xb0(%rsp)
movq %rax, 0xb8(%rsp)
leaq 0xb0(%rsp), %rbp
movq %rbp, %rdi
callq 0xe608
movq %rbp, %rdi
callq 0xe608
movq %r15, %rdi
leaq 0xd23b(%rip), %rsi      # 0x2188b
callq 0xe2b0
movq %rax, %r15
movq %rbp, %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 %rbp, %rdi
callq 0xe0e0
movsd 0xd074(%rip), %xmm0     # 0x21718
ucomisd 0x8(%rsp), %xmm0
jbe 0x13755
leaq 0x218(%rsp), %rbx
movq %rbx, %rdi
callq 0xe0e0
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x146d9
movq 0x210(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x1d8(%rsp), %rdi
testq %rdi, %rdi
je 0x1471e
movq 0x1f8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
xorl %eax, %eax
movq %rax, 0x1d8(%rsp)
movl %eax, 0x1e0(%rsp)
movq %rax, 0x1e8(%rsp)
movl %eax, 0x1f0(%rsp)
movq %rax, 0x1f8(%rsp)
movq 0x1c0(%rsp), %rdi
testq %rdi, %rdi
je 0x1473b
movq 0x1d0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x1a8(%rsp), %rdi
testq %rdi, %rdi
je 0x14758
movq 0x1b8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
addq $0x398, %rsp            # imm = 0x398
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x328(%rsp), %rdi
callq 0xe0e0
jmp 0x1499d
movq %rax, %rbx
leaq 0x338(%rsp), %rdi
callq 0xe0e0
jmp 0x147a4
movq %rax, %rbx
leaq 0x318(%rsp), %rdi
jmp 0x148f9
movq %rax, %rbx
movl $0x30, %r15d
leaq (%rsp,%r15), %rdi
addq $0x180, %rdi            # imm = 0x180
callq 0xe0e0
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x147aa
xorl %ebp, %ebp
jmp 0x147ce
movq %rax, %rbx
movb $0x1, %bpl
movl $0x10, %r15d
leaq (%rsp,%r15), %rdi
addq $0x348, %rdi            # imm = 0x348
callq 0xe0e0
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x147d4
jmp 0x147f8
jmp 0x147f2
movq %rax, %rbx
movb $0x1, %bpl
movl $0x10, %r15d
leaq (%rsp,%r15), %rdi
addq $0x368, %rdi            # imm = 0x368
callq 0xe0e0
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x147fe
jmp 0x14822
jmp 0x1481c
movq %rax, %rbx
movb $0x1, %bpl
movl $0x10, %r15d
leaq (%rsp,%r15), %rdi
addq $0x30, %rdi
callq 0xe0e0
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x14828
jmp 0x14849
jmp 0x14843
movq %rax, %rbx
movb $0x1, %bpl
movl $0x10, %r15d
leaq (%rsp,%r15), %rdi
addq $0x228, %rdi            # imm = 0x228
callq 0xe0e0
addq $-0x10, %r15
cmpq $-0x10, %r15
jne 0x1484f
leaq 0x180(%rsp), %r15
cmpq %r14, %r15
setne %al
testb %bpl, %bpl
je 0x1499d
testb %al, %al
je 0x1499d
addq $-0x10, %r14
movq %r14, %rdi
callq 0xe0e0
cmpq %r15, %r14
jne 0x14888
jmp 0x1499d
movq %rax, %rbx
leaq 0x180(%rsp), %r14
movb $0x1, %bpl
jmp 0x14869
jmp 0x14975
jmp 0x14975
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
jmp 0x148f9
jmp 0x14975
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
jmp 0x148e2
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0xe0e0
jmp 0x148f1
jmp 0x14975
movq %rax, %rbx
leaq 0x228(%rsp), %rdi
callq 0xe0e0
jmp 0x14990
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
jmp 0x14953
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
jmp 0x14953
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
jmp 0x14953
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
jmp 0x14953
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
jmp 0x14953
jmp 0x14980
jmp 0x14980
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0xe0e0
jmp 0x14965
jmp 0x14980
jmp 0x14980
jmp 0x14962
jmp 0x14962
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xe0e0
jmp 0x14983
jmp 0x14980
jmp 0x14975
movq %rax, %rbx
jmp 0x14990
jmp 0x14980
jmp 0x14980
jmp 0x14980
movq %rax, %rbx
leaq 0x228(%rsp), %rdi
callq 0x14a9e
leaq 0x180(%rsp), %rdi
callq 0x14a9e
movq %rbx, %rdi
callq 0x6640
nop