// File: /workspace/github_c_makefile_star2_O2/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: print_object
static char *print_object(cJSON *item,int depth,int fmt,printbuffer *p)
{
	char **entries=0,**names=0;
	char *out=0,*ptr,*ret,*str;int len=7,i=0,j;
	cJSON *child=item->child;
	int numentries=0,fail=0;
	size_t tmplen=0;
	/* Count the number of entries. */
	while (child) numentries++,child=child->next;
	/* Explicitly handle empty object case */
	if (!numentries)
	{
		if (p) out=ensure(p,fmt?depth+4:3);
		else	out=(char*)cJSON_malloc(fmt?depth+4:3);
		if (!out)	return 0;
		ptr=out;*ptr++='{';
		if (fmt) {*ptr++='\n';for (i=0;i<depth-1;i++) *ptr++='\t';}
		*ptr++='}';*ptr++=0;
		return out;
	}
	if (p)
	{
		/* Compose the output: */
		i=p->offset;
		len=fmt?2:1;	ptr=ensure(p,len+1);	if (!ptr) return 0;
		*ptr++='{';	if (fmt) *ptr++='\n';	*ptr=0;	p->offset+=len;
		child=item->child;depth++;
		while (child)
		{
			if (fmt)
			{
				ptr=ensure(p,depth);	if (!ptr) return 0;
				for (j=0;j<depth;j++) *ptr++='\t';
				p->offset+=depth;
			}
			print_string_ptr(child->string,p);
			p->offset=update(p);
			
			len=fmt?2:1;
			ptr=ensure(p,len);	if (!ptr) return 0;
			*ptr++=':';if (fmt) *ptr++='\t';
			p->offset+=len;
			
			print_value(child,depth,fmt,p);
			p->offset=update(p);

			len=(fmt?1:0)+(child->next?1:0);
			ptr=ensure(p,len+1); if (!ptr) return 0;
			if (child->next) *ptr++=',';
			if (fmt) *ptr++='\n';*ptr=0;
			p->offset+=len;
			child=child->next;
		}
		ptr=ensure(p,fmt?(depth+1):2);	 if (!ptr) return 0;
		if (fmt)	for (i=0;i<depth-1;i++) *ptr++='\t';
		*ptr++='}';*ptr=0;
		out=(p->buffer)+i;
	}
	else
	{
		/* Allocate space for the names and the objects */
		entries=(char**)cJSON_malloc(numentries*sizeof(char*));
		if (!entries) return 0;
		names=(char**)cJSON_malloc(numentries*sizeof(char*));
		if (!names) {cJSON_free(entries);return 0;}
		memset(entries,0,sizeof(char*)*numentries);
		memset(names,0,sizeof(char*)*numentries);

		/* Collect all the results into our arrays: */
		child=item->child;depth++;if (fmt) len+=depth;
		while (child)
		{
			names[i]=str=print_string_ptr(child->string,0);
			entries[i++]=ret=print_value(child,depth,fmt,0);
			if (str && ret) len+=strlen(ret)+strlen(str)+2+(fmt?2+depth:0); else fail=1;
			child=child->next;
		}
		
		/* Try to allocate the output string */
		if (!fail)	out=(char*)cJSON_malloc(len);
		if (!out) fail=1;

		/* Handle failure */
		if (fail)
		{
			for (i=0;i<numentries;i++) {if (names[i]) cJSON_free(names[i]);if (entries[i]) cJSON_free(entries[i]);}
			cJSON_free(names);cJSON_free(entries);
			return 0;
		}
		
		/* Compose the output: */
		*out='{';ptr=out+1;if (fmt)*ptr++='\n';*ptr=0;
		for (i=0;i<numentries;i++)
		{
			if (fmt) for (j=0;j<depth;j++) *ptr++='\t';
			tmplen=strlen(names[i]);memcpy(ptr,names[i],tmplen);ptr+=tmplen;
			*ptr++=':';if (fmt) *ptr++='\t';
			strcpy(ptr,entries[i]);ptr+=strlen(entries[i]);
			if (i!=numentries-1) *ptr++=',';
			if (fmt) *ptr++='\n';*ptr=0;
			cJSON_free(names[i]);cJSON_free(entries[i]);
		}
		
		cJSON_free(names);cJSON_free(entries);
		if (fmt) for (i=0;i<depth-1;i++) *ptr++='\t';
		*ptr++='}';*ptr++=0;
	}
	return out;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r15
movl %esi, %ebx
movq %rdi, %r12
addq $0x10, %r12
pushq $-0x8
popq %r14
xorl %r13d, %r13d
movq %r12, %rax
movq (%rax), %rax
decq %r13
addq $0x8, %r14
testq %rax, %rax
jne 0x57bb
cmpl $-0x1, %r13d
movl %edx, -0x2c(%rbp)
je 0x5823
testq %r15, %r15
movq %rbx, -0x50(%rbp)
je 0x5844
movl 0xc(%r15), %eax
movl %eax, -0x40(%rbp)
xorl %r13d, %r13d
testl %edx, %edx
setne %r13b
leal 0x2(%r13), %esi
movq %r15, %rdi
movl %edx, %r14d
callq 0x5298
testq %rax, %rax
je 0x5b28
incl %r13d
movb $0x7b, (%rax)
testl %r14d, %r14d
movl %r14d, %ecx
je 0x599a
movb $0xa, 0x1(%rax)
addq $0x2, %rax
jmp 0x599d
leal 0x4(%rbx), %eax
testq %r15, %r15
je 0x594f
testl %edx, %edx
pushq $0x3
popq %rsi
cmovnel %eax, %esi
movq %r15, %rdi
callq 0x5298
jmp 0x5960
movq %r14, %rdi
callq *0x896b(%rip)           # 0xe1b8
movq %rax, -0x38(%rbp)
testq %rax, %rax
je 0x5b28
movq %r14, %rdi
callq *0x8955(%rip)           # 0xe1b8
testq %rax, %rax
je 0x5b1e
movq %r13, %rcx
notq %rcx
movq %rcx, -0x68(%rbp)
movq %r13, %rcx
notq %rcx
movq %rcx, -0x78(%rbp)
movq %rax, %r15
xorl %ebx, %ebx
movq -0x38(%rbp), %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x2160
movq %r15, -0x40(%rbp)
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x2160
movq -0x50(%rbp), %rcx
leal 0x1(%rcx), %eax
movl %eax, -0x58(%rbp)
leal 0x8(%rcx), %eax
movq %rcx, %rdx
cmpl $0x0, -0x2c(%rbp)
pushq $0x7
popq %rcx
cmovnel %eax, %ecx
movl %ecx, -0x48(%rbp)
leal 0x5(%rdx), %ecx
pushq $0x2
popq %rax
cmovel %eax, %ecx
movl %ecx, -0x5c(%rbp)
xorl %r14d, %r14d
movl %r14d, %ecx
movl %ecx, %r14d
movq (%r12), %r12
testq %r12, %r12
je 0x5a8e
movq 0x38(%r12), %rdi
xorl %esi, %esi
callq 0x5ca4
movq %rax, %r15
movq -0x40(%rbp), %rax
movq %r15, (%rax,%rbx,8)
movq %r12, %rdi
movl -0x58(%rbp), %esi
movl -0x2c(%rbp), %edx
xorl %ecx, %ecx
callq 0x44b9
movq -0x38(%rbp), %rcx
movq %rax, (%rcx,%rbx,8)
incq %rbx
testq %r15, %r15
setne %cl
testq %rax, %rax
setne %dl
andb %cl, %dl
pushq $0x1
popq %rcx
cmpb $0x1, %dl
jne 0x58d3
movq %rax, %rdi
callq 0x20d0
movq %rax, -0x70(%rbp)
movq %r15, %rdi
callq 0x20d0
addl -0x70(%rbp), %eax
movl -0x48(%rbp), %ecx
addl -0x5c(%rbp), %ecx
addl %eax, %ecx
movl %ecx, -0x48(%rbp)
jmp 0x58d0
testl %edx, %edx
pushq $0x3
popq %rcx
cmovnel %eax, %ecx
movslq %ecx, %rdi
callq *0x8858(%rip)           # 0xe1b8
testq %rax, %rax
je 0x5b28
movb $0x7b, (%rax)
cmpl $0x0, -0x2c(%rbp)
je 0x5ad2
leaq 0x2(%rax), %rdx
movb $0xa, 0x1(%rax)
cmpl $0x2, %ebx
pushq $0x1
popq %rcx
cmovgel %ebx, %ecx
decl %ecx
subl $0x1, %ecx
jb 0x5ad6
movb $0x9, (%rdx)
incq %rdx
jmp 0x5989
incq %rax
xorl %edx, %edx
testl %ecx, %ecx
setne %dl
movl %edx, -0x38(%rbp)
movb $0x0, (%rax)
addl %r13d, 0xc(%r15)
leal 0x1(%rbx), %r14d
movq (%r12), %r12
testq %r12, %r12
je 0x5b39
testl %ecx, %ecx
je 0x59ea
movq %r15, %rdi
movl %r14d, %esi
callq 0x5298
testq %rax, %rax
je 0x5b28
xorl %ecx, %ecx
cmpl %ebx, %ecx
jg 0x59e6
movb $0x9, (%rax,%rcx)
incq %rcx
jmp 0x59d9
addl %r14d, 0xc(%r15)
movq 0x38(%r12), %rdi
movq %r15, %rsi
callq 0x5ca4
movq %r15, %rdi
callq 0x5ee6
movl %eax, 0xc(%r15)
movq %r15, %rdi
movl %r13d, %esi
callq 0x5298
testq %rax, %rax
je 0x5b28
movb $0x3a, (%rax)
movl -0x2c(%rbp), %edx
testl %edx, %edx
je 0x5a25
movb $0x9, 0x1(%rax)
addl %r13d, 0xc(%r15)
movq %r12, %rdi
movl %r14d, %esi
movq %r15, %rcx
callq 0x44b9
movq %r15, %rdi
callq 0x5ee6
movl %eax, 0xc(%r15)
cmpq $0x1, (%r12)
movl -0x38(%rbp), %eax
movl %eax, %ebx
sbbl $-0x1, %ebx
leal 0x1(%rbx), %esi
movq %r15, %rdi
callq 0x5298
testq %rax, %rax
je 0x5b28
cmpq $0x0, (%r12)
je 0x5a71
movb $0x2c, (%rax)
incq %rax
movl -0x2c(%rbp), %ecx
testl %ecx, %ecx
je 0x5a7e
movb $0xa, (%rax)
incq %rax
movb $0x0, (%rax)
addl %ebx, 0xc(%r15)
movq -0x50(%rbp), %rbx
jmp 0x59b2
testl %r14d, %r14d
jne 0x5add
sete %bl
movslq -0x48(%rbp), %rdi
callq *0x8718(%rip)           # 0xe1b8
testq %rax, %rax
setne %cl
testb %bl, %cl
je 0x5add
movb $0x7b, (%rax)
movl -0x2c(%rbp), %r14d
testl %r14d, %r14d
movq -0x40(%rbp), %r15
movq %rax, -0x48(%rbp)
je 0x5b7f
movq %rax, %r12
addq $0x2, %r12
movb $0xa, 0x1(%rax)
jmp 0x5b85
leaq 0x1(%rax), %rdx
movw $0x7d, (%rdx)
jmp 0x5b2a
xorl %ebx, %ebx
movq -0x40(%rbp), %r14
movq -0x68(%rbp), %r15
subq $0x1, %r15
jb 0x5b15
movq (%r14,%rbx), %rdi
testq %rdi, %rdi
je 0x5afc
callq *0x86c4(%rip)           # 0xe1c0
movq -0x38(%rbp), %rax
movq (%rax,%rbx), %rdi
testq %rdi, %rdi
je 0x5b0f
callq *0x86b1(%rip)           # 0xe1c0
addq $0x8, %rbx
jmp 0x5ae7
movq %r14, %rdi
callq *0x86a2(%rip)           # 0xe1c0
movq -0x38(%rbp), %rdi
callq *0x8698(%rip)           # 0xe1c0
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leal 0x2(%rbx), %eax
testl %ecx, %ecx
pushq $0x2
popq %rsi
cmovnel %eax, %esi
movq %r15, %rdi
movl %ecx, %r14d
callq 0x5298
testq %rax, %rax
je 0x5b28
testl %r14d, %r14d
je 0x5b6f
xorl %edx, %edx
testl %ebx, %ebx
cmovgl %ebx, %edx
movl %edx, %ecx
subl $0x1, %ecx
jb 0x5b72
movb $0x9, (%rax)
incq %rax
jmp 0x5b62
movl -0x40(%rbp), %edx
movw $0x7d, (%rax)
movslq %edx, %rax
addq (%r15), %rax
jmp 0x5b2a
movq %rax, %r12
incq %r12
movq -0x50(%rbp), %rbx
movb $0x0, (%r12)
pushq $-0x2
popq %rax
subl %r13d, %eax
movq %rax, -0x58(%rbp)
xorl %r13d, %r13d
cmpq %r13, -0x78(%rbp)
je 0x5c66
testl %r14d, %r14d
je 0x5bbd
xorl %eax, %eax
cmpl %ebx, %eax
jg 0x5bba
movb $0x9, (%r12,%rax)
incq %rax
jmp 0x5bac
addq %rax, %r12
movq (%r15,%r13,8), %r15
movq %r15, %rdi
callq 0x20d0
movq %rax, %r14
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x21c0
movb $0x3a, (%r12,%r14)
cmpl $0x0, -0x2c(%rbp)
je 0x5bf7
addq %r14, %r12
movb $0x9, 0x1(%r12)
addq $0x2, %r12
movq %r12, %r14
jmp 0x5bfd
addq %r12, %r14
incq %r14
movq -0x38(%rbp), %r15
movq (%r15,%r13,8), %rsi
movq %r14, %rdi
callq 0x21e0
movq (%r15,%r13,8), %rdi
callq 0x20d0
movq %rax, %r12
addq %r14, %r12
cmpq -0x58(%rbp), %r13
je 0x5c2a
movb $0x2c, (%r12)
incq %r12
movl -0x2c(%rbp), %eax
movq -0x40(%rbp), %r15
testl %eax, %eax
je 0x5c3d
movb $0xa, (%r12)
incq %r12
movb $0x0, (%r12)
movq (%r15,%r13,8), %rdi
callq *0x8574(%rip)           # 0xe1c0
movq -0x38(%rbp), %rax
movq (%rax,%r13,8), %rdi
callq *0x8566(%rip)           # 0xe1c0
incq %r13
movl -0x2c(%rbp), %r14d
jmp 0x5b9b
movq %r15, %rdi
callq *0x8551(%rip)           # 0xe1c0
movq -0x38(%rbp), %rdi
callq *0x8547(%rip)           # 0xe1c0
testl %r14d, %r14d
je 0x5c94
xorl %eax, %eax
testl %ebx, %ebx
cmovgl %ebx, %eax
subl $0x1, %eax
jb 0x5c94
movb $0x9, (%r12)
incq %r12
jmp 0x5c85
movw $0x7d, (%r12)
movq -0x48(%rbp), %rax
jmp 0x5b2a