// File: /workspace/github_cpp_makefile_star2_O2/temelmertcan[P]multgen/src/pp_gen.cpp
// Function: create_unsignedpp(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>**&, int&, int&, 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_unsignedpp (int m, int n,
                        string**& pp_matrix,
                        int& pp_dim1,
                        int& pp_dim2,
			
                        std::queue<string>& verilog){

  pp_dim1 = m;
  pp_dim2 = n+m-1;

  pp_matrix = new string*[pp_dim1];

  for (int i = 0; i<m; i++)
    verilog.push ( "wire logic [" + to_string(n-1) + ":0] pp" + to_string(i) + ";");

  for (int i = 0; i < m; i++){
    pp_matrix[i] = new string[pp_dim2];
    for (int j = 0; j < i; j++){
      pp_matrix[i][j] = "";
    }
    for (int j = 0; j < n; j++){
      string cur;
      cur = "pp" + to_string(i) + "[" + to_string(j) + "]";
      pp_matrix[i][j+i] = cur;
    }
    for (int j = n+i; j < n+m-1; j++){
      pp_matrix[i][j] = "";
    }

    verilog.push (
                  "assign pp" + to_string(i)  + " = {"
                  + to_string(n)
                  + "{IN1["
                  + to_string(i)
                  + "]}} & IN2;");
  }

  //print_pp(pp_matrix, pp_dim1, pp_dim2, verilog, true);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %r9, -0x60(%rbp)
movq %rdx, %rbx
movl %edi, %r14d
movl %edi, (%rcx)
leal -0x1(%rsi), %eax
movl %eax, -0x38(%rbp)
movq %rsi, -0x58(%rbp)
leal -0x1(%rsi,%r14), %eax
movq %r8, -0xf0(%rbp)
movl %eax, -0x48(%rbp)
movl %eax, (%r8)
movslq (%rcx), %rax
leaq (,%rax,8), %rdi
testq %rax, %rax
pushq $-0x1
popq %rax
cmovsq %rax, %rdi
callq 0x2030
movq %rbx, -0x40(%rbp)
movq %rax, (%rbx)
xorl %r12d, %r12d
testl %r14d, %r14d
cmovlel %r12d, %r14d
movq %r14, -0x30(%rbp)
leaq -0xc0(%rbp), %r15
leaq -0x168(%rbp), %r14
leaq -0xa0(%rbp), %rbx
cmpl %r12d, -0x30(%rbp)
je 0x19d28
movq %r15, %r13
leaq -0x80(%rbp), %r15
movq %r15, %rdi
movl -0x38(%rbp), %esi
callq 0x11c73
movq %r13, %rdi
leaq 0x182a9(%rip), %rsi     # 0x31f2d
movq %r15, %rdx
callq 0x11d49
leaq -0xe0(%rbp), %rdi
movq %r13, %rsi
leaq 0x19290(%rip), %rdx     # 0x32f2d
callq 0x11ba1
movq %r13, %r15
leaq -0x128(%rbp), %r13
movq %r13, %rdi
movl %r12d, %esi
callq 0x11c73
movq %r14, %rdi
leaq -0xe0(%rbp), %rsi
movq %r13, %rdx
callq 0x11bca
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x19a0b(%rip), %rdx     # 0x336e1
callq 0x11ba1
movq -0x60(%rbp), %rdi
movq %rbx, %rsi
callq 0x120e4
movq %rbx, %rdi
callq 0x20f0
movq %r14, %rdi
callq 0x20f0
leaq -0x128(%rbp), %rdi
callq 0x20f0
leaq -0xe0(%rbp), %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x20f0
leaq -0x80(%rbp), %rdi
callq 0x20f0
incl %r12d
jmp 0x19c5e
movq $0x0, -0x38(%rbp)
movq -0x58(%rbp), %rax
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
movq %rcx, -0x108(%rbp)
movslq -0x48(%rbp), %r14
movl -0x30(%rbp), %ecx
movq %rcx, -0xf8(%rbp)
xorl %r12d, %r12d
movl %eax, %r15d
movq %r14, -0xe8(%rbp)
cmpq -0xf8(%rbp), %r12
je 0x1a0c5
movq -0xf0(%rbp), %rax
movslq (%rax), %r14
movq %r14, %rbx
shlq $0x5, %rbx
leaq 0x8(%rbx), %rdi
testq %r14, %r14
pushq $-0x1
popq %rax
cmovsq %rax, %rdi
callq 0x2030
movq %r14, (%rax)
testq %r14, %r14
je 0x19db3
leaq 0x18(%rax), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rcx
addq $-0x20, %rbx
jne 0x19d9d
movslq %r15d, %rbx
movq %rbx, %r13
shlq $0x5, %r13
addq $0x8, %rax
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
movq %rax, (%rcx,%r12,8)
xorl %r14d, %r14d
cmpq %r14, -0x38(%rbp)
je 0x19df5
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rdi
addq %r14, %rdi
leaq 0x197e7(%rip), %rsi     # 0x335d1
callq 0x2350
addq $0x20, %r14
jmp 0x19dcf
movl %r15d, -0x4c(%rbp)
movq -0x38(%rbp), %r15
xorl %r14d, %r14d
movq %r13, -0x48(%rbp)
movq %rbx, -0x100(%rbp)
cmpq %r14, -0x108(%rbp)
je 0x19f4c
leaq -0x90(%rbp), %rax
movq %rax, -0xa0(%rbp)
andq $0x0, -0x98(%rbp)
movb $0x0, -0x90(%rbp)
leaq -0x128(%rbp), %r13
movq %r13, %rdi
movl %r12d, %esi
callq 0x11c73
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
leaq 0x190dc(%rip), %rsi     # 0x32f31
movq %r13, %rdx
callq 0x11d49
leaq -0xc0(%rbp), %rdi
movq %rbx, %rsi
leaq 0x1861c(%rip), %rdx     # 0x3248a
callq 0x11ba1
leaq -0x148(%rbp), %r13
movq %r13, %rdi
movl %r14d, %esi
callq 0x11c73
leaq -0xe0(%rbp), %rbx
movq %rbx, %rdi
leaq -0xc0(%rbp), %rsi
movq %r13, %rdx
callq 0x11bca
leaq -0x168(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
leaq 0x17f67(%rip), %rdx     # 0x31e19
callq 0x11ba1
movq %r15, -0x30(%rbp)
movq %r12, %r15
leaq -0xa0(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x2210
movq %r13, %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x20f0
leaq -0x148(%rbp), %rdi
callq 0x20f0
leaq -0xc0(%rbp), %rdi
callq 0x20f0
leaq -0x80(%rbp), %rdi
callq 0x20f0
leaq -0x128(%rbp), %rdi
callq 0x20f0
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %r15, %rbx
movq (%rax,%r15,8), %rdi
movq -0x30(%rbp), %r15
addq %r15, %rdi
movq %r12, %rsi
callq 0x2130
movq %r12, %rdi
callq 0x20f0
incq %r14
addq $0x20, %r15
movq %rbx, %r12
movq -0x100(%rbp), %rbx
movq -0x48(%rbp), %r13
jmp 0x19e0b
movq -0xe8(%rbp), %r14
cmpq %r14, %rbx
jge 0x19f7b
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rdi
addq %r13, %rdi
leaq 0x19664(%rip), %rsi     # 0x335d1
callq 0x2350
incq %rbx
addq $0x20, %r13
jmp 0x19f53
leaq -0x148(%rbp), %rbx
movq %rbx, %rdi
movq %r12, -0x30(%rbp)
movl %r12d, %esi
callq 0x11c73
leaq -0x128(%rbp), %r12
movq %r12, %rdi
leaq 0x18f92(%rip), %rsi     # 0x32f34
movq %rbx, %rdx
callq 0x11d49
leaq -0x80(%rbp), %rdi
movq %r12, %rsi
leaq 0x18f86(%rip), %rdx     # 0x32f3e
callq 0x11ba1
leaq -0x1a8(%rbp), %r13
movq %r13, %rdi
movq -0x58(%rbp), %rsi
callq 0x11c73
leaq -0xc0(%rbp), %r15
movq %r15, %rdi
leaq -0x80(%rbp), %rsi
movq %r13, %rdx
callq 0x11bca
leaq -0xe0(%rbp), %rdi
movq %r15, %rsi
leaq 0x18396(%rip), %rdx     # 0x3238d
callq 0x11ba1
leaq -0x188(%rbp), %r13
movq %r13, %rdi
movq -0x30(%rbp), %rsi
callq 0x11c73
leaq -0x168(%rbp), %rbx
movq %rbx, %rdi
leaq -0xe0(%rbp), %r15
movq %r15, %rsi
movq %r13, %rdx
callq 0x11bca
leaq -0xa0(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
leaq 0x18f04(%rip), %rdx     # 0x32f43
callq 0x11ba1
movq -0x60(%rbp), %rdi
movq %r13, %rsi
callq 0x120e4
movq %r13, %rdi
callq 0x20f0
leaq -0x168(%rbp), %rdi
callq 0x20f0
leaq -0x188(%rbp), %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x20f0
leaq -0xc0(%rbp), %rdi
callq 0x20f0
leaq -0x1a8(%rbp), %rdi
callq 0x20f0
leaq -0x80(%rbp), %rdi
callq 0x20f0
movq %r12, %rdi
callq 0x20f0
leaq -0x148(%rbp), %rdi
callq 0x20f0
movq -0x30(%rbp), %r12
incq %r12
movl -0x4c(%rbp), %r15d
incl %r15d
addq $0x20, -0x38(%rbp)
jmp 0x19d60
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x1a10d
movq %rax, %rbx
jmp 0x1a101
movq %rax, %rbx
jmp 0x1a0f5
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x20f0
leaq -0x168(%rbp), %rdi
callq 0x20f0
leaq -0x188(%rbp), %rdi
callq 0x20f0
leaq -0xe0(%rbp), %rdi
callq 0x20f0
jmp 0x1a132
movq %rax, %rbx
jmp 0x1a15f
movq %rax, %rbx
jmp 0x1a153
movq %rax, %rbx
jmp 0x1a14a
movq %rax, %rbx
jmp 0x1a13e
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x20f0
leaq -0x1a8(%rbp), %rdi
callq 0x20f0
leaq -0x80(%rbp), %rdi
callq 0x20f0
leaq -0x128(%rbp), %rdi
callq 0x20f0
leaq -0x148(%rbp), %rdi
jmp 0x1a227
movq %rax, %rbx
jmp 0x1a1a1
movq %rax, %rbx
jmp 0x1a195
movq %rax, %rbx
jmp 0x1a189
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x20f0
leaq -0x168(%rbp), %rdi
callq 0x20f0
leaq -0x128(%rbp), %rdi
callq 0x20f0
leaq -0xe0(%rbp), %rdi
callq 0x20f0
jmp 0x1a1b7
movq %rax, %rbx
jmp 0x1a1c3
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x20f0
leaq -0x80(%rbp), %rdi
jmp 0x1a227
movq %rax, %rbx
jmp 0x1a1ee
movq %rax, %rbx
jmp 0x1a1e2
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x20f0
leaq -0x148(%rbp), %rdi
callq 0x20f0
leaq -0xc0(%rbp), %rdi
callq 0x20f0
jmp 0x1a20b
jmp 0x1a1fe
movq %rax, %rbx
jmp 0x1a220
movq %rax, %rbx
jmp 0x1a214
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x20f0
leaq -0x128(%rbp), %rdi
callq 0x20f0
leaq -0xa0(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2330