LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_math.c
// Function: prv_real_unary_fn
static subtilis_exp_t *prv_real_unary_fn(subtilis_parser_t *p,
					 subtilis_token_t *t,
					 subtilis_op_instr_type_t itype,
					 double (*const_fn)(double),
					 subtilis_error_t *err)
{
	size_t reg;
	subtilis_exp_t *e = NULL;
	subtilis_exp_t *e2 = NULL;

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

	if (e->type.type == SUBTILIS_TYPE_CONST_REAL) {
		e2 = subtilis_exp_new_real(const_fn(e->exp.ir_op.real), err);
	} else {
		reg = subtilis_ir_section_add_instr2(p->current, itype,
						     e->exp.ir_op, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;

		e2 = subtilis_exp_new_real_var(reg, err);
	}
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_exp_delete(e);

	return e2;

cleanup:

	subtilis_exp_delete(e);
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r15
movl %edx, %ebp
movq %rdi, %r12
movq %r8, %rdx
callq 0x1f09e
cmpl $0x0, (%rbx)
je 0x24416
xorl %r15d, %r15d
jmp 0x2446c
movq %rax, %r14
cmpl $0x0, (%rax)
je 0x24445
movq 0x48(%r12), %rdi
movq 0x148(%r14), %rdx
movl %ebp, %esi
movq %rbx, %rcx
callq 0x2be09
cmpl $0x0, (%rbx)
jne 0x24461
movl %eax, %edi
movq %rbx, %rsi
callq 0x2b77f
jmp 0x24459
movsd 0x148(%r14), %xmm0
callq *%r15
movq %rbx, %rdi
callq 0x2b7fe
movq %rax, %r15
cmpl $0x0, (%rbx)
je 0x24464
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x2b166
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_math.c
// Function: subtilis_parser_log
subtilis_exp_t *subtilis_parser_log(subtilis_parser_t *p, subtilis_token_t *t,
				    subtilis_op_instr_type_t itype,
				    double (*log_fn)(double),
				    subtilis_error_t *err)
{
	subtilis_exp_t *e;

	e = prv_real_unary_fn(p, t, itype, log_fn, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;
	subtilis_exp_handle_errors(p, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		subtilis_exp_delete(e);
		return NULL;
	}
	return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %r14
movq %rdi, %r15
callq 0x243f1
cmpl $0x0, (%r14)
jne 0x2450e
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b01f
cmpl $0x0, (%r14)
je 0x24510
movq %rbx, %rdi
callq 0x2b166
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_error.c
// Function: subtilis_parser_get_err
subtilis_exp_t *subtilis_parser_get_err(subtilis_parser_t *p,
					subtilis_token_t *t,
					subtilis_error_t *err)
{
	subtilis_exp_t *e;

	e = subtilis_var_lookup_var(p, subtilis_err_hidden_var, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		subtilis_exp_delete(e);
		return NULL;
	}

	return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x81bc0(%rip), %rax     # 0xa6180
movq (%rax), %rsi
callq 0x35c45
cmpl $0x0, (%r14)
jne 0x245ee
movq %rax, %rbx
movq (%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
je 0x245f0
movq %rbx, %rdi
callq 0x2b166
xorl %ebx, %ebx
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_error.c
// Function: subtilis_parser_handle_escape
void subtilis_parser_handle_escape(subtilis_parser_t *p, subtilis_error_t *err)
{
	/* Let's not test for escape in an error handler. */

	if (!p->settings.handle_escapes || p->current->in_error_handler)
		return;

	subtilis_ir_section_add_instr_no_arg(p->current,
					     SUBTILIS_OP_INSTR_TESTESC, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_exp_handle_errors(p, err);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x1, 0xb8(%rdi)
jne 0x2462e
movq %rdi, %r14
movq 0x48(%rdi), %rdi
cmpb $0x0, 0x60(%rdi)
jne 0x2462e
movq %rsi, %rbx
movl $0x75, %esi
movq %rbx, %rdx
callq 0x2be37
cmpl $0x0, (%rbx)
je 0x24636
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2b01f
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_error.c
// Function: subtilis_parser_error
void subtilis_parser_error(subtilis_parser_t *p, subtilis_token_t *t,
			   subtilis_error_t *err)
{
	subtilis_exp_t *e;

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

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

	e = subtilis_type_if_to_int(p, e, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		subtilis_exp_delete(e);
		return;
	}

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

	p->current->endproc = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x12edc
cmpl $0x0, (%r14)
jne 0x24878
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1e938
cmpl $0x0, (%r14)
je 0x2487e
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x367cf
cmpl $0x0, (%r14)
je 0x2489f
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2b166
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x2ba50
cmpl $0x0, (%r14)
jne 0x24878
movq 0x48(%rbx), %rax
movb $0x1, 0x88(%rax)
jmp 0x24878
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_error.c
// Function: subtilis_parser_try
void subtilis_parser_try(subtilis_parser_t *p, subtilis_token_t *t,
			 subtilis_error_t *err)
{
	subtilis_ir_operand_t handler_label;

	handler_label.label = subtilis_ir_section_new_label(p->current);

	p->level++;
	p->current->try_depth++;

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

	p->current->handler_list = subtilis_handler_list_update(
	    p->current->handler_list, p->level, handler_label.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_parser_compound_at_level(p, t, SUBTILIS_KEYWORD_ENDTRY, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

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

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

	p->current->try_depth--;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
callq 0x2cc99
movq %rax, %r15
incq 0x78(%rbx)
movq 0x48(%rbx), %rax
incq 0x68(%rax)
movq (%rbx), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
jne 0x24b19
movq 0x48(%rbx), %rax
movq 0x78(%rbx), %rsi
movq 0x78(%rax), %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2bb24
movq 0x48(%rbx), %rcx
movq %rax, 0x78(%rcx)
cmpl $0x0, (%r14)
jne 0x24b19
movq %rbx, %rdi
movq %r12, %rsi
movl $0x2a, %edx
movq %r14, %rcx
callq 0x1e2fc
cmpl $0x0, (%r14)
jne 0x24b19
movq (%rbx), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
jne 0x24b19
movq 0x48(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2cca6
cmpl $0x0, (%r14)
jne 0x24b19
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x35d3d
cmpl $0x0, (%r14)
jne 0x24b19
movq 0x48(%rbx), %rax
decq 0x68(%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_error.c
// Function: subtilis_parser_try_one
void subtilis_parser_try_one(subtilis_parser_t *p, subtilis_token_t *t,
			     subtilis_error_t *err)
{
	subtilis_ir_operand_t handler_label;

	handler_label.label = subtilis_ir_section_new_label(p->current);

	p->level++;
	p->current->try_depth++;

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

	p->current->handler_list = subtilis_handler_list_update(
	    p->current->handler_list, p->level, handler_label.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

	p->current->endproc = false;

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

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

	p->current->try_depth--;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
callq 0x2cc99
movq %rax, %r15
incq 0x78(%rbx)
movq 0x48(%rbx), %rax
incq 0x68(%rax)
movq (%rbx), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
jne 0x24d6a
movq 0x48(%rbx), %rax
movq 0x78(%rbx), %rsi
movq 0x78(%rax), %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2bb24
movq 0x48(%rbx), %rcx
movq %rax, 0x78(%rcx)
cmpl $0x0, (%r14)
jne 0x24d6a
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1e347
cmpl $0x0, (%r14)
jne 0x24d6a
movq 0x48(%rbx), %rdi
movb $0x0, 0x88(%rdi)
movq %r15, %rsi
movq %r14, %rdx
callq 0x2cca6
cmpl $0x0, (%r14)
jne 0x24d6a
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x35d3d
cmpl $0x0, (%r14)
jne 0x24d6a
movq 0x48(%rbx), %rax
decq 0x68(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_graphics.c
// Function: subtilis_parser_mode
void subtilis_parser_mode(subtilis_parser_t *p, subtilis_token_t *t,
			  subtilis_error_t *err)
{
	subtilis_exp_t *e;

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

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

	subtilis_ir_section_add_instr_no_reg(
	    p->current, SUBTILIS_OP_INSTR_MODE_I32, e->exp.ir_op, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (!p->settings.ignore_graphics_errors)
		subtilis_exp_handle_errors(p, err);

cleanup:

	subtilis_exp_delete(e);
}

// 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 0x24e03
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1ec82
cmpl $0x0, (%rbx)
je 0x24e09
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
movq 0x48(%r14), %rdi
movq 0x148(%rax), %rdx
movl $0x55, %esi
movq %rbx, %rcx
callq 0x2be1f
cmpl $0x0, (%rbx)
jne 0x24e3e
cmpb $0x0, 0xb9(%r14)
jne 0x24e3e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b01f
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_graphics.c
// Function: subtilis_parser_plot
void subtilis_parser_plot(subtilis_parser_t *p, subtilis_token_t *t,
			  subtilis_error_t *err)
{
	size_t i;
	subtilis_exp_t *e[3];

	memset(&e, 0, sizeof(e));

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

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

	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_PLOT,
					  e[0]->exp.ir_op, e[1]->exp.ir_op,
					  e[2]->exp.ir_op, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (!p->settings.ignore_graphics_errors)
		subtilis_exp_handle_errors(p, err);

cleanup:
	for (i = 0; i < 3; i++)
		subtilis_exp_delete(e[i]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq (%rdi), %rdi
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x24ef7
movq %rsp, %rdx
movl $0x3, %ecx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %r8
callq 0x1ecce
cmpl $0x0, (%rbx)
jne 0x24ee3
movq 0x48(%r14), %rdi
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rsi
movq 0x148(%rax), %rdx
movq 0x148(%rcx), %rcx
movq 0x148(%rsi), %r8
movl $0x56, %esi
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x24ee3
cmpb $0x0, 0xb9(%r14)
jne 0x24ee3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b01f
xorl %ebx, %ebx
movq (%rsp,%rbx,8), %rdi
callq 0x2b166
incq %rbx
cmpq $0x3, %rbx
jne 0x24ee5
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_graphics.c
// Function: subtilis_parser_wait
void subtilis_parser_wait(subtilis_parser_t *p, subtilis_token_t *t,
			  subtilis_error_t *err)
{
	subtilis_ir_section_add_instr_no_arg(p->current, SUBTILIS_OP_INSTR_WAIT,
					     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (!p->settings.ignore_graphics_errors) {
		subtilis_exp_handle_errors(p, 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 %rsi, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rdi
movl $0x5f, %esi
callq 0x2be37
cmpl $0x0, (%rbx)
je 0x24f28
popq %rbx
popq %r14
popq %r15
retq
cmpb $0x0, 0xb9(%r15)
jne 0x24f42
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2b01f
cmpl $0x0, (%rbx)
jne 0x24f22
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_graphics.c
// Function: prv_move_draw
static void prv_move_draw(subtilis_parser_t *p, subtilis_token_t *t,
			  int32_t plot_code, subtilis_error_t *err)
{
	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	if ((t->type == SUBTILIS_TOKEN_KEYWORD) &&
	    (t->tok.keyword.type == SUBTILIS_KEYWORD_BY)) {
		plot_code -= 4;
		subtilis_lexer_get(p->l, t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}

	prv_simple_plot(p, t, plot_code, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
movq %rcx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
je 0x24f8c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x1, (%r14)
jne 0x24faf
cmpl $0x10, 0x8(%r14)
jne 0x24faf
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x24f81
addl $-0x4, %ebp
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x24ffc
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_graphics.c
// Function: prv_simple_plot
static void prv_simple_plot(subtilis_parser_t *p, subtilis_token_t *t,
			    int32_t plot_code, subtilis_error_t *err)
{
	size_t i;
	subtilis_exp_t *e[3];

	memset(&e, 0, sizeof(e));

	subtilis_parser_statement_int_args(p, t, &e[1], 2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	e[0] = subtilis_exp_new_int32(plot_code, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	e[0] = subtilis_type_if_exp_to_var(p, e[0], err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_PLOT,
					  e[0]->exp.ir_op, e[1]->exp.ir_op,
					  e[2]->exp.ir_op, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (!p->settings.ignore_graphics_errors)
		subtilis_exp_handle_errors(p, err);

cleanup:
	for (i = 0; i < 3; i++)
		subtilis_exp_delete(e[i]);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %rdx
movaps %xmm0, -0x8(%rdx)
movq $0x0, 0x8(%rdx)
movl $0x2, %ecx
movq %rbx, %r8
callq 0x1ecce
cmpl $0x0, (%rbx)
je 0x25048
xorl %ebx, %ebx
movq (%rsp,%rbx,8), %rdi
callq 0x2b166
incq %rbx
cmpq $0x3, %rbx
jne 0x25034
jmp 0x25072
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2b7af
movq %rax, (%rsp)
cmpl $0x0, (%rbx)
jne 0x25072
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x36119
movq %rax, (%rsp)
cmpl $0x0, (%rbx)
je 0x2507b
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x48(%r14), %rdi
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rsi
movq 0x148(%rax), %rdx
movq 0x148(%rcx), %rcx
movq 0x148(%rsi), %r8
movl $0x56, %esi
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x25032
cmpb $0x0, 0xb9(%r14)
jne 0x25032
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b01f
jmp 0x25032
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_graphics.c
// Function: subtilis_parser_line
void subtilis_parser_line(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;

	prv_simple_plot(p, t, 4, err);

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

	if (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;

	prv_simple_plot(p, t, 5, 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 0x25178
movq %r14, %rdi
movq %r15, %rsi
movl $0x4, %edx
movq %rbx, %rcx
callq 0x24ffc
movq %r15, %rdi
callq 0x12ad0
cmpl $0x2, (%r15)
jne 0x25144
cmpb $0x2c, (%rax)
jne 0x25119
cmpb $0x0, 0x1(%rax)
je 0x2517e
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x4e8c1(%rip), %r10     # 0x739ec
leaq 0x4e460(%rip), %rdx     # 0x73592
movq %rbx, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0xcd
jmp 0x2516d
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x4e896(%rip), %r10     # 0x739ec
leaq 0x4e435(%rip), %rdx     # 0x73592
movq %rbx, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0xc7
pushq %r10
callq 0x143da
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq (%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x25178
movq %r14, %rdi
movq %r15, %rsi
movl $0x5, %edx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x24ffc
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_graphics.c
// Function: subtilis_parser_rectangle
void subtilis_parser_rectangle(subtilis_parser_t *p, subtilis_token_t *t,
			       subtilis_error_t *err)
{
	const char *tbuf;
	bool fill = false;

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	if ((t->type == SUBTILIS_TOKEN_KEYWORD) &&
	    (t->tok.keyword.type == SUBTILIS_KEYWORD_FILL)) {
		subtilis_lexer_get(p->l, t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		fill = true;
	}

	prv_simple_plot(p, t, 4, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

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

	if (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;

	if (fill)
		prv_simple_plot(p, t, 97, err);
	else
		prv_rectangle_outline(p, t, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x253ce
cmpl $0x1, (%r14)
jne 0x253b4
cmpl $0x35, 0x8(%r14)
jne 0x253b4
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x253ce
movb $0x1, %bpl
jmp 0x253b6
xorl %ebp, %ebp
movq %r15, %rdi
movq %r14, %rsi
movl $0x4, %edx
movq %rbx, %rcx
callq 0x24ffc
cmpl $0x0, (%rbx)
je 0x253d9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x12ad0
cmpl $0x2, (%r14)
jne 0x2541d
cmpb $0x2c, (%rax)
jne 0x253f2
cmpb $0x0, 0x1(%rax)
je 0x25456
movq (%r15), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x4e5e8(%rip), %r10     # 0x739ec
leaq 0x4e187(%rip), %rdx     # 0x73592
movq %rbx, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x189                  # imm = 0x189
jmp 0x25446
movq (%r15), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x4e5bd(%rip), %r10     # 0x739ec
leaq 0x4e15c(%rip), %rdx     # 0x73592
movq %rbx, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x183                  # imm = 0x183
pushq %r10
callq 0x143da
addq $0x18, %rsp
jmp 0x253d2
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x253ce
movq %r15, %rdi
movq %r14, %rsi
testb %bpl, %bpl
je 0x2548f
movl $0x61, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x24ffc
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2549e
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_graphics.c
// Function: subtilis_parser_point
void subtilis_parser_point(subtilis_parser_t *p, subtilis_token_t *t,
			   subtilis_error_t *err)
{
	int32_t plot_code = 69;

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

	/*
	 * TODO: Implement POINT TO, once I figure out how
	 */

	if ((t->type == SUBTILIS_TOKEN_KEYWORD) &&
	    (t->tok.keyword.type == SUBTILIS_KEYWORD_BY)) {
		plot_code -= 4;
		subtilis_lexer_get(p->l, t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}

	prv_simple_plot(p, t, plot_code, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
callq 0x12edc
cmpl $0x0, (%rbx)
je 0x256f0
popq %rbx
popq %r14
popq %r15
retq
movl $0x45, %edx
cmpl $0x1, (%r14)
jne 0x2571a
cmpl $0x10, 0x8(%r14)
jne 0x2571a
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x256ea
movl $0x41, %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x24ffc
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_graphics.c
// Function: subtilis_parser_origin
void subtilis_parser_origin(subtilis_parser_t *p, subtilis_token_t *t,
			    subtilis_error_t *err)
{
	size_t i;
	subtilis_exp_t *e[2];
	subtilis_ir_operand_t op2;

	memset(&e, 0, sizeof(e));
	memset(&op2, 0, sizeof(op2));

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

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

	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_ORIGIN,
					  e[0]->exp.ir_op, e[1]->exp.ir_op, op2,
					  err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	if (!p->settings.ignore_graphics_errors)
		subtilis_exp_handle_errors(p, err);

cleanup:
	for (i = 0; i < 2; i++)
		subtilis_exp_delete(e[i]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq (%rdi), %rdi
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x259b1
movq %rsp, %rdx
movl $0x2, %ecx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %r8
callq 0x1ecce
cmpl $0x0, (%rbx)
jne 0x2599e
movq 0x48(%r14), %rdi
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x148(%rax), %rdx
movq 0x148(%rcx), %rcx
movl $0x59, %esi
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x2599e
cmpb $0x0, 0xb9(%r14)
jne 0x2599e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b01f
movq (%rsp), %rdi
callq 0x2b166
movq 0x8(%rsp), %rdi
callq 0x2b166
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_graphics.c
// Function: subtilis_parser_cls
void subtilis_parser_cls(subtilis_parser_t *p, subtilis_token_t *t,
			 subtilis_error_t *err)
{
	subtilis_ir_section_add_instr_no_arg(p->current, SUBTILIS_OP_INSTR_CLS,
					     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (!p->settings.ignore_graphics_errors) {
		subtilis_exp_handle_errors(p, 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 %rsi, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rdi
movl $0x5b, %esi
callq 0x2be37
cmpl $0x0, (%rbx)
je 0x259e2
popq %rbx
popq %r14
popq %r15
retq
cmpb $0x0, 0xb9(%r15)
jne 0x259fc
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2b01f
cmpl $0x0, (%rbx)
jne 0x259dc
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_graphics.c
// Function: subtilis_parser_clg
void subtilis_parser_clg(subtilis_parser_t *p, subtilis_token_t *t,
			 subtilis_error_t *err)
{
	subtilis_ir_section_add_instr_no_arg(p->current, SUBTILIS_OP_INSTR_CLG,
					     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (!p->settings.ignore_graphics_errors) {
		subtilis_exp_handle_errors(p, 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 %rsi, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rdi
movl $0x5c, %esi
callq 0x2be37
cmpl $0x0, (%rbx)
je 0x25a36
popq %rbx
popq %r14
popq %r15
retq
cmpb $0x0, 0xb9(%r15)
jne 0x25a50
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2b01f
cmpl $0x0, (%rbx)
jne 0x25a30
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_graphics.c
// Function: subtilis_parser_on
void subtilis_parser_on(subtilis_parser_t *p, subtilis_token_t *t,
			subtilis_error_t *err)
{
	subtilis_ir_section_add_instr_no_arg(p->current, SUBTILIS_OP_INSTR_ON,
					     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (!p->settings.ignore_graphics_errors) {
		subtilis_exp_handle_errors(p, 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 %rsi, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rdi
movl $0x5d, %esi
callq 0x2be37
cmpl $0x0, (%rbx)
je 0x25a8a
popq %rbx
popq %r14
popq %r15
retq
cmpb $0x0, 0xb9(%r15)
jne 0x25aa4
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2b01f
cmpl $0x0, (%rbx)
jne 0x25a84
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_graphics.c
// Function: subtilis_parser_off
void subtilis_parser_off(subtilis_parser_t *p, subtilis_token_t *t,
			 subtilis_error_t *err)
{
	subtilis_ir_section_add_instr_no_arg(p->current, SUBTILIS_OP_INSTR_OFF,
					     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (!p->settings.ignore_graphics_errors) {
		subtilis_exp_handle_errors(p, 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 %rsi, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rdi
movl $0x5e, %esi
callq 0x2be37
cmpl $0x0, (%rbx)
je 0x25ade
popq %rbx
popq %r14
popq %r15
retq
cmpb $0x0, 0xb9(%r15)
jne 0x25af8
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2b01f
cmpl $0x0, (%rbx)
jne 0x25ad8
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_input.c
// Function: subtilis_parser_get
subtilis_exp_t *subtilis_parser_get(subtilis_parser_t *p, subtilis_token_t *t,
				    subtilis_error_t *err)
{
	size_t reg;
	subtilis_exp_t *e;

	reg = subtilis_ir_section_add_instr1(p->current, SUBTILIS_OP_INSTR_GET,
					     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

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

	e = subtilis_exp_new_int32_var(reg, err);

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		subtilis_exp_delete(e);
		return NULL;
	}

	return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x48(%rdi), %rdi
movl $0x6c, %esi
callq 0x2be13
cmpl $0x0, (%rbx)
jne 0x25d70
movq %rax, %r12
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2b01f
cmpl $0x0, (%rbx)
jne 0x25d70
movl %r12d, %edi
movq %rbx, %rsi
callq 0x2b71f
movq %rax, %r12
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
je 0x25d73
movq %r12, %rdi
callq 0x2b166
xorl %r12d, %r12d
movq %r12, %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_input.c
// Function: subtilis_parser_inkey
subtilis_exp_t *subtilis_parser_inkey(subtilis_parser_t *p, subtilis_token_t *t,
				      subtilis_error_t *err)
{
	subtilis_exp_t *e;
	size_t reg;
	subtilis_ir_section_t *current;

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

	if (e->type.type == SUBTILIS_TYPE_CONST_INTEGER)
		return prv_inkey_const(p, t, e, err);

	reg = e->exp.ir_op.reg;
	subtilis_exp_delete(e);

	current = subtilis_builtins_ir_add_1_arg_int(
	    p, "_inkey", &subtilis_type_integer, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		if (err->type != SUBTILIS_ERROR_ALREADY_DEFINED)
			return NULL;
		subtilis_error_init(err);
	} else {
		subtilis_builtins_ir_inkey(current, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return NULL;
	}

	return subtilis_parser_call_1_arg_fn(
	    p, "_inkey", reg, SUBTILIS_BUILTINS_MAX,
	    SUBTILIS_IR_REG_TYPE_INTEGER, &subtilis_type_integer, true, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
callq 0x1f06b
cmpl $0x0, (%rbx)
jne 0x25e89
movq %rax, %r15
cmpl $0x1, (%rax)
jne 0x25dfb
movl 0x148(%r15), %ebp
cmpl $0xffffff00, %ebp       # imm = 0xFFFFFF00
jne 0x25e38
movq 0x48(%r14), %rdi
movl $0x6f, %esi
movq %rbx, %rdx
callq 0x2be13
jmp 0x25e69
movq 0x148(%r15), %r12
movq %r15, %rdi
callq 0x2b166
leaq 0x4dbf6(%rip), %rsi     # 0x73a07
leaq 0x4eb00(%rip), %rdx     # 0x74918
movq %r14, %rdi
movq %rbx, %rcx
callq 0x33394
movl (%rbx), %ecx
testl %ecx, %ecx
je 0x25e94
cmpl $0x20, %ecx
jne 0x25e89
movq %rbx, %rdi
callq 0x143b4
jmp 0x25ea4
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x36119
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x25e81
shrl $0x1f, %ebp
addl $0x6d, %ebp
movq 0x148(%r15), %rdx
movq 0x48(%r14), %rdi
movl %ebp, %esi
movq %rbx, %rcx
callq 0x2be09
cmpl $0x0, (%rbx)
jne 0x25e81
movq %rax, %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b01f
cmpl $0x0, (%rbx)
je 0x25ece
movq %r15, %rdi
callq 0x2b166
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
movq %rbx, %rsi
callq 0x30ac8
cmpl $0x0, (%rbx)
jne 0x25e89
leaq 0x4db5c(%rip), %rsi     # 0x73a07
leaq 0x4ea66(%rip), %r9      # 0x74918
movq %r14, %rdi
movq %r12, %rdx
movl $0x9, %ecx
xorl %r8d, %r8d
pushq %rbx
pushq $0x1
callq 0x1ea76
addq $0x10, %rsp
jmp 0x25e8b
movq %r15, %rdi
callq 0x2b166
movl %r12d, %edi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2b71f
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_mem.c
// Function: subtilis_parser_mem_heap_free
subtilis_exp_t *subtilis_parser_mem_heap_free(subtilis_parser_t *p,
					      subtilis_token_t *t,
					      subtilis_error_t *err)
{
	size_t reg;
	subtilis_exp_t *e = NULL;

	reg = subtilis_ir_section_add_instr1(p->current,
					     SUBTILIS_OP_INSTR_HEAP_FREE, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	e = subtilis_exp_new_int32_var(reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

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

	return e;

cleanup:

	subtilis_exp_delete(e);

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq 0x48(%rdi), %rdi
movl $0x87, %esi
callq 0x2be13
cmpl $0x0, (%rbx)
jne 0x25f3e
movl %eax, %edi
movq %rbx, %rsi
callq 0x2b71f
cmpl $0x0, (%rbx)
jne 0x25f3e
movq %rax, %r14
movq (%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
je 0x25f41
movq %r14, %rdi
callq 0x2b166
xorl %r14d, %r14d
movq %r14, %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_mem.c
// Function: subtilis_parser_copy
void subtilis_parser_copy(subtilis_parser_t *p, subtilis_token_t *t,
			  subtilis_error_t *err)
{
	subtilis_exp_t *objs[2] = {NULL, NULL};

	prv_mem_statement(p, t, &objs[0], err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_type_if_memcpy(p, objs[0], objs[1], err);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movq %rbx, %rcx
callq 0x25f8f
cmpl $0x0, (%rbx)
jne 0x25f87
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x361f4
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_mem.c
// Function: prv_mem_statement
static void prv_mem_statement(subtilis_parser_t *p, subtilis_token_t *t,
			      subtilis_exp_t **objs, subtilis_error_t *err)
{
	const char *tbuf;
	size_t args;

	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;
	}

	args = subtilis_var_bracketed_args_have_b(p, t, &objs[0], 2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (args != 2) {
		subtilis_error_set_exp_expected(err, ")", p->l->stream->name,
						p->l->line);
		goto cleanup;
	}

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

	return;

cleanup:

	subtilis_exp_delete(objs[1]);
	subtilis_exp_delete(objs[0]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq (%rdi), %rdi
movq %rcx, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
je 0x25fba
addq $0x8, %rsp
jmp 0x26005
movq %r15, %rdi
callq 0x12ad0
cmpl $0x2, (%r15)
jne 0x25fd3
cmpb $0x28, (%rax)
jne 0x25fd3
cmpb $0x0, 0x1(%rax)
je 0x2600d
movq (%r12), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x4da41(%rip), %r10     # 0x73a27
leaq 0x4d909(%rip), %rdx     # 0x738f6
movq %r14, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x43
pushq %r10
callq 0x143da
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x2, %ecx
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %r8
callq 0x1f31a
cmpl $0x0, (%r14)
jne 0x25fb4
movq (%r12), %rdi
cmpq $0x2, %rax
jne 0x26049
movq %r15, %rsi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
jne 0x2607a
jmp 0x25fb4
movq 0x30(%rdi), %r8
movl 0x38(%rdi), %r9d
leaq 0x4d9cf(%rip), %rax     # 0x73a27
leaq 0x4daa6(%rip), %rdx     # 0x73b05
leaq 0x4ddaf(%rip), %rcx     # 0x73e15
movq %r14, %rdi
movl $0x15, %esi
pushq $0x4d
pushq %rax
callq 0x143da
addq $0x10, %rsp
movq 0x8(%rbx), %rdi
callq 0x2b166
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2b166
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_mem.c
// Function: subtilis_parser_copy_exp
subtilis_exp_t *subtilis_parser_copy_exp(subtilis_parser_t *p,
					 subtilis_token_t *t,
					 subtilis_error_t *err)
{
	subtilis_exp_t *objs[2] = {NULL, NULL};
	subtilis_exp_t *retval = NULL;

	prv_mem_statement(p, t, &objs[0], err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	retval = subtilis_type_if_dup(objs[0], err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_type_if_memcpy(p, objs[0], objs[1], err);
	objs[0] = NULL;
	objs[1] = NULL;
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	return retval;

cleanup:
	subtilis_exp_delete(retval);
	subtilis_exp_delete(objs[1]);
	subtilis_exp_delete(objs[0]);
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r15
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movq %rbx, %rcx
callq 0x25f8f
cmpl $0x0, (%rbx)
jne 0x2610a
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x36182
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x260ef
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x361f4
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
cmpl $0x0, (%rbx)
je 0x2610d
movq %r14, %rdi
callq 0x2b166
movq 0x8(%rsp), %rdi
callq 0x2b166
movq (%rsp), %rdi
callq 0x2b166
xorl %r14d, %r14d
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_mem.c
// Function: subtilis_parser_append
void subtilis_parser_append(subtilis_parser_t *p, subtilis_token_t *t,
			    subtilis_error_t *err)
{
	subtilis_exp_t *objs[3] = {NULL};
	size_t i;

	prv_append_statement(p, t, objs, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (objs[0]->temporary) {
		subtilis_error_set_temporary_not_allowed(
		    err, "first argument to append", p->l->stream->name,
		    p->l->line);
		goto cleanup;
	}

	subtilis_type_if_append(p, objs[0], objs[1], objs[2], err);
	return;

cleanup:
	for (i = 0; i < 3; i++)
		subtilis_exp_delete(objs[i]);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
movq %rbx, %rcx
callq 0x261bd
cmpl $0x0, (%rbx)
jne 0x261b5
movq (%rsp), %rsi
cmpq $0x0, 0x158(%rsi)
je 0x261a0
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x4d8c2(%rip), %rax     # 0x73a27
leaq 0x4d8a2(%rip), %rdx     # 0x73a0e
leaq 0x4dca2(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x53, %esi
pushq $0xbc
pushq %rax
callq 0x143da
addq $0x10, %rsp
xorl %ebx, %ebx
movq (%rsp,%rbx,8), %rdi
callq 0x2b166
incq %rbx
cmpq $0x3, %rbx
jne 0x2618c
jmp 0x261b5
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %r8
callq 0x36726
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_mem.c
// Function: prv_append_statement
static void prv_append_statement(subtilis_parser_t *p, subtilis_token_t *t,
				 subtilis_exp_t **objs, subtilis_error_t *err)
{
	const char *tbuf;
	size_t args;
	size_t i;

	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;
	}

	args = subtilis_var_bracketed_args_have_b(p, t, &objs[0], 3, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (args < 2) {
		subtilis_error_set_exp_expected(err, ")", p->l->stream->name,
						p->l->line);
		goto cleanup;
	}

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

	return;

cleanup:

	for (i = 0; i < args; i++)
		subtilis_exp_delete(objs[i]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
movq (%rdi), %rdi
movq %rcx, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
jne 0x2622f
movq %r12, %rdi
callq 0x12ad0
cmpl $0x2, (%r12)
jne 0x261fd
cmpb $0x28, (%rax)
jne 0x261fd
cmpb $0x0, 0x1(%rax)
je 0x26239
movq (%r13), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x4d817(%rip), %r10     # 0x73a27
leaq 0x4d6df(%rip), %rdx     # 0x738f6
movq %r14, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x6b
pushq %r10
callq 0x143da
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x3, %ecx
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r14, %r8
callq 0x1f31a
cmpl $0x0, (%r14)
jne 0x2622f
movq %rax, %r15
movq (%r13), %rdi
cmpq $0x1, %rax
ja 0x2629b
movq 0x30(%rdi), %r8
movl 0x38(%rdi), %r9d
leaq 0x4d7b6(%rip), %rax     # 0x73a27
leaq 0x4d88d(%rip), %rdx     # 0x73b05
leaq 0x4db96(%rip), %rcx     # 0x73e15
movq %r14, %rdi
movl $0x15, %esi
pushq $0x75
pushq %rax
callq 0x143da
addq $0x10, %rsp
cmpq $0x1, %r15
jne 0x2622f
jmp 0x262ac
movq %r12, %rsi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
je 0x2622f
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
callq 0x2b166
incq %r14
cmpq %r14, %r15
jne 0x262af
jmp 0x2622f
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_output.c
// Function: prv_vdu_byte
static void prv_vdu_byte(subtilis_parser_t *p, subtilis_exp_t *e,
			 subtilis_error_t *err)
{
	subtilis_op_instr_type_t itype;

	if (e->type.type == SUBTILIS_TYPE_INTEGER) {
		itype = SUBTILIS_OP_INSTR_VDU;
	} else if (e->type.type == SUBTILIS_TYPE_CONST_INTEGER) {
		itype = SUBTILIS_OP_INSTR_VDUI;
	} else {
		subtilis_error_set_assertion_failed(err);
		return;
	}

	subtilis_ir_section_add_instr_no_reg(p->current, itype, e->exp.ir_op,
					     err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	if (!p->settings.ignore_graphics_errors)
		subtilis_exp_handle_errors(p, err);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movl (%rsi), %eax
cmpl $0x5, %eax
je 0x26728
cmpl $0x1, %eax
jne 0x26759
movl $0x70, %eax
jmp 0x2672d
movl $0x71, %eax
movq 0x48(%r14), %rdi
movq 0x148(%rsi), %rdx
movl %eax, %esi
movq %rbx, %rcx
callq 0x2be1f
cmpl $0x0, (%rbx)
jne 0x26751
cmpb $0x0, 0xb9(%r14)
je 0x26779
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4d2e7(%rip), %rdx     # 0x73a47
movq %rbx, %rdi
movl $0xf, %esi
movl $0x21, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x145a4
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2b01f
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_output.c
// Function: prv_vdu_2bytes
static void prv_vdu_2bytes(subtilis_parser_t *p, subtilis_exp_t *e,
			   subtilis_error_t *err)
{
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t op2;

	if (e->type.type == SUBTILIS_TYPE_INTEGER) {
		op2.integer = 0xff;
		op1.reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_ANDI_I32, e->exp.ir_op, op2,
		    err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		subtilis_ir_section_add_instr_no_reg(
		    p->current, SUBTILIS_OP_INSTR_VDU, op1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		if (!p->settings.ignore_graphics_errors) {
			subtilis_exp_handle_errors(p, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		}
		op2.integer = 8;
		op1.reg = subtilis_ir_section_add_instr(
		    p->current, SUBTILIS_OP_INSTR_LSRI_I32, e->exp.ir_op, op2,
		    err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		subtilis_ir_section_add_instr_no_reg(
		    p->current, SUBTILIS_OP_INSTR_VDU, op1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	} else if (e->type.type == SUBTILIS_TYPE_CONST_INTEGER) {
		op1.integer = e->exp.ir_op.integer & 0xff;
		subtilis_ir_section_add_instr_no_reg(
		    p->current, SUBTILIS_OP_INSTR_VDUI, op1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		if (!p->settings.ignore_graphics_errors) {
			subtilis_exp_handle_errors(p, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		}
		op1.integer = (e->exp.ir_op.integer >> 8) & 0xff;
		subtilis_ir_section_add_instr_no_reg(
		    p->current, SUBTILIS_OP_INSTR_VDUI, op1, err);
	} else {
		subtilis_error_set_assertion_failed(err);
		return;
	}
	if (!p->settings.ignore_graphics_errors)
		subtilis_exp_handle_errors(p, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl (%rsi), %eax
cmpl $0x1, %eax
je 0x26843
cmpl $0x5, %eax
jne 0x26867
movq 0x48(%r14), %rdi
movq 0x148(%r15), %rdx
movl $0xff, %ecx
movl $0x25, %esi
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x26861
movq 0x48(%r14), %rdi
movl $0x71, %esi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x2be1f
cmpl $0x0, (%rbx)
jne 0x26861
cmpb $0x0, 0xb9(%r14)
jne 0x26806
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b01f
cmpl $0x0, (%rbx)
jne 0x26861
movq 0x48(%r14), %rdi
movq 0x148(%r15), %rdx
movl $0x8, %ecx
movl $0x4e, %esi
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x26861
movq 0x48(%r14), %rdi
movl $0x71, %esi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x2be1f
cmpl $0x0, (%rbx)
jne 0x26861
jmp 0x268b8
movzbl 0x148(%r15), %edx
movq 0x48(%r14), %rdi
movl $0x70, %esi
movq %rbx, %rcx
callq 0x2be1f
cmpl $0x0, (%rbx)
je 0x26885
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4d1d9(%rip), %rdx     # 0x73a47
movq %rbx, %rdi
movl $0xf, %esi
movl $0x5d, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x145a4
cmpb $0x0, 0xb9(%r14)
jne 0x2689f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b01f
cmpl $0x0, (%rbx)
jne 0x26861
movzbl 0x149(%r15), %edx
movq 0x48(%r14), %rdi
movl $0x70, %esi
movq %rbx, %rcx
callq 0x2be1f
cmpb $0x0, 0xb9(%r14)
jne 0x26861
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2b01f
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_output.c
// Function: prv_vdu_1byte9zeros
static void prv_vdu_1byte9zeros(subtilis_parser_t *p, subtilis_exp_t *e,
				subtilis_error_t *err)
{
	size_t i;
	subtilis_ir_operand_t op1;

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

	op1.integer = 0;
	for (i = 0; i < 9; i++) {
		subtilis_ir_section_add_instr_no_reg(
		    p->current, SUBTILIS_OP_INSTR_VDUI, op1, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
		if (!p->settings.ignore_graphics_errors) {
			subtilis_exp_handle_errors(p, err);
			if (err->type != SUBTILIS_ERROR_OK)
				return;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
callq 0x2670b
cmpl $0x0, (%rbx)
jne 0x26945
movq 0x48(%r14), %rdi
movl $0x70, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x2be1f
cmpl $0x0, (%rbx)
jne 0x26945
xorl %r15d, %r15d
cmpb $0x0, 0xb9(%r14)
je 0x26914
cmpq $0x7, %r15
jbe 0x2692a
jmp 0x26945
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b01f
cmpl $0x0, (%rbx)
jne 0x26945
cmpq $0x8, %r15
jae 0x26945
incq %r15
movq 0x48(%r14), %rdi
movl $0x70, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x2be1f
cmpl $0x0, (%rbx)
je 0x26902
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_output.c
// Function: prv_pos
static subtilis_exp_t *prv_pos(subtilis_parser_t *p, subtilis_token_t *t,
			       subtilis_op_instr_type_t itype,
			       subtilis_error_t *err)
{
	size_t reg;

	reg = subtilis_ir_section_add_instr1(p->current, itype, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

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

	return subtilis_exp_new_int32_var(reg, err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq 0x48(%rdi), %rdi
movl %edx, %esi
movq %rcx, %rdx
callq 0x2be13
cmpl $0x0, (%rbx)
jne 0x26cfe
movq %rax, %r14
movq (%r12), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
je 0x26d0c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl %r14d, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2b71f