// File: /workspace/github_c_makefile_star2_O1/MaoKo[P]FGFX/fgfl/src/lexical_spec.c
// Function: spec_regex_list
int
spec_regex_list(lexical_spec_t* spec, int kind_section) {
    if (peek_token(spec->lex) == T_RBRACE)
        { return (DONE); }

    bool all_state = false;
    trans_list_t* state_seen = NULL;

    if (spec_state_prefix(spec, &state_seen, &all_state) == ERROR)
        { return (ERROR); }

    if (peek_token(spec->lex) == T_TERMINAL) {
        spec->miss_regex = false;
        spec_entry_t* entry = add_entry_lexeme(spec, advance_token(spec->lex));

        if (!entry)
            { return (ERROR); }

        entry->all_state = all_state;
        entry->state_lst = state_seen;

        if (spec_regex_assign(spec, entry, kind_section) == ERROR)
            { return (ERROR); }
        else if (advance_token(spec->lex) != T_SEMI) {
            errorf(CURRENT_LINE(spec->lex),
                        "Missing a ';' after the regex definition.");
            return (ERROR);
        }
        return (spec_regex_list(spec, kind_section));
    }
    else if (peek_token(spec->lex) != T_RBRACE) {
        errorf(CURRENT_LINE(spec->lex),
                            "Missing a local or global token in %s section",
                            REGEX_LST_SECT(kind_section));
        return (ERROR);
    }
    return (DONE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %r14
movq (%r14), %rdi
callq 0x39b4
cmpl $0x33, %eax
je 0x4c5c
movq (%r14), %rdi
callq 0x39b4
cmpl $0x34, %eax
jne 0x4a09
movq (%r14), %rdi
callq 0x331a
movq (%r14), %rdi
callq 0x39b4
movq (%r14), %rdi
cmpl $0x1, %eax
jne 0x4a13
callq 0x331a
movb $0x1, %bl
xorl %r12d, %r12d
jmp 0x4aef
xorl %ebx, %ebx
xorl %r12d, %r12d
jmp 0x4afd
callq 0x39b4
cmpl $0x2d, %eax
jne 0x4ad4
xorl %r12d, %r12d
movq (%r14), %rdi
callq 0x39b4
cmpl $0x2d, %eax
jne 0x4aed
movq (%r14), %rdi
callq 0x331a
movq %r14, %rdi
movl $0x43, %esi
callq 0x4e60
movq %rax, %r13
testq %rax, %rax
je 0x4aa3
movb $0x1, 0xc(%r13)
movl (%r13), %esi
movq %r12, %rdi
callq 0x3cf7
cmpl $-0x1, %eax
je 0x4a81
movq (%r14), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r13), %rdx
leaq 0x670f(%rip), %rsi      # 0xb189
xorl %eax, %eax
callq 0x22f9
movl (%r13), %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x3beb
testq %r12, %r12
je 0x4aad
movq %r12, %rdi
movq %rax, %rsi
callq 0x3c5e
jmp 0x4ab0
movq %r12, %rdi
callq 0x3cb6
jmp 0x4ac5
movq %rax, %r12
movq (%r14), %rdi
callq 0x39b4
cmpl $0x31, %eax
jne 0x4ac5
movq (%r14), %rdi
callq 0x331a
testq %r13, %r13
jne 0x4a24
movb $0x1, %al
xorl %ebx, %ebx
jmp 0x4b20
movq (%r14), %rax
movslq 0x28(%rax), %rdi
xorl %ebx, %ebx
leaq 0x66d1(%rip), %rsi      # 0xb1b5
xorl %eax, %eax
callq 0x4060
jmp 0x4b1e
xorl %ebx, %ebx
movq (%r14), %rdi
callq 0x331a
cmpq $0x35, %rax
jne 0x4b01
xorl %eax, %eax
jmp 0x4b23
movq (%r14), %rax
movslq 0x28(%rax), %rdi
leaq 0x66df(%rip), %rsi      # 0xb1ee
xorl %eax, %eax
callq 0x4060
movq %r12, %rdi
callq 0x3cb6
movb $0x1, %al
xorl %r12d, %r12d
testb %al, %al
jne 0x4d12
movq (%r14), %rdi
callq 0x39b4
cmpl $0x2d, %eax
jne 0x4c63
movb $0x0, 0x1c(%r14)
movq (%r14), %rdi
callq 0x331a
movq %r14, %rdi
movl %eax, %esi
callq 0x4e60
testq %rax, %rax
je 0x4d12
movq %rax, %r13
movb %bl, 0x34(%rax)
movq %r12, 0x38(%rax)
movq (%r14), %rdi
callq 0x39b4
testl %eax, %eax
jne 0x4c9c
cmpl $0x40, %r15d
jne 0x4b81
movb $0x1, 0x1b(%r13)
movq (%r14), %rdi
callq 0x331a
movq (%r14), %rdi
callq 0x331a
cmpq $0x2, %rax
jne 0x4cb0
movq %r14, %rdi
movq %r13, %rsi
callq 0x623c
testq %rax, %rax
je 0x4d12
cmpq $0x0, 0x20(%r13)
jne 0x4cc4
movq %rax, 0x20(%r13)
movq (%r14), %rdi
callq 0x331a
movq (%r14), %rdi
cmpq $0x3, %rax
jne 0x4cd8
callq 0x39b4
cmpl $0x2e, %eax
jne 0x4c0e
movq (%r14), %rdi
callq 0x331a
movq (%r14), %rdi
callq 0x39b4
movq (%r14), %rdi
cmpl $0x44, %eax
jne 0x4ce5
callq 0x331a
movb $0x1, 0x18(%r13)
cmpb $0x1, 0x1a(%r13)
je 0x4cf9
movq (%r14), %rdi
callq 0x39b4
cmpl $0x31, %eax
jne 0x4c37
movq (%r14), %rdi
callq 0x331a
movq %r14, %rdi
movq %r13, %rsi
callq 0x5008
cmpl $-0x1, %eax
je 0x4d12
movq (%r14), %rdi
callq 0x331a
cmpq $0x30, %rax
je 0x49c4
movq (%r14), %rax
movslq 0x28(%rax), %rdi
leaq 0x64da(%rip), %rsi      # 0xb131
jmp 0x4cf0
xorl %ecx, %ecx
jmp 0x4d17
movq (%r14), %rdi
callq 0x39b4
xorl %ecx, %ecx
cmpl $0x33, %eax
je 0x4d17
movq (%r14), %rax
movslq 0x28(%rax), %rdi
cmpl $0x41, %r15d
leaq 0x6016(%rip), %rax      # 0xac9e
leaq 0x6009(%rip), %rdx      # 0xac98
cmoveq %rax, %rdx
leaq 0x64c1(%rip), %rsi      # 0xb15b
jmp 0x4d0b
movq (%r14), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r13), %rdx
leaq 0x663d(%rip), %rsi      # 0xb2eb
jmp 0x4d0b
movq (%r14), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r13), %rdx
leaq 0x65c6(%rip), %rsi      # 0xb288
jmp 0x4d0b
movq (%r14), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r13), %rdx
leaq 0x65ce(%rip), %rsi      # 0xb2a4
jmp 0x4d0b
movslq 0x28(%rdi), %rdi
leaq 0x65e5(%rip), %rsi      # 0xb2c8
jmp 0x4cf0
movslq 0x28(%rdi), %rdi
leaq 0x666b(%rip), %rsi      # 0xb35b
xorl %eax, %eax
callq 0x4060
jmp 0x4d12
movq (%r14), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r13), %rdx
leaq 0x660e(%rip), %rsi      # 0xb319
xorl %eax, %eax
callq 0x4060
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq