// File: /workspace/github_c_makefile_star2_O0/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: print_array
static char *print_array(cJSON *item,int depth,int fmt,printbuffer *p)
{
	char **entries;
	char *out=0,*ptr,*ret;int len=5;
	cJSON *child=item->child;
	int numentries=0,i=0,fail=0;
	size_t tmplen=0;
	
	/* How many entries in the array? */
	while (child) numentries++,child=child->next;
	/* Explicitly handle numentries==0 */
	if (!numentries)
	{
		if (p)	out=ensure(p,3);
		else	out=(char*)cJSON_malloc(3);
		if (out) strcpy(out,"[]");
		return out;
	}

	if (p)
	{
		/* Compose the output array. */
		i=p->offset;
		ptr=ensure(p,1);if (!ptr) return 0;	*ptr='[';	p->offset++;
		child=item->child;
		while (child && !fail)
		{
			print_value(child,depth+1,fmt,p);
			p->offset=update(p);
			if (child->next) {len=fmt?2:1;ptr=ensure(p,len+1);if (!ptr) return 0;*ptr++=',';if(fmt)*ptr++=' ';*ptr=0;p->offset+=len;}
			child=child->next;
		}
		ptr=ensure(p,2);if (!ptr) return 0;	*ptr++=']';*ptr=0;
		out=(p->buffer)+i;
	}
	else
	{
		/* Allocate an array to hold the values for each */
		entries=(char**)cJSON_malloc(numentries*sizeof(char*));
		if (!entries) return 0;
		memset(entries,0,numentries*sizeof(char*));
		/* Retrieve all the results: */
		child=item->child;
		while (child && !fail)
		{
			ret=print_value(child,depth+1,fmt,0);
			entries[i++]=ret;
			if (ret) len+=strlen(ret)+2+(fmt?1:0); else fail=1;
			child=child->next;
		}
		
		/* If we didn't fail, try to malloc the output string */
		if (!fail)	out=(char*)cJSON_malloc(len);
		/* If that fails, we fail. */
		if (!out) fail=1;

		/* Handle failure. */
		if (fail)
		{
			for (i=0;i<numentries;i++) if (entries[i]) cJSON_free(entries[i]);
			cJSON_free(entries);
			return 0;
		}
		
		/* Compose the output array. */
		*out='[';
		ptr=out+1;*ptr=0;
		for (i=0;i<numentries;i++)
		{
			tmplen=strlen(entries[i]);memcpy(ptr,entries[i],tmplen);ptr+=tmplen;
			if (i!=numentries-1) {*ptr++=',';if(fmt)*ptr++=' ';*ptr=0;}
			cJSON_free(entries[i]);
		}
		cJSON_free(entries);
		*ptr++=']';*ptr++=0;
	}
	return out;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x5, -0x44(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
movl $0x0, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
movq $0x0, -0x68(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x7e0b
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x7dee
cmpl $0x0, -0x54(%rbp)
jne 0x7e5f
cmpq $0x0, -0x20(%rbp)
je 0x7e2c
movq -0x20(%rbp), %rdi
movl $0x3, %esi
callq 0x7a20
movq %rax, -0x30(%rbp)
jmp 0x7e3b
movl $0x3, %edi
callq *0xc391(%rip)           # 0x141c8
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x7e52
movq -0x30(%rbp), %rdi
leaq 0x7b4b(%rip), %rsi      # 0xf998
callq 0x2200
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8266
cmpq $0x0, -0x20(%rbp)
je 0x7ff1
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x7a20
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x7e9a
movq $0x0, -0x8(%rbp)
jmp 0x8266
movq -0x38(%rbp), %rax
movb $0x5b, (%rax)
movq -0x20(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x50(%rbp)
movb %al, -0x69(%rbp)
je 0x7ed2
cmpl $0x0, -0x5c(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x7ede
jmp 0x7f9b
movq -0x50(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0x1, %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x56b0
movq -0x20(%rbp), %rdi
callq 0x9080
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x50(%rbp), %rax
cmpq $0x0, (%rax)
je 0x7f8b
movl -0x18(%rbp), %edx
movl $0x1, %eax
movl $0x2, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x44(%rbp)
movq -0x20(%rbp), %rdi
movl -0x44(%rbp), %esi
addl $0x1, %esi
callq 0x7a20
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x7f4d
movq $0x0, -0x8(%rbp)
jmp 0x8266
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb $0x2c, (%rax)
cmpl $0x0, -0x18(%rbp)
je 0x7f77
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb $0x20, (%rax)
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movl -0x44(%rbp), %ecx
movq -0x20(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x7eba
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0x7a20
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x7fc1
movq $0x0, -0x8(%rbp)
jmp 0x8266
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb $0x5d, (%rax)
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x58(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x825e
movq 0xc1d0(%rip), %rax      # 0x141c8
movslq -0x54(%rbp), %rdi
shlq $0x3, %rdi
callq *%rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x801a
movq $0x0, -0x8(%rbp)
jmp 0x8266
movq -0x28(%rbp), %rdi
movslq -0x54(%rbp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x2170
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x50(%rbp)
movb %al, -0x6a(%rbp)
je 0x8051
cmpl $0x0, -0x5c(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x6a(%rbp)
movb -0x6a(%rbp), %al
testb $0x1, %al
jne 0x805d
jmp 0x80e0
movq -0x50(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0x1, %esi
movl -0x18(%rbp), %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x56b0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdx
movq -0x28(%rbp), %rax
movl -0x58(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x58(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, -0x40(%rbp)
je 0x80c9
movq -0x40(%rbp), %rdi
callq 0x20e0
movq %rax, %rcx
addq $0x2, %rcx
movl -0x18(%rbp), %esi
xorl %eax, %eax
movl $0x1, %edx
cmpl $0x0, %esi
cmovnel %edx, %eax
cltq
addq %rax, %rcx
movslq -0x44(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x44(%rbp)
jmp 0x80d0
movl $0x1, -0x5c(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x8039
cmpl $0x0, -0x5c(%rbp)
jne 0x80f7
movq 0xc0db(%rip), %rax      # 0x141c8
movslq -0x44(%rbp), %rdi
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x8105
movl $0x1, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x8165
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x814b
movq -0x28(%rbp), %rax
movslq -0x58(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x813e
movq 0xc0a0(%rip), %rax      # 0x141d0
movq -0x28(%rbp), %rcx
movslq -0x58(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
callq *%rax
jmp 0x8140
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x8112
movq 0xc07e(%rip), %rax      # 0x141d0
movq -0x28(%rbp), %rdi
callq *%rax
movq $0x0, -0x8(%rbp)
jmp 0x8266
movq -0x30(%rbp), %rax
movb $0x5b, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x822d
movq -0x28(%rbp), %rax
movslq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x20e0
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rax
movslq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x68(%rbp), %rdx
callq 0x21e0
movq -0x68(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x58(%rbp), %eax
movl -0x54(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x820a
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb $0x2c, (%rax)
cmpl $0x0, -0x18(%rbp)
je 0x8203
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb $0x20, (%rax)
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq 0xbfbf(%rip), %rax      # 0x141d0
movq -0x28(%rbp), %rcx
movslq -0x58(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
callq *%rax
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x8186
movq 0xbf9c(%rip), %rax      # 0x141d0
movq -0x28(%rbp), %rdi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb $0x5d, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb $0x0, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq