// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: getDoubleFromObject
int getDoubleFromObject(robj *o, double *target) {
    double value;
    char *eptr;

    if (o == NULL) {
        value = 0;
    } else {
        serverAssertWithInfo(NULL,o,o->type == OBJ_STRING);
        if (sdsEncodedObject(o)) {
            errno = 0;
            value = strtod(o->ptr, &eptr);
            if (isspace(((char*)o->ptr)[0]) ||
                eptr[0] != '\0' ||
                (errno == ERANGE &&
                    (value == HUGE_VAL || value == -HUGE_VAL || value == 0)) ||
                errno == EINVAL ||
                isnan(value))
                return C_ERR;
        } else if (o->encoding == OBJ_ENCODING_INT) {
            value = (long)o->ptr;
        } else {
            serverPanic("Unknown string encoding");
        }
    }
    *target = value;
    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x49984
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x49af2
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x49994
jmp 0x499bf
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0xf107d(%rip), %rdx     # 0x13aa20
leaq 0xf1cec(%rip), %rcx     # 0x13b696
movl $0x21e, %r8d            # imm = 0x21E
callq 0x78360
movl $0x1, %edi
callq 0x263c0
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x499e5
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x49aa7
callq 0x26880
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x26cd0
movsd %xmm0, -0x20(%rbp)
callq 0x26550
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x49a9c
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x49a9c
callq 0x26880
cmpl $0x22, (%rax)
jne 0x49a80
movsd -0x20(%rbp), %xmm0
movsd 0xf0fb3(%rip), %xmm1    # 0x13aa00
ucomisd %xmm1, %xmm0
jne 0x49a57
jp 0x49a57
jmp 0x49a9c
movsd -0x20(%rbp), %xmm0
movsd 0xf1c1c(%rip), %xmm1    # 0x13b680
ucomisd %xmm1, %xmm0
jne 0x49a6e
jp 0x49a6e
jmp 0x49a9c
movsd -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x49a80
jp 0x49a80
jmp 0x49a9c
callq 0x26880
cmpl $0x16, (%rax)
je 0x49a9c
movsd -0x20(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x49a9c
jmp 0x49aa5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x49b06
jmp 0x49af0
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x49acc
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x49aee
leaq 0xf1cd4(%rip), %rdi     # 0x13b7a7
leaq 0xf1bbc(%rip), %rsi     # 0x13b696
movl $0x22c, %edx            # imm = 0x22C
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
jmp 0x49af0
jmp 0x49af2
movsd -0x20(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop