// File: /workspace/github_c_makefile_star2_O0/tomcatzh[P]RealityBenchmark/external/cJSON.c
// Function: print_array
static cJSON_bool print_array(const cJSON * const item, printbuffer * const output_buffer)
{
    unsigned char *output_pointer = NULL;
    size_t length = 0;
    cJSON *current_element = item->child;

    if (output_buffer == NULL)
    {
        return false;
    }

    /* Compose the output array. */
    /* opening square bracket */
    output_pointer = ensure(output_buffer, 1);
    if (output_pointer == NULL)
    {
        return false;
    }

    *output_pointer = '[';
    output_buffer->offset++;
    output_buffer->depth++;

    while (current_element != NULL)
    {
        if (!print_value(current_element, output_buffer))
        {
            return false;
        }
        update_offset(output_buffer);
        if (current_element->next)
        {
            length = (size_t) (output_buffer->format ? 2 : 1);
            output_pointer = ensure(output_buffer, length + 1);
            if (output_pointer == NULL)
            {
                return false;
            }
            *output_pointer++ = ',';
            if(output_buffer->format)
            {
                *output_pointer++ = ' ';
            }
            *output_pointer = '\0';
            output_buffer->offset += length;
        }
        current_element = current_element->next;
    }

    output_pointer = ensure(output_buffer, 2);
    if (output_pointer == NULL)
    {
        return false;
    }
    *output_pointer++ = ']';
    *output_pointer = '\0';
    output_buffer->depth--;

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xab2f
movl $0x0, -0x4(%rbp)
jmp 0xaca7
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0xa700
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xab54
movl $0x0, -0x4(%rbp)
jmp 0xaca7
movq -0x20(%rbp), %rax
movb $0x5b, (%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
cmpq $0x0, -0x30(%rbp)
je 0xac55
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7260
cmpl $0x0, %eax
jne 0xaba4
movl $0x0, -0x4(%rbp)
jmp 0xaca7
movq -0x18(%rbp), %rdi
callq 0x9830
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0xac45
movq -0x18(%rbp), %rax
movl 0x24(%rax), %edx
movl $0x1, %eax
movl $0x2, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
cltq
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x1, %rsi
callq 0xa700
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xac00
movl $0x0, -0x4(%rbp)
jmp 0xaca7
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x2c, (%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0xac2e
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x20, (%rax)
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xab7b
movq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0xa700
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xac77
movl $0x0, -0x4(%rbp)
jmp 0xaca7
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x5d, (%rax)
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x18(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq