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

	/* return if dimensions haven't changed */
	if (term.col == col && term.row == row) {
		tfulldirt();
		return;
	}
	if (sel.alt)
		selremove();
	/* slide screen up if otherwise cursor would get out of the screen */
	for (i = 0; i <= term.c.y - row; i++)
		free(term.line[i]);
	if (i > 0) {
		/* ensure that both src and dst are not NULL */
		memmove(term.line, term.line + i, row * sizeof(Line));
		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));
	/* resize to new width */
	for (i = 0; i < MIN(row, term.row); i++) {
		term.line[i] = xrealloc(term.line[i], col * sizeof(Glyph));
		for (j = term.col; j < col; j++)
			tclearglyph(&term.line[i][j], 0);
	}
	/* allocate any new rows */
	for (/*i = MIN(row, term.row) */; i < row; i++) {
		term.line[i] = xmalloc(col * sizeof(Glyph));
		for (j = 0; j < col; j++)
			tclearglyph(&term.line[i][j], 0);
	}
	/* update cursor */
	if (term.c.x >= col) {
		term.c.state &= ~CURSOR_WRAPNEXT;
		term.c.x = col - 1;
	} else {
		UPDATEWRAPNEXT(1, col);
	}
	/* 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 $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl 0x14be0(%rip), %eax     # 0x1cee4
cmpl -0x4(%rbp), %eax
jne 0x831e
movl 0x14bd1(%rip), %eax     # 0x1cee0
cmpl -0x8(%rbp), %eax
jne 0x831e
callq 0x7c20
jmp 0x85a5
cmpl $0x0, 0x14bb7(%rip)     # 0x1cedc
je 0x832c
callq 0x6820
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl 0x18a68(%rip), %ecx     # 0x20da4
subl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jg 0x8362
movq 0x14b9e(%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 0x8333
cmpl $0x0, -0xc(%rbp)
jle 0x839a
movq 0x14b79(%rip), %rdi     # 0x1cee8
movq 0x14b72(%rip), %rsi     # 0x1cee8
movslq -0xc(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movslq -0x8(%rbp), %rdx
shlq $0x3, %rdx
callq 0x5510
movl -0x8(%rbp), %eax
subl $0x1, %eax
movl %eax, 0x18a0a(%rip)     # 0x20da4
movl -0x8(%rbp), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x14b34(%rip), %eax     # 0x1cee0
jge 0x83cd
movq 0x14b33(%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 0x83a3
movq 0x14b14(%rip), %rdi     # 0x1cee8
movslq -0x8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x5b30
movq %rax, 0x14b00(%rip)     # 0x1cee8
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x14ae2(%rip), %eax     # 0x1cee0
jge 0x8408
movl -0x8(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x8411
movl 0x14ad2(%rip), %eax     # 0x1cee0
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x8496
movq 0x14ac6(%rip), %rax     # 0x1cee8
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x4(%rbp), %rsi
shlq $0x4, %rsi
callq 0x5b30
movq %rax, %rdx
movq 0x14aa7(%rip), %rax     # 0x1cee8
movslq -0xc(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x14a95(%rip), %eax     # 0x1cee4
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x8486
movq 0x14a87(%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 0x8452
jmp 0x8488
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x83ef
jmp 0x8498
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x8507
movslq -0x4(%rbp), %rdi
shlq $0x4, %rdi
callq 0x5a30
movq %rax, %rdx
movq 0x14a31(%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 0x84fa
movq 0x14a13(%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 0x84c6
jmp 0x84fc
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x8498
movl 0x18893(%rip), %eax     # 0x20da0
cmpl -0x4(%rbp), %eax
jl 0x8530
movsbl 0x1888f(%rip), %eax     # 0x20da8
andl $-0x2, %eax
movb %al, 0x18886(%rip)      # 0x20da8
movl -0x4(%rbp), %eax
subl $0x1, %eax
movl %eax, 0x18872(%rip)     # 0x20da0
jmp 0x8578
jmp 0x8532
movsbl 0x1886f(%rip), %eax     # 0x20da8
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8574
movl 0x18859(%rip), %eax     # 0x20da0
addl 0x18833(%rip), %eax     # 0x20d80
cmpl -0x4(%rbp), %eax
jge 0x8574
movl 0x18828(%rip), %eax     # 0x20d80
addl 0x18842(%rip), %eax     # 0x20da0
movl %eax, 0x1883c(%rip)     # 0x20da0
movsbl 0x1883d(%rip), %eax     # 0x20da8
andl $-0x2, %eax
movb %al, 0x18834(%rip)      # 0x20da8
jmp 0x8576
jmp 0x8578
movl -0x4(%rbp), %eax
movl %eax, 0x14963(%rip)     # 0x1cee4
movl -0x8(%rbp), %eax
movl %eax, 0x14956(%rip)     # 0x1cee0
movl $0x0, 0x18820(%rip)     # 0x20db4
movl -0x8(%rbp), %eax
subl $0x1, %eax
movl %eax, 0x18818(%rip)     # 0x20db8
callq 0x7c20
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)