// File: /workspace/github_c_makefile_star2_O1/MaoKo[P]FGFX/fgfl/src/regex.c
// Function: regex_loneccl
static regex_node_t*
regex_loneccl(void) {
    advance_token(regex_spec->lex);
    bool negate = (peek_token(regex_spec->lex) == T_REG_CARET);

    if (negate)
        { advance_token(regex_spec->lex); }

    bool cce_lower = false;
    bool cce_upper = false;

    bitset_t* range = regex_ccl(&cce_lower, &cce_upper);
    if (!range)
        { return (NULL_NODE); }
    else if (advance_token(regex_spec->lex) != T_REG_RBRACK) {
        del_bitset(range);
        errorf(CURRENT_LINE(regex_spec->lex),
                                "Missing a close bracket (']') in ccl.");
        return (NULL_NODE);
    }

    if (is_empty_bitset(range) && !negate) {
        del_bitset(range);
        return (new_regex_node(AST_EPSILON));
    }
    else if (negate)
        { COMPL_BITSET(range); }

    return (new_regex_node(AST_CLASS, range,
            ((cce_lower) ? CURRENT_LINE(regex_spec->lex) : -1),
            ((cce_upper) ? CURRENT_LINE(regex_spec->lex) : -1)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x17064(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x331a
movq 0x17055(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x39b4
movl %eax, %r12d
cmpl $0x18, %eax
jne 0x6e8a
movq 0x1703e(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x331a
callq 0x247c
movq %rax, %rbx
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movq 0x17019(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
movl $0x17, %esi
movl $0x70, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x39e3
testb %al, %al
jne 0x7035
movq 0x16ff1(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x331a
movq %rax, %r13
cmpl $0x6f, %r13d
jne 0x6ee8
movq %rbx, %rdi
jmp 0x6fd5
leal -0x4b(%r13), %eax
cmpl $0x18, %eax
ja 0x6f30
cmpl $0x56, %r13d
jg 0x6fb6
movzbl -0x30(%rbp), %eax
xorl %r14d, %r14d
cmpl $0x50, %r13d
sete %r14b
testb $0x1, %al
cmovnel %eax, %r14d
movl %r14d, -0x30(%rbp)
testb $0x1, -0x2c(%rbp)
jne 0x6f24
cmpl $0x55, %r13d
sete %al
movl %eax, -0x2c(%rbp)
leaq 0x1f4(%rip), %rax       # 0x711f
jmp 0x6fbd
movl %r12d, %r14d
movl %r13d, %edi
callq 0x6ce9
movslq %eax, %r12
movq 0x16f7b(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x39b4
cmpl $0x1a, %eax
jne 0x6ffa
movq 0x16f63(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x331a
movq 0x16f54(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x331a
movl %eax, %edi
callq 0x6ce9
movslq %eax, %r15
leaq 0x1(%r15), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x26ca
cmpl %r12d, %r15d
jae 0x6fdc
movq 0x16f27(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x4b70(%rip), %rsi      # 0xbb17
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x22f9
jmp 0x7026
leaq 0x3c6(%rip), %rax       # 0x7383
movl %r13d, %edi
callq *%rax
movq %rax, %r15
xorl %edi, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2809
movq %r15, %rdi
callq 0x24ca
jmp 0x7029
jne 0x7026
movq 0x16edb(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x4b57(%rip), %rsi      # 0xbb4a
xorl %eax, %eax
callq 0x22f9
movl 0x4(%rbx), %eax
cmpq %rax, %r12
jae 0x701b
movl $0x1, %eax
movl %r12d, %ecx
shlq %cl, %rax
movq 0x8(%rbx), %rcx
shrq $0x6, %r12
orq %rax, (%rcx,%r12,8)
jmp 0x7026
movq %rbx, %rdi
movq %r12, %rsi
callq 0x25a8
movl %r14d, %r12d
cmpl $0x6f, %r13d
jne 0x6ea0
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x70ac
movq 0x16e7f(%rip), %rax     # 0x1dec0
movq (%rax), %rdi
callq 0x331a
cmpq $0x17, %rax
jne 0x7088
cmpl $0x18, %r12d
sete %r15b
movq %rbx, %rdi
callq 0x2725
xorb $0x1, %al
orb %r15b, %al
jne 0x70bd
movq %rbx, %rdi
callq 0x24ca
movl $0xb, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7948
movq %rbx, %rdi
callq 0x24ca
movq 0x16e29(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x4a4c(%rip), %rsi      # 0xbaf1
xorl %eax, %eax
callq 0x4060
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x18, %r12d
jne 0x70d2
movl $0x3, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2809
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
testb $0x1, -0x30(%rbp)
je 0x70ef
movq 0x16dd7(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movl 0x28(%rax), %edx
testb $0x1, -0x2c(%rbp)
je 0x7102
movq 0x16dc4(%rip), %rax     # 0x1dec0
movq (%rax), %rax
movl 0x28(%rax), %ecx
movl $0xc, %edi
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7948