// File: /workspace/github_c_makefile_star2_O0/bloomsource[P]dns_update/cjson.c
// Function: parse_number
static cJSON_bool parse_number(cJSON * const item, parse_buffer * const input_buffer)
{
    double number = 0;
    unsigned char *after_end = NULL;
    unsigned char number_c_string[64];
    unsigned char decimal_point = get_decimal_point();
    size_t i = 0;

    if ((input_buffer == NULL) || (input_buffer->content == NULL))
    {
        return false;
    }

    /* copy the number into a temporary buffer and replace '.' with the decimal point
     * of the current locale (for strtod)
     * This also takes care of '\0' not necessarily being available for marking the end of the input */
    for (i = 0; (i < (sizeof(number_c_string) - 1)) && can_access_at_index(input_buffer, i); i++)
    {
        switch (buffer_at_offset(input_buffer)[i])
        {
            case '0':
            case '1':
            case '2':
            case '3':
            case '4':
            case '5':
            case '6':
            case '7':
            case '8':
            case '9':
            case '+':
            case '-':
            case 'e':
            case 'E':
                number_c_string[i] = buffer_at_offset(input_buffer)[i];
                break;

            case '.':
                number_c_string[i] = decimal_point;
                break;

            default:
                goto loop_end;
        }
    }
loop_end:
    number_c_string[i] = '\0';

    number = strtod((const char*)number_c_string, (char**)&after_end);
    if (number_c_string == after_end)
    {
        return false; /* parse_error */
    }

    item->valuedouble = number;
    item->valueint    = (int64_t)number;

    item->type = cJSON_Number;

    input_buffer->offset += (size_t)(after_end - number_c_string);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
callq 0x8790
movb %al, -0x71(%rbp)
movq $0x0, -0x80(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7d04
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x7d10
movl $0x0, -0x4(%rbp)
jmp 0x7e8c
movq $0x0, -0x80(%rbp)
xorl %eax, %eax
cmpq $0x3f, -0x80(%rbp)
movb %al, -0x81(%rbp)
jae 0x7d5f
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x82(%rbp)
je 0x7d53
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
addq -0x80(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
setb %al
movb %al, -0x82(%rbp)
movb -0x82(%rbp), %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x7d6e
jmp 0x7e17
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq 0x10(%rax), %rax
addq %rax, %rcx
movq -0x80(%rbp), %rax
movzbl (%rax,%rcx), %eax
movl %eax, -0x88(%rbp)
subl $0x2b, %eax
je 0x7dd5
jmp 0x7d91
movl -0x88(%rbp), %eax
subl $0x2d, %eax
je 0x7dd5
jmp 0x7d9e
movl -0x88(%rbp), %eax
subl $0x2e, %eax
je 0x7df5
jmp 0x7dab
movl -0x88(%rbp), %eax
addl $-0x30, %eax
subl $0xa, %eax
jb 0x7dd5
jmp 0x7dbb
movl -0x88(%rbp), %eax
subl $0x45, %eax
je 0x7dd5
jmp 0x7dc8
movl -0x88(%rbp), %eax
subl $0x65, %eax
jne 0x7e02
jmp 0x7dd5
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
addq 0x10(%rcx), %rax
movq -0x80(%rbp), %rcx
movb (%rax,%rcx), %cl
movq -0x80(%rbp), %rax
movb %cl, -0x70(%rbp,%rax)
jmp 0x7e04
movb -0x71(%rbp), %cl
movq -0x80(%rbp), %rax
movb %cl, -0x70(%rbp,%rax)
jmp 0x7e04
jmp 0x7e19
jmp 0x7e06
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x7d18
jmp 0x7e19
movq -0x80(%rbp), %rax
movb $0x0, -0x70(%rbp,%rax)
leaq -0x70(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x2090
movsd %xmm0, -0x20(%rbp)
leaq -0x70(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x7e47
movl $0x0, -0x4(%rbp)
jmp 0x7e8c
movsd -0x20(%rbp), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x30(%rax)
cvttsd2si -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movl $0x8, 0x18(%rax)
movq -0x28(%rbp), %rcx
leaq -0x70(%rbp), %rax
subq %rax, %rcx
movq -0x18(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)