// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/third_party/jsoncpp/json_reader.cpp
// Function: Json::Reader::decodeNumber(Json::Reader::Token&)
bool 
Reader::decodeNumber( Token &token )
{
   bool isDouble = false;
   for ( Location inspect = token.start_; inspect != token.end_; ++inspect )
   {
      isDouble = isDouble  
                 ||  in( *inspect, '.', 'e', 'E', '+' )  
                 ||  ( *inspect == '-'  &&  inspect != token.start_ );
   }
   if ( isDouble )
      return decodeDouble( token );
   // Attempts to parse the number as an integer. If the number is
   // larger than the maximum supported value of an integer then
   // we decode the number as a double.
   Location current = token.start_;
   bool isNegative = *current == '-';
   if ( isNegative )
      ++current;
   Value::UInt maxIntegerValue = isNegative ? Value::UInt(-Value::minInt) 
                                            : Value::maxUInt;
   Value::UInt threshold = maxIntegerValue / 10;
   Value::UInt lastDigitThreshold = maxIntegerValue % 10;
   assert( lastDigitThreshold >=0  &&  lastDigitThreshold <= 9 );
   Value::UInt value = 0;
   while ( current < token.end_ )
   {
      Char c = *current++;
      if ( c < '0'  ||  c > '9' )
         return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
      Value::UInt digit(c - '0');
      if ( value >= threshold )
      {
         // If the current digit is not the last one, or if it is
         // greater than the last digit of the maximum integer value,
         // the parse the number as a double.
         if ( current != token.end_  ||  digit > lastDigitThreshold )
         {
            return decodeDouble( token );
         }
      }
      value = value * 10 + digit;
   }
   if ( isNegative )
      currentValue() = -Value::Int( value );
   else if ( value <= Value::UInt(Value::maxInt) )
      currentValue() = Value::Int( value );
   else
      currentValue() = value;
   return true;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
movq 0x10(%r14), %rcx
xorl %eax, %eax
movabsq $0x400000004000009, %rdx # imm = 0x400000004000009
xorl %r8d, %r8d
leaq (%rsi,%rax), %r9
cmpq %rcx, %r9
je 0x68a1d
movb $0x1, %dil
testb $0x1, %r8b
jne 0x68a02
movzbl (%r9), %r8d
addl $-0x2b, %r8d
cmpl $0x3a, %r8d
ja 0x68a19
btq %r8, %rdx
jae 0x68a0a
incq %rax
movl %edi, %r8d
jmp 0x689dc
cmpq $0x2, %r8
jne 0x68a19
testq %rax, %rax
setne %dil
jmp 0x68a02
xorl %edi, %edi
jmp 0x68a02
testb $0x1, %r8b
je 0x68a35
movq %rbx, %rdi
movq %r14, %rsi
addq $0x68, %rsp
popq %rbx
popq %r14
jmp 0x6960a
movb (%rsi), %dil
xorl %r8d, %r8d
xorl %r9d, %r9d
cmpb $0x2d, %dil
sete %r9b
je 0x68a54
leaq 0xdb69(%rip), %rax      # 0x765b8
movq (%rax), %rax
jmp 0x68a60
leaq 0xdb4d(%rip), %rdx      # 0x765a8
xorl %eax, %eax
subq (%rdx), %rax
addq %rsi, %r9
pushq $0xa
popq %r10
xorl %edx, %edx
divq %r10
cmpq %rcx, %r9
jae 0x68a9e
movzbl (%r9), %r10d
leal -0x3a(%r10), %r11d
cmpb $-0xb, %r11b
jbe 0x68ae2
incq %r9
andl $0xf, %r10d
cmpq %rax, %r8
jb 0x68a95
cmpq %rcx, %r9
jne 0x68a23
cmpq %r10, %rdx
jb 0x68a23
imulq $0xa, %r8, %r8
addq %r10, %r8
jmp 0x68a6c
cmpb $0x2d, %dil
jne 0x68b58
negq %r8
leaq 0x8(%rsp), %rdi
movq %r8, %rsi
callq 0x6c688
movq 0x30(%rbx), %rax
cmpq 0x38(%rbx), %rax
jne 0x68acf
movq 0x48(%rbx), %rcx
movl $0x200, %eax            # imm = 0x200
addq -0x8(%rcx), %rax
movq -0x8(%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6c95e
jmp 0x68bc2
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rcx, %rdx
callq 0x6a7f8
leaq 0xa831(%rip), %rsi      # 0x73330
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x498a8
leaq 0xd7b0(%rip), %rdx      # 0x762c5
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x3ab7a
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x6851c
leaq 0x8(%rsp), %rdi
callq 0x35730
leaq 0x48(%rsp), %rdi
callq 0x35730
leaq 0x28(%rsp), %rdi
callq 0x35730
xorl %eax, %eax
jmp 0x68bce
leaq 0xda51(%rip), %rax      # 0x765b0
leaq 0x8(%rsp), %rdi
movq %r8, %rsi
cmpq (%rax), %r8
jbe 0x68b98
callq 0x6c696
movq 0x30(%rbx), %rax
cmpq 0x38(%rbx), %rax
jne 0x68b88
movq 0x48(%rbx), %rcx
movl $0x200, %eax            # imm = 0x200
addq -0x8(%rcx), %rax
movq -0x8(%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6c95e
jmp 0x68bc2
callq 0x6c688
movq 0x30(%rbx), %rax
cmpq 0x38(%rbx), %rax
jne 0x68bb4
movq 0x48(%rbx), %rcx
movl $0x200, %eax            # imm = 0x200
addq -0x8(%rcx), %rax
movq -0x8(%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6c95e
leaq 0x8(%rsp), %rdi
callq 0x6c88a
movb $0x1, %al
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6c88a
jmp 0x68c33
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6c88a
jmp 0x68c33
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6c88a
jmp 0x68c33
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x35730
jmp 0x68c1f
movq %rax, %rbx
jmp 0x68c33
movq %rax, %rbx
jmp 0x68c29
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x35730
leaq 0x28(%rsp), %rdi
callq 0x35730
movq %rbx, %rdi
callq 0x35b50
movq %rax, %rdi
callq 0x3a198
nop