// File: /workspace/github_cpp_makefile_star2_O2/xjrueda[P]fixprime/src/jsoncpp.cpp
// Function: Json::Reader::decodeDouble(Json::Reader::Token&, Json::Value&)
bool Reader::decodeDouble(Token& token, Value& decoded) {
  double value = 0;
  const int bufferSize = 32;
  int count;
  int length = int(token.end_ - token.start_);

  // Sanity check to avoid buffer overflow exploits.
  if (length < 0) {
    return addError("Unable to parse token length", token);
  }

  // Avoid using a string constant for the format control string given to
  // sscanf, as this can cause hard to debug crashes on OS X. See here for more
  // info:
  //
  //     http://developer.apple.com/library/mac/#DOCUMENTATION/DeveloperTools/gcc-4.0.1/gcc/Incompatibilities.html
  char format[] = "%lf";

  if (length <= bufferSize) {
    Char buffer[bufferSize + 1];
    memcpy(buffer, token.start_, length);
    buffer[length] = 0;
    count = sscanf(buffer, format, &value);
  } else {
    std::string buffer(token.start_, token.end_);
    count = sscanf(buffer.c_str(), format, &value);
  }

  if (count != 1)
    return addError("'" + std::string(token.start_, token.end_) +
                        "' is not a number.",
                    token);
  decoded = value;
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
andq $0x0, 0x8(%rsp)
movq 0x8(%rsi), %rsi
movq 0x10(%rbx), %rdx
movq %rdx, %r12
subq %rsi, %r12
testl %r12d, %r12d
js 0x578bf
cmpl $0x20, %r12d
ja 0x578f1
andl $0x3f, %r12d
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rdx
callq 0x3ff00
movb $0x0, 0x10(%rsp,%r12)
leaq 0xfdb9(%rip), %rsi      # 0x67665
leaq 0x8(%rsp), %rdx
movq %r13, %rdi
xorl %eax, %eax
callq 0x40510
movl %eax, %ebp
jmp 0x57928
leaq 0xfb60(%rip), %rsi      # 0x67426
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x3ed70
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x429b0
leaq 0x10(%rsp), %rdi
jmp 0x579cc
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x3ed50
movq (%r12), %rdi
leaq 0xfd53(%rip), %rsi      # 0x67665
leaq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x40510
movl %eax, %ebp
movq %r12, %rdi
callq 0x3ef50
cmpl $0x1, %ebp
jne 0x5795a
movsd 0x8(%rsp), %xmm0
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x41560
movq %r15, %rdi
movq %rbx, %rsi
callq 0x41d80
movq %rbx, %rdi
callq 0x3f200
movb $0x1, %al
jmp 0x579d3
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x40(%rsp), %rdi
callq 0x3ed50
leaq 0xfce7(%rip), %rsi      # 0x67663
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x41f00
leaq 0xfab1(%rip), %rdx      # 0x67443
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x3e640
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x429b0
leaq 0x10(%rsp), %rdi
callq 0x3ef50
leaq 0x60(%rsp), %rdi
callq 0x3ef50
leaq 0x40(%rsp), %rdi
callq 0x3ef50
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3ef50
jmp 0x579f7
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3ef50
jmp 0x57a06
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0x57a17
jmp 0x57a1e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3ef50
jmp 0x57a21
movq %rax, %rbx
movq %rbx, %rdi
callq 0x42200
nop