// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/third_party/jsoncpp/json_reader.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( 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 0x27970
movq 0x8(%r14), %rax
incq %rax
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq 0x10(%r14), %r13
decq %r13
movq 0x20(%rsp), %rax
movb $0x1, %bpl
cmpq %r13, %rax
je 0x68b2b
leaq 0x1(%rax), %r12
movq %r12, 0x20(%rsp)
movzbl (%rax), %ecx
cmpl $0x22, %ecx
je 0x688bf
cmpl $0x5c, %ecx
jne 0x688c9
cmpq %r13, %r12
je 0x688d1
leaq 0x2(%rax), %r12
movq %r12, 0x20(%rsp)
movb 0x1(%rax), %al
movzbl %al, %ecx
cmpl $0x61, %ecx
jg 0x68923
cmpl $0x22, %ecx
je 0x689fa
cmpl $0x2f, %ecx
je 0x689fa
cmpl $0x5c, %ecx
je 0x689fa
jmp 0x68957
movl $0x3, %eax
jmp 0x68a07
movsbl %cl, %esi
jmp 0x689fd
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rsp, %r15
movq %r15, %rdi
leaq 0xea45(%rip), %rsi      # 0x7732c
leaq 0xea5d(%rip), %rdx      # 0x7734b
callq 0x2f1b2
movq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x677a2
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x68919
callq 0x27560
movl $0x1, %eax
jmp 0x68a07
leal -0x6e(%rcx), %eax
cmpl $0x7, %eax
ja 0x68942
leaq 0xe8e2(%rip), %rcx      # 0x77214
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0xa, %al
jmp 0x689fa
cmpl $0x66, %ecx
je 0x689f8
cmpl $0x62, %ecx
jne 0x68957
movb $0x8, %al
jmp 0x689fa
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rsp, %r15
movq %r15, %rdi
leaq 0xe9df(%rip), %rsi      # 0x7734c
leaq 0xe9f5(%rip), %rdx      # 0x77369
callq 0x2f1b2
movq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x677a2
jmp 0x68906
movq 0x28(%rsp), %rdi
movq %r14, %rsi
leaq 0x20(%rsp), %rdx
movq %r13, %rcx
leaq 0x34(%rsp), %r8
callq 0x68e7e
testb %al, %al
je 0x68919
movl %eax, %r15d
movl 0x34(%rsp), %r12d
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
cmpl $0x7f, %r12d
ja 0x68a14
movl $0x1, %esi
movq %rsp, %rdi
xorl %edx, %edx
callq 0x271f0
movq (%rsp), %rax
jmp 0x68aea
movb $0xd, %al
jmp 0x689fa
movb $0x9, %al
jmp 0x689fa
movb $0xc, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x274e0
xorl %eax, %eax
testl %eax, %eax
je 0x6885b
jmp 0x68b24
cmpl $0x7ff, %r12d           # imm = 0x7FF
movq %rsp, %rdi
ja 0x68a4d
movl $0x2, %esi
xorl %edx, %edx
callq 0x271f0
movq (%rsp), %rax
movl %r12d, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%rax)
movq (%rsp), %rax
shrl $0x6, %r12d
orb $-0x40, %r12b
jmp 0x68aea
cmpl $0xffff, %r12d          # imm = 0xFFFF
ja 0x68a93
movl $0x3, %esi
xorl %edx, %edx
callq 0x271f0
movq (%rsp), %rax
movl %r12d, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x2(%rax)
movq (%rsp), %rax
movl %r12d, %ecx
shrl $0x6, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%rax)
movq (%rsp), %rax
shrl $0xc, %r12d
orb $-0x20, %r12b
jmp 0x68aea
cmpl $0x10ffff, %r12d        # imm = 0x10FFFF
ja 0x68aed
movl $0x4, %esi
xorl %edx, %edx
callq 0x271f0
movq (%rsp), %rax
movl %r12d, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x3(%rax)
movq (%rsp), %rax
movl %r12d, %ecx
shrl $0x6, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x2(%rax)
movq (%rsp), %rax
movl %r12d, %ecx
shrl $0xc, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%rax)
movq (%rsp), %rax
shrl $0x12, %r12d
orb $-0x10, %r12b
movb %r12b, (%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27210
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x68b11
callq 0x27560
movl $0x1, %eax
testb %r15b, %r15b
jne 0x68a05
jmp 0x68a07
cmpl $0x3, %eax
je 0x68b2b
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x68b44
jmp 0x68b44
jmp 0x68b44
jmp 0x68b5c
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x68b5f
callq 0x27560
jmp 0x68b5f
movq %rax, %rbx
movq %rbx, %rdi
callq 0x27b20
nop