// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/formatter.cpp
// Function: ash::SpacedFormatter::insert(ash::ResultSet const*, std::ostream&) const
void SpacedFormatter::insert(const ResultSet * rs, ostream & out) const {
  if (!rs) return;  // Sanity check.

  vector<size_t> widths = get_widths(rs, do_show_headings);

  // Print the headings, if not suppressed.
  if (do_show_headings) {
    size_t c = 0, cols = widths.size();
    ResultSet::HeadersType::const_iterator i, e;
    for (i = (rs -> headers).begin(), e = (rs -> headers).end(); i != e; ++i) {
      if (c < cols - 1) out << left << setw(widths[c++]);
      out << *i;
    }
    out << endl;
  }

  // Iterate over the data once more, printing.
  for (size_t r = 0; r < rs -> rows; ++r) {
    for (size_t c = 0; c < rs -> columns; ++c) {
      if (c < rs -> columns - 1) out << left << setw(widths[c]);
      out << (rs -> data)[r][c];
    }
    out << endl;
  }
}

// Assembly:
subq $0x118, %rsp            # imm = 0x118
movq %rdi, 0x110(%rsp)
movq %rsi, 0x108(%rsp)
movq %rdx, 0x100(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x80(%rsp)
cmpq $0x0, 0x108(%rsp)
jne 0x9c39f
jmp 0x9c747
movq 0x80(%rsp), %rax
movq 0x108(%rsp), %rsi
movb 0x48(%rax), %al
leaq 0xe8(%rsp), %rdi
andb $0x1, %al
movzbl %al, %edx
callq 0x9c000
movq 0x80(%rsp), %rax
testb $0x1, 0x48(%rax)
je 0x9c5c5
movq $0x0, 0xe0(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x9e360
movq %rax, 0x78(%rsp)
jmp 0x9c3f6
movq 0x78(%rsp), %rax
movq %rax, 0xd8(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x9e210
jmp 0x9c412
leaq 0xb8(%rsp), %rdi
callq 0x9e210
jmp 0x9c421
movq 0x108(%rsp), %rdi
callq 0x94ad0
movq %rax, 0x70(%rsp)
jmp 0x9c435
movq 0x70(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x108(%rsp), %rdi
callq 0x94b00
movq %rax, 0x68(%rsp)
jmp 0x9c466
movq 0x68(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x94bd0
movb %al, 0x67(%rsp)
jmp 0x9c49e
movb 0x67(%rsp), %al
testb $0x1, %al
jne 0x9c4ab
jmp 0x9c5ad
movq 0xe0(%rsp), %rax
movq 0xd8(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x9c565
movq 0x100(%rsp), %rdi
leaq -0xf457(%rip), %rsi     # 0x8d080
callq 0x8140
movq %rax, 0x58(%rsp)
jmp 0x9c4e3
movq 0xe0(%rsp), %rsi
movq %rsi, %rax
incq %rax
movq %rax, 0xe0(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x9e2c0
movq %rax, 0x50(%rsp)
jmp 0x9c50d
movq 0x50(%rsp), %rax
movl (%rax), %edi
callq 0x8d0a0
movl %eax, 0x4c(%rsp)
jmp 0x9c51f
movq 0x58(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, 0xa4(%rsp)
movl 0xa4(%rsp), %esi
callq 0x84e0
jmp 0x9c53d
jmp 0x9c565
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x9e2e0
jmp 0x9c74f
movq 0x100(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x94bf0
movq %rax, 0x40(%rsp)
jmp 0x9c586
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdi
callq 0x8350
jmp 0x9c597
jmp 0x9c599
leaq 0xc0(%rsp), %rdi
callq 0x94c10
jmp 0x9c5a8
jmp 0x9c483
movq 0x100(%rsp), %rdi
movq 0x339cc(%rip), %rsi     # 0xcff88
callq 0x8470
jmp 0x9c5c3
jmp 0x9c5c5
movq $0x0, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq 0x108(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x9c73a
movq $0x0, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq 0x108(%rsp), %rcx
cmpq 0x38(%rcx), %rax
jae 0x9c709
movq 0x90(%rsp), %rax
movq 0x108(%rsp), %rcx
movq 0x38(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x9c697
movq 0x100(%rsp), %rdi
leaq -0xf5bd(%rip), %rsi     # 0x8d080
callq 0x8140
movq %rax, 0x30(%rsp)
jmp 0x9c649
movq 0x90(%rsp), %rsi
leaq 0xe8(%rsp), %rdi
callq 0x9e2c0
movq %rax, 0x28(%rsp)
jmp 0x9c665
movq 0x28(%rsp), %rax
movl (%rax), %edi
callq 0x8d0a0
movl %eax, 0x24(%rsp)
jmp 0x9c677
movq 0x30(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x8c(%rsp)
movl 0x8c(%rsp), %esi
callq 0x84e0
jmp 0x9c695
jmp 0x9c697
movq 0x100(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x108(%rsp), %rdi
addq $0x18, %rdi
movq 0x98(%rsp), %rsi
callq 0x94620
movq %rax, 0x18(%rsp)
jmp 0x9c6c4
movq 0x18(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x94640
movq %rax, 0x8(%rsp)
jmp 0x9c6dd
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x8350
jmp 0x9c6ee
jmp 0x9c6f0
movq 0x90(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x90(%rsp)
jmp 0x9c5f7
movq 0x100(%rsp), %rdi
movq 0x33870(%rip), %rsi     # 0xcff88
callq 0x8470
jmp 0x9c71f
jmp 0x9c721
movq 0x98(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x98(%rsp)
jmp 0x9c5d1
leaq 0xe8(%rsp), %rdi
callq 0x9e2e0
addq $0x118, %rsp            # imm = 0x118
retq
jmp 0x9c751
movq 0xd0(%rsp), %rdi
callq 0x87d0
movq %rax, %rdi
callq 0x8cf60
nopw %cs:(%rax,%rax)