// File: /workspace/github_c_makefile_star2_O0/odknt[P]st/st.c
// Function: tclearregion
void
tclearregion(int x1, int y1, int x2, int y2)
{
	int x, y, temp;
	Glyph *gp;

	if (x1 > x2)
		temp = x1, x1 = x2, x2 = temp;
	if (y1 > y2)
		temp = y1, y1 = y2, y2 = temp;

	LIMIT(x1, 0, term.col-1);
	LIMIT(x2, 0, term.col-1);
	LIMIT(y1, 0, term.row-1);
	LIMIT(y2, 0, term.row-1);

	for (y = y1; y <= y2; y++) {
		term.dirty[y] = 1;
		for (x = x1; x <= x2; x++) {
			gp = &term.line[y][x];
			if (selected(x, y))
				selclear();
			gp->fg = term.c.attr.fg;
			gp->bg = term.c.attr.bg;
			gp->mode = 0;
			gp->u = ' ';
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl -0x4(%rbp), %eax
cmpl -0xc(%rbp), %eax
jle 0x98de
movl -0x4(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x10(%rbp), %eax
jle 0x98f8
movl -0x8(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x4(%rbp)
jge 0x9905
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x992f
movl -0x4(%rbp), %eax
movl 0x128d6(%rip), %ecx     # 0x1c1e4
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x9923
movl 0x128c9(%rip), %eax     # 0x1c1e4
subl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x9929
movl -0x4(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x9942
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x996c
movl -0xc(%rbp), %eax
movl 0x12899(%rip), %ecx     # 0x1c1e4
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x9960
movl 0x1288c(%rip), %eax     # 0x1c1e4
subl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x9966
movl -0xc(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x997f
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0x99a9
movl -0x8(%rbp), %eax
movl 0x12858(%rip), %ecx     # 0x1c1e0
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x999d
movl 0x1284b(%rip), %eax     # 0x1c1e0
subl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x99a3
movl -0x8(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x10(%rbp)
jge 0x99bc
xorl %eax, %eax
movl %eax, -0x44(%rbp)
jmp 0x99e6
movl -0x10(%rbp), %eax
movl 0x1281b(%rip), %ecx     # 0x1c1e0
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x99da
movl 0x1280e(%rip), %eax     # 0x1c1e0
subl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x99e0
movl -0x10(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x10(%rbp), %eax
jg 0x9a9a
movq 0x1667b(%rip), %rax     # 0x20080
movslq -0x18(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jg 0x9a8a
movq 0x127c3(%rip), %rax     # 0x1c1e8
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %edi
movl -0x18(%rbp), %esi
callq 0x7380
cmpl $0x0, %eax
je 0x9a51
callq 0x6fb0
movl 0x16639(%rip), %ecx     # 0x20090
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movl 0x16630(%rip), %ecx     # 0x20094
movq -0x28(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x28(%rbp), %rax
movw $0x0, 0x4(%rax)
movq -0x28(%rbp), %rax
movl $0x20, (%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x9a16
jmp 0x9a8c
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x99f2
addq $0x50, %rsp
popq %rbp
retq