// File: lvandeve[P]base256/base256.cpp
// Function: JSONString::encodeChar[abi:cxx11](unsigned char, unsigned char, unsigned char)
std::string encodeChar(unsigned char c, unsigned char prev, unsigned char next) {
    if(c == '\b') return "\\b";
    if(c == '\f') return "\\f";
    if(c == '\n') return "\\n";
    if(c == '\r') return "\\r";
    if(c == '\t') return "\\t";
    if(c == '\\') return "\\\\";
    if(c == '\"') return "\\\"";
    if(c >= 32 && c < 127) {
      std::string result;
      result += c;
      return result;
    }
    static const std::string hex = "0123456789ABCDEF";
    int h0 = (c >> 4) & 15;
    int h1 = (c >> 0) & 15;
    std::string result = "\\u00";
    result += hex[h0];
    result += hex[h1];
    return result;
  }

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x50(%rsp)
movb %r8b, %al
movq %rdi, %r8
movq %r8, 0x58(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movb %dl, 0x87(%rsp)
movb %cl, 0x86(%rsp)
movb %al, 0x85(%rsp)
movzbl 0x87(%rsp), %eax
cmpl $0x8, %eax
jne 0x1c165
leaq 0x84(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x54f0
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rdx
leaq 0x60bf(%rip), %rsi      # 0x221eb
callq 0x53d0
jmp 0x1c133
leaq 0x84(%rsp), %rdi
callq 0x5300
jmp 0x1c597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x84(%rsp), %rdi
callq 0x5300
jmp 0x1c5a4
movzbl 0x87(%rsp), %eax
cmpl $0xc, %eax
jne 0x1c1c5
leaq 0x73(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x54f0
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rdx
leaq 0x605c(%rip), %rsi      # 0x221ee
callq 0x53d0
jmp 0x1c199
leaq 0x73(%rsp), %rdi
callq 0x5300
jmp 0x1c597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x73(%rsp), %rdi
callq 0x5300
jmp 0x1c5a4
movzbl 0x87(%rsp), %eax
cmpl $0xa, %eax
jne 0x1c225
leaq 0x72(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x54f0
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rdx
leaq 0x5fff(%rip), %rsi      # 0x221f1
callq 0x53d0
jmp 0x1c1f9
leaq 0x72(%rsp), %rdi
callq 0x5300
jmp 0x1c597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x72(%rsp), %rdi
callq 0x5300
jmp 0x1c5a4
movzbl 0x87(%rsp), %eax
cmpl $0xd, %eax
jne 0x1c285
leaq 0x71(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x54f0
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x5fa2(%rip), %rsi      # 0x221f4
callq 0x53d0
jmp 0x1c259
leaq 0x71(%rsp), %rdi
callq 0x5300
jmp 0x1c597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x71(%rsp), %rdi
callq 0x5300
jmp 0x1c5a4
movzbl 0x87(%rsp), %eax
cmpl $0x9, %eax
jne 0x1c2e5
leaq 0x70(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x54f0
movq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rdx
leaq 0x5f45(%rip), %rsi      # 0x221f7
callq 0x53d0
jmp 0x1c2b9
leaq 0x70(%rsp), %rdi
callq 0x5300
jmp 0x1c597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x5300
jmp 0x1c5a4
movzbl 0x87(%rsp), %eax
cmpl $0x5c, %eax
jne 0x1c345
leaq 0x6f(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x54f0
movq 0x50(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x5eeb(%rip), %rsi      # 0x221fd
callq 0x53d0
jmp 0x1c319
leaq 0x6f(%rsp), %rdi
callq 0x5300
jmp 0x1c597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x6f(%rsp), %rdi
callq 0x5300
jmp 0x1c5a4
movzbl 0x87(%rsp), %eax
cmpl $0x22, %eax
jne 0x1c3a5
leaq 0x6e(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x54f0
movq 0x50(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x5e8e(%rip), %rsi      # 0x22200
callq 0x53d0
jmp 0x1c379
leaq 0x6e(%rsp), %rdi
callq 0x5300
jmp 0x1c597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x6e(%rsp), %rdi
callq 0x5300
jmp 0x1c5a4
movzbl 0x87(%rsp), %eax
cmpl $0x20, %eax
jl 0x1c41c
movzbl 0x87(%rsp), %eax
cmpl $0x7f, %eax
jge 0x1c41c
movq 0x50(%rsp), %rdi
movb $0x0, 0x6d(%rsp)
callq 0x5400
movq 0x50(%rsp), %rdi
movsbl 0x87(%rsp), %esi
callq 0x51d0
jmp 0x1c3e2
movb $0x1, 0x6d(%rsp)
testb $0x1, 0x6d(%rsp)
jne 0x1c417
jmp 0x1c40d
movq 0x50(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
callq 0x5558
jmp 0x1c5a4
movq 0x50(%rsp), %rdi
callq 0x5558
jmp 0x1c597
cmpb $0x0, 0x107d5(%rip)     # 0x2cbf8
jne 0x1c48f
leaq 0x107cc(%rip), %rdi     # 0x2cbf8
callq 0x5500
cmpl $0x0, %eax
je 0x1c48f
leaq 0x6c(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x54f0
movq 0x10(%rsp), %rdx
leaq 0x10787(%rip), %rdi     # 0x2cbd8
leaq 0x5d57(%rip), %rsi      # 0x221af
callq 0x53d0
jmp 0x1c45f
leaq 0x6c(%rsp), %rdi
callq 0x5300
movq 0xfb48(%rip), %rdi      # 0x2bfb8
leaq 0x10761(%rip), %rsi     # 0x2cbd8
leaq 0xfe3a(%rip), %rdx      # 0x2c2b8
callq 0x5250
leaq 0x1076e(%rip), %rdi     # 0x2cbf8
callq 0x51f0
movzbl 0x87(%rsp), %eax
shrl $0x4, %eax
movl %eax, 0x68(%rsp)
movzbl 0x87(%rsp), %eax
andl $0xf, %eax
movl %eax, 0x64(%rsp)
movb $0x0, 0x63(%rsp)
leaq 0x62(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x54f0
movq 0x50(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x5d66(%rip), %rsi      # 0x22238
callq 0x53d0
jmp 0x1c4d9
leaq 0x62(%rsp), %rdi
callq 0x5300
movslq 0x68(%rsp), %rsi
leaq 0x106e9(%rip), %rdi     # 0x2cbd8
callq 0x5320
movq 0x50(%rsp), %rdi
movsbl (%rax), %esi
callq 0x51d0
jmp 0x1c503
movslq 0x64(%rsp), %rsi
leaq 0x106c9(%rip), %rdi     # 0x2cbd8
callq 0x5320
movq 0x50(%rsp), %rdi
movsbl (%rax), %esi
callq 0x51d0
jmp 0x1c523
movb $0x1, 0x63(%rsp)
testb $0x1, 0x63(%rsp)
jne 0x1c595
jmp 0x1c58b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x6c(%rsp), %rdi
callq 0x5300
leaq 0x106a8(%rip), %rdi     # 0x2cbf8
callq 0x51e0
jmp 0x1c5a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x62(%rsp), %rdi
callq 0x5300
jmp 0x1c5a4
movq 0x50(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
callq 0x5558
jmp 0x1c5a4
movq 0x50(%rsp), %rdi
callq 0x5558
jmp 0x1c597
movq 0x58(%rsp), %rax
addq $0x98, %rsp
retq
movq 0x78(%rsp), %rdi
callq 0x54e0
nop