// File: /workspace/github_cpp_makefile_star2_O2/temelmertcan[P]multgen/src/pp_gen.cpp
// Function: print_pp(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>>>>>&, bool)
void print_pp (string** pp, int m, int n, std::queue<string>& verilog, bool to_file){

  if (n > 64)
    return;

  if (to_file){
    verilog.push("");
    verilog.push("// The values to be summed in the summation tree, from LSB (left) to MSB:");

  }

  unsigned long len = 4;
  for (int i=0; i<m; i++){
    for (int j=0; j<n; j++){
      len = max (pp[i][j].size(), len);
    }
  }
  len++;

  for (int i=0; i<m; i++){
    string line = (to_file ? " // " : "");
    for (int j=0; j<n; j++){
      if (pp[i][j] != ""){
        line += pp[i][j];

        for (int k = pp[i][j].size(); k<len; k++)
          line += " ";
      }
      else{
        line += "  --";
        for (int k = 4; k<len; k++)
          line+= " ";
      }
    }
    if (to_file) verilog.push(line);
    else cout << line << endl;
  }

  // cout << "here" << endl;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r8d, -0x30(%rbp)
movq %rcx, -0x48(%rbp)
movq %rdi, -0x40(%rbp)
cmpl $0x40, %edx
jle 0x199dc
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %ebx
movl %esi, %r14d
cmpb $0x0, -0x30(%rbp)
je 0x19a3b
leaq 0x19be3(%rip), %rsi     # 0x335d1
leaq -0x70(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x20b0
leaq -0x70(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x120e4
leaq -0x70(%rbp), %rdi
callq 0x20f0
leaq 0x194c1(%rip), %rsi     # 0x32ed9
leaq -0x70(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x20b0
leaq -0x70(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x120e4
leaq -0x70(%rbp), %rdi
callq 0x20f0
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
testl %r14d, %r14d
cmovlel %eax, %r14d
movq %rbx, %rcx
shlq $0x5, %rcx
pushq $0x4
popq %r15
cmpq %r14, %rax
je 0x19a7f
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x19a7a
movq -0x40(%rbp), %rsi
movq (%rsi,%rax,8), %rsi
movq 0x8(%rsi,%rdx), %rsi
cmpq %r15, %rsi
cmovaq %rsi, %r15
addq $0x20, %rdx
jmp 0x19a5b
incq %rax
jmp 0x19a54
incq %r15
leaq 0x1949a(%rip), %rax     # 0x32f23
leaq 0x19b41(%rip), %rcx     # 0x335d1
cmpb $0x0, -0x30(%rbp)
cmoveq %rcx, %rax
movq %rax, -0x78(%rbp)
movl %ebx, %eax
movq %rax, -0x80(%rbp)
xorl %eax, %eax
leaq -0x70(%rbp), %rbx
leaq 0x17165(%rip), %r13     # 0x30c14
movq %r14, -0x50(%rbp)
movq %rax, -0x38(%rbp)
cmpq %r14, %rax
je 0x199cd
movq %rbx, %rdi
movq -0x78(%rbp), %rsi
leaq -0x29(%rbp), %rdx
callq 0x20b0
xorl %r14d, %r14d
cmpq -0x80(%rbp), %r14
je 0x19b70
movq %r14, %r12
shlq $0x5, %r12
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
addq %r12, %rdi
leaq 0x19ad7(%rip), %rsi     # 0x335d1
callq 0x11b84
testb %al, %al
je 0x19b40
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
addq %r12, %rsi
movq %rbx, %rdi
callq 0x2360
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x8(%rax,%r12), %r12
cmpq %r12, %r15
jbe 0x19b68
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2340
incq %r12
jmp 0x19b2b
movq %rbx, %rdi
leaq 0x193de(%rip), %rsi     # 0x32f28
callq 0x2340
pushq $0x4
popq %r12
cmpq %r12, %r15
jbe 0x19b68
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2340
incq %r12
jmp 0x19b53
incq %r14
jmp 0x19ad3
cmpb $0x0, -0x30(%rbp)
je 0x19b88
movq -0x48(%rbp), %rdi
movq %rbx, %rsi
callq 0x19602
movq -0x50(%rbp), %r14
jmp 0x19ba3
movq 0x25439(%rip), %rdi     # 0x3efc8
movq %rbx, %rsi
callq 0x2190
movq -0x50(%rbp), %r14
movq %rax, %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x20f0
movq -0x38(%rbp), %rax
incq %rax
jmp 0x19ab3
jmp 0x19bca
jmp 0x19bbf
jmp 0x19bca
jmp 0x19bbf
movq %rax, %rbx
jmp 0x19bd6
jmp 0x19bca
jmp 0x19bca
jmp 0x19bca
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2330