// File: /workspace/github_c_makefile_star2_O0/MaoKo[P]FGFX/fgfl/src/lexical_spec.c
// Function: spec_token_entry_section
static int
spec_token_entry_section(lexical_spec_t* spec) {
    int kind = advance_token(spec->lex);
    int (*section_ptr)(lexical_spec_t*, int) = NULL;

    bool regex_list = false;
    switch (kind) {
        case T_TOKEN: case T_SKIP:
            section_ptr = &spec_regex_list;
            regex_list = true;
            break;

        case T_STATE: case T_KEYWORD:
            section_ptr = &spec_state_token_list;
            break;
    }

    if (!section_ptr) {
        errorf(CURRENT_LINE(spec->lex), "Bad section directive.");
        return (ERROR);
    }

    char miss_c;
    if ((miss_c = '{', advance_token(spec->lex) != T_LBRACE)
            || (miss_c = '\0', (*section_ptr)(spec, kind) == ERROR)
            || (miss_c = '}', advance_token(spec->lex) != T_RBRACE)
            || (miss_c = ';', advance_token(spec->lex) != T_SEMI)) {
        if (miss_c) {
            errorf(CURRENT_LINE(spec->lex),
                            "Missing a '%c' after the directive %s.",
                            miss_c, (regex_list) 
                            ? REGEX_LST_SECT(kind) : STATE_TYPE_LST_SECT(kind));
        }
        return (ERROR);
    }
    return (DONE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2cc0
movl %eax, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
addl $-0x40, %eax
subl $0x2, %eax
jb 0x4a24
jmp 0x4a17
movl -0x28(%rbp), %eax
addl $-0x42, %eax
subl $0x2, %eax
jb 0x4a35
jmp 0x4a40
leaq 0x695(%rip), %rax       # 0x50c0
movq %rax, -0x20(%rbp)
movb $0x1, -0x21(%rbp)
jmp 0x4a40
leaq 0x814(%rip), %rax       # 0x5250
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x4a6c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x28(%rax), %rdi
leaq 0x9a4a(%rip), %rsi      # 0xe4a3
movb $0x0, %al
callq 0x4230
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b49
movb $0x7b, -0x22(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2cc0
cmpq $0x32, %rax
jne 0x4ac4
movb $0x0, -0x22(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq *%rax
cmpl $-0x1, %eax
je 0x4ac4
movb $0x7d, -0x22(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2cc0
cmpq $0x33, %rax
jne 0x4ac4
movb $0x3b, -0x22(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2cc0
cmpq $0x30, %rax
je 0x4b42
cmpb $0x0, -0x22(%rbp)
je 0x4b39
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movsbl -0x22(%rbp), %eax
movl %eax, -0x2c(%rbp)
testb $0x1, -0x21(%rbp)
je 0x4b04
movl -0x14(%rbp), %edx
leaq 0x9558(%rip), %rax      # 0xe048
leaq 0x9557(%rip), %rcx      # 0xe04e
cmpl $0x41, %edx
cmoveq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x4b20
movl -0x14(%rbp), %edx
leaq 0x9547(%rip), %rax      # 0xe055
leaq 0x9549(%rip), %rcx      # 0xe05e
cmpl $0x43, %edx
cmoveq %rcx, %rax
movq %rax, -0x40(%rbp)
movl -0x2c(%rbp), %edx
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rcx
leaq 0x9988(%rip), %rsi      # 0xe4ba
movb $0x0, %al
callq 0x4230
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b49
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)