// File: /workspace/github_c_makefile_star2_O3/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, -0x2c(%rbp)
movq %rdi, %rbx
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq (%rbx), %rdi
callq 0x38ba
cmpl $0x33, %eax
je 0x4afe
movq (%rbx), %rdi
callq 0x38ba
cmpl $0x34, %eax
jne 0x48ec
movq (%rbx), %rdi
callq 0x330e
movq (%rbx), %rdi
callq 0x38ba
movq (%rbx), %rdi
cmpl $0x1, %eax
jne 0x48f7
callq 0x330e
movb $0x1, %r14b
jmp 0x49b8
xorl %r14d, %r14d
xorl %r13d, %r13d
jmp 0x49cd
callq 0x38ba
movq (%rbx), %rdi
cmpl $0x2d, %eax
jne 0x4bf7
callq 0x38ba
cmpl $0x2d, %eax
jne 0x49b5
xorl %r13d, %r13d
movq (%rbx), %rdi
callq 0x330e
movq %rbx, %rdi
movl $0x43, %esi
callq 0x4d60
testq %rax, %rax
je 0x4ba8
movq %rax, %r15
movb $0x1, 0xc(%rax)
movl (%rax), %esi
movq %r13, %rdi
callq 0x3bfb
cmpl $-0x1, %eax
je 0x4966
movq (%rbx), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r15), %rdx
leaq 0x682a(%rip), %rsi      # 0xb189
xorl %eax, %eax
callq 0x22f9
movl (%r15), %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x3aef
testq %r13, %r13
je 0x4987
movq %r13, %rdi
movq %rax, %rsi
callq 0x3b62
jmp 0x498a
movq %rax, %r13
movq (%rbx), %rdi
callq 0x38ba
cmpl $0x31, %eax
jne 0x499f
movq (%rbx), %rdi
callq 0x330e
movq (%rbx), %rdi
callq 0x38ba
cmpl $0x2d, %eax
je 0x4919
xorl %r14d, %r14d
jmp 0x49bb
xorl %r14d, %r14d
xorl %r13d, %r13d
movq (%rbx), %rdi
callq 0x330e
cmpq $0x35, %rax
jne 0x4b93
movq (%rbx), %rdi
callq 0x38ba
cmpl $0x2d, %eax
jne 0x4b06
movb $0x0, 0x1c(%rbx)
movq (%rbx), %rdi
callq 0x330e
movq %rbx, %rdi
movl %eax, %esi
callq 0x4d60
testq %rax, %rax
je 0x4be5
movq %rax, %r15
movb %r14b, 0x34(%rax)
movq %r13, 0x38(%rax)
movq (%rbx), %rdi
callq 0x38ba
testl %eax, %eax
jne 0x4b47
cmpl $0x40, -0x2c(%rbp)
jne 0x4a23
movb $0x1, 0x1b(%r15)
movq (%rbx), %rdi
callq 0x330e
movq (%rbx), %rdi
callq 0x330e
cmpq $0x2, %rax
jne 0x4b5e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x60f0
testq %rax, %rax
je 0x4be5
cmpq $0x0, 0x20(%r15)
jne 0x4b72
movq %rax, 0x20(%r15)
movq (%rbx), %rdi
callq 0x330e
movq (%rbx), %rdi
cmpq $0x3, %rax
jne 0x4b86
callq 0x38ba
cmpl $0x2e, %eax
jne 0x4ab0
movq (%rbx), %rdi
callq 0x330e
movq (%rbx), %rdi
callq 0x38ba
movq (%rbx), %rdi
cmpl $0x44, %eax
jne 0x4bb8
callq 0x330e
movb $0x1, 0x18(%r15)
cmpb $0x1, 0x1a(%r15)
je 0x4bcc
movq (%rbx), %rdi
callq 0x38ba
cmpl $0x31, %eax
jne 0x4ad9
movq (%rbx), %rdi
callq 0x330e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4ef2
cmpl $-0x1, %eax
je 0x4be5
movq (%rbx), %rdi
callq 0x330e
cmpq $0x30, %rax
je 0x48a9
movq (%rbx), %rax
movslq 0x28(%rax), %rdi
leaq 0x6638(%rip), %rsi      # 0xb131
jmp 0x4bc3
xorl %r12d, %r12d
jmp 0x4be5
movq (%rbx), %rdi
callq 0x38ba
xorl %r12d, %r12d
cmpl $0x33, %eax
je 0x4be5
movq (%rbx), %rax
movslq 0x28(%rax), %rdi
cmpl $0x41, -0x2c(%rbp)
leaq 0x6172(%rip), %rax      # 0xac9e
leaq 0x6165(%rip), %rdx      # 0xac98
cmoveq %rax, %rdx
leaq 0x661d(%rip), %rsi      # 0xb15b
xorl %eax, %eax
callq 0x3f64
jmp 0x4bb0
movq (%rbx), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r15), %rdx
leaq 0x6792(%rip), %rsi      # 0xb2eb
jmp 0x4bde
movq (%rbx), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r15), %rdx
leaq 0x6718(%rip), %rsi      # 0xb288
jmp 0x4bde
movq (%rbx), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r15), %rdx
leaq 0x6720(%rip), %rsi      # 0xb2a4
jmp 0x4bde
movslq 0x28(%rdi), %rdi
leaq 0x6737(%rip), %rsi      # 0xb2c8
jmp 0x4bc3
movq (%rbx), %rax
movslq 0x28(%rax), %rdi
leaq 0x664d(%rip), %rsi      # 0xb1ee
xorl %eax, %eax
callq 0x3f64
movq %r13, %rdi
callq 0x3bba
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x4be5
movslq 0x28(%rdi), %rdi
leaq 0x6798(%rip), %rsi      # 0xb35b
xorl %eax, %eax
callq 0x3f64
jmp 0x4be5
movq (%rbx), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r15), %rdx
leaq 0x673b(%rip), %rsi      # 0xb319
xorl %eax, %eax
callq 0x3f64
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq 0x28(%rdi), %rdi
leaq 0x65b3(%rip), %rsi      # 0xb1b5
xorl %eax, %eax
callq 0x3f64
jmp 0x4bb0