// File: /workspace/github_cpp_makefile_star2_O2/Phidelux[P]terminal-table/src/table.cpp
// Function: bornageek::utils::termtab::Table::render[abi:cxx11]() const
const std::string Table::render() const {
        std::stringstream ss;

        std::vector<Row> rowsWithHeadings = this->rowsWithHeadings();
        
        std::string sep = this->renderSeparator(
          this->mStyle.borderLeftMid(), this->mStyle.borderMidMid(), 
          this->mStyle.borderRightMid(), this->mStyle.borderMid());

        if(this->mTitle.length() > 0) {
          std::uint16_t innerWidth = (this->numColumns() - 1) 
              * this->cellSpacing() + this->cellPadding();

          for(std::uint16_t c = 0; c < this->numColumns(); c++) {
            innerWidth += this->columnWidth(c);
          }

          std::uint16_t spaceLeft = innerWidth / 2 - mTitle.length() / 2;

          ss << this->mStyle.borderTopLeft() 
             << std::string(innerWidth, this->mStyle.borderTop())
             << this->mStyle.borderTopRight() << std::endl; 
          ss << this->mStyle.borderLeft() 
             << std::string(spaceLeft, ' ') << std::left 
             << std::setw(innerWidth - spaceLeft) << std::setfill(' ') 
             << this->mTitle; 
          ss << this->mStyle.borderRight() << std::endl << sep;
        } else {
          ss << this->renderSeparator(
            this->mStyle.borderTopLeft(), this->mStyle.borderTopMid(), 
            this->mStyle.borderTopRight(), this->mStyle.borderTop());
        }

        std::for_each(rowsWithHeadings.begin(), --rowsWithHeadings.end(),
          [&ss, sep, rowsWithHeadings](Row row){ 
            if(row.cells().size() > 0) {
              ss << row << sep; 
            }
          });

        if( rowsWithHeadings.size() > 0) {
          ss << rowsWithHeadings.back() << this->renderSeparator(
            this->mStyle.borderBottomLeft(), this->mStyle.borderBottomMid(), 
            this->mStyle.borderBottomRight(), this->mStyle.borderBottom());
        }

        return ss.str();
      }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rsi, %r14
