// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, %r14d
movl 0x11240(%rip), %ebx     # 0x188f4
movl %ebx, %eax
xorl %edi, %eax
movl 0x11232(%rip), %esi     # 0x188f0
movl %esi, %ecx
xorl %r14d, %ecx
orl %eax, %ecx
je 0x7ebe
movl %edi, %r15d
movslq %edi, %r13
cmpl %edi, %ebx
movq %r14, 0x20(%rsp)
movq %r15, 0x8(%rsp)
jne 0x7729
movl 0x150cf(%rip), %edx     # 0x1c7b4
subl %r14d, %edx
jl 0x7702
decl %esi
incl %edx
pushq $-0x1
popq %rcx
xorl %edi, %edi
callq 0xa4c2
leal -0x1(%r14), %eax
movl %eax, 0x150b2(%rip)     # 0x1c7b4
movslq %r14d, %rbx
movq %rbx, %r14
movslq 0x111e1(%rip), %rax     # 0x188f0
movq 0x111e2(%rip), %rdi     # 0x188f8
cmpq %rax, %r14
jge 0x7792
movq (%rdi,%r14,8), %rdi
callq 0x5340
incq %r14
jmp 0x7708
movslq %esi, %r15
cmpl $0x0, 0x111b9(%rip)     # 0x188ec
jne 0x7743
andl $0x0, 0x11184(%rip)     # 0x188c0
orl $-0x1, 0x11199(%rip)    # 0x188dc
movl 0x1503a(%rip), %r14d    # 0x1c784
movq %r14, 0x30(%rsp)
negl %r14d
movslq 0x1505b(%rip), %r12     # 0x1c7b4
decq %r15
movq 0x11195(%rip), %rbp     # 0x188f8
cmpl %r15d, %r12d
movl %r15d, %eax
cmovgl %r12d, %eax
movq %rax, 0x28(%rsp)
cmpq %r15, %r12
jge 0x7902
movq (%rbp,%r12,8), %rdi
callq 0x853b
testl %eax, %eax
je 0x7909
incq %r12
jmp 0x7772
leaq (,%rbx,8), %rsi
callq 0x5ade
movq %rax, 0x11152(%rip)     # 0x188f8
shlq $0x4, %r13
xorl %r14d, %r14d
testl %r15d, %r15d
cmovgl %r15d, %r14d
movslq 0x11135(%rip), %r15     # 0x188f0
shlq $0x4, %r14
leaq 0x10d1a(%rip), %r12     # 0x184e0
leaq 0x10d0f(%rip), %rbp     # 0x184dc
cmpq %rbx, %r15
jge 0x781e
movq %r13, %rdi
callq 0x5a1c
movq 0x11117(%rip), %rcx     # 0x188f8
movq %rax, (%rcx,%r15,8)
movq 0x1110c(%rip), %rax     # 0x188f8
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x7819
movq (%rax,%r15,8), %rdx
movl (%r12), %esi
movl (%rbp), %edi
movl %edi, 0x8(%rdx,%rcx)
movl %esi, 0xc(%rdx,%rcx)
andw $0x0, 0x4(%rdx,%rcx)
movl $0x20, (%rdx,%rcx)
addq $0x10, %rcx
jmp 0x77ee
incq %r15
jmp 0x77cd
movq 0x20(%rsp), %r15
movl %r15d, %ecx
subl 0x110c4(%rip), %ecx     # 0x188f0
movl 0x14f52(%rip), %esi     # 0x1c784
cmpl %ecx, %esi
cmovll %esi, %ecx
testl %ecx, %ecx
movq 0x8(%rsp), %r12
jle 0x7e9f
movl 0x14f6a(%rip), %edi     # 0x1c7b4
addl %ecx, %edi
movslq %edi, %r8
movl %ecx, %eax
leaq (,%r8,8), %rdx
leaq (,%rax,8), %r9
subq %r9, %rdx
cmpq %rax, %r8
jl 0x7890
movq 0x11088(%rip), %r9      # 0x188f8
movq (%r9,%r8,8), %r10
movq (%r9,%rdx), %r11
movq %r11, (%r9,%r8,8)
movq 0x11075(%rip), %r9      # 0x188f8
movq %r10, (%r9,%rdx)
decq %r8
addq $-0x8, %rdx
jmp 0x7864
movl 0x14eea(%rip), %edx     # 0x1c780
leaq 0x11053(%rip), %r9      # 0x188f0
movl $0x7d0, %r10d           # imm = 0x7D0
testl %r8d, %r8d
js 0x78db
movq 0x11049(%rip), %r11     # 0x188f8
movl %r8d, %ebx
movq (%r11,%rbx,8), %r14
movslq %edx, %rax
movq 0x10(%r9,%rax,8), %rdx
movq %rdx, (%r11,%rbx,8)
movq %r14, 0x10(%r9,%rax,8)
addl $0x7cf, %eax            # imm = 0x7CF
cltd
idivl %r10d
movl %edx, 0x14eaa(%rip)     # 0x1c780
decl %r8d
jmp 0x78a3
movl %edi, 0x14ed3(%rip)     # 0x1c7b4
subl %ecx, %esi
movl %esi, 0x14e9b(%rip)     # 0x1c784
movl 0x14e99(%rip), %edi     # 0x1c788
subl %ecx, %edi
js 0x7f12
movl %edi, 0x14e8b(%rip)     # 0x1c788
jmp 0x7e9f
movq 0x28(%rsp), %rbp
jmp 0x790c
movl %r12d, %ebp
movq 0x30(%rsp), %rax
leal (%rax,%rbp), %edi
incl %edi
movq 0x8(%rsp), %rsi
cmpl %esi, %ebx
movq 0x20(%rsp), %rcx
jle 0x794b
leal (%rsi,%rbx), %eax
decl %eax
cltd
idivl %esi
imull %eax, %edi
addl $0xbb8, %ecx            # imm = 0xBB8
cmpl %ecx, %edi
jle 0x794b
movl %eax, %esi
movl %ecx, %eax
cltd
idivl %esi
movl %ebp, %r14d
subl %eax, %r14d
incl %r14d
movl %ecx, %edi
movslq %edi, %rdi
shlq $0x3, %rdi
callq 0x5a1c
movq %rax, 0x18(%rsp)
movq %r13, %rax
shlq $0x4, %rax
movq %rax, 0x30(%rsp)
pushq $-0x1
popq %rax
xorl %r9d, %r9d
leaq 0x10b6b(%rip), %r15     # 0x184e0
leaq 0x10b60(%rip), %r12     # 0x184dc
xorl %r8d, %r8d
movl %eax, 0x4(%rsp)
movl %eax, 0x14(%rsp)
movq %rbp, 0x28(%rsp)
movq %r14, %rdi
movq 0x8(%rsp), %r14
movq %r13, 0x48(%rsp)
testl %r8d, %r8d
movq %rdi, 0x40(%rsp)
jne 0x79d5
movq 0x30(%rsp), %rdi
movl %r8d, %ebx
movl %r9d, %ebp
callq 0x5a1c
movl %ebp, %r9d
movl %ebx, %r8d
movq 0x40(%rsp), %rdi
movl 0x4(%rsp), %edx
movslq %edx, %rcx
incl %edx
movl %edx, 0x4(%rsp)
movq 0x18(%rsp), %rdx
movq %rax, 0x8(%rdx,%rcx,8)
testl %r9d, %r9d
je 0x79eb
cmpl 0x14dd4(%rip), %edi     # 0x1c7b4
movl 0x54(%rsp), %esi
je 0x7a5e
jmp 0x7ac2
movl %r9d, %ebp
movl %r8d, %ebx
testl %edi, %edi
js 0x7a04
movl %edi, %eax
shlq $0x3, %rax
addq 0x10ef6(%rip), %rax     # 0x188f8
jmp 0x7a2b
movl 0x14d76(%rip), %eax     # 0x1c780
addl %edi, %eax
addl $0x7d1, %eax            # imm = 0x7D1
cltd
movl $0x7d0, %ecx            # imm = 0x7D0
idivl %ecx
movslq %edx, %rax
leaq 0x10ecd(%rip), %rcx     # 0x188f0
leaq (%rcx,%rax,8), %rax
addq $0x10, %rax
movq %rdi, %r14
movq (%rax), %rdi
movq %rdi, 0x58(%rsp)
callq 0x6214
movl %eax, %esi
cmpl 0x14d70(%rip), %r14d    # 0x1c7b4
jne 0x7ab7
movl 0x14d64(%rip), %eax     # 0x1c7b0
incl %eax
cmpl %eax, %esi
cmovlel %eax, %esi
movq 0x8(%rsp), %r14
movl %ebx, %r8d
movl %ebp, %r9d
cmpl $0x0, 0x14(%rsp)
jns 0x7ac2
movl 0x14d45(%rip), %eax     # 0x1c7b0
movl %eax, %ecx
subl %r9d, %ecx
movl %r14d, %edx
subl %r8d, %edx
cmpl %edx, %ecx
jge 0x7ac2
movl %r8d, %ecx
subl %r9d, %ecx
addl %ecx, %eax
movl %eax, 0x14d28(%rip)     # 0x1c7b0
movb 0x14d2a(%rip), %cl      # 0x1c7b8
testb $0x1, %cl
je 0x7aad
addl 0x14cf3(%rip), %eax     # 0x1c78c
cmpl %r14d, %eax
jge 0x7aad
movl %eax, 0x14d0c(%rip)     # 0x1c7b0
andb $-0x2, %cl
movb %cl, 0x14d0b(%rip)      # 0x1c7b8
movl 0x4(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x7ac2
movq 0x8(%rsp), %r14
movl %ebx, %r8d
movl %ebp, %r9d
movl %r14d, %ebp
subl %r8d, %ebp
movl %esi, %r14d
subl %r9d, %r14d
movslq 0x4(%rsp), %rcx
movl %esi, %ebx
movslq %r8d, %rdi
movslq %r9d, %rsi
cmpl %r14d, %ebp
movl %ebx, 0x54(%rsp)
movq %rcx, 0x60(%rsp)
jle 0x7b89
movq 0x18(%rsp), %rax
movq (%rax,%rcx,8), %rax
shlq $0x4, %rdi
movq %rax, 0x38(%rsp)
addq %rax, %rdi
shlq $0x4, %rsi
movq 0x58(%rsp), %rbp
addq %rbp, %rsi
movslq %r14d, %rdx
shlq $0x4, %rdx
movl %r8d, %r13d
callq 0x5880
movl %r13d, %r8d
addl %r14d, %r8d
testl %ebx, %ebx
je 0x7b39
movslq %ebx, %rax
shlq $0x4, %rax
testb $0x2, -0xb(%rax,%rbp)
jne 0x7bfc
movslq %r8d, %rax
movq %rax, %rcx
shlq $0x4, %rcx
movq 0x38(%rsp), %rbx
addq %rbx, %rcx
addq $0xc, %rcx
movq 0x8(%rsp), %r14
movq 0x28(%rsp), %rbp
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %r13
cmpq %r13, %rax
jge 0x7bd1
movl (%r15), %edx
movl (%r12), %esi
movl %esi, -0x4(%rcx)
movl %edx, (%rcx)
andw $0x0, -0x8(%rcx)
movl $0x20, -0xc(%rcx)
incq %rax
addq $0x10, %rcx
jmp 0x7b63
movl %r9d, 0x38(%rsp)
movq 0x18(%rsp), %rax
movq (%rax,%rcx,8), %rbx
shlq $0x4, %rdi
addq %rbx, %rdi
shlq $0x4, %rsi
addq 0x58(%rsp), %rsi
movslq %ebp, %rdx
shlq $0x4, %rdx
callq 0x5880
cmpl %r14d, %ebp
jne 0x7bd6
movq 0x40(%rsp), %rdi
incl %edi
xorl %r9d, %r9d
xorl %r8d, %r8d
movq 0x8(%rsp), %r14
movq 0x28(%rsp), %rbp
jmp 0x7c37
xorl %r8d, %r8d
jmp 0x7c32
movl 0x38(%rsp), %r9d
addl %ebp, %r9d
movq 0x30(%rsp), %rax
orb $0x2, -0xb(%rbx,%rax)
xorl %r8d, %r8d
movq 0x8(%rsp), %r14
movq 0x28(%rsp), %rbp
movq 0x40(%rsp), %rdi
jmp 0x7c37
testl %r8d, %r8d
movq 0x8(%rsp), %r14
movq 0x28(%rsp), %rbp
movq 0x40(%rsp), %rdi
jle 0x7c28
movl %r8d, %eax
shlq $0x4, %rax
movq 0x38(%rsp), %rbx
andb $-0x3, -0xb(%rbx,%rax)
movq 0x48(%rsp), %r13
jmp 0x7c32
movq 0x48(%rsp), %r13
movq 0x38(%rsp), %rbx
incl %edi
xorl %r9d, %r9d
cmpl %ebp, %edi
jle 0x7999
testl %r8d, %r8d
je 0x7c7b
movslq %r8d, %rax
movq %rax, %rcx
shlq $0x4, %rcx
addq %rbx, %rcx
addq $0xc, %rcx
cmpq %r13, %rax
jge 0x7c7b
movl (%r15), %edx
movl (%r12), %esi
movl %esi, -0x4(%rcx)
movl %edx, (%rcx)
andw $0x0, -0x8(%rcx)
movl $0x20, -0xc(%rcx)
incq %rax
addq $0x10, %rcx
jmp 0x7c55
movslq 0x20(%rsp), %rbx
movq %rbx, %r14
movl 0x4(%rsp), %r13d
movslq 0x10c61(%rip), %rax     # 0x188f0
movq 0x10c62(%rip), %rdi     # 0x188f8
cmpq %rax, %r14
jge 0x7ca9
movq (%rdi,%r14,8), %rdi
callq 0x5340
incq %r14
jmp 0x7c88
shlq $0x3, %rbx
movq %rbx, %rsi
callq 0x5ade
movq 0x20(%rsp), %rdx
movq %rbp, %rsi
leal -0x1(%rdx), %ebp
cmpl %ebp, %r13d
movl %ebp, %ecx
cmovll %r13d, %ecx
movq %rax, 0x10c28(%rip)     # 0x188f8
movl %edx, %ebx
subl 0x10c18(%rip), %ebx     # 0x188f0
movl %r13d, %eax
xorl %r13d, %r13d
testl %ebx, %ebx
cmovlel %r13d, %ebx
addl %esi, %ebx
cmpl %ecx, %ebx
cmovgel %ecx, %ebx
movl 0x14(%rsp), %edx
subl %eax, %edx
movl %ebx, %eax
addl %edx, %eax
movl %eax, 0x14ab9(%rip)     # 0x1c7b4
js 0x7ed1
movq 0x8(%rsp), %rax
testl %eax, %eax
cmovgl %eax, %r13d
movslq %ebp, %rbp
movslq %ebx, %r14
movq 0x20(%rsp), %rax
leal 0x7d0(%rax), %ebx
shlq $0x4, %r13
cmpq %r14, %rbp
jle 0x7d76
movq 0x30(%rsp), %rdi
callq 0x5a1c
movq 0x10bc1(%rip), %rcx     # 0x188f8
movq %rax, (%rcx,%rbp,8)
movq 0x10bb6(%rip), %rax     # 0x188f8
xorl %ecx, %ecx
cmpq %rcx, %r13
je 0x7d6f
movq (%rax,%rbp,8), %rdx
movl (%r15), %esi
movl (%r12), %edi
movl %edi, 0x8(%rdx,%rcx)
movl %esi, 0xc(%rdx,%rcx)
andw $0x0, 0x4(%rdx,%rcx)
movl $0x20, (%rdx,%rcx)
addq $0x10, %rcx
jmp 0x7d44
decq %rbp
decl %ebx
jmp 0x7d21
movslq 0x10b73(%rip), %rax     # 0x188f0
movl 0x4(%rsp), %r13d
movslq %r13d, %rcx
movq 0x18(%rsp), %rdx
leaq (%rdx,%rcx,8), %r15
leaq 0x10b5b(%rip), %r12     # 0x188f0
cmpq %rax, %rbp
jl 0x7de0
movq (%r15), %rcx
movq 0x10b54(%rip), %rdx     # 0x188f8
movq %rcx, (%rdx,%rbp,8)
decq %rbp
decl %ebx
decl %r13d
addq $-0x8, %r15
jmp 0x7d95
movq 0x10b3b(%rip), %rcx     # 0x188f8
movl %eax, %r14d
movq (%rcx,%r14,8), %rdi
callq 0x5340
movq (%r15), %rax
movq 0x10b25(%rip), %rcx     # 0x188f8
movq %rax, (%rcx,%r14,8)
decl %ebx
decl %r13d
addq $-0x8, %r15
movl %ebx, %eax
addl $0xfffff82f, %eax       # imm = 0xFFFFF82F
jns 0x7db6
leal -0x7d0(%rbx), %ebp
movl $0x7d0, %r14d           # imm = 0x7D0
testl %r13d, %r13d
js 0x7e3a
leal -0x7d1(%rbx), %eax
cmpl $0xfffff830, %eax       # imm = 0xFFFFF830
jl 0x7e3a
movl 0x14973(%rip), %eax     # 0x1c780
addl %ebx, %eax
cltd
idivl %r14d
movslq %edx, %r15
movq 0x10(%r12,%r15,8), %rdi
callq 0x5340
movl %r13d, %eax
movq 0x18(%rsp), %rcx
movq (%rcx,%rax,8), %rax
movq %rax, 0x10(%r12,%r15,8)
decl %r13d
decl %ebx
decl %ebp
jmp 0x7df5
negl %ebp
movl %ebp, 0x14942(%rip)     # 0x1c784
movl 0x14940(%rip), %eax     # 0x1c788
cmpl %ebp, %eax
cmovll %eax, %ebp
movl %ebp, 0x14935(%rip)     # 0x1c788
movl $0x7d0, %ebp            # imm = 0x7D0
movq 0x20(%rsp), %r15
leal -0x7d1(%rbx), %eax
cmpl $0xfffff830, %eax       # imm = 0xFFFFF830
jl 0x7e90
movl 0x14910(%rip), %eax     # 0x1c780
addl %ebx, %eax
cltd
idivl %ebp
movslq %edx, %r14
movq 0x10(%r12,%r14,8), %rdi
movq 0x30(%rsp), %rsi
callq 0x5ade
movq %rax, 0x10(%r12,%r14,8)
decl %ebx
jmp 0x7e5d
movq 0x18(%rsp), %rdi
callq 0x5340
movq 0x8(%rsp), %r12
movl %r12d, 0x10a4e(%rip)    # 0x188f4
movl %r15d, 0x10a43(%rip)    # 0x188f0
andl $0x0, 0x14910(%rip)     # 0x1c7c4
decl %r15d
movl %r15d, 0x1490a(%rip)    # 0x1c7c8
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x700e
movl %edx, %ebx
negl %ebx
cmpl %ebx, %ecx
cmovll %ecx, %ebx
addl %ebx, %edx
movq 0x18(%rsp), %rax
movq 0x60(%rsp), %rcx
leaq (%rax,%rcx,8), %r14
movl %edx, 0x148c4(%rip)     # 0x1c7b4
testl %edx, %edx
jns 0x7d01
movq (%r14), %rdi
callq 0x5340
movl 0x148ae(%rip), %edx     # 0x1c7b4
incl %edx
decl 0x4(%rsp)
addq $-0x8, %r14
jmp 0x7eea
andl $0x0, 0x1486f(%rip)     # 0x1c788
cmpl $-0x1, 0x109bc(%rip)    # 0x188dc
je 0x7e9f
cmpl $0x0, 0x109bf(%rip)     # 0x188ec
jne 0x7e9f
negl %edi
callq 0x6ff5
jmp 0x7e9f