// File: lvandeve[P]base256/base256.cpp
// Function: CP437::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(!inv437.count(u[i])) {
        std::cout << "invalid character: " << u[i] << " at " << i << std::endl;
        result.push_back('?');
      } else {
        result.push_back(inv437[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 0x166b1
leaq 0x9f(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x54f0
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rdx
leaq 0xba82(%rip), %rsi      # 0x220f4
callq 0x53d0
jmp 0x16679
leaq 0x9f(%rsp), %rdi
callq 0x5300
jmp 0x168e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x9f(%rsp), %rdi
callq 0x5300
jmp 0x168ee
movq 0x60(%rsp), %rax
testb $0x1, 0x9(%rax)
je 0x1671e
leaq 0x8b(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x54f0
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rdx
leaq 0xba3d(%rip), %rsi      # 0x2211c
callq 0x53d0
jmp 0x166e6
leaq 0x8b(%rsp), %rdi
callq 0x5300
jmp 0x168e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x8b(%rsp), %rdi
callq 0x5300
jmp 0x168ee
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 0x168c1
movslq 0x68(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x17460
cmpl $0xa, (%rax)
jne 0x16785
jmp 0x168b1
movslq 0x68(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x17460
movq %rax, %rsi
leaq 0x16362(%rip), %rdi     # 0x2cb00
callq 0x17480
movq %rax, 0x30(%rsp)
jmp 0x167aa
movq 0x30(%rsp), %rax
cmpq $0x0, %rax
jne 0x16872
movq 0x15808(%rip), %rdi     # 0x2bfc8
leaq 0xb97a(%rip), %rsi      # 0x22141
callq 0x5290
movq %rax, 0x28(%rsp)
jmp 0x167d3
movslq 0x68(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x17460
movq 0x28(%rsp), %rdi
movl (%rax), %esi
callq 0x54c0
movq %rax, 0x20(%rsp)
jmp 0x167f5
movq 0x20(%rsp), %rdi
leaq 0xb954(%rip), %rsi      # 0x22155
callq 0x5290
movq %rax, 0x18(%rsp)
jmp 0x1680d
movq 0x18(%rsp), %rdi
movl 0x68(%rsp), %esi
callq 0x54c0
movq %rax, 0x10(%rsp)
jmp 0x16822
movq 0x10(%rsp), %rdi
movq 0x15782(%rip), %rsi     # 0x2bfb0
callq 0x52e0
jmp 0x16835
movq 0x50(%rsp), %rdi
movl $0x3f, %esi
callq 0x5240
jmp 0x16846
jmp 0x168ad
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 0x168ee
movslq 0x68(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x17460
movq %rax, %rsi
leaq 0x16275(%rip), %rdi     # 0x2cb00
callq 0xd6e0
movq %rax, 0x8(%rsp)
jmp 0x16897
movq 0x50(%rsp), %rdi
movq 0x8(%rsp), %rax
movsbl (%rax), %esi
callq 0x5240
jmp 0x168ab
jmp 0x168ad
jmp 0x168af
jmp 0x168b1
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x16747
movb $0x1, 0x6f(%rsp)
testb $0x1, 0x6f(%rsp)
jne 0x168d7
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)