// File: /workspace/github_c_makefile_star2_O2/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 0x5323
movq %rsi, %rbx
movq (%rsi), %r12
testq %r12, %r12
je 0x5323
movq %rdi, %rbp
movq 0x8(%rbx), %r13
movq 0x10(%rbx), %r15
leaq 0x4(%r15), %r14
cmpq %r13, %r14
ja 0x4f14
leaq (%r12,%r15), %rdi
leaq 0x2a89(%rip), %rsi      # 0x7991
pushq $0x4
popq %rdx
callq 0x2100
testl %eax, %eax
je 0x4f8b
movq %rbp, (%rsp)
movq %rbx, %rbp
leaq 0x5(%r15), %rbx
cmpq %r13, %rbx
ja 0x4f3b
leaq (%r12,%r15), %rdi
leaq 0x2a67(%rip), %rsi      # 0x7996
pushq $0x5
popq %rdx
callq 0x2100
testl %eax, %eax
je 0x4f9b
cmpq %r13, %r14
ja 0x4f5b
leaq (%r12,%r15), %rdi
leaq 0x2a51(%rip), %rsi      # 0x799c
pushq $0x4
popq %rdx
callq 0x2100
testl %eax, %eax
je 0x5016
cmpq %r13, %r15
jae 0x5321
movq %rbp, %rbx
movzbl (%r12,%r15), %eax
cmpl $0x22, %eax
jne 0x4faf
movq (%rsp), %rdi
movq %rbx, %rsi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6987
movl $0x4, 0x18(%rbp)
movq %r14, 0x10(%rbx)
jmp 0x5109
movq (%rsp), %rax
movl $0x1, 0x18(%rax)
movq %rbx, 0x10(%rbp)
jmp 0x5109
addq %r15, %r12
cmpl $0x2d, %eax
setne %cl
leal -0x30(%rax), %edx
cmpb $0xa, %dl
setae %dl
testb %dl, %cl
movq (%rsp), %rbp
jne 0x5031
andq $0x0, 0x8(%rsp)
xorl %eax, %eax
movabsq $0x400000004007fed, %rcx # imm = 0x400000004007FED
cmpq $0x3f, %rax
je 0x50a6
leaq (%r15,%rax), %rdx
cmpq %r13, %rdx
jae 0x50a6
movzbl (%r12,%rax), %edx
leal -0x2b(%rdx), %esi
cmpl $0x3a, %esi
ja 0x50a6
btq %rsi, %rcx
jae 0x50a6
movb %dl, 0x10(%rsp,%rax)
incq %rax
jmp 0x4fdb
movq (%rsp), %rax
movl $0x2, 0x18(%rax)
movl $0x1, 0x28(%rax)
movq %r14, 0x10(%rbp)
jmp 0x5109
cmpl $0x7b, %eax
je 0x5111
cmpl $0x5b, %eax
jne 0x5321
movq 0x18(%rbx), %rax
cmpq $0x3e7, %rax            # imm = 0x3E7
ja 0x5321
incq %rax
movq %rax, 0x18(%rbx)
cmpb $0x5b, (%r12)
jne 0x5321
incq %r15
movq %r15, 0x10(%rbx)
movq %rbx, %rdi
callq 0x5340
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x5177
movq (%rbx), %rcx
cmpb $0x5d, (%rcx,%rax)
jne 0x5183
xorl %r14d, %r14d
decq 0x18(%rbx)
movl $0x20, 0x18(%rbp)
movq %r14, 0x10(%rbp)
jmp 0x516e
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 0x5321
movsd %xmm0, 0x30(%rbp)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
ucomisd 0x2841(%rip), %xmm0     # 0x7920
jae 0x50f8
movl $0x80000000, %ecx       # imm = 0x80000000
movsd 0x283a(%rip), %xmm1     # 0x7928
ucomisd %xmm0, %xmm1
jae 0x50f8
cvttsd2si %xmm0, %ecx
movl %ecx, 0x28(%rbp)
movl $0x8, 0x18(%rbp)
subq %r15, %rax
addq %rax, 0x10(%rbx)
pushq $0x1
popq %rax
jmp 0x5323
movq 0x18(%rbx), %rax
cmpq $0x3e7, %rax            # imm = 0x3E7
ja 0x5321
incq %rax
movq %rax, 0x18(%rbx)
cmpb $0x7b, (%r12)
jne 0x5321
incq %r15
movq %r15, 0x10(%rbx)
movq %rbx, %rdi
callq 0x5340
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x5177
movq (%rbx), %rcx
cmpb $0x7d, (%rcx,%rax)
jne 0x522c
xorl %ebp, %ebp
decq 0x18(%rbx)
movq (%rsp), %rcx
movl $0x40, 0x18(%rcx)
movq %rbp, 0x10(%rcx)
incq %rax
movq %rax, 0x10(%rbx)
jmp 0x5109
decq %rax
movq %rax, 0x10(%rbx)
jmp 0x5321
decq %rax
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
pushq $0x40
popq %r15
xorl %ebp, %ebp
movq %r15, %rdi
callq *0x20(%rbx)
testq %rax, %rax
je 0x5332
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 0x51cf
movq %r13, (%rbp)
movq %rbp, 0x8(%r13)
movq %r12, %r14
incq 0x10(%rbx)
movq %rbx, %rdi
callq 0x5340
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4ec1
testl %eax, %eax
je 0x5316
movq %rbx, %rdi
callq 0x5340
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x5316
movq (%rbx), %rcx
movzbl (%rcx,%rax), %ecx
movq %r14, %r12
movq %r13, %rbp
cmpl $0x2c, %ecx
je 0x5193
cmpl $0x5d, %ecx
jne 0x5316
movq (%rsp), %rbp
jmp 0x5092
decq %rax
movq %rax, 0x10(%rbx)
xorl %r13d, %r13d
pushq $0x40
popq %r15
xorl %r14d, %r14d
movq %r15, %rdi
callq *0x20(%rbx)
testq %rax, %rax
je 0x5339
movq %rax, %r12
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 0x5279
movq %r12, (%r14)
movq %r14, 0x8(%r12)
movq %r13, %rbp
incq 0x10(%rbx)
movq %rbx, %rdi
callq 0x5340
movq %r12, %rdi
movq %rbx, %rsi
callq 0x6987
testl %eax, %eax
je 0x530e
movq %rbx, %rdi
callq 0x5340
movq 0x20(%r12), %rax
movq %rax, 0x38(%r12)
andq $0x0, 0x20(%r12)
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x530e
movq (%rbx), %rcx
cmpb $0x3a, (%rcx,%rax)
jne 0x530e
incq %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x5340
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4ec1
testl %eax, %eax
je 0x530e
movq %rbx, %rdi
callq 0x5340
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x530e
movq (%rbx), %rcx
movzbl (%rcx,%rax), %ecx
movq %rbp, %r13
movq %r12, %r14
cmpl $0x2c, %ecx
je 0x523d
cmpl $0x7d, %ecx
je 0x515b
movq %rbp, %r13
movq %r13, %rdi
jmp 0x531c
movq %r14, %r12
movq %r12, %rdi
callq 0x4cca
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r12, %r12
jne 0x5319
jmp 0x5321
testq %r13, %r13
jne 0x5311
jmp 0x5321