// File: /workspace/github_c_makefile_star2_O1/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 0x2bb29
movq %rax, (%rsp)
cmpl $0x0, (%rbx)
jne 0x257cd
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x36269
movq %rax, (%rsp)
cmpl $0x0, (%rbx)
jne 0x257b9
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2bb29
movq %rax, 0x8(%rsp)
cmpl $0x0, (%rbx)
jne 0x257b9
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x36269
movq %rax, 0x8(%rsp)
cmpl $0x0, (%rbx)
jne 0x257b9
leaq 0x10(%rsp), %rdx
movl $0x2, %ecx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %r8
callq 0x1ec0a
cmpl $0x0, (%rbx)
jne 0x257b9
movq 0x10(%rsp), %rax
movl 0x148(%rax), %edi
movq %rbx, %rsi
callq 0x2ba99
movq %rax, 0x20(%rsp)
cmpl $0x0, (%rbx)
jne 0x257b9
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x36c69
movq %rax, 0x20(%rsp)
cmpl $0x0, (%rbx)
jne 0x257b9
movq 0x18(%rsp), %rax
movl 0x148(%rax), %edi
movq %rbx, %rsi
callq 0x2ba99
movq %rax, 0x28(%rsp)
cmpl $0x0, (%rbx)
jne 0x257b9
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x36c69
movq %rax, 0x28(%rsp)
cmpl $0x0, (%rbx)
jne 0x257b9
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 0x2c0c2
cmpl $0x0, (%rbx)
jne 0x257b9
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 0x2c0c2
cmpl $0x0, (%rbx)
jne 0x257b9
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 0x2c0c2
cmpl $0x0, (%rbx)
jne 0x257b9
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 0x2c0c2
xorl %ebx, %ebx
movq (%rsp,%rbx,8), %rdi
callq 0x2b4c3
incq %rbx
cmpq $0x6, %rbx
jne 0x257bb
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq