// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: json_sax_parse_string
static inline int _json_sax_parse_string(json_parse_t *parse_ptr, char end_ch, json_string_t *jstr, json_mem_mgr_t *mgr)
{
    char *ptr = NULL, *str = NULL;
    int len = 0, total = 0;
    int escaped = 0;

    memset(jstr, 0, sizeof(json_string_t));
    if (unlikely((total = _parse_strlen(parse_ptr, end_ch, &escaped)) < 0)) {
        return -1;
    }
    len = total;
    _get_parse_ptr(parse_ptr, 0, total, &str);

    if (likely(escaped != 1)) {
        if (!(parse_ptr->fd >= 0 && mgr == &parse_ptr->mem->key_mgr)) {
            jstr->escaped = escaped != 0;
            jstr->alloced = 0;
            jstr->len = len;
            jstr->str = str;
        } else {
            if (unlikely((ptr = (char *)json_malloc(len+1)) == NULL)) {
                JsonErr("malloc failed!\n");
                return -1;
            }
            memcpy(ptr, str, len);
            ptr[len] = '\0';

            jstr->escaped = escaped != 0;
            jstr->alloced = 1;
            jstr->len = len;
            jstr->str = ptr;
        }
    } else {
        if (unlikely((ptr = (char *)json_malloc(len+1)) == NULL)) {
            JsonErr("malloc failed!\n");
            return -1;
        }
        if (unlikely((len = _parse_strcpy(ptr, str, len)) < 0)) {
            JsonErr("_parse_strcpy failed!\n");
            json_free(ptr);
            goto err;
        }

        jstr->escaped = 1;
        jstr->alloced = 1;
        jstr->len = len;
        jstr->str = ptr;
    }
    _UPDATE_PARSE_OFFSET(total);

    return len;
err:
    JsonPareseErr("parse string failed!");
    return -1;
}

