// File: /workspace/github_cpp_makefile_star2_O1/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 $0x78, %rsp
movl %r8d, -0x2c(%rbp)
movq %rcx, -0x58(%rbp)
movq %rdi, -0x68(%rbp)
cmpl $0x40, %edx
jg 0x3bfd8
movl %edx, %r14d
movl %esi, %ebx
cmpb $0x0, -0x2c(%rbp)
je 0x3bdd6
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq %rax, (%rdi)
leaq 0x3e88f(%rip), %rdx     # 0x7a601
movq %rdx, %rsi
callq 0x2b022
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x2ad60
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3bd99
callq 0x31d0
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq %rax, (%rdi)
leaq 0x3e15e(%rip), %rsi     # 0x79f09
leaq 0x3e1a0(%rip), %rdx     # 0x79f52
callq 0x2b022
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x2ad60
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3bdd6
callq 0x31d0
movl %ebx, %eax
movq %rax, -0x78(%rbp)
movl %r14d, %r15d
testl %ebx, %ebx
jle 0x3be24
movq %r15, %rax
shlq $0x5, %rax
movl $0x4, %r13d
xorl %ecx, %ecx
movq -0x68(%rbp), %r8
testl %r14d, %r14d
jle 0x3be16
movq (%r8,%rcx,8), %rdx
xorl %esi, %esi
movq 0x8(%rdx,%rsi), %rdi
cmpq %r13, %rdi
cmovaq %rdi, %r13
addq $0x20, %rsi
cmpq %rsi, %rax
jne 0x3be01
incq %rcx
cmpq -0x78(%rbp), %rcx
jne 0x3bdf6
incq %r13
jmp 0x3be2a
movl $0x5, %r13d
testl %ebx, %ebx
jle 0x3bfd8
leaq 0x3e11a(%rip), %rcx     # 0x79f53
leaq 0x3e7c1(%rip), %rdx     # 0x7a601
movl -0x2c(%rbp), %eax
testb %al, %al
cmoveq %rdx, %rcx
movzbl %al, %eax
movq %rcx, -0x90(%rbp)
leaq (%rcx,%rax,4), %rax
movq %rax, -0x88(%rbp)
leaq -0x4(%r13), %rax
movq %rax, -0x98(%rbp)
movq $0x0, -0x60(%rbp)
leaq -0x50(%rbp), %rbx
movl %r14d, -0x6c(%rbp)
movq %r15, -0x80(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %rbx, %rdi
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x2b022
testl %r14d, %r14d
jle 0x3bf5b
xorl %r14d, %r14d
movq %r14, %r12
shlq $0x5, %r12
movq -0x68(%rbp), %r15
movq -0x60(%rbp), %rbx
movq (%r15,%rbx,8), %rdi
addq %r12, %rdi
leaq 0x3e73d(%rip), %rsi     # 0x7a601
callq 0x3090
testl %eax, %eax
je 0x3bf16
movq (%r15,%rbx,8), %rax
movq (%rax,%r12), %rsi
movq 0x8(%rax,%r12), %rdx
leaq -0x50(%rbp), %rdi
callq 0x30a0
movq -0x68(%rbp), %rax
movq (%rax,%rbx,8), %rax
movslq 0x8(%rax,%r12), %r12
cmpq %r12, %r13
movq -0x80(%rbp), %r15
leaq -0x50(%rbp), %rbx
jbe 0x3bf4f
movq %rbx, %rdi
leaq 0x3bd10(%rip), %rsi     # 0x77c17
callq 0x33d0
incq %r12
cmpq %r12, %r13
ja 0x3befd
jmp 0x3bf4f
leaq -0x50(%rbp), %rdi
leaq 0x3e037(%rip), %rsi     # 0x79f58
callq 0x33d0
cmpq $0x5, %r13
movq -0x80(%rbp), %r15
leaq -0x50(%rbp), %rbx
jb 0x3bf4f
movq -0x98(%rbp), %r12
movq %rbx, %rdi
leaq 0x3bcd2(%rip), %rsi     # 0x77c17
callq 0x33d0
decq %r12
jne 0x3bf3b
incq %r14
cmpq %r15, %r14
jne 0x3bea7
cmpb $0x0, -0x2c(%rbp)
je 0x3bf6f
movq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq 0x3b832
jmp 0x3bfad
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x4b052(%rip), %rdi     # 0x86fd0
callq 0x3240
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
movl -0x6c(%rbp), %r14d
je 0x3bfc3
callq 0x31d0
movq -0x60(%rbp), %rcx
incq %rcx
movq %rcx, -0x60(%rbp)
cmpq -0x78(%rbp), %rcx
jne 0x3be7d
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3bffa
jmp 0x3bfef
jmp 0x3bffa
jmp 0x3bfef
movq %rax, %rbx
jmp 0x3c00f
jmp 0x3bffa
jmp 0x3bffa
jmp 0x3bffa
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3c00f
callq 0x31d0
movq %rbx, %rdi
callq 0x33a0