// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: tresizedef
void
tresizedef(int col, int row)
{
	int i, j;

	/* return if dimensions haven't changed */
	if (term.col == col && term.row == row) {
		tfulldirt();
		return;
	}
	if (col != term.col) {
		if (!sel.alt)
			selremove();
		treflow(col, row);
	} else {
		/* slide screen up if otherwise cursor would get out of the screen */
		if (term.c.y >= row) {
			tscrollup(0, term.row - 1, term.c.y - row + 1, SCROLL_RESIZE);
			term.c.y = row - 1;
		}
		for (i = row; i < term.row; i++)
			free(term.line[i]);

		/* resize to new height */
		term.line = xrealloc(term.line, row * sizeof(Line));
		/* allocate any new rows */
		for (i = term.row; i < row; i++) {
			term.line[i] = xmalloc(col * sizeof(Glyph));
			for (j = 0; j < col; j++)
				tclearglyph(&term.line[i][j], 0);
		}
		/* scroll down as much as height has increased */
		rscrolldown(row - term.row);
	}
	/* update terminal size */
	term.col = col, term.row = row;
	/* reset scrolling region */
	term.top = 0, term.bot = row - 1;
	/* dirty all lines */
	tfulldirt();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl 0x14920(%rip), %eax     # 0x1cee4
cmpl -0x4(%rbp), %eax
jne 0x85de
movl 0x14911(%rip), %eax     # 0x1cee0
cmpl -0x8(%rbp), %eax
jne 0x85de
callq 0x7c20
jmp 0x873d
movl -0x4(%rbp), %eax
cmpl 0x148fd(%rip), %eax     # 0x1cee4
je 0x8607
cmpl $0x0, 0x148ec(%rip)     # 0x1cedc
jne 0x85f7
callq 0x6820
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0xd1d0
jmp 0x8710
movl 0x18797(%rip), %eax     # 0x20da4
cmpl -0x8(%rbp), %eax
jl 0x863f
movl 0x148c8(%rip), %esi     # 0x1cee0
subl $0x1, %esi
movl 0x18783(%rip), %edx     # 0x20da4
subl -0x8(%rbp), %edx
addl $0x1, %edx
xorl %edi, %edi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0xbed0
movl -0x8(%rbp), %eax
subl $0x1, %eax
movl %eax, 0x18765(%rip)     # 0x20da4
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x14892(%rip), %eax     # 0x1cee0
jge 0x866f
movq 0x14891(%rip), %rax     # 0x1cee8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5340
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x8645
movq 0x14872(%rip), %rdi     # 0x1cee8
movslq -0x8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x5b30
movq %rax, 0x1485e(%rip)     # 0x1cee8
movl 0x14850(%rip), %eax     # 0x1cee0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x8702
movslq -0x4(%rbp), %rdi
shlq $0x4, %rdi
callq 0x5a30
movq %rax, %rdx
movq 0x14836(%rip), %rax     # 0x1cee8
movslq -0xc(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x86f5
movq 0x14818(%rip), %rax     # 0x1cee8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x10(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x9170
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x86c1
jmp 0x86f7
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x8693
movl -0x8(%rbp), %edi
subl 0x147d5(%rip), %edi     # 0x1cee0
callq 0xd9d0
movl -0x4(%rbp), %eax
movl %eax, 0x147cb(%rip)     # 0x1cee4
movl -0x8(%rbp), %eax
movl %eax, 0x147be(%rip)     # 0x1cee0
movl $0x0, 0x18688(%rip)     # 0x20db4
movl -0x8(%rbp), %eax
subl $0x1, %eax
movl %eax, 0x18680(%rip)     # 0x20db8
callq 0x7c20
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)