// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
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 0xb057
movq (%r12), %rdi
movq 0x8(%r12), %r15
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xaa90
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(%rbx)
je 0xad8b
leaq 0x18(%rsp), %r12
leaq 0x7c09(%rip), %rbp      # 0x126d5
leaq 0x40(%rsp), %r13
movq %rbx, 0x60(%rsp)
movl 0x8(%r14), %ecx
movl 0xc(%r14), %eax
testl %ecx, %ecx
setne %dl
cmpl %ecx, %eax
setge %bl
andb %dl, %bl
cmpb $0x1, %bl
jne 0xab4b
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 0xab23
callq 0x5210
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
testb %al, %al
je 0xab41
movq 0x8(%rsp), %rdi
leaq 0x6baf(%rip), %rsi      # 0x116eb
callq 0x5430
movl $0x0, 0xc(%r14)
xorl %eax, %eax
testl %eax, %eax
sete %al
andb 0x10(%r14), %al
cmpb $0x1, %al
jne 0xac11
xorl %edx, %edx
cmpl $0x10, 0x14(%r14)
sete %dl
movq %r12, %rdi
leaq 0x14(%rsp), %rsi
callq 0xdbd8
movq 0x20(%rsp), %rdx
cmpq %r15, %rdx
jae 0xabac
movq %r13, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0xb2c4
movq %r12, %rdi
movq %r13, %rsi
callq 0x52b0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xab73
callq 0x5210
jmp 0xab73
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x18(%rsp), %rsi
addq %rsi, %rdx
movq %r13, %rdi
callq 0xfb3e
movq %r13, %rdi
leaq 0x7846(%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 0xabfd
callq 0x5210
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xac11
callq 0x5210
cmpl $0x0, 0x14(%rsp)
jne 0xac4c
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 0xac4c
callq 0x5210
testb %bl, %bl
movq 0x60(%rsp), %rbx
je 0xac89
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 0xac89
callq 0x5210
movslq 0x14(%rsp), %rax
movq (%rbx), %rcx
testq %rax, %rax
jle 0xac9d
movb -0x1(%rcx,%rax), %sil
jmp 0xac9f
xorl %esi, %esi
movq %rax, %rdx
incq %rdx
cmpq %rdx, 0x8(%rbx)
jbe 0xacb1
movb (%rcx,%rdx), %dil
jmp 0xacb3
xorl %edi, %edi
movq $0x0, 0x40(%rsp)
movzbl (%rcx,%rax), %edx
movzbl %sil, %ecx
movzbl %dil, %r8d
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %r9
callq 0xef12
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x50b0
movb 0x19(%r14), %al
cmpb $0x1, %al
jne 0xad07
movq 0x8(%rsp), %rdi
leaq 0x79dd(%rip), %rsi      # 0x126db
callq 0x5430
movb 0x19(%r14), %al
testb $0x1, %al
jne 0xad18
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
testb %al, %al
je 0xad25
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x5430
movq %r12, %rdi
leaq 0x69bc(%rip), %rsi      # 0x116eb
callq 0x5090
testl %eax, %eax
jne 0xad40
movl $0x0, 0xc(%r14)
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
testb %al, %al
je 0xad57
movl 0xc(%r14), %eax
addl 0x40(%rsp), %eax
jmp 0xad5d
movl 0xc(%r14), %eax
incl %eax
movl %eax, 0xc(%r14)
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xad75
callq 0x5210
movslq 0x14(%rsp), %rax
incq %rax
movl %eax, 0x14(%rsp)
cmpq %rax, 0x8(%rbx)
ja 0xaad6
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 0xadc1
callq 0x5210
movq 0x8(%rsp), %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xae0d
jmp 0xae06
jmp 0xae0d
jmp 0xae06
jmp 0xae06
jmp 0xae0d
jmp 0xae06
jmp 0xadeb
jmp 0xae0d
jmp 0xae06
jmp 0xae0d
movq %rax, %r14
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xae10
callq 0x5210
jmp 0xae10
jmp 0xae06
movq %rax, %r14
jmp 0xae24
jmp 0xae0d
movq %rax, %r14
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xae24
callq 0x5210
movq 0x38(%rsp), %rcx
movq 0x8(%rsp), %rax
movq (%rax), %rdi
cmpq %rcx, %rdi
je 0xae3b
callq 0x5210
movq %r14, %rdi
callq 0x53e0
nop