// File: /workspace/github_c_makefile_star2_O1/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, -0x40(%rbp)
movq %rdi, %r15
addq $0x10, %r15
movq $-0x8, %rbx
xorl %r14d, %r14d
movq %r15, %rax
movq (%rax), %rax
decq %r14
addq $0x8, %rbx
testq %rax, %rax
jne 0x5db5
cmpl $-0x1, %r14d
je 0x5e12
testq %r12, %r12
movl %r13d, -0x2c(%rbp)
je 0x5e3a
movl 0xc(%r12), %eax
movl %eax, -0x48(%rbp)
xorl %ebx, %ebx
testl %r13d, %r13d
setne %bl
leal 0x2(%rbx), %esi
movq %r12, %rdi
callq 0x5831
testq %rax, %rax
je 0x61e8
incl %ebx
movb $0x7b, (%rax)
testl %r13d, %r13d
je 0x5fb8
movb $0xa, 0x1(%rax)
addq $0x2, %rax
jmp 0x5fbb
testq %r12, %r12
je 0x5f55
movq -0x40(%rbp), %rbx
leal 0x4(%rbx), %eax
testl %r13d, %r13d
movl $0x3, %esi
cmovnel %eax, %esi
movq %r12, %rdi
callq 0x5831
jmp 0x5f70
movq %rbx, %rdi
callq *0x9375(%rip)           # 0xf1b8
movq %rax, -0x38(%rbp)
testq %rax, %rax
je 0x61e8
movq %rbx, %rdi
callq *0x935f(%rip)           # 0xf1b8
testq %rax, %rax
je 0x61de
movq %rax, %r12
movq $0x0, -0x58(%rbp)
movq -0x38(%rbp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x2160
movq %r12, -0x48(%rbp)
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x2160
movq -0x40(%rbp), %rcx
leal 0x1(%rcx), %eax
movq %rax, -0x68(%rbp)
leal 0x8(%rcx), %eax
testl %r13d, %r13d
movl $0x7, %edx
cmovnel %eax, %edx
movq (%r15), %r15
testq %r15, %r15
je 0x6156
movl %edx, -0x50(%rbp)
leal 0x5(%rcx), %eax
testl %r13d, %r13d
movl $0x2, %ecx
cmovnel %eax, %ecx
movl %ecx, -0x60(%rbp)
xorl %r12d, %r12d
movq 0x38(%r15), %rdi
xorl %esi, %esi
callq 0x636f
movq %rax, %rbx
movq -0x48(%rbp), %rax
movq %rbx, (%rax,%r12)
movq %r15, %rdi
movq -0x68(%rbp), %rsi
movl %r13d, %edx
xorl %ecx, %ecx
callq 0x4318
movq -0x38(%rbp), %rcx
movq %rax, (%rcx,%r12)
testq %rbx, %rbx
setne %cl
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x5f31
movq %rax, %rdi
callq 0x20d0
movq %rax, %r13
movq %rbx, %rdi
callq 0x20d0
addl %r13d, %eax
movl -0x2c(%rbp), %r13d
movl -0x50(%rbp), %ecx
addl -0x60(%rbp), %ecx
addl %eax, %ecx
movl %ecx, -0x50(%rbp)
jmp 0x5f3a
movl $0x1, %eax
movq %rax, -0x58(%rbp)
movq (%r15), %r15
addq $0x8, %r12
testq %r15, %r15
jne 0x5ec8
cmpl $0x0, -0x58(%rbp)
sete %bl
movl -0x50(%rbp), %edx
jmp 0x6158
movq -0x40(%rbp), %rbx
leal 0x4(%rbx), %eax
testl %r13d, %r13d
movl $0x3, %ecx
cmovnel %eax, %ecx
movslq %ecx, %rdi
callq *0x9248(%rip)           # 0xf1b8
movq %rax, %r14
testq %rax, %rax
je 0x61e8
movb $0x7b, (%r14)
testl %r13d, %r13d
je 0x6148
leaq 0x2(%r14), %rdi
movb $0xa, 0x1(%r14)
cmpl $0x2, %ebx
jl 0x614c
leal -0x1(%rbx), %edx
movl $0x9, %esi
callq 0x2160
addl $-0x2, %ebx
leaq (%rbx,%r14), %rdi
addq $0x3, %rdi
jmp 0x614c
incq %rax
movb $0x0, (%rax)
addl %ebx, 0xc(%r12)
movq (%r15), %r13
testq %r13, %r13
je 0x60f0
movq -0x40(%rbp), %rax
leal 0x1(%rax), %r15d
xorl %eax, %eax
cmpl $0x0, -0x2c(%rbp)
setne %al
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x6018
movq %r12, %rdi
movl %r15d, %esi
callq 0x5831
testq %rax, %rax
je 0x61e8
cmpl $0x0, -0x40(%rbp)
js 0x6013
movq %rax, %rdi
movl $0x9, %esi
movq %r15, %rdx
callq 0x2160
addl %r15d, 0xc(%r12)
movq 0x38(%r13), %rdi
movq %r12, %rsi
callq 0x636f
movq (%r12), %rdi
testq %rdi, %rdi
je 0x603f
movslq 0xc(%r12), %r14
addq %r14, %rdi
callq 0x20d0
addl %r14d, %eax
jmp 0x6041
xorl %eax, %eax
movl %eax, 0xc(%r12)
movq %r12, %rdi
movl %ebx, %esi
callq 0x5831
testq %rax, %rax
je 0x61e8
movb $0x3a, (%rax)
cmpl $0x0, -0x2c(%rbp)
je 0x6066
movb $0x9, 0x1(%rax)
addl %ebx, 0xc(%r12)
movq %r13, %rdi
movl %r15d, %esi
movl -0x2c(%rbp), %edx
movq %r12, %rcx
callq 0x4318
movq (%r12), %rdi
testq %rdi, %rdi
je 0x6097
movslq 0xc(%r12), %r14
addq %r14, %rdi
callq 0x20d0
addl %r14d, %eax
jmp 0x6099
xorl %eax, %eax
movl %eax, 0xc(%r12)
cmpq $0x1, (%r13)
movl -0x38(%rbp), %eax
movl %eax, %r14d
sbbl $-0x1, %r14d
leal 0x1(%r14), %esi
movq %r12, %rdi
callq 0x5831
testq %rax, %rax
je 0x61e8
cmpq $0x0, (%r13)
je 0x60cf
movb $0x2c, (%rax)
incq %rax
cmpl $0x0, -0x2c(%rbp)
je 0x60db
movb $0xa, (%rax)
incq %rax
movb $0x0, (%rax)
addl %r14d, 0xc(%r12)
movq (%r13), %r13
testq %r13, %r13
jne 0x5fe3
movq -0x40(%rbp), %r15
leal 0x2(%r15), %eax
movl -0x2c(%rbp), %r14d
testl %r14d, %r14d
movl $0x2, %esi
cmovnel %eax, %esi
movq %r12, %rdi
callq 0x5831
testq %rax, %rax
je 0x61e8
movq %rax, %rbx
testl %r14d, %r14d
je 0x61fd
testl %r15d, %r15d
jle 0x6205
movl %r15d, %r14d
movq %rbx, %rdi
movl $0x9, %esi
movq %r14, %rdx
callq 0x2160
addq %r14, %rbx
jmp 0x6208
leaq 0x1(%r14), %rdi
movw $0x7d, (%rdi)
jmp 0x61eb
movb $0x1, %bl
testb %bl, %bl
je 0x6167
movslq %edx, %rdi
callq *0x9053(%rip)           # 0xf1b8
jmp 0x6169
xorl %eax, %eax
movq %r14, %r12
notq %r12
testq %rax, %rax
setne %cl
testb %bl, %cl
je 0x619d
movq $-0x2, %rsi
subq %r14, %rsi
movb $0x7b, (%rax)
testl %r13d, %r13d
movq %rax, -0x78(%rbp)
je 0x6216
leaq 0x2(%rax), %r15
movb $0xa, 0x1(%rax)
jmp 0x621a
cmpq $0x1, %r12
adcq $0x0, %r12
xorl %ebx, %ebx
movq -0x48(%rbp), %r14
movq (%r14,%rbx,8), %rdi
testq %rdi, %rdi
je 0x61ba
callq *0x9006(%rip)           # 0xf1c0
movq -0x38(%rbp), %rax
movq (%rax,%rbx,8), %rdi
testq %rdi, %rdi
je 0x61cd
callq *0x8ff3(%rip)           # 0xf1c0
incq %rbx
cmpq %rbx, %r12
jne 0x61ab
movq %r14, %rdi
callq *0x8fe2(%rip)           # 0xf1c0
movq -0x38(%rbp), %rdi
callq *0x8fd8(%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 -0x48(%rbp), %eax
movl %eax, %r15d
jmp 0x6208
xorl %r15d, %r15d
movw $0x7d, (%rbx)
movslq %r15d, %r14
addq (%r12), %r14
jmp 0x61eb
leaq 0x1(%rax), %r15
testl %r13d, %r13d
sete %cl
movb $0x0, (%r15)
movq -0x40(%rbp), %rdx
testl %edx, %edx
sets %dil
movl %edx, %eax
movq %rax, -0x70(%rbp)
incq %rax
movq %rax, -0x80(%rbp)
orb %cl, %dil
movb %dil, -0x58(%rbp)
movl %esi, %eax
movq %rax, -0x60(%rbp)
cmpq $0x1, %r12
adcq $0x0, %r12
movq %r12, -0x50(%rbp)
xorl %r14d, %r14d
movq -0x48(%rbp), %r13
movl -0x2c(%rbp), %r12d
cmpb $0x0, -0x58(%rbp)
jne 0x627a
movq %r15, %rdi
movl $0x9, %esi
movq -0x68(%rbp), %rdx
callq 0x2160
addq -0x80(%rbp), %r15
movq (%r13,%r14,8), %r13
movq %r13, %rdi
callq 0x20d0
movq %rax, %rbx
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x21c0
movb $0x3a, (%r15,%rbx)
testl %r12d, %r12d
je 0x62b3
addq %rbx, %r15
movb $0x9, 0x1(%r15)
addq $0x2, %r15
movq %r15, %rbx
jmp 0x62b9
addq %r15, %rbx
incq %rbx
movq -0x38(%rbp), %r15
movq (%r15,%r14,8), %rsi
movq %rbx, %rdi
callq 0x21e0
movq (%r15,%r14,8), %rdi
callq 0x20d0
movq %rax, %r15
addq %rbx, %r15
cmpq %r14, -0x60(%rbp)
movq -0x48(%rbp), %r13
je 0x62e9
movb $0x2c, (%r15)
incq %r15
testl %r12d, %r12d
je 0x62f5
movb $0xa, (%r15)
incq %r15
movb $0x0, (%r15)
movq (%r13,%r14,8), %rdi
callq *0x8ebc(%rip)           # 0xf1c0
movq -0x38(%rbp), %rax
movq (%rax,%r14,8), %rdi
callq *0x8eae(%rip)           # 0xf1c0
incq %r14
cmpq %r14, -0x50(%rbp)
jne 0x625f
testl %r12d, %r12d
sete %bl
movq %r13, %rdi
callq *0x8e92(%rip)           # 0xf1c0
movq -0x38(%rbp), %rdi
callq *0x8e88(%rip)           # 0xf1c0
movq -0x40(%rbp), %r14
testl %r14d, %r14d
setle %al
orb %bl, %al
jne 0x6360
movq %r15, %rdi
movl $0x9, %esi
movq -0x70(%rbp), %rdx
callq 0x2160
decl %r14d
addq %r14, %r15
incq %r15
movw $0x7d, (%r15)
movq -0x78(%rbp), %r14
jmp 0x61eb