// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
movq 0x10(%r14), %rcx
cmpq %rcx, %rsi
je 0x677bc
xorl %eax, %eax
movabsq $0x400000004000009, %rdx # imm = 0x400000004000009
xorl %edi, %edi
movl %edi, %r8d
movb $0x1, %dil
testb $0x1, %r8b
jne 0x6777d
movzbl (%rsi,%rax), %r8d
addl $-0x2b, %r8d
cmpl $0x3a, %r8d
ja 0x6779d
btq %r8, %rdx
jae 0x6778e
leaq (%rsi,%rax), %r8
incq %r8
incq %rax
cmpq %rcx, %r8
jne 0x6775c
jmp 0x677a1
cmpq $0x2, %r8
jne 0x6779d
testq %rax, %rax
setne %dil
jmp 0x6777d
xorl %edi, %edi
jmp 0x6777d
testb %dil, %dil
je 0x677bc
movq %rbx, %rdi
movq %r14, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x685dc
movb (%rsi), %r9b
xorl %r8d, %r8d
xorl %r10d, %r10d
cmpb $0x2d, %r9b
sete %r10b
je 0x677db
leaq 0xee02(%rip), %rax      # 0x765d8
movq (%rax), %rdi
jmp 0x677e7
leaq 0xede6(%rip), %rax      # 0x765c8
xorl %edi, %edi
subq (%rax), %rdi
addq %rsi, %r10
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
movq %rdi, %rax
mulq %rdx
cmpq %rcx, %r10
jae 0x6784d
shrq $0x3, %rdx
leaq (%rdx,%rdx), %rax
leaq (%rax,%rax,4), %rax
subq %rax, %rdi
xorl %r8d, %r8d
movzbl (%r10), %eax
leal -0x3a(%rax), %r11d
cmpb $-0xb, %r11b
jbe 0x678d4
incq %r10
andl $0xf, %eax
cmpq %rdx, %r8
jb 0x67840
cmpq %rcx, %r10
jne 0x677a6
cmpq %rax, %rdi
jb 0x677a6
leaq (%r8,%r8,4), %r8
leaq (%rax,%r8,2), %r8
cmpq %rcx, %r10
jb 0x67811
cmpb $0x2d, %r9b
jne 0x6788d
negq %r8
leaq 0x8(%rsp), %rdi
movq %r8, %rsi
callq 0x6b9d4
movq 0x30(%rbx), %rax
cmpq 0x38(%rbx), %rax
jne 0x6787a
movq 0x48(%rbx), %rcx
movl $0x200, %eax            # imm = 0x200
addq -0x8(%rcx), %rax
movq -0x8(%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6bdc0
jmp 0x679a3
leaq 0xed3c(%rip), %rax      # 0x765d0
leaq 0x8(%rsp), %rdi
movq %r8, %rsi
cmpq (%rax), %r8
jbe 0x67979
callq 0x6b9e4
movq 0x30(%rbx), %rax
cmpq 0x38(%rbx), %rax
jne 0x678c1
movq 0x48(%rbx), %rcx
movl $0x200, %eax            # imm = 0x200
addq -0x8(%rcx), %rax
movq -0x8(%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6bdc0
jmp 0x679a3
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x28(%rsp), %rdi
movq %rcx, %rdx
callq 0x2f1a0
leaq 0xbac7(%rip), %rsi      # 0x733b8
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x40b3d
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x2f10a
leaq 0xe9ed(%rip), %rsi      # 0x76315
leaq 0x8(%rsp), %rdi
callq 0x27c00
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x671fe
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x67953
callq 0x27560
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x67966
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x67975
callq 0x27560
xorl %eax, %eax
jmp 0x679af
callq 0x6b9d4
movq 0x30(%rbx), %rax
cmpq 0x38(%rbx), %rax
jne 0x67995
movq 0x48(%rbx), %rcx
movl $0x200, %eax            # imm = 0x200
addq -0x8(%rcx), %rax
movq -0x8(%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6bdc0
leaq 0x8(%rsp), %rdi
callq 0x6bce2
movb $0x1, %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6bce2
jmp 0x67a2d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6bce2
jmp 0x67a2d
jmp 0x679db
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x679f2
callq 0x27560
jmp 0x679f2
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x67a0a
callq 0x27560
jmp 0x67a0a
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x67a2d
callq 0x27560
jmp 0x67a2d
movq %rax, %rbx
jmp 0x67a2d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6bce2
movq %rbx, %rdi
callq 0x27b10
movq %rax, %rdi
callq 0x2e1cd
nop