// File: /workspace/github_c_makefile_star2_O1/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 %r14d, %r14d
testq %rsi, %rsi
je 0x5552
movq %rsi, %rbx
movq (%rsi), %r12
testq %r12, %r12
je 0x5552
movq %rdi, (%rsp)
movq 0x8(%rbx), %rbp
movq 0x10(%rbx), %r13
leaq 0x4(%r13), %r14
cmpq %rbp, %r14
ja 0x5313
leaq (%r12,%r13), %rdi
leaq 0x365c(%rip), %rsi      # 0x8961
movl $0x4, %edx
callq 0x2100
testl %eax, %eax
je 0x5381
leaq 0x5(%r13), %r15
cmpq %rbp, %r15
ja 0x5335
leaq (%r12,%r13), %rdi
leaq 0x363f(%rip), %rsi      # 0x8966
movl $0x5, %edx
callq 0x2100
testl %eax, %eax
je 0x5391
cmpq %rbp, %r14
ja 0x5357
leaq (%r12,%r13), %rdi
leaq 0x3627(%rip), %rsi      # 0x896c
movl $0x4, %edx
callq 0x2100
testl %eax, %eax
je 0x547f
cmpq %rbp, %r13
jae 0x554f
cmpb $0x22, (%r12,%r13)
jne 0x53a5
movq (%rsp), %rdi
movq %rbx, %rsi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x730a
movq (%rsp), %rax
movl $0x4, 0x18(%rax)
jmp 0x5491
movq (%rsp), %rax
movl $0x1, 0x18(%rax)
movq %r15, 0x10(%rbx)
jmp 0x5495
cmpq %rbp, %r13
jae 0x554f
movb (%r12,%r13), %al
cmpb $0x2d, %al
setne %cl
addb $-0x30, %al
cmpb $0xa, %al
setae %al
testb %al, %cl
jne 0x54a0
addq %r13, %r12
movq $0x0, 0x8(%rsp)
xorl %eax, %eax
movabsq $0x40000000400000d, %rcx # imm = 0x40000000400000D
leaq (%rax,%r13), %rdx
cmpq %rbp, %rdx
jae 0x5416
movb (%r12,%rax), %dl
movzbl %dl, %esi
leal -0x30(%rsi), %edi
cmpl $0xa, %edi
jb 0x5404
addl $-0x2b, %esi
cmpl $0x3a, %esi
ja 0x5416
btq %rsi, %rcx
jae 0x5416
movb %dl, 0x10(%rsp,%rax)
incq %rax
cmpq $0x3f, %rax
jne 0x53de
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 0x554f
movsd %xmm0, 0x30(%rdx)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
ucomisd 0x3495(%rip), %xmm0     # 0x88e8
jae 0x546c
movl $0x80000000, %ecx       # imm = 0x80000000
movsd 0x348e(%rip), %xmm1     # 0x88f0
ucomisd %xmm0, %xmm1
jae 0x546c
cvttsd2si %xmm0, %ecx
movl %ecx, 0x28(%rdx)
movl $0x8, 0x18(%rdx)
subq %r15, %rax
addq %rax, 0x10(%rbx)
jmp 0x5495
movq (%rsp), %rax
movl $0x2, 0x18(%rax)
movl $0x1, 0x28(%rax)
movq %r14, 0x10(%rbx)
movl $0x1, %r14d
jmp 0x5552
cmpq %rbp, %r13
jae 0x554f
cmpb $0x5b, (%r12,%r13)
jne 0x5523
movq 0x18(%rbx), %rax
cmpq $0x3e7, %rax            # imm = 0x3E7
movl $0x0, %r14d
ja 0x5552
incq %rax
movq %rax, 0x18(%rbx)
xorl %r14d, %r14d
cmpb $0x5b, (%r12,%r13)
jne 0x5625
incq %r13
movq %r13, 0x10(%rbx)
movq %rbx, %rdi
callq 0x5643
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq %rcx, %rax
jae 0x561e
movq (%rbx), %rdx
cmpb $0x5d, (%rdx,%rax)
jne 0x5564
xorl %r12d, %r12d
decq 0x18(%rbx)
movq (%rsp), %rax
movl $0x20, 0x18(%rax)
movq %r12, 0x10(%rax)
incq 0x10(%rbx)
jmp 0x5495
cmpq %rbp, %r13
jae 0x554f
cmpb $0x7b, (%r12,%r13)
movl $0x0, %r14d
jne 0x5552
movq (%rsp), %rdi
movq %rbx, %rsi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7685
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq %rcx, %rax
jae 0x561e
decq %rax
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
xorl %r14d, %r14d
movl $0x40, %edi
callq *0x20(%rbx)
testq %rax, %rax
je 0x55da
movq %rax, %r13
xorpd %xmm0, %xmm0
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, (%rax)
movq %rax, %rbp
testq %r12, %r12
je 0x55b3
movq %r13, (%r14)
movq %r14, 0x8(%r13)
movq %r12, %rbp
incq 0x10(%rbx)
movq %rbx, %rdi
callq 0x5643
movq %r13, %rdi
movq %rbx, %rsi
callq 0x52bc
testl %eax, %eax
je 0x55de
movq %rbx, %rdi
callq 0x5643
movb $0x1, %al
jmp 0x55e0
xorl %eax, %eax
jmp 0x55e6
xorl %eax, %eax
movq %rbp, %r12
movq %r13, %r14
testb %al, %al
je 0x563e
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq %rcx, %rax
jae 0x563e
movq (%rbx), %rdx
cmpb $0x2c, (%rdx,%rax)
je 0x557a
cmpq %rcx, %rax
jae 0x563e
movq (%rbx), %rcx
cmpb $0x5d, (%rcx,%rax)
movl $0x0, %r14d
je 0x5507
jmp 0x5628
decq %rax
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
testq %r12, %r12
je 0x5552
movq %r12, %rdi
callq 0x506a
jmp 0x5552
xorl %r14d, %r14d
jmp 0x5628