// File: /workspace/github_cpp_makefile_star2_O1/Phidelux[P]terminal-table/src/cell.cpp
// Function: bornageek::utils::termtab::Cell::render[abi:cxx11](unsigned short, unsigned short) const
const std::string Cell::render(const std::uint16_t line, const std::uint16_t col) const {
        std::stringstream ss;

        std::uint16_t width = this->width(col);

        std::string left(this->mTable->style().paddingLeft(), ' ');
        std::string right(this->mTable->style().paddingRight(), ' ');

        switch(this->mAlign) {
          case Alignment::LEFT:
            ss << left << std::setw(width) 
              << std::left << std::setfill(' ') << this->line(line) << right;
            break;
          case Alignment::RIGHT:
            ss << left << std::setw(width) 
              << std::right << std::setfill(' ') << this->line(line) << right;
            break;
          case Alignment::CENTER:
            std::string val = this->line(line); 
            std::uint16_t innerWidth = width + this->mTable->cellPadding();
            std::uint16_t spaceLeft = innerWidth / 2 - val.length() / 2;
            
            ss << std::string(spaceLeft, ' ') << std::setw(innerWidth - spaceLeft)
               << std::left << std::setfill(' ') << this->line(line);
            break;
        }

        return ss.str();
      }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x20e0
movq %r14, %rdi
movl %r15d, %esi
callq 0x3f78
movl %eax, %r15d
movq (%r14), %rsi
leaq 0x20(%rsp), %rdi
callq 0x52cc
leaq 0x20(%rsp), %rdi
callq 0x2594
movzwl %ax, %esi
leaq 0x50(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x40(%rsp), %rdi
movl $0x20, %edx
callq 0x21b0
movq (%r14), %rsi
movq %rsp, %rdi
callq 0x52cc
movq %rsp, %rdi
callq 0x25a2
movzwl %ax, %esi
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %rdi
movl $0x20, %edx
callq 0x21b0
movl 0x28(%r14), %eax
testl %eax, %eax
je 0x4586
cmpl $0x1, %eax
je 0x44d4
cmpl $0x2, %eax
jne 0x464b
movzwl %bp, %ebp
movq %rsp, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x4122
movq (%r14), %rdi
callq 0x4dc0
addl %r15d, %eax
movzwl %ax, %r12d
movl %r12d, %r13d
shrl %r13d
movq 0x8(%rsp), %rax
shrq %rax
subq %rax, %r13
movzwl %r13w, %esi
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x60(%rsp), %rdi
movl $0x20, %edx
callq 0x21b0
leaq 0xb0(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x21a0
movq %rax, %r15
movzwl %r13w, %eax
subl %eax, %r12d
movq (%r15), %rax
movq -0x18(%rax), %rcx
movslq %r12d, %rdx
movq %rdx, 0x10(%r15,%rcx)
movq -0x18(%rax), %rcx
movl $0xffffff4f, %edx       # imm = 0xFFFFFF4F
andl 0x18(%r15,%rcx), %edx
orl $0x20, %edx
movl %edx, 0x18(%r15,%rcx)
movq -0x18(%rax), %rax
movq %r15, %r12
addq %rax, %r12
cmpb $0x0, 0xe1(%r15,%rax)
jne 0x4456
movq %r12, %rdi
movl $0x20, %esi
callq 0x2150
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
leaq 0x50(%rsp), %r13
callq 0x4122
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq %r15, %rdi
callq 0x21a0
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x44af
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x4630
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x4630
leaq 0xb0(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x21a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rcx
movzwl %r15w, %edx
movq %rdx, 0x10(%r12,%rcx)
movq -0x18(%rax), %rcx
movl $0xffffff4f, %edx       # imm = 0xFFFFFF4F
andl 0x18(%r12,%rcx), %edx
orl $0x80, %edx
movl %edx, 0x18(%r12,%rcx)
movq -0x18(%rax), %rax
movq %r12, %r15
addq %rax, %r15
cmpb $0x0, 0xe1(%r12,%rax)
jne 0x4548
movq %r15, %rdi
movl $0x20, %esi
callq 0x2150
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movzwl %bp, %edx
movq %rsp, %rdi
movq %r14, %rsi
callq 0x4122
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r12, %rdi
callq 0x21a0
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rax, %rdi
callq 0x21a0
jmp 0x4630
leaq 0xb0(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x21a0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rcx
movzwl %r15w, %edx
movq %rdx, 0x10(%r12,%rcx)
movq -0x18(%rax), %rcx
movl $0xffffff4f, %edx       # imm = 0xFFFFFF4F
andl 0x18(%r12,%rcx), %edx
orl $0x20, %edx
movl %edx, 0x18(%r12,%rcx)
movq -0x18(%rax), %rax
movq %r12, %r15
addq %rax, %r15
cmpb $0x0, 0xe1(%r12,%rax)
jne 0x45f7
movq %r15, %rdi
movl $0x20, %esi
callq 0x2150
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movzwl %bp, %edx
movq %rsp, %rdi
movq %r14, %rsi
callq 0x4122
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r12, %rdi
callq 0x21a0
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rax, %rdi
callq 0x21a0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x464b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
leaq 0xb8(%rsp), %rsi
movq %rbx, %rdi
callq 0x2220
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4677
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x468e
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x790b(%rip), %rsi      # 0xbfa0
leaq 0xa0(%rsp), %rdi
callq 0x2110
leaq 0x120(%rsp), %rdi
callq 0x2050
movq %rbx, %rax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x46f9
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x46f9
jmp 0x46f6
jmp 0x4719
jmp 0x473f
jmp 0x473f
jmp 0x4719
jmp 0x473f
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x471c
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x471c
jmp 0x4719
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4742
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x4742
jmp 0x4760
jmp 0x4781
jmp 0x4781
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4763
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x4763
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x4784
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x4784
movq %rax, %rbx
movq 0x7815(%rip), %rsi      # 0xbfa0
leaq 0xa0(%rsp), %rdi
callq 0x2110
leaq 0x120(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2260