// File: /workspace/github_cpp_makefile_star2_O1/harry830622[P]floorplanner/src/floorplanner.cpp
// Function: Floorplanner::Run()
void Floorplanner::Run() {
  if (sa_mode_ == "classical") {
    int nth_sa = 0;
    do {
      ++nth_sa;
      if (is_verbose_) {
        cout << nth_sa << " th SA" << endl;
      }

      SA();
    } while (best_floorplan_.area() == 0.0);
  } else if (sa_mode_ == "fast") {
    int nth_fsa = 0;
    do {
      ++nth_fsa;
      if (is_verbose_) {
        cout << nth_fsa << " th Fast SA" << endl;
      }

      FastSA();
    } while (best_floorplan_.area() == 0.0);
  } else if (sa_mode_ == "both") {
    Floorplan initial_floorplan(best_floorplan_);

    int nth_sa = 0;
    do {
      ++nth_sa;
      if (is_verbose_) {
        cout << nth_sa << " th SA" << endl;
      }

      SA();
    } while (best_floorplan_.area() == 0.0);
    Floorplan floorplan_sa(best_floorplan_);

    best_floorplan_ = initial_floorplan;
    int nth_fsa = 0;
    do {
      ++nth_fsa;
      if (is_verbose_) {
        cout << nth_fsa << " th Fast SA" << endl;
      }

      FastSA();
    } while (best_floorplan_.area() == 0.0);
    Floorplan floorplan_fsa(best_floorplan_);

    const double beta = 1.0 - alpha_;
    if (ComputeCost(floorplan_sa, alpha_, beta) <
        ComputeCost(floorplan_fsa, alpha_, beta)) {
      best_floorplan_ = floorplan_sa;
    } else {
      best_floorplan_ = floorplan_fsa;
    }
  } else if (sa_mode_ == "fast-5") {
    const int num_fsa = 5;

    Floorplan initial_floorplan(best_floorplan_);
    Floorplan best_floorplan(initial_floorplan);
    int nth_fsa = 0;
    for (int i = 0; i < num_fsa; ++i) {
      ++nth_fsa;

      if (is_verbose_) {
        cout << nth_fsa << " th Fast SA" << endl;
      }

      FastSA();

      if (best_floorplan_.area() != 0.0) {
        const double beta = 1.0 - alpha_;
        if (best_floorplan.area() == 0.0 ||
            ComputeCost(best_floorplan_, alpha_, beta) <
                ComputeCost(best_floorplan, alpha_, beta)) {
          best_floorplan = best_floorplan_;
        }
      }

      best_floorplan_ = initial_floorplan;
    }

    best_floorplan_ = best_floorplan;

    while (best_floorplan_.area() == 0.0) {
      ++nth_fsa;

      if (is_verbose_) {
        cout << nth_fsa << " th Fast SA" << endl;
      }

      FastSA();
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
leaq 0x10933(%rip), %rsi     # 0x21740
movq %r14, %rdi
callq 0x6120
testl %eax, %eax
je 0x112cb
leaq 0x1092d(%rip), %rsi     # 0x21751
movq %r14, %rdi
callq 0x6120
testl %eax, %eax
je 0x11354
leaq 0x10927(%rip), %rsi     # 0x21762
movq %r14, %rdi
callq 0x6120
testl %eax, %eax
je 0x113dd
leaq 0x110aa(%rip), %rsi     # 0x21efc
movq %r14, %rdi
callq 0x6120
testl %eax, %eax
jne 0x11a36
leaq 0x70(%rbx), %r14
leaq 0x108(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x149a6
leaq 0x40(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x149a6
movl $0x98, %eax
leaq (%rbx,%rax), %r15
leaq 0xb0(%rbx), %rcx
movq %rcx, 0x20(%rsp)
leaq 0xc8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
movl $0x80, %edx
leaq (%r13,%rdx), %rcx
movq %rcx, 0x100(%rsp)
leaq 0xf0(%rbx), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x108(%rbx), %rcx
movq %rcx, 0x8(%rsp)
leaq (%rax,%r13), %rcx
movq %rcx, 0xf8(%rsp)
addq %r12, %rdx
movq %rdx, 0x38(%rsp)
addq %rax, %r12
movq %r12, 0x30(%rsp)
movl $0x1, %r12d
leaq 0x1c0(%rsp), %r13
cmpb $0x1, 0x30(%rbx)
jne 0x10f52
movq 0x1c095(%rip), %rdi     # 0x2cfa0
movl %r12d, %esi
callq 0x6620
movq %rax, %rbp
movl $0xb, %edx
movq %rax, %rdi
leaq 0x10831(%rip), %rsi     # 0x21756
callq 0x63f0
movq (%rbp), %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
movq %rbx, %rdi
callq 0x13136
movq %r14, %rdi
callq 0xa8de
ucomisd 0x1077e(%rip), %xmm0    # 0x216e8
jne 0x10f72
jnp 0x110a9
movsd 0x1075e(%rip), %xmm0    # 0x216d8
subsd 0x8(%rbx), %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x40(%rsp), %rdi
callq 0xa8de
ucomisd 0x10751(%rip), %xmm0    # 0x216e8
jne 0x10f9b
jnp 0x10fe1
movsd 0x8(%rbx), %xmm0
movq %rbx, %rdi
movq %r14, %rsi
movsd 0x28(%rsp), %xmm1
callq 0x10c68
movsd %xmm0, 0xf0(%rsp)
movsd 0x8(%rbx), %xmm0
movq %rbx, %rdi
leaq 0x40(%rsp), %rsi
movsd 0x28(%rsp), %xmm1
callq 0x10c68
ucomisd 0xf0(%rsp), %xmm0
jbe 0x110a9
movupd (%r14), %xmm0
movups 0x10(%r14), %xmm1
movapd %xmm0, 0x40(%rsp)
movaps %xmm1, 0x50(%rsp)
movl 0x90(%rbx), %eax
movl %eax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
callq 0x15104
leaq 0x80(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x14e54
leaq 0x98(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x14f2a
movq 0x100(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x14fca
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0xf382
movq %r13, %rdi
callq 0xe608
movb 0xd8(%rsp), %al
movb 0x1c0(%rsp), %cl
movb %cl, 0xd8(%rsp)
movb %al, 0x1c0(%rsp)
movq 0xe0(%rsp), %rax
movq 0x1c8(%rsp), %rcx
movq %rcx, 0xe0(%rsp)
movq %rax, 0x1c8(%rsp)
movq 0xf8(%rsp), %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe0e0
movupd 0x108(%rsp), %xmm0
movupd 0x118(%rsp), %xmm1
movupd %xmm1, 0x10(%r14)
movupd %xmm0, (%r14)
movl 0x128(%rsp), %eax
movl %eax, 0x90(%rbx)
movq %r15, %rdi
leaq 0x130(%rsp), %rsi
callq 0x15104
movq 0x20(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x14e54
movq 0x18(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x14f2a
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x14fca
movq %r13, %rdi
movq 0x30(%rsp), %rsi
callq 0xf382
movq %r13, %rdi
callq 0xe608
movb 0x108(%rbx), %al
movb 0x1c0(%rsp), %cl
movb %cl, 0x108(%rbx)
movb %al, 0x1c0(%rsp)
movq 0x110(%rbx), %rax
movq 0x1c8(%rsp), %rcx
movq %rcx, 0x110(%rbx)
movq %rax, 0x1c8(%rsp)
movq 0x8(%rsp), %rdi
callq 0xe608
movq %r13, %rdi
callq 0xe0e0
incl %r12d
cmpl $0x6, %r12d
jne 0x10efe
leaq 0x68(%rsp), %rsi
movapd -0x28(%rsi), %xmm0
movapd -0x18(%rsi), %xmm1
movupd %xmm1, 0x10(%r14)
movupd %xmm0, (%r14)
movl -0x8(%rsi), %eax
movl %eax, 0x90(%rbx)
leaq 0x98(%rbx), %rdi
callq 0x15104
leaq 0x80(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x14e54
leaq 0x98(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x14f2a
leaq 0xc0(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x14fca
leaq 0xd8(%rsp), %rsi
leaq 0x1c0(%rsp), %rdi
callq 0xf382
leaq 0x1c0(%rsp), %r15
movq %r15, %rdi
callq 0xe608
movb 0x108(%rbx), %al
movb (%r15), %cl
movb %cl, 0x108(%rbx)
movb %al, (%r15)
movq 0x110(%rbx), %rax
movq 0x8(%r15), %rcx
movq %rcx, 0x110(%rbx)
movq %rax, 0x8(%r15)
movq 0x8(%rsp), %rdi
callq 0xe608
movq %r15, %rdi
callq 0xe0e0
movl $0x6, %ebp
movq 0x1bd4e(%rip), %r12     # 0x2cfa0
leaq 0x104fd(%rip), %r13     # 0x21756
movq %r14, %rdi
callq 0xa8de
ucomisd 0x1047f(%rip), %xmm0    # 0x216e8
jne 0x116c2
jp 0x116c2
cmpb $0x1, 0x30(%rbx)
jne 0x112bf
movq %r12, %rdi
movl %ebp, %esi
callq 0x6620
movq %rax, %r15
movl $0xb, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x63f0
movq (%r15), %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
incl %ebp
movq %rbx, %rdi
callq 0x13136
jmp 0x11259
leaq 0x70(%rbx), %r14
movl $0x1, %ebp
movq 0x1bcc5(%rip), %r15     # 0x2cfa0
leaq 0x10468(%rip), %r12     # 0x2174a
cmpb $0x1, 0x30(%rbx)
jne 0x1132d
movq %r15, %rdi
movl %ebp, %esi
callq 0x6620
movq %rax, %r13
movl $0x6, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x63f0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %r13, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movq %rbx, %rdi
callq 0x11a92
movq %r14, %rdi
callq 0xa8de
incl %ebp
ucomisd 0x103a1(%rip), %xmm0    # 0x216e8
jne 0x11a36
jnp 0x112e2
jmp 0x11a36
leaq 0x70(%rbx), %r14
movl $0x1, %ebp
movq 0x1bc3c(%rip), %r15     # 0x2cfa0
leaq 0x103eb(%rip), %r12     # 0x21756
cmpb $0x1, 0x30(%rbx)
jne 0x113b6
movq %r15, %rdi
movl %ebp, %esi
callq 0x6620
movq %rax, %r13
movl $0xb, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x63f0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %r13, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movq %rbx, %rdi
callq 0x13136
movq %r14, %rdi
callq 0xa8de
incl %ebp
ucomisd 0x10318(%rip), %xmm0    # 0x216e8
jne 0x11a36
jnp 0x1136b
jmp 0x11a36
leaq 0x70(%rbx), %r15
leaq 0x108(%rsp), %rdi
movq %r15, %rsi
callq 0x149a6
movl $0x1, %ebp
movq 0x1bba3(%rip), %r14     # 0x2cfa0
leaq 0x10346(%rip), %r12     # 0x2174a
cmpb $0x1, 0x30(%rbx)
jne 0x1144f
movq %r14, %rdi
movl %ebp, %esi
callq 0x6620
movq %rax, %r13
movl $0x6, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x63f0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %r13, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movq %rbx, %rdi
callq 0x11a92
movq %r15, %rdi
callq 0xa8de
incl %ebp
ucomisd 0x1027f(%rip), %xmm0    # 0x216e8
jne 0x1146d
jnp 0x11404
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x149a6
leaq 0x130(%rsp), %rsi
movupd -0x28(%rsi), %xmm0
movupd -0x18(%rsi), %xmm1
movupd %xmm1, 0x10(%r15)
movupd %xmm0, (%r15)
movl -0x8(%rsi), %eax
movl %eax, 0x90(%rbx)
leaq 0x98(%rbx), %rdi
movq %rdi, 0x20(%rsp)
callq 0x15104
leaq 0xb0(%rbx), %rdi
leaq 0x148(%rsp), %rsi
movq %rdi, 0x18(%rsp)
callq 0x14e54
leaq 0xc8(%rbx), %rdi
leaq 0x160(%rsp), %rsi
movq %rdi, 0x10(%rsp)
callq 0x14f2a
leaq 0xf0(%rbx), %rdi
leaq 0x188(%rsp), %rsi
movq %rdi, 0x8(%rsp)
callq 0x14fca
leaq 0x1a0(%rsp), %rsi
leaq 0x1c0(%rsp), %rdi
callq 0xf382
leaq 0x108(%rbx), %r12
leaq 0x1c0(%rsp), %r14
movq %r14, %rdi
callq 0xe608
movb 0x108(%rbx), %al
movb (%r14), %cl
movb %cl, 0x108(%rbx)
movb %al, (%r14)
movq 0x110(%rbx), %rax
movq 0x8(%r14), %rcx
movq %rcx, 0x110(%rbx)
movq %rax, 0x8(%r14)
movq %r12, 0x28(%rsp)
movq %r12, %rdi
callq 0xe608
movq %r14, %rdi
callq 0xe0e0
movl $0x1, %r13d
movq 0x1ba2e(%rip), %rbp     # 0x2cfa0
leaq 0x101dd(%rip), %r14     # 0x21756
cmpb $0x1, 0x30(%rbx)
jne 0x115c5
movq %rbp, %rdi
movl %r13d, %esi
callq 0x6620
movq %rax, %r12
movl $0xb, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x63f0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %r12, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movq %rbx, %rdi
callq 0x13136
movq %r15, %rdi
callq 0xa8de
incl %r13d
ucomisd 0x10108(%rip), %xmm0    # 0x216e8
jne 0x115e4
jnp 0x11579
leaq 0x1c0(%rsp), %rdi
movq %r15, %rsi
callq 0x149a6
movsd 0x8(%rbx), %xmm0
movsd 0x100d7(%rip), %xmm1    # 0x216d8
subsd %xmm0, %xmm1
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
movsd %xmm1, 0x38(%rsp)
callq 0x10c68
movsd %xmm0, 0x30(%rsp)
movsd 0x8(%rbx), %xmm0
leaq 0x1c0(%rsp), %rsi
movq %rbx, %rdi
movsd 0x38(%rsp), %xmm1
callq 0x10c68
ucomisd 0x30(%rsp), %xmm0
jbe 0x1177e
leaq 0x68(%rsp), %rsi
movupd -0x28(%rsi), %xmm0
movupd -0x18(%rsi), %xmm1
movupd %xmm1, 0x10(%r15)
movupd %xmm0, (%r15)
movl -0x8(%rsi), %eax
movl %eax, 0x90(%rbx)
movq 0x20(%rsp), %rdi
callq 0x15104
leaq 0x80(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x14e54
leaq 0x98(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x14f2a
leaq 0xc0(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x14fca
leaq 0xd8(%rsp), %rsi
leaq 0x1b0(%rsp), %rdi
callq 0xf382
jmp 0x117f9
leaq 0xd8(%rsp), %rdi
callq 0xe0e0
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x116ec
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x11731
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
xorl %eax, %eax
movq %rax, 0x98(%rsp)
movl %eax, 0xa0(%rsp)
movq %rax, 0xa8(%rsp)
movl %eax, 0xb0(%rsp)
movq %rax, 0xb8(%rsp)
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x1174e
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x11765
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
leaq 0x1a0(%rsp), %rbx
movq %rbx, %rdi
callq 0xe0e0
movq -0x18(%rbx), %rdi
jmp 0x119a2
leaq 0x1e8(%rsp), %rsi
movupd -0x28(%rsi), %xmm0
movupd -0x18(%rsi), %xmm1
movupd %xmm1, 0x10(%r15)
movupd %xmm0, (%r15)
movl -0x8(%rsi), %eax
movl %eax, 0x90(%rbx)
movq 0x20(%rsp), %rdi
callq 0x15104
leaq 0x200(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x14e54
leaq 0x218(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x14f2a
leaq 0x240(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x14fca
leaq 0x258(%rsp), %rsi
leaq 0x1b0(%rsp), %rdi
callq 0xf382
leaq 0x1b0(%rsp), %r14
movq %r14, %rdi
callq 0xe608
movb 0x108(%rbx), %al
movb (%r14), %cl
movb %cl, 0x108(%rbx)
movb %al, (%r14)
movq 0x110(%rbx), %rax
movq 0x8(%r14), %rcx
movq %rcx, 0x110(%rbx)
movq %rax, 0x8(%r14)
movq 0x28(%rsp), %rdi
callq 0xe608
movq %r14, %rdi
callq 0xe0e0
leaq 0x258(%rsp), %rbx
movq %rbx, %rdi
callq 0xe0e0
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x1186c
movq 0x250(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x218(%rsp), %rdi
testq %rdi, %rdi
je 0x118b1
movq 0x238(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
xorl %eax, %eax
movq %rax, 0x218(%rsp)
movl %eax, 0x220(%rsp)
movq %rax, 0x228(%rsp)
movl %eax, 0x230(%rsp)
movq %rax, 0x238(%rsp)
movq 0x200(%rsp), %rdi
testq %rdi, %rdi
je 0x118ce
movq 0x210(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x1e8(%rsp), %rdi
testq %rdi, %rdi
je 0x118eb
movq 0x1f8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
leaq 0xd8(%rsp), %rbx
movq %rbx, %rdi
callq 0xe0e0
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x11914
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x11959
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
xorl %eax, %eax
movq %rax, 0x98(%rsp)
movl %eax, 0xa0(%rsp)
movq %rax, 0xa8(%rsp)
movl %eax, 0xb0(%rsp)
movq %rax, 0xb8(%rsp)
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x11976
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x1198d
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
leaq 0x1a0(%rsp), %rdi
callq 0xe0e0
movq 0x188(%rsp), %rdi
testq %rdi, %rdi
je 0x119b7
movq 0x198(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x160(%rsp), %rdi
testq %rdi, %rdi
je 0x119fc
movq 0x180(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
xorl %eax, %eax
movq %rax, 0x160(%rsp)
movl %eax, 0x168(%rsp)
movq %rax, 0x170(%rsp)
movl %eax, 0x178(%rsp)
movq %rax, 0x180(%rsp)
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x11a19
movq 0x158(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x11a36
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11a6a
jmp 0x11a6f
jmp 0x11a6a
jmp 0x11a6f
jmp 0x11a6f
movq %rax, %rbx
leaq 0x1c0(%rsp), %rdi
callq 0x14a9e
jmp 0x11a72
jmp 0x11a6f
jmp 0x11a6f
jmp 0x11a6f
movq %rax, %rbx
jmp 0x11a7c
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x14a9e
leaq 0x108(%rsp), %rdi
callq 0x14a9e
movq %rbx, %rdi
callq 0x6640
nop