// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
xorl %ebp, %ebp
testq %rsi, %rsi
je 0x2c793
movq %rsi, %rbx
movq (%rsi), %r12
testq %r12, %r12
je 0x2c793
movq %rdi, 0x8(%rsp)
movq 0x8(%rbx), %r13
movq 0x10(%rbx), %r15
leaq 0x4(%r15), %r14
cmpq %r13, %r14
ja 0x2c5f6
leaq (%r12,%r15), %rdi
leaq 0x652d(%rip), %rsi      # 0x32b15
movl $0x4, %edx
callq 0x2110
testl %eax, %eax
je 0x2c672
movq %rbx, 0x10(%rsp)
leaq 0x5(%r15), %rbx
cmpq %r13, %rbx
ja 0x2c61d
leaq (%r12,%r15), %rdi
leaq 0x41aa(%rip), %rsi      # 0x307b9
movl $0x5, %edx
callq 0x2110
testl %eax, %eax
je 0x2c687
cmpq %r13, %r14
ja 0x2c63f
leaq (%r12,%r15), %rdi
leaq 0x4187(%rip), %rsi      # 0x307b4
movl $0x4, %edx
callq 0x2110
testl %eax, %eax
je 0x2c772
cmpq %r13, %r15
movq 0x10(%rsp), %rbx
jae 0x2c793
movzbl (%r12,%r15), %eax
cmpl $0x22, %eax
jne 0x2c6a1
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e675
movq 0x8(%rsp), %rax
movl $0x4, 0x18(%rax)
movq %r14, 0x10(%rbx)
jmp 0x2c78e
movq 0x8(%rsp), %rax
movl $0x1, 0x18(%rax)
movq 0x10(%rsp), %rax
movq %rbx, 0x10(%rax)
jmp 0x2c78e
addq %r15, %r12
cmpl $0x2d, %eax
setne %cl
leal -0x30(%rax), %edx
cmpb $0xa, %dl
setae %dl
testb %dl, %cl
jne 0x2c7a4
movq $0x0, 0x18(%rsp)
xorl %eax, %eax
movabsq $0x40000000400000d, %rcx # imm = 0x40000000400000D
leaq (%r15,%rax), %rdx
cmpq %r13, %rdx
jae 0x2c708
movb (%r12,%rax), %dl
movzbl %dl, %esi
leal -0x30(%rsi), %edi
cmpl $0xa, %edi
jb 0x2c6f6
addl $-0x2b, %esi
cmpl $0x3a, %esi
ja 0x2c708
btq %rsi, %rcx
jae 0x2c708
movb %dl, 0x20(%rsp,%rax)
incq %rax
cmpq $0x3f, %rax
jne 0x2c6d0
movl $0x3f, %eax
movb $0x0, 0x20(%rsp,%rax)
leaq 0x20(%rsp), %r15
leaq 0x18(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x21c0
movq (%r12), %rax
cmpq %rax, %r15
movq 0x8(%rsp), %rdx
je 0x2c8de
movsd %xmm0, 0x30(%rdx)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
ucomisd 0x633a(%rip), %xmm0     # 0x32a80
jae 0x2c75f
movl $0x80000000, %ecx       # imm = 0x80000000
movsd 0x6333(%rip), %xmm1     # 0x32a88
ucomisd %xmm0, %xmm1
jae 0x2c75f
cvttsd2si %xmm0, %ecx
movl %ecx, 0x28(%rdx)
movl $0x8, 0x18(%rdx)
subq %r15, %rax
addq %rax, 0x10(%rbx)
jmp 0x2c78e
movq 0x8(%rsp), %rax
movl $0x2, 0x18(%rax)
movl $0x1, 0x28(%rax)
movq 0x10(%rsp), %rax
movq %r14, 0x10(%rax)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x7b, %eax
je 0x2c80b
cmpl $0x5b, %eax
movq 0x8(%rsp), %r13
jne 0x2c793
movq 0x18(%rbx), %rax
cmpq $0x3e7, %rax            # imm = 0x3E7
ja 0x2c793
incq %rax
movq %rax, 0x18(%rbx)
cmpb $0x5b, (%r12)
jne 0x2c793
incq %r15
movq %r15, 0x10(%rbx)
movq %rbx, %rdi
callq 0x2c8ec
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x2c826
movq (%rbx), %rcx
cmpb $0x5d, (%rcx,%rax)
jne 0x2c832
decq 0x18(%rbx)
xorl %r14d, %r14d
movl $0x20, 0x18(%r13)
movq %r14, 0x10(%r13)
incq %rax
movq %rax, 0x10(%rbx)
jmp 0x2c78e
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e97a
decq %rax
movq %rax, 0x10(%rbx)
jmp 0x2c793
decq %rax
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
xorl %r13d, %r13d
movl $0x40, %edi
callq *0x20(%rbx)
testq %rax, %rax
je 0x2c8e5
movq %rax, %r15
xorpd %xmm0, %xmm0
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq %rax, %r14
testq %r12, %r12
je 0x2c87d
movq %r15, (%r13)
movq %r13, 0x8(%r15)
movq %r12, %r14
incq 0x10(%rbx)
movq %rbx, %rdi
callq 0x2c8ec
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2c59f
testl %eax, %eax
je 0x2c8d3
movq %rbx, %rdi
callq 0x2c8ec
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x2c8d3
movq (%rbx), %rcx
movzbl (%rcx,%rax), %ecx
movq %r14, %r12
movq %r15, %r13
cmpl $0x2c, %ecx
je 0x2c83f
cmpl $0x5d, %ecx
jne 0x2c8d3
decq 0x18(%rbx)
movq %r15, 0x8(%r14)
movq 0x8(%rsp), %r13
jmp 0x2c7f6
movq %r14, %r12
movq %r12, %rdi
callq 0x2c288
xorl %ebp, %ebp
jmp 0x2c793
testq %r12, %r12
jne 0x2c8d6
jmp 0x2c8de