movq %rdi, 0x28(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x2100
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x464a
movq %r14, %rdi
callq 0x24a6
movb (%rax), %bl
movq %r14, %rdi
callq 0x24be
movb (%rax), %bpl
movq %r14, %rdi
callq 0x24d6
movb (%rax), %r15b
movq %r14, %rdi
callq 0x24b2
movsbl (%rax), %r9d
movsbl %bl, %edx
movsbl %bpl, %ecx
movsbl %r15b, %r8d
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x4850
cmpq $0x0, 0x28(%r14)
je 0x4b7a
movq %r14, %rdi
callq 0x427a
movl %eax, %ebx
movq %r14, %rdi
callq 0x4338
movl %eax, %r13d
movq %r14, %rdi
callq 0x4342
movl %eax, %ebp
leaq 0x20(%r14), %r15
decl %ebx
imull %ebx, %r13d
addl %r13d, %ebp
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x427a
cmpw %ax, %bx
jae 0x4a38
movzwl %bx, %esi
movq %r14, %rdi
callq 0x4502
addl %ebp, %eax
incl %ebx
movl %eax, %ebp
jmp 0x4a18
movq %r15, 0x48(%rsp)
movq 0x28(%r14), %r15
movq %r14, %rdi
callq 0x2452
leaq 0x100(%rsp), %rdi
movsbl (%rax), %esi
callq 0x21c0
movq %rax, %rbx
movq %r14, %rdi
callq 0x243c
movzwl %bp, %r13d
movsbl (%rax), %edx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x21b0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x2170
movq %rax, %rbx
movq %r14, %rdi
callq 0x245e
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
leaq 0x8(%rsp), %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x249a
movsbl (%rax), %esi
leaq 0x100(%rsp), %rdi
callq 0x21c0
movq %rax, %rbx
movl %r13d, %ebp
shrl %ebp
shrq %r15
subq %r15, %rbp
movzwl %bp, %esi
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
pushq $0x20
popq %rdx
callq 0x21b0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x2170
movq 0x48(%rsp), %rbx
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl $0xffffff4f, %esi       # imm = 0xFFFFFF4F
andl 0x18(%rax,%rdx), %esi
orl $0x20, %esi
movl %esi, 0x18(%rax,%rdx)
movzwl %bp, %edx
subl %edx, %r13d
movq -0x18(%rcx), %rcx
movslq %r13d, %rdx
movq %rdx, 0x10(%rax,%rcx)
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x2230
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2170
leaq 0x8(%rsp), %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x24ca
movsbl (%rax), %esi
leaq 0x100(%rsp), %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x2170
jmp 0x4bda
movq %r14, %rdi
callq 0x2452
movb (%rax), %bl
movq %r14, %rdi
callq 0x2446
movb (%rax), %bpl
movq %r14, %rdi
callq 0x245e
movb (%rax), %r15b
movq %r14, %rdi
callq 0x243c
movsbl (%rax), %r9d
movsbl %bl, %edx
movsbl %bpl, %ecx
movsbl %r15b, %r8d
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x4850
leaq 0x100(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2170
leaq 0x8(%rsp), %rdi
callq 0x20a0
movq 0x30(%rsp), %r13
movq 0x38(%rsp), %r15
leaq 0x78(%rsp), %r12
leaq 0xf0(%rsp), %rax
movq %rax, -0x8(%r12)
leaq 0x50(%rsp), %rsi
movq %r12, %rdi
callq 0x21f0
leaq 0x98(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4fc6
addq $-0x20, %r15
leaq 0x10(%rsp), %rbp
leaq 0x8(%rsp), %rbx
cmpq %r15, %r13
je 0x4c6e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4f54
movq %rbx, %rdi
callq 0x59dc
movq 0x8(%rax), %rcx
cmpq (%rax), %rcx
je 0x4c60
movq 0x70(%rsp), %rdi
addq $0x10, %rdi
movq %rbx, %rsi
callq 0x50b6
movq %rax, %rdi
movq %r12, %rsi
callq 0x2170
movq %rbp, %rdi
callq 0x370a
addq $0x20, %r13
jmp 0x4c23
leaq 0x88(%rsp), %rax
movq -0x18(%rax), %rsi
movq -0x10(%rax), %rdx
leaq 0xc8(%rsp), %rcx
movq %rsi, -0x18(%rcx)
movq %rcx, -0x10(%rcx)
cmpq %rax, %rdx
je 0x4cad
movq %rdx, 0xb8(%rsp)
movq 0x88(%rsp), %rcx
movq %rcx, 0xc8(%rsp)
jmp 0x4cb3
movups (%rax), %xmm0
movups %xmm0, (%rcx)
leaq 0x70(%rsp), %rbx
movq 0x10(%rbx), %rcx
movq %rax, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
leaq 0xb0(%rsp), %rdi
movq %rcx, 0x10(%rdi)
movb $0x0, 0x18(%rbx)
movups 0x28(%rbx), %xmm0
movups %xmm0, 0x28(%rdi)
movq 0x38(%rbx), %rax
movq %rax, 0x38(%rdi)
xorps %xmm0, %xmm0
leaq 0x98(%rsp), %rax
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
callq 0x4e4c
movq %rbx, %rdi
callq 0x4e4c
movq 0x38(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x4d80
leaq 0x100(%rsp), %rdi
addq $-0x20, %rsi
callq 0x50b6
movq %rax, %r15
movq %r14, %rdi
callq 0x2482
movb (%rax), %bl
movq %r14, %rdi
callq 0x2476
movb (%rax), %bpl
movq %r14, %rdi
callq 0x248e
movb (%rax), %r12b
movq %r14, %rdi
callq 0x246a
movsbl (%rax), %r9d
movsbl %bl, %edx
movsbl %bpl, %ecx
movsbl %r12b, %r8d
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x4850
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x2170
leaq 0x8(%rsp), %rdi
callq 0x20a0
leaq 0x108(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x2240
leaq 0x50(%rsp), %rdi
callq 0x20a0
leaq 0x30(%rsp), %rdi
callq 0x368e
leaq 0xf0(%rsp), %rdi
callq 0x2130
movq 0x28(%rsp), %rax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4deb
jmp 0x4deb
jmp 0x4e08
jmp 0x4e08
jmp 0x4e08
movq %rax, %rbx
movq %r12, %rdi
jmp 0x4df3
jmp 0x4e08
movq %rax, %rbx
jmp 0x4e36
jmp 0x4e08
jmp 0x4deb
jmp 0x4e08
jmp 0x4e08
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20a0
jmp 0x4e22
jmp 0x4e08
jmp 0x4e08
movq %rax, %rbx
jmp 0x4e2c
movq %rax, %rbx
jmp 0x4e18
movq %rax, %rbx
jmp 0x4e22
movq %rax, %rbx
movq %rbp, %rdi
callq 0x370a
leaq 0x70(%rsp), %rdi
callq 0x4e4c
leaq 0x50(%rsp), %rdi
callq 0x20a0
leaq 0x30(%rsp), %rdi
callq 0x368e
leaq 0xf0(%rsp), %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2280
nop