// File: /workspace/github_cpp_makefile_star2_O3/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
movq $0x0, 0x8(%rsp)
movq 0x8(%rsi), %rsi
movq 0x10(%rbx), %rdx
movq %rdx, %r12
subq %rsi, %r12
testl %r12d, %r12d
js 0x498ae
cmpl $0x20, %r12d
ja 0x498eb
andl $0x3f, %r12d
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rdx
callq 0x2f3d0
movb $0x0, 0x10(%rsp,%r12)
leaq 0x12d6a(%rip), %rsi     # 0x5c605
leaq 0x8(%rsp), %rdx
movq %r13, %rdi
xorl %eax, %eax
callq 0x2f780
movl %eax, %ebp
jmp 0x49928
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x12b08(%rip), %rsi     # 0x5c3c6
leaq 0x12b1d(%rip), %rdx     # 0x5c3e2
leaq 0x10(%rsp), %rdi
callq 0x2e860
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x30f70
movq 0x10(%rsp), %rdi
jmp 0x49ab3
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x2e860
movq (%r12), %rdi
leaq 0x12cf9(%rip), %rsi     # 0x5c605
leaq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x2f780
movl %eax, %ebp
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x49928
callq 0x2f6c0
cmpl $0x1, %ebp
jne 0x499aa
movsd 0x8(%rsp), %xmm0
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x30220
movzwl 0x8(%r15), %eax
movzwl 0x8(%rbx), %ecx
movl $0xfe00, %edx           # imm = 0xFE00
movl %eax, %esi
andl %edx, %esi
andl %ecx, %edx
movq (%r15), %rdi
movq (%rbx), %r8
movq %r8, (%r15)
movq %rdi, (%rbx)
movl $0x1ff, %edi            # imm = 0x1FF
andl %edi, %ecx
orl %esi, %ecx
movw %cx, 0x8(%r15)
andl %edi, %eax
orl %edx, %eax
movw %ax, 0x8(%rbx)
movq 0x10(%r15), %rax
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%r15)
movq %rax, 0x10(%rbx)
movups 0x18(%rbx), %xmm0
movups 0x18(%r15), %xmm1
movups %xmm0, 0x18(%r15)
movups %xmm1, 0x18(%rbx)
movq %rbx, %rdi
callq 0x2ebb0
movb $0x1, %al
jmp 0x49abf
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
leaq 0x70(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x60(%rsp), %rdi
callq 0x2e860
leaq 0x12c37(%rip), %rcx     # 0x5c603
leaq 0x60(%rsp), %rdi
movl $0x1, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2fad0
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x49a08
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x49a10
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x129b0(%rip), %rsi     # 0x5c3e3
callq 0x30e50
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x49a5f
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x49a67
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x30f70
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x49a9f
callq 0x2f6c0
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x49aae
callq 0x2f6c0
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x49abd
callq 0x2f6c0
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x49ae8
callq 0x2f6c0
jmp 0x49ae8
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x49afc
callq 0x2f6c0
jmp 0x49afc
movq %rax, %rbx
movq 0x60(%rsp), %rdi
jmp 0x49b0d
jmp 0x49b19
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x49b1c
callq 0x2f6c0
jmp 0x49b1c
movq %rax, %rbx
movq %rbx, %rdi
callq 0x30a10