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

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

    /* Compose the output: */
    length = (size_t) (output_buffer->format ? 2 : 1); /* fmt: {\n */
    output_pointer = ensure(output_buffer, length + 1);
    if (output_pointer == NULL)
    {
        return false;
    }

    *output_pointer++ = '{';
    output_buffer->depth++;
    if (output_buffer->format)
    {
        *output_pointer++ = '\n';
    }
    output_buffer->offset += length;

    while (current_item)
    {
        if (output_buffer->format)
        {
            size_t i;
            output_pointer = ensure(output_buffer, output_buffer->depth);
            if (output_pointer == NULL)
            {
                return false;
            }
            for (i = 0; i < output_buffer->depth; i++)
            {
                *output_pointer++ = '\t';
            }
            output_buffer->offset += output_buffer->depth;
        }

        /* print key */
        if (!print_string_ptr((unsigned char*)current_item->string, output_buffer))
        {
            return false;
        }
        update_offset(output_buffer);

        length = (size_t) (output_buffer->format ? 2 : 1);
        output_pointer = ensure(output_buffer, length);
        if (output_pointer == NULL)
        {
            return false;
        }
        *output_pointer++ = ':';
        if (output_buffer->format)
        {
            *output_pointer++ = '\t';
        }
        output_buffer->offset += length;

        /* print value */
        if (!print_value(current_item, output_buffer))
        {
            return false;
        }
        update_offset(output_buffer);

        /* print comma if not last */
        length = ((size_t)(output_buffer->format ? 1 : 0) + (size_t)(current_item->next ? 1 : 0));
        output_pointer = ensure(output_buffer, length + 1);
        if (output_pointer == NULL)
        {
            return false;
        }
        if (current_item->next)
        {
            *output_pointer++ = ',';
        }

        if (output_buffer->format)
        {
            *output_pointer++ = '\n';
        }
        *output_pointer = '\0';
        output_buffer->offset += length;

        current_item = current_item->next;
    }

    output_pointer = ensure(output_buffer, output_buffer->format ? (output_buffer->depth + 1) : 2);
    if (output_pointer == NULL)
    {
        return false;
    }
    if (output_buffer->format)
    {
        size_t i;
        for (i = 0; i < (output_buffer->depth - 1); i++)
        {
            *output_pointer++ = '\t';
        }
    }
    *output_pointer++ = '}';
    *output_pointer = '\0';
    output_buffer->depth--;

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %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 0xacef
movl $0x0, -0x4(%rbp)
jmp 0xb05f
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 0xad34
movl $0x0, -0x4(%rbp)
jmp 0xb05f
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x7b, (%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0xad72
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0xa, (%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
cmpq $0x0, -0x30(%rbp)
je 0xaf96
movq -0x18(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0xae09
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0xa700
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xadbf
movl $0x0, -0x4(%rbp)
jmp 0xb05f
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0xadf5
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x9, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xadc7
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xb070
cmpl $0x0, %eax
jne 0xae2b
movl $0x0, -0x4(%rbp)
jmp 0xb05f
movq -0x18(%rbp), %rdi
callq 0x9830
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
callq 0xa700
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xae75
movl $0x0, -0x4(%rbp)
jmp 0xb05f
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x3a, (%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0xaea3
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x9, (%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7260
cmpl $0x0, %eax
jne 0xaed1
movl $0x0, -0x4(%rbp)
jmp 0xb05f
movq -0x18(%rbp), %rdi
callq 0x9830
movq -0x18(%rbp), %rax
movl 0x24(%rax), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
cltq
movq -0x30(%rbp), %rcx
movq (%rcx), %rsi
xorl %ecx, %ecx
movl $0x1, %edx
cmpq $0x0, %rsi
cmovnel %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
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 0xaf37
movl $0x0, -0x4(%rbp)
jmp 0xb05f
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0xaf53
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 0xaf6f
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0xa, (%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 0xad82
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0xafba
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0xafc5
movl $0x2, %eax
movq %rax, -0x50(%rbp)
jmp 0xafc5
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xa700
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xafe6
movl $0x0, -0x4(%rbp)
jmp 0xb05f
movq -0x18(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0xb02f
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0xb02d
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x9, (%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xaff8
jmp 0xb02f
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x7d, (%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 $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)