// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]base256/base256.cpp
// Function: Printer::encode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string encode(const std::string& s) {
    size_t lnlen = valtostr(s.size(), linenumbersbase == 16).size();
    std::string result;
    for(int i = 0; i < s.size(); i++) {
      bool wrapped = false;
      if(wrap && numbytes >= wrap) {
        result += n->lineend();
        if(n->allowlinebreaks()) result += "\n";
        numbytes = 0;
        wrapped = true;
      }
      if(printlinenumbers && numbytes == 0) {
        std::string ln = valtostr(i, linenumbersbase == 16);
        while (ln.size() < lnlen) ln = " " + ln;
        result += ln + ": ";
      }
      if(i == 0) result += n->open();
      if(wrapped) result += n->linebeg();
      unsigned char prev = (i > 0) ? s[i - 1] : 0;
      unsigned char next = (i + 1 < s.size()) ? s[i + 1] : 0;
      size_t outwidth = 0;
      std::string temp = encodeChar(s[i], prev, next, &outwidth);
      result += temp;
      if(comma) result += ",";
      if(comma || n->space()) result += " ";
      if(temp == "\n") {
        numbytes = 0;
      }
      if(n->outwidth()) {
        // For C string literals, with variable length characters, align the width
        // based on the output width rather than the input width.
        numbytes += outwidth;
      } else {
        numbytes++;
      }
    }
    result += n->close();
    return result;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
movq 0x8(%rdx), %rax
leaq 0x40(%rsp), %rsi
movq %rax, (%rsi)
xorl %edx, %edx
cmpl $0x10, 0x14(%r14)
sete %dl
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0xb2c1
movq (%r12), %rdi
movq 0x8(%r12), %rbx
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xace4
callq 0x5210
movq 0x8(%rsp), %rax
leaq 0x10(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x0, 0x14(%rsp)
cmpq $0x0, 0x8(%r15)
je 0xafe6
leaq 0x18(%rsp), %r12
leaq 0x79b5(%rip), %rbp      # 0x126d5
leaq 0x40(%rsp), %r13
movq %r15, 0x60(%rsp)
movl 0x8(%r14), %eax
testl %eax, %eax
setne %cl
cmpl %eax, 0xc(%r14)
setge %r15b
andb %cl, %r15b
cmpb $0x1, %r15b
jne 0xad9e
movq (%r14), %rsi
movq (%rsi), %rax
movq %r12, %rdi
callq *0x58(%rax)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x50b0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xad78
callq 0x5210
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
testb %al, %al
je 0xad96
movq 0x8(%rsp), %rdi
leaq 0x695a(%rip), %rsi      # 0x116eb
callq 0x5430
movl $0x0, 0xc(%r14)
cmpb $0x1, 0x10(%r14)
jne 0xae69
cmpl $0x0, 0xc(%r14)
jne 0xae69
xorl %edx, %edx
cmpl $0x10, 0x14(%r14)
sete %dl
movq %r12, %rdi
leaq 0x14(%rsp), %rsi
callq 0xdea1
movq 0x20(%rsp), %rdx
cmpq %rbx, %rdx
jae 0xae04
movq %r13, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0xb528
movq %r12, %rdi
movq %r13, %rsi
callq 0x52b0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xadcb
callq 0x5210
jmp 0xadcb
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x18(%rsp), %rsi
addq %rsi, %rdx
movq %r13, %rdi
callq 0xfdda
movq %r13, %rdi
leaq 0x75ee(%rip), %rsi      # 0x12416
callq 0x5430
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x50b0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xae55
callq 0x5210
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xae69
callq 0x5210
cmpl $0x0, 0x14(%rsp)
jne 0xaea4
movq (%r14), %rsi
movq (%rsi), %rax
movq %r12, %rdi
callq *0x40(%rax)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x50b0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xaea4
callq 0x5210
testb %r15b, %r15b
movq 0x60(%rsp), %r15
je 0xaee2
movq (%r14), %rsi
movq (%rsi), %rax
movq %r12, %rdi
callq *0x50(%rax)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x50b0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xaee2
callq 0x5210
movslq 0x14(%rsp), %rax
testq %rax, %rax
jle 0xaef5
movq (%r15), %rcx
movb -0x1(%rcx,%rax), %cl
jmp 0xaef7
xorl %ecx, %ecx
movq %rax, %rdx
incq %rdx
cmpq %rdx, 0x8(%r15)
jbe 0xaf0c
movq (%r15), %rsi
movb (%rsi,%rdx), %sil
jmp 0xaf0e
xorl %esi, %esi
movq $0x0, 0x40(%rsp)
movq (%r15), %rdx
movzbl (%rdx,%rax), %edx
movzbl %cl, %ecx
movzbl %sil, %r8d
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %r9
callq 0xf1dc
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x50b0
cmpb $0x1, 0x19(%r14)
jne 0xaf5f
movq 0x8(%rsp), %rdi
leaq 0x7781(%rip), %rsi      # 0x126db
callq 0x5430
cmpb $0x0, 0x19(%r14)
jne 0xaf73
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
testb %al, %al
je 0xaf80
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x5430
movq %r12, %rdi
leaq 0x6761(%rip), %rsi      # 0x116eb
callq 0x5090
testl %eax, %eax
jne 0xaf9b
movl $0x0, 0xc(%r14)
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
testb %al, %al
je 0xafb2
movl 0xc(%r14), %eax
addl 0x40(%rsp), %eax
jmp 0xafb8
movl 0xc(%r14), %eax
incl %eax
movl %eax, 0xc(%r14)
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xafd0
callq 0x5210
movslq 0x14(%rsp), %rax
incq %rax
movl %eax, 0x14(%rsp)
cmpq %rax, 0x8(%r15)
ja 0xad2a
movq (%r14), %rsi
movq (%rsi), %rax
leaq 0x18(%rsp), %rdi
callq *0x48(%rax)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x50b0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xb01c
callq 0x5210
movq 0x8(%rsp), %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb068
jmp 0xb061
jmp 0xb068
jmp 0xb061
jmp 0xb061
jmp 0xb068
jmp 0xb061
jmp 0xb046
jmp 0xb068
jmp 0xb061
jmp 0xb068
movq %rax, %r14
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xb06b
callq 0x5210
jmp 0xb06b
jmp 0xb061
movq %rax, %r14
jmp 0xb07f
jmp 0xb068
movq %rax, %r14
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xb07f
callq 0x5210
movq 0x38(%rsp), %rcx
movq 0x8(%rsp), %rax
movq (%rax), %rdi
cmpq %rcx, %rdi
je 0xb096
callq 0x5210
movq %r14, %rdi
callq 0x53e0