// File: /workspace/github_cpp_makefile_star2_O3/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 $0x68, %rsp
movl %r8d, -0x2c(%rbp)
movq %rcx, -0x58(%rbp)
movq %rdi, -0x60(%rbp)
cmpl $0x40, %edx
jg 0x3bd6d
movl %edx, %r15d
movl %esi, %ebx
cmpb $0x0, -0x2c(%rbp)
je 0x3bb87
leaq -0x40(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x3dad6(%rip), %rdx     # 0x79601
leaq -0x50(%rbp), %rdi
movq %rdx, %rsi
callq 0x2ac04
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x2a942
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x3bb52
callq 0x31d0
leaq -0x50(%rbp), %rdi
movq %r14, (%rdi)
leaq 0x3d3a9(%rip), %rsi     # 0x78f09
leaq 0x3d3eb(%rip), %rdx     # 0x78f52
callq 0x2ac04
leaq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
callq 0x2a942
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x3bb87
callq 0x31d0
testl %ebx, %ebx
jle 0x3bd6d
movl %ebx, %r9d
movl %r15d, %eax
movq %rax, -0x90(%rbp)
shlq $0x5, %rax
movl $0x4, %r10d
xorl %ecx, %ecx
movq -0x60(%rbp), %r8
testl %r15d, %r15d
jle 0x3bbcc
movq (%r8,%rcx,8), %rdx
xorl %esi, %esi
movq 0x8(%rdx,%rsi), %rdi
cmpq %r10, %rdi
cmovaq %rdi, %r10
addq $0x20, %rsi
cmpq %rsi, %rax
jne 0x3bbb7
incq %rcx
cmpq %r9, %rcx
jne 0x3bbac
movq %r9, -0x80(%rbp)
testl %ebx, %ebx
jle 0x3bd6d
leaq 0x1(%r10), %r14
leaq 0x3d368(%rip), %rcx     # 0x78f53
leaq 0x3da0f(%rip), %rdx     # 0x79601
movl -0x2c(%rbp), %eax
testb %al, %al
cmoveq %rdx, %rcx
movzbl %al, %eax
movq %rcx, -0x78(%rbp)
leaq (%rcx,%rax,4), %rax
movq %rax, -0x70(%rbp)
addq $-0x3, %r10
movq %r10, -0x88(%rbp)
xorl %ebx, %ebx
leaq -0x50(%rbp), %r13
movl %r15d, -0x64(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %r13, %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x2ac04
testl %r15d, %r15d
jle 0x3bcf8
xorl %r15d, %r15d
movq %r15, %r12
shlq $0x5, %r12
movq %rbx, %r13
movq -0x60(%rbp), %rbx
movq (%rbx,%r13,8), %rdi
addq %r12, %rdi
leaq 0x3d9a2(%rip), %rsi     # 0x79601
callq 0x3090
testl %eax, %eax
je 0x3bcb0
movq (%rbx,%r13,8), %rax
movq (%rax,%r12), %rsi
movq 0x8(%rax,%r12), %rdx
leaq -0x50(%rbp), %rdi
callq 0x30a0
movq %r13, %rbx
movq -0x60(%rbp), %rax
movq (%rax,%r13,8), %rax
movslq 0x8(%rax,%r12), %r12
cmpq %r12, %r14
leaq -0x50(%rbp), %r13
jbe 0x3bce8
movq %r13, %rdi
leaq 0x3af73(%rip), %rsi     # 0x76c14
callq 0x33d0
incq %r12
cmpq %r12, %r14
ja 0x3bc97
jmp 0x3bce8
leaq -0x50(%rbp), %rdi
leaq 0x3d29d(%rip), %rsi     # 0x78f58
callq 0x33d0
movq %r13, %rbx
cmpq $0x5, %r14
leaq -0x50(%rbp), %r13
jb 0x3bce8
movq -0x88(%rbp), %r12
movq %r13, %rdi
leaq 0x3af36(%rip), %rsi     # 0x76c14
callq 0x33d0
decq %r12
jne 0x3bcd4
incq %r15
cmpq -0x90(%rbp), %r15
jne 0x3bc43
cmpb $0x0, -0x2c(%rbp)
je 0x3bd0c
movq -0x58(%rbp), %rdi
movq %r13, %rsi
callq 0x3b624
jmp 0x3bd4a
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x4a2b5(%rip), %rdi     # 0x85fd0
callq 0x3240
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
movl -0x64(%rbp), %r15d
je 0x3bd60
callq 0x31d0
incq %rbx
cmpq -0x80(%rbp), %rbx
jne 0x3bc1f
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3bd80
jmp 0x3bd90
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
jne 0x3bdab
jmp 0x3bdb0
jmp 0x3bd90
movq %rax, %rbx
jmp 0x3bdb0
jmp 0x3bd9b
jmp 0x3bd9b
jmp 0x3bd9b
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3bdb0
callq 0x31d0
movq %rbx, %rdi
callq 0x33a0