// File: /workspace/github_cpp_makefile_star2_O2/oknenavin[P]cxon/test/../src/cxon/lang/common/cio/char.hxx
// Function: std::enable_if<cxon::JSON<cxon::cio::str::raw_traits<cxon::json::format_traits>>::validate_string_encoding, char32_t>::type cxon::cio::chr::imp::utf8_to_utf32_<cxon::JSON<cxon::cio::str::raw_traits<cxon::json::format_traits>>, std::istreambuf_iterator<char, std::char_traits<char>>, cxon::context<cxon::JSON<cxon::json::format_traits>>>(std::istreambuf_iterator<char, std::char_traits<char>>&, std::istreambuf_iterator<char, std::char_traits<char>>, cxon::context<cxon::JSON<cxon::json::format_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 <= 0x7F)
                        return ++i, c0;
                    if (c0 >= 0xC2 && c0 <= 0xDF) {
                        c1 = head_(i, e);       CXON_EXPECT(c1 >= 0x80 && c1 <= 0xBF);
                        return ++i, ((c0 & 0x1F) << 6) | (c1 & 0x3F);
                    }
                    if (c0 == 0xE0) {
                        c1 = head_(i, e);       CXON_EXPECT(c1 >= 0xA0 && c1 <= 0xBF);
                        c2 = tail_(i, e);       CXON_EXPECT(c2 >= 0x80 && c2 <= 0xBF);
                        return ++i, ((c0 & 0x0F) << 12) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
                    }
                    if (c0 >= 0xE1 && c0 <= 0xEC) {
                        c1 = head_(i, e);       CXON_EXPECT(c1 >= 0x80 && c1 <= 0xBF);
                        c2 = tail_(i, e);       CXON_EXPECT(c2 >= 0x80 && c2 <= 0xBF);
                        return ++i, ((c0 & 0x0F) << 12) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
                    }
                    if (c0 == 0xED) {
                        c1 = head_(i, e);       CXON_EXPECT(c1 >= 0x80 && c1 <= 0x9F);
                        c2 = tail_(i, e);       CXON_EXPECT(c2 >= 0x80 && c2 <= 0xBF);
                        return ++i, ((c0 & 0x0F) << 12) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
                    }
                    if (c0 >= 0xEE && c0 <= 0xEF) {
                        c1 = head_(i, e);       CXON_EXPECT(c1 >= 0x80 && c1 <= 0xBF);
                        c2 = tail_(i, e);       CXON_EXPECT(c2 >= 0x80 && c2 <= 0xBF);
                        return ++i, ((c0 & 0x0F) << 12) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
                    }
                    if (c0 == 0xF0) {
                        c1 = head_(i, e);       CXON_EXPECT(c1 >= 0x90 && c1 <= 0xBF);
                        c2 = tail_(i, e);       CXON_EXPECT(c2 >= 0x80 && c2 <= 0xBF);
                        c3 = tail_(i, e);       CXON_EXPECT(c3 >= 0x80 && c3 <= 0xBF);
                        return ++i, ((c0 & 0x07) << 18) | ((c1 & 0x3F) << 12) | ((c2 & 0x3F) << 6) | (c3 & 0x3F);
                    }
                    if (c0 >= 0xF1 && c0 <= 0xF3) {
                        c1 = head_(i, e);       CXON_EXPECT(c1 >= 0x80 && c1 <= 0xBF);
                        c2 = tail_(i, e);       CXON_EXPECT(c2 >= 0x80 && c2 <= 0xBF);
                        c3 = tail_(i, e);       CXON_EXPECT(c3 >= 0x80 && c3 <= 0xBF);
                        return ++i, ((c0 & 0x07) << 18) | ((c1 & 0x3F) << 12) | ((c2 & 0x3F) << 6) | (c3 & 0x3F);
                    }
                    if (c0 == 0xF4) {
                        c1 = head_(i, e);       CXON_EXPECT(c1 >= 0x80 && c1 <= 0x8F);
                        c2 = tail_(i, e);       CXON_EXPECT(c2 >= 0x80 && c2 <= 0xBF);
                        c3 = tail_(i, e);       CXON_EXPECT(c3 >= 0x80 && c3 <= 0xBF);
                        return ++i, ((c0 & 0x07) << 18) | ((c1 & 0x3F) << 12) | ((c2 & 0x3F) << 6) | (c3 & 0x3F);
                    }
                    CXON_EXPECT(false);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movl %edx, 0x8(%rax)
movq %rax, %rsi
callq 0x8273
movq %r14, %rdi
callq 0x82c4
movzbl %al, %ebp
testb %bpl, %bpl
js 0xc2be
movq %r14, %rdi
callq 0x827e
jmp 0xc5d1
leal 0x3e(%rax), %ecx
cmpb $0x1d, %cl
ja 0xc2ff
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc624
cmpb $-0x40, %al
jge 0xc5c3
movl %eax, %r15d
movq %r14, %rdi
callq 0x827e
andl $0x1f, %ebp
shll $0x6, %ebp
andb $0x3f, %r15b
movzbl %r15b, %eax
orl %eax, %ebp
jmp 0xc5d1
cmpb $-0x20, %al
jne 0xc359
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc624
movl %eax, %ebp
andb $-0x20, %al
cmpb $-0x60, %al
jne 0xc5c3
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc5e2
cmpb $-0x40, %al
jge 0xc5c3
movl %eax, %r15d
movq %r14, %rdi
callq 0x827e
andb $0x3f, %bpl
movzbl %bpl, %eax
shll $0x6, %eax
andb $0x3f, %r15b
movzbl %r15b, %ebp
jmp 0xc2f8
leal 0x1f(%rax), %ecx
cmpb $0xb, %cl
ja 0xc3c3
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc624
cmpb $-0x40, %al
jge 0xc5c3
movl %eax, %r15d
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc5e2
cmpb $-0x40, %al
jge 0xc5c3
movl %eax, %r12d
movq %r14, %rdi
callq 0x827e
shll $0xc, %ebp
movzwl %bp, %eax
andb $0x3f, %r15b
movzbl %r15b, %ecx
shll $0x6, %ecx
orl %eax, %ecx
andb $0x3f, %r12b
movzbl %r12b, %ebp
orl %ecx, %ebp
jmp 0xc5d1
cmpb $-0x13, %al
jne 0xc427
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc624
cmpb $-0x60, %al
jge 0xc5c3
movl %eax, %ebp
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc5e2
cmpb $-0x40, %al
jge 0xc5c3
movl %eax, %r15d
movq %r14, %rdi
callq 0x827e
andb $0x1f, %bpl
movzbl %bpl, %eax
shll $0x6, %eax
andb $0x3f, %r15b
movzbl %r15b, %ecx
leal (%rax,%rcx), %ebp
addl $0xd000, %ebp           # imm = 0xD000
jmp 0xc5d1
movl %eax, %ecx
andb $-0x2, %cl
cmpb $-0x12, %cl
je 0xc361
cmpb $-0x10, %al
jne 0xc4b0
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc624
movl %eax, %r15d
leal 0x70(%r15), %eax
cmpb $0x30, %al
jae 0xc5c3
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc5e2
cmpb $-0x40, %al
jge 0xc5c3
movl %eax, %ebp
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc5e2
cmpb $-0x40, %al
jge 0xc5c3
movl %eax, %r12d
movq %r14, %rdi
callq 0x827e
andb $0x3f, %r15b
movzbl %r15b, %eax
shll $0xc, %eax
andb $0x3f, %bpl
movzbl %bpl, %ecx
jmp 0xc3af
leal 0xf(%rax), %ecx
cmpb $0x2, %cl
ja 0xc545
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc624
cmpb $-0x40, %al
jge 0xc5c3
movl %eax, %r15d
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc5e2
cmpb $-0x40, %al
jge 0xc5c3
movl %eax, %r12d
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc5e2
cmpb $-0x40, %al
jge 0xc5c3
movl %eax, %r13d
movq %r14, %rdi
callq 0x827e
andl $0x3, %ebp
shll $0x12, %ebp
andb $0x3f, %r15b
movzbl %r15b, %eax
shll $0xc, %eax
orl %ebp, %eax
andb $0x3f, %r12b
movzbl %r12b, %ecx
shll $0x6, %ecx
orl %eax, %ecx
andb $0x3f, %r13b
movzbl %r13b, %ebp
jmp 0xc3bc
cmpb $-0xc, %al
jne 0xc5c3
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc624
cmpb $-0x70, %al
jge 0xc5c3
movl %eax, %ebp
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc5e2
cmpb $-0x40, %al
jge 0xc5c3
movl %eax, %r15d
movq 0x8(%rsp), %rsi
movl 0x10(%rsp), %edx
movq %r14, %rdi
callq 0xc5e2
cmpb $-0x40, %al
jge 0xc5c3
movl %eax, %r12d
movq %r14, %rdi
callq 0x827e
andb $0xf, %bpl
movzbl %bpl, %eax
shll $0xc, %eax
andb $0x3f, %r15b
movzbl %r15b, %ecx
shll $0x6, %ecx
orl %eax, %ecx
andb $0x3f, %r12b
movzbl %r12b, %eax
leal (%rax,%rcx), %ebp
addl $0x100000, %ebp         # imm = 0x100000
jmp 0xc5d1
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0xb670
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq