// File: /workspace/github_cpp_makefile_star2_O1/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 $0x58, %rsp
xorl %eax, %eax
testq %rsi, %rsi
je 0x2c87b
movq %rsi, %rbx
movq (%rsi), %r12
testq %r12, %r12
je 0x2c87b
movq %rdi, (%rsp)
movq 0x8(%rbx), %rbp
movq 0x10(%rbx), %r13
leaq 0x4(%r13), %r14
cmpq %rbp, %r14
ja 0x2c563
leaq (%r12,%r13), %rdi
leaq 0x65b4(%rip), %rsi      # 0x32b09
movl $0x4, %edx
callq 0x2110
testl %eax, %eax
je 0x2c5d1
leaq 0x5(%r13), %r15
cmpq %rbp, %r15
ja 0x2c585
leaq (%r12,%r13), %rdi
leaq 0x423e(%rip), %rsi      # 0x307b5
movl $0x5, %edx
callq 0x2110
testl %eax, %eax
je 0x2c5e1
cmpq %rbp, %r14
ja 0x2c5a7
leaq (%r12,%r13), %rdi
leaq 0x421b(%rip), %rsi      # 0x307b0
movl $0x4, %edx
callq 0x2110
testl %eax, %eax
je 0x2c6cf
cmpq %rbp, %r13
jae 0x2c879
cmpb $0x22, (%r12,%r13)
jne 0x2c5f5
movq (%rsp), %rdi
movq %rbx, %rsi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e6d0
movq (%rsp), %rax
movl $0x4, 0x18(%rax)
jmp 0x2c6e1
movq (%rsp), %rax
movl $0x1, 0x18(%rax)
movq %r15, 0x10(%rbx)
jmp 0x2c6e5
cmpq %rbp, %r13
jae 0x2c879
movb (%r12,%r13), %al
cmpb $0x2d, %al
setne %cl
addb $-0x30, %al
cmpb $0xa, %al
setae %al
testb %al, %cl
jne 0x2c6ef
addq %r13, %r12
movq $0x0, 0x8(%rsp)
xorl %eax, %eax
movabsq $0x40000000400000d, %rcx # imm = 0x40000000400000D
leaq (%rax,%r13), %rdx
cmpq %rbp, %rdx
jae 0x2c666
movb (%r12,%rax), %dl
movzbl %dl, %esi
leal -0x30(%rsi), %edi
cmpl $0xa, %edi
jb 0x2c654
addl $-0x2b, %esi
cmpl $0x3a, %esi
ja 0x2c666
btq %rsi, %rcx
jae 0x2c666
movb %dl, 0x10(%rsp,%rax)
incq %rax
cmpq $0x3f, %rax
jne 0x2c62e
movl $0x3f, %eax
movb $0x0, 0x10(%rsp,%rax)
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x21c0
movq (%r12), %rax
cmpq %rax, %r15
movq (%rsp), %rdx
je 0x2c879
movsd %xmm0, 0x30(%rdx)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
ucomisd 0x63d5(%rip), %xmm0     # 0x32a78
jae 0x2c6bc
movl $0x80000000, %ecx       # imm = 0x80000000
movsd 0x63ce(%rip), %xmm1     # 0x32a80
ucomisd %xmm0, %xmm1
jae 0x2c6bc
cvttsd2si %xmm0, %ecx
movl %ecx, 0x28(%rdx)
movl $0x8, 0x18(%rdx)
subq %r15, %rax
addq %rax, 0x10(%rbx)
jmp 0x2c6e5
movq (%rsp), %rax
movl $0x2, 0x18(%rax)
movl $0x1, 0x28(%rax)
movq %r14, 0x10(%rbx)
movl $0x1, %eax
jmp 0x2c87b
cmpq %rbp, %r13
jae 0x2c879
cmpb $0x5b, (%r12,%r13)
jne 0x2c77b
movq 0x18(%rbx), %rcx
cmpq $0x3e7, %rcx            # imm = 0x3E7
movl $0x0, %eax
ja 0x2c87b
incq %rcx
movq %rcx, 0x18(%rbx)
cmpb $0x5b, (%r12,%r13)
jne 0x2c869
incq %r13
movq %r13, 0x10(%rbx)
movq %rbx, %rdi
callq 0x2c88a
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq %rcx, %rax
jae 0x2c862
movq (%rbx), %rdx
cmpb $0x5d, (%rdx,%rax)
jne 0x2c7ae
xorl %r12d, %r12d
xorl %ebp, %ebp
decq 0x18(%rbx)
testq %r12, %r12
movq (%rsp), %rax
je 0x2c767
movq %rbp, 0x8(%r12)
movl $0x20, 0x18(%rax)
movq %r12, 0x10(%rax)
incq 0x10(%rbx)
jmp 0x2c6e5
cmpq %rbp, %r13
jae 0x2c879
cmpb $0x7b, (%r12,%r13)
movl $0x0, %eax
jne 0x2c87b
movq (%rsp), %rdi
movq %rbx, %rsi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2ea4b
cmpq %rcx, %rax
jae 0x2c862
decq %rax
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
xorl %ebp, %ebp
movl $0x40, %edi
callq *0x20(%rbx)
testq %rax, %rax
je 0x2c824
movq %rax, %r13
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 0x2c7fd
movq %r13, (%rbp)
movq %rbp, 0x8(%r13)
movq %r12, %r14
incq 0x10(%rbx)
movq %rbx, %rdi
callq 0x2c88a
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2c50d
testl %eax, %eax
je 0x2c828
movq %rbx, %rdi
callq 0x2c88a
movb $0x1, %al
jmp 0x2c82a
xorl %eax, %eax
jmp 0x2c830
xorl %eax, %eax
movq %r14, %r12
movq %r13, %rbp
testb %al, %al
je 0x2c86c
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq %rcx, %rax
jae 0x2c86c
movq (%rbx), %rdx
cmpb $0x2c, (%rdx,%rax)
je 0x2c7c3
cmpq %rcx, %rax
jae 0x2c86c
movq (%rbx), %rcx
cmpb $0x5d, (%rcx,%rax)
je 0x2c755
jmp 0x2c86c
decq %rax
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
testq %r12, %r12
je 0x2c879
movq %r12, %rdi
callq 0x2c1d6
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq