// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/json.cpp
// Function: Json::Reader::decodeUnicodeEscapeSequence(Json::Reader::Token&, char const*&, char const*, unsigned int&)
bool Reader::decodeUnicodeEscapeSequence(Token& token,
                                         Location& current,
                                         Location end,
                                         unsigned int& ret_unicode) {
  if (end - current < 4)
    return addError(
        "Bad unicode escape sequence in string: four digits expected.",
        token,
        current);
  int unicode = 0;
  for (int index = 0; index < 4; ++index) {
    Char c = *current++;
    unicode *= 16;
    if (c >= '0' && c <= '9')
      unicode += c - '0';
    else if (c >= 'a' && c <= 'f')
      unicode += c - 'a' + 10;
    else if (c >= 'A' && c <= 'F')
      unicode += c - 'A' + 10;
    else
      return addError(
          "Bad unicode escape sequence in string: hexadecimal digit expected.",
          token,
          current);
  }
  ret_unicode = static_cast<unsigned int>(unicode);
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, 0x20(%rsp)
movq %rdi, %r14
subq (%rdx), %rcx
cmpq $0x4, %rcx
jge 0x7bdae
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4554b(%rip), %rsi     # 0xc12ba
leaq 0x45580(%rip), %rdx     # 0xc12f6
movq %rsp, %rdi
callq 0x1ab58
movq (%r15), %rcx
movq %rsp, %rsi
movq %r14, %rdi
movq 0x20(%rsp), %rdx
callq 0x79b74
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x7bda7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x115c0
xorl %ebp, %ebp
jmp 0x7be8e
movq %r8, 0x28(%rsp)
xorl %ebp, %ebp
movq %rsp, %rbx
xorl %r13d, %r13d
xorl %r12d, %r12d
movq %r14, 0x30(%rsp)
movq (%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%r15)
movsbl (%rax), %eax
shll $0x4, %r12d
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
ja 0x7bde5
addl %eax, %r12d
addl $-0x30, %r12d
jmp 0x7be05
leal -0x61(%rax), %ecx
cmpb $0x5, %cl
ja 0x7bdf6
addl %eax, %r12d
addl $-0x57, %r12d
jmp 0x7be05
leal -0x41(%rax), %ecx
cmpb $0x5, %cl
ja 0x7be21
addl %eax, %r12d
addl $-0x37, %r12d
movb $0x1, %al
testb %al, %al
je 0x7be7d
cmpl $0x3, %r13d
leal 0x1(%r13), %eax
setae %bpl
movl %eax, %r13d
cmpl $0x4, %eax
jne 0x7bdc3
jmp 0x7be7d
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
leaq 0x454c3(%rip), %rsi     # 0xc12f7
leaq 0x454fe(%rip), %rdx     # 0xc1339
callq 0x1ab58
movq (%r15), %rcx
movq %r14, %rdi
movq %rbx, %r14
movq %rbx, %rsi
movq 0x20(%rsp), %rdx
callq 0x79b74
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7be71
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x115c0
xorl %eax, %eax
movq %r14, %rbx
movq 0x30(%rsp), %r14
jmp 0x7be07
testb $0x1, %bpl
je 0x7be8e
movq 0x28(%rsp), %rax
movl %r12d, (%rax)
movb $0x1, %bpl
andb $0x1, %bpl
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x7bec4
jmp 0x7bed6
jmp 0x7bed3
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7bed6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x115c0
jmp 0x7bed6
movq %rax, %rbx
movq %rbx, %rdi
callq 0x11a70