// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_graphics.c
// Function: prv_rectangle_outline
static void prv_rectangle_outline(subtilis_parser_t *p, subtilis_token_t *t,
				  subtilis_error_t *err)
{
	size_t i;
	subtilis_exp_t *e[6];

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

	e[0] = subtilis_exp_new_int32(1, 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)
		goto cleanup;

	e[1] = subtilis_exp_new_int32(0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	e[1] = subtilis_type_if_exp_to_var(p, e[1], err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	;

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

	e[4] = subtilis_exp_new_int32_var(e[2]->exp.ir_op.reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	e[4] = subtilis_type_if_unary_minus(p, e[4], err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	e[5] = subtilis_exp_new_int32_var(e[3]->exp.ir_op.reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	e[5] = subtilis_type_if_unary_minus(p, e[5], 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[2]->exp.ir_op,
					  e[1]->exp.ir_op, 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[3]->exp.ir_op, 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[4]->exp.ir_op,
					  e[1]->exp.ir_op, 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[5]->exp.ir_op, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

cleanup:

	for (i = 0; i < 6; i++)
		subtilis_exp_delete(e[i]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl $0x1, %edi
movq %rdx, %rsi
callq 0x2b7af
cmpl $0x0, (%rbx)
jne 0x256b8
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x36119
movq %rax, (%rsp)
cmpl $0x0, (%rbx)
jne 0x256a4
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2b7af
movq %rax, 0x8(%rsp)
cmpl $0x0, (%rbx)
jne 0x256a4
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x36119
movq %rax, 0x8(%rsp)
cmpl $0x0, (%rbx)
jne 0x256a4
leaq 0x10(%rsp), %rdx
movl $0x2, %ecx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %r8
callq 0x1ecce
cmpl $0x0, (%rbx)
jne 0x256a4
movq 0x10(%rsp), %rax
movl 0x148(%rax), %edi
movq %rbx, %rsi
callq 0x2b71f
movq %rax, 0x20(%rsp)
cmpl $0x0, (%rbx)
jne 0x256a4
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x36b0c
movq %rax, 0x20(%rsp)
cmpl $0x0, (%rbx)
jne 0x256a4
movq 0x18(%rsp), %rax
movl 0x148(%rax), %edi
movq %rbx, %rsi
callq 0x2b71f
movq %rax, 0x28(%rsp)
cmpl $0x0, (%rbx)
jne 0x256a4
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x36b0c
movq %rax, 0x28(%rsp)
cmpl $0x0, (%rbx)
jne 0x256a4
movq 0x48(%r14), %rdi
movq 0x10(%rsp), %rax
movq (%rsp), %rcx
movq 0x8(%rsp), %rsi
movq 0x148(%rcx), %rdx
movq 0x148(%rax), %rcx
movq 0x148(%rsi), %r8
movl $0x56, %esi
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x256a4
movq 0x48(%r14), %rdi
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x18(%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 0x256a4
movq 0x48(%r14), %rdi
movq 0x20(%rsp), %rax
movq (%rsp), %rcx
movq 0x8(%rsp), %rsi
movq 0x148(%rcx), %rdx
movq 0x148(%rax), %rcx
movq 0x148(%rsi), %r8
movl $0x56, %esi
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x256a4
movq 0x48(%r14), %rdi
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x28(%rsp), %rsi
movq 0x148(%rax), %rdx
movq 0x148(%rcx), %rcx
movq 0x148(%rsi), %r8
movl $0x56, %esi
movq %rbx, %r9
callq 0x2bd42
xorl %ebx, %ebx
movq (%rsp,%rbx,8), %rdi
callq 0x2b166
incq %rbx
cmpq $0x6, %rbx
jne 0x256a6
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq