// File: /workspace/github_c_makefile_star2_O0/qq-smart[P]qq_sh_server/core/qq_json.c
// Function: parse_string
static const char *parse_string(cJSON *item,const char *str)
{
	const char *ptr=str+1;char *ptr2;char *out;int len=0;unsigned uc,uc2;
	if (*str!='\"') {ep=str;return 0;}	/* not a string! */
	
	while (*ptr!='\"' && *ptr && ++len) if (*ptr++ == '\\') ptr++;	/* Skip escaped quotes. */
	
	out=(char*)cJSON_malloc(len+1);	/* This is how long we need for the string, roughly. */
	if (!out) return 0;
	
	ptr=str+1;ptr2=out;
	while (*ptr!='\"' && *ptr)
	{
		if (*ptr!='\\') *ptr2++=*ptr++;
		else
		{
			ptr++;
			switch (*ptr)
			{
				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;
				case 'u':	 /* transcode utf16 to utf8. */
					uc=parse_hex4(ptr+1);ptr+=4;	/* get the unicode char. */

					if ((uc>=0xDC00 && uc<=0xDFFF) || uc==0)	break;	/* check for invalid.	*/

					if (uc>=0xD800 && uc<=0xDBFF)	/* UTF16 surrogate pairs.	*/
					{
						if (ptr[1]!='\\' || ptr[2]!='u')	break;	/* missing second-half of surrogate.	*/
						uc2=parse_hex4(ptr+3);ptr+=6;
						if (uc2<0xDC00 || uc2>0xDFFF)		break;	/* invalid second-half of surrogate.	*/
						uc=0x10000 + (((uc&0x3FF)<<10) | (uc2&0x3FF));
					}

					len=4;if (uc<0x80) len=1;else if (uc<0x800) len=2;else if (uc<0x10000) len=3; ptr2+=len;
					
					switch (len) {
						case 4: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6;
						case 3: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6;
						case 2: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6;
						case 1: *--ptr2 =(uc | firstByteMark[len]);
					}
					ptr2+=len;
					break;
				default:  *ptr2++=*ptr; break;
			}
			ptr++;
		}
	}
	*ptr2=0;
	if (*ptr=='\"') ptr++;
	item->valuestring=out;
	item->type=cJSON_String;
	return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x6c67
movq -0x18(%rbp), %rax
movq %rax, 0xd706(%rip)      # 0x14360
movq $0x0, -0x8(%rbp)
jmp 0x7064
jmp 0x6c69
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x22, %ecx
movb %al, -0x3d(%rbp)
je 0x6c9d
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x3d(%rbp)
je 0x6c9d
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setne %al
movb %al, -0x3d(%rbp)
movb -0x3d(%rbp), %al
testb $0x1, %al
jne 0x6ca6
jmp 0x6ccb
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x6cc9
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x6c69
movq 0xd4f6(%rip), %rax      # 0x141c8
movl -0x34(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rdi
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x6cf5
movq $0x0, -0x8(%rbp)
jmp 0x7064
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x22, %ecx
movb %al, -0x3e(%rbp)
je 0x6d2a
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x3e(%rbp)
movb -0x3e(%rbp), %al
testb $0x1, %al
jne 0x6d36
jmp 0x7026
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
je 0x6d69
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
jmp 0x7021
movq -0x20(%rbp), %rax
incq %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
addl $-0x62, %eax
movl %eax, %ecx
movq %rcx, -0x48(%rbp)
subl $0x13, %eax
ja 0x6ffe
movq -0x48(%rbp), %rax
leaq 0x8ae8(%rip), %rcx      # 0xf880
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x8, (%rax)
jmp 0x7015
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0xc, (%rax)
jmp 0x7015
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0xa, (%rax)
jmp 0x7015
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0xd, (%rax)
jmp 0x7015
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x9, (%rax)
jmp 0x7015
movq -0x20(%rbp), %rdi
addq $0x1, %rdi
callq 0x7770
movl %eax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
cmpl $0xdc00, -0x38(%rbp)    # imm = 0xDC00
jb 0x6e42
cmpl $0xdfff, -0x38(%rbp)    # imm = 0xDFFF
jbe 0x6e48
cmpl $0x0, -0x38(%rbp)
jne 0x6e4d
jmp 0x7015
cmpl $0xd800, -0x38(%rbp)    # imm = 0xD800
jb 0x6ecf
cmpl $0xdbff, -0x38(%rbp)    # imm = 0xDBFF
ja 0x6ecf
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x5c, %eax
jne 0x6e79
movq -0x20(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x75, %eax
je 0x6e7e
jmp 0x7015
movq -0x20(%rbp), %rdi
addq $0x3, %rdi
callq 0x7770
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x20(%rbp)
cmpl $0xdc00, -0x3c(%rbp)    # imm = 0xDC00
jb 0x6eac
cmpl $0xdfff, -0x3c(%rbp)    # imm = 0xDFFF
jbe 0x6eb1
jmp 0x7015
movl -0x38(%rbp), %eax
andl $0x3ff, %eax            # imm = 0x3FF
shll $0xa, %eax
movl -0x3c(%rbp), %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
orl %ecx, %eax
addl $0x10000, %eax          # imm = 0x10000
movl %eax, -0x38(%rbp)
movl $0x4, -0x34(%rbp)
cmpl $0x80, -0x38(%rbp)
jae 0x6ee8
movl $0x1, -0x34(%rbp)
jmp 0x6f0e
cmpl $0x800, -0x38(%rbp)     # imm = 0x800
jae 0x6efa
movl $0x2, -0x34(%rbp)
jmp 0x6f0c
cmpl $0x10000, -0x38(%rbp)   # imm = 0x10000
jae 0x6f0a
movl $0x3, -0x34(%rbp)
jmp 0x6f0c
jmp 0x6f0e
movslq -0x34(%rbp), %rcx
movq -0x28(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x34(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x50(%rbp)
subl $0x3, %eax
ja 0x6feb
movq -0x50(%rbp), %rax
leaq 0x8994(%rip), %rcx      # 0xf8d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x38(%rbp), %eax
orl $0x80, %eax
andl $0xbf, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, -0x1(%rax)
movl -0x38(%rbp), %eax
shrl $0x6, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
orl $0x80, %eax
andl $0xbf, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, -0x1(%rax)
movl -0x38(%rbp), %eax
shrl $0x6, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
orl $0x80, %eax
andl $0xbf, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, -0x1(%rax)
movl -0x38(%rbp), %eax
shrl $0x6, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movslq -0x34(%rbp), %rdx
leaq 0x890f(%rip), %rcx      # 0xf8e0
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, -0x1(%rax)
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x7015
movq -0x20(%rbp), %rax
movb (%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x6d09
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x7045
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl $0x4, 0x18(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop