// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: parse_strcpy
static int _parse_strcpy(char *ptr, const char *str, int nsize)
{
    const char *bak = ptr, *last = str, *end = str + nsize;
    char ch = '\0';
    int size = 0, seq_len = 0;

    while (str < end) {
        if (unlikely(*str++ == '\\')) {
            switch ((*str++)) {
            case 'b' : ch = '\b'; break;
            case 'f' : ch = '\f'; break;
            case 'n' : ch = '\n'; break;
            case 'r' : ch = '\r'; break;
            case 't' : ch = '\t'; break;
            case 'v' : ch = '\v'; break;
            case '\"': ch = '\"'; break;
            case '\'': ch = '\''; break;
            case '\\': ch = '\\'; break;
            case '/' : ch = '/' ; break;
#if JSON_PARSE_SPECIAL_CHAR
            case '\r':
                size = (int)(str - last - 2);
                memcpy(ptr, last, size);
                ptr += size;
                if (*str == '\n')
                    ++str;
                last = str;
                continue;

            case '\n':
                size = (int)(str - last - 2);
                memcpy(ptr, last, size);
                ptr += size;
                last = str;
                continue;
#endif
            case 'u' :
                str -= 2;
                size = (int)(str - last);
                memcpy(ptr, last, size);
                ptr += size;
                if (unlikely((seq_len = utf16_literal_to_utf8((unsigned char*)str,
                    (unsigned char*)end, (unsigned char**)&ptr)) == 0)) {
                    JsonErr("invalid utf16 code(\\u%c)!\n", str[2]);
                    return -1;
                }
                str += seq_len;
                last = str;
                continue;
            default :
                JsonErr("invalid escape character(\\%c)!\n", str[1]);
                return -1;
            }

            size = (int)(str - last - 2);
            memcpy(ptr, last, size);
            ptr += size;
            *ptr++ = ch;
            last = str;
        }
    }

    size = (int)(str - last);
    memcpy(ptr, last, size);
    ptr += size;
    *ptr = '\0';
    return (int)(ptr - bak);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movl %edx, 0x3c(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rax
movslq 0x3c(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movb $0x0, 0x1f(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0xb62a
movq 0x40(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rsp)
movsbl (%rax), %eax
cmpl $0x5c, %eax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xb625
movq 0x40(%rsp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, 0x40(%rsp)
movsbl (%rax), %eax
addl $-0xa, %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x6c, %eax
ja 0xb587
movq 0x8(%rsp), %rax
leaq 0x5366(%rip), %rcx      # 0x106f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x8, 0x1f(%rsp)
jmp 0xb5c7
movb $0xc, 0x1f(%rsp)
jmp 0xb5c7
movb $0xa, 0x1f(%rsp)
jmp 0xb5c7
movb $0xd, 0x1f(%rsp)
jmp 0xb5c7
movb $0x9, 0x1f(%rsp)
jmp 0xb5c7
movb $0xb, 0x1f(%rsp)
jmp 0xb5c7
movb $0x22, 0x1f(%rsp)
jmp 0xb5c7
movb $0x27, 0x1f(%rsp)
jmp 0xb5c7
movb $0x5c, 0x1f(%rsp)
jmp 0xb5c7
movb $0x2f, 0x1f(%rsp)
jmp 0xb5c7
movq 0x40(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
subq $0x2, %rax
movl %eax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movq 0x28(%rsp), %rsi
movslq 0x18(%rsp), %rdx
callq 0x1150
movl 0x18(%rsp), %ecx
movq 0x48(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0xb453
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0xb31d
movq 0x40(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
subq $0x2, %rax
movl %eax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movq 0x28(%rsp), %rsi
movslq 0x18(%rsp), %rdx
callq 0x1150
movl 0x18(%rsp), %ecx
movq 0x48(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0xb31d
movq 0x40(%rsp), %rax
addq $-0x2, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movq 0x28(%rsp), %rsi
movslq 0x18(%rsp), %rdx
callq 0x1150
movl 0x18(%rsp), %ecx
movq 0x48(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xb690
movl %eax, 0x14(%rsp)
cmpl $0x0, %eax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xb564
jmp 0xb526
leaq 0x54c7(%rip), %rdi      # 0x109f4
leaq 0x58a3(%rip), %rsi      # 0x10dd7
movl $0x9ab, %edx            # imm = 0x9AB
movb $0x0, %al
callq 0x10c0
movq 0x40(%rsp), %rax
movsbl 0x2(%rax), %esi
leaq 0x5895(%rip), %rdi      # 0x10de5
movb $0x0, %al
callq 0x10c0
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0xb67c
movl 0x14(%rsp), %ecx
movq 0x40(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0xb31d
jmp 0xb589
leaq 0x5464(%rip), %rdi      # 0x109f4
leaq 0x5840(%rip), %rsi      # 0x10dd7
movl $0x9b2, %edx            # imm = 0x9B2
movb $0x0, %al
callq 0x10c0
movq 0x40(%rsp), %rax
movsbl 0x1(%rax), %esi
leaq 0x584d(%rip), %rdi      # 0x10e00
movb $0x0, %al
callq 0x10c0
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0xb67c
movq 0x40(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
subq $0x2, %rax
movl %eax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movq 0x28(%rsp), %rsi
movslq 0x18(%rsp), %rdx
callq 0x1150
movl 0x18(%rsp), %ecx
movq 0x48(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movb 0x1f(%rsp), %cl
movq 0x48(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x48(%rsp)
movb %cl, (%rax)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0xb31d
movq 0x40(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movq 0x28(%rsp), %rsi
movslq 0x18(%rsp), %rdx
callq 0x1150
movl 0x18(%rsp), %ecx
movq 0x48(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movb $0x0, (%rax)
movq 0x48(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nop