// File: /workspace/github_cpp_makefile_star2_O2/temelmertcan[P]multgen/src/pp_gen.cpp
// Function: create_br2pp(int, int, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>**&, int&, int&, std::__cxx11::list<int, std::allocator<int>>&, bool, std::queue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::deque<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void create_br2pp (int m, int n, bool signed_mul,
                   string**& pp_matrix,
                   int& pp_dim1,
                   int& pp_dim2,
                   std::list<int>& extra_ones_indices,
		   bool allowXes,
                   std::queue<string>& verilog){

  // m multiplier size,
  // n multiplicand size,

  if (signed_mul) {
    verilog.push ("wire [" + to_string(m-1) + ":0] mult = IN1;");
    verilog.push ("wire [" + to_string(n-1) + ":0] mcand = IN2;");
  } else {
    verilog.push ("wire [" + to_string(m) + ":0] mult = {1'b0, IN1};");
    verilog.push ("wire [" + to_string(n) + ":0] mcand = {1'b0, IN2};");
    m++;
    n++;
  }

  int pp_msb = n-1;
  pp_dim1 = m+2; // number of rows
  int size_to_fit_all_pp = pp_msb + m;
  pp_dim2 = max(n+m, size_to_fit_all_pp); // number of columns

  pp_matrix = new string*[pp_dim1];
  // make sure it starts empty.
  for (int i = 0; i < pp_dim1; i++){
    pp_matrix[i] = new string[pp_dim2];
    for (int j = 0; j < pp_dim2; j++)
      pp_matrix[i][j] = "";
  }

  /////
  // verilog.push ("wire [" + to_string(pp_msb) + ":0] mcand_1x;");
  // verilog.push ("assign mcand_1x = {{"+to_string(pp_msb - n + 1)+"{mcand["+ to_string(n-1) +"]}},  mcand};");

  /////

  for (int i = 0; i < m; i++){
    verilog.push ("");
    string m0 = (i == 0 ? "1'b0" : "mult[" + to_string(i-1) + "]");
    string m1 = "mult[" + to_string(i) + "]";

    verilog.push ("// Booth Radix-2 Partial Products. Multiplier selectors: " + m1 + " " + m0);

    string select_e = "select_e_" + to_string(i);
    string select_ne = "select_ne_" + to_string(i);
    string cmp = "tcomp" + to_string(i);

    verilog.push ( "wire logic " + select_e
                   + ", " + cmp
                   + ", " + select_ne
                   + ";");

    verilog.push ("assign " + select_e +
                  " = ~" + m1 + " & " + m0 + ";");// +
    //" | ((~ " + m2 + ") & (~ " + m0 + ") & " + m1 + ");");

    verilog.push ("assign " + select_ne +
                  " = " + m1 + " & ~" + m0 + ";");// +

    //////
    string cur_pp = "pp_" + to_string(i);
    verilog.push ("wire ["+ to_string(pp_msb) +":0] " + cur_pp + ";");
    verilog.push ("assign " + cur_pp + " = (1<<" + to_string(pp_msb) + ") ^ // flip the MSB ");
    verilog.push ("               ((" +  select_e   + " ? mcand : 0) | ");
    verilog.push ("                (" +  select_ne  + " ? (~ mcand) : 0)); " );

    verilog.push ("assign " + cmp + " = " + select_ne + ";");

  }

  for (int i = 0; i < pp_dim1-2; i++){
    pp_matrix[i] = new string[pp_dim2];
    for (int j = 0; j < i; j++){
      pp_matrix[i][j] = "";
    }
    for (int j = 0; j <= pp_msb && j+i < pp_dim2 ; j++){
      string cur;
      cur = "pp_" + to_string(i) + "[" + to_string(j) + "]";
      pp_matrix[i][j+i] = cur;
    }
  }

  // add tcomps for the extra 1 needed for twos complemented partial products
  pp_matrix[pp_dim1-2] = new string[pp_dim2];
  for (int j = 0; j < m; j+=1){
    pp_matrix[pp_dim1-2][j] = "tcomp"  + to_string(j);
  }

  for (int j = pp_msb; j < size_to_fit_all_pp; j += 1){
    extra_ones_indices.push_back(j);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %r9, -0xc0(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0x38(%rbp)
movl %esi, %r15d
movl %edi, %r14d
testl %edx, %edx
je 0x1ad6c
leal -0x1(%r14), %esi
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
callq 0x11c73
leaq 0x170ac(%rip), %rsi     # 0x31d5e
leaq -0xa0(%rbp), %rdi
movq %rbx, %rdx
callq 0x11d49
leaq 0x182aa(%rip), %rdx     # 0x32f72
leaq -0x58(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x11ba1
leaq -0x58(%rbp), %rsi
movq 0x20(%rbp), %rdi
callq 0x120e4
leaq -0x58(%rbp), %rdi
callq 0x20f0
leaq -0xa0(%rbp), %rdi
callq 0x20f0
leaq -0x80(%rbp), %rdi
callq 0x20f0
leal -0x1(%r15), %esi
movq %rbx, %rdi
callq 0x11c73
leaq 0x17048(%rip), %rsi     # 0x31d5e
leaq -0xa0(%rbp), %rdi
movq %rbx, %rdx
callq 0x11d49
leaq 0x18256(%rip), %rdx     # 0x32f82
leaq -0x58(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x11ba1
leaq -0x58(%rbp), %rsi
movq 0x20(%rbp), %rdi
callq 0x120e4
leaq -0x58(%rbp), %rdi
callq 0x20f0
leaq -0xa0(%rbp), %rdi
callq 0x20f0
leaq -0x80(%rbp), %rdi
callq 0x20f0
jmp 0x1ae3c
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11c73
leaq 0x16fdc(%rip), %rsi     # 0x31d5e
leaq -0xa0(%rbp), %rdi
movq %rbx, %rdx
callq 0x11d49
leaq 0x181fb(%rip), %rdx     # 0x32f93
leaq -0x58(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x11ba1
leaq -0x58(%rbp), %rsi
movq 0x20(%rbp), %rdi
callq 0x120e4
leaq -0x58(%rbp), %rdi
callq 0x20f0
leaq -0xa0(%rbp), %rdi
callq 0x20f0
leaq -0x80(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11c73
leaq 0x16f79(%rip), %rsi     # 0x31d5e
leaq -0xa0(%rbp), %rdi
movq %rbx, %rdx
callq 0x11d49
leaq 0x181b0(%rip), %rdx     # 0x32fab
leaq -0x58(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x11ba1
leaq -0x58(%rbp), %rsi
movq 0x20(%rbp), %rdi
callq 0x120e4
leaq -0x58(%rbp), %rdi
callq 0x20f0
leaq -0xa0(%rbp), %rdi
callq 0x20f0
leaq -0x80(%rbp), %rdi
callq 0x20f0
incl %r14d
incl %r15d
leal 0x2(%r14), %eax
movq -0xb0(%rbp), %rcx
movl %eax, (%rcx)
movq %r14, -0xa8(%rbp)
movq %r15, -0xb8(%rbp)
addl %r15d, %r14d
movq -0xc0(%rbp), %rax
movl %r14d, (%rax)
movslq (%rcx), %r12
leaq (,%r12,8), %rdi
testq %r12, %r12
pushq $-0x1
popq %rax
cmovsq %rax, %rdi
callq 0x2030
movq -0x38(%rbp), %rcx
movq %rax, (%rcx)
xorl %r15d, %r15d
leaq 0x18742(%rip), %rbx     # 0x335d1
movslq %r12d, %rax
cmpq %rax, %r15
jge 0x1af33
movslq %r14d, %r13
movq %r13, %r12
shlq $0x5, %r12
leaq 0x8(%r12), %rdi
testl %r13d, %r13d
pushq $-0x1
popq %rax
cmovsq %rax, %rdi
callq 0x2030
movq %r13, (%rax)
testl %r13d, %r13d
je 0x1aedb
leaq 0x18(%rax), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rcx
addq $-0x20, %r12
jne 0x1aec5
addq $0x8, %rax
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
movq %rax, (%rcx,%r15,8)
xorl %r12d, %r12d
xorl %r13d, %r13d
movslq %r14d, %rax
cmpq %rax, %r13
jge 0x1af21
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq (%rax,%r15,8), %rdi
addq %r12, %rdi
movq %rbx, %rsi
callq 0x2350
incq %r13
movq -0xc0(%rbp), %rax
movl (%rax), %r14d
addq $0x20, %r12
jmp 0x1aef0
incq %r15
movq -0xb0(%rbp), %rax
movl (%rax), %r12d
jmp 0x1ae8f
movq -0xb8(%rbp), %rcx
leal -0x1(%rcx), %eax
movl %eax, -0x5c(%rbp)
movq -0xa8(%rbp), %rdx
leal (%rcx,%rdx), %eax
decl %eax
movl %eax, -0x124(%rbp)
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
movq %rdx, -0xa8(%rbp)
leaq -0xa0(%rbp), %r14
leaq -0x1d8(%rbp), %rbx
leaq -0x188(%rbp), %r15
movq %rax, -0x30(%rbp)
cmpl %eax, -0xa8(%rbp)
je 0x1b64b
movq %r14, %rdx
leaq -0x58(%rbp), %r13
movq %r13, %rdi
leaq 0x1863b(%rip), %rsi     # 0x335d1
callq 0x20b0
movq 0x20(%rbp), %rdi
movq %r13, %rsi
callq 0x120e4
movq %r13, %rdi
callq 0x20f0
movq -0x30(%rbp), %rax
testl %eax, %eax
je 0x1affe
leal -0x1(%rax), %esi
leaq -0x80(%rbp), %r12
movq %r12, %rdi
callq 0x11c73
movq %r14, %rdi
leaq 0x17ff9(%rip), %rsi     # 0x32fc9
movq %r12, %rdx
callq 0x11d49
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
leaq 0x16e33(%rip), %rdx     # 0x31e19
callq 0x11ba1
movq %r14, %rdi
callq 0x20f0
leaq -0x80(%rbp), %rdi
callq 0x20f0
jmp 0x1b010
movq %r13, %rdi
leaq 0x17fbc(%rip), %rsi     # 0x32fc4
movq %r14, %rdx
callq 0x20b0
leaq -0x120(%rbp), %r13
movq %r13, %rdi
movq -0x30(%rbp), %rsi
callq 0x11c73
leaq -0x80(%rbp), %r12
movq %r12, %rdi
leaq 0x17f98(%rip), %rsi     # 0x32fc9
movq %r13, %rdx
callq 0x11d49
movq %r14, %rdi
movq %r12, %rsi
leaq 0x16dd3(%rip), %rdx     # 0x31e19
callq 0x11ba1
movq %r12, %rdi
callq 0x20f0
movq %r13, %rdi
callq 0x20f0
leaq -0x1b8(%rbp), %r12
movq %r12, %rdi
leaq 0x17f63(%rip), %rsi     # 0x32fcf
movq %r14, %rdx
callq 0x11cd3
movq %r13, %rdi
movq %r12, %rsi
leaq 0x15b93(%rip), %rdx     # 0x30c14
callq 0x11ba1
leaq -0x80(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
leaq -0x58(%rbp), %rdx
callq 0x11d77
movq 0x20(%rbp), %rdi
movq %r12, %rsi
callq 0x120e4
movq %r12, %rdi
callq 0x20f0
movq %r13, %rdi
callq 0x20f0
leaq -0x1b8(%rbp), %rdi
callq 0x20f0
movq %r13, %rdi
movq -0x30(%rbp), %rsi
callq 0x11c73
movq %r12, %rdi
leaq 0x17f32(%rip), %rsi     # 0x33009
movq %r13, %rdx
callq 0x11d49
movq %r13, %rdi
callq 0x20f0
leaq -0x1b8(%rbp), %r12
movq %r12, %rdi
movq -0x30(%rbp), %rsi
callq 0x11c73
movq %r13, %rdi
leaq 0x17f0f(%rip), %rsi     # 0x33013
movq %r12, %rdx
callq 0x11d49
movq %r12, %rdi
callq 0x20f0
leaq -0x100(%rbp), %r13
movq %r13, %rdi
movq -0x30(%rbp), %rsi
callq 0x11c73
movq %r12, %rdi
leaq 0x17eed(%rip), %rsi     # 0x3301e
movq %r13, %rdx
callq 0x11d49
movq %r13, %rdi
callq 0x20f0
leaq -0x168(%rbp), %r12
movq %r12, %rdi
leaq 0x17b07(%rip), %rsi     # 0x32c59
leaq -0x80(%rbp), %rdx
callq 0x11cd3
leaq -0x148(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
leaq 0x17487(%rip), %rdx     # 0x325f6
callq 0x11ba1
leaq -0xe0(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
leaq -0x1b8(%rbp), %rdx
callq 0x11d77
movq %rbx, %rdi
movq %r12, %rsi
leaq 0x1745c(%rip), %rdx     # 0x325f6
callq 0x11ba1
movq %r15, %rdi
movq %rbx, %rsi
leaq -0x120(%rbp), %rdx
callq 0x11d77
leaq -0x100(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
leaq 0x1851c(%rip), %rdx     # 0x336e1
callq 0x11ba1
movq 0x20(%rbp), %rdi
movq %r12, %rsi
callq 0x120e4
movq %r12, %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x20f0
leaq -0xe0(%rbp), %rdi
callq 0x20f0
movq %r13, %rdi
callq 0x20f0
leaq -0x168(%rbp), %r12
movq %r12, %rdi
callq 0x20f0
movq %r12, %rdi
leaq 0x17394(%rip), %rsi     # 0x325af
leaq -0x80(%rbp), %rdx
callq 0x11cd3
movq %r13, %rdi
movq %r12, %rsi
leaq 0x17ff3(%rip), %rdx     # 0x33224
callq 0x11ba1
leaq -0xe0(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x11d77
movq %rbx, %rdi
movq %r12, %rsi
leaq 0x17f2d(%rip), %rdx     # 0x33185
callq 0x11ba1
movq %r15, %rdi
movq %rbx, %rsi
leaq -0x58(%rbp), %rdx
callq 0x11d77
leaq -0x100(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
leaq 0x18461(%rip), %rdx     # 0x336e1
callq 0x11ba1
movq 0x20(%rbp), %rdi
movq %r12, %rsi
callq 0x120e4
movq %r12, %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x20f0
leaq -0xe0(%rbp), %rdi
callq 0x20f0
movq %r13, %rdi
callq 0x20f0
leaq -0x168(%rbp), %r12
movq %r12, %rdi
callq 0x20f0
movq %r12, %rdi
leaq 0x172d9(%rip), %rsi     # 0x325af
leaq -0x120(%rbp), %rdx
callq 0x11cd3
movq %r13, %rdi
movq %r12, %rsi
leaq 0x16f64(%rip), %rdx     # 0x32253
callq 0x11ba1
leaq -0xe0(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x11d77
movq %rbx, %rdi
movq %r12, %rsi
leaq 0x17d0e(%rip), %rdx     # 0x33024
callq 0x11ba1
movq %r15, %rdi
movq %rbx, %rsi
leaq -0x58(%rbp), %rdx
callq 0x11d77
leaq -0x100(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
leaq 0x183a3(%rip), %rdx     # 0x336e1
callq 0x11ba1
movq 0x20(%rbp), %rdi
movq %r12, %rsi
callq 0x120e4
movq %r12, %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x20f0
leaq -0xe0(%rbp), %rdi
callq 0x20f0
leaq -0x148(%rbp), %rdi
callq 0x20f0
leaq -0x168(%rbp), %rdi
callq 0x20f0
movq %r15, %rdi
movq -0x30(%rbp), %rsi
callq 0x11c73
movq %r12, %rdi
leaq 0x17c88(%rip), %rsi     # 0x33029
movq %r15, %rdx
callq 0x11d49
movq %r15, %rdi
callq 0x20f0
leaq -0x168(%rbp), %r12
movq %r12, %rdi
movl -0x5c(%rbp), %esi
callq 0x11c73
movq %r13, %rdi
leaq 0x16991(%rip), %rsi     # 0x31d5e
movq %r12, %rdx
callq 0x11d49
leaq -0xe0(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
leaq 0x17206(%rip), %rdx     # 0x325ef
callq 0x11ba1
movq %rbx, %rdi
movq %r12, %rsi
leaq -0x100(%rbp), %rdx
callq 0x11d77
movq %r15, %rdi
movq %rbx, %rsi
leaq 0x182d4(%rip), %rdx     # 0x336e1
callq 0x11ba1
movq 0x20(%rbp), %rdi
movq %r15, %rsi
callq 0x120e4
movq %r15, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x20f0
leaq -0xe0(%rbp), %r13
movq %r13, %rdi
callq 0x20f0
leaq -0x148(%rbp), %r12
movq %r12, %rdi
callq 0x20f0
leaq -0x168(%rbp), %rdi
callq 0x20f0
movq %r12, %rdi
leaq 0x1714d(%rip), %rsi     # 0x325af
leaq -0x100(%rbp), %rdx
callq 0x11cd3
movq %r13, %rdi
movq %r12, %rsi
leaq 0x17bb2(%rip), %rdx     # 0x3302d
callq 0x11ba1
leaq -0x168(%rbp), %r12
movq %r12, %rdi
movl -0x5c(%rbp), %esi
callq 0x11c73
movq %rbx, %rdi
leaq -0xe0(%rbp), %rsi
movq %r12, %rdx
callq 0x11bca
movq %r15, %rdi
movq %rbx, %rsi
leaq 0x17b84(%rip), %rdx     # 0x33035
callq 0x11ba1
movq 0x20(%rbp), %rdi
movq %r15, %rsi
callq 0x120e4
movq %r15, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x20f0
leaq -0x168(%rbp), %rdi
callq 0x20f0
leaq -0xe0(%rbp), %rdi
callq 0x20f0
leaq -0x148(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
leaq 0x17b4a(%rip), %rsi     # 0x3304a
leaq -0x80(%rbp), %rdx
callq 0x11cd3
movq %r15, %rdi
movq %rbx, %rsi
leaq 0x17b46(%rip), %rdx     # 0x3305c
callq 0x11ba1
movq 0x20(%rbp), %rdi
movq %r15, %rsi
callq 0x120e4
movq %r15, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x20f0
movq %rbx, %rdi
leaq 0x17b2c(%rip), %rsi     # 0x3306d
leaq -0x120(%rbp), %rdx
callq 0x11cd3
movq %r15, %rdi
movq %rbx, %rsi
leaq 0x17b25(%rip), %rdx     # 0x3307f
callq 0x11ba1
movq 0x20(%rbp), %rdi
movq %r15, %rsi
callq 0x120e4
movq %r15, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x20f0
leaq -0x148(%rbp), %r12
movq %r12, %rdi
leaq 0x17023(%rip), %rsi     # 0x325af
leaq -0x1b8(%rbp), %rdx
callq 0x11cd3
movq %r13, %rdi
movq %r12, %rsi
leaq 0x16cae(%rip), %rdx     # 0x32253
callq 0x11ba1
movq %rbx, %rdi
movq %r13, %rsi
leaq -0x120(%rbp), %rdx
callq 0x11d77
movq %r15, %rdi
movq %rbx, %rsi
leaq 0x18118(%rip), %rdx     # 0x336e1
callq 0x11ba1
movq 0x20(%rbp), %rdi
movq %r15, %rsi
callq 0x120e4
movq %r15, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x20f0
leaq -0xe0(%rbp), %rdi
callq 0x20f0
leaq -0x148(%rbp), %rdi
callq 0x20f0
leaq -0x100(%rbp), %rdi
callq 0x20f0
leaq -0x1b8(%rbp), %rdi
callq 0x20f0
leaq -0x120(%rbp), %rdi
callq 0x20f0
leaq -0x80(%rbp), %rdi
callq 0x20f0
movq %r14, %rdi
callq 0x20f0
leaq -0x58(%rbp), %rdi
callq 0x20f0
movq -0x30(%rbp), %rax
incl %eax
jmp 0x1af75
xorl %edx, %edx
movq -0xb8(%rbp), %rax
testl %eax, %eax
movl $0x0, %ecx
movq %rcx, -0x190(%rbp)
cmovlel %edx, %eax
movq %rax, -0xb8(%rbp)
xorl %r15d, %r15d
movq -0xb0(%rbp), %rax
movslq (%rax), %rbx
leaq -0x2(%rbx), %r13
movq -0xc0(%rbp), %rax
movslq (%rax), %r12
movq %r12, %r14
shlq $0x5, %r14
leaq 0x8(%r14), %rdi
testq %r12, %r12
pushq $-0x1
popq %rax
cmovsq %rax, %rdi
callq 0x2030
leaq 0x8(%rax), %rcx
movq %r12, (%rax)
movq %r15, -0x30(%rbp)
cmpq %r13, %r15
jge 0x1b889
testl %r12d, %r12d
je 0x1b6d8
addq $0x18, %rax
shlq $0x5, %r12
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r12
jne 0x1b6c2
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %r12
movq %rcx, (%rax,%r12,8)
xorl %r14d, %r14d
leaq -0x100(%rbp), %r13
movq -0x190(%rbp), %rbx
leaq 0x17ed2(%rip), %r15     # 0x335d1
cmpq %r14, %rbx
je 0x1b727
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq 0x2350
leaq -0x100(%rbp), %r13
addq $0x20, %r14
jmp 0x1b6ff
movq %rbx, -0x198(%rbp)
xorl %r12d, %r12d
cmpq %r12, -0xb8(%rbp)
movq -0x30(%rbp), %r15
je 0x1b879
leaq (%r15,%r12), %rax
movq -0xc0(%rbp), %rcx
movslq (%rcx), %rcx
cmpq %rcx, %rax
jge 0x1b879
leaq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
andq $0x0, -0x50(%rbp)
movb $0x0, -0x48(%rbp)
movq %r13, %rbx
movq %r13, %rdi
movl %r15d, %esi
callq 0x11c73
leaq -0x1b8(%rbp), %r13
movq %r13, %rdi
leaq 0x178a0(%rip), %rsi     # 0x33029
movq %rbx, %rdx
callq 0x11d49
leaq -0x120(%rbp), %rdi
movq %r13, %rsi
leaq 0x16ce8(%rip), %rdx     # 0x3248a
callq 0x11ba1
leaq -0x188(%rbp), %r14
movq %r14, %rdi
movl %r12d, %esi
callq 0x11c73
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
leaq -0x120(%rbp), %rsi
movq %r14, %rdx
callq 0x11bca
leaq -0xa0(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
leaq 0x16636(%rip), %rdx     # 0x31e19
callq 0x11ba1
movq %rbx, %r15
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2210
movq %r14, %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x20f0
leaq -0x188(%rbp), %rdi
callq 0x20f0
leaq -0x120(%rbp), %rdi
callq 0x20f0
movq %r13, %rdi
callq 0x20f0
leaq -0x100(%rbp), %rdi
callq 0x20f0
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x198(%rbp), %r14
addq %r14, %rdi
movq %rbx, %rsi
callq 0x2130
movq %rbx, %rdi
callq 0x20f0
incq %r12
addq $0x20, %r14
movq %r14, -0x198(%rbp)
leaq -0x100(%rbp), %r13
jmp 0x1b731
incq %r15
addq $0x20, -0x190(%rbp)
jmp 0x1b66f
testl %r12d, %r12d
je 0x1b8a8
addq $0x18, %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r14
jne 0x1b892
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rcx, -0x10(%rax,%rbx,8)
movl -0xa8(%rbp), %r13d
xorl %r14d, %r14d
leaq -0xa0(%rbp), %rbx
leaq -0x58(%rbp), %r15
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x1b928
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11c73
movq %r15, %rdi
leaq 0x17738(%rip), %rsi     # 0x3301e
movq %rbx, %rdx
callq 0x11d49
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0xb0(%rbp), %rcx
movslq (%rcx), %rcx
movq -0x10(%rax,%rcx,8), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq 0x2210
movq %r15, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x20f0
incq %r12
addq $0x20, %r14
jmp 0x1b8cc
leaq -0x58(%rbp), %rbx
movq 0x10(%rbp), %r14
movl -0x124(%rbp), %r15d
movl -0x5c(%rbp), %eax
movl %eax, -0x58(%rbp)
cmpl %r15d, %eax
jge 0x1b954
movq %r14, %rdi
movq %rbx, %rsi
callq 0x279ac
movl -0x58(%rbp), %eax
incl %eax
jmp 0x1b93a
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1b974
jmp 0x1b974
jmp 0x1b999
jmp 0x1b999
jmp 0x1b994
jmp 0x1b994
jmp 0x1b974
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x20f0
jmp 0x1b99c
jmp 0x1b999
jmp 0x1b999
jmp 0x1b994
jmp 0x1b994
jmp 0x1bc32
jmp 0x1bc32
movq %rax, %rbx
jmp 0x1b9a8
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x20f0
leaq -0x80(%rbp), %rdi
jmp 0x1bc8d
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
jmp 0x1bc8d
jmp 0x1bad4
movq %rax, %rbx
leaq -0x188(%rbp), %rdi
callq 0x20f0
jmp 0x1ba31
jmp 0x1bae2
jmp 0x1badd
movq %rax, %rbx
jmp 0x1b9f6
jmp 0x1ba09
movq %rax, %rbx
leaq -0x188(%rbp), %rdi
callq 0x20f0
leaq -0x1d8(%rbp), %rdi
jmp 0x1bb02
jmp 0x1ba0e
jmp 0x1badd
movq %rax, %rbx
jmp 0x1ba1d
movq %rax, %rbx
leaq -0x188(%rbp), %rdi
callq 0x20f0
leaq -0x1d8(%rbp), %rdi
jmp 0x1bb3b
jmp 0x1badd
movq %rax, %rbx
leaq -0x1d8(%rbp), %rdi
callq 0x20f0
jmp 0x1bafb
jmp 0x1ba57
movq %rax, %rbx
jmp 0x1ba7b
jmp 0x1bb4e
jmp 0x1ba57
jmp 0x1ba8c
movq %rax, %rbx
jmp 0x1ba6f
movq %rax, %rbx
jmp 0x1bab2
jmp 0x1ba8c
jmp 0x1ba97
movq %rax, %rbx
leaq -0x188(%rbp), %rdi
callq 0x20f0
leaq -0x1d8(%rbp), %rdi
callq 0x20f0
leaq -0xe0(%rbp), %rdi
callq 0x20f0
jmp 0x1bb28
movq %rax, %rbx
jmp 0x1baa6
jmp 0x1ba97
jmp 0x1bae7
jmp 0x1badd
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
callq 0x20f0
leaq -0x188(%rbp), %rdi
callq 0x20f0
leaq -0x1d8(%rbp), %rdi
callq 0x20f0
jmp 0x1bb51
jmp 0x1bae7
movq %rax, %rbx
leaq -0x188(%rbp), %rdi
jmp 0x1bb70
movq %rax, %rbx
jmp 0x1bb13
jmp 0x1bae7
jmp 0x1bb1c
movq %rax, %rbx
jmp 0x1bb40
movq %rax, %rbx
jmp 0x1bb07
movq %rax, %rbx
jmp 0x1bb75
jmp 0x1bb1c
jmp 0x1bb49
movq %rax, %rbx
jmp 0x1bb34
movq %rax, %rbx
leaq -0x168(%rbp), %rdi
callq 0x20f0
leaq -0xe0(%rbp), %rdi
callq 0x20f0
leaq -0x148(%rbp), %rdi
jmp 0x1bb3b
movq %rax, %rbx
jmp 0x1bb69
jmp 0x1bb49
jmp 0x1bb4e
movq %rax, %rbx
leaq -0x148(%rbp), %rdi
callq 0x20f0
leaq -0x168(%rbp), %rdi
callq 0x20f0
leaq -0x100(%rbp), %rdi
jmp 0x1bb70
movq %rax, %rbx
jmp 0x1bb5d
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x20f0
leaq -0x148(%rbp), %rdi
callq 0x20f0
leaq -0x168(%rbp), %rdi
callq 0x20f0
leaq -0x1b8(%rbp), %rdi
callq 0x20f0
leaq -0x120(%rbp), %rdi
callq 0x20f0
leaq -0x80(%rbp), %rdi
callq 0x20f0
leaq -0xa0(%rbp), %rdi
jmp 0x1bc84
jmp 0x1bc9a
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
jmp 0x1bb91
jmp 0x1bc9a
movq %rax, %rbx
jmp 0x1bbce
movq %rax, %rbx
jmp 0x1bb8d
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x20f0
leaq -0x120(%rbp), %rdi
jmp 0x1bc84
movq %rax, %rbx
leaq -0x1b8(%rbp), %rdi
jmp 0x1bb88
jmp 0x1bc2a
movq %rax, %rbx
jmp 0x1bb81
movq %rax, %rbx
jmp 0x1bc1e
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
jmp 0x1bb7c
movq %rax, %rbx
jmp 0x1bc12
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x20f0
leaq -0x120(%rbp), %rdi
callq 0x20f0
leaq -0x1b8(%rbp), %rdi
jmp 0x1bb91
movq %rax, %rbx
jmp 0x1bb96
movq %rax, %rbx
jmp 0x1bc92
movq %rax, %rbx
jmp 0x1bc7d
movq %rax, %rbx
jmp 0x1bc65
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x20f0
jmp 0x1bc59
jmp 0x1bc9a
movq %rax, %rbx
jmp 0x1bc71
movq %rax, %rbx
leaq -0x188(%rbp), %rdi
callq 0x20f0
leaq -0x120(%rbp), %rdi
callq 0x20f0
leaq -0x1b8(%rbp), %rdi
callq 0x20f0
leaq -0x100(%rbp), %rdi
callq 0x20f0
leaq -0x58(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2330
movq %rax, %rbx
jmp 0x1bc89