// Assembly:
subq $0x68, %rsp
movb %sil, %al
movq %rdi, 0x58(%rsp)
movb %al, 0x57(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x48(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x58(%rsp), %rdi
leaq 0x24(%rsp), %rdx
movsbl 0x57(%rsp), %esi
callq 0xaf80
movl %eax, 0x28(%rsp)
cmpl $0x0, %eax
setl %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x95d1
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x9951
movl 0x28(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq 0x58(%rsp), %rdi
movslq 0x28(%rsp), %rdx
xorl %esi, %esi
leaq 0x30(%rsp), %rcx
callq 0xabb0
cmpl $0x1, 0x24(%rsp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x9774
movq 0x58(%rsp), %rax
cmpl $0x0, (%rax)
jl 0x962d
movq 0x40(%rsp), %rax
movq 0x58(%rsp), %rcx
movq 0x38(%rcx), %rcx
addq $0x28, %rcx
cmpq %rcx, %rax
je 0x968e
cmpl $0x0, 0x24(%rsp)
setne %al
andb $0x1, %al
movzbl %al, %edx
movq 0x48(%rsp), %rax
movl (%rax), %ecx
andl $0x1, %edx
shll $0x4, %edx
andl $-0x11, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq 0x48(%rsp), %rax
movl (%rax), %ecx
andl $-0x21, %ecx
orl $0x0, %ecx
movl %ecx, (%rax)
movl 0x2c(%rsp), %edx
movq 0x48(%rsp), %rax
movl (%rax), %ecx
andl $0xffffff, %edx         # imm = 0xFFFFFF
shll $0x8, %edx
andl $0xff, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq 0x30(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x976f
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x1160
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x96f1
jmp 0x96bc
leaq 0x7331(%rip), %rdi      # 0x109f4
leaq 0x7864(%rip), %rsi      # 0x10f2e
movl $0xe74, %edx            # imm = 0xE74
movb $0x0, %al
callq 0x10c0
leaq 0x7329(%rip), %rdi      # 0x10a06
movb $0x0, %al
callq 0x10c0
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x9951
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movslq 0x2c(%rsp), %rdx
callq 0x1150
movq 0x38(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movb $0x0, (%rax,%rcx)
cmpl $0x0, 0x24(%rsp)
setne %al
andb $0x1, %al
movzbl %al, %edx
movq 0x48(%rsp), %rax
movl (%rax), %ecx
andl $0x1, %edx
shll $0x4, %edx
andl $-0x11, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq 0x48(%rsp), %rax
movl (%rax), %ecx
andl $-0x21, %ecx
orl $0x20, %ecx
movl %ecx, (%rax)
movl 0x2c(%rsp), %edx
movq 0x48(%rsp), %rax
movl (%rax), %ecx
andl $0xffffff, %edx         # imm = 0xFFFFFF
shll $0x8, %edx
andl $0xff, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq 0x38(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x9885
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x1160
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x97d7
jmp 0x97a2
leaq 0x724b(%rip), %rdi      # 0x109f4
leaq 0x777e(%rip), %rsi      # 0x10f2e
movl $0xe81, %edx            # imm = 0xE81
movb $0x0, %al
callq 0x10c0
leaq 0x7243(%rip), %rdi      # 0x10a06
movb $0x0, %al
callq 0x10c0
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x9951
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x2c(%rsp), %edx
callq 0xb2d0
movl %eax, 0x2c(%rsp)
cmpl $0x0, %eax
setl %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x983b
jmp 0x9807
leaq 0x71e6(%rip), %rdi      # 0x109f4
leaq 0x7719(%rip), %rsi      # 0x10f2e
movl $0xe85, %edx            # imm = 0xE85
movb $0x0, %al
callq 0x10c0
leaq 0x7530(%rip), %rdi      # 0x10d58
movb $0x0, %al
callq 0x10c0
movq 0x38(%rsp), %rdi
callq 0x1030
jmp 0x98a4
movq 0x48(%rsp), %rax
movl (%rax), %ecx
andl $-0x11, %ecx
orl $0x10, %ecx
movl %ecx, (%rax)
movq 0x48(%rsp), %rax
movl (%rax), %ecx
andl $-0x21, %ecx
orl $0x20, %ecx
movl %ecx, (%rax)
movl 0x2c(%rsp), %edx
movq 0x48(%rsp), %rax
movl (%rax), %ecx
andl $0xffffff, %edx         # imm = 0xFFFFFF
shll $0x8, %edx
andl $0xff, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq 0x38(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
movslq 0x28(%rsp), %rcx
movq 0x58(%rsp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movl 0x2c(%rsp), %eax
movl %eax, 0x64(%rsp)
jmp 0x9951
jmp 0x98a6
movq 0x58(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x9914
movq %rsp, %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x10f0
movq %rsp, %rdi
movq 0x58(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x58(%rsp), %rax
addq 0x10(%rax), %rsi
movl $0x1f, %edx
callq 0x1050
leaq 0x710d(%rip), %rdi      # 0x109f4
leaq 0x7640(%rip), %rsi      # 0x10f2e
movl $0xe93, %edx            # imm = 0xE93
movb $0x0, %al
callq 0x10c0
movq %rsp, %rdx
leaq 0x746b(%rip), %rdi      # 0x10d6f
leaq 0x7473(%rip), %rsi      # 0x10d7e
movb $0x0, %al
callq 0x10c0
jmp 0x9947
jmp 0x9916
leaq 0x70d7(%rip), %rdi      # 0x109f4
leaq 0x760a(%rip), %rsi      # 0x10f2e
movl $0xe93, %edx            # imm = 0xE93
movb $0x0, %al
callq 0x10c0
leaq 0x7331(%rip), %rdi      # 0x10c68
leaq 0x7440(%rip), %rsi      # 0x10d7e
movb $0x0, %al
callq 0x10c0
jmp 0x9947
jmp 0x9949
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw (%rax,%rax)