// File: /workspace/github_c_makefile_star2_O2/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
subq $0x10, %rsp
movq 0x17690(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
movq 0x17681(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x3559
movl %eax, -0x30(%rbp)
cmpl $0x18, %eax
jne 0x686e
movq 0x1766a(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
movl $0x0, -0x28(%rbp)
callq 0x230c
movq %rax, %r14
pushq $0x17
popq %r12
pushq $0x70
popq %r13
pushq $-0x1
popq %rax
movl %eax, -0x2c(%rbp)
movl $0x0, -0x24(%rbp)
movq 0x17637(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
movl %r12d, %esi
movl %r13d, %edx
pushq $-0x1
popq %rcx
xorl %eax, %eax
callq 0x3585
testb %al, %al
jne 0x6a1e
movq 0x17615(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
cmpl $0x6f, %eax
je 0x6a72
leal -0x4b(%rax), %ecx
cmpl $0x18, %ecx
jbe 0x69c4
movl %eax, %edi
callq 0x66fe
movslq %eax, %r15
movq 0x175e7(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x3559
cmpl $0x1a, %eax
jne 0x6991
movl %r12d, %r13d
movq 0x175cc(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
movq 0x175bd(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
movl %eax, %edi
callq 0x66fe
movslq %eax, %r12
leaq 0x1(%r12), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x251e
cmpl %r15d, %r12d
jae 0x6968
movq 0x1758f(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x5184(%rip), %rsi      # 0xbad3
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x3d40
movl %r13d, %r12d
pushq $0x70
popq %r13
jmp 0x6892
movl %r13d, %r12d
pushq $0x70
popq %r13
jne 0x6892
movq 0x17554(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x517c(%rip), %rsi      # 0xbb06
xorl %eax, %eax
callq 0x3d40
movl 0x4(%r14), %eax
cmpq %rax, %r15
jae 0x69b4
pushq $0x1
popq %rax
movl %r15d, %ecx
shlq %cl, %rax
movq 0x8(%r14), %rcx
shrq $0x6, %r15
orq %rax, (%rcx,%r15,8)
jmp 0x6892
movq %r14, %rdi
movq %r15, %rsi
callq 0x23f9
jmp 0x6892
cmpl $0x56, %eax
ja 0x69f6
movzbl -0x28(%rbp), %ecx
xorl %edx, %edx
cmpl $0x50, %eax
sete %dl
testb $0x1, %cl
cmovnel %ecx, %edx
movl %edx, -0x28(%rbp)
testb $0x1, -0x24(%rbp)
jne 0x69ed
cmpl $0x55, %eax
sete %cl
movl %ecx, -0x24(%rbp)
leaq 0x118(%rip), %rcx       # 0x6b0c
jmp 0x69fd
leaq 0x309(%rip), %rcx       # 0x6d06
movl %eax, %edi
callq *%rcx
movq %rax, %r15
xorl %edi, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x261d
movq %r15, %rdi
callq 0x2351
jmp 0x6892
testq %r14, %r14
je 0x6aa0
movq 0x174a6(%rip), %rax     # 0x1ded0
movq (%rax), %rdi
callq 0x306d
cmpq $0x17, %rax
jne 0x6a7c
movl -0x30(%rbp), %r12d
cmpl $0x18, %r12d
sete %r15b
movq %r14, %rdi
callq 0x257c
xorb $0x1, %al
orb %r15b, %al
jne 0x6ab0
movq %r14, %rdi
callq 0x2351
pushq $0xb
popq %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x71a4
movq %r14, %rdi
callq 0x2351
jmp 0x6aa0
movq %r14, %rdi
callq 0x2351
movq 0x17445(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x5014(%rip), %rsi      # 0xbaad
xorl %eax, %eax
callq 0x3bdc
xorl %eax, %eax
addq $0x10, %rsp
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x18, %r12d
jne 0x6ac3
pushq $0x3
popq %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x261d
pushq $-0x1
popq %rdx
testb $0x1, -0x28(%rbp)
je 0x6ad9
movq 0x173fd(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movl 0x28(%rax), %edx
testb $0x1, -0x24(%rbp)
je 0x6aef
movq 0x173ea(%rip), %rax     # 0x1ded0
movq (%rax), %rax
movl 0x28(%rax), %eax
movl %eax, -0x2c(%rbp)
pushq $0xc
popq %rdi
movq %r14, %rsi
movl -0x2c(%rbp), %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x71a4