// File: /workspace/github_cpp_makefile_star2_O2/oknenavin[P]cxon/test/../src/cxon/lang/common/cio/char.hxx
// Function: std::enable_if<!cxon::JSON<input_iterator_no_validate_string_encoding_traits>::validate_string_encoding, char32_t>::type cxon::cio::chr::imp::utf8_to_utf32_<cxon::JSON<input_iterator_no_validate_string_encoding_traits>, cxon::test::force_input_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, cxon::context<cxon::JSON<input_iterator_no_validate_string_encoding_traits>>>(cxon::test::force_input_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, cxon::test::force_input_iterator<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, cxon::context<cxon::JSON<input_iterator_no_validate_string_encoding_traits>>&)
inline auto utf8_to_utf32_(II& i, II e, Cx& cx)
                    -> enable_if_t<!X::validate_string_encoding, char32_t>
                {   static_assert(is_char_8<typename std::iterator_traits<II>::value_type>::value, "unexpected");
                    CXON_ASSERT(i != e, "unexpected");
                    char32_t const  c0 = (unsigned char)*i;
                    char32_t        c1, c2, c3;
                    if ((c0 & 0x80) == 0)
                        return ++i, c0;
                    if ((c0 & 0xE0) == 0xC0) {
                        c1 = head_(i, e);       CXON_EXPECT((c1 & 0xC0) == 0x80);
                        return ++i, ((c0 & 0x1F) << 6) | (c1 & 0x3F);
                    }
                    if ((c0 & 0xF0) == 0xE0) {
                        c1 = head_(i, e);       CXON_EXPECT((c1 & 0xC0) == 0x80);
                        c2 = tail_(i, e);       CXON_EXPECT((c2 & 0xC0) == 0x80);
                        return ++i, ((c0 & 0x0F) << 12) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
                    }
                    if ((c0 & 0xF8) == 0xF0) {
                        c1 = head_(i, e);       CXON_EXPECT((c1 & 0xC0) == 0x80);
                        c2 = tail_(i, e);       CXON_EXPECT((c2 & 0xC0) == 0x80);
                        c3 = tail_(i, e);       CXON_EXPECT((c3 & 0xC0) == 0x80);
                        return ++i, ((c0 & 0x07) << 18) | ((c1 & 0x3F) << 12) | ((c2 & 0x3F) << 6) | (c3 & 0x3F);
                    }
                    CXON_EXPECT(false);
                }

// Assembly:
pushq %rax
movq (%rdi), %rcx
movzbl (%rcx), %eax
testb %al, %al
js 0xbdf40
incq %rcx
movq %rcx, (%rdi)
jmp 0xbe0e8
movl %eax, %r8d
andl $-0x20, %r8d
cmpl $0xc0, %r8d
jne 0xbdf8f
leaq 0x1(%rcx), %r8
cmpq (%rsi), %r8
movq %r8, (%rdi)
je 0xbe0da
movzbl (%r8), %esi
movl %esi, %r8d
andl $-0x40, %r8d
cmpl $0x80, %r8d
jne 0xbe0da
addq $0x2, %rcx
movq %rcx, (%rdi)
andl $0x1f, %eax
shll $0x6, %eax
andl $0x3f, %esi
orl %esi, %eax
jmp 0xbe0e8
movl %eax, %r8d
andl $-0x10, %r8d
cmpl $0xe0, %r8d
jne 0xbe024
leaq 0x1(%rcx), %r9
cmpq (%rsi), %r9
movq %r9, (%rdi)
je 0xbe0da
movzbl (%r9), %r8d
movl %r8d, %r10d
andl $-0x40, %r10d
cmpl $0x80, %r10d
jne 0xbe0da
movq (%rsi), %rsi
cmpq %rsi, %r9
je 0xbe0da
leaq 0x2(%rcx), %r9
movq %r9, (%rdi)
cmpq %rsi, %r9
je 0xbe0da
movzbl (%r9), %esi
movl %esi, %r9d
andl $-0x40, %r9d
cmpl $0x80, %r9d
jne 0xbe0da
addq $0x3, %rcx
movq %rcx, (%rdi)
shll $0xc, %eax
movzwl %ax, %eax
andl $0x3f, %r8d
shll $0x6, %r8d
orl %eax, %r8d
andl $0x3f, %esi
orl %r8d, %esi
movl %esi, %eax
jmp 0xbe0e8
movl %eax, %r8d
andl $-0x8, %r8d
cmpl $0xf0, %r8d
jne 0xbe0da
leaq 0x1(%rcx), %r9
cmpq (%rsi), %r9
movq %r9, (%rdi)
je 0xbe0da
movzbl (%r9), %r8d
movl %r8d, %r10d
andl $-0x40, %r10d
cmpl $0x80, %r10d
jne 0xbe0da
movq (%rsi), %r11
cmpq %r11, %r9
je 0xbe0da
leaq 0x2(%rcx), %r10
movq %r10, (%rdi)
cmpq %r11, %r10
je 0xbe0da
movzbl (%r10), %r9d
movl %r9d, %r11d
andl $-0x40, %r11d
cmpl $0x80, %r11d
jne 0xbe0da
movq (%rsi), %rsi
cmpq %rsi, %r10
je 0xbe0da
leaq 0x3(%rcx), %r10
movq %r10, (%rdi)
cmpq %rsi, %r10
je 0xbe0da
movzbl (%r10), %esi
movl %esi, %r10d
andl $-0x40, %r10d
cmpl $0x80, %r10d
jne 0xbe0da
addq $0x4, %rcx
movq %rcx, (%rdi)
andl $0x7, %eax
shll $0x12, %eax
andl $0x3f, %r8d
shll $0xc, %r8d
orl %eax, %r8d
andl $0x3f, %r9d
shll $0x6, %r9d
orl %r8d, %r9d
andl $0x3f, %esi
orl %r9d, %esi
jmp 0xbe01d
pushq $0x2
popq %rsi
movq %rdx, %rdi
callq 0xbdb2e
pushq $-0x1
popq %rax
popq %rcx
retq