// File: /workspace/github_cpp_makefile_star2_O3/fgheng[P]keysound/src/cJSON.cc
// Function: print_string_ptr(char const*, printbuffer*)
static char *print_string_ptr(const char *str,printbuffer *p)
{
	const char *ptr;char *ptr2,*out;int len=0,flag=0;unsigned char token;

	for (ptr=str;*ptr;ptr++) flag|=((*ptr>0 && *ptr<32)||(*ptr=='\"')||(*ptr=='\\'))?1:0;
	if (!flag)
	{
		len=ptr-str;
		if (p) out=ensure(p,len+3);
		else		out=(char*)cJSON_malloc(len+3);
		if (!out) return 0;
		ptr2=out;*ptr2++='\"';
		strcpy(ptr2,str);
		ptr2[len]='\"';
		ptr2[len+1]=0;
		return out;
	}

	if (!str)
	{
		if (p)	out=ensure(p,3);
		else	out=(char*)cJSON_malloc(3);
		if (!out) return 0;
		strcpy(out,"\"\"");
		return out;
	}
	ptr=str;while ((token=*ptr) && ++len) {if (strchr("\"\\\b\f\n\r\t",token)) len++; else if (token<32) len+=5;ptr++;}

	if (p)	out=ensure(p,len+3);
	else	out=(char*)cJSON_malloc(len+3);
	if (!out) return 0;

	ptr2=out;ptr=str;
	*ptr2++='\"';
	while (*ptr)
	{
		if ((unsigned char)*ptr>31 && *ptr!='\"' && *ptr!='\\') *ptr2++=*ptr++;
		else
		{
			*ptr2++='\\';
			switch (token=*ptr++)
			{
				case '\\':	*ptr2++='\\';	break;
				case '\"':	*ptr2++='\"';	break;
				case '\b':	*ptr2++='b';	break;
				case '\f':	*ptr2++='f';	break;
				case '\n':	*ptr2++='n';	break;
				case '\r':	*ptr2++='r';	break;
				case '\t':	*ptr2++='t';	break;
				default: sprintf(ptr2,"u%04x",token);ptr2+=5;	break;	/* escape and print */
			}
		}
	}
	*ptr2++='\"';*ptr2++=0;
	return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r8
movq %rdi, %rbx
movb (%rdi), %al
movq %rdi, %r15
testb %al, %al
je 0xbe7d
xorl %ecx, %ecx
movl %eax, %edx
movq %rbx, %r15
cmpb $0x20, %dl
setb %sil
cmpb $0x22, %dl
sete %dil
cmpb $0x5c, %dl
sete %dl
orb %dil, %dl
orb %sil, %dl
movzbl %dl, %edx
orl %edx, %ecx
movb 0x1(%r15), %dl
incq %r15
testb %dl, %dl
jne 0xbdf0
testl %ecx, %ecx
je 0xbe7d
testb %al, %al
je 0xbed6
movq %r8, (%rsp)
leaq 0x1(%rbx), %r13
leaq 0x2a70(%rip), %r15      # 0xe8a5
xorl %r14d, %r14d
movl %r14d, %ebp
incl %ebp
je 0xbedd
movzbl %al, %r12d
movl $0x8, %edx
movq %r15, %rdi
movl %r12d, %esi
callq 0x33c0
leal 0x2(%r14), %ecx
addl $0x6, %r14d
cmpb $0x20, %r12b
cmovbl %r14d, %ebp
testq %rax, %rax
cmovnel %ecx, %ebp
movb (%r13), %al
incq %r13
movl %ebp, %r14d
testb %al, %al
jne 0xbe38
jmp 0xbedf
subq %rbx, %r15
testq %r8, %r8
je 0xbe93
leal 0x3(%r15), %esi
movq %r8, %rdi
callq 0xb2da
jmp 0xbea0
leal 0x3(%r15), %eax
movslq %eax, %rdi
callq *0x74a0(%rip)           # 0x13340
movq %rax, %r14
testq %rax, %rax
je 0xbfd8
leaq 0x1(%r14), %rdi
movb $0x22, %bpl
movb %bpl, (%r14)
movq %rbx, %rsi
callq 0x3310
movslq %r15d, %rax
movb %bpl, 0x1(%r14,%rax)
incl %eax
cltq
leaq (%r14,%rax), %r12
incq %r12
jmp 0xbfd1
movl $0x3, %ebp
jmp 0xbee6
xorl %ebp, %ebp
addl $0x3, %ebp
movq (%rsp), %r8
testq %r8, %r8
je 0xbef7
movq %r8, %rdi
movl %ebp, %esi
callq 0xb2da
jmp 0xbf00
movslq %ebp, %rdi
callq *0x7440(%rip)           # 0x13340
movq %rax, %r14
testq %rax, %rax
je 0xbfd8
leaq 0x1(%r14), %r12
movb $0x22, (%r14)
movb (%rbx), %al
testb %al, %al
je 0xbfc9
incq %rbx
leaq 0x2985(%rip), %r15      # 0xe8ad
leaq 0x2939(%rip), %r13      # 0xe868
cmpb $0x20, %al
jb 0xbf3f
cmpb $0x22, %al
je 0xbf3f
movzbl %al, %ecx
cmpl $0x5c, %ecx
jne 0xbf74
movb $0x5c, (%r12)
movzbl -0x1(%rbx), %edx
leal -0x8(%rdx), %eax
cmpl $0x5, %eax
ja 0xbf62
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movb $0x62, 0x1(%r12)
jmp 0xbfb8
cmpl $0x22, %edx
je 0xbfb2
cmpl $0x5c, %edx
jne 0xbf7d
movb $0x5c, 0x1(%r12)
jmp 0xbfb8
movb %al, (%r12)
incq %r12
jmp 0xbfbc
leaq 0x1(%r12), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3090
addq $0x6, %r12
jmp 0xbfbc
movb $0x74, 0x1(%r12)
jmp 0xbfb8
movb $0x6e, 0x1(%r12)
jmp 0xbfb8
movb $0x66, 0x1(%r12)
jmp 0xbfb8
movb $0x72, 0x1(%r12)
jmp 0xbfb8
movb $0x22, 0x1(%r12)
addq $0x2, %r12
movb (%rbx), %al
incq %rbx
testb %al, %al
jne 0xbf2f
movb $0x22, (%r12)
incq %r12
movb $0x0, (%r12)
jmp 0xbfdb
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)