// File: oknenavin[P]cxon/test/../src/cxon/lang/common/cio/char.hxx
// Function: bool cxon::cio::chr::imp::encode_<cxon::JSON<cxon::cio::key::unquoted_traits<cxon::json::format_traits>>, char>::value<cxon::json::indenter<cxon::JSON<cxon::JSON<cxon::json::format_traits>>, std::ostreambuf_iterator<char, std::char_traits<char>>>, cxon::context<cxon::JSON<cxon::json::format_traits>, cxon::napa::imp::var<cxon::node::recursion_guard, unsigned int>>>(cxon::json::indenter<cxon::JSON<cxon::JSON<cxon::json::format_traits>>, std::ostreambuf_iterator<char, std::char_traits<char>>>&, char, cxon::context<cxon::JSON<cxon::json::format_traits>, cxon::napa::imp::var<cxon::node::recursion_guard, unsigned int>>&)
static bool value(O& o, char c, Cx& cx) {
                        static constexpr char const*const esc_[] = {
                            "\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007",
                                "\\b",     "\\t",     "\\n", "\\u000b",     "\\f",     "\\r", "\\u000e", "\\u000f",
                            "\\u0010", "\\u0011", "\\u0012", "\\u0013", "\\u0014", "\\u0015", "\\u0016", "\\u0017",
                            "\\u0018", "\\u0019", "\\u001a", "\\u001b", "\\u001c", "\\u001d", "\\u001e", "\\u001f"
                        };
                        static constexpr unsigned len_[] = { 6, 6, 6, 6, 6, 6, 6, 6, 2, 2, 2, 6, 2, 2, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 };
                        static_assert(X::string::del == '"' || X::string::del == '\'', "expecting single or double quotes as a string delimiter");
                        static_assert(X::map::div == ':' || X::map::div == '=', "expecting colon or equal sign as a key/value divider");
                        switch (c) {
                            case  0: case  1: case  2: case  3: case  4: case  5: case  6: case  7:
                            case  8: case  9: case 10: case 11: case 12: case 13: case 14: case 15:
                            case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23:
                            case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31:
                                        return poke<X>(o, esc_[(unsigned char)c], len_[(unsigned char)c], cx);
                            case ' ' :
                                CXON_IF_CONSTEXPR (is_quoted_key_context<X>::value)
                                        return poke<X>(o, "\\ ", 2, cx);
                                else    return poke<X>(o, ' ', cx);
                            case '"':
                                CXON_IF_CONSTEXPR (is_unquoted_key_context<X>::value)
                                        return poke<X>(o, "\\u0022", 6, cx);
                                CXON_IF_CONSTEXPR (is_quoted_key_context<X>::value || X::string::del == '\'')
                                        return poke<X>(o, '"', cx);
                                else    return poke<X>(o, "\\\"", 2, cx);
                            case '\'':
                                CXON_IF_CONSTEXPR (is_unquoted_key_context<X>::value)
                                        return poke<X>(o, '\'', cx);
                                CXON_IF_CONSTEXPR (is_quoted_key_context<X>::value || X::string::del == '"')
                                        return poke<X>(o, '\'', cx);
                                else    return poke<X>(o, "\\'", 2, cx);
                            case ':' :
                                CXON_IF_CONSTEXPR (is_quoted_key_context<X>::value && X::map::div == ':')
                                        return poke<X>(o, "\\:", 2, cx);
                                else    return poke<X>(o, ':', cx);
                            case '=' :
                                CXON_IF_CONSTEXPR (is_quoted_key_context<X>::value && X::map::div == '=')
                                        return poke<X>(o, "\\=", 2, cx);
                                else    return poke<X>(o, '=', cx);
                            case '\\':  return poke<X>(o, "\\\\", 2, cx);
                            default  :  return poke<X>(o, c, cx);
                        }
                    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movsbl -0x11(%rbp), %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x5c, %eax
ja 0x4d641
movq -0x28(%rbp), %rax
leaq 0x74fec(%rip), %rcx     # 0xc2540
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
movzbl -0x11(%rbp), %eax
movl %eax, %ecx
leaq 0xc81c2(%rip), %rax     # 0x115730
movq (%rax,%rcx,8), %rsi
movzbl -0x11(%rbp), %eax
movl %eax, %ecx
leaq 0x75f31(%rip), %rax     # 0xc34b0
movl (%rax,%rcx,4), %eax
movl %eax, %edx
movq -0x20(%rbp), %rcx
callq 0x4db20
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x4d659
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x20, %esi
callq 0x4c120
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x4d659
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
leaq 0x757f3(%rip), %rsi     # 0xc2db5
movl $0x6, %edx
callq 0x4db20
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x4d659
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x27, %esi
callq 0x4c120
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x4d659
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x3a, %esi
callq 0x4c120
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x4d659
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x3d, %esi
callq 0x4c120
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x4d659
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
leaq 0x7578c(%rip), %rsi     # 0xc2dbc
movl $0x2, %edx
callq 0x4db20
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x4d659
movq -0x10(%rbp), %rdi
movb -0x11(%rbp), %al
movq -0x20(%rbp), %rdx
movsbl %al, %esi
callq 0x4c120
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop