LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/lexer.c
// Function: in_first
bool
in_first(lexer_t* lex, ...) {
    va_list args;
    va_start(args, lex);
    int token;
    while ((token = va_arg(args, int)) != -1) {
        if (token == peek_token(lex))
            { return (true); }
    }
    va_end(args);
    return (false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq -0xe0(%rbp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x3901
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %rdi, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, -0x30(%rbp)
movl -0x30(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x3933
movq %rcx, %rax
addq -0x20(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x30(%rbp)
jmp 0x393f
movq -0x28(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x28(%rbp)
movl (%rax), %r14d
cmpl $-0x1, %r14d
je 0x396c
testq %rbx, %rbx
je 0x3962
movl 0x4(%rbx), %eax
cmpl $-0x1, %eax
jne 0x3967
movq %rbx, %rdi
callq 0x32ce
movl %eax, 0x4(%rbx)
jmp 0x3967
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %eax, %r14d
jne 0x391b
cmpl $-0x1, %r14d
setne %al
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: round_up
size_t
round_up(size_t size) {
    size_t close2 = 1;
    while (close2 <= size)
        { close2 <<= 1; }
    return (close2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1, %ecx
movq %rcx, %rax
addq %rcx, %rcx
cmpq %rdi, %rax
jbe 0x3989
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: pmalloc
void*
_pmalloc(size_t size) {
    if (!size)
        { size = 1; }
    void* chunk = malloc(size);
#ifndef NDEBUG
    assert(chunk);
#else
    if (!chunk) {
        errorf(0, "No enough memory for this process.");
        errno = ENOMEM;
    }
#endif
    return (chunk);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x1, %rdi
adcq $0x0, %rdi
callq 0x2150
testq %rax, %rax
je 0x3a26
popq %rbp
retq
leaq 0x64f1(%rip), %rdi      # 0x9f1e
leaq 0x64bd(%rip), %rsi      # 0x9ef1
leaq 0x64c8(%rip), %rcx      # 0x9f03
movl $0xc8, %edx
callq 0x20b0
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: get_filename
char const*
get_filename(char const* path) {
    char const* last = path;
    while (*path) {
        if (*path++ == '/')
            { last = path; }
    }
    return (last);
}

// Assembly:
movq %rdi, %rax
movb (%rdi), %cl
testb %cl, %cl
je 0x3a67
pushq %rbp
movq %rsp, %rbp
leaq 0x1(%rax), %rdx
cmpb $0x2f, %cl
cmoveq %rdx, %rax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x3a56
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: readjust_index
void
readjust_index(vector_t* vect, size_t base, void(*dealloc)(void*)) {
    if (base >= SIZE_VECTOR(vect))
        { return; }
    (*dealloc)(AT_VECTOR(vect, base));
    erase_vector(vect, base);
    for (size_t i = base; i < SIZE_VECTOR(vect); ++i) {
        obj_index_t* obj = (obj_index_t*)AT_VECTOR(vect, i);
        --(obj->index);
    }
}

// Assembly:
cmpq %rsi, 0x10(%rdi)
jbe 0x3aae
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq (%rax,%rsi,8), %rdi
callq *%rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2c71
movq 0x10(%r14), %rax
cmpq %rbx, %rax
jbe 0x3aaa
movq (%r14), %rcx
movq (%rcx,%rbx,8), %rdx
decq (%rdx)
incq %rbx
cmpq %rbx, %rax
jne 0x3a9b
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: size_gen_list
size_t
size_gen_list(gen_list_t const* list) {
    size_t crt_size = 0;
    while (list) {
        ++crt_size;
        list = list->next;
    }
    return (crt_size);
}

// Assembly:
testq %rdi, %rdi
je 0x3afa
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
incq %rax
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x3aed
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: redirect_trans_list
void
redirect_trans_list(trans_list_t* list, int change, int base) {
    while (list) {
        if (list->state == base)
            { list->state = change; }
        else if (list->state > base)
            { --(list->state); }
        list = list->next;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x3b21
pushq %rbp
movq %rsp, %rbp
movl 0xc(%rdi), %eax
movl %esi, %ecx
cmpl %edx, %eax
je 0x3b15
jle 0x3b18
decl %eax
movl %eax, %ecx
movl %ecx, 0xc(%rdi)
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x3b06
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: del_node_trans_list
void
del_node_trans_list(trans_list_t** list, trans_list_t const* tnode) {
    if (!list || !*list || !tnode)
        { return; }

    if ((*list) == tnode)
        { (*list) = tnode->next; }
    else {
        trans_list_t* base = *list;
        while (base) {
            if (base->next == tnode) {
                base->next = tnode->next;
                break;
            }
            base = base->next;
        }
    }
    FREE(tnode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x3b69
movq (%rdi), %rax
testq %rax, %rax
sete %cl
testq %rsi, %rsi
sete %dl
orb %cl, %dl
jne 0x3b69
cmpq %rsi, %rax
je 0x3b6b
testq %rax, %rax
je 0x3b71
movq %rax, %rdi
movq (%rax), %rax
jmp 0x3b57
popq %rbp
retq
movq (%rsi), %rax
movq %rax, (%rdi)
movq %rsi, %rdi
popq %rbp
jmp 0x21d0
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: del_trans_list
void
del_trans_list(trans_list_t* list) {
    while (list) {
        trans_list_t* next = list->next;
        FREE(list);
        list = next;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x3b9b
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rbx
callq 0x21d0
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x3b85
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: trans_list_at
trans_list_t*
trans_list_at(trans_list_t* base, size_t at) {
    size_t count_index = 0;
    while (count_index < at) {
        if (!base)
            { return (NULL); }
        ++count_index;
        base = base->next;
    }
    return (base);
}

// Assembly:
movq %rdi, %rax
testq %rsi, %rsi
je 0x3bba
pushq %rbp
movq %rsp, %rbp
testq %rax, %rax
je 0x3bb7
movq (%rax), %rax
decq %rsi
jne 0x3ba8
jmp 0x3bb9
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: cmp_input_trans_list
int
cmp_input_trans_list(trans_list_t const* list, int input) {
    if (!list)
        { return (-1); }
    size_t count_index = 0;
    while (list) {
        if (list->input == input)
            { return (count_index); }
        ++count_index;
        list = list->next;
    }
    return (-1);
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x3bdf
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
cmpl %esi, 0x8(%rdi)
je 0x3bdc
incl %ecx
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x3bcb
jmp 0x3bde
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: cmp_trans_list
bool
cmp_trans_list(trans_list_t const* t1, trans_list_t const* t2) {
    while (t1 && t2) {
        if ((t1->input != t2->input) || (t1->state != t2->state))
            { return (false); }
        t1 = t1->next;
        t2 = t2->next;
    }
    return (!t1 && !t2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
setne %cl
movl %eax, %edx
andb %cl, %dl
cmpb $0x1, %dl
jne 0x3c22
movl 0x8(%rdi), %eax
cmpl 0x8(%rsi), %eax
jne 0x3c28
movl 0xc(%rdi), %eax
cmpl 0xc(%rsi), %eax
jne 0x3c28
movq (%rdi), %rdi
movq (%rsi), %rsi
testq %rsi, %rsi
setne %cl
testq %rdi, %rdi
setne %al
je 0x3c22
testq %rsi, %rsi
jne 0x3bf9
orb %cl, %al
xorb $0x1, %al
jmp 0x3c2a
xorl %eax, %eax
andb $0x1, %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: contiguous_range
trans_list_t const*
contiguous_range(trans_list_t const* t) {
    while (t && t->next) {
        if (((t->input - 1) != (t->next->input))
                || (t->state != t->next->state))
            { break;  }
        t = t->next;
    }
    return (t); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
testq %rdi, %rdi
je 0x3c54
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3c54
movl 0x8(%rax), %ecx
decl %ecx
cmpl 0x8(%rdi), %ecx
jne 0x3c54
movl 0xc(%rax), %ecx
cmpl 0xc(%rdi), %ecx
je 0x3c32
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: hash_str
size_t
hash_str(char const* str) {
    size_t posc = EOS;
    while (*str)
        { posc += *(str++); }
    return (posc);
}

// Assembly:
movb (%rdi), %cl
testb %cl, %cl
je 0x3c77
pushq %rbp
movq %rsp, %rbp
incq %rdi
xorl %eax, %eax
movsbq %cl, %rcx
addq %rcx, %rax
movb (%rdi), %cl
incq %rdi
testb %cl, %cl
jne 0x3c65
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: open_new_file
int
open_new_file(char const* path_name) {
    int filde = open(path_name, O_WRONLY | O_CREAT | O_EXCL, 0644);
    if ((filde == -1) && (EEXIST == errno))
        { filde = open(path_name, O_WRONLY | O_TRUNC); }
    return (filde);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xc1, %esi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x2180
cmpl $-0x1, %eax
jne 0x3cd8
callq 0x2050
movq %rax, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x11, (%rcx)
jne 0x3cd8
movq %rbx, %rdi
movl $0x201, %esi            # imm = 0x201
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2180
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/utils.c
// Function: prealloc
void*
_prealloc(void* ptr, size_t size) {
    if (!size) {
        FREE(ptr);
        return (NULL);
    }
    void* new_chunk = realloc(ptr, size);
#ifndef NDEBUG
    assert(new_chunk);
#else
    if (!chunck) {
        errorf(0, "The reallocation has failed.\n");
        errno = ENOMEM;
    }
#endif
    return (new_chunk);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rsi, %rsi
je 0x3d11
callq 0x2160
testq %rax, %rax
jne 0x3d18
leaq 0x6221(%rip), %rdi      # 0x9f1a
leaq 0x61f1(%rip), %rsi      # 0x9ef1
leaq 0x621d(%rip), %rcx      # 0x9f24
movl $0xda, %edx
callq 0x20b0
callq 0x21d0
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/gen.c
// Function: gen_include_macro
void
gen_include_macro(int filde, char const* header) {
    write(filde, SEP, 1);
    while (*header) {
        char c;
        if (isalnum(*header))
            { c = toupper(*header); }
        else
            { c = '_'; }    
        write(filde, &c, 1);
        ++header;
    }
    dprintf(filde, SEP HEADER_SUF SEP);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
leaq 0x61c1(%rip), %rsi      # 0x9f46
movl $0x1, %edx
callq 0x2080
movb (%r14), %r13b
testb %r13b, %r13b
je 0x3ddf
callq 0x21c0
movq %rax, %r15
incq %r14
leaq -0x29(%rbp), %r12
movq (%r15), %rcx
movsbq %r13b, %r13
movb $0x5f, %al
testb $0x8, (%rcx,%r13,2)
je 0x3dc2
callq 0x2030
movq (%rax), %rax
movb (%rax,%r13,4), %al
movb %al, -0x29(%rbp)
movl $0x1, %edx
movl %ebx, %edi
movq %r12, %rsi
callq 0x2080
movb (%r14), %r13b
incq %r14
testb %r13b, %r13b
jne 0x3da6
leaq 0x615e(%rip), %rsi      # 0x9f44
movl %ebx, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20f0
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/gen.c
// Function: gen_require_macro
void
gen_require_macro(int filde, char const* header) {
    dprintf(filde, "#ifndef ");
    gen_include_macro(filde, header);
    dprintf(filde, NL "#define ");
    gen_include_macro(filde, header);
    dprintf(filde, NL NL);
    dprintf(filde, INCLUDE_SYS(stdint.h) NL);
    dprintf(filde, INCLUDE_SYS(stdbool.h) NL NL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebx
leaq 0x6138(%rip), %rsi      # 0x9f48
xorl %eax, %eax
callq 0x20f0
movl %ebx, %edi
movq %r14, %rsi
callq 0x3d6b
leaq 0x6129(%rip), %rsi      # 0x9f51
movl %ebx, %edi
xorl %eax, %eax
callq 0x20f0
movl %ebx, %edi
movq %r14, %rsi
callq 0x3d6b
leaq 0x6b48(%rip), %rsi      # 0xa98a
movl %ebx, %edi
xorl %eax, %eax
callq 0x20f0
leaq 0x6109(%rip), %rsi      # 0x9f5b
movl %ebx, %edi
xorl %eax, %eax
callq 0x20f0
leaq 0x610e(%rip), %rsi      # 0x9f70
movl %ebx, %edi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x20f0
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/tools/src/gen.c
// Function: gen_verbatim_file
void
gen_verbatim_file(int filde, char const* header) {
    if (isdigit(*header))
        { write(filde, "_", 1); }
    while (*header && (isalnum(*header) || (*header == '_')))
        { write(filde, header++, 1); }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movl %edi, %ebx
callq 0x21c0
movq %rax, %r15
movq (%rax), %rcx
movsbq (%r14), %rax
testb $0x8, 0x1(%rcx,%rax,2)
je 0x3f16
leaq 0x606f(%rip), %rsi      # 0x9f46
movl $0x1, %edx
movl %ebx, %edi
callq 0x2080
movb (%r14), %al
jmp 0x3f16
cmpb $0x5f, %al
je 0x3efc
movq (%r15), %rcx
movsbq %al, %rax
movzwl (%rcx,%rax,2), %eax
andl $0x8, %eax
je 0x3f1a
leaq 0x1(%r14), %r12
movl $0x1, %edx
movl %ebx, %edi
movq %r14, %rsi
callq 0x2080
movb 0x1(%r14), %al
movq %r12, %r14
testb %al, %al
jne 0x3ee8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: new_cfg
cfg_t*
new_cfg(int filde) {
	cfg_t* cfg = NEW(cfg_t, 1);

	if (!cfg)
		{ return (NULL); }
	memset(cfg, 0, sizeof(cfg_t));

	cfg->miss_prod = true;
	cfg->productions = new_vector();
	cfg->non_terminal = new_vector();
	cfg->terminal = new_vector();
	cfg->token_file = new_vector();
	cfg->lex = new_lexer(filde);

	return (cfg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %r14d
movl $0x38, %edi
callq 0x3a0e
movq %rax, %rbx
testq %rax, %rax
je 0x42f5
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq $0x0, 0x30(%rbx)
movb $0x1, 0x30(%rbx)
callq 0x2aec
movq %rax, (%rbx)
callq 0x2aec
movq %rax, 0x8(%rbx)
callq 0x2aec
movq %rax, 0x10(%rbx)
callq 0x2aec
movq %rax, 0x18(%rbx)
movl %r14d, %edi
callq 0x3218
movq %rax, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: del_cfg
void
del_cfg(cfg_t* cfg) {
	if (cfg) {
		foreach_vector(cfg->non_terminal, &free_symbol);	
		del_vector(cfg->non_terminal);
		
		foreach_vector(cfg->terminal, &free_symbol);
		del_vector(cfg->terminal);
	
		foreach_vector(cfg->productions, &del_production);
		del_vector(cfg->productions);
	
		foreach_vector(cfg->token_file, &free);
		del_vector(cfg->token_file);

		del_lexer(cfg->lex);		
	}
	FREE(cfg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x4376
movq 0x8(%rbx), %rdi
leaq 0x6b(%rip), %r14        # 0x4382
movq %r14, %rsi
callq 0x2d75
movq 0x8(%rbx), %rdi
callq 0x2b8e
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x2d75
movq 0x10(%rbx), %rdi
callq 0x2b8e
movq (%rbx), %rdi
leaq 0x1415(%rip), %rsi      # 0x575c
callq 0x2d75
movq (%rbx), %rdi
callq 0x2b8e
movq 0x18(%rbx), %rdi
movq 0xac61(%rip), %rsi      # 0xefc0
callq 0x2d75
movq 0x18(%rbx), %rdi
callq 0x2b8e
movq 0x20(%rbx), %rdi
callq 0x327e
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x21d0
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: free_symbol
static void
free_symbol(symbol_t* sym) {
	if (sym) {
		FREE(sym->name);
		if (sym->kind == T_NON_TERMINAL) {
			del_bitset(sym->first);
			del_bitset(sym->follow);
			del_bitset(sym->prod_lst);
		}
		else if ((sym->kind == T_TERMINAL) && (sym->prec))
			{ FREE(sym->prec); }
		else if ((sym->kind == T_LITERAL) && (!sym->share_prec))
			{ FREE(sym->prec); }
	}
	FREE(sym);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x43e2
movq 0x10(%rbx), %rdi
callq 0x21d0
movl 0x8(%rbx), %eax
cmpl $0x2d, %eax
je 0x43d4
cmpl $0x28, %eax
je 0x43c8
cmpl $0x27, %eax
jne 0x43e2
movq 0x20(%rbx), %rdi
callq 0x2486
movq 0x28(%rbx), %rdi
callq 0x2486
movq 0x30(%rbx), %rdi
callq 0x2486
jmp 0x43e2
cmpb $0x0, 0x1c(%rbx)
jne 0x43e2
movq 0x20(%rbx), %rdi
jmp 0x43dd
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x43e2
callq 0x21d0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21d0
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: parse_cfg
cfg_t*
parse_cfg(int filde) {
	cfg_t* cfg = new_cfg(filde);
	if (cfg_section(cfg) == ERROR) {
		del_cfg(cfg);
		return (NULL);
	}
	return (cfg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
callq 0x4290
movq %rax, %rbx
movq 0x20(%rax), %rdi
callq 0x387a
cmpl $0x70, %eax
jne 0x442b
movq 0x20(%rbx), %rax
movslq 0x28(%rax), %rdi
leaq 0x5d0c(%rip), %rsi      # 0xa12b
xorl %eax, %eax
callq 0x22b9
jmp 0x44dc
leaq 0xa98e(%rip), %r14      # 0xedc0
movq 0x20(%rbx), %rdi
callq 0x32ce
addl $-0x65, %eax
cmpl $0x4, %eax
jae 0x4491
movl %eax, %eax
movq (%r14,%rax,8), %r15
movq 0x20(%rbx), %rdi
callq 0x32ce
cmpq $0x32, %rax
jne 0x44a9
movq %rbx, %rdi
callq *%r15
cmpl $-0x1, %eax
je 0x44d2
movq 0x20(%rbx), %rdi
callq 0x32ce
cmpq $0x33, %rax
jne 0x44b0
movq 0x20(%rbx), %rdi
callq 0x32ce
cmpq $0x30, %rax
jne 0x44b7
movq 0x20(%rbx), %rdi
callq 0x387a
cmpl $0x70, %eax
jne 0x4432
jmp 0x44dc
movq 0x20(%rbx), %rax
movslq 0x28(%rax), %rdi
leaq 0x5c97(%rip), %rsi      # 0xa137
xorl %eax, %eax
callq 0x3f24
jmp 0x44d2
movl $0x7b, %edx
jmp 0x44bc
movl $0x7d, %edx
jmp 0x44bc
movl $0x3b, %edx
movq 0x20(%rbx), %rax
movslq 0x28(%rax), %rdi
leaq 0x5c83(%rip), %rsi      # 0xa14e
xorl %eax, %eax
callq 0x3f24
movq %rbx, %rdi
callq 0x42fd
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: augment_grammar
void
augment_grammar(cfg_t* cfg) {
	if (!cfg)
		{ return; }

	symbol_t* start = add_symbol_cfg(cfg, T_NON_TERMINAL, "$START");
	start->is_defined = true;

	production_t* prod = new_production(start, cfg);
	ADD_BITSET(start->prod_lst, GET_INDEX(prod));

	add_symbol_rhs(prod, AT_VECTOR(cfg->non_terminal, cfg->goal));
	symbol_t* eof_symbol = add_symbol_cfg(cfg, T_TERMINAL, "EOF");

	eof_symbol->is_eof = true;
	add_symbol_rhs(prod, eof_symbol);

	cfg->goal = start->index;
}

// Assembly:
testq %rdi, %rdi
je 0x459e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5808(%rip), %rdx      # 0x9d0f
movl $0x27, %esi
callq 0x459f
movq %rax, %r14
movb $0x1, 0xc(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5708
movq %rax, %r15
movq (%rax), %rcx
movq 0x30(%r14), %rdi
movl 0x4(%rdi), %eax
cmpq %rax, %rcx
jae 0x454b
movl $0x1, %eax
shlq %cl, %rax
movq 0x8(%rdi), %rdx
shrq $0x6, %rcx
orq %rax, (%rdx,%rcx,8)
jmp 0x4553
movq %rcx, %rsi
callq 0x2570
movq 0x8(%rbx), %rax
movq 0x28(%rbx), %rcx
movq (%rax), %rax
movq (%rax,%rcx,8), %rsi
movq %r15, %rdi
callq 0x5799
leaq 0x5a84(%rip), %rdx      # 0x9ff5
movq %rbx, %rdi
movl $0x2d, %esi
callq 0x459f
movb $0x1, 0x18(%rax)
movq %r15, %rdi
movq %rax, %rsi
callq 0x5799
movq (%r14), %rax
movq %rax, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: add_symbol_cfg
static symbol_t*
add_symbol_cfg(cfg_t* cfg, int kind, char const* crt_lexeme) {
	vector_t* dest = (kind == T_NON_TERMINAL)
						? cfg->non_terminal : cfg->terminal;
	if (crt_lexeme) {
		int index = get_index_vector(dest, crt_lexeme, &cmp_symbol_name);
		if (index != -1)
			{ return ((symbol_t*)AT_VECTOR(dest, index)); }
	}

	symbol_t* symbol = NEW(symbol_t, 1);
	if (!symbol)
		{ return (NULL); }
	memset(symbol, 0, sizeof(*symbol));

	symbol->kind = kind;
	if (crt_lexeme)
		{ symbol->name = strdup(crt_lexeme); }

	int fail = 0;
	if (crt_lexeme && !symbol->name)
		{ fail = 1; }
	
	if (kind == T_LITERAL) 
		{ symbol->terminal_alias = -1; }
	else {
		symbol->is_used = true;
		if (kind == T_TERMINAL)
			{ symbol->is_defined = true; }
		else {
			symbol->prod_lst = new_bitset();
			if (!symbol->prod_lst)
				{ fail = 1; }
		}
	}

	if (fail) {
		free_symbol(symbol);
		return (NULL);
	}

/*
	if (kind == T_NON_TERMINAL)
		{ *strchr(sym->name, '>') = EOS; }

	//vector_t** dst = (kind == T_NON_TERMINAL)
	//? cfg->non_terminal : cfg->terminal;
	//size_t hs = hash_str(sym->name) % HASH_SIZE;
	//else
	//	{ FREE(sym); }
*/

	symbol->index = SIZE_VECTOR(dest);
	PUSH_BACK_VECTOR(dest, symbol);

	return (symbol);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r12
movl %esi, %r15d
xorl %eax, %eax
cmpl $0x27, %esi
setne %al
movq 0x8(%rdi,%rax,8), %rbx
testq %rdx, %rdx
je 0x45e7
leaq 0x4e3(%rip), %rdx       # 0x4aac
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2d05
cmpl $-0x1, %eax
je 0x45e7
movq (%rbx), %rcx
cltq
movq (%rcx,%rax,8), %r14
jmp 0x4694
movl $0x58, %edi
callq 0x3a0e
testq %rax, %rax
je 0x4691
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movq $0x0, 0x50(%rax)
movl %r15d, 0x8(%rax)
testq %r12, %r12
je 0x4639
movq %r12, %rdi
callq 0x21b0
movq %rax, 0x10(%r14)
testq %rax, %rax
setne %r12b
jmp 0x463c
movb $0x1, %r12b
cmpl $0x28, %r15d
jne 0x464c
movl $0xffffffff, 0x18(%r14) # imm = 0xFFFFFFFF
jmp 0x465c
movb $0x1, 0xd(%r14)
cmpl $0x2d, %r15d
jne 0x4675
movb $0x1, 0xc(%r14)
testb %r12b, %r12b
je 0x4689
movq 0x10(%rbx), %rsi
movq %rsi, (%r14)
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2be1
jmp 0x4694
callq 0x243c
movq %rax, 0x30(%r14)
testq %rax, %rax
setne %al
testb %r12b, %al
jne 0x4661
movq %r14, %rdi
callq 0x4382
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: cfg_sanity_check
int
cfg_sanity_check(cfg_t* cfg) {
	if (!cfg)
		{ return (ERROR); }
	else if (cfg->miss_prod) {
		errorf(0, "No production have been encounter at all.");
		return (ERROR);
	}
	else if (!SIZE_VECTOR(cfg->token_file)) {
		errorf(0, "At most one location of token must be defined.");
		return (ERROR);
	}
	else if (detect_bad_symbol(cfg) == ERROR)
		{ return (ERROR); }
	else if (preprocess_literal(cfg) == ERROR)
		{ return (ERROR); }

	if (unreachable_production(cfg) == ERROR)
		{ warnf(0, "Some unreachable nonterminal has been remove."); }

	check_mimic_prod(cfg);

	detect_nullable(cfg);
	compute_first(cfg);

	if (cfg_not_realizable(cfg) == ERROR)
		{ return (ERROR); }

	compute_follow(cfg);

	return (DONE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x475c
movq %rdi, %r14
cmpb $0x1, 0x30(%rdi)
jne 0x46ca
leaq 0x5934(%rip), %rsi      # 0x9ff9
jmp 0x4753
movq 0x18(%r14), %rax
cmpq $0x0, 0x10(%rax)
je 0x474c
movq 0x8(%r14), %rdi
callq 0x5669
cmpl $-0x1, %eax
je 0x475c
movq 0x10(%r14), %rdi
callq 0x5669
cmpl $-0x1, %eax
je 0x475c
movq %r14, %rdi
callq 0x58af
cmpl $-0x1, %eax
je 0x475c
movq %r14, %rdi
callq 0x5c0f
cmpl $-0x1, %eax
jne 0x471b
leaq 0x5940(%rip), %rsi      # 0xa052
xorl %edi, %edi
xorl %eax, %eax
callq 0x22b9
movq %r14, %rdi
callq 0x59cd
movq %r14, %rdi
callq 0x60c4
movq %r14, %rdi
callq 0x6130
movq %r14, %rdi
callq 0x5e1d
cmpl $-0x1, %eax
je 0x475c
movq %r14, %rdi
callq 0x6201
xorl %ebx, %ebx
jmp 0x475c
leaq 0x58d0(%rip), %rsi      # 0xa023
xorl %edi, %edi
xorl %eax, %eax
callq 0x3f24
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: print_terminal
void
print_terminal(cfg_t const* cfg) {
	puts("=== TERMINAL ===");
	for (size_t i = 0; i < SIZE_VECTOR(cfg->terminal); ++i) {
		printf("%s\n", ((symbol_t*)
			AT_VECTOR(cfg->terminal, i))->name);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x590c(%rip), %rdi      # 0xa080
callq 0x2060
movq 0x10(%rbx), %rax
cmpq $0x0, 0x10(%rax)
je 0x47a4
xorl %r14d, %r14d
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq 0x10(%rax), %rdi
callq 0x2060
incq %r14
movq 0x10(%rbx), %rax
cmpq 0x10(%rax), %r14
jb 0x4787
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: print_non_terminal
void
print_non_terminal(cfg_t const* cfg) {
	puts("=== NON_TERMINAL ===");
	for (size_t i = 0; i < SIZE_VECTOR(cfg->non_terminal); ++i) {
		printf("%s\n", ((symbol_t*)
			AT_VECTOR(cfg->non_terminal, i))->name);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x58d7(%rip), %rdi      # 0xa091
callq 0x2060
movq 0x8(%rbx), %rax
cmpq $0x0, 0x10(%rax)
je 0x47ea
xorl %r14d, %r14d
movq (%rax), %rax
movq (%rax,%r14,8), %rax
movq 0x10(%rax), %rdi
callq 0x2060
incq %r14
movq 0x8(%rbx), %rax
cmpq 0x10(%rax), %r14
jb 0x47cd
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: print_production
void
print_production(cfg_t const* cfg) {
	puts("=== PRODUCTION ===");
	for (size_t i = 0; i < SIZE_VECTOR(cfg->productions); ++i) {
		production_t* prod = AT_VECTOR(cfg->productions, i);
		printf("%s -> ", prod->symbol_lhs->name);
		list_rhs_t* list = prod->rhs_element;
		while (list) {
			printf("%s", list->symbol_rhs->name);
			if (list->next)
				{ printf(" "); }
			list = list->next;
		}
		puts("");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x589f(%rip), %rdi      # 0xa0a6
callq 0x2060
movq (%rbx), %rax
cmpq $0x0, 0x10(%rax)
je 0x4888
leaq 0x589c(%rip), %r14      # 0xa0b9
leaq 0x578e(%rip), %r15      # 0x9fb2
xorl %r12d, %r12d
movq (%rax), %rax
movq (%rax,%r12,8), %r13
movq 0x8(%r13), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x20a0
movq 0x10(%r13), %r13
testq %r13, %r13
je 0x4872
movq 0x8(%r13), %rax
movq 0x10(%rax), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x20a0
cmpq $0x0, (%r13)
je 0x4872
movl $0x20, %edi
callq 0x2040
movq (%r13), %r13
jmp 0x4844
movl $0xa, %edi
callq 0x2040
incq %r12
movq (%rbx), %rax
cmpq 0x10(%rax), %r12
jb 0x4827
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: print_nullable
void
print_nullable(cfg_t const* cfg) {
	puts("=== NULLABLE SYMBOL ===");
	for (size_t i = 0; i < SIZE_VECTOR(cfg->non_terminal); ++i) {
		symbol_t* non_terminal = AT_VECTOR(cfg->non_terminal, i);
		if (non_terminal->nullable)
			{ printf("%s is nullable.\n", non_terminal->name); }
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5815(%rip), %rdi      # 0xa0c0
callq 0x2060
movq 0x8(%rbx), %rax
cmpq $0x0, 0x10(%rax)
je 0x48ed
leaq 0x5816(%rip), %r14      # 0xa0d8
xorl %r15d, %r15d
movq (%rax), %rcx
movq (%rcx,%r15,8), %rcx
cmpb $0x1, 0x18(%rcx)
jne 0x48e4
movq 0x10(%rcx), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x20a0
movq 0x8(%rbx), %rax
incq %r15
cmpq 0x10(%rax), %r15
jb 0x48c5
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: print_first_set
void
print_first_set(cfg_t const* cfg) {
	puts("=== FIRST SET ===");
	for (size_t i = 0; i < SIZE_VECTOR(cfg->non_terminal); ++i) {
		symbol_t* non_terminal = AT_VECTOR(cfg->non_terminal, i);
		printf("FIRST(%s) = {", non_terminal->name);
		bool first = true;
		int j;
		while ((j = IT_NEXT(non_terminal->first)) != IT_NULL) {
			if (!first)
				{ printf(", "); }
			symbol_t* terminal = AT_VECTOR(cfg->terminal, j);
			printf("%s", terminal->name);
			first = false;
		}
		puts("}");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x57d9(%rip), %rdi      # 0xa0e9
callq 0x2060
movq 0x8(%rbx), %rax
cmpq $0x0, 0x10(%rax)
je 0x49c3
leaq 0x5687(%rip), %r12      # 0x9fb2
xorl %ecx, %ecx
movq (%rax), %rax
movq %rcx, -0x30(%rbp)
movq (%rax,%rcx,8), %r13
movq 0x10(%r13), %rsi
leaq 0x57b8(%rip), %rdi      # 0xa0fb
xorl %eax, %eax
callq 0x20a0
movq 0x20(%r13), %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x49a2
movl %eax, %r14d
movb $0x1, %r15b
testb $0x1, %r15b
jne 0x4972
leaq 0x61eb(%rip), %rdi      # 0xab56
xorl %eax, %eax
callq 0x20a0
movq 0x10(%rbx), %rax
movq (%rax), %rax
movslq %r14d, %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rsi
xorl %r15d, %r15d
movq %r12, %rdi
xorl %eax, %eax
callq 0x20a0
movq 0x20(%r13), %rdi
callq 0x28dc
movl %eax, %r14d
cmpl $-0x1, %eax
jne 0x495e
leaq 0x5a0b(%rip), %rdi      # 0xa3b4
callq 0x2060
movq -0x30(%rbp), %rcx
incq %rcx
movq 0x8(%rbx), %rax
cmpq 0x10(%rax), %rcx
jb 0x492d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: print_follow_set
void
print_follow_set(cfg_t const* cfg) {
	puts("=== FOLLOW SET ===");
	for (size_t i = 0; i < SIZE_VECTOR(cfg->non_terminal); ++i) {
		symbol_t* non_terminal = AT_VECTOR(cfg->non_terminal, i);
		printf("FOLLOW(%s) = {", non_terminal->name);
		bool first = true;
		int j;
		while ((j = IT_NEXT(non_terminal->follow)) != IT_NULL) {
			if (!first)
				{ printf(", "); }
			symbol_t* terminal = AT_VECTOR(cfg->terminal, j);
			printf("%s", terminal->name);
			first = false;
		}
		puts("}");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x571f(%rip), %rdi      # 0xa109
callq 0x2060
movq 0x8(%rbx), %rax
cmpq $0x0, 0x10(%rax)
je 0x4a9d
leaq 0x55ad(%rip), %r12      # 0x9fb2
xorl %ecx, %ecx
movq (%rax), %rax
movq %rcx, -0x30(%rbp)
movq (%rax,%rcx,8), %r13
movq 0x10(%r13), %rsi
leaq 0x56ff(%rip), %rdi      # 0xa11c
xorl %eax, %eax
callq 0x20a0
movq 0x28(%r13), %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x4a7c
movl %eax, %r14d
movb $0x1, %r15b
testb $0x1, %r15b
jne 0x4a4c
leaq 0x6111(%rip), %rdi      # 0xab56
xorl %eax, %eax
callq 0x20a0
movq 0x10(%rbx), %rax
movq (%rax), %rax
movslq %r14d, %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rsi
xorl %r15d, %r15d
movq %r12, %rdi
xorl %eax, %eax
callq 0x20a0
movq 0x28(%r13), %rdi
callq 0x28dc
movl %eax, %r14d
cmpl $-0x1, %eax
jne 0x4a38
leaq 0x5931(%rip), %rdi      # 0xa3b4
callq 0x2060
movq -0x30(%rbp), %rcx
incq %rcx
movq 0x8(%rbx), %rax
cmpq 0x10(%rax), %rcx
jb 0x4a07
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: cfg_path_list
int
cfg_path_list(cfg_t* cfg) {
	if (peek_token(cfg->lex) == T_RBRACE)
		{ return (DONE); }
	else if (advance_token(cfg->lex) == T_LITERAL) {
		unget_char_back_buffer(LAST_LEXEME(cfg->lex), 1);
		PUSH_BACK_VECTOR(cfg->token_file, strdup(C_LEXEME(cfg->lex) + 1));
		if (peek_token(cfg->lex) == T_COMMA) {
			advance_token(cfg->lex);
			return (cfg_path_list(cfg));
		}
	}
	else {
		errorf(CURRENT_LINE(cfg->lex),
						"Missing a literal in the $EXTERN section.");
		return (ERROR);
	}
	return (DONE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
callq 0x387a
xorl %ebx, %ebx
cmpl $0x33, %eax
je 0x4b6b
movq 0x20(%r14), %rdi
callq 0x32ce
movq 0x20(%r14), %rcx
cmpq $0x28, %rax
jne 0x4b54
movq 0x10(%rcx), %rdi
movl $0x1, %esi
callq 0x30b3
movq 0x18(%r14), %r15
movq 0x20(%r14), %rax
movq 0x10(%r15), %r12
movq 0x10(%rax), %rax
movq (%rax), %rdi
incq %rdi
callq 0x21b0
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x2be1
movq 0x20(%r14), %rdi
callq 0x387a
cmpl $0x31, %eax
jne 0x4b6b
movq 0x20(%r14), %rdi
callq 0x32ce
movq 0x20(%r14), %rdi
callq 0x387a
jmp 0x4adf
movslq 0x28(%rcx), %rdi
leaq 0x5613(%rip), %rsi      # 0xa172
xorl %eax, %eax
callq 0x3f24
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: cfg_production_list
int
cfg_production_list(cfg_t* cfg) {
	while (peek_token(cfg->lex) != T_RBRACE) {
		if (cfg_production(cfg) == ERROR)
			{ return (ERROR); }
		special_pos = 0;
	}
	return (DONE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x20(%rdi), %rdi
callq 0x387a
xorl %ebx, %ebx
cmpl $0x33, %eax
je 0x4e7c
leaq 0x5547(%rip), %r15      # 0xa2c3
movq 0x20(%r14), %rdi
callq 0x32ce
cmpq $0x27, %rax
jne 0x4e36
movq 0x20(%r14), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdx
movq %r14, %rdi
movl $0x27, %esi
callq 0x459f
movq %rax, %r12
movq 0x20(%r14), %rdi
callq 0x387a
movl %eax, %r13d
movq 0x20(%r14), %rdi
callq 0x32ce
cmpl $0x2e, %r13d
jne 0x4de5
movb $0x0, 0x30(%r14)
movb $0x1, 0xc(%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x5094
cmpl $-0x1, %eax
jne 0x4e01
jmp 0x4e77
movq 0x20(%r14), %rdi
testq %rax, %rax
jne 0x4e4a
callq 0x32ce
cmpq $0x6b, %rax
jne 0x4e5c
movq (%r12), %rax
movq %rax, 0x28(%r14)
movq 0x20(%r14), %rdi
callq 0x32ce
cmpq $0x30, %rax
jne 0x4e2f
movq $0x0, 0x18075(%rip) # 0x1ce90
movq 0x20(%r14), %rdi
callq 0x387a
cmpl $0x33, %eax
jne 0x4d7c
jmp 0x4e7c
leaq 0x5499(%rip), %r15      # 0xa2cf
movq 0x20(%r14), %rax
movslq 0x28(%rax), %rdi
leaq 0x548c(%rip), %rsi      # 0xa2d1
movq %r15, %rdx
jmp 0x4e70
movslq 0x28(%rdi), %rdi
movq 0x10(%r12), %rdx
leaq 0x54b2(%rip), %rsi      # 0xa30c
jmp 0x4e70
movq 0x20(%r14), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r12), %rdx
leaq 0x5480(%rip), %rsi      # 0xa2f0
xorl %eax, %eax
callq 0x3f24
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: cfg_rhs
int
cfg_rhs(cfg_t* cfg, symbol_t* lhs) {
	production_t* prod = new_production(lhs, cfg);
	ADD_BITSET(lhs->prod_lst, GET_INDEX(prod));

	if (!prod)
		{ return (ERROR); }
	else if ((cfg_opt_list(cfg, prod) == ERROR)
								|| (cfg_mimic(cfg, prod) == ERROR))
		{ return (ERROR); }
	while (peek_token(cfg->lex) == T_UNION) {
		advance_token(cfg->lex);

		prod = new_production(lhs, cfg);
		ADD_BITSET(lhs->prod_lst, GET_INDEX(prod));

		if (!prod)
			{ return (ERROR); }
		else if (cfg_opt_list(cfg, prod) == ERROR
									|| cfg_mimic(cfg, prod) == ERROR)
			{ return (ERROR); }
	}
	return (DONE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x5708
movq %rax, %r12
movq (%rax), %rcx
movq 0x30(%rbx), %rdi
movl 0x4(%rdi), %eax
cmpq %rax, %rcx
jae 0x50d8
movl $0x1, %eax
shlq %cl, %rax
movq 0x8(%rdi), %rdx
shrq $0x6, %rcx
orq %rax, (%rdx,%rcx,8)
jmp 0x50e0
movq %rcx, %rsi
callq 0x2570
movq %r14, %rdi
movq %r12, %rsi
callq 0x5174
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x5168
movq %r14, %rdi
movq %r12, %rsi
callq 0x528f
cmpl $-0x1, %eax
je 0x5168
movq 0x20(%r14), %rdi
callq 0x387a
cmpl $0x29, %eax
jne 0x5165
movq 0x20(%r14), %rdi
callq 0x32ce
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5708
movq %rax, %r12
movq (%rax), %rcx
movq 0x30(%rbx), %rdi
movl 0x4(%rdi), %eax
cmpq %rax, %rcx
jae 0x5150
movl $0x1, %eax
shlq %cl, %rax
movq 0x8(%rdi), %rdx
shrq $0x6, %rcx
orq %rax, (%rdx,%rcx,8)
jmp 0x5158
movq %rcx, %rsi
callq 0x2570
movq %r14, %rdi
movq %r12, %rsi
callq 0x5174
jmp 0x50f1
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: cfg_opt_list
int
cfg_opt_list(cfg_t* cfg, production_t* prod) {
	if (in_first(cfg->lex, T_LBRACK, T_LBRACE,
								T_NON_TERMINAL, T_TERMINAL, T_LITERAL, -1))
		{ return (cfg_list(cfg, prod)); }
	else if (peek_token(cfg->lex) == T_EMPTY)
		{ advance_token(cfg->lex); }
	else if (!in_first(cfg->lex, T_RBRACK, T_RBRACE, 
									T_LPAREN, T_UNION, T_SEMI, -1)) {
		errorf(CURRENT_LINE(cfg->lex),
					"An open paren, a pipe or a semicolon must follow"
					" the production %zu.", GET_INDEX(prod) + 1);
		return (ERROR);
	}
	return (DONE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x2a, %esi
movl $0x32, %edx
movl $0x27, %ecx
movl $0x2d, %r8d
movl $0x28, %r9d
xorl %eax, %eax
callq 0x38a8
testb %al, %al
je 0x5213
movq %r14, %rdi
movq %rbx, %rsi
callq 0x533a
cmpl $-0x1, %eax
je 0x527b
xorl %r15d, %r15d
movq 0x20(%r14), %rdi
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x2a, %esi
movl $0x32, %edx
movl $0x27, %ecx
movl $0x2d, %r8d
movl $0x28, %r9d
xorl %eax, %eax
callq 0x38a8
testb %al, %al
je 0x5281
movq %r14, %rdi
movq %rbx, %rsi
callq 0x533a
cmpl $-0x1, %eax
jne 0x51cc
jmp 0x527b
movq 0x20(%r14), %rdi
callq 0x387a
movq 0x20(%r14), %rdi
cmpl $0x6a, %eax
jne 0x522f
callq 0x32ce
xorl %r15d, %r15d
jmp 0x5281
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movl $0x2b, %esi
movl $0x33, %edx
movl $0x34, %ecx
movl $0x29, %r8d
movl $0x30, %r9d
xorl %eax, %eax
callq 0x38a8
testb %al, %al
jne 0x5281
movq 0x20(%r14), %rax
movslq 0x28(%rax), %rdi
movq (%rbx), %rdx
incq %rdx
leaq 0x50d9(%rip), %rsi      # 0xa34d
xorl %eax, %eax
callq 0x3f24
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: cfg_mimic
int
cfg_mimic(cfg_t* cfg, production_t* crt_prod) {
	if (peek_token(cfg->lex) != T_LPAREN)
		{ return (DONE); }

	advance_token(cfg->lex);

	if (advance_token(cfg->lex) != T_MIMIC) {
		return (ERROR);
		errorf(CURRENT_LINE(cfg->lex),
					"The directive $MIMIC must follow the open paren.");
	}

	int allow_kind = advance_token(cfg->lex);
	if ((allow_kind != T_TERMINAL) && (allow_kind != T_LITERAL)) {
		errorf(CURRENT_LINE(cfg->lex),
					"The directive $MIMIC must be followed by"
					" a token name or a literal.");
		return (ERROR);
	}

	crt_prod->mimic_sym = add_symbol_cfg(cfg, allow_kind, C_LEXEME(cfg->lex));
	crt_prod->mimic_sym->is_used = true;

	if (advance_token(cfg->lex) != T_RPAREN) {
		errorf(CURRENT_LINE(cfg->lex),
					"A close paren must follow the directive $MIMIC.");
		return (ERROR);
	}

	return (DONE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x387a
xorl %r14d, %r14d
cmpl $0x34, %eax
jne 0x532c
movq 0x20(%rbx), %rdi
callq 0x32ce
movq 0x20(%rbx), %rdi
callq 0x32ce
cmpq $0x69, %rax
jne 0x5326
movq 0x20(%rbx), %rdi
callq 0x32ce
cmpl $0x2d, %eax
je 0x52db
cmpl $0x28, %eax
jne 0x5310
movq 0x20(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx), %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x459f
movq %rax, 0x28(%r15)
movb $0x1, 0xd(%rax)
movq 0x20(%rbx), %rdi
callq 0x32ce
cmpq $0x35, %rax
je 0x532c
leaq 0x5209(%rip), %rsi      # 0xa517
jmp 0x5317
leaq 0x51bc(%rip), %rsi      # 0xa4d3
movq 0x20(%rbx), %rax
movslq 0x28(%rax), %rdi
xorl %eax, %eax
callq 0x3f24
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: cfg_unused_symbol
static int
cfg_unused_symbol(vector_t const* symbol_tab) {
	int unused = DONE;
	for (size_t i = 0; i < SIZE_VECTOR(symbol_tab); ++i) {
		symbol_t* symbol = (symbol_t*)AT_VECTOR(symbol_tab, i);
		if (!symbol->is_defined) {
			errorf(0, "The %s %s is used but not defined.",
								((IS_NON_TERMINAL(symbol))
								? "non terminal" : "literal"), symbol->name);
			unused = ERROR;
		}
		else if (!symbol->is_used) {
			warnf(0, "The symbol %s is defined but not used.",
							symbol->name);
		}
	}
	return (unused);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x10(%rdi)
je 0x56f1
movq %rdi, %rbx
leaq 0x4fd7(%rip), %r14      # 0xa65f
leaq 0x4fa0(%rip), %r15      # 0xa62f
xorl %r12d, %r12d
xorl %r13d, %r13d
movq (%rbx), %rax
movq (%rax,%r13,8), %rax
cmpb $0x0, 0xc(%rax)
je 0x56be
cmpb $0x0, 0xd(%rax)
jne 0x56e6
movq 0x10(%rax), %rdx
xorl %edi, %edi
leaq 0x4fb2(%rip), %rsi      # 0xa667
xorl %eax, %eax
callq 0x22b9
jmp 0x56e6
cmpl $0x27, 0x8(%rax)
movq %r14, %rdx
leaq 0x4f86(%rip), %rcx      # 0xa652
cmoveq %rcx, %rdx
movq 0x10(%rax), %rcx
xorl %edi, %edi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3f24
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
incq %r13
cmpq 0x10(%rbx), %r13
jb 0x5695
jmp 0x56f4
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg_production.c
// Function: new_production
production_t*
new_production(symbol_t* lhs, cfg_t const* cfg) {
	production_t* prod = NEW(production_t, 1);

	if (!prod)
		{ return (NULL); }
	memset(prod, 0, sizeof(production_t));

	prod->symbol_lhs = lhs;
	prod->index = SIZE_VECTOR(cfg->productions);
	PUSH_BACK_VECTOR(cfg->productions, prod);

	return (prod);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x30, %edi
callq 0x3a0e
movq %rax, %rbx
testq %rax, %rax
je 0x574e
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movq %r15, 0x8(%rbx)
movq (%r14), %rdi
movq 0x10(%rdi), %rsi
movq %rsi, (%rbx)
movq %rbx, %rdx
callq 0x2be1
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg_production.c
// Function: del_production
void
del_production(production_t* prod) {
	if (prod) {
		list_rhs_t* it_list = prod->rhs_element;
		while (it_list) {
			list_rhs_t* next = it_list->next;
			FREE(it_list);
			it_list = next;
		}
		del_bitset(prod->select_set);
	}
	FREE(prod);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x578d
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x5784
movq (%rdi), %r14
callq 0x21d0
movq %r14, %rdi
testq %r14, %r14
jne 0x5774
movq 0x18(%rbx), %rdi
callq 0x2486
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x21d0
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg_production.c
// Function: add_symbol_rhs
int
add_symbol_rhs(production_t* prod, symbol_t* symbol) {
	if (!prod)
		{ return (ERROR); }

	list_rhs_t* new_list = NEW(list_rhs_t, 1);
	if (!new_list)
		{ return (ERROR); }

	memset(new_list, 0, sizeof(list_rhs_t));
	new_list->pos = 1;
	new_list->symbol_rhs = symbol;

	if (!prod->rhs_element)
		{ prod->rhs_element = new_list; }
	else {
		list_rhs_t* crt_rhs = prod->rhs_element;
		while (crt_rhs->next) {
			crt_rhs = crt_rhs->next;
			++(new_list->pos);
		}
		crt_rhs->next = new_list;
	}
	return (DONE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x580d
movq %rsi, %r15
movq %rdi, %rbx
movl $0x18, %edi
callq 0x3a0e
testq %rax, %rax
je 0x580d
movq $0x0, (%rax)
movq $0x1, 0x10(%rax)
movq %r15, 0x8(%rax)
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x5800
movq (%rcx), %rdx
testq %rdx, %rdx
je 0x5807
movl $0x1, %esi
movq %rdx, %rcx
incq %rsi
movq (%rdx), %rdx
testq %rdx, %rdx
jne 0x57ec
movq %rsi, 0x10(%rax)
jmp 0x5807
addq $0x10, %rbx
movq %rbx, %rcx
movq %rax, (%rcx)
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg_production.c
// Function: add_symbol_rhs_front
int
add_symbol_rhs_front(production_t* prod, symbol_t* symbol) {
	if (!prod)
		{ return (ERROR); }

	list_rhs_t* new_list = NEW(list_rhs_t, 1);
	if (!new_list)
		{ return (ERROR); }

	memset(new_list, 0, sizeof(list_rhs_t));
	new_list->pos = 1;
	new_list->symbol_rhs = symbol;

	new_list->next = prod->rhs_element;
	prod->rhs_element = new_list;

	new_list = new_list->next;
	while (new_list) {
		++(new_list->pos);
		new_list = new_list->next;
	}

	return (DONE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x5872
movq %rsi, %r15
movq %rdi, %r14
movl $0x18, %edi
callq 0x3a0e
testq %rax, %rax
je 0x5872
movq $0x0, (%rax)
movq $0x1, 0x10(%rax)
movq %r15, 0x8(%rax)
movq 0x10(%r14), %rcx
movq %rcx, (%rax)
movq %rax, 0x10(%r14)
xorl %ebx, %ebx
testq %rcx, %rcx
je 0x5872
incq 0x10(%rcx)
movq (%rcx), %rcx
jmp 0x5864
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg_production.c
// Function: last_symbol_in_prod
symbol_t*
last_symbol_in_prod(production_t const* prod) {
	if (!prod)
		{ return (NULL); }
	symbol_t* last_ter = NULL;
	list_rhs_t* list = prod->rhs_element;
	while (list) {	
		if (IS_TERMINAL(list->symbol_rhs))
			{ last_ter = list->symbol_rhs; }
		list = list->next;
	}
	return (last_ter);
}

// Assembly:
testq %rdi, %rdi
je 0x58ac
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x58ac
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movq 0x8(%rcx), %rdx
movq (%rcx), %rsi
cmpl $0x2d, 0x8(%rdx)
cmoveq %rdx, %rax
movq %rsi, %rcx
testq %rsi, %rsi
jne 0x5893
popq %rbp
retq
xorl %eax, %eax
retq