LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg_production.c
// Function: preprocess_literal
int
preprocess_literal(cfg_t const* cfg) {
	if (!cfg)
		{ return (ERROR); }

	int is_error = DONE;
	for (size_t i = 0; i < SIZE_VECTOR(cfg->terminal); ++i) {
		symbol_t* literal = (symbol_t*)AT_VECTOR(cfg->terminal, i);
		if (literal->kind == T_LITERAL) {
			symbol_t* ter = (symbol_t*)AT_VECTOR(cfg->terminal,
										literal->terminal_alias);
			if (!ter->prec) {
				literal->share_prec = true;
				ter->prec = literal->prec;
			}

			if (ter->prec != literal->prec) {
				errorf(0, "The terminal %s has %s alias with different"
							" precedence.", ter->name, literal->name);
				literal->share_prec = false;
				is_error = ERROR;
			}
		}
	}

	if (is_error == ERROR)
		{ return (ERROR); }
	
	for (size_t i = 0; i < SIZE_VECTOR(cfg->productions); ++i) {
		production_t* prod = (production_t*)AT_VECTOR(cfg->productions, i);
		if (prod->mimic_sym && (prod->mimic_sym->kind == T_LITERAL)) {
			prod->mimic_sym = (symbol_t*)AT_VECTOR(cfg->terminal,
											prod->mimic_sym->terminal_alias);
		}
		list_rhs_t* list = prod->rhs_element;
		while (list) {
			if (list->symbol_rhs->kind == T_LITERAL) {
				list->symbol_rhs = (symbol_t*)AT_VECTOR(cfg->terminal,
										list->symbol_rhs->terminal_alias);
			}
			list = list->next;
		}
	}
	return (DONE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x59bc
movq %rdi, %r14
movq 0x10(%rdi), %rax
cmpq $0x0, 0x10(%rax)
je 0x5956
xorl %ecx, %ecx
leaq 0x4dac(%rip), %r15      # 0xa68e
xorl %r12d, %r12d
movq (%rax), %rax
movq (%rax,%r12,8), %r13
cmpl $0x28, 0x8(%r13)
jne 0x5944
movslq 0x18(%r13), %rdx
movq (%rax,%rdx,8), %rax
movq 0x20(%rax), %rdx
testq %rdx, %rdx
je 0x5937
cmpq 0x20(%r13), %rdx
je 0x5944
movq 0x10(%rax), %rdx
movq 0x10(%r13), %rcx
xorl %edi, %edi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3f24
movb $0x0, 0x1c(%r13)
incq %r12
movq 0x10(%r14), %rax
movb $0x1, %cl
cmpq 0x10(%rax), %r12
jb 0x58e5
jmp 0x59bc
movb $0x1, 0x1c(%r13)
movq 0x20(%r13), %rdx
movq %rdx, 0x20(%rax)
incq %r12
movq 0x10(%r14), %rax
cmpq 0x10(%rax), %r12
jb 0x58e5
testb $0x1, %cl
jne 0x59bc
movq (%r14), %rdx
movq 0x10(%rdx), %rcx
testq %rcx, %rcx
je 0x59ba
movq (%rdx), %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
movq 0x28(%rdi), %r8
testq %r8, %r8
je 0x598a
cmpl $0x28, 0x8(%r8)
jne 0x598a
movq (%rax), %r9
movslq 0x18(%r8), %r8
movq (%r9,%r8,8), %r8
movq %r8, 0x28(%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x59b2
movq 0x8(%rdi), %r8
cmpl $0x28, 0x8(%r8)
jne 0x59ad
movq (%rax), %r9
movslq 0x18(%r8), %r8
movq (%r9,%r8,8), %r8
movq %r8, 0x8(%rdi)
movq (%rdi), %rdi
jmp 0x598e
incq %rsi
cmpq %rcx, %rsi
jne 0x5967
xorl %ebx, %ebx
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_production.c
// Function: check_mimic_prod
int
check_mimic_prod(cfg_t const* cfg) {
	if (!cfg)
		{ return (ERROR); }
	for (size_t i = 0; i < SIZE_VECTOR(cfg->productions); ++i) {
		production_t* prod = (production_t*)AT_VECTOR(cfg->productions, i);
		if (prod->mimic_sym) {
			if (!last_symbol_in_prod(prod)) {
				warnf(0, "The production %zu contain no terminal"
							" for the $MIMIC.", GET_INDEX(prod) + 1);
			}
			if (!prod->mimic_sym->prec) {
				warnf(0, "The precedence is not defined for the terminal %s.",
							prod->mimic_sym->name);
			}
		}
	}
	return (DONE);
}

// Assembly:
testq %rdi, %rdi
je 0x5a88
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
cmpq $0x0, 0x10(%rax)
je 0x5a77
leaq 0x4cca(%rip), %r14      # 0xa6c6
leaq 0x4cfa(%rip), %r15      # 0xa6fd
xorl %r12d, %r12d
movq (%rax), %rax
movq (%rax,%r12,8), %r13
movq 0x28(%r13), %rax
testq %rax, %rax
je 0x5a6b
movq 0x10(%r13), %rcx
testq %rcx, %rcx
je 0x5a3d
xorl %edx, %edx
movq 0x8(%rcx), %rsi
movq (%rcx), %rdi
cmpl $0x2d, 0x8(%rsi)
cmoveq %rsi, %rdx
movq %rdi, %rcx
testq %rdi, %rdi
jne 0x5a21
testq %rdx, %rdx
jne 0x5a54
movq (%r13), %rdx
incq %rdx
xorl %edi, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x22b9
movq 0x28(%r13), %rax
cmpq $0x0, 0x20(%rax)
jne 0x5a6b
movq 0x10(%rax), %rdx
xorl %edi, %edi
movq %r15, %rsi
xorl %eax, %eax
callq 0x22b9
incq %r12
movq (%rbx), %rax
cmpq 0x10(%rax), %r12
jb 0x5a06
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg_production.c
// Function: list_is_nullable
bool
list_is_nullable(list_rhs_t const* list) {
	if (!list)
		{ return (true); }
	while (list) {
		if (list->symbol_rhs->kind == T_TERMINAL)
			{ return (false); }
		else if (!list->symbol_rhs->nullable)
			{ return (false); }
		list = list->next;
	}
	return (true);
}

// Assembly:
movb $0x1, %al
testq %rdi, %rdi
je 0x5ab6
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rcx
cmpl $0x2d, 0x8(%rcx)
je 0x5ab3
cmpb $0x1, 0x18(%rcx)
jne 0x5ab3
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x5a99
jmp 0x5ab5
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg_production.c
// Function: first_list_rhs_t
bitset_t*
first_list_rhs_t(list_rhs_t const* list) {
	if (!list)
		{ return (NULL_BITSET); }
	bitset_t* select_set = new_bitset();
	while (list) {
		if (IS_TERMINAL(list->symbol_rhs)) {
			ADD_BITSET(select_set, GET_INDEX(list->symbol_rhs));
			break;
		}
		else {
			UNION_BITSET(select_set, list->symbol_rhs->first);
			if (!list->symbol_rhs->nullable)
				{ break; }
		}
		list = list->next;
	}
	return (select_set);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x5b2f
movq %rdi, %r14
callq 0x243c
movq %rax, %rbx
movq 0x8(%r14), %rax
cmpl $0x2d, 0x8(%rax)
je 0x5b33
movq 0x20(%rax), %rdx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x27b4
movq 0x8(%r14), %rax
cmpb $0x1, 0x18(%rax)
jne 0x5b5f
movq (%r14), %r14
testq %r14, %r14
jne 0x5b03
jmp 0x5b5f
xorl %ebx, %ebx
jmp 0x5b5f
movq (%rax), %rcx
movl 0x4(%rbx), %eax
cmpq %rax, %rcx
jae 0x5b54
movl $0x1, %eax
shlq %cl, %rax
movq 0x8(%rbx), %rdx
shrq $0x6, %rcx
orq %rax, (%rdx,%rcx,8)
jmp 0x5b5f
movq %rbx, %rdi
movq %rcx, %rsi
callq 0x2570
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg_production.c
// Function: match_symbol_production
list_rhs_t const*
match_symbol_production(list_rhs_t const* list, symbol_t const* symbol) {
	if (!list)
		{ return (NULL); }
	while (list) {
		if (list->symbol_rhs == symbol)
			{ return (list); }
		list = list->next;
	}
	return (NULL);
}

// Assembly:
testq %rdi, %rdi
je 0x5b9c
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
cmpq %rsi, 0x8(%rax)
je 0x5b9a
movq (%rax), %rax
testq %rax, %rax
jne 0x5b8a
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg_production.c
// Function: stack_production_lhs
vector_t*
stack_production_lhs(cfg_t const* cfg, symbol_t* nter) {
	if (!cfg)
		{ return (NULL); }
	vector_t* stack = new_vector();
	int i;
	while ((i = IT_NEXT(nter->prod_lst)) != IT_NULL)
		{ PUSH_BACK_VECTOR(stack, AT_VECTOR(cfg->productions, i)); }
	IT_RESET(nter->prod_lst);
	return (stack);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x5bff
movq %rsi, %r14
movq %rdi, %r15
callq 0x2aec
movq %rax, %rbx
movq 0x30(%r14), %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x5be4
movq 0x10(%rbx), %rsi
movq (%r15), %rcx
movq (%rcx), %rcx
cltq
movq (%rcx,%rax,8), %rdx
movq %rbx, %rdi
callq 0x2be1
jmp 0x5bbc
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x5c01
xorl %ecx, %ecx
cmpb $0x1, 0x54(%rax)
jne 0x5bfa
movl 0x4(%rax), %ecx
decl %ecx
movl %ecx, 0x50(%rax)
jmp 0x5c01
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_production.c
// Function: cfg_not_realizable
int
cfg_not_realizable(cfg_t const* cfg) {
	if (!cfg)
		{ return (ERROR); }

	precompute_realizable(cfg);

	int exit_status = DONE;
	for (size_t i = 0; i < SIZE_VECTOR(cfg->non_terminal) - 1; ++i) {
		symbol_t* symbol = AT_VECTOR(cfg->non_terminal, i);
		if (symbol->realizable)
			{ continue; }

		if ((is_empty_bitset(symbol->first)) && (!symbol->nullable))
			{ symbol->realizable = false; }
		else {
			bitset_t* nter_seen = new_bitset();
			nter_not_derive(cfg, symbol, nter_seen);
			del_bitset(nter_seen);
		}

		if (!symbol->realizable) {
			errorf(0, "Non terminal %s derive no string at all.",
									symbol->name);
			exit_status = ERROR;
		}
	}
	return (exit_status);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x5f18
movq %rdi, %rbx
movq (%rdi), %rcx
cmpq $0x0, 0x10(%rcx)
je 0x5e79
xorl %eax, %eax
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rcx
leaq 0x10(%rcx), %rdx
movq (%rdx), %rdx
testq %rdx, %rdx
je 0x5e64
movq 0x8(%rdx), %rsi
cmpl $0x2d, 0x8(%rsi)
je 0x5e4e
xorl %edx, %edx
jmp 0x5e66
movb $0x1, %dl
movq 0x8(%rcx), %rcx
movb %dl, 0x19(%rcx)
incq %rax
movq (%rbx), %rcx
cmpq 0x10(%rcx), %rax
jb 0x5e43
movq 0x8(%rbx), %rax
xorl %r15d, %r15d
cmpq $0x1, 0x10(%rax)
je 0x5f1e
xorl %r15d, %r15d
xorl %r14d, %r14d
movq (%rax), %rax
movq (%rax,%r14,8), %r12
cmpb $0x0, 0x19(%r12)
jne 0x5eff
movq 0x20(%r12), %rdi
callq 0x26fa
testb %al, %al
je 0x5eb6
cmpb $0x0, 0x18(%r12)
je 0x5ede
callq 0x243c
movq %rax, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x5f30
movq %r13, %rdi
callq 0x2486
testb $0x1, 0x19(%r12)
je 0x5ee4
jmp 0x5eff
movb $0x0, 0x19(%r12)
movq 0x10(%r12), %rdx
xorl %edi, %edi
leaq 0x48a4(%rip), %rsi      # 0xa796
xorl %eax, %eax
callq 0x3f24
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
incq %r14
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rcx
decq %rcx
cmpq %rcx, %r14
jb 0x5e91
jmp 0x5f1e
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r15d, %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_production.c
// Function: nter_not_derive
static bool
nter_not_derive(cfg_t const* cfg, symbol_t* symbol, bitset_t* nter_seen) {
	if (IS_PRESENT(nter_seen, GET_INDEX(symbol)) || symbol->realizable)
		{ return (symbol->realizable);  }

	ADD_BITSET(nter_seen, GET_INDEX(symbol));

	vector_t* stack_prod = stack_production_lhs(cfg, symbol);
	for (size_t i = 0; i < SIZE_VECTOR(stack_prod); ++i) {
		production_t* crt_prod = (production_t*)AT_VECTOR(stack_prod, i);
		list_rhs_t* list = crt_prod->rhs_element;

		bool seq_real = true;
		while (list) {
			symbol_t* crt_symbol = list->symbol_rhs;
			if (IS_NON_TERMINAL(crt_symbol))
				{ seq_real &= nter_not_derive(cfg, crt_symbol, nter_seen); }
			list = list->next;
		}

		if (seq_real) {
			symbol->realizable = seq_real;
			break;
		}
	}
	del_vector(stack_prod);
	return (symbol->realizable);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rdx, %rdx
je 0x5f6f
movq (%r15), %rax
movl 0x4(%rbx), %ecx
cmpq %rcx, %rax
jae 0x5f6f
movq 0x8(%rbx), %rcx
movq %rax, %rdx
shrq $0x6, %rdx
movq (%rcx,%rdx,8), %rcx
btq %rax, %rcx
jb 0x5f76
cmpb $0x1, 0x19(%r15)
jne 0x5f7f
addq $0x19, %r15
jmp 0x6029
movq (%r15), %rcx
movl 0x4(%rbx), %eax
cmpq %rax, %rcx
jae 0x5fa0
movl $0x1, %eax
shlq %cl, %rax
movq 0x8(%rbx), %rdx
shrq $0x6, %rcx
orq %rax, (%rdx,%rcx,8)
jmp 0x5fab
movq %rbx, %rdi
movq %rcx, %rsi
callq 0x2570
leaq 0x19(%r15), %rax
movq %rax, -0x30(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5b9f
movq %rax, %rdi
cmpq $0x0, 0x10(%rax)
je 0x6020
xorl %r13d, %r13d
movq %rdi, -0x38(%rbp)
movq (%rdi), %rax
movq (%rax,%r13,8), %rax
movq 0x10(%rax), %r12
testq %r12, %r12
je 0x6019
movb $0x1, %r15b
movq 0x8(%r12), %rsi
cmpl $0x27, 0x8(%rsi)
jne 0x5ffb
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5f30
andb %al, %r15b
movq (%r12), %r12
testq %r12, %r12
jne 0x5fe2
testb $0x1, %r15b
movq -0x38(%rbp), %rdi
jne 0x6019
incq %r13
cmpq 0x10(%rdi), %r13
jb 0x5fcf
jmp 0x6020
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
callq 0x2b8e
movq -0x30(%rbp), %r15
movb (%r15), %al
addq $0x18, %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_production.c
// Function: disjoint_select_set
bool
disjoint_select_set(cfg_t const* cfg, symbol_t* nter) {
	if (!cfg)
		{ return (true); }
	bool disjoint = true;
	vector_t* stack_prod = stack_production_lhs(cfg, nter);
	while (!EMPTY_VECTOR(stack_prod)) {
		production_t* prod = BACK_VECTOR(stack_prod);
		for (size_t j = 0; j < SIZE_VECTOR(stack_prod) - 1; ++j) {
			production_t* tmp_p = AT_VECTOR(stack_prod, j);
			if (!is_disjoint_bitset(prod->select_set, tmp_p->select_set)) {
				disjoint = false;
				break;
			}
		}
		if (!disjoint)
			{ break; }

		POP_BACK_VECTOR(stack_prod);	
	}

	del_vector(stack_prod);
	return (disjoint);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x60ab
callq 0x5b9f
movq %rax, %r14
movq 0x10(%rax), %rax
movb $0x1, %bl
testq %rax, %rax
je 0x60b1
cmpq $0x1, %rax
je 0x6096
movq (%r14), %rcx
movq -0x8(%rcx,%rax,8), %r15
xorl %r12d, %r12d
movq (%r14), %rax
movq (%rax,%r12,8), %rax
movq 0x18(%r15), %rdi
movq 0x18(%rax), %rsi
callq 0x29f0
testb %al, %al
je 0x60af
incq %r12
movq 0x10(%r14), %rax
decq %rax
cmpq %rax, %r12
jb 0x606f
movq 0x10(%r14), %rsi
decq %rsi
movq %r14, %rdi
callq 0x2c71
movq 0x10(%r14), %rax
jmp 0x6059
movb $0x1, %bl
jmp 0x60b9
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x2b8e
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_set_op.c
// Function: detect_nullable
void
detect_nullable(cfg_t* cfg) {
	if (!cfg)
		{ return; }
	bool change;
	do {
		change = false;
		for (size_t i = 0; i < SIZE_VECTOR(cfg->productions); ++i) {
			production_t* prod = (production_t*)
						AT_VECTOR(cfg->productions, i);
			if (!(prod->can_get_rid) && production_is_nullable(prod)) {
				change = prod->symbol_lhs->nullable = true;
				prod->can_get_rid = true;
			}
		}
	} while (change);
}

// Assembly:
testq %rdi, %rdi
je 0x612f
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x6127
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%rax), %rax
movq (%rax,%r12,8), %r14
cmpb $0x0, 0x20(%r14)
jne 0x6112
movq %r14, %rdi
callq 0x5ab7
testb %al, %al
je 0x6112
movq 0x8(%r14), %rax
movb $0x1, %r15b
movb %r15b, 0x18(%rax)
movb %r15b, 0x20(%r14)
incq %r12
movq (%rbx), %rax
movq 0x10(%rax), %rcx
cmpq %rcx, %r12
jb 0x60e9
testb $0x1, %r15b
jne 0x60de
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/cfg_set_op.c
// Function: compute_first
void
compute_first(cfg_t* cfg) {
	if (!cfg)
		{ return; }
	bool change;
	do {
		change = false;
		for (size_t i = 0; i < SIZE_VECTOR(cfg->productions); ++i) {
			production_t* prod = (production_t*)AT_VECTOR(cfg->productions, i);
			bitset_t* first = first_production(prod);
			if (!is_subset_bitset(prod->select_set, first)) {
				if (!prod->symbol_lhs->first)
					{ prod->symbol_lhs->first = new_bitset(); }
				if (!prod->select_set)
					{ prod->select_set = new_bitset(); }
				UNION_BITSET(prod->symbol_lhs->first, first);
				UNION_BITSET(prod->select_set, first);
				change = true;
			}
			del_bitset(first);
		}
	} while (change);
}

// Assembly:
testq %rdi, %rdi
je 0x6200
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x61f2
xorl %r13d, %r13d
xorl %r12d, %r12d
movq (%rax), %rax
movq (%rax,%r12,8), %r15
movq %r15, %rdi
callq 0x5b67
movq %rax, %r14
movq 0x18(%r15), %rdi
movq %rax, %rsi
callq 0x2979
testb %al, %al
jne 0x61cd
movq 0x8(%r15), %rax
cmpq $0x0, 0x20(%rax)
jne 0x619a
callq 0x243c
movq 0x8(%r15), %rcx
movq %rax, 0x20(%rcx)
cmpq $0x0, 0x18(%r15)
jne 0x61aa
callq 0x243c
movq %rax, 0x18(%r15)
movq 0x8(%r15), %rax
movq 0x20(%rax), %rsi
xorl %edi, %edi
movq %r14, %rdx
callq 0x27b4
movq 0x18(%r15), %rsi
xorl %edi, %edi
movq %r14, %rdx
callq 0x27b4
movb $0x1, %r13b
movq %r14, %rdi
callq 0x2486
incq %r12
movq (%rbx), %rax
movq 0x10(%rax), %rcx
cmpq %rcx, %r12
jb 0x6160
testb $0x1, %r13b
jne 0x6151
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_set_op.c
// Function: compute_follow
void
compute_follow(cfg_t* cfg) {
	if (!cfg)
		{ return; }
	bool change;
	do {
		change = false;
		for (size_t i = 0; i < SIZE_VECTOR(cfg->non_terminal); ++i) {
			if (follow_symbol(AT_VECTOR(cfg->non_terminal, i), cfg))
				{ change = true; }
		}
	} while (change);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, -0x38(%rbp)
testq %rdi, %rdi
je 0x63eb
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rcx
movq 0x10(%rcx), %rdx
testq %rdx, %rdx
je 0x63eb
movq -0x38(%rbp), %rax
movq (%rax), %rax
xorl %esi, %esi
xorl %edi, %edi
cmpq $0x0, 0x10(%rax)
je 0x63c9
movq %rdi, -0x40(%rbp)
movq (%rcx), %rcx
movq %rsi, -0x48(%rbp)
movq (%rcx,%rsi,8), %r14
movq $0x0, -0x30(%rbp)
xorl %ecx, %ecx
movq (%rax), %rax
movq %rcx, -0x50(%rbp)
movq (%rax,%rcx,8), %rbx
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x5b7e
testq %rax, %rax
je 0x63a5
movq (%rax), %r15
testq %r15, %r15
je 0x62f7
movq %r15, %r12
movq 0x8(%r12), %r13
cmpl $0x2d, 0x8(%r13)
je 0x6336
movq 0x28(%r14), %rdi
movq 0x20(%r13), %rsi
callq 0x2979
testb %al, %al
je 0x62bf
movq 0x8(%r12), %rax
cmpb $0x0, 0x18(%rax)
jne 0x62ee
jmp 0x639d
movq 0x28(%r14), %rsi
testq %rsi, %rsi
jne 0x62d4
callq 0x243c
movq %rax, %rsi
movq %rax, 0x28(%r14)
movq 0x20(%r13), %rdx
xorl %edi, %edi
callq 0x27b4
movq 0x8(%r12), %rax
cmpb $0x1, 0x18(%rax)
jne 0x6397
movq (%r12), %r12
testq %r12, %r12
jne 0x628e
movq 0x28(%r14), %rdi
movq 0x8(%rbx), %rax
movq 0x28(%rax), %rsi
callq 0x2979
testb %al, %al
jne 0x639d
movq 0x28(%r14), %rsi
testq %rsi, %rsi
jne 0x6325
callq 0x243c
movq %rax, %rsi
movq %rax, 0x28(%r14)
movq 0x8(%rbx), %rax
movq 0x28(%rax), %rdx
xorl %edi, %edi
callq 0x27b4
jmp 0x6397
movq (%r13), %r12
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x6362
movl 0x4(%rdi), %eax
cmpq %rax, %r12
jae 0x6371
movq 0x8(%rdi), %rcx
movq %r12, %rdx
shrq $0x6, %rdx
movq (%rcx,%rdx,8), %rcx
btq %r12, %rcx
jb 0x639d
jmp 0x6371
callq 0x243c
movq %rax, %rdi
movq %rax, 0x28(%r14)
movl 0x4(%rax), %eax
cmpq %r12, %rax
jbe 0x638f
movl $0x1, %eax
movl %r12d, %ecx
shlq %cl, %rax
movq 0x8(%rdi), %rcx
shrq $0x6, %r12
orq %rax, (%rcx,%r12,8)
jmp 0x6397
movq %r12, %rsi
callq 0x2570
movb $0x1, %al
movq %rax, -0x30(%rbp)
movq %r15, %rdi
jmp 0x6272
movq -0x50(%rbp), %rcx
incq %rcx
movq -0x38(%rbp), %rax
movq (%rax), %rax
cmpq 0x10(%rax), %rcx
jb 0x6263
movq -0x30(%rbp), %rdi
orb -0x40(%rbp), %dil
movq -0x48(%rbp), %rsi
incq %rsi
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x10(%rcx), %rdx
cmpq %rdx, %rsi
jb 0x623f
testb $0x1, %dil
jne 0x622b
addq $0x28, %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/ll.c
// Function: is_ll1
bool
is_ll1(cfg_t const* cfg) {
	bool disjoint = true;
	for (size_t i = 0; i < SIZE_VECTOR(cfg->non_terminal) - 1; ++i) {
		symbol_t* nter = (symbol_t*)AT_VECTOR(cfg->non_terminal, i);
		if (nter->nullable) {
			disjoint = is_disjoint_bitset(nter->first, nter->follow);
			if (!disjoint)
				{ break; }
		}
		disjoint = disjoint_select_set(cfg, nter);
		if (!disjoint)
			{ break; }
	}
	return (disjoint);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rdi), %rax
movb $0x1, %bl
cmpq $0x1, 0x10(%rax)
je 0x645f
movq %rdi, %r14
xorl %r12d, %r12d
movq (%rax), %rax
movq (%rax,%r12,8), %r15
cmpb $0x1, 0x18(%r15)
jne 0x6439
movq 0x20(%r15), %rdi
movq 0x28(%r15), %rsi
callq 0x29f0
testb %al, %al
je 0x645d
movq %r14, %rdi
movq %r15, %rsi
callq 0x603b
testb %al, %al
je 0x645d
incq %r12
movq 0x8(%r14), %rax
movq 0x10(%rax), %rcx
decq %rcx
cmpq %rcx, %r12
jb 0x641a
jmp 0x645f
xorl %ebx, %ebx
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/ll.c
// Function: build_ll1_table
vector_t*
build_ll1_table(cfg_t const* cfg) {
	vector_t* ll_table = new_vector();

	for (size_t i = 0; i < SIZE_VECTOR(cfg->non_terminal) - 1; ++i) {
		symbol_t* nter = AT_VECTOR(cfg->non_terminal, i);
		PUSH_BACK_VECTOR(ll_table, NULL_TRANS_LST);

		int j;
		while ((j = IT_NEXT(nter->prod_lst)) != IT_NULL) {
			production_t* prod = AT_VECTOR(cfg->productions, j);
			int k;
			while ((k = IT_NEXT(prod->select_set)) != IT_NULL) {
				trans_list_t* lst = new_trans_list(((symbol_t*)
									AT_VECTOR(cfg->terminal, k))->index,
									j, BACK_VECTOR(ll_table));
				BACK_VECTOR(ll_table) = lst;
			}

			IT_RESET(prod->select_set);

			if (!prod->can_get_rid)
				{ continue; }
			while ((k = IT_NEXT(prod->symbol_lhs->follow)) != IT_NULL) {
				trans_list_t* lst = new_trans_list(((symbol_t*)
								AT_VECTOR(cfg->terminal, k))->index,
								j, BACK_VECTOR(ll_table));
				lst->next = BACK_VECTOR(ll_table);
				BACK_VECTOR(ll_table) = lst;
			}
			IT_RESET(prod->symbol_lhs->follow);
		}
		IT_RESET(nter->prod_lst);
	}
	return (ll_table);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2aec
movq %rax, %r14
movq 0x8(%rbx), %rax
cmpq $0x1, 0x10(%rax)
je 0x65e4
xorl %edx, %edx
movq (%rax), %rax
movq %rdx, -0x30(%rbp)
movq (%rax,%rdx,8), %r13
movq 0x10(%r14), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x2be1
movq 0x30(%r13), %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x65b0
movl %eax, %r15d
movq (%rbx), %rax
movq (%rax), %rax
movslq %r15d, %rcx
movq (%rax,%rcx,8), %r12
movq 0x18(%r12), %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x650f
movq 0x10(%rbx), %rcx
movq (%rcx), %rcx
cltq
movq (%rcx,%rax,8), %rax
movl (%rax), %edi
movq (%r14), %rax
movq 0x10(%r14), %rcx
movq -0x8(%rax,%rcx,8), %rdx
movl %r15d, %esi
callq 0x3aaf
movq (%r14), %rcx
movq 0x10(%r14), %rdx
movq %rax, -0x8(%rcx,%rdx,8)
jmp 0x64cf
movq 0x18(%r12), %rax
testq %rax, %rax
je 0x6529
xorl %ecx, %ecx
cmpb $0x1, 0x54(%rax)
jne 0x6526
movl 0x4(%rax), %ecx
decl %ecx
movl %ecx, 0x50(%rax)
cmpb $0x1, 0x20(%r12)
jne 0x659b
movq 0x8(%r12), %rax
movq 0x28(%rax), %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x657d
movq 0x10(%rbx), %rcx
movq (%rcx), %rcx
cltq
movq (%rcx,%rax,8), %rax
movl (%rax), %edi
movq (%r14), %rax
movq 0x10(%r14), %rcx
movq -0x8(%rax,%rcx,8), %rdx
movl %r15d, %esi
callq 0x3aaf
movq (%r14), %rcx
movq 0x10(%r14), %rdx
movq -0x8(%rcx,%rdx,8), %rsi
movq %rsi, (%rax)
movq %rax, -0x8(%rcx,%rdx,8)
jmp 0x6531
movq 0x8(%r12), %rax
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x659b
xorl %ecx, %ecx
cmpb $0x1, 0x54(%rax)
jne 0x6598
movl 0x4(%rax), %ecx
decl %ecx
movl %ecx, 0x50(%rax)
movq 0x30(%r13), %rdi
callq 0x28dc
movl %eax, %r15d
cmpl $-0x1, %eax
jne 0x64c2
movq 0x30(%r13), %rax
testq %rax, %rax
movq -0x30(%rbp), %rdx
je 0x65cd
xorl %ecx, %ecx
cmpb $0x1, 0x54(%rax)
jne 0x65ca
movl 0x4(%rax), %ecx
decl %ecx
movl %ecx, 0x50(%rax)
incq %rdx
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rcx
decq %rcx
cmpq %rcx, %rdx
jb 0x6494
movq %r14, %rax
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/lr.c
// Function: del_lr1_state
void
del_lr1_state(lr1_state_t* state) {
	if (state) {
		del_bitset(state->items);
		del_trans_list(state->shift_lst);
		del_trans_list(state->goto_lst);
		del_trans_list(state->reduces);
		del_bitset(state->equiv_state);
	}
	FREE(state);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x6632
movq (%rbx), %rdi
callq 0x2486
movq 0x10(%rbx), %rdi
callq 0x3b7a
movq 0x18(%rbx), %rdi
callq 0x3b7a
movq 0x20(%rbx), %rdi
callq 0x3b7a
movq 0x40(%rbx), %rdi
callq 0x2486
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21d0
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/lr.c
// Function: cmp_lr0_state
int
cmp_lr0_state(bitset_t* s1, bitset_t* s2) {
	if (count_elt_bitset(s1) != count_elt_bitset(s2))
		{ return (1); }

	int back = IT_BACK(s1);
	IT_RESET(s1);

	int eq = 0;
	int i;

	while ((i = IT_NEXT(s1)) != IT_NULL) {
		lr1_item_t* lr1 = (lr1_item_t*)AT_VECTOR(record_lr1_item, i);
		if (check_exist_lr0_item(s2, lr1) == -1) {
			eq = 1;
			break;
		}
	}

	IT_SET(s1, back);
	return (eq);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2a48
movq %rax, %r12
movq %r14, %rdi
callq 0x2a48
movl $0x1, %r15d
cmpq %rax, %r12
jne 0x6717
xorl %r15d, %r15d
cmpb $0x1, 0x54(%rbx)
movl $0x0, %eax
jne 0x6686
movl 0x4(%rbx), %eax
decl %eax
movl 0x50(%rbx), %r12d
movl %eax, 0x50(%rbx)
movq %rbx, %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x6713
xorl %ecx, %ecx
cmpb $0x1, 0x54(%r14)
jne 0x66a9
movl 0x4(%r14), %ecx
decl %ecx
movq 0x167f0(%rip), %rdx     # 0x1cea0
movq (%rdx), %rdx
cltq
movq (%rdx,%rax,8), %r13
movl 0x50(%r14), %r15d
movl %ecx, 0x50(%r14)
movq %r14, %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x6709
movq 0x167cb(%rip), %rcx     # 0x1cea0
movq (%rcx), %rcx
cltq
movq (%rcx,%rax,8), %rax
movq 0x8(%rax), %rax
movq 0x8(%r13), %rcx
movq (%rax), %rdx
cmpq (%rcx), %rdx
jne 0x66c1
movq 0x8(%rax), %rax
cmpq 0x8(%rcx), %rax
jne 0x66c1
movl %r15d, 0x50(%r14)
movq %rbx, %rdi
callq 0x28dc
xorl %r15d, %r15d
jmp 0x6695
movl %r15d, 0x50(%r14)
movl $0x1, %r15d
movl %r12d, 0x50(%rbx)
movl %r15d, %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/lr.c
// Function: new_lr1_item_record
static size_t
new_lr1_item_record(lr1_item_t* item) {
	if (!item)
		{ return (ERROR); }

	int index = get_index_vector(record_lr1_item, item, &cmp_lr1_item);
	if (index != -1) {
		del_lr1_item(item);
		return (index);
	}

	item->index = SIZE_VECTOR(record_lr1_item);
	PUSH_BACK_VECTOR(record_lr1_item, item);

	return (GET_INDEX(item));
}

// Assembly:
testq %rdi, %rdi
je 0x685e
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x1666f(%rip), %rdi     # 0x1cea0
leaq 0x15b5(%rip), %rdx      # 0x7ded
movq %rbx, %rsi
callq 0x2d05
cmpl $-0x1, %eax
je 0x6866
movl %eax, %r14d
movq 0x10(%rbx), %rdi
callq 0x2486
movq %rbx, %rdi
callq 0x21d0
movslq %r14d, %rax
jmp 0x687f
movq $-0x1, %rax
retq
movq 0x16633(%rip), %rdi     # 0x1cea0
movq 0x10(%rdi), %rsi
movq %rsi, (%rbx)
movq %rbx, %rdx
callq 0x2be1
movq (%rbx), %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/lr.c
// Function: merge_lr1_state
bool
merge_lr1_state(lr1_state_t* st1, lr1_state_t* st2) {
	if (!st1 || !st2)
		{ return (false); }

	if (st1->hash_items != st2->hash_items
			|| cmp_lr0_state(st1->items, st2->items))
		{ return (false); }

	bitset_t* new_item = new_bitset();
	int i;

	while ((i = IT_NEXT(st1->items)) != IT_NULL) {
		lr1_item_t* st1_item = (lr1_item_t*)AT_VECTOR(record_lr1_item, i);
		int j;
		while ((j = IT_NEXT(st2->items)) != IT_NULL) {
			lr1_item_t* st2_item = (lr1_item_t*)AT_VECTOR(record_lr1_item, j);
			if (!cmp_lr0_item(CORE(st1_item), CORE(st2_item))) {
				int index_new_item = merge_lr1_item(st1_item, st2_item);
				if (index_new_item != ERROR)
					{ ADD_BITSET(new_item, (size_t)index_new_item); }
				break;
			}
		}
		IT_RESET(st2->items);
	}
	IT_RESET(st1->items);

	if (eq_bitset(st1->items, new_item)) {
		del_bitset(new_item);
		return (false);
	}

	del_bitset(st1->items);
	st1->items = new_item;

	return (true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x68be
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rax
cmpq 0x8(%rsi), %rax
jne 0x68be
movq (%rbx), %rdi
movq (%r15), %rsi
callq 0x6640
testl %eax, %eax
je 0x68cd
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x243c
movq %rax, %r14
movq (%rbx), %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x6989
movq 0x165b3(%rip), %rcx     # 0x1cea0
movq (%rcx), %rcx
cltq
movq (%rcx,%rax,8), %r12
movq (%r15), %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x6968
movq 0x16596(%rip), %rcx     # 0x1cea0
movq (%rcx), %rcx
cltq
movq (%rcx,%rax,8), %rsi
movq 0x8(%r12), %rax
movq 0x8(%rsi), %rcx
movq (%rax), %rdx
cmpq (%rcx), %rdx
jne 0x68f6
movq 0x8(%rax), %rax
cmpq 0x8(%rcx), %rax
jne 0x68f6
movq %r12, %rdi
callq 0x69ce
cmpl $-0x1, %eax
je 0x6968
movslq %eax, %rcx
movl 0x4(%r14), %eax
cmpq %rax, %rcx
jae 0x695d
movl $0x1, %eax
shlq %cl, %rax
movq 0x8(%r14), %rdx
shrq $0x6, %rcx
orq %rax, (%rdx,%rcx,8)
jmp 0x6968
movq %r14, %rdi
movq %rcx, %rsi
callq 0x2570
movq (%r15), %rax
testq %rax, %rax
je 0x68d5
xorl %ecx, %ecx
cmpb $0x1, 0x54(%rax)
jne 0x6981
movl 0x4(%rax), %ecx
decl %ecx
movl %ecx, 0x50(%rax)
jmp 0x68d5
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x69a1
xorl %eax, %eax
cmpb $0x1, 0x54(%rdi)
jne 0x699e
movl 0x4(%rdi), %eax
decl %eax
movl %eax, 0x50(%rdi)
movq %r14, %rsi
callq 0x272e
movl %eax, %r15d
testb %al, %al
je 0x69ba
movq %r14, %rdi
callq 0x2486
jmp 0x69c5
movq (%rbx), %rdi
callq 0x2486
movq %r14, (%rbx)
xorb $0x1, %r15b
jmp 0x68c1
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/lr.c
// Function: merge_lr1_item
static int
merge_lr1_item(lr1_item_t const* llr, lr1_item_t const* rlr) {
	if (cmp_lr0_item(CORE(llr), CORE(rlr)))
		{ return (ERROR); }

	if (is_subset_bitset(llr->lookahead, rlr->lookahead))
		{ return (GET_INDEX(llr)); }
	else if (is_subset_bitset(rlr->lookahead, llr->lookahead))
		{ return (GET_INDEX(rlr)); }

	bitset_t* new_look = dup_bitset(llr->lookahead);
	UNION_BITSET(new_look, rlr->lookahead);

	size_t index = new_lr1_item(PROD(CORE(llr)), DOT(CORE(llr)), new_look);

	del_bitset(new_look);
	return (index);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq 0x8(%rdi), %rcx
movq 0x8(%rsi), %rdx
movq (%rcx), %rsi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq (%rdx), %rsi
jne 0x6a61
movq 0x8(%rcx), %rcx
cmpq 0x8(%rdx), %rcx
jne 0x6a61
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x10(%r14), %rsi
callq 0x2979
testb %al, %al
je 0x6a12
movl (%rbx), %eax
jmp 0x6a61
movq 0x10(%r14), %rdi
movq 0x10(%rbx), %rsi
callq 0x2979
testb %al, %al
je 0x6a28
movl (%r14), %eax
jmp 0x6a61
movq 0x10(%rbx), %rdi
callq 0x24b4
movq %rax, %r15
movq 0x10(%r14), %rdx
xorl %edi, %edi
movq %rax, %rsi
callq 0x27b4
movq 0x8(%rbx), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq %r15, %rdx
callq 0x67ee
movl %eax, %ebx
movq %r15, %rdi
callq 0x2486
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/lr.c
// Function: goto_lr
bitset_t*
goto_lr(cfg_t const* cfg, bitset_t* item_set, symbol_t const* match_symbol) {
	if (!item_set || !match_symbol)
		{ return (NULL_BITSET); }

	bitset_t* goto_lr_state = new_bitset();

	int i = 0;
	while ((i = IT_NEXT(item_set)) != IT_NULL) {
		lr1_item_t* crt_item = (lr1_item_t*)AT_VECTOR(record_lr1_item, i);
		if (DOT(CORE(crt_item))
					&& (DOT(CORE(crt_item))->symbol_rhs == match_symbol)) {

			int index_item = new_lr1_item(PROD(CORE(crt_item)),
						DOT(CORE(crt_item))->next, crt_item->lookahead);

			if (index_item != ERROR)
				{ ADD_BITSET(goto_lr_state, (size_t)index_item); }
		}
	}

	IT_RESET(item_set);

	if (is_empty_bitset(goto_lr_state)) {
		del_bitset(goto_lr_state);
		return (NULL_BITSET);
	}

	return (closure(cfg, goto_lr_state));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
jne 0x7235
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
callq 0x243c
movq %rax, %r15
movq %r14, %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x720e
movq 0x15cf1(%rip), %rcx     # 0x1cea0
movq (%rcx), %rcx
cltq
movq (%rcx,%rax,8), %rax
movq 0x8(%rax), %rcx
movq 0x8(%rcx), %rdx
testq %rdx, %rdx
je 0x719b
cmpq %r12, 0x8(%rdx)
jne 0x719b
movq (%rcx), %rdi
movq (%rdx), %rsi
movq 0x10(%rax), %rdx
callq 0x67ee
cmpl $-0x1, %eax
je 0x719b
movslq %eax, %rcx
movl 0x4(%r15), %eax
cmpq %rax, %rcx
jae 0x7201
movl $0x1, %eax
shlq %cl, %rax
movq 0x8(%r15), %rdx
shrq $0x6, %rcx
orq %rax, (%rdx,%rcx,8)
jmp 0x719b
movq %r15, %rdi
movq %rcx, %rsi
callq 0x2570
jmp 0x719b
xorl %eax, %eax
cmpb $0x1, 0x54(%r14)
jne 0x721d
movl 0x4(%r14), %eax
decl %eax
movl %eax, 0x50(%r14)
movq %r15, %rdi
callq 0x26fa
testb %al, %al
je 0x7240
movq %r15, %rdi
callq 0x2486
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6a6c
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/lr.c
// Function: new_lr1_state
static lr1_state_t*
new_lr1_state(bitset_t* item) {
	lr1_state_t* state = NEW(lr1_state_t, 1);
	if (!state)
		{ return (NULL); }

	memset(state, 0, sizeof(lr1_state_t));

	state->items = item;
	state->hash_items = hash_lr1_item(item);
	state->first_reach = true;

	return (state);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x48, %edi
callq 0x3a0e
movq %rax, %rbx
testq %rax, %rax
je 0x75d6
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x8(%rbx)
movq %r14, (%rbx)
movq %r14, %rdi
callq 0x75de
movq %rax, 0x8(%rbx)
movb $0x1, 0x38(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/lr.c
// Function: hash_lr1_item
static size_t
hash_lr1_item(bitset_t* item_set) {
	if (!item_set)
		{ return (0); }

	size_t hash = 0;
	int i;

	while ((i = IT_NEXT(item_set)) != IT_NULL) {
		lr1_item_t* crt_item = (lr1_item_t*)AT_VECTOR(record_lr1_item, i);
		hash += hash_lr0_item(PROD(CORE(crt_item)), DOT(CORE(crt_item)));
	}

	IT_RESET(item_set);
	return (hash % HASH_LR);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x7681
movq %rdi, %rbx
callq 0x28dc
xorl %r15d, %r15d
xorl %r14d, %r14d
cmpl $-0x1, %eax
je 0x766e
movabsq $-0x5c28f5c28f5c28f5, %r12 # imm = 0xA3D70A3D70A3D70B
movq 0x1588a(%rip), %rcx     # 0x1cea0
movq (%rcx), %rcx
cltq
movq (%rcx,%rax,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq (%rcx), %rcx
testq %rax, %rax
je 0x7636
addq 0x10(%rax), %rcx
movq %rcx, %rax
shrq %rax
mulq %r12
shrq $0x4, %rdx
imulq $0x32, %rdx, %rax
subq %rax, %rcx
addq %rcx, %r14
movq %rbx, %rdi
callq 0x28dc
cmpl $-0x1, %eax
jne 0x760f
movq %r14, %rax
shrq %rax
mulq %r12
shrq $0x4, %rdx
imulq $0x32, %rdx, %rax
subq %rax, %r14
cmpb $0x1, 0x54(%rbx)
jne 0x767b
movl 0x4(%rbx), %r15d
decl %r15d
movl %r15d, 0x50(%rbx)
jmp 0x7684
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/lr.c
// Function: compute_reduce_op
void 
compute_reduce_op(cfg_t const* cfg, vector_t* lr1_states) {
	if (!cfg || !lr1_states)
		{ return; }

	for (size_t i = 0; i < SIZE_VECTOR(lr1_states); ++i) {
		lr1_state_t* state = (lr1_state_t*)AT_VECTOR(lr1_states, i);
		int j;
		while ((j = IT_NEXT(state->items)) != IT_NULL) {
			lr1_item_t* item = (lr1_item_t*)AT_VECTOR(record_lr1_item, j);
			if (CORE(item)->is_final)
				{ add_reduce_lr1(cfg, state, item, i); }
		}
		IT_RESET(state->items);
	}
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x7a1c
cmpq $0x0, 0x10(%rsi)
je 0x7a1c
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl $0x4000, %ebx           # imm = 0x4000
xorl %r13d, %r13d
movq %rsi, -0x38(%rbp)
movq %rdi, -0x40(%rbp)
movq (%rsi), %rax
movq (%rax,%r13,8), %r12
movq (%r12), %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x79e4
movq %r13, -0x48(%rbp)
movq 0x155b1(%rip), %rcx     # 0x1cea0
movq (%rcx), %rcx
cltq
movq (%rcx,%rax,8), %r14
movq 0x8(%r14), %rax
cmpb $0x1, 0x10(%rax)
jne 0x79d2
movq 0x10(%r14), %r13
movq %r13, %rdi
callq 0x28dc
xorl %r15d, %r15d
cmpl $-0x1, %eax
je 0x793c
movq 0x8(%r14), %rcx
movq (%rcx), %rcx
movl (%rcx), %esi
orl %ebx, %esi
movl %eax, %edi
movq %r15, %rdx
callq 0x3aaf
movq %rax, %r15
movq %r13, %rdi
callq 0x28dc
jmp 0x7915
testq %r13, %r13
je 0x7954
xorl %eax, %eax
cmpb $0x1, 0x54(%r13)
jne 0x7950
movl 0x4(%r13), %eax
decl %eax
movl %eax, 0x50(%r13)
movq %r15, -0x30(%rbp)
movq -0x40(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
leaq -0x30(%rbp), %r14
movq %r14, %rdx
movl $0x1, %ecx
callq 0x7690
testb %al, %al
movq -0x48(%rbp), %r13
je 0x798e
xorl %edi, %edi
leaq 0x2e8f(%rip), %rsi      # 0xa813
movq %r13, %rdx
xorl %eax, %eax
callq 0x22b9
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movl $0x2, %ecx
callq 0x7690
testb %al, %al
je 0x79b8
xorl %edi, %edi
leaq 0x2e7f(%rip), %rsi      # 0xa82d
movq %r13, %rdx
xorl %eax, %eax
callq 0x22b9
movq 0x20(%r12), %rdi
movq -0x30(%rbp), %rsi
testq %rdi, %rdi
je 0x79cd
callq 0x3b22
jmp 0x79d2
movq %rsi, 0x20(%r12)
movq (%r12), %rdi
callq 0x28dc
cmpl $-0x1, %eax
jne 0x78e8
movq (%r12), %rax
testq %rax, %rax
movq -0x38(%rbp), %rsi
je 0x7a01
xorl %ecx, %ecx
cmpb $0x1, 0x54(%rax)
jne 0x79fe
movl 0x4(%rax), %ecx
decl %ecx
movl %ecx, 0x50(%rax)
incq %r13
cmpq 0x10(%rsi), %r13
jb 0x78cb
addq $0x28, %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/lr.c
// Function: print_lr0_item
void
print_lr0_item(lr0_item_t* lr0_item) {
	printf("%s -> ", PROD(lr0_item)->symbol_lhs->name);
	list_rhs_t* list = PROD(lr0_item)->rhs_element;
	while (list) {
		if (list == DOT(lr0_item))
			{ printf(". "); }
		printf("%s", list->symbol_rhs->name);
		if (list->next)
			{ printf(" "); }
		list = list->next;
	}
	if (lr0_item->is_final) {
		if (PROD(lr0_item)->rhs_element)
			{ printf(" "); }
		printf(".");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rsi
leaq 0x267c(%rip), %rdi      # 0xa0b9
xorl %eax, %eax
callq 0x20a0
movq (%rbx), %rax
movq 0x10(%rax), %r12
testq %r12, %r12
je 0x7a9b
leaq 0x2d79(%rip), %r14      # 0xa7d0
leaq 0x2554(%rip), %r15      # 0x9fb2
cmpq 0x8(%rbx), %r12
jne 0x7a6e
movq %r14, %rdi
xorl %eax, %eax
callq 0x20a0
movq 0x8(%r12), %rax
movq 0x10(%rax), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x20a0
cmpq $0x0, (%r12)
je 0x7a9b
movl $0x20, %edi
callq 0x2040
movq (%r12), %r12
testq %r12, %r12
jne 0x7a5e
cmpb $0x1, 0x10(%rbx)
jne 0x7ac7
movq (%rbx), %rax
cmpq $0x0, 0x10(%rax)
je 0x7ab5
movl $0x20, %edi
callq 0x2040
movl $0x2e, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2040
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/lr.c
// Function: print_lr1_item
void
print_lr1_item(cfg_t const* cfg, lr1_item_t* lr1_item) {
	print_lr0_item(CORE(lr1_item));
	printf(", ");
	if (is_empty_bitset(lr1_item->lookahead))
		{ printf("???"); }
	else {
		printf("[");
		int j;
		bool first = true;
		while ((j = IT_NEXT(lr1_item->lookahead)) != IT_NULL) {
			symbol_t* ter = (symbol_t*)AT_VECTOR(cfg->terminal, j);
			if (!first)
				{ printf(", "); }
			printf("%s", ter->name);
			first = false;
		}
		IT_RESET(lr1_item->lookahead);
		printf("]");
	}	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rdi
callq 0x7a1d
leaq 0x3062(%rip), %rdi      # 0xab56
xorl %eax, %eax
callq 0x20a0
movq 0x10(%rbx), %rdi
callq 0x26fa
testb %al, %al
je 0x7b24
leaq 0x2cc4(%rip), %rdi      # 0xa7d3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20a0
movl $0x5b, %edi
callq 0x2040
movq 0x10(%rbx), %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x7b87
movb $0x1, %r13b
leaq 0x246c(%rip), %r15      # 0x9fb2
movq 0x10(%r14), %rcx
movq (%rcx), %rcx
cltq
movq (%rcx,%rax,8), %r12
testb $0x1, %r13b
jne 0x7b67
leaq 0x2ff6(%rip), %rdi      # 0xab56
xorl %eax, %eax
callq 0x20a0
movq 0x10(%r12), %rsi
xorl %r13d, %r13d
movq %r15, %rdi
xorl %eax, %eax
callq 0x20a0
movq 0x10(%rbx), %rdi
callq 0x28dc
cmpl $-0x1, %eax
jne 0x7b46
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x7ba0
xorl %ecx, %ecx
cmpb $0x1, 0x54(%rax)
jne 0x7b9d
movl 0x4(%rax), %ecx
decl %ecx
movl %ecx, 0x50(%rax)
movl $0x5d, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/lr.c
// Function: print_state
void
print_state(cfg_t const* cfg, bitset_t* item_set) {
	int back = IT_BACK(item_set);
	IT_RESET(item_set);

	int i;
	while ((i = IT_NEXT(item_set)) != IT_NULL) {
		lr1_item_t* crt_item = (lr1_item_t*)AT_VECTOR(record_lr1_item, i);
		print_lr1_item(cfg, crt_item);
		puts("");
	}
	IT_SET(item_set, back);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
cmpb $0x1, 0x54(%rsi)
jne 0x7bd5
movl 0x4(%rbx), %eax
decl %eax
movl 0x50(%rbx), %r15d
movl %eax, 0x50(%rbx)
movq %rbx, %rdi
callq 0x28dc
cmpl $-0x1, %eax
je 0x7c0d
movq 0x152b0(%rip), %rcx     # 0x1cea0
movq (%rcx), %rcx
cltq
movq (%rcx,%rax,8), %rsi
movq %r14, %rdi
callq 0x7ad0
movl $0xa, %edi
callq 0x2040
jmp 0x7bdc
movl %r15d, 0x50(%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/lr.c
// Function: print_report
void
print_report(cfg_t const* cfg, vector_t const* lr1_states) {
	for (size_t i = 0; i < SIZE_VECTOR(lr1_states); ++i) {
		printf("===== State %zu =====\n", i);
		lr1_state_t* state = AT_VECTOR(lr1_states, i);
		if (state->accept)
			{ printf("(Accept): "); }
		print_state(cfg, state->items);

		print_move(cfg, state->shift_lst, _SHIFT);
		print_move(cfg, state->goto_lst, _GOTO);

		trans_list_t* list = NULL;
		list = state->reduces;
		while (list) {
			printf("TOKEN(%s) => REDUCE(%d).\n",
				((symbol_t*)AT_VECTOR(cfg->terminal, list->input))->name,
				(_REDUCE ^ list->state) + 1);
			list = list->next;
		}
	}
}

// Assembly:
cmpq $0x0, 0x10(%rsi)
je 0x7cfa
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4000, %r15d          # imm = 0x4000
leaq 0x2bb1(%rip), %r13      # 0xa7f9
xorl %r12d, %r12d
movq %rsi, -0x30(%rbp)
leaq 0x2b81(%rip), %rdi      # 0xa7d7
movq %r12, %rsi
xorl %eax, %eax
callq 0x20a0
movq (%rbx), %rax
movq (%rax,%r12,8), %rbx
cmpb $0x1, 0x29(%rbx)
jne 0x7c7b
leaq 0x2b7a(%rip), %rdi      # 0xa7ee
xorl %eax, %eax
callq 0x20a0
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x7bb8
movq 0x10(%rbx), %rsi
movq %r14, %rdi
movl $0x1000, %edx           # imm = 0x1000
callq 0x7cfb
movq 0x18(%rbx), %rsi
movq %r14, %rdi
movl $0x2000, %edx           # imm = 0x2000
callq 0x7cfb
movq 0x20(%rbx), %rbx
testq %rbx, %rbx
je 0x7cdb
movq 0x10(%r14), %rax
movq (%rax), %rax
movslq 0x8(%rbx), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rsi
movl 0xc(%rbx), %edx
xorl %r15d, %edx
incl %edx
movq %r13, %rdi
xorl %eax, %eax
callq 0x20a0
movq (%rbx), %rbx
jmp 0x7cac
incq %r12
movq -0x30(%rbp), %rbx
cmpq 0x10(%rbx), %r12
jb 0x7c4f
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/lr.c
// Function: print_move
static void
print_move(cfg_t const* cfg, trans_list_t* list, int kind) {
	char const* pattern = (kind == _SHIFT) ? "SHIFT" : "GOTO";
	vector_t const* src_vect = (kind == _SHIFT)
							? cfg->terminal : cfg->non_terminal;
	while (list) {
		if (kind & list->input) {
			printf("%s(%s)", pattern, ((symbol_t*)
				AT_VECTOR(src_vect, list->input ^ kind))->name);
		}
		printf(" into state %d.\n", list->state);
		list = list->next;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
xorl %eax, %eax
cmpl $0x1000, %edx           # imm = 0x1000
sete %cl
leaq 0x2b2b(%rip), %rdx      # 0xa848
leaq 0x2b2a(%rip), %r15      # 0xa84e
cmoveq %rdx, %r15
testq %rsi, %rsi
je 0x7d7d
movq %rsi, %r14
movb %cl, %al
movq 0x8(%rdi,%rax,8), %r13
leaq 0x2b1c(%rip), %r12      # 0xa85a
movl 0x8(%r14), %eax
testl %ebx, %eax
je 0x7d67
movq (%r13), %rcx
xorl %ebx, %eax
cltq
movq (%rcx,%rax,8), %rax
movq 0x10(%rax), %rdx
leaq 0x2af6(%rip), %rdi      # 0xa853
movq %r15, %rsi
xorl %eax, %eax
callq 0x20a0
movl 0xc(%r14), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x20a0
movq (%r14), %r14
testq %r14, %r14
jne 0x7d3e
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/lr.c
// Function: del_lr1_item
static void
del_lr1_item(lr1_item_t* item) {
	if (item) { 
		del_bitset(item->lookahead);
//		del_vector(item->non_kernel_look);
	}
	FREE(item);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x7da3
movq 0x10(%rbx), %rdi
callq 0x2486
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21d0
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/lr.c
// Function: del_kernel
static void
del_kernel(kernel_t* kernel) {
	if (kernel) {
		del_bitset(kernel->kernel_item);
		if (!kernel->ref_lr0)
			{ del_vector(kernel->non_lr0_kernel_item); }
		del_bitset(kernel->final_state);
	}
	FREE(kernel);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x7ddf
movq (%rbx), %rdi
callq 0x2486
cmpb $0x0, 0x10(%rbx)
jne 0x7dd6
movq 0x18(%rbx), %rdi
callq 0x2b8e
movq 0x20(%rbx), %rdi
callq 0x2486
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21d0
// File: /workspace/github_c_makefile_star2_O3/MaoKo[P]FGFX/fgfp/src/lr.c
// Function: new_lr0_item
static lr0_item_t*
new_lr0_item(production_t const* prod, list_rhs_t const* dot_pos) {
	if (!prod)
		{ return (NULL); }

	size_t hash = hash_lr0_item(prod, dot_pos);
	if (!record_lr0_item[hash])
		{ record_lr0_item[hash] = new_vector(); }

	for (size_t i = 0; i < SIZE_VECTOR(record_lr0_item[hash]); ++i) {
		lr0_item_t* target = (lr0_item_t*)AT_VECTOR(record_lr0_item[hash], i);
		if ((target->prod == prod) && (target->dot_pos == dot_pos))
			{ return (target); }
	}

	lr0_item_t* item = NEW(lr0_item_t, 1);
	if (!item)
		{ return (NULL); }

	memset(item, 0, sizeof(lr0_item_t));
	item->prod = prod;
	item->dot_pos = dot_pos;

	if (!DOT(item))
		{ item->is_final = true; }

	PUSH_BACK_VECTOR(record_lr0_item[hash], item);
	return (item);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x7edc
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r12
testq %rsi, %rsi
je 0x7e3e
addq 0x10(%rbx), %r12
movq %r12, %rax
shrq %rax
movabsq $-0x5c28f5c28f5c28f5, %rcx # imm = 0xA3D70A3D70A3D70B
mulq %rcx
shrq $0x4, %rdx
imulq $0x32, %rdx, %rax
subq %rax, %r12
movl %r12d, %eax
leaq 0x1504a(%rip), %r13     # 0x1ceb0
movq (%r13,%rax,8), %rax
testq %rax, %rax
jne 0x7e7a
callq 0x2aec
movq %rax, (%r13,%r12,8)
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x7e9f
movq (%rax), %rax
xorl %edx, %edx
movq (%rax,%rdx,8), %r15
cmpq %r14, (%r15)
jne 0x7e97
cmpq %rbx, 0x8(%r15)
je 0x7edf
incq %rdx
cmpq %rdx, %rcx
jne 0x7e88
movl $0x20, %edi
callq 0x3a0e
testq %rax, %rax
je 0x7edc
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
testq %rbx, %rbx
jne 0x7ec9
movb $0x1, 0x10(%r15)
movq (%r13,%r12,8), %rdi
movq 0x10(%rdi), %rsi
movq %r15, %rdx
callq 0x2be1
jmp 0x7edf
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq