// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/json.cpp
// Function: Json::Reader::decodeString(Json::Reader::Token&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool Reader::decodeString(Token& token, std::string& decoded) {
  decoded.reserve(static_cast<size_t>(token.end_ - token.start_ - 2));
  Location current = token.start_ + 1; // skip '"'
  Location end = token.end_ - 1;       // do not include '"'
  while (current != end) {
    Char c = *current++;
    if (c == '"')
      break;
    else if (c == '\\') {
      if (current == end)
        return addError("Empty escape sequence in string", token, current);
      Char escape = *current++;
      switch (escape) {
      case '"':
        decoded += '"';
        break;
      case '/':
        decoded += '/';
        break;
      case '\\':
        decoded += '\\';
        break;
      case 'b':
        decoded += '\b';
        break;
      case 'f':
        decoded += '\f';
        break;
      case 'n':
        decoded += '\n';
        break;
      case 'r':
        decoded += '\r';
        break;
      case 't':
        decoded += '\t';
        break;
      case 'u': {
        unsigned int unicode;
        if (!decodeUnicodeCodePoint(token, current, end, unicode))
          return false;
        decoded += codePointToUTF8(unicode);
      } break;
      default:
        return addError("Bad escape sequence in string", token, current);
      }
    } else {
      decoded += c;
    }
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, 0x28(%rsp)
movq 0x10(%rsi), %rsi
subq 0x8(%r14), %rsi
addq $-0x2, %rsi
movq %rdx, %rdi
callq 0x11960
movq 0x8(%r14), %rax
incq %rax
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq 0x10(%r14), %r13
decq %r13
movq %rsp, %r15
movq 0x20(%rsp), %rax
movb $0x1, %bpl
cmpq %r13, %rax
je 0x7b064
leaq 0x1(%rax), %r12
movq %r12, 0x20(%rsp)
movzbl (%rax), %ecx
cmpl $0x22, %ecx
je 0x7aef8
cmpl $0x5c, %ecx
jne 0x7af02
cmpq %r13, %r12
je 0x7af0a
leaq 0x2(%rax), %r12
movq %r12, 0x20(%rsp)
movb 0x1(%rax), %al
movzbl %al, %ecx
cmpl $0x61, %ecx
jg 0x7af64
cmpl $0x22, %ecx
je 0x7b045
cmpl $0x2f, %ecx
je 0x7b045
cmpl $0x5c, %ecx
je 0x7b045
jmp 0x7af98
movl $0x3, %eax
jmp 0x7b055
movsbl %cl, %esi
jmp 0x7b048
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
leaq 0x462cb(%rip), %rsi     # 0xc11e8
leaq 0x462e3(%rip), %rdx     # 0xc1207
callq 0x1ab58
movq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x79b74
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7af57
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x115c0
movl $0x1, %eax
movq %rsp, %r15
jmp 0x7b055
leal -0x6e(%rcx), %eax
cmpl $0x7, %eax
ja 0x7af83
leaq 0x45c79(%rip), %rcx     # 0xc0bec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0xa, %al
jmp 0x7b045
cmpl $0x66, %ecx
je 0x7b043
cmpl $0x62, %ecx
jne 0x7af98
movb $0x8, %al
jmp 0x7b045
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
leaq 0x4625d(%rip), %rsi     # 0xc1208
leaq 0x46273(%rip), %rdx     # 0xc1225
callq 0x1ab58
movq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x79b74
jmp 0x7af3c
movq 0x28(%rsp), %rdi
movq %r14, %rsi
leaq 0x20(%rsp), %rdx
movq %r13, %rcx
leaq 0x34(%rsp), %r8
callq 0x7bab6
testb %al, %al
je 0x7af57
movl %eax, %r12d
movl 0x34(%rsp), %esi
movq %rsp, %rdi
callq 0x7bc1f
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x111e0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7b02c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x115c0
movl $0x1, %eax
testb %r12b, %r12b
movq %rsp, %r15
jne 0x7b053
jmp 0x7b055
movb $0xd, %al
jmp 0x7b045
movb $0x9, %al
jmp 0x7b045
movb $0xc, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x114e0
movq %rsp, %r15
xorl %eax, %eax
testl %eax, %eax
je 0x7ae94
cmpl $0x3, %eax
je 0x7b064
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7b07b
jmp 0x7b07b
jmp 0x7b09b
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7b09e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x115c0
jmp 0x7b09e
movq %rax, %rbx
movq %rbx, %rdi
callq 0x11a70