// File: harry830622[P]floorplanner/src/floorplan.cpp
// Function: Floorplan::Perturb(Database const&)
void Floorplan::Perturb(const Database& database) {
  const int num_nodes = b_star_tree_.num_nodes();
  const int num_macros = num_nodes;
  const int op = rand() % 3;
  switch (op) {
    case 0: {
      const int macro_id = [&]() {
        int id = rand() % num_macros;
        while (!database.macro(id).is_rotatable()) {
          id = rand() % num_macros;
        }
        return id;
      }();
      is_macro_rotated_by_id_.at(macro_id) =
          !is_macro_rotated_by_id_.at(macro_id);

      if (is_drawing_) {
        const string& macro_name = database.macro(macro_id).name();
        drawing_["perturbation"] = {{"type", "rotation"},
                                    {"macro", macro_name}};
      }

      break;
    }
    case 1: {
      const int node_a_id = rand() % num_nodes;
      const int node_b_id = [&]() {
        int node_id = rand() % num_nodes;
        while (node_id == node_a_id) {
          node_id = rand() % num_nodes;
        }
        return node_id;
      }();
      int& node_a_macro_id = macro_id_by_node_id_.at(node_a_id);
      int& node_b_macro_id = macro_id_by_node_id_.at(node_b_id);
      swap(node_a_macro_id, node_b_macro_id);

      if (is_drawing_) {
        const string& macro_a_name = database.macro(node_a_macro_id).name();
        const string& macro_b_name = database.macro(node_b_macro_id).name();
        drawing_["perturbation"] = {{"type", "swap"},
                                    {"macroA", macro_a_name},
                                    {"macroB", macro_b_name}};
      }

      break;
    }
    case 2: {
      const int node_a_id = rand() % num_nodes;
      const int node_b_id = [&]() {
        int node_id = rand() % num_nodes;
        while (node_id == node_a_id) {
          node_id = rand() % num_nodes;
        }
        return node_id;
      }();
      auto inserted_positions = make_pair(rand(), rand());
      b_star_tree_.DeleteAndInsert(node_a_id, node_b_id, inserted_positions);

      if (is_drawing_) {
        const int node_a_macro_id = macro_id_by_node_id_.at(node_a_id);
        const int node_b_macro_id = macro_id_by_node_id_.at(node_b_id);
        const string& macro_a_name = database.macro(node_a_macro_id).name();
        const string& macro_b_name = database.macro(node_b_macro_id).name();
        drawing_["perturbation"] = {{"type", "deleteAndInsert"},
                                    {"deletedMacro", macro_a_name},
                                    {"targetMacro", macro_b_name}};
      }

      break;
    }
    default:
      break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x6d0, %rsp            # imm = 0x6D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x3c0(%rbp)
addq $0x20, %rdi
callq 0xa670
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
callq 0x9150
movslq %eax, %rcx
imulq $0x55555556, %rcx, %rdx # imm = 0x55555556
movq %rdx, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rdx
addl %ecx, %edx
movl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x3b8(%rbp)
testl %eax, %eax
je 0x168ba
jmp 0x16895
movl -0x3b8(%rbp), %eax
subl $0x1, %eax
je 0x16e31
jmp 0x168a6
movl -0x3b8(%rbp), %eax
subl $0x2, %eax
je 0x17595
jmp 0x17d40
leaq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x17d60
movq -0x3c0(%rbp), %rdi
movl %eax, -0x20(%rbp)
addq $0x58, %rdi
movslq -0x20(%rbp), %rsi
callq 0x1bef0
movq %rax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x1bf40
movq -0x3c0(%rbp), %rdi
xorb $-0x1, %al
movb %al, -0x3c1(%rbp)
addq $0x58, %rdi
movslq -0x20(%rbp), %rsi
callq 0x1bef0
movq %rax, %rcx
movb -0x3c1(%rbp), %al
movq %rcx, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
movzbl %al, %esi
andl $0x1, %esi
leaq -0x50(%rbp), %rdi
callq 0x1bf70
movq -0x3c0(%rbp), %rax
testb $0x1, (%rax)
je 0x16e2c
movq -0x10(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0xde50
movq %rax, %rdi
callq 0x30ec0
movq %rax, -0x58(%rbp)
movb $0x1, -0x121(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0xd0(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
leaq 0x33997(%rip), %rsi     # 0x4a320
callq 0x1bfc0
jmp 0x16990
leaq -0xc0(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
leaq 0x33980(%rip), %rsi     # 0x4a325
callq 0x1c010
jmp 0x169ac
leaq -0xd0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq $0x2, -0xa8(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
leaq -0x98(%rbp), %rdi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x1c180
jmp 0x169ec
leaq -0x88(%rbp), %rax
movq %rax, -0x3d0(%rbp)
movq %rax, -0xa0(%rbp)
leaq -0x118(%rbp), %rdi
movq %rdi, -0x120(%rbp)
leaq 0x33918(%rip), %rsi     # 0x4a32e
callq 0x1c2f0
jmp 0x16a1d
leaq -0x108(%rbp), %rdi
movq %rdi, -0x120(%rbp)
movq -0x58(%rbp), %rsi
callq 0x1c340
jmp 0x16a36
movq -0x3d0(%rbp), %rdi
leaq -0x118(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq $0x2, -0xf0(%rbp)
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdx
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x1c180
jmp 0x16a76
movb $0x0, -0x121(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0x78(%rbp)
movq $0x2, -0x70(%rbp)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
leaq -0x68(%rbp), %rdi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x1c180
jmp 0x16aae
movq -0x3c0(%rbp), %rdi
addq $0x98, %rdi
leaq 0x33871(%rip), %rsi     # 0x4a334
callq 0x1c390
movq %rax, -0x3d8(%rbp)
jmp 0x16ad1
movq -0x3d8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x1c590
leaq -0x68(%rbp), %rdi
callq 0x1c060
leaq -0x98(%rbp), %rax
movq %rax, -0x3e8(%rbp)
addq $0x20, %rax
movq %rax, -0x3e0(%rbp)
movq -0x3e0(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x1c060
movq -0x3e8(%rbp), %rcx
movq -0x3f0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x3e0(%rbp)
jne 0x16b03
leaq -0x118(%rbp), %rax
movq %rax, -0x400(%rbp)
addq $0x20, %rax
movq %rax, -0x3f8(%rbp)
movq -0x3f8(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x408(%rbp)
callq 0x1c060
movq -0x400(%rbp), %rcx
movq -0x408(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x3f8(%rbp)
jne 0x16b4d
leaq -0xd0(%rbp), %rax
movq %rax, -0x418(%rbp)
addq $0x20, %rax
movq %rax, -0x410(%rbp)
movq -0x410(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x420(%rbp)
callq 0x1c060
movq -0x418(%rbp), %rcx
movq -0x420(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x410(%rbp)
jne 0x16b97
jmp 0x16e2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
movq -0xd8(%rbp), %rax
leaq -0xd0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x428(%rbp)
je 0x16c2a
movq -0x428(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x430(%rbp)
callq 0x1c060
movq -0x430(%rbp), %rax
leaq -0xd0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x428(%rbp)
jne 0x16bf9
jmp 0x16dcf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x16d83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
movq -0x120(%rbp), %rax
leaq -0x118(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x438(%rbp)
je 0x16ca3
movq -0x438(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x440(%rbp)
callq 0x1c060
movq -0x440(%rbp), %rax
leaq -0x118(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x438(%rbp)
jne 0x16c72
jmp 0x16d83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x16d37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x16ceb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x1c060
leaq -0x98(%rbp), %rax
movq %rax, -0x450(%rbp)
addq $0x20, %rax
movq %rax, -0x448(%rbp)
movq -0x448(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x458(%rbp)
callq 0x1c060
movq -0x450(%rbp), %rcx
movq -0x458(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x448(%rbp)
jne 0x16d04
jmp 0x16d37
leaq -0x118(%rbp), %rax
movq %rax, -0x468(%rbp)
addq $0x20, %rax
movq %rax, -0x460(%rbp)
movq -0x460(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x470(%rbp)
callq 0x1c060
movq -0x468(%rbp), %rcx
movq -0x470(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x460(%rbp)
jne 0x16d50
jmp 0x16d83
leaq -0xd0(%rbp), %rax
movq %rax, -0x480(%rbp)
addq $0x20, %rax
movq %rax, -0x478(%rbp)
movq -0x478(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x488(%rbp)
callq 0x1c060
movq -0x480(%rbp), %rcx
movq -0x488(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x478(%rbp)
jne 0x16d9c
jmp 0x16dcf
testb $0x1, -0x121(%rbp)
jne 0x16dda
jmp 0x16e27
movq -0xa0(%rbp), %rax
leaq -0x98(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x490(%rbp)
je 0x16e25
movq -0x490(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x498(%rbp)
callq 0x1c060
movq -0x498(%rbp), %rax
leaq -0x98(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x490(%rbp)
jne 0x16df4
jmp 0x16e27
jmp 0x17d4b
jmp 0x17d42
callq 0x9150
cltd
idivl -0x14(%rbp)
movl %edx, -0x128(%rbp)
leaq -0x14(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0x128(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x17dd0
movq -0x3c0(%rbp), %rdi
movl %eax, -0x12c(%rbp)
addq $0x40, %rdi
movslq -0x128(%rbp), %rsi
callq 0x1c600
movq -0x3c0(%rbp), %rdi
movq %rax, -0x148(%rbp)
addq $0x40, %rdi
movslq -0x12c(%rbp), %rsi
callq 0x1c600
movq %rax, -0x150(%rbp)
movq -0x148(%rbp), %rdi
movq -0x150(%rbp), %rsi
callq 0x1c640
movq -0x3c0(%rbp), %rax
testb $0x1, (%rax)
je 0x17590
movq -0x10(%rbp), %rdi
movq -0x148(%rbp), %rax
movl (%rax), %esi
callq 0xde50
movq %rax, %rdi
callq 0x30ec0
movq %rax, -0x158(%rbp)
movq -0x10(%rbp), %rdi
movq -0x150(%rbp), %rax
movl (%rax), %esi
callq 0xde50
movq %rax, %rdi
callq 0x30ec0
movq %rax, -0x160(%rbp)
movb $0x1, -0x261(%rbp)
leaq -0x1b0(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x1e8(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
leaq 0x333ea(%rip), %rsi     # 0x4a320
callq 0x1bfc0
jmp 0x16f3d
leaq -0x1d8(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
leaq 0x333ef(%rip), %rsi     # 0x4a341
callq 0x1bfc0
jmp 0x16f59
leaq -0x1e8(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq $0x2, -0x1c0(%rbp)
movq -0x1c8(%rbp), %rsi
movq -0x1c0(%rbp), %rdx
leaq -0x1b0(%rbp), %rdi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x1c180
jmp 0x16f99
leaq -0x1a0(%rbp), %rax
movq %rax, -0x4a0(%rbp)
movq %rax, -0x1b8(%rbp)
leaq -0x220(%rbp), %rdi
movq %rdi, -0x228(%rbp)
leaq 0x33383(%rip), %rsi     # 0x4a346
callq 0x1c670
jmp 0x16fca
leaq -0x210(%rbp), %rdi
movq %rdi, -0x228(%rbp)
movq -0x158(%rbp), %rsi
callq 0x1c340
jmp 0x16fe6
movq -0x4a0(%rbp), %rdi
leaq -0x220(%rbp), %rax
movq %rax, -0x200(%rbp)
movq $0x2, -0x1f8(%rbp)
movq -0x200(%rbp), %rsi
movq -0x1f8(%rbp), %rdx
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x1c180
jmp 0x17026
leaq -0x190(%rbp), %rax
movq %rax, -0x4a8(%rbp)
movq %rax, -0x1b8(%rbp)
leaq -0x258(%rbp), %rdi
movq %rdi, -0x260(%rbp)
leaq 0x332fd(%rip), %rsi     # 0x4a34d
callq 0x1c670
jmp 0x17057
leaq -0x248(%rbp), %rdi
movq %rdi, -0x260(%rbp)
movq -0x160(%rbp), %rsi
callq 0x1c340
jmp 0x17073
movq -0x4a8(%rbp), %rdi
leaq -0x258(%rbp), %rax
movq %rax, -0x238(%rbp)
movq $0x2, -0x230(%rbp)
movq -0x238(%rbp), %rsi
movq -0x230(%rbp), %rdx
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x1c180
jmp 0x170b3
movb $0x0, -0x261(%rbp)
leaq -0x1b0(%rbp), %rax
movq %rax, -0x180(%rbp)
movq $0x3, -0x178(%rbp)
movq -0x180(%rbp), %rsi
movq -0x178(%rbp), %rdx
leaq -0x170(%rbp), %rdi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x1c180
jmp 0x170fa
movq -0x3c0(%rbp), %rdi
addq $0x98, %rdi
leaq 0x33225(%rip), %rsi     # 0x4a334
callq 0x1c390
movq %rax, -0x4b0(%rbp)
jmp 0x1711d
movq -0x4b0(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x1c590
leaq -0x170(%rbp), %rdi
callq 0x1c060
leaq -0x1b0(%rbp), %rax
movq %rax, -0x4c0(%rbp)
addq $0x30, %rax
movq %rax, -0x4b8(%rbp)
movq -0x4b8(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x4c8(%rbp)
callq 0x1c060
movq -0x4c0(%rbp), %rcx
movq -0x4c8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x4b8(%rbp)
jne 0x17155
leaq -0x258(%rbp), %rax
movq %rax, -0x4d8(%rbp)
addq $0x20, %rax
movq %rax, -0x4d0(%rbp)
movq -0x4d0(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x4e0(%rbp)
callq 0x1c060
movq -0x4d8(%rbp), %rcx
movq -0x4e0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x4d0(%rbp)
jne 0x1719f
leaq -0x220(%rbp), %rax
movq %rax, -0x4f0(%rbp)
addq $0x20, %rax
movq %rax, -0x4e8(%rbp)
movq -0x4e8(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x4f8(%rbp)
callq 0x1c060
movq -0x4f0(%rbp), %rcx
movq -0x4f8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x4e8(%rbp)
jne 0x171e9
leaq -0x1e8(%rbp), %rax
movq %rax, -0x508(%rbp)
addq $0x20, %rax
movq %rax, -0x500(%rbp)
movq -0x500(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x510(%rbp)
callq 0x1c060
movq -0x508(%rbp), %rcx
movq -0x510(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x500(%rbp)
jne 0x17233
jmp 0x17590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
movq -0x1f0(%rbp), %rax
leaq -0x1e8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x518(%rbp)
je 0x172c6
movq -0x518(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x520(%rbp)
callq 0x1c060
movq -0x520(%rbp), %rax
leaq -0x1e8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x518(%rbp)
jne 0x17295
jmp 0x17533
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x174e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
movq -0x228(%rbp), %rax
leaq -0x220(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x528(%rbp)
je 0x1733f
movq -0x528(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x530(%rbp)
callq 0x1c060
movq -0x530(%rbp), %rax
leaq -0x220(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x528(%rbp)
jne 0x1730e
jmp 0x174e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1749b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
movq -0x260(%rbp), %rax
leaq -0x258(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x538(%rbp)
je 0x173b8
movq -0x538(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x540(%rbp)
callq 0x1c060
movq -0x540(%rbp), %rax
leaq -0x258(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x538(%rbp)
jne 0x17387
jmp 0x1749b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x1744f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x17403
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x1c060
leaq -0x1b0(%rbp), %rax
movq %rax, -0x550(%rbp)
addq $0x30, %rax
movq %rax, -0x548(%rbp)
movq -0x548(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x558(%rbp)
callq 0x1c060
movq -0x550(%rbp), %rcx
movq -0x558(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x548(%rbp)
jne 0x1741c
jmp 0x1744f
leaq -0x258(%rbp), %rax
movq %rax, -0x568(%rbp)
addq $0x20, %rax
movq %rax, -0x560(%rbp)
movq -0x560(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x570(%rbp)
callq 0x1c060
movq -0x568(%rbp), %rcx
movq -0x570(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x560(%rbp)
jne 0x17468
jmp 0x1749b
leaq -0x220(%rbp), %rax
movq %rax, -0x580(%rbp)
addq $0x20, %rax
movq %rax, -0x578(%rbp)
movq -0x578(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x588(%rbp)
callq 0x1c060
movq -0x580(%rbp), %rcx
movq -0x588(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x578(%rbp)
jne 0x174b4
jmp 0x174e7
leaq -0x1e8(%rbp), %rax
movq %rax, -0x598(%rbp)
addq $0x20, %rax
movq %rax, -0x590(%rbp)
movq -0x590(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x5a0(%rbp)
callq 0x1c060
movq -0x598(%rbp), %rcx
movq -0x5a0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x590(%rbp)
jne 0x17500
jmp 0x17533
testb $0x1, -0x261(%rbp)
jne 0x1753e
jmp 0x1758b
movq -0x1b8(%rbp), %rax
leaq -0x1b0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x5a8(%rbp)
je 0x17589
movq -0x5a8(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x5b0(%rbp)
callq 0x1c060
movq -0x5b0(%rbp), %rax
leaq -0x1b0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x5a8(%rbp)
jne 0x17558
jmp 0x1758b
jmp 0x17d4b
jmp 0x17d42
callq 0x9150
cltd
idivl -0x14(%rbp)
movl %edx, -0x268(%rbp)
leaq -0x14(%rbp), %rax
movq %rax, -0x280(%rbp)
leaq -0x268(%rbp), %rax
movq %rax, -0x278(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x17e30
movl %eax, -0x26c(%rbp)
callq 0x9150
movl %eax, -0x28c(%rbp)
callq 0x9150
movl %eax, -0x290(%rbp)
leaq -0x28c(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x1c6c0
movq -0x3c0(%rbp), %rdi
movq %rax, -0x288(%rbp)
addq $0x20, %rdi
movl -0x268(%rbp), %esi
movl -0x26c(%rbp), %edx
movq -0x288(%rbp), %rax
movq %rax, -0x298(%rbp)
movq -0x298(%rbp), %rcx
callq 0xa860
movq -0x3c0(%rbp), %rax
testb $0x1, (%rax)
je 0x17d3e
movq -0x3c0(%rbp), %rdi
addq $0x40, %rdi
movq %rdi, -0x5b8(%rbp)
movslq -0x268(%rbp), %rsi
callq 0x1c600
movq -0x5b8(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x29c(%rbp)
movslq -0x26c(%rbp), %rsi
callq 0x1c600
movl (%rax), %eax
movl %eax, -0x2a0(%rbp)
movq -0x10(%rbp), %rdi
movl -0x29c(%rbp), %esi
callq 0xde50
movq %rax, %rdi
callq 0x30ec0
movq %rax, -0x2a8(%rbp)
movq -0x10(%rbp), %rdi
movl -0x2a0(%rbp), %esi
callq 0xde50
movq %rax, %rdi
callq 0x30ec0
movq %rax, -0x2b0(%rbp)
movb $0x1, -0x3b1(%rbp)
leaq -0x300(%rbp), %rax
movq %rax, -0x308(%rbp)
leaq -0x338(%rbp), %rdi
movq %rdi, -0x340(%rbp)
leaq 0x32c39(%rip), %rsi     # 0x4a320
callq 0x1bfc0
jmp 0x176ee
leaq -0x328(%rbp), %rdi
movq %rdi, -0x340(%rbp)
leaq 0x32c51(%rip), %rsi     # 0x4a354
callq 0x1c6f0
jmp 0x1770a
leaq -0x338(%rbp), %rax
movq %rax, -0x318(%rbp)
movq $0x2, -0x310(%rbp)
movq -0x318(%rbp), %rsi
movq -0x310(%rbp), %rdx
leaq -0x300(%rbp), %rdi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x1c180
jmp 0x1774a
leaq -0x2f0(%rbp), %rax
movq %rax, -0x5c0(%rbp)
movq %rax, -0x308(%rbp)
leaq -0x370(%rbp), %rdi
movq %rdi, -0x378(%rbp)
leaq 0x32bf0(%rip), %rsi     # 0x4a364
callq 0x1c740
jmp 0x1777b
leaq -0x360(%rbp), %rdi
movq %rdi, -0x378(%rbp)
movq -0x2a8(%rbp), %rsi
callq 0x1c340
jmp 0x17797
movq -0x5c0(%rbp), %rdi
leaq -0x370(%rbp), %rax
movq %rax, -0x350(%rbp)
movq $0x2, -0x348(%rbp)
movq -0x350(%rbp), %rsi
movq -0x348(%rbp), %rdx
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x1c180
jmp 0x177d7
leaq -0x2e0(%rbp), %rax
movq %rax, -0x5c8(%rbp)
movq %rax, -0x308(%rbp)
leaq -0x3a8(%rbp), %rdi
movq %rdi, -0x3b0(%rbp)
leaq 0x32b70(%rip), %rsi     # 0x4a371
callq 0x1c790
jmp 0x17808
leaq -0x398(%rbp), %rdi
movq %rdi, -0x3b0(%rbp)
movq -0x2b0(%rbp), %rsi
callq 0x1c340
jmp 0x17824
movq -0x5c8(%rbp), %rdi
leaq -0x3a8(%rbp), %rax
movq %rax, -0x388(%rbp)
movq $0x2, -0x380(%rbp)
movq -0x388(%rbp), %rsi
movq -0x380(%rbp), %rdx
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x1c180
jmp 0x17864
movb $0x0, -0x3b1(%rbp)
leaq -0x300(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq $0x3, -0x2c8(%rbp)
movq -0x2d0(%rbp), %rsi
movq -0x2c8(%rbp), %rdx
leaq -0x2c0(%rbp), %rdi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x1c180
jmp 0x178ab
movq -0x3c0(%rbp), %rdi
addq $0x98, %rdi
leaq 0x32a74(%rip), %rsi     # 0x4a334
callq 0x1c390
movq %rax, -0x5d0(%rbp)
jmp 0x178ce
movq -0x5d0(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x1c590
leaq -0x2c0(%rbp), %rdi
callq 0x1c060
leaq -0x300(%rbp), %rax
movq %rax, -0x5e0(%rbp)
addq $0x30, %rax
movq %rax, -0x5d8(%rbp)
movq -0x5d8(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x5e8(%rbp)
callq 0x1c060
movq -0x5e0(%rbp), %rcx
movq -0x5e8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x5d8(%rbp)
jne 0x17906
leaq -0x3a8(%rbp), %rax
movq %rax, -0x5f8(%rbp)
addq $0x20, %rax
movq %rax, -0x5f0(%rbp)
movq -0x5f0(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x600(%rbp)
callq 0x1c060
movq -0x5f8(%rbp), %rcx
movq -0x600(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x5f0(%rbp)
jne 0x17950
leaq -0x370(%rbp), %rax
movq %rax, -0x610(%rbp)
addq $0x20, %rax
movq %rax, -0x608(%rbp)
movq -0x608(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x618(%rbp)
callq 0x1c060
movq -0x610(%rbp), %rcx
movq -0x618(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x608(%rbp)
jne 0x1799a
leaq -0x338(%rbp), %rax
movq %rax, -0x628(%rbp)
addq $0x20, %rax
movq %rax, -0x620(%rbp)
movq -0x620(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x630(%rbp)
callq 0x1c060
movq -0x628(%rbp), %rcx
movq -0x630(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x620(%rbp)
jne 0x179e4
jmp 0x17d3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
movq -0x340(%rbp), %rax
leaq -0x338(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x638(%rbp)
je 0x17a77
movq -0x638(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x640(%rbp)
callq 0x1c060
movq -0x640(%rbp), %rax
leaq -0x338(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x638(%rbp)
jne 0x17a46
jmp 0x17ce4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x17c98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
movq -0x378(%rbp), %rax
leaq -0x370(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x648(%rbp)
je 0x17af0
movq -0x648(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x650(%rbp)
callq 0x1c060
movq -0x650(%rbp), %rax
leaq -0x370(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x648(%rbp)
jne 0x17abf
jmp 0x17c98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x17c4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
movq -0x3b0(%rbp), %rax
leaq -0x3a8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x658(%rbp)
je 0x17b69
movq -0x658(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x660(%rbp)
callq 0x1c060
movq -0x660(%rbp), %rax
leaq -0x3a8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x658(%rbp)
jne 0x17b38
jmp 0x17c4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x17c00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x17bb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x1c060
leaq -0x300(%rbp), %rax
movq %rax, -0x670(%rbp)
addq $0x30, %rax
movq %rax, -0x668(%rbp)
movq -0x668(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x678(%rbp)
callq 0x1c060
movq -0x670(%rbp), %rcx
movq -0x678(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x668(%rbp)
jne 0x17bcd
jmp 0x17c00
leaq -0x3a8(%rbp), %rax
movq %rax, -0x688(%rbp)
addq $0x20, %rax
movq %rax, -0x680(%rbp)
movq -0x680(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x690(%rbp)
callq 0x1c060
movq -0x688(%rbp), %rcx
movq -0x690(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x680(%rbp)
jne 0x17c19
jmp 0x17c4c
leaq -0x370(%rbp), %rax
movq %rax, -0x6a0(%rbp)
addq $0x20, %rax
movq %rax, -0x698(%rbp)
movq -0x698(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x6a8(%rbp)
callq 0x1c060
movq -0x6a0(%rbp), %rcx
movq -0x6a8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x698(%rbp)
jne 0x17c65
jmp 0x17c98
leaq -0x338(%rbp), %rax
movq %rax, -0x6b8(%rbp)
addq $0x20, %rax
movq %rax, -0x6b0(%rbp)
movq -0x6b0(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x6c0(%rbp)
callq 0x1c060
movq -0x6b8(%rbp), %rcx
movq -0x6c0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x6b0(%rbp)
jne 0x17cb1
jmp 0x17ce4
testb $0x1, -0x3b1(%rbp)
jne 0x17cef
jmp 0x17d3c
movq -0x308(%rbp), %rax
leaq -0x300(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x6c8(%rbp)
je 0x17d3a
movq -0x6c8(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x6d0(%rbp)
callq 0x1c060
movq -0x6d0(%rbp), %rax
leaq -0x300(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x6c8(%rbp)
jne 0x17d09
jmp 0x17d3c
jmp 0x17d4b
jmp 0x17d42
jmp 0x17d42
addq $0x6d0, %rsp            # imm = 0x6D0
popq %rbp
retq
movq -0xe0(%rbp), %rdi
callq 0x98f0
nopw (%rax,%rax)