// File: yhirose[P]fizzbuzzlang/./peglib.h
// Function: peg::resolve_escape_sequence[abi:cxx11](char const*, unsigned long)
inline std::string resolve_escape_sequence(const char *s, size_t n) {
  std::string r;
  r.reserve(n);

  size_t i = 0;
  while (i < n) {
    auto ch = s[i];
    if (ch == '\\') {
      i++;
      assert(i < n);

      switch (s[i]) {
      case 'f':
        r += '\f';
        i++;
        break;
      case 'n':
        r += '\n';
        i++;
        break;
      case 'r':
        r += '\r';
        i++;
        break;
      case 't':
        r += '\t';
        i++;
        break;
      case 'v':
        r += '\v';
        i++;
        break;
      case '\'':
        r += '\'';
        i++;
        break;
      case '"':
        r += '"';
        i++;
        break;
      case '[':
        r += '[';
        i++;
        break;
      case ']':
        r += ']';
        i++;
        break;
      case '\\':
        r += '\\';
        i++;
        break;
      case 'x':
      case 'u': {
        char32_t cp;
        std::tie(cp, i) = parse_hex_number(s, n, i + 1);
        r += encode_codepoint(cp);
        break;
      }
      default: {
        char32_t cp;
        std::tie(cp, i) = parse_octal_number(s, n, i);
        r += encode_codepoint(cp);
        break;
      }
      }
    } else {
      r += ch;
      i++;
    }
  }
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0xd0(%rbp)
movq %rdi, %rax
movq %rax, -0xd8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0xa520
movq -0xd0(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa5c0
jmp 0x64303
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x646a4
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x39(%rbp)
movsbl -0x39(%rbp), %eax
cmpl $0x5c, %eax
jne 0x64681
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x6434c
jmp 0x6437c
leaq 0x3df45(%rip), %rdi     # 0xa2298
leaq 0x3d937(%rip), %rsi     # 0xa1c91
movl $0x128, %edx            # imm = 0x128
leaq 0x3df38(%rip), %rcx     # 0xa229e
callq 0xa290
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x646ca
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
addl $-0x22, %eax
movl %eax, %ecx
movq %rcx, -0xe0(%rbp)
subl $0x56, %eax
ja 0x645c3
movq -0xe0(%rbp), %rax
leaq 0x3ce45(%rip), %rcx     # 0xa11f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0xd0(%rbp), %rdi
movl $0xc, %esi
callq 0xa260
jmp 0x643c7
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6467f
movq -0xd0(%rbp), %rdi
movl $0xa, %esi
callq 0xa260
jmp 0x643eb
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6467f
movq -0xd0(%rbp), %rdi
movl $0xd, %esi
callq 0xa260
jmp 0x6440f
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6467f
movq -0xd0(%rbp), %rdi
movl $0x9, %esi
callq 0xa260
jmp 0x64433
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6467f
movq -0xd0(%rbp), %rdi
movl $0xb, %esi
callq 0xa260
jmp 0x64457
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6467f
movq -0xd0(%rbp), %rdi
movl $0x27, %esi
callq 0xa260
jmp 0x6447b
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6467f
movq -0xd0(%rbp), %rdi
movl $0x22, %esi
callq 0xa260
jmp 0x6449f
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6467f
movq -0xd0(%rbp), %rdi
movl $0x5b, %esi
callq 0xa260
jmp 0x644c3
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6467f
movq -0xd0(%rbp), %rdi
movl $0x5d, %esi
callq 0xa260
jmp 0x644e7
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6467f
movq -0xd0(%rbp), %rdi
movl $0x5c, %esi
callq 0xa260
jmp 0x6450b
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6467f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
incq %rdx
callq 0x64750
movq %rdx, -0xf0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x6453f
movq -0xf0(%rbp), %rax
movl -0xe4(%rbp), %ecx
movl %ecx, -0x50(%rbp)
movq %rax, -0x48(%rbp)
leaq -0x60(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
leaq -0x40(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x647e0
movq -0xf8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x64820
movl -0x40(%rbp), %esi
leaq -0x80(%rbp), %rdi
callq 0x64880
jmp 0x64589
movq -0xd0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xa4c0
jmp 0x6459b
leaq -0x80(%rbp), %rdi
callq 0xa250
jmp 0x6467f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xa250
jmp 0x646ca
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x64910
movq %rdx, -0x108(%rbp)
movl %eax, -0xfc(%rbp)
jmp 0x645e3
movq -0x108(%rbp), %rax
movl -0xfc(%rbp), %ecx
movl %ecx, -0x98(%rbp)
movq %rax, -0x90(%rbp)
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x110(%rbp)
leaq -0x84(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x647e0
movq -0x110(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x64820
movl -0x84(%rbp), %esi
leaq -0xc8(%rbp), %rdi
callq 0x64880
jmp 0x64642
movq -0xd0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xa4c0
jmp 0x64657
leaq -0xc8(%rbp), %rdi
callq 0xa250
jmp 0x6467f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0xa250
jmp 0x646ca
jmp 0x6469f
movq -0xd0(%rbp), %rdi
movsbl -0x39(%rbp), %esi
callq 0xa260
jmp 0x64693
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6430b
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x646ba
movq -0xd0(%rbp), %rdi
callq 0xa250
movq -0xd8(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0xd0(%rbp), %rdi
callq 0xa250
movq -0x28(%rbp), %rdi
callq 0xa650
nop