// File: /workspace/github_c_makefile_star2_O0/MaoKo[P]FGFX/fgfl/src/regex.c
// Function: regex_fullccl
static regex_node_t*
regex_fullccl(void) {
    regex_node_t* root = regex_loneccl();
    if (!root)
        { return (NULL_NODE); }

    bool encounter_op = false;
    while (in_first(regex_spec->lex, T_REG_DIFF_CLASS,
                                T_REG_UNION_CLASS, T_REG_INTER_CLASS, -1)) {

        int kind_op = advance_token(regex_spec->lex);

        if (peek_token(regex_spec->lex) != T_REG_LBRACK) {
            del_regex_node(root);
            errorf(CURRENT_LINE(regex_spec->lex),
                                "Missing character class operand to %s.",
                                (kind_op == T_REG_DIFF_CLASS)  ? "{-}" :
                                (kind_op == T_REG_UNION_CLASS) ? "{+}" : "{&}");
            return (NULL_NODE);
        }
        else {
            regex_node_t* right_op = regex_loneccl();
            if (kind_op == T_REG_DIFF_CLASS)
                { DIFF_BITSET(root->class, right_op->class); }
            else if (kind_op == T_REG_UNION_CLASS)
                { UNION_BITSET(root->class, right_op->class); }
            else
                { INTERSECT_BITSET(root->class, right_op->class); }
            del_regex_node(right_op);
        }
        encounter_op = true;
    }
    if (is_empty_bitset(root->class)) {
        if (encounter_op) {
            warnf(CURRENT_LINE(regex_spec->lex),
                    "Generated epsilon with class operator.");
        }
        del_bitset(root->class);
        root->kind_ast = AST_EPSILON;
    }
    return (root);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
callq 0x8a60
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8345
movq $0x0, -0x8(%rbp)
jmp 0x84d7
movb $0x0, -0x11(%rbp)
movq 0x19a70(%rip), %rax     # 0x21dc0
movq (%rax), %rdi
movl $0x13, %esi
movl $0x14, %edx
movl $0x15, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movb $0x0, %al
callq 0x3350
testb $0x1, %al
jne 0x8378
jmp 0x8483
movq 0x19a41(%rip), %rax     # 0x21dc0
movq (%rax), %rdi
callq 0x2cc0
movl %eax, -0x18(%rbp)
movq 0x19a2f(%rip), %rax     # 0x21dc0
movq (%rax), %rdi
callq 0x3300
cmpl $0x16, %eax
je 0x840b
movq -0x10(%rbp), %rdi
callq 0xa380
movq 0x19a12(%rip), %rax     # 0x21dc0
movq (%rax), %rax
movslq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
cmpl $0x13, -0x18(%rbp)
jne 0x83cc
leaq 0x6af4(%rip), %rax      # 0xeeba
movq %rax, -0x30(%rbp)
jmp 0x83e8
movl -0x18(%rbp), %edx
leaq 0x6aec(%rip), %rax      # 0xeec2
leaq 0x6ae1(%rip), %rcx      # 0xeebe
cmpl $0x14, %edx
cmoveq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0x6a9c(%rip), %rsi      # 0xee93
movb $0x0, %al
callq 0x4230
movq $0x0, -0x8(%rbp)
jmp 0x84d7
callq 0x8a60
movq %rax, -0x20(%rbp)
cmpl $0x13, -0x18(%rbp)
jne 0x8436
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
movl $0x2, %edi
callq 0x18b0
jmp 0x8471
cmpl $0x14, -0x18(%rbp)
jne 0x8455
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
xorl %edi, %edi
callq 0x18b0
jmp 0x846f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
movl $0x1, %edi
callq 0x18b0
jmp 0x8471
movq -0x20(%rbp), %rdi
callq 0xa380
movb $0x1, -0x11(%rbp)
jmp 0x8349
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x16c0
testb $0x1, %al
jne 0x8496
jmp 0x84cf
testb $0x1, -0x11(%rbp)
je 0x84b8
movq 0x1991d(%rip), %rax     # 0x21dc0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x6a15(%rip), %rsi      # 0xeec6
movb $0x0, %al
callq 0x43e0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1320
movq -0x10(%rbp), %rax
movl $0xb, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)