LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_assignment.c
// Function: subtilis_parser_zero_local_fn
void subtilis_parser_zero_local_fn(subtilis_parser_t *p, subtilis_token_t *t,
				   const char *var_name,
				   const subtilis_type_t *id_type,
				   subtilis_error_t *err)
{
	subtilis_type_t type;
	subtilis_exp_t *e = NULL;

	subtilis_type_init_copy(&type, id_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_complete_custom_type(p, var_name, &type, err);
	if (err->type != SUBTILIS_ERROR_OK)

		goto cleanup;
	e = subtilis_type_if_zero(p, &type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	(void)subtilis_symbol_table_insert_reg(p->local_st, var_name, &type,
					       e->exp.ir_op.reg, err);

cleanup:
	subtilis_exp_delete(e);
	subtilis_type_free(&type);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %r8, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq %rsp, %rdi
movq %rcx, %rsi
movq %r8, %rdx
callq 0x2f457
cmpl $0x0, (%rbx)
jne 0x18088
movq %rsp, %rdx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x1f81b
cmpl $0x0, (%rbx)
je 0x18048
xorl %r12d, %r12d
jmp 0x18078
movq %rsp, %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x35e20
movq %rax, %r12
cmpl $0x0, (%rbx)
jne 0x18078
movq 0x68(%r15), %rdi
movq 0x148(%r12), %rcx
movq %rsp, %rdx
movq %r14, %rsi
movq %rbx, %r8
callq 0x2e922
movq %r12, %rdi
callq 0x2b166
movq %rsp, %rdi
callq 0x2f56e
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_assignment.c
// Function: subtilis_parser_assign_local_fn
void subtilis_parser_assign_local_fn(subtilis_parser_t *p, subtilis_token_t *t,
				     const char *var_name,
				     const subtilis_type_t *id_type,
				     subtilis_error_t *err)
{
	subtilis_type_t type;
	subtilis_exp_t *e;

	e = subtilis_parser_expression(p, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (e->type.type != SUBTILIS_TYPE_FN) {
		subtilis_error_set_expected(err, subtilis_type_name(id_type),
					    subtilis_type_name(&e->type),
					    p->l->stream->name, p->l->line);
		goto cleanup;
	}

	subtilis_type_init_copy(&type, id_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_complete_custom_type(p, var_name, &type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (e->partial_name)
		subtilis_parser_call_add_addr(p, &type, e, err);
	else
		e = subtilis_type_if_coerce_type(p, e, &type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	(void)subtilis_symbol_table_insert_reg(p->local_st, var_name, &type,
					       e->exp.ir_op.reg, err);

cleanup:
	subtilis_exp_delete(e);
	subtilis_type_free(&type);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %r8, %r14
movq %rcx, %r13
movq %rdx, %r12
movq %rdi, %r15
movq %r8, %rdx
callq 0x1ec4c
cmpl $0x0, (%r14)
jne 0x18174
movq %rax, %rbx
cmpl $0x9, (%rax)
jne 0x1811f
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x2f457
cmpl $0x0, (%r14)
jne 0x18174
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x1f81b
cmpl $0x0, (%r14)
jne 0x18162
cmpq $0x0, 0x160(%rbx)
je 0x18185
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x1d3d0
jmp 0x1819b
movq %r13, %rdi
callq 0x2f5ad
movq %rax, %r12
movq %rbx, %rdi
callq 0x2f5ad
movq (%r15), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x5b460(%rip), %r10     # 0x735a4
movq %r14, %rdi
movl $0x1d, %esi
movq %r12, %rdx
movq %rax, %rcx
pushq $0x21e                  # imm = 0x21E
pushq %r10
callq 0x143da
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x2b166
leaq 0x8(%rsp), %rdi
callq 0x2f56e
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x37860
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x18162
movq 0x68(%r15), %rdi
movq 0x148(%rbx), %rcx
leaq 0x8(%rsp), %rdx
movq %r12, %rsi
movq %r14, %r8
callq 0x2e922
jmp 0x18162
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_assignment.c
// Function: subtilis_parser_assign_local_rec
void subtilis_parser_assign_local_rec(subtilis_parser_t *p, subtilis_token_t *t,
				      const char *var_name,
				      const subtilis_type_t *id_type,
				      subtilis_error_t *err)
{
	subtilis_type_t type;

	subtilis_type_init_copy(&type, id_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_complete_custom_type(p, var_name, &type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_parser_rec_init(p, t, &type, var_name, true, true, err);

cleanup:
	subtilis_type_free(&type);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %r8, %r15
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
leaq 0x10(%rsp), %rdi
movq %rcx, %rsi
movq %r8, %rdx
callq 0x2f457
cmpl $0x0, (%r15)
jne 0x18234
leaq 0x10(%rsp), %rdx
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x1f81b
cmpl $0x0, (%r15)
jne 0x1822a
movq %r15, (%rsp)
leaq 0x10(%rsp), %rdx
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rcx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x29bff
leaq 0x10(%rsp), %rdi
callq 0x2f56e
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_assignment.c
// Function: subtilis_parser_get_assignment_var
char *subtilis_parser_get_assignment_var(subtilis_parser_t *p,
					 subtilis_token_t *t,
					 subtilis_type_t *id_type,
					 subtilis_error_t *err)
{
	const char *tbuf;
	char *var_name = NULL;

	tbuf = subtilis_token_get_text(t);
	var_name = malloc(strlen(tbuf) + 1);
	if (!var_name) {
		subtilis_error_set_oom(err);
		return NULL;
	}
	strcpy(var_name, tbuf);

	/* We need special handling here.  If it's a REC of an FN
	 * to get the full type from the symbol table.  The type we get
	 * from the lexer is incomplete.  It knows that we have a
	 * custom type but it doesn't know all the details of that type.
	 */

	if ((t->tok.id_type.type == SUBTILIS_TYPE_FN) ||
	    (t->tok.id_type.type == SUBTILIS_TYPE_REC))
		subtilis_complete_custom_type(p, var_name, id_type, err);
	else
		subtilis_type_copy(id_type, &t->tok.id_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	return var_name;

cleanup:
	free(var_name);

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
movq %rsi, %rdi
callq 0x12ad0
movq %rax, %rbp
movq %rax, %rdi
callq 0x120f0
leaq 0x1(%rax), %rdi
callq 0x121d0
testq %rax, %rax
je 0x182aa
movq %rax, %r14
movq %rax, %rdi
movq %rbp, %rsi
callq 0x12070
movl 0x8(%r15), %eax
cmpl $0x16, %eax
je 0x18297
cmpl $0x9, %eax
jne 0x182c5
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x1f81b
jmp 0x182d4
leaq 0x5b2f3(%rip), %rdx     # 0x735a4
movq %rbx, %rdi
movl $0x1, %esi
movl $0x29a, %ecx            # imm = 0x29A
callq 0x145a4
jmp 0x182f5
leaq 0x8(%r15), %rsi
movq %r13, %rdi
movq %rbx, %rdx
callq 0x2f78a
cmpl $0x0, (%rbx)
jne 0x182ed
movq (%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
je 0x182f8
movq %r14, %rdi
callq 0x122c0
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_assignment.c
// Function: subtilis_parser_lookup_assignment_var
void subtilis_parser_lookup_assignment_var(subtilis_parser_t *p,
					   subtilis_token_t *t,
					   const char *var_name,
					   const subtilis_symbol_t **s,
					   size_t *mem_reg, bool *new_global,
					   subtilis_error_t *err)
/* clang-format on */

{
	*new_global = false;
	*s = subtilis_symbol_table_lookup(p->local_st, var_name);
	if (*s) {
		*mem_reg = SUBTILIS_IR_REG_LOCAL;
	} else {
		*s = subtilis_symbol_table_lookup(p->st, var_name);
		if (*s) {
			*mem_reg = SUBTILIS_IR_REG_GLOBAL;
		} else if (p->current == p->main) {
			/*
			 * We explicitly disable statements like
			 *
			 * X% = X% + 1  or
			 * X% += 1
			 *
			 * for the cases where X% has not been defined.
			 */
			*new_global = true;
			*mem_reg = SUBTILIS_IR_REG_GLOBAL;
			if (p->level != 0) {
				subtilis_error_variable_bad_level(
				    err, var_name, p->l->stream->name,
				    p->l->line);
			}
		} else {
			subtilis_error_set_unknown_variable(
			    err, var_name, p->l->stream->name, p->l->line);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %r12
movq %r8, %r15
movq %rcx, %r13
movq %rdx, %rbx
movq %rdi, %r14
movb $0x0, (%r9)
movq 0x68(%rdi), %rdi
movq %rdx, %rsi
callq 0x2ebbc
movq %rax, (%r13)
testq %rax, %rax
je 0x18347
movq $0x2, (%r15)
jmp 0x183df
movq 0x60(%r14), %rdi
movq %rbx, %rsi
callq 0x2ebbc
movq %rax, (%r13)
testq %rax, %rax
je 0x18365
movq $0x1, (%r15)
jmp 0x183df
movq 0x30(%rsp), %rdi
movq 0x48(%r14), %rax
cmpq 0x50(%r14), %rax
je 0x1839c
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x5b21e(%rip), %rax     # 0x735a4
leaq 0x5ba88(%rip), %rcx     # 0x73e15
movl $0x1b, %esi
movq %rbx, %rdx
pushq $0x2dd                  # imm = 0x2DD
jmp 0x183d5
movb $0x1, (%r12)
movq $0x1, (%r15)
cmpq $0x0, 0x78(%r14)
je 0x183df
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x5b1e3(%rip), %rax     # 0x735a4
leaq 0x5ba4d(%rip), %rcx     # 0x73e15
movl $0x3e, %esi
movq %rbx, %rdx
pushq $0x2d9                  # imm = 0x2D9
pushq %rax
callq 0x143da
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_assignment.c
// Function: prv_assignment_operator
static subtilis_exp_t *prv_assignment_operator(subtilis_parser_t *p,
					       const char *var_name,
					       subtilis_exp_t *e,
					       subtilis_assign_type_t at,
					       subtilis_error_t *err)
{
	subtilis_exp_t *var;

	if (at == SUBTILIS_ASSIGN_TYPE_EQUAL)
		return e;

	var = subtilis_var_lookup_var(p, var_name, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (at == SUBTILIS_ASSIGN_TYPE_PLUS_EQUAL)
		e = subtilis_exp_add(p, var, e, err);
	else
		e = subtilis_type_if_sub(p, var, e, err);

	var = NULL;
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	return e;

cleanup:

	subtilis_exp_delete(var);
	subtilis_exp_delete(e);

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
testl %ecx, %ecx
je 0x19457
movq %r8, %r14
movl %ecx, %ebp
movq %rdi, %r15
movq %r8, %rdx
callq 0x35c45
cmpl $0x0, (%r14)
jne 0x19445
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq %r14, %rcx
cmpl $0x1, %ebp
jne 0x19435
callq 0x2ba37
jmp 0x1943a
callq 0x36de4
movq %rax, %rbx
cmpl $0x0, (%r14)
je 0x19457
xorl %eax, %eax
movq %rax, %rdi
callq 0x2b166
movq %rbx, %rdi
callq 0x2b166
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/markdryan[P]subtilis/frontend/parser_assignment.c
// Function: subtilis_parser_let
void subtilis_parser_let(subtilis_parser_t *p, subtilis_token_t *t,
			 subtilis_error_t *err)
{
	const char *tbuf;

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	if (t->type != SUBTILIS_TOKEN_IDENTIFIER) {
		tbuf = subtilis_token_get_text(t);
		subtilis_error_set_id_expected(err, tbuf, p->l->stream->name,
					       p->l->line);
		return;
	}

	subtilis_parser_assignment(p, t, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x194d5
cmpl $0x6, (%r15)
jne 0x19499
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x183e9
movq %r15, %rdi
callq 0x12ad0
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x5a0f1(%rip), %r10     # 0x735a4
leaq 0x5a95b(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x12, %esi
movq %rax, %rdx
pushq $0x4cb                  # imm = 0x4CB
pushq %r10
callq 0x143da
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_assignment.c
// Function: subtilis_parser_swap
void subtilis_parser_swap(subtilis_parser_t *p, subtilis_token_t *t,
			  subtilis_error_t *err)
{
	const char *tbuf;
	bool lreg;
	bool rreg;
	subtilis_ir_operand_t lop;
	subtilis_ir_operand_t rop;
	subtilis_type_t ltype;
	subtilis_type_t rtype;

	ltype.type = SUBTILIS_TYPE_VOID;
	rtype.type = SUBTILIS_TYPE_VOID;

	lreg = subtilis_exp_get_lvalue(p, t, &lop, &ltype, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	tbuf = subtilis_token_get_text(t);
	if (t->type != SUBTILIS_TOKEN_OPERATOR || strcmp(tbuf, ",")) {
		subtilis_error_set_expected(err, ",", tbuf, p->l->stream->name,
					    p->l->line);
		goto cleanup;
	}

	rreg = subtilis_exp_get_lvalue(p, t, &rop, &rtype, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_type_compare_diag_custom(p, &ltype, &rtype, NULL,
					  prv_swap_mismatch, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (lreg) {
		if (rreg)
			subtilis_type_if_swap_reg_reg(p, &ltype, lop.reg,
						      rop.reg, err);
		else
			subtilis_type_if_swap_reg_mem(p, &ltype, lop.reg,
						      rop.reg, err);
	} else if (rreg) {
		subtilis_type_if_swap_reg_mem(p, &ltype, rop.reg, lop.reg, err);
	} else {
		subtilis_type_if_swap_mem_mem(p, &ltype, lop.reg, rop.reg, err);
	}
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

cleanup:

	subtilis_type_free(&rtype);
	subtilis_type_free(&ltype);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x8, %eax
leaq 0x18(%rsp), %rcx
movl %eax, (%rcx)
movl %eax, 0x160(%rsp)
leaq 0x10(%rsp), %rdx
movq %rbx, %r8
callq 0x1e7e8
cmpl $0x0, (%rbx)
jne 0x19565
movl %eax, %ebp
movq %r15, %rdi
callq 0x12ad0
cmpl $0x2, (%r15)
jne 0x19531
cmpb $0x2c, (%rax)
jne 0x19531
cmpb $0x0, 0x1(%rax)
je 0x1958a
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x5a061(%rip), %r10     # 0x735a4
leaq 0x5a048(%rip), %rdx     # 0x73592
movq %rbx, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x4ee                  # imm = 0x4EE
pushq %r10
callq 0x143da
addq $0x10, %rsp
leaq 0x160(%rsp), %rdi
callq 0x2f56e
leaq 0x18(%rsp), %rdi
callq 0x2f56e
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %rdx
leaq 0x160(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %r8
callq 0x1e7e8
cmpl $0x0, (%rbx)
jne 0x19565
movl %eax, %r15d
leaq 0x8b(%rip), %r8         # 0x1963f
leaq 0x18(%rsp), %rsi
leaq 0x160(%rsp), %rdx
movq %r14, %rdi
xorl %ecx, %ecx
movq %rbx, %r9
callq 0x37bdd
cmpl $0x0, (%rbx)
jne 0x19565
testb %bpl, %bpl
je 0x195fc
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rcx
testb %r15b, %r15b
je 0x1960b
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %r8
callq 0x3790b
jmp 0x19565
testb %r15b, %r15b
je 0x19620
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %r8
callq 0x3793f
jmp 0x19565
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rcx
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %r8
callq 0x37973
jmp 0x19565
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_assignment.c
// Function: prv_check_bad_def
static void prv_check_bad_def(subtilis_parser_t *p, const char *var_name,
			      subtilis_error_t *err)
{
	if (!strncmp(var_name, "DEFPROC", 7) ||
	    !strncmp(var_name, "defPROC", 7))
		subtilis_error_set_defproc_should_be_def_proc(
		    err, p->l->stream->name, p->l->line);
	else if (!strncmp(var_name, "DEFFN", 5) ||
		 !strncmp(var_name, "defFN", 5))
		subtilis_error_set_deffn_should_be_def_fn(
		    err, p->l->stream->name, p->l->line);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x59f4a(%rip), %rsi     # 0x735d4
movl $0x7, %edx
movq %r15, %rdi
callq 0x12060
testl %eax, %eax
je 0x196e9
leaq 0x59f3a(%rip), %rsi     # 0x735dc
movl $0x7, %edx
movq %r15, %rdi
callq 0x12060
testl %eax, %eax
je 0x196e9
leaq 0x59f2a(%rip), %rsi     # 0x735e4
movl $0x5, %edx
movq %r15, %rdi
callq 0x12060
testl %eax, %eax
je 0x1970a
leaq 0x59f18(%rip), %rsi     # 0x735ea
movl $0x5, %edx
movq %r15, %rdi
callq 0x12060
testl %eax, %eax
je 0x1970a
popq %rbx
popq %r14
popq %r15
retq
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x59eaa(%rip), %r8      # 0x735a4
movq %rbx, %rdi
movl $0x50, %esi
movl $0x83, %r9d
jmp 0x19729
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x59e89(%rip), %r8      # 0x735a4
movq %rbx, %rdi
movl $0x51, %esi
movl $0x87, %r9d
popq %rbx
popq %r14
popq %r15
jmp 0x145c8
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_assignment.c
// Function: prv_get_ass_op
static subtilis_assign_type_t
prv_get_ass_op(subtilis_parser_t *p, subtilis_token_t *t, subtilis_error_t *err)
{
	const char *tbuf;
	subtilis_assign_type_t at = SUBTILIS_ASSIGN_TYPE_UNKNOWN;

	tbuf = subtilis_token_get_text(t);
	if (t->type != SUBTILIS_TOKEN_OPERATOR) {
		subtilis_error_set_assignment_op_expected(
		    err, tbuf, p->l->stream->name, p->l->line);
		return at;
	}

	if (!strcmp(tbuf, "=")) {
		at = SUBTILIS_ASSIGN_TYPE_EQUAL;
	} else if (!strcmp(tbuf, "+=")) {
		at = SUBTILIS_ASSIGN_TYPE_PLUS_EQUAL;
	} else if (!strcmp(tbuf, "-=")) {
		at = SUBTILIS_ASSIGN_TYPE_MINUS_EQUAL;
	} else if (!strcmp(tbuf, ":=")) {
		at = SUBTILIS_ASSIGN_TYPE_CREATE_EQUAL;
	} else {
		subtilis_error_set_assignment_op_expected(
		    err, tbuf, p->l->stream->name, p->l->line);
	}

	return at;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x12ad0
cmpl $0x2, (%r15)
jne 0x19fef
movzbl (%rax), %ecx
cmpl $0x39, %ecx
jg 0x1a01a
cmpl $0x2b, %ecx
je 0x1a02e
cmpl $0x2d, %ecx
jne 0x1a04d
cmpb $0x3d, 0x1(%rax)
jne 0x1a04d
cmpb $0x0, 0x2(%rax)
jne 0x1a04d
movl $0x2, %eax
jmp 0x1a086
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x595a3(%rip), %r10     # 0x735a4
leaq 0x59e0d(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x14, %esi
movq %rax, %rdx
pushq $0x9c
jmp 0x1a076
cmpl $0x3a, %ecx
je 0x1a041
cmpl $0x3d, %ecx
jne 0x1a04d
cmpb $0x0, 0x1(%rax)
jne 0x1a04d
xorl %eax, %eax
jmp 0x1a086
cmpb $0x3d, 0x1(%rax)
jne 0x1a04d
cmpb $0x0, 0x2(%rax)
jne 0x1a04d
movl $0x1, %eax
jmp 0x1a086
cmpb $0x3d, 0x1(%rax)
jne 0x1a04d
cmpb $0x0, 0x2(%rax)
je 0x1a08c
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x59545(%rip), %r10     # 0x735a4
leaq 0x59daf(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x14, %esi
movq %rax, %rdx
pushq $0xaa
pushq %r10
callq 0x143da
addq $0x10, %rsp
movl $0x4, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0x3, %eax
jmp 0x1a086
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_proc_name_and_type
static char *prv_proc_name_and_type(subtilis_parser_t *p, subtilis_token_t *t,
				    subtilis_type_t *type, bool keep_prefix,
				    subtilis_error_t *err)
{
	const char *tbuf;
	char *name = NULL;

	tbuf = subtilis_token_get_text(t);
	if ((t->type != SUBTILIS_TOKEN_KEYWORD) ||
	    ((t->tok.keyword.type != SUBTILIS_KEYWORD_PROC) &&
	     (t->tok.keyword.type != SUBTILIS_KEYWORD_FN))) {
		subtilis_error_set_expected(err, "PROC or FN", tbuf,
					    p->l->stream->name, p->l->line);
		return NULL;
	}

	if (!keep_prefix) {
		if (t->tok.keyword.type == SUBTILIS_KEYWORD_PROC)
			tbuf += 4;
		else if (t->tok.keyword.type == SUBTILIS_KEYWORD_FN)
			tbuf += 2;
	}

	name = malloc(strlen(tbuf) + 1);
	if (!name) {
		subtilis_error_set_oom(err);
		return NULL;
	}

	subtilis_type_copy(type, &t->tok.keyword.id_type, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		free(name);
		return NULL;
	}

	if ((type->type == SUBTILIS_TYPE_FN) ||
	    (type->type == SUBTILIS_TYPE_REC)) {
		subtilis_complete_custom_type(p, tbuf, type, err);
		if (err->type != SUBTILIS_ERROR_OK) {
			free(name);
			return NULL;
		}
	}
	strcpy(name, tbuf);

	return name;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
movq %rsi, %rdi
callq 0x12ad0
movq %rax, %r14
cmpl $0x1, (%r13)
jne 0x1a7a8
movl 0x8(%r13), %eax
cmpl $0x2, %eax
jae 0x1a7a8
testb %bpl, %bpl
jne 0x1a7f1
cmpl $0x1, %eax
jne 0x1a7ed
addq $0x4, %r14
jmp 0x1a7f1
movq (%r12), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x58e98(%rip), %rax     # 0x73653
leaq 0x58cfb(%rip), %rdx     # 0x734bd
movq %rbx, %rdi
movl $0x1d, %esi
movq %r14, %rcx
pushq $0xf1
pushq %rax
callq 0x143da
addq $0x10, %rsp
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x2, %r14
movq %r14, %rdi
callq 0x120f0
leaq 0x1(%rax), %rdi
callq 0x121d0
testq %rax, %rax
je 0x1a82b
movq %rax, %rbp
addq $0x10, %r13
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x2f78a
cmpl $0x0, (%rbx)
je 0x1a846
movq %rbp, %rdi
callq 0x122c0
jmp 0x1a7dc
leaq 0x58e21(%rip), %rdx     # 0x73653
movq %rbx, %rdi
movl $0x1, %esi
movl $0xfe, %ecx
callq 0x145a4
jmp 0x1a7dc
movl (%r15), %eax
cmpl $0x16, %eax
je 0x1a853
cmpl $0x9, %eax
jne 0x1a869
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1f81b
cmpl $0x0, (%rbx)
jne 0x1a821
movq %rbp, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12070
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_process_vector_fn_type
static void prv_process_vector_fn_type(subtilis_parser_t *p, const char *name,
				       subtilis_type_t *fn_type,
				       subtilis_error_t *err)
{
	subtilis_type_t fn_type_old;

	if (fn_type->type == SUBTILIS_TYPE_VOID) {
		subtilis_error_set_bad_proc_name(err, name, p->l->stream->name,
						 p->l->line);
		return;
	}

	subtilis_type_init_copy(&fn_type_old, fn_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_type_if_vector_of(&fn_type_old, fn_type, err);
	subtilis_type_free(&fn_type_old);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	fn_type->params.array.num_dims = 1;
	fn_type->params.array.dims[0] = SUBTILIS_DYNAMIC_DIMENSION;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rcx, %rbx
movq %rdx, %r14
cmpl $0x8, (%rdx)
jne 0x1a8d1
movq %rsi, %rdx
movq (%rdi), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x58da5(%rip), %rax     # 0x73653
leaq 0x59560(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0xb, %esi
pushq $0x142                  # imm = 0x142
pushq %rax
callq 0x143da
addq $0x160, %rsp            # imm = 0x160
jmp 0x1a91b
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2f457
cmpl $0x0, (%rbx)
jne 0x1a914
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x36014
movq %r15, %rdi
callq 0x2f56e
cmpl $0x0, (%rbx)
jne 0x1a914
movabsq $-0xffffffff, %rax      # imm = 0xFFFFFFFF00000001
movq %rax, 0x8(%r14)
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_process_array_fn_type
static void prv_process_array_fn_type(subtilis_parser_t *p,
				      subtilis_exp_t **poss_args,
				      size_t num_poss_args, const char *name,
				      subtilis_type_t *fn_type,
				      subtilis_error_t *err)
{
	subtilis_type_t fn_type_old;
	size_t i;

	if (fn_type->type == SUBTILIS_TYPE_VOID) {
		subtilis_error_set_bad_proc_name(err, name, p->l->stream->name,
						 p->l->line);
		return;
	}

	if ((num_poss_args != 1) ||
	    (poss_args[0]->type.type != SUBTILIS_TYPE_CONST_INTEGER) ||
	    (poss_args[0]->exp.ir_op.integer < 1) ||
	    (poss_args[0]->exp.ir_op.integer > SUBTILIS_MAX_DIMENSIONS)) {
		subtilis_error_bad_dim(err, "return type", p->l->stream->name,
				       p->l->line);
		return;
	}

	subtilis_type_init_copy(&fn_type_old, fn_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_type_if_array_of(&fn_type_old, fn_type, err);
	subtilis_type_free(&fn_type_old);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	fn_type->params.array.num_dims = poss_args[0]->exp.ir_op.integer;
	for (i = 0; i < fn_type->params.array.num_dims; i++)
		fn_type->params.array.dims[i] = SUBTILIS_DYNAMIC_DIMENSION;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %r9, %r14
cmpl $0x8, (%r8)
jne 0x1a968
movq (%rdi), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x58d09(%rip), %r10     # 0x73653
leaq 0x594c4(%rip), %rax     # 0x73e15
movq %r14, %rdi
movl $0xb, %esi
movq %rcx, %rdx
movq %rax, %rcx
pushq $0x120                  # imm = 0x120
pushq %r10
jmp 0x1a9b5
cmpq $0x1, %rdx
jne 0x1a987
movq %rsi, %r15
movq (%rsi), %rax
cmpl $0x1, (%rax)
jne 0x1a987
movl 0x148(%rax), %eax
addl $-0xb, %eax
cmpl $-0xb, %eax
ja 0x1a9c9
movq (%rdi), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x58cba(%rip), %rax     # 0x73653
leaq 0x58cca(%rip), %rdx     # 0x7366a
leaq 0x5946e(%rip), %rcx     # 0x73e15
movq %r14, %rdi
movl $0x38, %esi
pushq $0x129                  # imm = 0x129
pushq %rax
callq 0x143da
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r8, %rbx
movq %rsp, %rdi
movq %r8, %rsi
movq %r14, %rdx
callq 0x2f457
cmpl $0x0, (%r14)
jne 0x1aa25
movq %rsp, %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x35fbf
movq %r12, %rdi
callq 0x2f56e
cmpl $0x0, (%r14)
jne 0x1aa25
movq (%r15), %rax
movl 0x148(%rax), %eax
movl %eax, 0x8(%rbx)
testl %eax, %eax
je 0x1aa25
xorl %eax, %eax
movl $0xffffffff, 0xc(%rbx,%rax,4) # imm = 0xFFFFFFFF
incq %rax
movslq 0x8(%rbx), %rcx
cmpq %rcx, %rax
jb 0x1aa11
addq $0x148, %rsp            # imm = 0x148
jmp 0x1a9c1
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_parser_to_ir_args
static subtilis_ir_arg_t *prv_parser_to_ir_args(subtilis_parser_param_t *params,
						size_t num_params,
						subtilis_error_t *err)
{
	size_t i;
	subtilis_ir_arg_t *args = malloc(sizeof(*args) * num_params);

	if (!args) {
		subtilis_error_set_oom(err);
		return NULL;
	}

	for (i = 0; i < num_params; i++) {
		args[i].type = subtilis_type_if_reg_type(&params[i].type);
		args[i].reg = params[i].reg;
		args[i].nop = params[i].nop;
	}

	return args;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
leaq (,%rsi,8), %rax
leaq (%rax,%rax,2), %rdi
callq 0x121d0
movq %rax, %rbx
testq %rax, %rax
je 0x1adfb
testq %r14, %r14
je 0x1ae14
movq %rbx, %r12
addq $0x8, %r12
movq %r15, %rdi
callq 0x379a7
movl %eax, -0x8(%r12)
movups 0x148(%r15), %xmm0
movups %xmm0, (%r12)
addq $0x18, %r12
addq $0x158, %r15            # imm = 0x158
decq %r14
jne 0x1adcf
jmp 0x1ae14
leaq 0x58851(%rip), %rdx     # 0x73653
movq %r12, %rdi
movl $0x1, %esi
movl $0x31, %ecx
callq 0x145a4
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_parser_to_ptypes
static subtilis_type_t *prv_parser_to_ptypes(subtilis_parser_param_t *params,
					     size_t num_params,
					     subtilis_error_t *err)
{
	size_t i;
	subtilis_type_t *ptypes = malloc(sizeof(*ptypes) * num_params);

	if (!ptypes) {
		subtilis_error_set_oom(err);
		return NULL;
	}

	for (i = 0; i < num_params; i++) {
		subtilis_type_init_copy(&ptypes[i], &params[i].type, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return NULL;
	}

	return ptypes;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
imulq $0x148, %rsi, %rdi      # imm = 0x148
callq 0x121d0
testq %rax, %rax
je 0x1ae7a
movq %rax, %rbx
testq %r15, %r15
je 0x1ae95
movq %rbx, %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2f457
cmpl $0x0, (%r14)
jne 0x1ae93
addq $0x158, %r12            # imm = 0x158
addq $0x148, %r13            # imm = 0x148
decq %r15
jne 0x1ae51
jmp 0x1ae95
leaq 0x587d2(%rip), %rdx     # 0x73653
movq %r14, %rdi
movl $0x1, %esi
movl $0x46, %ecx
callq 0x145a4
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_delete_params
static void prv_delete_params(subtilis_parser_param_t *params, size_t num_args)
{
	size_t i;

	if (!params)
		return;

	for (i = 0; i < num_args; i++)
		subtilis_type_free(&params[i].type);

	free(params);
}

// Assembly:
testq %rdi, %rdi
je 0x1aedb
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x1aece
movq %rbx, %r15
movq %r15, %rdi
callq 0x2f56e
addq $0x158, %r15            # imm = 0x158
decq %r14
jne 0x1aeba
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_complete_fn_name
static char *prv_complete_fn_name(char *name, const subtilis_type_t *fn_type,
				  subtilis_error_t *err)
{
	char buffer[64];
	int ptr;
	int name_len;
	char *new_name;

	if (subtilis_type_if_is_array(fn_type)) {
		ptr = snprintf(buffer, 64, "(%d)",
			       fn_type->params.array.num_dims);
		if (ptr >= 64) {
			subtilis_error_set_assertion_failed(err);
			goto on_error;
		}
	} else if (subtilis_type_if_is_vector(fn_type)) {
		buffer[0] = '{';
		buffer[1] = '}';
		buffer[2] = 0;
		ptr = 2;
	} else {
		return name;
	}

	name_len = strlen(name);
	new_name = realloc(name, name_len + ptr + 1);
	if (!new_name) {
		subtilis_error_set_oom(err);
		goto on_error;
	}
	strcpy(new_name + name_len, buffer);

	return new_name;

on_error:
	free(name);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x376b5
testb %al, %al
je 0x1af34
movl 0x8(%r15), %ecx
leaq 0x5876f(%rip), %rdx     # 0x73676
movq %rsp, %rdi
movl $0x40, %esi
xorl %eax, %eax
callq 0x12120
movl %eax, %r12d
cmpl $0x40, %eax
jl 0x1af51
leaq 0x5872e(%rip), %rdx     # 0x73653
movq %r14, %rdi
movl $0xf, %esi
movl $0x162, %ecx            # imm = 0x162
jmp 0x1af9b
movq %r15, %rdi
callq 0x376d3
testb %al, %al
je 0x1afaa
movw $0x7d7b, (%rsp)         # imm = 0x7D7B
movb $0x0, 0x2(%rsp)
movl $0x2, %r12d
movq %rbx, %rdi
callq 0x120f0
movq %rax, %r15
addl %r12d, %eax
incl %eax
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x12210
testq %rax, %rax
je 0x1af87
movq %rax, %r12
movslq %r15d, %rdi
addq %rax, %rdi
movq %rsp, %rsi
callq 0x12070
movq %r12, %rbx
jmp 0x1afaa
leaq 0x586c5(%rip), %rdx     # 0x73653
movq %r14, %rdi
movl $0x1, %esi
movl $0x171, %ecx            # imm = 0x171
callq 0x145a4
movq %rbx, %rdi
callq 0x122c0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_delete_ptypes
static void prv_delete_ptypes(subtilis_type_t *ptypes, size_t num_args)
{
	size_t i;

	if (!ptypes)
		return;

	for (i = 0; i < num_args; i++)
		subtilis_type_free(&ptypes[i]);

	free(ptypes);
}

// Assembly:
testq %rdi, %rdi
je 0x1aff2
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x1afe5
movq %rbx, %r15
movq %r15, %rdi
callq 0x2f56e
addq $0x148, %r15            # imm = 0x148
decq %r14
jne 0x1afd1
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x122c0
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: subtilis_parser_def
void subtilis_parser_def(subtilis_parser_t *p, subtilis_token_t *t,
			 subtilis_error_t *err)
{
	subtilis_type_t return_type;
	subtilis_type_t section_type;
	subtilis_symbol_table_t *local_st = NULL;
	char *name = NULL;

	return_type.type = SUBTILIS_TYPE_VOID;
	section_type.type = SUBTILIS_TYPE_VOID;

	if (p->current != p->main) {
		subtilis_error_set_nested_procedure(err, p->l->stream->name,
						    p->l->line);
		return;
	}

	local_st = subtilis_symbol_table_new(err);
	p->local_st = local_st;
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	name = prv_initial_proc_fn_type(p, t, &return_type, false, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	prv_def_internal(p, t, &return_type, &section_type, name, local_st,
			 NULL, err);
	name = NULL;

on_error:

	subtilis_symbol_table_delete(local_st);
	free(name);
	subtilis_type_free(&section_type);
	subtilis_type_free(&return_type);
	p->local_st = p->main_st;
	p->current = p->main;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a0, %rsp            # imm = 0x2A0
movq %rdx, %r12
movq %rdi, %rbx
movl $0x8, %eax
movl %eax, 0x10(%rsp)
movl %eax, 0x158(%rsp)
movq 0x48(%rdi), %rax
cmpq 0x50(%rdi), %rax
je 0x1b04a
movq (%rbx), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
movq %r12, %rdi
movl $0x21, %esi
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x145a4
movq %rsi, %r15
movq %r12, %rdi
callq 0x2e218
movq %rax, %r14
movq %rax, 0x68(%rbx)
cmpl $0x0, (%r12)
jne 0x1b078
movq (%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x12edc
cmpl $0x0, (%r12)
je 0x1b0c3
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x2e2c2
movq %r13, %rdi
callq 0x122c0
leaq 0x158(%rsp), %rdi
callq 0x2f56e
leaq 0x10(%rsp), %rdi
callq 0x2f56e
movq 0x50(%rbx), %rax
movq 0x70(%rbx), %rcx
movq %rcx, 0x68(%rbx)
movq %rax, 0x48(%rbx)
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
movq %r12, %r8
callq 0x1b109
movq %rax, %r13
cmpl $0x0, (%r12)
jne 0x1b07b
movq %r12, (%rsp)
leaq 0x10(%rsp), %rdx
leaq 0x158(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %r8
xorl %r9d, %r9d
callq 0x1b1a1
jmp 0x1b078
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_initial_proc_fn_type
static char *prv_initial_proc_fn_type(subtilis_parser_t *p, subtilis_token_t *t,
				      subtilis_type_t *ftype, bool keep_prefix,
				      subtilis_error_t *err)
{
	subtilis_type_t fn_type;
	char *name = NULL;

	fn_type.type = SUBTILIS_TYPE_VOID;

	name = prv_proc_name_and_type(p, t, &fn_type, keep_prefix, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	prv_complete_proc_fn_type(p, t, &fn_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	subtilis_type_copy(ftype, &fn_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;
	subtilis_type_free(&fn_type);
	return name;

on_error:
	subtilis_type_free(&fn_type);
	free(name);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0x8(%rsp), %rdx
movl $0x8, (%rdx)
callq 0x1a764
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x1b16d
leaq 0x8(%rsp), %rdx
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x1d45f
cmpl $0x0, (%r14)
jne 0x1b16d
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x2f78a
cmpl $0x0, (%r14)
je 0x1b195
leaq 0x8(%rsp), %rdi
callq 0x2f56e
movq %rbx, %rdi
callq 0x122c0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x8(%rsp), %rdi
callq 0x2f56e
jmp 0x1b181
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: subtilis_parser_call_ptr
subtilis_exp_t *subtilis_parser_call_ptr(subtilis_parser_t *p,
					 subtilis_token_t *t,
					 const subtilis_symbol_t *s,
					 const char *var_name, size_t mem_reg,
					 subtilis_error_t *err)
{
	size_t reg;
	subtilis_exp_t *e;

	if (!s->is_reg) {
		e = subtilis_type_if_load_from_mem(p, &s->t, mem_reg, s->loc,
						   err);
		reg = e->exp.ir_op.reg;
		subtilis_exp_delete(e);
	} else {
		reg = s->loc;
	}

	return subtilis_parser_call_known_ptr(p, t, &s->t, reg, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
cmpb $0x0, 0x2a8(%rdx)
je 0x1c43e
movq (%r14), %r13
jmp 0x1c462
leaq 0x8(%r14), %rsi
movq (%r14), %rcx
movq %r12, %rdi
movq %r8, %rdx
movq %rbx, %r8
callq 0x36372
movq 0x148(%rax), %r13
movq %rax, %rdi
callq 0x2b166
addq $0x8, %r14
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1c086
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: subtilis_parser_unwind
void subtilis_parser_unwind(subtilis_parser_t *p, subtilis_error_t *err)
{
	subtilis_ir_operand_t start_label;
	subtilis_ir_operand_t start_inner_label;
	subtilis_ir_operand_t end_label;
	subtilis_ir_operand_t counter;

	if (p->current->cleanup_stack == SIZE_MAX)
		return;

	start_label.label = subtilis_ir_section_new_label(p->current);
	start_inner_label.label = subtilis_ir_section_new_label(p->current);
	end_label.label = subtilis_ir_section_new_label(p->current);
	counter.reg = p->current->cleanup_stack;

	subtilis_ir_section_add_label(p->current, start_label.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_JMPC,
					  counter, start_inner_label, end_label,
					  err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_ir_section_add_label(p->current, start_inner_label.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_reference_type_pop_and_deref(p, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_instr_no_reg(p->current, SUBTILIS_OP_INSTR_JMP,
					     start_label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_label(p->current, end_label.label, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x48(%rdi), %rdi
cmpq $-0x1, 0xb8(%rdi)
je 0x1cae7
movq %rsi, %rbx
callq 0x2cc99
movq %rax, %r15
movq 0x48(%r14), %rdi
callq 0x2cc99
movq %rax, %r13
movq 0x48(%r14), %rdi
callq 0x2cc99
movq %rax, %r12
movq 0x48(%r14), %rdi
movq 0xb8(%rdi), %rbp
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x1cae7
movq 0x48(%r14), %rdi
movl $0x43, %esi
movq %rbp, %rdx
movq %r13, %rcx
movq %r12, %r8
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x1cae7
movq 0x48(%r14), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x1cae7
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4e7f9
cmpl $0x0, (%rbx)
jne 0x1cae7
movq 0x48(%r14), %rdi
movl $0x45, %esi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x2be1f
cmpl $0x0, (%rbx)
je 0x1caf6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%r14), %rdi
movq %r12, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2cca6
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: subtilis_parser_return
void subtilis_parser_return(subtilis_parser_t *p, subtilis_token_t *t,
			    subtilis_error_t *err)
{
	subtilis_exp_t *e;
	subtilis_type_t fn_type;
	subtilis_ir_operand_t end_label;

	if (p->current == p->main) {
		subtilis_error_set_return_in_main(err, p->l->stream->name,
						  p->l->line);
		return;
	}

	subtilis_type_init_copy(&fn_type,
				p->current->type->type.params.fn.ret_val, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	if (fn_type.type == SUBTILIS_TYPE_VOID) {
		subtilis_error_set_return_in_proc(err, p->l->stream->name,
						  p->l->line);
		goto cleanup;
	}

	e = subtilis_parser_expression(p, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	/* Ownership of e is passed to add_fn_ret */

	prv_set_fn_retval(p, e, &fn_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	end_label.label = p->current->end_label;
	subtilis_ir_section_add_instr_no_reg(p->current, SUBTILIS_OP_INSTR_JMP,
					     end_label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	p->current->endproc = true;

cleanup:
	subtilis_type_free(&fn_type);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rdx, %rbx
movq %rdi, %r14
movq 0x48(%rdi), %rax
cmpq 0x50(%rdi), %rax
je 0x1cb80
movq %rsi, %r15
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
leaq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x2f457
cmpl $0x0, (%rbx)
jne 0x1cc0d
cmpl $0x8, 0x8(%rsp)
jne 0x1cbb0
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x56aeb(%rip), %r8      # 0x73653
movq %rbx, %rdi
movl $0x30, %esi
movl $0x6ca, %r9d            # imm = 0x6CA
callq 0x145c8
jmp 0x1cc03
movq (%r14), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x56ac2(%rip), %r8      # 0x73653
movq %rbx, %rdi
movl $0x2f, %esi
movl $0x6c0, %r9d            # imm = 0x6C0
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r14
popq %r15
jmp 0x145c8
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1ec4c
cmpl $0x0, (%rbx)
jne 0x1cc03
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rcx
callq 0x1cc1a
cmpl $0x0, (%rbx)
jne 0x1cc03
movq 0x48(%r14), %rdi
movq 0x98(%rdi), %rdx
movl $0x45, %esi
movq %rbx, %rcx
callq 0x2be1f
cmpl $0x0, (%rbx)
jne 0x1cc03
movq 0x48(%r14), %rax
movb $0x1, 0x88(%rax)
leaq 0x8(%rsp), %rdi
callq 0x2f56e
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: subtilis_parser_endproc
void subtilis_parser_endproc(subtilis_parser_t *p, subtilis_token_t *t,
			     subtilis_error_t *err)
{
	subtilis_ir_operand_t end_label;

	if (p->current == p->main) {
		subtilis_error_set_proc_in_main(err, p->l->stream->name,
						p->l->line);
		return;
	}

	if (p->current->type->type.params.fn.ret_val->type !=
	    SUBTILIS_TYPE_VOID) {
		subtilis_error_set_proc_in_fn(err, p->l->stream->name,
					      p->l->line);
		return;
	}

	p->current->endproc = true;
	end_label.label = p->current->end_label;
	subtilis_ir_section_add_instr_no_reg(p->current, SUBTILIS_OP_INSTR_JMP,
					     end_label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_lexer_get(p->l, t, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r15
movq 0x48(%rdi), %rdi
cmpq 0x50(%r15), %rdi
je 0x1cca1
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rax
cmpl $0x8, (%rax)
jne 0x1ccc2
movq %rsi, %r14
movb $0x1, 0x88(%rdi)
movq 0x98(%rdi), %rdx
movl $0x45, %esi
movq %rbx, %rcx
callq 0x2be1f
cmpl $0x0, (%rbx)
je 0x1cceb
popq %rbx
popq %r14
popq %r15
retq
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x569a1(%rip), %r8      # 0x73653
movq %rbx, %rdi
movl $0x2d, %esi
movl $0x6eb, %r9d            # imm = 0x6EB
jmp 0x1cce1
movq (%r15), %rax
movq 0x30(%rax), %rdx
movl 0x38(%rax), %ecx
leaq 0x56980(%rip), %r8      # 0x73653
movq %rbx, %rdi
movl $0x34, %esi
movl $0x6f2, %r9d            # imm = 0x6F2
popq %rbx
popq %r14
popq %r15
jmp 0x145c8
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x12edc
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: subtilis_parser_call_add_addr
void subtilis_parser_call_add_addr(subtilis_parser_t *p,
				   const subtilis_type_t *type,
				   subtilis_exp_t *e, subtilis_error_t *err)
{
	subtilis_parser_call_addr_t *call_addr = NULL;

	/*
	 * We're taking the address of a function we may not have seen
	 * yet.
	 */

	subtilis_type_copy(&e->type, type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	call_addr = subtilis_parser_call_addr_new(
	    p->current, e->call_site, p->current->in_error_handler,
	    e->partial_name, &e->type, p->l->line, err);
	e->partial_name = NULL;
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_exp_add_call_addrs(p, call_addr, err);
	if (err->type != SUBTILIS_ERROR_OK)
		subtilis_parser_call_addr_delete(call_addr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r14
movq %rdx, %rdi
movq %rcx, %rdx
callq 0x2f78a
cmpl $0x0, (%rbx)
jne 0x1d42a
movq (%r14), %rax
movq 0x48(%r14), %rdi
movq 0x160(%r15), %rcx
movq 0x168(%r15), %rsi
movzbl 0x60(%rdi), %edx
movl 0x38(%rax), %r9d
movq %rbx, (%rsp)
movq %r15, %r8
callq 0x35a99
movq $0x0, 0x160(%r15)
cmpl $0x0, (%rbx)
je 0x1d436
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2af24
cmpl $0x0, (%rbx)
je 0x1d42a
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x35b52
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_complete_proc_fn_type
static void prv_complete_proc_fn_type(subtilis_parser_t *p, subtilis_token_t *t,
				      subtilis_type_t *fn_type,
				      subtilis_error_t *err)
{
	subtilis_type_t id_type;
	const char *tbuf;

	id_type.type = SUBTILIS_TYPE_VOID;

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	tbuf = subtilis_token_get_text(t);
	if ((t->type == SUBTILIS_TOKEN_OPERATOR) && !strcmp(tbuf, "{")) {
		subtilis_lexer_get(p->l, t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		tbuf = subtilis_token_get_text(t);
		if ((t->type != SUBTILIS_TOKEN_OPERATOR) || strcmp(tbuf, "}")) {
			subtilis_error_set_expected(
			    err, "} ", tbuf, p->l->stream->name, p->l->line);
			return;
		}
		subtilis_lexer_get(p->l, t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		tbuf = subtilis_token_get_text(t);

		subtilis_type_init_copy(&id_type, fn_type, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;

		subtilis_type_if_vector_of(&id_type, fn_type, err);
		subtilis_type_free(&id_type);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		fn_type->params.array.num_dims = 1;
		fn_type->params.array.dims[0] = SUBTILIS_DYNAMIC_DIMENSION;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x8, (%rsp)
movq (%rdi), %rdi
movq %rcx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x1d4bd
movq %r15, %rdi
callq 0x12ad0
cmpl $0x2, (%r15)
jne 0x1d4bd
cmpb $0x7b, (%rax)
jne 0x1d4bd
cmpb $0x0, 0x1(%rax)
jne 0x1d4bd
movq (%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
je 0x1d4cc
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x12ad0
cmpl $0x2, (%r15)
jne 0x1d4e5
cmpb $0x7d, (%rax)
jne 0x1d4e5
cmpb $0x0, 0x1(%rax)
je 0x1d51f
movq (%r12), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x5615b(%rip), %r10     # 0x73653
leaq 0x56151(%rip), %rdx     # 0x73650
movq %rbx, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x427                  # imm = 0x427
pushq %r10
callq 0x143da
addq $0x158, %rsp            # imm = 0x158
jmp 0x1d4c4
movq (%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x1d4bd
movq %r15, %rdi
callq 0x12ad0
movq %rsp, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2f457
cmpl $0x0, (%rbx)
jne 0x1d4bd
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x36014
movq %r15, %rdi
callq 0x2f56e
cmpl $0x0, (%rbx)
jne 0x1d4bd
movabsq $-0xffffffff, %rax      # imm = 0xFFFFFFFF00000001
movq %rax, 0x8(%r14)
jmp 0x1d4bd