// File: /workspace/github_cpp_makefile_star2_O2/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 0x286c2
movq %rsi, %rbx
movq (%rsi), %r12
testq %r12, %r12
je 0x286c2
movq %rdi, %rbp
movq 0x8(%rbx), %r13
movq 0x10(%rbx), %r15
leaq 0x4(%r15), %r14
cmpq %r13, %r14
ja 0x282a9
leaq (%r12,%r15), %rdi
leaq 0x569c(%rip), %rsi      # 0x2d939
pushq $0x4
popq %rdx
callq 0x2120
testl %eax, %eax
je 0x28320
movq %rbp, (%rsp)
movq %rbx, %rbp
leaq 0x5(%r15), %rbx
cmpq %r13, %rbx
ja 0x282d0
leaq (%r12,%r15), %rdi
leaq 0x3425(%rip), %rsi      # 0x2b6e9
pushq $0x5
popq %rdx
callq 0x2120
testl %eax, %eax
je 0x28330
cmpq %r13, %r14
ja 0x282f0
leaq (%r12,%r15), %rdi
leaq 0x3404(%rip), %rsi      # 0x2b6e4
pushq $0x4
popq %rdx
callq 0x2120
testl %eax, %eax
je 0x283ab
cmpq %r13, %r15
jae 0x286c0
movq %rbp, %rbx
movzbl (%r12,%r15), %eax
cmpl $0x22, %eax
jne 0x28344
movq (%rsp), %rdi
movq %rbx, %rsi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29e10
movl $0x4, 0x18(%rbp)
movq %r14, 0x10(%rbx)
jmp 0x284ac
movq (%rsp), %rax
movl $0x1, 0x18(%rax)
movq %rbx, 0x10(%rbp)
jmp 0x284ac
addq %r15, %r12
cmpl $0x2d, %eax
setne %cl
leal -0x30(%rax), %edx
cmpb $0xa, %dl
setae %dl
testb %dl, %cl
movq (%rsp), %r14
jne 0x283c6
andq $0x0, 0x8(%rsp)
xorl %eax, %eax
movabsq $0x400000004007fed, %rcx # imm = 0x400000004007FED
cmpq $0x3f, %rax
je 0x28446
leaq (%r15,%rax), %rdx
cmpq %r13, %rdx
jae 0x28446
movzbl (%r12,%rax), %edx
leal -0x2b(%rdx), %esi
cmpl $0x3a, %esi
ja 0x28446
btq %rsi, %rcx
jae 0x28446
movb %dl, 0x10(%rsp,%rax)
incq %rax
jmp 0x28370
movq (%rsp), %rax
movl $0x2, 0x18(%rax)
movl $0x1, 0x28(%rax)
movq %r14, 0x10(%rbp)
jmp 0x284ac
cmpl $0x7b, %eax
je 0x284b4
cmpl $0x5b, %eax
jne 0x286c0
movq 0x18(%rbx), %rax
cmpq $0x3e7, %rax            # imm = 0x3E7
ja 0x286c0
incq %rax
movq %rax, 0x18(%rbx)
cmpb $0x5b, (%r12)
jne 0x286c0
incq %r15
movq %r15, 0x10(%rbx)
movq %rbx, %rdi
callq 0x286d8
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x28526
movq (%rbx), %rcx
cmpb $0x5d, (%rcx,%rax)
jne 0x28532
xorl %ebp, %ebp
xorl %r15d, %r15d
decq 0x18(%rbx)
testq %rbp, %rbp
je 0x28436
movq %r15, 0x8(%rbp)
movq (%rsp), %rcx
movl $0x20, 0x18(%rcx)
jmp 0x28519
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
je 0x286c0
movsd %xmm0, 0x30(%r14)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
ucomisd 0x5428(%rip), %xmm0     # 0x2d8a8
jae 0x28499
movl $0x80000000, %ecx       # imm = 0x80000000
movsd 0x5421(%rip), %xmm1     # 0x2d8b0
ucomisd %xmm0, %xmm1
jae 0x28499
cvttsd2si %xmm0, %ecx
movl %ecx, 0x28(%r14)
movl $0x8, 0x18(%r14)
subq %r15, %rax
addq %rax, 0x10(%rbx)
pushq $0x1
popq %rax
jmp 0x286c2
movq 0x18(%rbx), %rax
cmpq $0x3e7, %rax            # imm = 0x3E7
ja 0x286c0
incq %rax
movq %rax, 0x18(%rbx)
cmpb $0x7b, (%r12)
jne 0x286c0
incq %r15
movq %r15, 0x10(%rbx)
movq %rbx, %rdi
callq 0x286d8
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x28526
movq (%rbx), %rcx
cmpb $0x7d, (%rcx,%rax)
jne 0x285d7
xorl %ebp, %ebp
xorl %r15d, %r15d
decq 0x18(%rbx)
testq %rbp, %rbp
je 0x2850e
movq %r15, 0x8(%rbp)
movq (%rsp), %rcx
movl $0x40, 0x18(%rcx)
movq %rbp, 0x10(%rcx)
incq %rax
movq %rax, 0x10(%rbx)
jmp 0x284ac
decq %rax
movq %rax, 0x10(%rbx)
jmp 0x286c0
decq %rax
movq %rax, 0x10(%rbx)
xorl %r13d, %r13d
pushq $0x40
popq %r12
xorl %r14d, %r14d
movq %r12, %rdi
callq *0x20(%rbx)
testq %rax, %rax
je 0x286d1
movq %rax, %r15
xorpd %xmm0, %xmm0
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq %rax, %rbp
testq %r13, %r13
je 0x2857e
movq %r15, (%r14)
movq %r14, 0x8(%r15)
movq %r13, %rbp
incq 0x10(%rbx)
movq %rbx, %rdi
callq 0x286d8
movq %r15, %rdi
movq %rbx, %rsi
callq 0x28256
testl %eax, %eax
je 0x286b5
movq %rbx, %rdi
callq 0x286d8
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x286b5
movq (%rbx), %rcx
movzbl (%rcx,%rax), %ecx
movq %rbp, %r13
movq %r15, %r14
cmpl $0x2c, %ecx
je 0x28543
cmpl $0x5d, %ecx
je 0x28429
jmp 0x286b5
decq %rax
movq %rax, 0x10(%rbx)
xorl %r13d, %r13d
pushq $0x40
popq %r12
xorl %r14d, %r14d
movq %r12, %rdi
callq *0x20(%rbx)
testq %rax, %rax
je 0x286d1
movq %rax, %r15
xorpd %xmm0, %xmm0
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq %rax, %rbp
testq %r13, %r13
je 0x28623
movq %r15, (%r14)
movq %r14, 0x8(%r15)
movq %r13, %rbp
incq 0x10(%rbx)
movq %rbx, %rdi
callq 0x286d8
movq %r15, %rdi
movq %rbx, %rsi
callq 0x29e10
testl %eax, %eax
je 0x286b5
movq %rbx, %rdi
callq 0x286d8
movq 0x20(%r15), %rax
movq %rax, 0x38(%r15)
andq $0x0, 0x20(%r15)
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x286b5
movq (%rbx), %rcx
cmpb $0x3a, (%rcx,%rax)
jne 0x286b5
incq %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x286d8
movq %r15, %rdi
movq %rbx, %rsi
callq 0x28256
testl %eax, %eax
je 0x286b5
movq %rbx, %rdi
callq 0x286d8
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x286b5
movq (%rbx), %rcx
movzbl (%rcx,%rax), %ecx
movq %rbp, %r13
movq %r15, %r14
cmpl $0x2c, %ecx
je 0x285e8
cmpl $0x7d, %ecx
je 0x28501
movq %rbp, %r13
movq %r13, %rdi
callq 0x27f56
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r13, %r13
jne 0x286b8
jmp 0x286c0