// File: fgheng[P]keysound/src/cJSON.cc
// Function: print_array(cJSON*, int, int, printbuffer*)
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 0x1116b
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x1114e
cmpl $0x0, -0x54(%rbp)
jne 0x111bf
cmpq $0x0, -0x20(%rbp)
je 0x1118c
movq -0x20(%rbp), %rdi
movl $0x3, %esi
callq 0x10d80
movq %rax, -0x30(%rbp)
jmp 0x1119b
movl $0x3, %edi
callq *0xe219(%rip)           # 0x1f3b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x111b2
movq -0x30(%rbp), %rdi
leaq 0x5842(%rip), %rsi      # 0x169ef
callq 0x4340
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x115c6
cmpq $0x0, -0x20(%rbp)
je 0x11351
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x10d80
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x111fa
movq $0x0, -0x8(%rbp)
jmp 0x115c6
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 0x11232
cmpl $0x0, -0x5c(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x1123e
jmp 0x112fb
movq -0x50(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0x1, %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0xeaf0
movq -0x20(%rbp), %rdi
callq 0x123e0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x50(%rbp), %rax
cmpq $0x0, (%rax)
je 0x112eb
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 0x10d80
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x112ad
movq $0x0, -0x8(%rbp)
jmp 0x115c6
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb $0x2c, (%rax)
cmpl $0x0, -0x18(%rbp)
je 0x112d7
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 0x1121a
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0x10d80
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x11321
movq $0x0, -0x8(%rbp)
jmp 0x115c6
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 0x115be
movq 0xe058(%rip), %rax      # 0x1f3b0
movslq -0x54(%rbp), %rdi
shlq $0x3, %rdi
callq *%rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1137a
movq $0x0, -0x8(%rbp)
jmp 0x115c6
movq -0x28(%rbp), %rdi
movslq -0x54(%rbp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x41d0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x50(%rbp)
movb %al, -0x6a(%rbp)
je 0x113b1
cmpl $0x0, -0x5c(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x6a(%rbp)
movb -0x6a(%rbp), %al
testb $0x1, %al
jne 0x113bd
jmp 0x11440
movq -0x50(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0x1, %esi
movl -0x18(%rbp), %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0xeaf0
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 0x11429
movq -0x40(%rbp), %rdi
callq 0x4190
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 0x11430
movl $0x1, -0x5c(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x11399
cmpl $0x0, -0x5c(%rbp)
jne 0x11457
movq 0xdf63(%rip), %rax      # 0x1f3b0
movslq -0x44(%rbp), %rdi
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x11465
movl $0x1, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x114c5
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x114ab
movq -0x28(%rbp), %rax
movslq -0x58(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x1149e
movq 0xdf28(%rip), %rax      # 0x1f3b8
movq -0x28(%rbp), %rcx
movslq -0x58(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
callq *%rax
jmp 0x114a0
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x11472
movq 0xdf06(%rip), %rax      # 0x1f3b8
movq -0x28(%rbp), %rdi
callq *%rax
movq $0x0, -0x8(%rbp)
jmp 0x115c6
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 0x1158d
movq -0x28(%rbp), %rax
movslq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4190
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 0x42e0
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 0x1156a
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb $0x2c, (%rax)
cmpl $0x0, -0x18(%rbp)
je 0x11563
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 0xde47(%rip), %rax      # 0x1f3b8
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 0x114e6
movq 0xde24(%rip), %rax      # 0x1f3b8
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