// File: Eba-M[P]E3DC-Control/cJSON.c
// Function: parse_value(cJSON*, parse_buffer*)
static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buffer)
{
    if ((input_buffer == NULL) || (input_buffer->content == NULL))
    {
        return false; /* no input */
    }

    /* parse the different types of values */
    /* null */
    if (can_read(input_buffer, 4) && (strncmp((const char*)buffer_at_offset(input_buffer), "null", 4) == 0))
    {
        item->type = cJSON_NULL;
        input_buffer->offset += 4;
        return true;
    }
    /* false */
    if (can_read(input_buffer, 5) && (strncmp((const char*)buffer_at_offset(input_buffer), "false", 5) == 0))
    {
        item->type = cJSON_False;
        input_buffer->offset += 5;
        return true;
    }
    /* true */
    if (can_read(input_buffer, 4) && (strncmp((const char*)buffer_at_offset(input_buffer), "true", 4) == 0))
    {
        item->type = cJSON_True;
        item->valueint = 1;
        input_buffer->offset += 4;
        return true;
    }
    /* string */
    if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '\"'))
    {
        return parse_string(item, input_buffer);
    }
    /* number */
    if (can_access_at_index(input_buffer, 0) && ((buffer_at_offset(input_buffer)[0] == '-') || ((buffer_at_offset(input_buffer)[0] >= '0') && (buffer_at_offset(input_buffer)[0] <= '9'))))
    {
        return parse_number(item, input_buffer);
    }
    /* array */
    if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '['))
    {
        return parse_array(item, input_buffer);
    }
    /* object */
    if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '{'))
    {
        return parse_object(item, input_buffer);
    }

    return false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, (%rsp)
cmpq $0x0, (%rsp)
je 0x5955e
movq (%rsp), %rax
cmpq $0x0, (%rax)
jne 0x5956b
movl $0x0, 0x14(%rsp)
jmp 0x5981a
cmpq $0x0, (%rsp)
je 0x595d6
movq (%rsp), %rax
movq 0x10(%rax), %rax
addq $0x4, %rax
movq (%rsp), %rcx
cmpq 0x8(%rcx), %rax
ja 0x595d6
movq (%rsp), %rax
movq (%rax), %rdi
movq (%rsp), %rax
addq 0x10(%rax), %rdi
leaq 0x93b7(%rip), %rsi      # 0x62955
movl $0x4, %edx
callq 0x2140
cmpl $0x0, %eax
jne 0x595d6
movq 0x8(%rsp), %rax
movl $0x4, 0x18(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x4, %rcx
movq %rcx, 0x10(%rax)
movl $0x1, 0x14(%rsp)
jmp 0x5981a
cmpq $0x0, (%rsp)
je 0x59641
movq (%rsp), %rax
movq 0x10(%rax), %rax
addq $0x5, %rax
movq (%rsp), %rcx
cmpq 0x8(%rcx), %rax
ja 0x59641
movq (%rsp), %rax
movq (%rax), %rdi
movq (%rsp), %rax
addq 0x10(%rax), %rdi
leaq 0x6f1b(%rip), %rsi      # 0x60524
movl $0x5, %edx
callq 0x2140
cmpl $0x0, %eax
jne 0x59641
movq 0x8(%rsp), %rax
movl $0x1, 0x18(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x5, %rcx
movq %rcx, 0x10(%rax)
movl $0x1, 0x14(%rsp)
jmp 0x5981a
cmpq $0x0, (%rsp)
je 0x596b8
movq (%rsp), %rax
movq 0x10(%rax), %rax
addq $0x4, %rax
movq (%rsp), %rcx
cmpq 0x8(%rcx), %rax
ja 0x596b8
movq (%rsp), %rax
movq (%rax), %rdi
movq (%rsp), %rax
addq 0x10(%rax), %rdi
leaq 0x6eab(%rip), %rsi      # 0x6051f
movl $0x4, %edx
callq 0x2140
cmpl $0x0, %eax
jne 0x596b8
movq 0x8(%rsp), %rax
movl $0x2, 0x18(%rax)
movq 0x8(%rsp), %rax
movl $0x1, 0x28(%rax)
movq (%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x4, %rcx
movq %rcx, 0x10(%rax)
movl $0x1, 0x14(%rsp)
jmp 0x5981a
cmpq $0x0, (%rsp)
je 0x59704
movq (%rsp), %rax
movq 0x10(%rax), %rax
addq $0x0, %rax
movq (%rsp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x59704
movq (%rsp), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq 0x10(%rcx), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x22, %eax
jne 0x59704
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x5c750
movl %eax, 0x14(%rsp)
jmp 0x5981a
cmpq $0x0, (%rsp)
je 0x59780
movq (%rsp), %rax
movq 0x10(%rax), %rax
addq $0x0, %rax
movq (%rsp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x59780
movq (%rsp), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq 0x10(%rcx), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x2d, %eax
je 0x59769
movq (%rsp), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq 0x10(%rcx), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jl 0x59780
movq (%rsp), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq 0x10(%rcx), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x39, %eax
jg 0x59780
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x5cb00
movl %eax, 0x14(%rsp)
jmp 0x5981a
cmpq $0x0, (%rsp)
je 0x597c9
movq (%rsp), %rax
movq 0x10(%rax), %rax
addq $0x0, %rax
movq (%rsp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x597c9
movq (%rsp), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq 0x10(%rcx), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x5b, %eax
jne 0x597c9
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x5cd40
movl %eax, 0x14(%rsp)
jmp 0x5981a
cmpq $0x0, (%rsp)
je 0x59812
movq (%rsp), %rax
movq 0x10(%rax), %rax
addq $0x0, %rax
movq (%rsp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x59812
movq (%rsp), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq 0x10(%rcx), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x7b, %eax
jne 0x59812
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x5d000
movl %eax, 0x14(%rsp)
jmp 0x5981a
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)