// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/formatter.cpp
// Function: insert_delimited(ash::ResultSet const*, std::ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
void insert_delimited(const ResultSet * rs, ostream & out, const string & d,
                      const bool do_show_headings)
{
  if (!rs) return;

  const ResultSet::HeadersType & headers = rs -> headers;
  ResultSet::HeadersType::const_iterator i, e;

  if (do_show_headings) {
    size_t c = 0;
    for (i = headers.begin(), e = headers.end(); i != e; ++i, ++c)
      // Don't add a delimiter after the last column.
      out << *i << (c + 1 < rs -> columns ? d : "");
    out << endl;
  }

  // Loop ofer the rs.data inserting delimited text.
  for (size_t r = 0; r < rs -> rows; ++r) {
    for (size_t c = 0; c < rs -> columns; ++c) {
      out << rs -> data[r][c] << (c + 1 < rs -> columns ? d : "");
    }
    out << endl;
  }
}

// Assembly:
subq $0xf8, %rsp
movb %cl, %al
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
andb $0x1, %al
movb %al, 0xdf(%rsp)
cmpq $0x0, 0xf0(%rsp)
jne 0x9c7aa
jmp 0x9cb4a
movq 0xf0(%rsp), %rax
movq %rax, 0xd0(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x9e210
leaq 0xc0(%rsp), %rdi
callq 0x9e210
testb $0x1, 0xdf(%rsp)
je 0x9c9ba
movq $0x0, 0xb8(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x94ad0
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x94b00
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0xc0(%rsp)
leaq 0xc8(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x94bd0
testb $0x1, %al
jne 0x9c856
jmp 0x9c9a6
movq 0xe8(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x94bf0
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x8350
movq %rax, 0x30(%rsp)
movq 0xb8(%rsp), %rax
addq $0x1, %rax
movq 0xf0(%rsp), %rcx
movq 0x38(%rcx), %rcx
movb $0x0, 0x86(%rsp)
cmpq %rcx, %rax
jae 0x9c8be
movq 0xe0(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0x81a0
jmp 0x9c8f5
leaq 0x87(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x87f0
movq 0x20(%rsp), %rdx
movb $0x1, 0x86(%rsp)
leaq 0x16511(%rip), %rsi     # 0xb2df5
leaq 0x88(%rsp), %rdi
callq 0x85b0
jmp 0x9c8f3
jmp 0x9c8f5
movq 0x30(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x8350
jmp 0x9c909
leaq 0x88(%rsp), %rdi
callq 0x88f8
jmp 0x9c918
testb $0x1, 0x86(%rsp)
jne 0x9c924
jmp 0x9c931
leaq 0x87(%rsp), %rdi
callq 0x84a0
jmp 0x9c933
leaq 0xc8(%rsp), %rdi
callq 0x94c10
movq 0xb8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb8(%rsp)
jmp 0x9c838
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x9c988
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x88f8
jmp 0x9c986
jmp 0x9c988
testb $0x1, 0x86(%rsp)
jne 0x9c994
jmp 0x9c9a1
leaq 0x87(%rsp), %rdi
callq 0x84a0
jmp 0x9cb52
movq 0xe8(%rsp), %rdi
movq 0x335d3(%rip), %rsi     # 0xcff88
callq 0x8470
movq $0x0, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq 0xf0(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x9cb4a
movq $0x0, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq 0xf0(%rsp), %rcx
cmpq 0x38(%rcx), %rax
jae 0x9cb23
movq 0xe8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xf0(%rsp), %rdi
addq $0x18, %rdi
movq 0x68(%rsp), %rsi
callq 0x94620
movq %rax, %rdi
movq 0x60(%rsp), %rsi
callq 0x94640
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x8350
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq 0xf0(%rsp), %rcx
movq 0x38(%rcx), %rcx
movb $0x0, 0x3e(%rsp)
cmpq %rcx, %rax
jae 0x9ca6f
movq 0xe0(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x81a0
jmp 0x9ca9d
leaq 0x3f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x87f0
movq 0x8(%rsp), %rdx
movb $0x1, 0x3e(%rsp)
leaq 0x16366(%rip), %rsi     # 0xb2df5
leaq 0x40(%rsp), %rdi
callq 0x85b0
jmp 0x9ca9b
jmp 0x9ca9d
movq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x8350
jmp 0x9caae
leaq 0x40(%rsp), %rdi
callq 0x88f8
jmp 0x9caba
testb $0x1, 0x3e(%rsp)
jne 0x9cac3
jmp 0x9cacd
leaq 0x3f(%rsp), %rdi
callq 0x84a0
jmp 0x9cacf
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0x9c9e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x9cb0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x88f8
jmp 0x9cb0c
jmp 0x9cb0e
testb $0x1, 0x3e(%rsp)
jne 0x9cb17
jmp 0x9cb21
leaq 0x3f(%rsp), %rdi
callq 0x84a0
jmp 0x9cb52
movq 0xe8(%rsp), %rdi
movq 0x33456(%rip), %rsi     # 0xcff88
callq 0x8470
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x9c9c3
addq $0xf8, %rsp
retq
movq 0x78(%rsp), %rdi
callq 0x87d0
movq %rax, %rdi
callq 0x8cf60
nopw %cs:(%rax,%rax)