// File: /workspace/github_cpp_makefile_star2_O3/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 0x10a29(%rip), %rsi     # 0x21810
movq %r14, %rdi
callq 0x6120
testl %eax, %eax
je 0x11291
leaq 0x10a23(%rip), %rsi     # 0x21821
movq %r14, %rdi
callq 0x6120
testl %eax, %eax
je 0x1131a
leaq 0x10a1d(%rip), %rsi     # 0x21832
movq %r14, %rdi
callq 0x6120
testl %eax, %eax
je 0x113a3
leaq 0x111a0(%rip), %rsi     # 0x21fcc
movq %r14, %rdi
callq 0x6120
testl %eax, %eax
jne 0x119f3
leaq 0x70(%rbx), %r15
leaq 0x108(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x148ec
leaq 0x50(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x148ec
movl $0x98, %eax
leaq (%rbx,%rax), %r13
leaq 0xb0(%rbx), %rcx
movq %rcx, 0x20(%rsp)
leaq 0xc8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
movl $0x80, %edx
leaq (%r12,%rdx), %rcx
movq %rcx, 0x48(%rsp)
leaq 0xf0(%rbx), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x108(%rbx), %rcx
movq %rcx, 0x8(%rsp)
leaq (%r12,%rax), %rcx
movq %rcx, 0x38(%rsp)
addq %r14, %rdx
movq %rdx, 0x40(%rsp)
addq %rax, %r14
movq %r14, 0x30(%rsp)
movl $0x1, %r12d
leaq 0x1c0(%rsp), %rbp
cmpb $0x1, 0x30(%rbx)
jne 0x10f24
movq 0x1c0c2(%rip), %rdi     # 0x2cfa0
movl %r12d, %esi
callq 0x6620
movq %rax, %r14
movl $0xb, %edx
movq %rax, %rdi
leaq 0x1092e(%rip), %rsi     # 0x21826
callq 0x63f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x6370
movsbl %al, %esi
movq %r14, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x6270
movq %rbx, %rdi
callq 0x130aa
movq %r15, %rdi
callq 0xaf74
ucomisd 0x10864(%rip), %xmm0    # 0x217a0
jne 0x10f44
jnp 0x11075
movsd 0x10844(%rip), %xmm0    # 0x21790
subsd 0x8(%rbx), %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xaf74
ucomisd 0x10837(%rip), %xmm0    # 0x217a0
jne 0x10f6d
jnp 0x10fb3
movsd 0x8(%rbx), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movsd 0x28(%rsp), %xmm1
callq 0x10c42
movsd %xmm0, 0x100(%rsp)
movsd 0x8(%rbx), %xmm0
movq %rbx, %rdi
leaq 0x50(%rsp), %rsi
movsd 0x28(%rsp), %xmm1
callq 0x10c42
ucomisd 0x100(%rsp), %xmm0
jbe 0x11075
movupd (%r15), %xmm0
movups 0x10(%r15), %xmm1
movapd %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movl 0x90(%rbx), %eax
movl %eax, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0x150a0
leaq 0x90(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x14dbe
leaq 0xa8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x14ea2
movq 0x48(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x14f5c
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0xf35c
movq %rbp, %rdi
callq 0xe5c8
movb 0xe8(%rsp), %al
movb 0x1c0(%rsp), %cl
movb %cl, 0xe8(%rsp)
movb %al, 0x1c0(%rsp)
movq 0xf0(%rsp), %rax
movq 0x1c8(%rsp), %rcx
movq %rcx, 0xf0(%rsp)
movq %rax, 0x1c8(%rsp)
movq 0x38(%rsp), %rdi
callq 0xe5c8
movq %rbp, %rdi
callq 0xe0aa
movupd 0x108(%rsp), %xmm0
movupd 0x118(%rsp), %xmm1
movupd %xmm1, 0x10(%r15)
movupd %xmm0, (%r15)
movl 0x128(%rsp), %eax
movl %eax, 0x90(%rbx)
movq %r13, %rdi
leaq 0x130(%rsp), %rsi
callq 0x150a0
movq 0x20(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x14dbe
movq 0x18(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x14ea2
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x14f5c
movq %rbp, %rdi
movq 0x30(%rsp), %rsi
callq 0xf35c
movq %rbp, %rdi
callq 0xe5c8
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 0xe5c8
movq %rbp, %rdi
callq 0xe0aa
incl %r12d
cmpl $0x6, %r12d
jne 0x10ed1
movapd 0x50(%rsp), %xmm0
movapd 0x60(%rsp), %xmm1
movupd %xmm1, 0x10(%r15)
movupd %xmm0, (%r15)
movl 0x70(%rsp), %eax
movl %eax, 0x90(%rbx)
movq %r13, %rdi
leaq 0x78(%rsp), %rsi
callq 0x150a0
movq 0x20(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x14dbe
movq 0x18(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x14ea2
movq 0x10(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x14f5c
leaq 0x1c0(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xf35c
leaq 0x1c0(%rsp), %r14
movq %r14, %rdi
callq 0xe5c8
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 0x8(%rsp), %rdi
callq 0xe5c8
movq %r14, %rdi
callq 0xe0aa
movl $0x6, %ebp
movq 0x1bd89(%rip), %r14     # 0x2cfa0
leaq 0x10608(%rip), %r12     # 0x21826
movq %r15, %rdi
callq 0xaf74
ucomisd 0x10572(%rip), %xmm0    # 0x217a0
jne 0x11688
jp 0x11688
cmpb $0x1, 0x30(%rbx)
jne 0x11285
movq %r14, %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
incl %ebp
movq %rbx, %rdi
callq 0x130aa
jmp 0x1121e
leaq 0x70(%rbx), %r14
movl $0x1, %ebp
movq 0x1bcff(%rip), %r15     # 0x2cfa0
leaq 0x10572(%rip), %r12     # 0x2181a
cmpb $0x1, 0x30(%rbx)
jne 0x112f3
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 0x11a4e
movq %r14, %rdi
callq 0xaf74
incl %ebp
ucomisd 0x10493(%rip), %xmm0    # 0x217a0
jne 0x119f3
jnp 0x112a8
jmp 0x119f3
leaq 0x70(%rbx), %r14
movl $0x1, %ebp
movq 0x1bc76(%rip), %r15     # 0x2cfa0
leaq 0x104f5(%rip), %r12     # 0x21826
cmpb $0x1, 0x30(%rbx)
jne 0x1137c
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 0x130aa
movq %r14, %rdi
callq 0xaf74
incl %ebp
ucomisd 0x1040a(%rip), %xmm0    # 0x217a0
jne 0x119f3
jnp 0x11331
jmp 0x119f3
leaq 0x70(%rbx), %r15
leaq 0x108(%rsp), %rdi
movq %r15, %rsi
callq 0x148ec
movl $0x1, %ebp
movq 0x1bbdd(%rip), %r14     # 0x2cfa0
leaq 0x10450(%rip), %r12     # 0x2181a
cmpb $0x1, 0x30(%rbx)
jne 0x11415
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 0x11a4e
movq %r15, %rdi
callq 0xaf74
incl %ebp
ucomisd 0x10371(%rip), %xmm0    # 0x217a0
jne 0x11433
jnp 0x113ca
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x148ec
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 0x150a0
leaq 0xb0(%rbx), %rdi
leaq 0x148(%rsp), %rsi
movq %rdi, 0x18(%rsp)
callq 0x14dbe
leaq 0xc8(%rbx), %rdi
leaq 0x160(%rsp), %rsi
movq %rdi, 0x10(%rsp)
callq 0x14ea2
leaq 0xf0(%rbx), %rdi
leaq 0x188(%rsp), %rsi
movq %rdi, 0x8(%rsp)
callq 0x14f5c
leaq 0x1a0(%rsp), %rsi
leaq 0x1c0(%rsp), %rdi
callq 0xf35c
leaq 0x108(%rbx), %r12
leaq 0x1c0(%rsp), %r14
movq %r14, %rdi
callq 0xe5c8
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 0xe5c8
movq %r14, %rdi
callq 0xe0aa
movl $0x1, %r13d
movq 0x1ba68(%rip), %rbp     # 0x2cfa0
leaq 0x102e7(%rip), %r14     # 0x21826
cmpb $0x1, 0x30(%rbx)
jne 0x1158b
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 0x130aa
movq %r15, %rdi
callq 0xaf74
incl %r13d
ucomisd 0x101fa(%rip), %xmm0    # 0x217a0
jne 0x115aa
jnp 0x1153f
leaq 0x1c0(%rsp), %rdi
movq %r15, %rsi
callq 0x148ec
movsd 0x8(%rbx), %xmm0
movsd 0x101c9(%rip), %xmm1    # 0x21790
subsd %xmm0, %xmm1
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
movsd %xmm1, 0x30(%rsp)
callq 0x10c42
movsd %xmm0, 0x40(%rsp)
movsd 0x8(%rbx), %xmm0
leaq 0x1c0(%rsp), %rsi
movq %rbx, %rdi
movsd 0x30(%rsp), %xmm1
callq 0x10c42
ucomisd 0x40(%rsp), %xmm0
jbe 0x11738
leaq 0x78(%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 0x150a0
leaq 0x90(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x14dbe
leaq 0xa8(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x14ea2
leaq 0xd0(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x14f5c
leaq 0xe8(%rsp), %rsi
leaq 0x1b0(%rsp), %rdi
callq 0xf35c
jmp 0x117b3
movq 0x38(%rsp), %rdi
callq 0xe0aa
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x116af
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
movq 0x30(%rsp), %rbx
je 0x116f9
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
xorl %eax, %eax
movq %rax, 0xa8(%rsp)
movl %eax, 0xb0(%rsp)
movq %rax, 0xb8(%rsp)
movl %eax, 0xc0(%rsp)
movq %rax, 0xc8(%rsp)
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x11716
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x11730
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq %rbx, %rdi
jmp 0x11952
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 0x150a0
leaq 0x200(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x14dbe
leaq 0x218(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x14ea2
leaq 0x240(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x14f5c
leaq 0x258(%rsp), %rsi
leaq 0x1b0(%rsp), %rdi
callq 0xf35c
leaq 0x1b0(%rsp), %r14
movq %r14, %rdi
callq 0xe5c8
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 0xe5c8
movq %r14, %rdi
callq 0xe0aa
leaq 0x258(%rsp), %rbx
movq %rbx, %rdi
callq 0xe0aa
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x11826
movq 0x250(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x218(%rsp), %rdi
testq %rdi, %rdi
je 0x1186b
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 0x11888
movq 0x210(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x1e8(%rsp), %rdi
testq %rdi, %rdi
je 0x118a5
movq 0x1f8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
callq 0xe0aa
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x118ce
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x11913
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
xorl %eax, %eax
movq %rax, 0xa8(%rsp)
movl %eax, 0xb0(%rsp)
movq %rax, 0xb8(%rsp)
movl %eax, 0xc0(%rsp)
movq %rax, 0xc8(%rsp)
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x11930
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x1194a
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
leaq 0x1a0(%rsp), %rdi
callq 0xe0aa
movq 0x188(%rsp), %rdi
testq %rdi, %rdi
je 0x11974
movq 0x198(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x160(%rsp), %rdi
testq %rdi, %rdi
je 0x119b9
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 0x119d6
movq 0x158(%rsp), %rsi
subq %rdi, %rsi
callq 0x6390
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x119f3
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 0x11a27
jmp 0x11a2c
jmp 0x11a27
jmp 0x11a2c
jmp 0x11a2c
movq %rax, %rbx
leaq 0x1c0(%rsp), %rdi
callq 0x149e4
jmp 0x11a2f
jmp 0x11a2c
jmp 0x11a2c
jmp 0x11a2c
movq %rax, %rbx
jmp 0x11a39
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x149e4
leaq 0x108(%rsp), %rdi
callq 0x149e4
movq %rbx, %rdi
callq 0x6640