// File: /workspace/github_c_makefile_star2_O3/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: parse_value
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 0x54d9
movq %rsi, %rbx
movq (%rsi), %r12
testq %r12, %r12
je 0x54d9
movq %rdi, %rbp
movq 0x8(%rbx), %r13
movq 0x10(%rbx), %r15
leaq 0x4(%r15), %r14
cmpq %r13, %r14
ja 0x5222
leaq (%r12,%r15), %rdi
leaq 0x3749(%rip), %rsi      # 0x895d
movl $0x4, %edx
callq 0x2100
testl %eax, %eax
je 0x529a
movq %rbp, (%rsp)
leaq 0x5(%r15), %rbp
cmpq %r13, %rbp
ja 0x5248
leaq (%r12,%r15), %rdi
leaq 0x3728(%rip), %rsi      # 0x8962
movl $0x5, %edx
callq 0x2100
testl %eax, %eax
je 0x52a6
cmpq %r13, %r14
ja 0x526a
leaq (%r12,%r15), %rdi
leaq 0x3710(%rip), %rsi      # 0x8968
movl $0x4, %edx
callq 0x2100
testl %eax, %eax
je 0x5386
cmpq %r13, %r15
movq (%rsp), %rbp
jae 0x54d7
movzbl (%r12,%r15), %eax
cmpl $0x22, %eax
jne 0x52ba
movq %rbp, %rdi
movq %rbx, %rsi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x716b
movl $0x4, 0x18(%rbp)
jmp 0x5398
movq (%rsp), %rax
movl $0x1, 0x18(%rax)
movq %rbp, 0x10(%rbx)
jmp 0x539c
addq %r15, %r12
cmpl $0x2d, %eax
setne %cl
leal -0x30(%rax), %edx
cmpb $0xa, %dl
setae %dl
testb %dl, %cl
jne 0x53a6
movq $0x0, 0x8(%rsp)
xorl %eax, %eax
movabsq $0x40000000400000d, %rcx # imm = 0x40000000400000D
leaq (%r15,%rax), %rdx
cmpq %r13, %rdx
jae 0x5321
movb (%r12,%rax), %dl
movzbl %dl, %esi
leal -0x30(%rsi), %edi
cmpl $0xa, %edi
jb 0x530f
addl $-0x2b, %esi
cmpl $0x3a, %esi
ja 0x5321
btq %rsi, %rcx
jae 0x5321
movb %dl, 0x10(%rsp,%rax)
incq %rax
cmpq $0x3f, %rax
jne 0x52e9
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
je 0x54d7
movsd %xmm0, 0x30(%rbp)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
ucomisd 0x358e(%rip), %xmm0     # 0x88e8
jae 0x5373
movl $0x80000000, %ecx       # imm = 0x80000000
movsd 0x3587(%rip), %xmm1     # 0x88f0
ucomisd %xmm0, %xmm1
jae 0x5373
cvttsd2si %xmm0, %ecx
movl %ecx, 0x28(%rbp)
movl $0x8, 0x18(%rbp)
subq %r15, %rax
addq %rax, 0x10(%rbx)
jmp 0x539c
movq (%rsp), %rax
movl $0x2, 0x18(%rax)
movl $0x1, 0x28(%rax)
movq %r14, 0x10(%rbx)
movl $0x1, %eax
jmp 0x54d9
cmpl $0x7b, %eax
je 0x5413
cmpl $0x5b, %eax
jne 0x54d7
movq 0x18(%rbx), %rax
cmpq $0x3e7, %rax            # imm = 0x3E7
ja 0x54d7
incq %rax
movq %rax, 0x18(%rbx)
cmpb $0x5b, (%r12)
jne 0x54d7
incq %r15
movq %r15, 0x10(%rbx)
movq %rbx, %rdi
callq 0x54ef
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x542c
movq (%rbx), %rcx
cmpb $0x5d, (%rcx,%rax)
jne 0x5438
xorl %r14d, %r14d
decq 0x18(%rbx)
movl $0x20, 0x18(%rbp)
movq %r14, 0x10(%rbp)
incq %rax
movq %rax, 0x10(%rbx)
jmp 0x539c
movq %rbp, %rdi
movq %rbx, %rsi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7470
decq %rax
movq %rax, 0x10(%rbx)
jmp 0x54d7
decq %rax
movq %rax, 0x10(%rbx)
xorl %r15d, %r15d
xorl %r13d, %r13d
movl $0x40, %edi
callq *0x20(%rbx)
testq %rax, %rax
je 0x54e8
movq %rax, %r12
xorpd %xmm0, %xmm0
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq %rax, %r14
testq %r15, %r15
je 0x5484
movq %r12, (%r13)
movq %r13, 0x8(%r12)
movq %r15, %r14
incq 0x10(%rbx)
movq %rbx, %rdi
callq 0x54ef
movq %r12, %rdi
movq %rbx, %rsi
callq 0x51cd
testl %eax, %eax
je 0x54cc
movq %rbx, %rdi
callq 0x54ef
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x54cc
movq (%rbx), %rcx
movzbl (%rcx,%rax), %ecx
movq %r14, %r15
movq %r12, %r13
cmpl $0x2c, %ecx
je 0x5445
cmpl $0x5d, %ecx
je 0x53fb
movq %r14, %r15
movq %r15, %rdi
callq 0x4fa4
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r15, %r15
jne 0x54cf
jmp 0x54d7