// File: lvandeve[P]base256/base256.cpp
// Function: CP1252::decode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string decode(const std::string& s) {
    if(newline) return "not supported with printnewline enabled";
    if(printnull) return "not supported with printnull enabled";
    std::vector<int> u = string_to_unicode(s);
    std::string result;
    for(int i = 0; i < u.size(); i++) {
      if(u[i] == 10) {
        continue;
      } else if(!inv1252.count(u[i])) {
        std::cout << "invalid character: " << u[i] << " at " << i << std::endl;
        result.push_back('?');
      } else {
        result.push_back(inv1252[u[i]]);
      }
    }
    return result;
  }

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0x50(%rsp)
movq %rdi, %rax
movq %rax, 0x58(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x60(%rsp)
testb $0x1, 0x8(%rax)
je 0x17a51
leaq 0x9f(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x54f0
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rdx
leaq 0xa6e2(%rip), %rsi      # 0x220f4
callq 0x53d0
jmp 0x17a19
leaq 0x9f(%rsp), %rdi
callq 0x5300
jmp 0x17c81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x9f(%rsp), %rdi
callq 0x5300
jmp 0x17c8e
movq 0x60(%rsp), %rax
testb $0x1, 0x9(%rax)
je 0x17abe
leaq 0x8b(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x54f0
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rdx
leaq 0xa69d(%rip), %rsi      # 0x2211c
callq 0x53d0
jmp 0x17a86
leaq 0x8b(%rsp), %rdi
callq 0x5300
jmp 0x17c81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x8b(%rsp), %rdi
callq 0x5300
jmp 0x17c8e
movq 0xa0(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x6d30
movq 0x50(%rsp), %rdi
movb $0x0, 0x6f(%rsp)
callq 0x5400
movl $0x0, 0x68(%rsp)
movslq 0x68(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xd600
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jae 0x17c61
movslq 0x68(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x17460
cmpl $0xa, (%rax)
jne 0x17b25
jmp 0x17c51
movslq 0x68(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x17460
movq %rax, %rsi
leaq 0x14ff2(%rip), %rdi     # 0x2cb30
callq 0x17480
movq %rax, 0x30(%rsp)
jmp 0x17b4a
movq 0x30(%rsp), %rax
cmpq $0x0, %rax
jne 0x17c12
movq 0x14468(%rip), %rdi     # 0x2bfc8
leaq 0xa5da(%rip), %rsi      # 0x22141
callq 0x5290
movq %rax, 0x28(%rsp)
jmp 0x17b73
movslq 0x68(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x17460
movq 0x28(%rsp), %rdi
movl (%rax), %esi
callq 0x54c0
movq %rax, 0x20(%rsp)
jmp 0x17b95
movq 0x20(%rsp), %rdi
leaq 0xa5b4(%rip), %rsi      # 0x22155
callq 0x5290
movq %rax, 0x18(%rsp)
jmp 0x17bad
movq 0x18(%rsp), %rdi
movl 0x68(%rsp), %esi
callq 0x54c0
movq %rax, 0x10(%rsp)
jmp 0x17bc2
movq 0x10(%rsp), %rdi
movq 0x143e2(%rip), %rsi     # 0x2bfb0
callq 0x52e0
jmp 0x17bd5
movq 0x50(%rsp), %rdi
movl $0x3f, %esi
callq 0x5240
jmp 0x17be6
jmp 0x17c4d
movq 0x50(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
callq 0x5558
leaq 0x70(%rsp), %rdi
callq 0xd590
jmp 0x17c8e
movslq 0x68(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x17460
movq %rax, %rsi
leaq 0x14f05(%rip), %rdi     # 0x2cb30
callq 0xd6e0
movq %rax, 0x8(%rsp)
jmp 0x17c37
movq 0x50(%rsp), %rdi
movq 0x8(%rsp), %rax
movsbl (%rax), %esi
callq 0x5240
jmp 0x17c4b
jmp 0x17c4d
jmp 0x17c4f
jmp 0x17c51
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x17ae7
movb $0x1, 0x6f(%rsp)
testb $0x1, 0x6f(%rsp)
jne 0x17c77
movq 0x50(%rsp), %rdi
callq 0x5558
leaq 0x70(%rsp), %rdi
callq 0xd590
movq 0x58(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x90(%rsp), %rdi
callq 0x54e0
nopl (%rax,%rax)