// File: 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
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x160(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movl $0x20, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0xdffad
leaq -0x59(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0xa35e0
movq -0x168(%rbp), %rdx
leaq 0x24a17(%rip), %rsi     # 0x104946
leaq -0x58(%rbp), %rdi
callq 0xa0510
jmp 0xdff3a
movq -0x160(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
leaq -0x58(%rbp), %rsi
callq 0xa49e0
movb %al, -0x169(%rbp)
jmp 0xdff5a
movb -0x169(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xa4f00
leaq -0x59(%rbp), %rdi
callq 0x9e350
jmp 0xe0259
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xdff9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xa4f00
leaq -0x59(%rbp), %rdi
callq 0x9e350
jmp 0xe0267
movl 0x249b0(%rip), %eax     # 0x104963
movl %eax, -0x70(%rbp)
cmpl $0x20, -0x34(%rbp)
jg 0xdfffe
leaq -0xa0(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movslq -0x34(%rbp), %rdx
callq 0x9c790
movslq -0x34(%rbp), %rax
movb $0x0, -0xa0(%rbp,%rax)
leaq -0xa0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x28(%rbp), %rdx
movb $0x0, %al
callq 0x9d9f0
movl %eax, -0x30(%rbp)
jmp 0xe00a6
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x188(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x180(%rbp)
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0xa35e0
movq -0x188(%rbp), %rsi
movq -0x180(%rbp), %rdx
movq -0x178(%rbp), %rcx
leaq -0xc0(%rbp), %rdi
callq 0x99500
jmp 0xe004e
leaq -0xc1(%rbp), %rdi
callq 0x9e350
leaq -0xc0(%rbp), %rdi
callq 0x99590
movq %rax, %rdi
leaq -0x70(%rbp), %rsi
leaq -0x28(%rbp), %rdx
movb $0x0, %al
callq 0x9d9f0
movl %eax, -0x30(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0xa4f00
jmp 0xe00a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xc1(%rbp), %rdi
callq 0x9e350
jmp 0xe0267
cmpl $0x1, -0x30(%rbp)
je 0xe0203
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x1a0(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x198(%rbp)
leaq -0x129(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0xa35e0
movq -0x1a0(%rbp), %rsi
movq -0x198(%rbp), %rdx
movq -0x190(%rbp), %rcx
leaq -0x128(%rbp), %rdi
callq 0x99500
jmp 0xe0100
leaq 0x24a80(%rip), %rsi     # 0x104b87
leaq -0x108(%rbp), %rdi
leaq -0x128(%rbp), %rdx
callq 0xa2cb0
jmp 0xe011c
leaq 0x24844(%rip), %rdx     # 0x104967
leaq -0xe8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x98100
jmp 0xe0138
movq -0x160(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
leaq -0xe8(%rbp), %rsi
callq 0xa49e0
movb %al, -0x1a1(%rbp)
jmp 0xe015b
movb -0x1a1(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0xa4f00
leaq -0x108(%rbp), %rdi
callq 0xa4f00
leaq -0x128(%rbp), %rdi
callq 0xa4f00
leaq -0x129(%rbp), %rdi
callq 0x9e350
jmp 0xe0259
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xe01f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xe01e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xe01dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0xa4f00
leaq -0x108(%rbp), %rdi
callq 0xa4f00
leaq -0x128(%rbp), %rdi
callq 0xa4f00
leaq -0x129(%rbp), %rdi
callq 0x9e350
jmp 0xe0267
movsd -0x28(%rbp), %xmm0
leaq -0x158(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0xa0e10
movq -0x1b0(%rbp), %rsi
movq -0x20(%rbp), %rdi
callq 0x98040
jmp 0xe022d
leaq -0x158(%rbp), %rdi
callq 0x9a180
movb $0x1, -0x1(%rbp)
jmp 0xe0259
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x9a180
jmp 0xe0267
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0xa3520