// File: oknenavin[P]cxon/test/../src/cxon/lang/cbor/common/tag.hxx
// Function: bool cxon::cbor::tag::read<cxon::CBOR<cxon::cbor::format_traits>, char const*, cxon::context<cxon::CBOR<cxon::cbor::format_traits>, cxon::napa::imp::var<cxon::node::recursion_guard, unsigned int>>>(char const*&, char const*, cxon::context<cxon::CBOR<cxon::cbor::format_traits>, cxon::napa::imp::var<cxon::node::recursion_guard, unsigned int>>&)
inline bool read(II& i, II e, Cx& cx) {
            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), true);
                        case 0x18: case 0x19: case 0x1A: case 0x1B:
                            return  (bio::advance(i, e, 1 + (1 << (b - 0x18)))) ||
                                    (bio::rewind(i, o), cx/cbor::read_error::unexpected)
                            ;
                        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  true;
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0xff, %edx
callq 0x309a0
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
andl $-0x20, %eax
subl $0xc0, %eax
jne 0x30d50
jmp 0x30c7d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movzbl -0x21(%rbp), %eax
andl $0x1f, %eax
movl %eax, -0x34(%rbp)
movb %al, -0x21(%rbp)
subb $0x18, %al
jb 0x30cb8
jmp 0x30c9b
movl -0x34(%rbp), %eax
addl $-0x18, %eax
subl $0x4, %eax
jb 0x30cd3
jmp 0x30ca8
movl -0x34(%rbp), %eax
addl $-0x1c, %eax
subl $0x4, %eax
jb 0x30d28
jmp 0x30d4a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0xff, %edx
callq 0x310f0
movb $0x1, -0x1(%rbp)
jmp 0x30d54
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movzbl -0x21(%rbp), %ecx
subl $0x18, %ecx
movl $0x1, %eax
shll %cl, %eax
addl $0x1, %eax
movslq %eax, %rdx
callq 0x31140
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x35(%rbp)
jne 0x30d1e
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x31170
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x31190
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x30d54
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x31170
movq -0x20(%rbp), %rdi
movl $0x8, %esi
callq 0x31190
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x30d54
movb $0x0, -0x1(%rbp)
jmp 0x30d54
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nop