// File: /workspace/github_c_makefile_star2_O2/MaoKo[P]FGFX/fgfl/src/regex.c
// Function: regex_cce
static bitset_t*
regex_cce(int kind_cce) {
    bitset_t* cce_range = new_bitset();
    bitset_t* op_range = NULL_BITSET;

    switch (kind_cce) {
        case T_CCE_ALNUM:
            op_range = regex_cce(T_CCE_ALPHA);
            UNION_BITSET(cce_range, op_range); del_bitset(op_range);        
            op_range = regex_cce(T_CCE_DIGIT);
            UNION_BITSET(cce_range, op_range); del_bitset(op_range);        
            break;
        case T_CCE_ALPHA:
            op_range = regex_cce(T_CCE_LOWER);
            UNION_BITSET(cce_range, op_range); del_bitset(op_range);        
            op_range = regex_cce(T_CCE_UPPER);
            UNION_BITSET(cce_range, op_range); del_bitset(op_range);        
            break;
        case T_CCE_BLANK:
            ADD_BITSET(cce_range, '\t');
            ADD_BITSET(cce_range, ' ');
            break;
        case T_CCE_CNTRL:
            add_range_bitset(cce_range, '\0', '\x1F' + 1);
            ADD_BITSET(cce_range, '\x7F');
            break;
        case T_CCE_DIGIT:
            add_range_bitset(cce_range, '0', '9' + 1);
            break;
        case T_CCE_GRAPH:
            op_range = regex_cce(T_CCE_PRINT); OFF_BITSET(op_range, ' ');
            UNION_BITSET(cce_range, op_range); del_bitset(op_range);
            break;
        case T_CCE_LOWER:
            add_range_bitset(cce_range, 'a', 'z' + 1);
            break;
        case T_CCE_PRINT:
            op_range = regex_cce(T_CCE_CNTRL);
            UNION_BITSET(cce_range, COMPL_BITSET(op_range));
            del_bitset(op_range);
            break;
        case T_CCE_PUNCT:
            op_range = regex_cce(T_CCE_GRAPH);
            UNION_BITSET(cce_range, op_range); del_bitset(op_range);        
            op_range = regex_cce(T_CCE_ALNUM);
            UNION_BITSET(cce_range, COMPL_BITSET(op_range));
            del_bitset(op_range);        
            break;
        case T_CCE_SPACE:
            add_range_bitset(cce_range, '\t', '\r' + 1);
            ADD_BITSET(cce_range, ' ');
            break;
        case T_CCE_UPPER:
            add_range_bitset(cce_range, 'A', 'Z' + 1);
            break;
        case T_CCE_XDIGIT:
            op_range = regex_cce(T_CCE_DIGIT);
            UNION_BITSET(cce_range, op_range); del_bitset(op_range);        
            add_range_bitset(cce_range, 'a', 'f' + 1);
            add_range_bitset(cce_range, 'A', 'F' + 1);
            break;
    }
    return (cce_range);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %r14d
callq 0x230c
movq %rax, %rbx
addl $-0x4b, %r14d
cmpl $0xb, %r14d
ja 0x6cfe
leaq 0x4e69(%rip), %rax      # 0xb99c
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
pushq $0x4c
popq %rdi
callq 0x6b0c
movq %rax, %r14
xorl %edi, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x261d
movq %r14, %rdi
callq 0x2351
pushq $0x4e
jmp 0x6c57
pushq $0x4e
popq %rdi
callq 0x6b0c
movq %rax, %r14
xorl %edi, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x261d
movq %r14, %rdi
callq 0x2351
pushq $0x61
popq %rsi
pushq $0x67
popq %rdx
movq %rbx, %rdi
callq 0x251e
pushq $0x41
popq %rsi
pushq $0x47
jmp 0x6c9d
pushq $0x51
popq %rdi
callq 0x6b0c
movq %rax, %r14
cmpl $0x21, 0x4(%rax)
jb 0x6bbd
movq 0x8(%r14), %rax
movabsq $-0x100000001, %rcx     # imm = 0xFFFFFFFEFFFFFFFF
andq %rcx, (%rax)
xorl %edi, %edi
movq %rbx, %rsi
movq %r14, %rdx
jmp 0x6c89
movl 0x4(%rbx), %eax
cmpl $0x9, %eax
ja 0x6ccf
pushq $0x9
popq %rsi
movq %rbx, %rdi
callq 0x23f9
movl 0x4(%rbx), %eax
jmp 0x6cda
pushq $0x20
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x251e
cmpl $0x7f, 0x4(%rbx)
ja 0x6cec
pushq $0x7f
jmp 0x6ce1
pushq $0x30
popq %rsi
pushq $0x3a
jmp 0x6c9d
pushq $0x4f
popq %rdi
callq 0x6b0c
movq %rax, %r14
xorl %edi, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x261d
movq %r14, %rdi
callq 0x2351
pushq $0x4b
jmp 0x6c6b
pushq $0x50
popq %rdi
callq 0x6b0c
movq %rax, %r14
xorl %edi, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x261d
movq %r14, %rdi
callq 0x2351
pushq $0x55
popq %rdi
callq 0x6b0c
movq %rax, %r14
jmp 0x6c81
pushq $0x61
popq %rsi
pushq $0x7b
jmp 0x6c9d
pushq $0x4d
popq %rdi
callq 0x6b0c
movq %rax, %r14
pushq $0x3
popq %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x261d
xorl %edi, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x261d
movq %r14, %rdi
callq 0x2351
jmp 0x6cfe
pushq $0x41
popq %rsi
pushq $0x5b
popq %rdx
movq %rbx, %rdi
callq 0x251e
jmp 0x6cfe
pushq $0x9
popq %rsi
pushq $0xe
popq %rdx
movq %rbx, %rdi
callq 0x251e
cmpl $0x20, 0x4(%rbx)
jbe 0x6cdf
movq 0x8(%rbx), %rax
movabsq $0x100000000, %rcx      # imm = 0x100000000
orq %rcx, (%rax)
jmp 0x6cfe
movq 0x8(%rbx), %rcx
orq $0x200, (%rcx)          # imm = 0x200
cmpl $0x20, %eax
ja 0x6cbc
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0x23f9
jmp 0x6cfe
movq 0x8(%rbx), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
orq %rcx, 0x8(%rax)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq