// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: json_parse_string_reuse
static int _json_parse_string_reuse(json_parse_t *parse_ptr, char end_ch UNUSED_END_CH, json_string_t *jstr, json_mem_mgr_t *mgr UNUSED_ATTR)
{
    char *str = NULL, *end = NULL, *last = NULL, *bak = NULL, *ptr= NULL;
    int len = 0, seq_len = 0, size = 0;
    char c = '\0', ch = '\0';
    int escaped = 0;

    memset(jstr, 0, sizeof(json_string_t));
    end = parse_ptr->str + parse_ptr->size;
    str = parse_ptr->str + parse_ptr->offset;
    bak = str;
    ptr = str;
    jstr->str = str;

    while (1) {
        switch ((c = *str++)) {
        case '\"':
#if JSON_PARSE_SPECIAL_QUOTES
        case '\'':
        case ':':
            if (c == end_ch)
#endif
            {
                len = (int)(str - bak - 1);
                _UPDATE_PARSE_OFFSET(len);
                ptr[len] = '\0';
                jstr->escaped = escaped != 0;
                jstr->len = len;
                return len;
            }
#if JSON_PARSE_SPECIAL_QUOTES
            if (c == '\"' && !escaped)
                escaped = -1;
            break;
#endif

        case '\0':
            goto err;
        case '\\':
            --str;
            last = str;
            ptr += str - bak;
            goto next;
#if !JSON_PARSE_SPECIAL_CHAR
        case '\b': case '\f': case '\n': case '\r': case '\t': case '\v':
            JsonErr("tab and linebreak can't be existed in string in standard json!\n");
            goto err;
#endif
        default:
            break;
        }
    }

next:
    while (1) {
        switch ((c = *str++)) {
        case '\"':
#if JSON_PARSE_SPECIAL_QUOTES
        case '\'':
        case ':':
            if (c == end_ch)
#endif
            {
                size = (int)(str - last - 1);
                memmove(ptr, last, size);
                ptr += size;
                *ptr = '\0';
                len = (int)(str - bak - 1);
                _UPDATE_PARSE_OFFSET(len);
                jstr->escaped = 1;
                jstr->len = (uint32_t)(ptr - bak);
                return jstr->len;
            }
            break;

        case '\0':
            goto err;
        case '\\':
            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);
                memmove(ptr, last, size);
                ptr += size;
                if (*str == '\n')
                    ++str;
                last = str;
                continue;

            case '\n':
                size = (int)(str - last - 2);
                memmove(ptr, last, size);
                ptr += size;
                last = str;
                continue;
#endif
            case 'u' :
                str -= 2;
                size = (int)(str - last);
                memmove(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]);
                    goto err;
                }
                str += seq_len;
                last = str;
                continue;
            default :
                JsonErr("invalid escape character(\\%c)!\n", str[1]);
                goto err;
            }

            size = (int)(str - last - 2);
            memmove(ptr, last, size);
            ptr += size;
            *ptr++ = ch;
            last = str;
            break;
#if !JSON_PARSE_SPECIAL_CHAR
        case '\b': case '\f': case '\n': case '\r': case '\t': case '\v':
            JsonErr("tab and linebreak can't be existed in string in standard json!\n");
            goto err;
#endif
        default:
            break;
        }
    }

err:
    memset(jstr, 0, sizeof(json_string_t));
    JsonPareseErr("parse string failed!");
    return -1;
}

// Assembly:
subq $0x98, %rsp
movb %sil, %al
movq %rdi, 0x88(%rsp)
movb %al, 0x87(%rsp)
movq %rdx, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movq $0x0, 0x68(%rsp)
movq $0x0, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
movl $0x0, 0x44(%rsp)
movl $0x0, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
movb $0x0, 0x3b(%rsp)
movb $0x0, 0x3a(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x78(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x88(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x88(%rsp), %rcx
addq 0x8(%rcx), %rax
movq %rax, 0x60(%rsp)
movq 0x88(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x88(%rsp), %rcx
addq 0x10(%rcx), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x68(%rsp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, 0x68(%rsp)
movsbl (%rax), %eax
movl %eax, 0xc(%rsp)
movb %al, %cl
movb %cl, 0x3b(%rsp)
testl %eax, %eax
je 0x7482
jmp 0x73de
movl 0xc(%rsp), %eax
subl $0x22, %eax
je 0x73fb
jmp 0x73e9
movl 0xc(%rsp), %eax
subl $0x5c, %eax
je 0x7487
jmp 0x74b8
movq 0x68(%rsp), %rax
movq 0x50(%rsp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, 0x44(%rsp)
movslq 0x44(%rsp), %rcx
movq 0x88(%rsp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq 0x48(%rsp), %rax
movslq 0x44(%rsp), %rcx
movb $0x0, (%rax,%rcx)
cmpl $0x0, 0x34(%rsp)
setne %al
andb $0x1, %al
movzbl %al, %edx
movq 0x78(%rsp), %rax
movl (%rax), %ecx
andl $0x1, %edx
shll $0x4, %edx
andl $-0x11, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movl 0x44(%rsp), %edx
movq 0x78(%rsp), %rax
movl (%rax), %ecx
andl $0xffffff, %edx         # imm = 0xFFFFFF
shll $0x8, %edx
andl $0xff, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movl 0x44(%rsp), %eax
movl %eax, 0x94(%rsp)
jmp 0x7952
jmp 0x7884
movq 0x68(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %rax
movq 0x50(%rsp), %rcx
subq %rcx, %rax
addq 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0x74bf
jmp 0x74ba
jmp 0x73b7
jmp 0x74c1
movq 0x68(%rsp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, 0x68(%rsp)
movsbl (%rax), %eax
movl %eax, 0x8(%rsp)
movb %al, %cl
movb %cl, 0x3b(%rsp)
testl %eax, %eax
je 0x75c2
jmp 0x74e8
movl 0x8(%rsp), %eax
subl $0x22, %eax
je 0x7505
jmp 0x74f3
movl 0x8(%rsp), %eax
subl $0x5c, %eax
je 0x75c7
jmp 0x787d
movq 0x68(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, 0x3c(%rsp)
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
movslq 0x3c(%rsp), %rdx
callq 0x1190
movl 0x3c(%rsp), %ecx
movq 0x48(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movb $0x0, (%rax)
movq 0x68(%rsp), %rax
movq 0x50(%rsp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, 0x44(%rsp)
movslq 0x44(%rsp), %rcx
movq 0x88(%rsp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq 0x78(%rsp), %rax
movl (%rax), %ecx
andl $-0x11, %ecx
orl $0x10, %ecx
movl %ecx, (%rax)
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
subq %rcx, %rax
movl %eax, %edx
movq 0x78(%rsp), %rax
movl (%rax), %ecx
andl $0xffffff, %edx         # imm = 0xFFFFFF
shll $0x8, %edx
andl $0xff, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq 0x78(%rsp), %rax
movl (%rax), %eax
shrl $0x8, %eax
movl %eax, 0x94(%rsp)
jmp 0x7952
jmp 0x7884
movq 0x68(%rsp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, 0x68(%rsp)
movsbl (%rax), %eax
addl $-0xa, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x6c, %eax
ja 0x77e8
movq (%rsp), %rax
leaq 0x8de1(%rip), %rcx      # 0x103d8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x8, 0x3a(%rsp)
jmp 0x781d
movb $0xc, 0x3a(%rsp)
jmp 0x781d
movb $0xa, 0x3a(%rsp)
jmp 0x781d
movb $0xd, 0x3a(%rsp)
jmp 0x781d
movb $0x9, 0x3a(%rsp)
jmp 0x781d
movb $0xb, 0x3a(%rsp)
jmp 0x781d
movb $0x22, 0x3a(%rsp)
jmp 0x781d
movb $0x27, 0x3a(%rsp)
jmp 0x781d
movb $0x5c, 0x3a(%rsp)
jmp 0x781d
movb $0x2f, 0x3a(%rsp)
jmp 0x781d
movq 0x68(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rcx, %rax
subq $0x2, %rax
movl %eax, 0x3c(%rsp)
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
movslq 0x3c(%rsp), %rdx
callq 0x1190
movl 0x3c(%rsp), %ecx
movq 0x48(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x76bc
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
jmp 0x74c1
movq 0x68(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rcx, %rax
subq $0x2, %rax
movl %eax, 0x3c(%rsp)
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
movslq 0x3c(%rsp), %rdx
callq 0x1190
movl 0x3c(%rsp), %ecx
movq 0x48(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
jmp 0x74c1
movq 0x68(%rsp), %rax
addq $-0x2, %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0x3c(%rsp)
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
movslq 0x3c(%rsp), %rdx
callq 0x1190
movl 0x3c(%rsp), %ecx
movq 0x48(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xb690
movl %eax, 0x40(%rsp)
cmpl $0x0, %eax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x77c5
jmp 0x778f
leaq 0x925e(%rip), %rdi      # 0x109f4
leaq 0x9747(%rip), %rsi      # 0x10ee4
movl $0xc55, %edx            # imm = 0xC55
movb $0x0, %al
callq 0x10c0
movq 0x68(%rsp), %rax
movsbl 0x2(%rax), %esi
leaq 0x962c(%rip), %rdi      # 0x10de5
movb $0x0, %al
callq 0x10c0
jmp 0x7884
movl 0x40(%rsp), %ecx
movq 0x68(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
jmp 0x74c1
jmp 0x77ea
leaq 0x9203(%rip), %rdi      # 0x109f4
leaq 0x96ec(%rip), %rsi      # 0x10ee4
movl $0xc5c, %edx            # imm = 0xC5C
movb $0x0, %al
callq 0x10c0
movq 0x68(%rsp), %rax
movsbl 0x1(%rax), %esi
leaq 0x95ec(%rip), %rdi      # 0x10e00
movb $0x0, %al
callq 0x10c0
jmp 0x7884
movq 0x68(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rcx, %rax
subq $0x2, %rax
movl %eax, 0x3c(%rsp)
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
movslq 0x3c(%rsp), %rdx
callq 0x1190
movl 0x3c(%rsp), %ecx
movq 0x48(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movb 0x3a(%rsp), %cl
movq 0x48(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x48(%rsp)
movb %cl, (%rax)
movq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
jmp 0x787f
jmp 0x787f
jmp 0x74c1
movq 0x78(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x88(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x7912
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x10f0
leaq 0x10(%rsp), %rdi
movq 0x88(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x88(%rsp), %rax
addq 0x10(%rax), %rsi
movl $0x1f, %edx
callq 0x1050
leaq 0x9111(%rip), %rdi      # 0x109f4
leaq 0x95fa(%rip), %rsi      # 0x10ee4
movl $0xc72, %edx            # imm = 0xC72
movb $0x0, %al
callq 0x10c0
leaq 0x10(%rsp), %rdx
leaq 0x946d(%rip), %rdi      # 0x10d6f
leaq 0x9475(%rip), %rsi      # 0x10d7e
movb $0x0, %al
callq 0x10c0
jmp 0x7945
jmp 0x7914
leaq 0x90d9(%rip), %rdi      # 0x109f4
leaq 0x95c2(%rip), %rsi      # 0x10ee4
movl $0xc72, %edx            # imm = 0xC72
movb $0x0, %al
callq 0x10c0
leaq 0x9333(%rip), %rdi      # 0x10c68
leaq 0x9442(%rip), %rsi      # 0x10d7e
movb $0x0, %al
callq 0x10c0
jmp 0x7945
jmp 0x7947
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
movl 0x94(%rsp), %eax
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)