// File: zeeev[P]DASVC/bamtools/src/third_party/jsoncpp/json_writer.cpp
// Function: Json::valueToString[abi:cxx11](double)
std::string valueToString( double value )
{
   char buffer[32];
#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning. 
   sprintf_s(buffer, sizeof(buffer), "%#.16g", value); 
#else	
   sprintf(buffer, "%#.16g", value); 
#endif
   char* ch = buffer + strlen(buffer) - 1;
   if (*ch != '0') return buffer; // nothing to truncate, so save time
   while(ch > buffer && *ch == '0'){
     --ch;
   }
   char* last_nonzero = ch;
   while(ch >= buffer){
     switch(*ch){
     case '0':
     case '1':
     case '2':
     case '3':
     case '4':
     case '5':
     case '6':
     case '7':
     case '8':
     case '9':
       --ch;
       continue;
     case '.':
       // Truncate zeroes to save bytes in output, but keep one.
       *(last_nonzero+2) = '\0';
       return buffer;
     default:
       return buffer;
     }
   }
   return buffer;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x30(%rsp)
movq %rdi, 0xa0(%rsp)
movsd %xmm0, 0x98(%rsp)
leaq 0x70(%rsp), %rdi
movsd 0x98(%rsp), %xmm0
leaq 0xabbb(%rip), %rsi      # 0x134c65
movb $0x1, %al
callq 0x86130
leaq 0x70(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x86360
movq %rax, %rcx
movq 0x38(%rsp), %rax
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
je 0x12a137
leaq 0x67(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x86da0
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x70(%rsp), %rsi
callq 0x86a00
jmp 0x12a10b
leaq 0x67(%rsp), %rdi
callq 0x867b0
jmp 0x12a2b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x67(%rsp), %rdi
callq 0x867b0
jmp 0x12a2c3
jmp 0x12a139
movq 0x68(%rsp), %rcx
leaq 0x70(%rsp), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x1f(%rsp)
jbe 0x12a160
movq 0x68(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
sete %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x12a16a
jmp 0x12a17a
movq 0x68(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x12a139
movq 0x68(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rax
leaq 0x70(%rsp), %rcx
cmpq %rcx, %rax
jb 0x12a26d
movq 0x68(%rsp), %rax
movsbl (%rax), %eax
movl %eax, 0x18(%rsp)
subl $0x2e, %eax
je 0x12a1c8
jmp 0x12a1aa
movl 0x18(%rsp), %eax
addl $-0x30, %eax
subl $0x9, %eax
ja 0x12a222
jmp 0x12a1b8
movq 0x68(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x12a184
movq 0x48(%rsp), %rax
movb $0x0, 0x2(%rax)
leaq 0x47(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x86da0
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x70(%rsp), %rsi
callq 0x86a00
jmp 0x12a1f6
leaq 0x47(%rsp), %rdi
callq 0x867b0
jmp 0x12a2b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x47(%rsp), %rdi
callq 0x867b0
jmp 0x12a2c3
leaq 0x46(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x86da0
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x70(%rsp), %rsi
callq 0x86a00
jmp 0x12a247
leaq 0x46(%rsp), %rdi
callq 0x867b0
jmp 0x12a2b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x46(%rsp), %rdi
callq 0x867b0
jmp 0x12a2c3
leaq 0x45(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x86da0
movq 0x28(%rsp), %rdi
movq (%rsp), %rdx
leaq 0x70(%rsp), %rsi
callq 0x86a00
jmp 0x12a290
leaq 0x45(%rsp), %rdi
callq 0x867b0
jmp 0x12a2b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x45(%rsp), %rdi
callq 0x867b0
jmp 0x12a2c3
movq 0x30(%rsp), %rax
addq $0xa8, %rsp
retq
movq 0x58(%rsp), %rdi
callq 0x86d80
nopl (%rax)