// File: /workspace/github_c_makefile_star2_O3/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, %r12
movl %edx, %r13d
movq %rsi, -0x38(%rbp)
movq %rdi, %rbx
addq $0x10, %rbx
movq $-0x8, %r15
xorl %r14d, %r14d
movq %rbx, %rax
movq (%rax), %rax
decq %r14
addq $0x8, %r15
testq %rax, %rax
jne 0x5c98
cmpl $-0x1, %r14d
je 0x5cfa
testq %r12, %r12
movl %r13d, -0x2c(%rbp)
je 0x5d22
movl 0xc(%r12), %r14d
xorl %r15d, %r15d
testl %r13d, %r13d
setne %r15b
leal 0x2(%r15), %esi
movq %r12, %rdi
callq 0x5741
testq %rax, %rax
je 0x60ca
movl %r14d, -0x50(%rbp)
incl %r15d
movb $0x7b, (%rax)
testl %r13d, %r13d
je 0x5e90
movb $0xa, 0x1(%rax)
addq $0x2, %rax
jmp 0x5e93
testq %r12, %r12
je 0x5e2f
movq -0x38(%rbp), %rbx
leal 0x4(%rbx), %eax
testl %r13d, %r13d
movl $0x3, %esi
cmovnel %eax, %esi
movq %r12, %rdi
callq 0x5741
jmp 0x5e4a
movq %r15, %rdi
callq *0x948d(%rip)           # 0xf1b8
movq %rax, -0x40(%rbp)
testq %rax, %rax
je 0x60ca
movq %r15, %rdi
callq *0x9477(%rip)           # 0xf1b8
testq %rax, %rax
je 0x60c0
movq %rax, %r12
movq %r14, %rax
notq %rax
movq %rax, -0x70(%rbp)
movq -0x40(%rbp), %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2160
movq %r12, -0x48(%rbp)
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2160
movq -0x38(%rbp), %rcx
leal 0x1(%rcx), %eax
movl %eax, -0x50(%rbp)
leal 0x8(%rcx), %eax
testl %r13d, %r13d
movl $0x7, %r12d
cmovnel %eax, %r12d
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x604f
leal 0x5(%rcx), %eax
testl %r13d, %r13d
movl $0x2, %ecx
cmovnel %eax, %ecx
movl %ecx, -0x68(%rbp)
movb $0x1, %al
xorl %r13d, %r13d
movl %eax, -0x60(%rbp)
incq %r13
movq 0x38(%rbx), %rdi
xorl %esi, %esi
callq 0x6239
movq %rax, %r15
movq -0x48(%rbp), %rax
movq %r15, -0x8(%rax,%r13,8)
movq %rbx, %rdi
movl -0x50(%rbp), %esi
movl -0x2c(%rbp), %edx
xorl %ecx, %ecx
callq 0x433a
movq -0x40(%rbp), %rcx
movq %rax, -0x8(%rcx,%r13,8)
testq %r15, %r15
je 0x5e20
testq %rax, %rax
je 0x5e20
movq %rax, %rdi
callq 0x20d0
movq %rax, -0x58(%rbp)
movq %r15, %rdi
callq 0x20d0
addl -0x58(%rbp), %eax
addl -0x68(%rbp), %r12d
addl %eax, %r12d
movq (%rbx), %rbx
incq %r13
testq %rbx, %rbx
jne 0x5db8
jmp 0x6049
movq (%rbx), %rbx
xorl %eax, %eax
testq %rbx, %rbx
jne 0x5db2
jmp 0x6082
movq -0x38(%rbp), %rbx
leal 0x4(%rbx), %eax
testl %r13d, %r13d
movl $0x3, %ecx
cmovnel %eax, %ecx
movslq %ecx, %rdi
callq *0x936e(%rip)           # 0xf1b8
movq %rax, %r14
testq %rax, %rax
je 0x60ca
movb $0x7b, (%r14)
testl %r13d, %r13d
je 0x603b
leaq 0x2(%r14), %rdi
movb $0xa, 0x1(%r14)
cmpl $0x2, %ebx
jl 0x603f
leal -0x1(%rbx), %edx
movl $0x9, %esi
callq 0x2160
movl %ebx, %eax
leaq (%rax,%r14), %rdi
incq %rdi
jmp 0x603f
incq %rax
movq -0x38(%rbp), %r14
movb $0x0, (%rax)
movq %r15, -0x40(%rbp)
addl %r15d, 0xc(%r12)
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x5fe6
leal 0x1(%r14), %r15d
xorl %eax, %eax
testl %r13d, %r13d
setne %al
movl %eax, -0x58(%rbp)
movl %r15d, %eax
movq %rax, -0x48(%rbp)
testl %r13d, %r13d
je 0x5ef9
movq %r12, %rdi
movl %r15d, %esi
callq 0x5741
testq %rax, %rax
je 0x60ca
testl %r14d, %r14d
js 0x5ef4
movq %rax, %rdi
movl $0x9, %esi
movq -0x48(%rbp), %rdx
callq 0x2160
addl %r15d, 0xc(%r12)
movq 0x38(%rbx), %rdi
movq %r12, %rsi
callq 0x6239
movq (%r12), %rdi
testq %rdi, %rdi
je 0x5f20
movslq 0xc(%r12), %r13
addq %r13, %rdi
callq 0x20d0
addl %r13d, %eax
jmp 0x5f22
xorl %eax, %eax
movl %eax, 0xc(%r12)
movq %r12, %rdi
movq -0x40(%rbp), %rsi
callq 0x5741
testq %rax, %rax
je 0x60ca
xorl %r13d, %r13d
movb $0x3a, (%rax)
movl -0x2c(%rbp), %edx
testl %edx, %edx
je 0x5f54
movb $0x9, 0x1(%rax)
movl $0x2, %eax
jmp 0x5f5b
movl $0x1, %eax
xorl %edx, %edx
addl %eax, 0xc(%r12)
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rcx
callq 0x433a
movq (%r12), %rdi
testq %rdi, %rdi
je 0x5f8e
movslq 0xc(%r12), %r14
addq %r14, %rdi
callq 0x20d0
movq %rax, %r13
addl %r14d, %r13d
movq -0x38(%rbp), %r14
movl %r13d, 0xc(%r12)
cmpq $0x1, (%rbx)
movl -0x58(%rbp), %eax
movl %eax, %r13d
sbbl $-0x1, %r13d
leal 0x1(%r13), %esi
movq %r12, %rdi
callq 0x5741
testq %rax, %rax
je 0x60ca
cmpq $0x0, (%rbx)
je 0x5fc2
movb $0x2c, (%rax)
incq %rax
cmpl $0x0, -0x2c(%rbp)
je 0x5fce
movb $0xa, (%rax)
incq %rax
movb $0x0, (%rax)
addl %r13d, 0xc(%r12)
movq (%rbx), %rbx
testq %rbx, %rbx
movl -0x2c(%rbp), %r13d
jne 0x5ec5
leal 0x2(%r14), %eax
testl %r13d, %r13d
movl $0x2, %esi
cmovnel %eax, %esi
movq %r12, %rdi
callq 0x5741
testq %rax, %rax
je 0x60ca
movq %rax, %rbx
testl %r13d, %r13d
je 0x60df
testl %r14d, %r14d
jle 0x60e4
movl -0x38(%rbp), %r14d
movq %rbx, %rdi
movl $0x9, %esi
movq %r14, %rdx
callq 0x2160
addq %r14, %rbx
movq -0x38(%rbp), %rax
jmp 0x60e6
leaq 0x1(%r14), %rdi
movw $0x7d, (%rdi)
jmp 0x60cd
testb $0x1, -0x60(%rbp)
je 0x6082
movslq %r12d, %rdi
callq *0x9160(%rip)           # 0xf1b8
testq %rax, %rax
je 0x6082
movq $-0x2, %rsi
subq %r14, %rsi
movb $0x7b, (%rax)
movl -0x2c(%rbp), %ecx
testl %ecx, %ecx
movq %rax, -0x60(%rbp)
je 0x60f4
movq %rax, %rbx
addq $0x2, %rbx
movb $0xa, 0x1(%rax)
jmp 0x60fa
xorl %ebx, %ebx
movq -0x48(%rbp), %r14
movq -0x70(%rbp), %r15
movq (%r14,%rbx), %rdi
testq %rdi, %rdi
je 0x609b
callq *0x9125(%rip)           # 0xf1c0
movq -0x40(%rbp), %rax
movq (%rax,%rbx), %rdi
testq %rdi, %rdi
je 0x60ae
callq *0x9112(%rip)           # 0xf1c0
addq $0x8, %rbx
decq %r15
jne 0x608c
movq %r14, %rdi
callq *0x9100(%rip)           # 0xf1c0
movq -0x40(%rbp), %rdi
callq *0x90f6(%rip)           # 0xf1c0
xorl %r14d, %r14d
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl -0x50(%rbp), %eax
jmp 0x60e6
xorl %eax, %eax
movw $0x7d, (%rbx)
movslq %eax, %r14
addq (%r12), %r14
jmp 0x60cd
movq %rax, %rbx
incq %rbx
movq -0x38(%rbp), %rdx
movq -0x48(%rbp), %r15
testl %ecx, %ecx
sete %cl
movb $0x0, (%rbx)
testl %edx, %edx
sets %dil
movl -0x50(%rbp), %eax
movq %rax, -0x50(%rbp)
movl %edx, %eax
movq %rax, -0x78(%rbp)
incq %rax
movq %rax, -0x68(%rbp)
orb %cl, %dil
movb %dil, -0x58(%rbp)
movl %esi, %r14d
xorl %r12d, %r12d
cmpb $0x0, -0x58(%rbp)
jne 0x614c
movq %rbx, %rdi
movl $0x9, %esi
movq -0x50(%rbp), %rdx
callq 0x2160
addq -0x68(%rbp), %rbx
movq (%r15,%r12,8), %r13
movq %r13, %rdi
callq 0x20d0
movq %rax, %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x21c0
movb $0x3a, (%rbx,%r15)
movl -0x2c(%rbp), %r13d
testl %r13d, %r13d
je 0x6187
addq %r15, %rbx
movb $0x9, 0x1(%rbx)
addq $0x2, %rbx
movq %rbx, %r15
jmp 0x618d
addq %rbx, %r15
incq %r15
movq -0x40(%rbp), %rbx
movq (%rbx,%r12,8), %rsi
movq %r15, %rdi
callq 0x21e0
movq (%rbx,%r12,8), %rdi
callq 0x20d0
movq %rax, %rbx
addq %r15, %rbx
cmpq %r12, %r14
je 0x61b7
movb $0x2c, (%rbx)
incq %rbx
movq -0x48(%rbp), %r15
testl %r13d, %r13d
je 0x61c6
movb $0xa, (%rbx)
incq %rbx
movb $0x0, (%rbx)
movq (%r15,%r12,8), %rdi
callq *0x8fed(%rip)           # 0xf1c0
movq -0x40(%rbp), %rax
movq (%rax,%r12,8), %rdi
callq *0x8fdf(%rip)           # 0xf1c0
incq %r12
cmpq %r12, -0x70(%rbp)
jne 0x6131
testl %r13d, %r13d
sete %r14b
movq %r15, %rdi
callq *0x8fc2(%rip)           # 0xf1c0
movq -0x40(%rbp), %rdi
callq *0x8fb8(%rip)           # 0xf1c0
cmpl $0x0, -0x38(%rbp)
setle %al
orb %r14b, %al
jne 0x622b
movq %rbx, %rdi
movl $0x9, %esi
movq -0x78(%rbp), %r14
movq %r14, %rdx
callq 0x2160
addq %r14, %rbx
movq -0x60(%rbp), %r14
movw $0x7d, (%rbx)
jmp 0x60cd