// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x21(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x133f0
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x2e8ea
jmp 0x2ea4b
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x2e923
movq -0x10(%rbp), %rax
cmpl $0x35, 0x8(%rax)
jne 0x2e923
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x133f0
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x2e91f
jmp 0x2ea4b
movb $0x1, -0x21(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rcx
movl $0x4, %edx
callq 0x2e3b0
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x2e947
jmp 0x2ea4b
movq -0x10(%rbp), %rdi
callq 0x12d70
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
je 0x2e9a4
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %r9d
movl $0x1d, %esi
leaq 0x7bc22(%rip), %rdx     # 0xaa5a9
leaq 0x7c07e(%rip), %rax     # 0xaaa0c
movq %rax, (%rsp)
movl $0x183, 0x8(%rsp)       # imm = 0x183
callq 0x156d0
jmp 0x2ea4b
movq -0x20(%rbp), %rdi
leaq 0x7bbfa(%rip), %rsi     # 0xaa5a9
callq 0x12140
cmpl $0x0, %eax
je 0x2e9fd
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %r9d
movl $0x1d, %esi
leaq 0x7bbc6(%rip), %rdx     # 0xaa5a9
leaq 0x7c022(%rip), %rax     # 0xaaa0c
movq %rax, (%rsp)
movl $0x189, 0x8(%rsp)       # imm = 0x189
callq 0x156d0
jmp 0x2ea4b
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x133f0
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x2ea1c
jmp 0x2ea4b
testb $0x1, -0x21(%rbp)
je 0x2ea3a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rcx
movl $0x61, %edx
callq 0x2e3b0
jmp 0x2ea4b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2ea60
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)