// File: Phidelux[P]terminal-table/src/row.cpp
// Function: bornageek::utils::termtab::Row::render[abi:cxx11]() const
const std::string Row::render() const {
        std::uint16_t numColumns = mTable->numColumns();
        std::uint16_t numLines = this->height();

        std::stringstream ss;

        Style style = this->mTable->style();

        for(std::uint16_t l = 0; l < numLines; l++) {
          ss << style.borderLeft();

          for(std::uint16_t c = 0; c < numColumns; c++) {
            if(c < mCells.size() && mCells[c].colSpan() > 1) {
              ss << mCells[c].render(l, c); 
              c += mCells[c].colSpan() - 1;
            } else if(c < mCells.size()) {
              ss << mCells[c].render(l, c);
            } else {
              ss << std::string(mTable->columnWidth(c) 
                + mTable->style().paddingLeft() + mTable->style().paddingRight(),
                ' ');
            }

            if(c < numColumns - 1) {
              ss << style.borderMiddle();
            }
          }

          ss << style.borderRight() << std:: endl;
        }

        return ss.str();
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp            # imm = 0x320
movq %rdi, -0x288(%rbp)
movq %rdi, %rax
movq %rax, -0x280(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x278(%rbp)
movq (%rax), %rdi
callq 0x9be0
movq -0x278(%rbp), %rdi
movw %ax, -0x12(%rbp)
callq 0xee00
movw %ax, -0x14(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x3170
movq -0x278(%rbp), %rax
movq (%rax), %rsi
leaq -0x1bc(%rbp), %rdi
callq 0xa580
jmp 0xef2f
movw $0x0, -0x1ce(%rbp)
movzwl -0x1ce(%rbp), %eax
movzwl -0x14(%rbp), %ecx
cmpl %ecx, %eax
jge 0xf407
leaq -0x190(%rbp), %rax
movq %rax, -0x298(%rbp)
leaq -0x1bc(%rbp), %rdi
callq 0x38b0
movq %rax, -0x290(%rbp)
jmp 0xef6e
movq -0x298(%rbp), %rdi
movq -0x290(%rbp), %rax
movsbl (%rax), %esi
callq 0x32d0
jmp 0xef86
movw $0x0, -0x1d0(%rbp)
movzwl -0x1d0(%rbp), %eax
movzwl -0x12(%rbp), %ecx
cmpl %ecx, %eax
jge 0xf397
movq -0x278(%rbp), %rdi
movzwl -0x1d0(%rbp), %eax
movq %rax, -0x2a0(%rbp)
addq $0x8, %rdi
callq 0xc600
movq %rax, %rcx
movq -0x2a0(%rbp), %rax
cmpq %rcx, %rax
jae 0xf0fd
movq -0x278(%rbp), %rdi
addq $0x8, %rdi
movzwl -0x1d0(%rbp), %eax
movl %eax, %esi
callq 0xf580
movq %rax, %rdi
callq 0x7d30
movw %ax, -0x2a2(%rbp)
jmp 0xeffd
movw -0x2a2(%rbp), %ax
movzwl %ax, %eax
cmpl $0x1, %eax
jle 0xf0fd
movq -0x278(%rbp), %rdi
leaq -0x190(%rbp), %rax
movq %rax, -0x2b0(%rbp)
addq $0x8, %rdi
movzwl -0x1d0(%rbp), %eax
movl %eax, %esi
callq 0xf580
movq %rax, %rsi
movzwl -0x1ce(%rbp), %edx
movzwl -0x1d0(%rbp), %ecx
leaq -0x1f0(%rbp), %rdi
callq 0x82d0
jmp 0xf056
movq -0x2b0(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0x3200
jmp 0xf06b
leaq -0x1f0(%rbp), %rdi
callq 0x3140
movq -0x278(%rbp), %rdi
addq $0x8, %rdi
movzwl -0x1d0(%rbp), %eax
movl %eax, %esi
callq 0xf580
movq %rax, %rdi
callq 0x7d30
movw %ax, -0x2b2(%rbp)
jmp 0xf0a1
movw -0x2b2(%rbp), %ax
movzwl %ax, %ecx
subl $0x1, %ecx
movzwl -0x1d0(%rbp), %eax
addl %ecx, %eax
movw %ax, -0x1d0(%rbp)
jmp 0xf32f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0xf438
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x3140
jmp 0xf438
movq -0x278(%rbp), %rdi
movzwl -0x1d0(%rbp), %eax
movq %rax, -0x2c0(%rbp)
addq $0x8, %rdi
callq 0xc600
movq %rax, %rcx
movq -0x2c0(%rbp), %rax
cmpq %rcx, %rax
jae 0xf1bd
movq -0x278(%rbp), %rdi
leaq -0x190(%rbp), %rax
movq %rax, -0x2c8(%rbp)
addq $0x8, %rdi
movzwl -0x1d0(%rbp), %eax
movl %eax, %esi
callq 0xf580
movq %rax, %rsi
movzwl -0x1ce(%rbp), %edx
movzwl -0x1d0(%rbp), %ecx
leaq -0x210(%rbp), %rdi
callq 0x82d0
jmp 0xf174
movq -0x2c8(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x3200
jmp 0xf189
leaq -0x210(%rbp), %rdi
callq 0x3140
jmp 0xf32d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x3140
jmp 0xf438
movq -0x278(%rbp), %rax
leaq -0x190(%rbp), %rcx
movq %rcx, -0x2d8(%rbp)
movq (%rax), %rdi
movzwl -0x1d0(%rbp), %esi
callq 0xa170
movw %ax, -0x2ca(%rbp)
jmp 0xf1ea
movq -0x278(%rbp), %rax
movw -0x2ca(%rbp), %cx
movzwl %cx, %ecx
movl %ecx, -0x2dc(%rbp)
movq (%rax), %rsi
leaq -0x24c(%rbp), %rdi
callq 0xa580
jmp 0xf212
leaq -0x24c(%rbp), %rdi
callq 0x3a70
movw %ax, -0x2de(%rbp)
jmp 0xf227
movq -0x278(%rbp), %rax
movl -0x2dc(%rbp), %ecx
movw -0x2de(%rbp), %dx
movzwl %dx, %edx
addl %edx, %ecx
movl %ecx, -0x2e4(%rbp)
movq (%rax), %rsi
leaq -0x268(%rbp), %rdi
callq 0xa580
jmp 0xf257
leaq -0x268(%rbp), %rdi
callq 0x3ab0
movw %ax, -0x2e6(%rbp)
jmp 0xf26c
movl -0x2e4(%rbp), %eax
movw -0x2e6(%rbp), %cx
movzwl %cx, %ecx
addl %ecx, %eax
cltq
movq %rax, -0x2f8(%rbp)
leaq -0x269(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x33d0
movq -0x2f8(%rbp), %rsi
movq -0x2f0(%rbp), %rcx
leaq -0x230(%rbp), %rdi
movl $0x20, %edx
callq 0x8c40
jmp 0xf2bb
movq -0x2d8(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3200
jmp 0xf2d0
leaq -0x230(%rbp), %rdi
callq 0x3140
leaq -0x269(%rbp), %rdi
callq 0x3280
jmp 0xf32d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0xf31c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x3140
leaq -0x269(%rbp), %rdi
callq 0x3280
jmp 0xf438
jmp 0xf32f
movzwl -0x1d0(%rbp), %eax
movzwl -0x12(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xf37e
leaq -0x190(%rbp), %rax
movq %rax, -0x308(%rbp)
leaq -0x1bc(%rbp), %rdi
callq 0x3a30
movq %rax, -0x300(%rbp)
jmp 0xf364
movq -0x308(%rbp), %rdi
movq -0x300(%rbp), %rax
movsbl (%rax), %esi
callq 0x32d0
jmp 0xf37c
jmp 0xf37e
jmp 0xf380
movw -0x1d0(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x1d0(%rbp)
jmp 0xef8f
leaq -0x190(%rbp), %rax
movq %rax, -0x318(%rbp)
leaq -0x1bc(%rbp), %rdi
callq 0x39b0
movq %rax, -0x310(%rbp)
jmp 0xf3ba
movq -0x318(%rbp), %rdi
movq -0x310(%rbp), %rax
movsbl (%rax), %esi
callq 0x32d0
movq %rax, -0x320(%rbp)
jmp 0xf3d9
movq -0x320(%rbp), %rdi
movq 0x9bc1(%rip), %rsi      # 0x18fa8
callq 0x3260
jmp 0xf3ee
jmp 0xf3f0
movw -0x1ce(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x1ce(%rbp)
jmp 0xef38
movq -0x288(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x3220
jmp 0xf41c
leaq -0x1a0(%rbp), %rdi
callq 0x31a0
movq -0x280(%rbp), %rax
addq $0x320, %rsp            # imm = 0x320
popq %rbp
retq
leaq -0x1a0(%rbp), %rdi
callq 0x31a0
movq -0x1c8(%rbp), %rdi
callq 0x33c0