// File: /workspace/github_cpp_makefile_star2_O1/oknenavin[P]cxon/test/../src/cxon/lang/common/cio/string.hxx
// Function: std::enable_if<!has_traits<cxon::JSON<cxon::cxcf::format_traits>, cxon::cio::str::raw_traits>::value, bool>::type cxon::cio::str::imp::imp::string_read_tail_<cxon::JSON<cxon::cxcf::format_traits>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const*, cxon::context<cxon::JSON<cxon::cxcf::format_traits>>, char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const*&, char const*, cxon::context<cxon::JSON<cxon::cxcf::format_traits>>&)
inline auto string_read_tail_(C& c, II& i, II e, Cx& cx)
                    -> enable_if_t<!has_traits<X, str::raw_traits>::value, bool>
                {
                    II l = i;
                        constexpr bool HANDLE_ESCAPES = is_unquoted_key_context<X>::value || !X::assume_no_escapes;
                        for ( ; i != e; ++i) {
                            if (HANDLE_ESCAPES && *i == '\\') {
                                if (l != i && !cxon::cnt::append(c, l, i))
                                    return rewind(i, l), cx/X::read_error::overflow;
                                CXON_IF_CONSTEXPR (is_unquoted_key_context<X>::value) {
                                    II const f = i;
                                        if (++i != e && *i == X::string::del)
                                            return ++i, true;
                                    i = f;
                                }
                                II const o = i;
                                    char32_t const c32 = chr::esc_to_utf32<X>(++i, e, cx);
                                        if (c32 == chr::bad_utf32) return rewind(i, o), false;
                                    if (!char_append_(c, c32))
                                        return rewind(i, o), cx/X::read_error::overflow;
                                l = i, --i;
                            }
                            else {
                                CXON_IF_CONSTEXPR (!is_unquoted_key_context<X>::value) {
                                    if (delim_en_check<X>(*i)) {
                                        if (l == i || cxon::cnt::append(c, l, i))
                                            return delim_en_read<X>(i, e);
                                        return rewind(i, l), cx/X::read_error::overflow;
                                    }
                                }
                                CXON_IF_CONSTEXPR (X::validate_string_encoding) {
                                    if ((unsigned char)*i > 0x7F) {
                                        auto bs = chr::utf8_check(i, e);
                                        if (bs == 0)
                                            return cx/X::read_error::character_invalid;
                                        while ((bs = chr::utf8_check(i += bs, e)))
                                            ;
                                        --i;
                                    }
                                    else CXON_IF_CONSTEXPR (X::validate_string_escapes) {
                                        if (chr::is<X>::ctrl(*i))
                                            return cx/X::read_error::unexpected;
                                    }
                                }
                                else CXON_IF_CONSTEXPR (X::validate_string_escapes) {
                                    if (chr::is<X>::ctrl(*i))
                                        return cx/X::read_error::unexpected;
                                }
                            }
                        }
                    return cx/X::read_error::unexpected;
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq (%rsi), %r8
cmpq %rdx, %r8
je 0xb567
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
movq (%rsi), %rbp
movzbl (%r8), %eax
cmpl $0x5c, %eax
je 0xb1c7
cmpl $0x22, %eax
je 0xb58c
testb %al, %al
js 0xb27b
cmpb $0x1f, %al
ja 0xb555
jmp 0xb567
cmpq %r8, %rbp
je 0xb1e1
movq 0x8(%r12), %rsi
subq %rbp, %r8
movq %r12, %rdi
xorl %edx, %edx
movq %rbp, %rcx
callq 0x4270
movq (%rbx), %r15
leaq 0x1(%r15), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq 0x10(%rsp), %rdx
callq 0xb5c4
movl %eax, %r13d
cmpl $-0x1, %eax
je 0xb37a
movl %r13d, %ecx
andl $0xfffffc00, %ecx       # imm = 0xFFFFFC00
xorl %eax, %eax
cmpl $0xd800, %ecx           # imm = 0xD800
je 0xb35c
movl $0x1, %eax
cmpl $0x80, %r13d
jb 0xb257
movl $0x2, %eax
cmpl $0x800, %r13d           # imm = 0x800
jb 0xb257
movl $0x3, %eax
cmpl $0x10000, %r13d         # imm = 0x10000
jb 0xb257
xorl %eax, %eax
cmpl $0x110000, %r13d        # imm = 0x110000
setb %al
shll $0x2, %eax
leal -0x1(%rax), %ecx
cmpl $0x3, %ecx
ja 0xb35c
leaq 0x3bf22(%rip), %rdx     # 0x4718c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl %r13d, %ecx
jmp 0xb34c
cmpb $-0x21, %al
ja 0xb2af
movq %r14, %rcx
subq %r8, %rcx
cmpq $0x2, %rcx
jl 0xb409
cmpb $-0x3e, %al
jb 0xb409
cmpb $-0x40, 0x1(%r8)
jge 0xb409
movl $0x2, %ecx
xorl %r13d, %r13d
jmp 0xb40e
cmpb $-0x11, %al
ja 0xb2de
movq %r14, %rcx
subq %r8, %rcx
cmpq $0x3, %rcx
jl 0xb409
cmpb $-0x20, %al
jne 0xb38c
movb 0x1(%r8), %al
andb $-0x20, %al
cmpb $-0x60, %al
je 0xb397
jmp 0xb409
cmpb $-0x9, %al
ja 0xb409
movq %r14, %rcx
subq %r8, %rcx
cmpq $0x4, %rcx
jl 0xb409
cmpb $-0x10, %al
jne 0xb3a8
movb 0x1(%r8), %al
addb $0x70, %al
cmpb $0x2f, %al
jbe 0xb3d7
jmp 0xb409
movl %r13d, %ecx
jmp 0xb329
movl %r13d, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0xf(%rsp)
movl %r13d, %ecx
shrl $0x6, %ecx
movl %ecx, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0xe(%rsp)
shrl $0x6, %ecx
jmp 0xb33d
movl %r13d, %ecx
movl %ecx, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0xd(%rsp)
shrl $0x6, %ecx
movl %eax, %edx
leaq 0x3ceeb(%rip), %rsi     # 0x48240
orl (%rsi,%rdx,8), %ecx
movb %cl, 0xc(%rsp)
movl %eax, %r8d
movq 0x8(%r12), %rsi
movq %r12, %rdi
xorl %edx, %edx
leaq 0xc(%rsp), %rcx
callq 0x4270
movq (%rbx), %rbp
leaq -0x1(%rbp), %r15
movq %r15, (%rbx)
cmpl $-0x1, %r13d
jne 0xb555
jmp 0xb57b
cmpb $-0x14, %al
ja 0xb3b5
cmpb $-0x41, 0x1(%r8)
jg 0xb409
cmpb $-0x40, 0x2(%r8)
jge 0xb409
xorl %r13d, %r13d
movl $0x3, %ecx
jmp 0xb40e
cmpb $-0xd, %al
ja 0xb3cc
cmpb $-0x41, 0x1(%r8)
jle 0xb3d7
jmp 0xb409
movb 0x1(%r8), %cl
movb 0x2(%r8), %dl
cmpb $-0x13, %al
jne 0xb3ef
cmpb $-0x40, %dl
setl %al
cmpb $-0x60, %cl
jmp 0xb3f8
cmpb $-0xc, %al
jne 0xb409
cmpb $-0x71, 0x1(%r8)
jg 0xb409
cmpb $-0x41, 0x2(%r8)
jg 0xb409
cmpb $-0x40, 0x3(%r8)
jge 0xb409
xorl %r13d, %r13d
movl $0x4, %ecx
jmp 0xb40e
cmpb $-0x40, %dl
setl %al
cmpb $-0x40, %cl
setl %cl
testb %al, %cl
je 0xb409
movl $0x3, %ecx
jmp 0xb2a7
movb $0x1, %r13b
xorl %ecx, %ecx
testb %r13b, %r13b
je 0xb42c
callq 0xcf7a
movq 0x10(%rsp), %rcx
movl $0x2, (%rcx)
movq %rax, 0x8(%rcx)
jmp 0xb550
movq (%rbx), %rax
movq %rax, %rdx
addq %rcx, %rax
movq %rax, (%rbx)
movb (%rdx,%rcx), %cl
cmpb $-0x21, %cl
ja 0xb46f
movq %r14, %rdx
subq %rax, %rdx
cmpq $0x2, %rdx
jl 0xb53e
cmpb $-0x3e, %cl
jb 0xb53e
cmpb $-0x40, 0x1(%rax)
jge 0xb53e
movl $0x2, %ecx
xorl %edx, %edx
jmp 0xb542
cmpb $-0x11, %cl
ja 0xb499
movq %r14, %rdx
subq %rax, %rdx
cmpq $0x3, %rdx
jl 0xb53e
cmpb $-0x20, %cl
jne 0xb4c4
movb 0x1(%rax), %cl
andb $-0x20, %cl
cmpb $-0x60, %cl
je 0xb4cf
jmp 0xb53e
cmpb $-0x9, %cl
ja 0xb53e
movq %r14, %rdx
subq %rax, %rdx
cmpq $0x4, %rdx
jl 0xb53e
cmpb $-0x10, %cl
jne 0xb4de
movb 0x1(%rax), %cl
addb $0x70, %cl
cmpb $0x2f, %cl
jbe 0xb50e
jmp 0xb53e
cmpb $-0x14, %cl
ja 0xb4eb
cmpb $-0x41, 0x1(%rax)
jg 0xb53e
cmpb $-0x40, 0x2(%rax)
jge 0xb53e
xorl %edx, %edx
movl $0x3, %ecx
jmp 0xb542
cmpb $-0xd, %cl
ja 0xb503
cmpb $-0x41, 0x1(%rax)
jle 0xb50e
jmp 0xb53e
movb 0x1(%rax), %dl
movb 0x2(%rax), %sil
cmpb $-0x13, %cl
jne 0xb523
cmpb $-0x40, %sil
setl %cl
cmpb $-0x60, %dl
jmp 0xb52d
cmpb $-0xc, %cl
jne 0xb53e
cmpb $-0x71, 0x1(%rax)
jg 0xb53e
cmpb $-0x41, 0x2(%rax)
jg 0xb53e
cmpb $-0x40, 0x3(%rax)
jge 0xb53e
xorl %edx, %edx
movl $0x4, %ecx
jmp 0xb542
cmpb $-0x40, %sil
setl %cl
cmpb $-0x40, %dl
setl %dl
testb %cl, %dl
je 0xb53e
movl $0x3, %ecx
jmp 0xb468
movb $0x1, %dl
xorl %ecx, %ecx
testb %dl, %dl
je 0xb42f
decq %rax
movq %rax, (%rbx)
testb %r13b, %r13b
jne 0xb57b
movq (%rbx), %r8
incq %r8
movq %r8, (%rbx)
cmpq %r14, %r8
jne 0xb1a0
callq 0xcf7a
movq 0x10(%rsp), %rcx
movl $0x1, (%rcx)
movq %rax, 0x8(%rcx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq %r8, %rbp
je 0xb5a6
movq 0x8(%r12), %rsi
subq %rbp, %r8
movq %r12, %rdi
xorl %edx, %edx
movq %rbp, %rcx
callq 0x4270
movq (%rbx), %rcx
cmpq %r14, %rcx
je 0xb5b6
cmpb $0x22, (%rcx)
sete %al
jmp 0xb5b8
xorl %eax, %eax
testb %al, %al
je 0xb57d
incq %rcx
movq %rcx, (%rbx)
jmp 0xb57d