// File: /workspace/github_cpp_makefile_star2_O1/jo-qzy[P]MyJson/./json.hpp
// Function: JSON::value_parse::parse_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&)
int parse_string(std::string& tmp_str, std::string::const_iterator& tmp_it) {
            char ch = 0;
            tmp_it++;
            while (tmp_it != json_source.end()) {
                ch = *tmp_it++;
                switch (ch) {
                case '\"':
                    return PARSE_OK;
                case '\\':
                    if (tmp_it != json_source.end()) {
                        switch (*tmp_it++) {
                        case '\"': tmp_str += '\"'; break;
                        case 'n': tmp_str += '\n'; break;
                        case 'r': tmp_str += '\r'; break;
                        case 't': tmp_str += '\t'; break;
                        case 'f': tmp_str += '\f'; break;
                        case 'b': tmp_str += '\b'; break;
                        case '/': tmp_str += '/'; break;
                        case '\\': tmp_str += '\\'; break;
                        case 'u': { 
                            unsigned u = 0;
                            int ret = 0;
                            if ((ret = parse_hex4(tmp_it, u)) != PARSE_OK)
                                return ret;
                            if (u >= 0xD800 && u <= 0xDBFF) {
                                CHECK_ITERATOR(tmp_it);
                                if (*tmp_it++ != '\\')
                                    return PARSE_INVALID_UNICODE_SURROGATE;
                                CHECK_ITERATOR(tmp_it);
                                if (*tmp_it++ != 'u')
                                    return PARSE_INVALID_UNICODE_SURROGATE;
                                unsigned tmp_u;
                                if ((ret = parse_hex4(tmp_it, tmp_u)) != PARSE_OK)
                                    return ret;
                                if (tmp_u <0xDC00 || tmp_u > 0xDFFF)
                                    return PARSE_INVALID_UNICODE_SURROGATE;
                                u = 0x10000 + (u - 0xD800) * 0x400 + (tmp_u - 0xDC00);
                            }
                            if (u > 0x10FFFF)
                                return PARSE_INVALID_UNICODE_HEX;
                            encode_utf8(u, tmp_str);
                            break;
                        }
                        default: return PARSE_INVALID_STRING_ESCAPE;
                        }
                    }
                    else
                        return PARSE_MISS_QUOTATION_MARK;
                    break;
                case '\0':
                    return PARSE_MISS_QUOTATION_MARK;
                default:
                    if (ch < 0x20)
                        return PARSE_INVALID_STRING_CHAR;
                    tmp_str += ch;
                    break;
                }
            }
            return PARSE_MISS_QUOTATION_MARK;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq (%rdx), %rcx
incq %rcx
movq %rcx, (%rdx)
movq (%rdi), %rdx
addq 0x8(%rdi), %rdx
cmpq %rdx, %rcx
je 0x5080
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2198(%rip), %r12      # 0x705c
leaq 0x1(%rcx), %rsi
movq %rsi, (%rbx)
movzbl (%rcx), %eax
cmpl $0x5c, %eax
je 0x4f0b
testl %eax, %eax
je 0x5080
cmpl $0x22, %eax
je 0x5098
cmpb $0x20, %al
jl 0x509d
movsbl %al, %esi
movq %r14, %rdi
callq 0x21b0
movq (%r15), %rdx
addq 0x8(%r15), %rdx
movq (%rbx), %rcx
cmpq %rdx, %rcx
jne 0x4ec4
jmp 0x5080
cmpq %rdx, %rsi
je 0x5080
leaq 0x2(%rcx), %rax
movq %rax, (%rbx)
movb 0x1(%rcx), %al
movzbl %al, %ecx
movl $0x7, %r13d
cmpl $0x61, %ecx
jg 0x4f40
cmpl $0x22, %ecx
je 0x4eec
cmpl $0x2f, %ecx
je 0x4eec
cmpl $0x5c, %ecx
je 0x4eec
jmp 0x5086
leal -0x6e(%rcx), %eax
cmpl $0x7, %eax
ja 0x4f55
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movb $0xa, %al
jmp 0x4eec
cmpl $0x62, %ecx
je 0x4fa5
cmpl $0x66, %ecx
jne 0x5086
movb $0xc, %al
jmp 0x4eec
movl $0x0, -0x2c(%rbp)
movq %r15, %rdi
movq %rbx, %rsi
leaq -0x2c(%rbp), %rdx
callq 0x538c
testl %eax, %eax
je 0x4fac
movl %eax, %r13d
xorl %eax, %eax
movl %r13d, -0x30(%rbp)
testb %al, %al
jne 0x4ef7
jmp 0x5086
movb $0x9, %al
jmp 0x4eec
movb $0xd, %al
jmp 0x4eec
movb $0x8, %al
jmp 0x4eec
movl -0x2c(%rbp), %eax
movl $0xfffffc00, %ecx       # imm = 0xFFFFFC00
andl %ecx, %eax
cmpl $0xd800, %eax           # imm = 0xD800
jne 0x500a
movq (%r15), %rcx
addq 0x8(%r15), %rcx
movq (%rbx), %rax
movl $0x5, %r13d
cmpq %rcx, %rax
je 0x4f84
leaq 0x1(%rax), %rdx
movq %rdx, (%rbx)
cmpb $0x5c, (%rax)
jne 0x5038
cmpq %rcx, %rdx
je 0x4f84
leaq 0x2(%rax), %rcx
movq %rcx, (%rbx)
cmpb $0x75, 0x1(%rax)
jne 0x5038
movq %r15, %rdi
movq %rbx, %rsi
leaq -0x34(%rbp), %rdx
callq 0x538c
testl %eax, %eax
je 0x5045
xorl %ecx, %ecx
movl %eax, %r13d
jmp 0x5076
movl -0x30(%rbp), %r13d
cmpl $0x10ffff, -0x2c(%rbp)  # imm = 0x10FFFF
jbe 0x5022
movl $0x8, %r13d
jmp 0x4f84
movq %r15, %rdi
leaq -0x2c(%rbp), %rsi
movq %r14, %rdx
callq 0x5416
movb $0x1, %al
jmp 0x4f86
xorl %eax, %eax
movl $0x9, %r13d
jmp 0x4f86
movl -0x34(%rbp), %eax
leal -0xe000(%rax), %ecx
cmpl $0xfffffc00, %ecx       # imm = 0xFFFFFC00
jae 0x5060
movl $0x9, %r13d
xorl %ecx, %ecx
jmp 0x5076
movl -0x2c(%rbp), %ecx
shll $0xa, %ecx
addl %ecx, %eax
addl $0xfca02400, %eax       # imm = 0xFCA02400
movl %eax, -0x2c(%rbp)
movb $0x1, %cl
movl -0x30(%rbp), %r13d
testb %cl, %cl
je 0x4f84
jmp 0x500e
movl $0x5, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
jmp 0x5086
movl $0x6, %r13d
jmp 0x5086
nop