// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movl %esi, -0x2c(%rbp)
movq %rdi, %r15
pushq $-0x1
popq %r14
leaq -0x38(%rbp), %r13
movq (%r15), %rdi
callq 0x3559
cmpl $0x33, %eax
je 0x48dc
movq (%r15), %rdi
callq 0x3559
cmpl $0x34, %eax
jne 0x4679
movq (%r15), %rdi
callq 0x306d
movq (%r15), %rdi
callq 0x3559
movq (%r15), %rdi
cmpl $0x1, %eax
jne 0x4683
callq 0x306d
movb $0x1, %r14b
xorl %ebx, %ebx
jmp 0x4734
xorl %r14d, %r14d
xorl %ebx, %ebx
jmp 0x4746
callq 0x3559
cmpl $0x2d, %eax
jne 0x49cc
xorl %ebx, %ebx
movq (%r15), %rdi
callq 0x3559
cmpl $0x2d, %eax
jne 0x4731
movq (%r15), %rdi
callq 0x306d
movq %r15, %rdi
pushq $0x43
popq %rsi
callq 0x4b33
testq %rax, %rax
je 0x48cf
movq %rax, %r12
movb $0x1, 0xc(%rax)
movl (%rax), %esi
movq %rbx, %rdi
callq 0x38c4
cmpl $-0x1, %eax
je 0x46f0
movq (%r15), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r12), %rdx
leaq 0x6a87(%rip), %rsi      # 0xb170
xorl %eax, %eax
callq 0x3d40
movl (%r12), %edi
movl %r14d, %esi
xorl %edx, %edx
callq 0x37ca
testq %rbx, %rbx
je 0x4710
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3832
jmp 0x4713
movq %rax, %rbx
movq (%r15), %rdi
callq 0x3559
cmpl $0x31, %eax
jne 0x4693
movq (%r15), %rdi
callq 0x306d
jmp 0x4693
xorl %r14d, %r14d
movq (%r15), %rdi
callq 0x306d
cmpq $0x35, %rax
jne 0x496f
movq (%r15), %rdi
callq 0x3559
cmpl $0x2d, %eax
jne 0x48e3
movb $0x0, 0x1c(%r15)
movq (%r15), %rdi
callq 0x306d
movq %r15, %rdi
movl %eax, %esi
callq 0x4b33
testq %rax, %rax
je 0x498c
movq %rax, %r12
movb %r14b, 0x34(%rax)
movq %rbx, 0x38(%rax)
movq (%r15), %rdi
callq 0x3559
testl %eax, %eax
jne 0x491c
cmpl $0x40, -0x2c(%rbp)
pushq $-0x1
popq %r14
jne 0x47a2
movb $0x1, 0x1b(%r12)
movq (%r15), %rdi
callq 0x306d
movq (%r15), %rdi
callq 0x306d
cmpq $0x2, %rax
jne 0x4938
movq %r15, %rdi
movq %r12, %rsi
callq 0x5d30
testq %rax, %rax
je 0x49f1
cmpq $0x0, 0x20(%r12)
jne 0x494d
movq %rax, 0x20(%r12)
movq (%r15), %rdi
callq 0x306d
movq (%r15), %rdi
cmpq $0x3, %rax
jne 0x4962
callq 0x3559
cmpl $0x2e, %eax
jne 0x4833
movq (%r15), %rdi
callq 0x306d
movq (%r15), %rdi
callq 0x3559
movq (%r15), %rdi
cmpl $0x44, %eax
jne 0x4993
callq 0x306d
movb $0x1, 0x18(%r12)
cmpb $0x1, 0x1a(%r12)
je 0x49b0
movq (%r15), %rdi
callq 0x3559
cmpl $0x31, %eax
jne 0x48aa
movq (%r15), %rdi
callq 0x306d
movq (%r15), %rdi
callq 0x306d
cmpq $0x34, %rax
jne 0x49a0
andq $0x0, -0x38(%rbp)
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x4cc0
cmpl $-0x1, %eax
je 0x49f1
movq (%r15), %rdi
callq 0x3559
cmpl $0x31, %eax
jne 0x4898
movq (%r15), %rdi
callq 0x306d
movq (%r15), %rdi
callq 0x3559
cmpl $0x35, %eax
jne 0x485f
movq (%r15), %rdi
callq 0x306d
cmpq $0x35, %rax
jne 0x49dc
movq (%r15), %rdi
callq 0x306d
cmpq $0x30, %rax
je 0x4634
movq (%r15), %rax
movslq 0x28(%rax), %rdi
leaq 0x684e(%rip), %rsi      # 0xb118
jmp 0x49ea
movq %rbx, %rdi
callq 0x388a
jmp 0x49f1
xorl %ecx, %ecx
jmp 0x49f4
movq (%r15), %rdi
callq 0x3559
xorl %ecx, %ecx
cmpl $0x33, %eax
je 0x49f4
movq (%r15), %rax
movslq 0x28(%rax), %rdi
cmpl $0x41, -0x2c(%rbp)
leaq 0x5822(%rip), %rax      # 0xa12a
leaq 0x5815(%rip), %rdx      # 0xa124
cmoveq %rax, %rdx
leaq 0x6828(%rip), %rsi      # 0xb142
jmp 0x492f
movq (%r15), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r12), %rdx
leaq 0x69a3(%rip), %rsi      # 0xb2d2
xorl %eax, %eax
callq 0x3bdc
jmp 0x498c
movq (%r15), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r12), %rdx
leaq 0x6924(%rip), %rsi      # 0xb26f
jmp 0x49c3
movq (%r15), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r12), %rdx
leaq 0x692b(%rip), %rsi      # 0xb28b
jmp 0x49c3
movslq 0x28(%rdi), %rdi
leaq 0x6942(%rip), %rsi      # 0xb2af
jmp 0x49ea
movq (%r15), %rax
movslq 0x28(%rax), %rdi
leaq 0x6858(%rip), %rsi      # 0xb1d5
xorl %eax, %eax
callq 0x3bdc
movq %rbx, %rdi
callq 0x388a
pushq $-0x1
popq %rax
movl %eax, %ecx
jmp 0x49f4
movslq 0x28(%rdi), %rdi
leaq 0x69a4(%rip), %rsi      # 0xb342
jmp 0x49ea
movq (%r15), %rax
movslq 0x28(%rax), %rdi
leaq 0x69bc(%rip), %rsi      # 0xb36a
jmp 0x49ea
movq (%r15), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r12), %rdx
leaq 0x693d(%rip), %rsi      # 0xb300
xorl %eax, %eax
callq 0x3bdc
jmp 0x49f1
movq (%r15), %rax
movslq 0x28(%rax), %rdi
leaq 0x67c2(%rip), %rsi      # 0xb19c
jmp 0x49ea
movq (%r15), %rax
movslq 0x28(%rax), %rdi
leaq 0x69b4(%rip), %rsi      # 0xb39e
xorl %eax, %eax
callq 0x3bdc
movl %r14d, %ecx
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq