// File: /workspace/github_cpp_makefile_star2_O1/oknenavin[P]cxon/test/../src/cxon/lang/cbor/common/tag.hxx
// Function: std::enable_if<std::is_unsigned<unsigned long>::value, bool>::type cxon::cbor::tag::read<cxon::CBOR<cxon::cbor::format_traits>, unsigned long, char const*, cxon::context<cxon::CBOR<cxon::cbor::format_traits>, cxon::napa::imp::var<cxon::node::recursion_guard, unsigned int>>>(unsigned long&, char const*&, char const*, cxon::context<cxon::CBOR<cxon::cbor::format_traits>, cxon::napa::imp::var<cxon::node::recursion_guard, unsigned int>>&)
inline auto read(T& t, II& i, II e, Cx& cx) -> enable_if_t<std::is_unsigned<T>::value, bool> {
                auto b = bio::peek(i, e);
                switch (b & X::mjr) {
                    case X::tag: {
                        II const o = i;
                        switch (b = b & X::mnr) {
                            case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07:
                            case 0x08: case 0x09: case 0x0A: case 0x0B: case 0x0C: case 0x0D: case 0x0E: case 0x0F:
                            case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17:
                                return  (bio::get(i, e), t = std::size_t(b), true);
                            case 0x18: case 0x19: case 0x1A: case 0x1B:
                                return  (bio::get(i, e), bio::get(t, 1 << (b - 0x18), i, e)) ||
                                        (bio::rewind(i, o), cx/cbor::read_error::integer_invalid)
                                ;
                            case 0x1C: case 0x1D: case 0x1E: case 0x1F:
                                return  (bio::rewind(i, o), cx/cbor::read_error::tag_invalid);
                            default:                                            // LCOV_EXCL_LINE
                                return  CXON_ASSERT(0, "unexpected"), false;    // LCOV_EXCL_LINE
                        }
                    }
                    default:
                                return  (t = T(-1), true);
                }
        }

// Assembly:
pushq %rbx
movq %rcx, %rbx
movq (%rsi), %r8
cmpq %rdx, %r8
je 0x18493
movb (%r8), %cl
jmp 0x18495
movb $-0x1, %cl
movl %ecx, %eax
andb $-0x20, %al
cmpb $-0x40, %al
jne 0x184b7
andb $0x1f, %cl
movzbl %cl, %eax
cmpb $0x18, %al
jae 0x184c2
cmpq %rdx, %r8
je 0x184b2
incq %r8
movq %r8, (%rsi)
movq %rax, (%rdi)
jmp 0x184be
movq $-0x1, (%rdi)
movb $0x1, %al
popq %rbx
retq
addl $-0x18, %eax
cmpl $0x4, %eax
jae 0x18518
cmpq %rdx, %r8
je 0x184d6
leaq 0x1(%r8), %rax
movq %rax, (%rsi)
addb $-0x18, %cl
movl $0x1, %eax
shll %cl, %eax
decl %eax
cmpl $0x7, %eax
ja 0x18594
leaq 0x2ef0e(%rip), %rcx     # 0x47400
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rsi), %rax
cmpq %rdx, %rax
setne %cl
je 0x1858a
movzbl (%rax), %ecx
movq %rcx, (%rdi)
incq %rax
movq %rax, (%rsi)
jmp 0x184be
callq 0x17f7e
movl $0x8, (%rbx)
jmp 0x185a2
movq (%rsi), %rax
subq %rax, %rdx
cmpq $0x4, %rdx
setge %cl
jl 0x1858a
leaq 0x4(%rax), %rcx
movq %rcx, (%rsi)
movl (%rax), %eax
bswapl %eax
jmp 0x184b2
movq (%rsi), %rax
subq %rax, %rdx
cmpq $0x2, %rdx
setge %cl
jl 0x1858a
leaq 0x2(%rax), %rcx
movq %rcx, (%rsi)
movzwl (%rax), %eax
rolw $0x8, %ax
movzwl %ax, %eax
jmp 0x184b2
movq (%rsi), %rax
subq %rax, %rdx
cmpq $0x8, %rdx
setge %cl
jl 0x1858a
leaq 0x8(%rax), %rcx
movq %rcx, (%rsi)
movq (%rax), %rax
bswapq %rax
jmp 0x184b2
movb $0x1, %al
testb %cl, %cl
jne 0x184c0
movq %r8, (%rsi)
callq 0x17f7e
movl $0x4, (%rbx)
movq %rax, 0x8(%rbx)
xorl %eax, %eax
jmp 0x184c0