// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rdx, %rsi
callq 0x93e0
xorl %r13d, %r13d
cmpq %r14, %r13
jae 0x29bdf
movb (%r15,%r13), %al
cmpb $0x5c, %al
jne 0x29add
leaq 0x1(%r13), %rdx
cmpq %r14, %rdx
jae 0x29bf1
movzbl (%r15,%rdx), %eax
leal -0x6e(%rax), %ecx
cmpl $0xa, %ecx
ja 0x29aed
leaq 0xf680(%rip), %rsi      # 0x39124
movslq (%rsi,%rcx,4), %rax
addq %rsi, %rax
jmpq *%rax
addq $0x2, %r13
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x29c3d
movq %rdx, %r13
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movl %eax, %esi
callq 0x29c93
movq %rbx, %rdi
movq %r12, %rsi
callq 0x94c0
jmp 0x29b56
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9260
incq %r13
jmp 0x29a72
cmpl $0x22, %eax
je 0x29ba4
cmpl $0x27, %eax
je 0x29bcb
cmpl $0x5b, %eax
je 0x29b97
cmpl $0x5c, %eax
je 0x29bb1
cmpl $0x5d, %eax
je 0x29bbe
cmpl $0x66, %eax
jne 0x29b2f
movq %rbx, %rdi
pushq $0xc
popq %rsi
callq 0x9260
jmp 0x29bd6
movq %r15, %rdi
movq %r14, %rsi
callq 0x29cd5
movq %rdx, %r13
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movl %eax, %esi
callq 0x29c93
movq %rbx, %rdi
movq %r12, %rsi
callq 0x94c0
movq %r12, %rdi
callq 0x9140
jmp 0x29a72
movq %rbx, %rdi
pushq $0xa
popq %rsi
callq 0x9260
jmp 0x29bd6
movq %rbx, %rdi
pushq $0xb
popq %rsi
callq 0x9260
jmp 0x29bd6
movq %rbx, %rdi
pushq $0xd
popq %rsi
callq 0x9260
jmp 0x29bd6
movq %rbx, %rdi
pushq $0x9
popq %rsi
callq 0x9260
jmp 0x29bd6
movq %rbx, %rdi
pushq $0x5b
popq %rsi
callq 0x9260
jmp 0x29bd6
movq %rbx, %rdi
pushq $0x22
popq %rsi
callq 0x9260
jmp 0x29bd6
movq %rbx, %rdi
pushq $0x5c
popq %rsi
callq 0x9260
jmp 0x29bd6
movq %rbx, %rdi
pushq $0x5d
popq %rsi
callq 0x9260
jmp 0x29bd6
movq %rbx, %rdi
pushq $0x27
popq %rsi
callq 0x9260
addq $0x2, %r13
jmp 0x29a72
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x100c4(%rip), %rdi     # 0x39cbc
leaq 0xfab6(%rip), %rsi      # 0x396b5
leaq 0x100bc(%rip), %rcx     # 0x39cc2
movl $0x128, %edx            # imm = 0x128
callq 0x91d0
jmp 0x29c2a
jmp 0x29c2a
jmp 0x29c1c
jmp 0x29c2a
jmp 0x29c2a
jmp 0x29c2a
movq %rax, %r14
leaq -0x48(%rbp), %rdi
callq 0x9140
jmp 0x29c2d
movq %rax, %r14
movq %rbx, %rdi
callq 0x9140
movq %r14, %rdi
callq 0x9430