// File: /workspace/github_c_makefile_star2_O2/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
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x12e0e
cmpl $0x0, (%rbx)
jne 0x2435a
cmpl $0x1, (%r15)
jne 0x24342
cmpl $0x35, 0x8(%r15)
jne 0x24342
movq (%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12e0e
cmpl $0x0, (%rbx)
jne 0x2435a
movb $0x1, %bpl
jmp 0x24344
xorl %ebp, %ebp
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x23fa5
cmpl $0x0, (%rbx)
je 0x24365
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x12a25
cmpl $0x2, (%r15)
jne 0x243a7
cmpb $0x2c, (%rax)
jne 0x2437e
cmpb $0x0, 0x1(%rax)
je 0x243db
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x49614(%rip), %r10     # 0x6d9a4
leaq 0x491fb(%rip), %rdx     # 0x6d592
pushq $0x1d
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
pushq $0x189                  # imm = 0x189
jmp 0x243ce
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x495eb(%rip), %r10     # 0x6d9a4
leaq 0x491d2(%rip), %rdx     # 0x6d592
pushq $0x1d
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
pushq $0x183                  # imm = 0x183
pushq %r10
callq 0x140cd
addq $0x48, %rsp
jmp 0x2435e
movq (%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x12e0e
cmpl $0x0, (%rbx)
jne 0x2435a
testb %bpl, %bpl
je 0x24412
pushq $0x61
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x23fa5
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
pushq $0x1
popq %rdi
movq %rbx, %rsi
callq 0x2a369
cmpl $0x0, (%rbx)
jne 0x2435a
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x3415f
movq %rax, (%rsp)
cmpl $0x0, (%rbx)
jne 0x245fa
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2a369
movq %rax, 0x8(%rsp)
cmpl $0x0, (%rbx)
jne 0x245fa
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x3415f
movq %rax, 0x8(%rsp)
cmpl $0x0, (%rbx)
jne 0x245fa
leaq 0x10(%rsp), %rdx
pushq $0x2
popq %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %r8
callq 0x1e057
cmpl $0x0, (%rbx)
jne 0x245fa
movq 0x10(%rsp), %rax
movl 0x148(%rax), %edi
movq %rbx, %rsi
callq 0x2a336
movq %rax, 0x20(%rsp)
cmpl $0x0, (%rbx)
jne 0x245fa
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x34afc
movq %rax, 0x20(%rsp)
cmpl $0x0, (%rbx)
jne 0x245fa
movq 0x18(%rsp), %rax
movl 0x148(%rax), %edi
movq %rbx, %rsi
callq 0x2a336
movq %rax, 0x28(%rsp)
cmpl $0x0, (%rbx)
jne 0x245fa
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x34afc
movq %rax, 0x28(%rsp)
cmpl $0x0, (%rbx)
jne 0x245fa
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
pushq $0x56
popq %rsi
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x245fa
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
pushq $0x56
popq %rsi
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x245fa
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
pushq $0x56
popq %rsi
movq %rbx, %r9
callq 0x2a8c1
cmpl $0x0, (%rbx)
jne 0x245fa
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
pushq $0x56
popq %rsi
movq %rbx, %r9
callq 0x2a8c1
xorl %ebx, %ebx
cmpq $0x6, %rbx
je 0x2435a
movq (%rsp,%rbx,8), %rdi
callq 0x29d88
incq %rbx
jmp 0x245fc