// File: /workspace/github_c_makefile_star2_O1/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 0x10b7d(%rip), %ebx     # 0x188f4
movl %ebx, %eax
xorl %edi, %eax
movl 0x10b6f(%rip), %ebp     # 0x188f0
movl %ebp, %ecx
movq %rsi, 0x28(%rsp)
xorl %esi, %ecx
orl %eax, %ecx
jne 0x7dba
testl %ebp, %ebp
jle 0x86ed
movq 0x149fb(%rip), %rax     # 0x1c798
xorl %ecx, %ecx
movl $0x1, (%rax,%rcx,4)
incq %rcx
movslq 0x10b40(%rip), %rdx     # 0x188f0
cmpq %rdx, %rcx
jl 0x7d9f
jmp 0x86ed
movl %edi, %r15d
cmpl %edi, %ebx
movq %r15, 0x18(%rsp)
jne 0x7fd7
movl 0x149e4(%rip), %edx     # 0x1c7b4
movq 0x28(%rsp), %rbx
subl %ebx, %edx
jl 0x7df4
decl %ebp
incl %edx
xorl %edi, %edi
movl %ebp, %esi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0xac36
leal -0x1(%rbx), %eax
movl %eax, 0x149c0(%rip)     # 0x1c7b4
cmpl %ebx, 0x10af6(%rip)     # 0x188f0
movq %rbx, %rbp
jle 0x7e21
movslq %ebp, %rbx
movq 0x10aef(%rip), %rax     # 0x188f8
movq (%rax,%rbx,8), %rdi
callq 0x5340
incq %rbx
movslq 0x10ad4(%rip), %rax     # 0x188f0
cmpq %rax, %rbx
jl 0x7e02
movq 0x10ad0(%rip), %rdi     # 0x188f8
movslq %ebp, %rsi
shlq $0x3, %rsi
callq 0x5fb0
movq %rax, 0x10abd(%rip)     # 0x188f8
movslq 0x10aae(%rip), %rbx     # 0x188f0
cmpl %ebp, %ebx
jge 0x7ebc
movq 0x18(%rsp), %rax
movslq %eax, %r15
shlq $0x4, %r15
movl %eax, %r14d
shlq $0x4, %r14
leaq 0x1068c(%rip), %r12     # 0x184ec
leaq 0x10689(%rip), %r13     # 0x184f0
movq %r15, %rdi
callq 0x5eec
movq 0x10a82(%rip), %rcx     # 0x188f8
movq %rax, (%rcx,%rbx,8)
cmpl $0x0, 0x18(%rsp)
jle 0x7eb5
movq 0x10a70(%rip), %rax     # 0x188f8
movq (%rax,%rbx,8), %rax
xorl %ecx, %ecx
movl (%r12), %edx
movl %edx, 0x8(%rax,%rcx)
movl (%r13), %edx
movl %edx, 0xc(%rax,%rcx)
movw $0x0, 0x4(%rax,%rcx)
movl $0x20, (%rax,%rcx)
addq $0x10, %rcx
cmpq %rcx, %r14
jne 0x7e8e
incq %rbx
cmpl %ebp, %ebx
jne 0x7e67
movl %ebp, %eax
subl 0x10a2c(%rip), %eax     # 0x188f0
movl 0x148ba(%rip), %ecx     # 0x1c784
cmpl %eax, %ecx
cmovll %ecx, %eax
testl %eax, %eax
movq 0x18(%rsp), %r13
jle 0x86aa
movl 0x148d2(%rip), %edi     # 0x1c7b4
leal (%rdi,%rax), %edx
movl %edx, %esi
testl %edi, %edi
js 0x7f39
movslq %edx, %rsi
movl %eax, %edi
leaq 0x1(%rsi), %r8
leaq (,%rdi,8), %r9
negq %r9
cmpq %rdi, %rsi
cmovgeq %rdi, %rsi
decl %esi
movq 0x109e9(%rip), %r10     # 0x188f8
leaq (%r10,%r8,8), %r11
movq -0x8(%r10,%r8,8), %rbx
movq -0x8(%r9,%r11), %r11
movq %r11, -0x8(%r10,%r8,8)
movq 0x109cf(%rip), %r10     # 0x188f8
addq %r9, %r10
movq %rbx, -0x8(%r10,%r8,8)
decq %r8
cmpq %rdi, %r8
jg 0x7f08
testl %esi, %esi
js 0x7fb0
movl 0x1483c(%rip), %r8d     # 0x1c780
movl %esi, %esi
incq %rsi
leaq 0x109a0(%rip), %rdi     # 0x188f0
movq 0x109a1(%rip), %r9      # 0x188f8
movq -0x8(%r9,%rsi,8), %r10
movslq %r8d, %r8
movq 0x10(%rdi,%r8,8), %r11
movq %r11, -0x8(%r9,%rsi,8)
movq %r10, 0x10(%rdi,%r8,8)
movl %r8d, %r9d
addl $0x7cf, %r9d            # imm = 0x7CF
movslq %r9d, %r9
imulq $0x10624dd3, %r9, %r9   # imm = 0x10624DD3
movq %r9, %r10
shrq $0x3f, %r10
sarq $0x27, %r9
addl %r10d, %r9d
imull $0x7d0, %r9d, %r9d      # imm = 0x7D0
negl %r9d
addl %r9d, %r8d
addl $0x7cf, %r8d            # imm = 0x7CF
decq %rsi
jg 0x7f50
movl %r8d, 0x147d0(%rip)     # 0x1c780
movl %edx, 0x147fe(%rip)     # 0x1c7b4
subl %eax, %ecx
movl %ecx, 0x147c6(%rip)     # 0x1c784
movl 0x147c4(%rip), %ecx     # 0x1c788
subl %eax, %ecx
js 0x86fc
movl %ecx, 0x147b6(%rip)     # 0x1c788
jmp 0x86aa
cmpl $0x0, 0x1090e(%rip)     # 0x188ec
jne 0x7ff4
movl $0x0, 0x108d6(%rip)     # 0x188c0
movl $0xffffffff, 0x108e8(%rip) # imm = 0xFFFFFFFF
movl 0x14789(%rip), %r13d    # 0x1c784
movl 0x147b2(%rip), %r12d    # 0x1c7b4
decl %ebp
cmpl %ebp, %r12d
jge 0x8032
movslq %r12d, %r14
shlq $0x3, %r14
addq 0x108e1(%rip), %r14     # 0x188f8
movq (%r14), %rdi
callq 0x8e56
testl %eax, %eax
je 0x8032
incl %r12d
addq $0x8, %r14
cmpl %r12d, %ebp
jne 0x8017
movl %ebp, %r12d
movl %r13d, %eax
negl %r13d
leal (%rax,%r12), %edi
incl %edi
cmpl %r15d, %ebx
movq 0x28(%rsp), %rcx
jle 0x8071
leal (%r15,%rbx), %eax
decl %eax
cltd
idivl %r15d
imull %eax, %edi
addl $0xbb8, %ecx            # imm = 0xBB8
cmpl %ecx, %edi
jle 0x8071
movl %eax, %esi
movl %ecx, %eax
cltd
idivl %esi
movl %r12d, %r13d
subl %eax, %r13d
incl %r13d
movl %ecx, %edi
movq %r12, 0x58(%rsp)
movslq %edi, %rdi
shlq $0x3, %rdi
callq 0x5eec
movq %rax, 0x20(%rsp)
movslq %r15d, %rax
movq %rax, 0x48(%rsp)
shlq $0x4, %rax
movq %rax, 0x38(%rsp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
leaq 0x10445(%rip), %rbp     # 0x184ec
leaq 0x10442(%rip), %r12     # 0x184f0
xorl %ebx, %ebx
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
testl %ebx, %ebx
jne 0x8108
movl %ebx, 0x8(%rsp)
movl %r14d, %ebx
movq 0x38(%rsp), %rdi
movq %rbp, %r12
movq %r15, %rbp
movq %r13, %r15
movq %rsi, %r13
movl %r8d, %r14d
callq 0x5eec
movl %r14d, %r8d
movl %ebx, %r14d
movl 0x8(%rsp), %ebx
movq %r13, %rsi
movq %r15, %r13
movq %rbp, %r15
movq %r12, %rbp
leaq 0x103f7(%rip), %r12     # 0x184f0
movslq %esi, %rcx
incl %esi
movq 0x20(%rsp), %rdx
movq %rax, 0x8(%rdx,%rcx,8)
testl %r8d, %r8d
jne 0x81a3
testl %r13d, %r13d
js 0x8126
movl %r13d, %eax
shlq $0x3, %rax
addq 0x107d4(%rip), %rax     # 0x188f8
jmp 0x8163
movl 0x14654(%rip), %eax     # 0x1c780
addl %r13d, %eax
addl $0x7d1, %eax            # imm = 0x7D1
cltq
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x27, %rcx
addl %edx, %ecx
imull $0x7d0, %ecx, %ecx      # imm = 0x7D0
subl %ecx, %eax
cltq
leaq 0x10795(%rip), %rcx     # 0x188f0
leaq (%rcx,%rax,8), %rax
addq $0x10, %rax
movq (%rax), %rdx
movl 0x10788(%rip), %eax     # 0x188f4
movl %eax, %r14d
sarl $0x1f, %r14d
andl %eax, %r14d
movq %rax, %rcx
shlq $0x4, %rcx
movq %rdx, 0x60(%rsp)
addq %rdx, %rcx
addq $-0xc, %rcx
testl %eax, %eax
jle 0x81a3
movzwl (%rcx), %edx
addq $-0x10, %rcx
decl %eax
testl $0x201, %edx            # imm = 0x201
je 0x8189
incl %eax
movl %eax, %r14d
cmpl 0x1460a(%rip), %r13d    # 0x1c7b4
movq %r13, 0x40(%rsp)
jne 0x8216
testl %r8d, %r8d
jne 0x81c5
movl 0x145f4(%rip), %eax     # 0x1c7b0
incl %eax
cmpl %eax, %r14d
cmovlel %eax, %r14d
cmpl $0x0, 0x14(%rsp)
jns 0x8216
movl 0x145de(%rip), %eax     # 0x1c7b0
movl %eax, %ecx
subl %r8d, %ecx
movl %r15d, %edx
subl %ebx, %edx
cmpl %edx, %ecx
jge 0x8216
movl %ebx, %ecx
subl %r8d, %ecx
addl %ecx, %eax
movl %eax, 0x145c3(%rip)     # 0x1c7b0
movb 0x145c5(%rip), %cl      # 0x1c7b8
testb $0x1, %cl
je 0x8212
addl 0x1458e(%rip), %eax     # 0x1c78c
cmpl %r15d, %eax
jge 0x8212
movl %eax, 0x145a7(%rip)     # 0x1c7b0
andb $-0x2, %cl
movb %cl, 0x145a6(%rip)      # 0x1c7b8
movl %esi, 0x14(%rsp)
movl %r15d, %r13d
subl %ebx, %r13d
movl %r14d, %r15d
subl %r8d, %r15d
movq %rsi, 0x8(%rsp)
movslq %esi, %rcx
movslq %ebx, %rdi
movslq %r8d, %rsi
cmpl %r15d, %r13d
movq %rcx, 0x50(%rsp)
jle 0x82e2
movq 0x20(%rsp), %rax
movq (%rax,%rcx,8), %rax
shlq $0x4, %rdi
movq %rax, 0x30(%rsp)
addq %rax, %rdi
shlq $0x4, %rsi
movq 0x60(%rsp), %r13
addq %r13, %rsi
movslq %r15d, %rdx
shlq $0x4, %rdx
callq 0x5890
addl %r15d, %ebx
testl %r14d, %r14d
je 0x8286
movslq %r14d, %rax
shlq $0x4, %rax
testb $0x2, -0xb(%rax,%r13)
jne 0x8353
movq 0x18(%rsp), %r15
cmpl %r15d, %ebx
movq 0x40(%rsp), %r13
jge 0x834f
movslq %ebx, %rcx
movq 0x48(%rsp), %rax
subq %rcx, %rax
shlq $0x4, %rcx
movq 0x30(%rsp), %rdx
addq %rdx, %rcx
addq $0xc, %rcx
movq 0x8(%rsp), %rsi
movl (%rbp), %edx
movl %edx, -0x4(%rcx)
movl (%r12), %edx
movl %edx, (%rcx)
movw $0x0, -0x8(%rcx)
movl $0x20, -0xc(%rcx)
addq $0x10, %rcx
decq %rax
jne 0x82b9
xorl %ebx, %ebx
jmp 0x8376
movl %r8d, 0x30(%rsp)
movq 0x20(%rsp), %rax
movq (%rax,%rcx,8), %rbx
shlq $0x4, %rdi
addq %rbx, %rdi
shlq $0x4, %rsi
addq 0x60(%rsp), %rsi
movslq %r13d, %rdx
shlq $0x4, %rdx
callq 0x5890
cmpl %r15d, %r13d
jne 0x832a
movq 0x40(%rsp), %r13
incl %r13d
xorl %r8d, %r8d
xorl %ebx, %ebx
movq 0x18(%rsp), %r15
movq 0x8(%rsp), %rsi
jmp 0x837c
movl 0x30(%rsp), %r8d
addl %r13d, %r8d
movq 0x38(%rsp), %rax
orb $0x2, -0xb(%rbx,%rax)
xorl %ebx, %ebx
movq 0x18(%rsp), %r15
movq 0x8(%rsp), %rsi
movq 0x40(%rsp), %r13
jmp 0x837c
xorl %ebx, %ebx
jmp 0x8371
testl %ebx, %ebx
movq 0x18(%rsp), %r15
movq 0x40(%rsp), %r13
jle 0x8371
movl %ebx, %eax
shlq $0x4, %rax
movq 0x30(%rsp), %rcx
andb $-0x3, -0xb(%rcx,%rax)
movq 0x8(%rsp), %rsi
incl %r13d
xorl %r8d, %r8d
cmpl 0x58(%rsp), %r13d
jle 0x80b8
testl %ebx, %ebx
sete %al
cmpl %r15d, %ebx
setge %cl
orb %al, %cl
movq 0x48(%rsp), %rdx
jne 0x83dc
movq 0x20(%rsp), %rax
movq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq %ebx, %rcx
subq %rcx, %rdx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0xc, %rax
movl (%rbp), %ecx
movl %ecx, -0x4(%rax)
movl (%r12), %ecx
movl %ecx, (%rax)
movw $0x0, -0x8(%rax)
movl $0x20, -0xc(%rax)
addq $0x10, %rax
decq %rdx
jne 0x83ba
movq 0x28(%rsp), %rax
movslq %eax, %r13
cmpl %eax, 0x10506(%rip)     # 0x188f0
jle 0x840e
movq %r13, %rbx
movq 0x10502(%rip), %rax     # 0x188f8
movq (%rax,%rbx,8), %rdi
callq 0x5340
incq %rbx
movslq 0x104e7(%rip), %rax     # 0x188f0
cmpq %rax, %rbx
jl 0x83ef
movq 0x104e3(%rip), %rdi     # 0x188f8
shlq $0x3, %r13
movq %r13, %rsi
callq 0x5fb0
movq 0x28(%rsp), %rdx
leal -0x1(%rdx), %ebx
movq 0x8(%rsp), %r8
cmpl %ebx, %r8d
movl %ebx, %ecx
cmovll %r8d, %ecx
movq %rax, 0x104ba(%rip)     # 0x188f8
movl %edx, %eax
subl 0x104aa(%rip), %eax     # 0x188f0
xorl %r14d, %r14d
testl %eax, %eax
cmovgl %eax, %r14d
addl 0x58(%rsp), %r14d
cmpl %ecx, %r14d
cmovgel %ecx, %r14d
movl 0x14(%rsp), %edx
subl %r8d, %edx
movl %r14d, %eax
addl %edx, %eax
movl %eax, 0x14347(%rip)     # 0x1c7b4
js 0x8476
movq 0x18(%rsp), %r13
jmp 0x8497
movl %edx, %r14d
negl %r14d
cmpl %r14d, %ecx
cmovll %ecx, %r14d
addl %r14d, %edx
movl %edx, 0x14328(%rip)     # 0x1c7b4
movq 0x18(%rsp), %r13
js 0x8735
cmpl %r14d, %ebx
jle 0x8508
movq %r8, 0x8(%rsp)
movslq %ebx, %rbx
movslq %r14d, %r14
movl %r13d, %r15d
shlq $0x4, %r15
movq 0x38(%rsp), %rdi
callq 0x5eec
movq 0x10439(%rip), %rcx     # 0x188f8
movq %rax, (%rcx,%rbx,8)
testl %r13d, %r13d
jle 0x84fb
movq 0x10429(%rip), %rax     # 0x188f8
movq (%rax,%rbx,8), %rax
xorl %ecx, %ecx
movl (%rbp), %edx
movl %edx, 0x8(%rax,%rcx)
movl (%r12), %edx
movl %edx, 0xc(%rax,%rcx)
movw $0x0, 0x4(%rax,%rcx)
movl $0x20, (%rax,%rcx)
addq $0x10, %rcx
cmpq %rcx, %r15
jne 0x84d5
decq %rbx
cmpq %r14, %rbx
jg 0x84ae
movq 0x8(%rsp), %r8
movslq 0x103e1(%rip), %rax     # 0x188f0
cmpl %eax, %ebx
movq 0x28(%rsp), %rbp
leaq 0x103d3(%rip), %r12     # 0x188f0
jl 0x8557
movslq %ebx, %rcx
movslq %r8d, %r8
movq 0x20(%rsp), %rdx
leaq (%rdx,%r8,8), %rdx
incq %rcx
notl %ebx
addl %ebx, %r8d
addl %eax, %r8d
leal -0x1(%rax), %ebx
movq (%rdx), %rsi
movq 0x103b2(%rip), %rdi     # 0x188f8
movq %rsi, -0x8(%rdi,%rcx,8)
addq $-0x8, %rdx
decq %rcx
cmpq %rax, %rcx
jg 0x853c
testl %ebx, %ebx
js 0x85aa
movl %ebx, %r14d
movslq %r8d, %r8
movq 0x20(%rsp), %rax
leaq (%rax,%r8,8), %r15
incq %r14
notl %ebx
addl %ebx, %r8d
movq %r8, 0x8(%rsp)
movq 0x1037a(%rip), %rax     # 0x188f8
movq -0x8(%rax,%r14,8), %rdi
callq 0x5340
movq (%r15), %rax
movq 0x10366(%rip), %rcx     # 0x188f8
movq %rax, -0x8(%rcx,%r14,8)
addq $-0x8, %r15
decq %r14
jg 0x8577
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq 0x8(%rsp), %r8
testl %r8d, %r8d
js 0x8619
cmpl $0xfffff830, %ebx       # imm = 0xFFFFF830
jb 0x8619
movl %r8d, %r15d
movl 0x141c0(%rip), %eax     # 0x1c780
addl %ebx, %eax
addl $0x7d1, %eax            # imm = 0x7D1
cltq
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x27, %rcx
addl %edx, %ecx
imull $0x7d0, %ecx, %ecx      # imm = 0x7D0
subl %ecx, %eax
movslq %eax, %r14
movq 0x10(%r12,%r14,8), %rdi
callq 0x5340
movq 0x20(%rsp), %rax
movq (%rax,%r15,8), %rax
movq %rax, 0x10(%r12,%r14,8)
leal -0x1(%rbx), %r14d
testq %r15, %r15
jle 0x861c
decq %r15
cmpl $0xfffff830, %ebx       # imm = 0xFFFFF830
movl %r14d, %ebx
ja 0x85ba
jmp 0x861c
movl %ebx, %r14d
movl %r14d, %eax
notl %eax
movl %eax, 0x1415d(%rip)     # 0x1c784
movl 0x1415b(%rip), %ecx     # 0x1c788
cmpl %eax, %ecx
cmovll %ecx, %eax
movl %eax, 0x14150(%rip)     # 0x1c788
cmpl $0xfffff830, %r14d      # imm = 0xFFFFF830
movq 0x38(%rsp), %r15
jl 0x86a0
addl $0x7d1, %r14d           # imm = 0x7D1
movl 0x1412d(%rip), %eax     # 0x1c780
addl %r14d, %eax
cltq
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x27, %rcx
addl %edx, %ecx
imull $0x7d0, %ecx, %ecx      # imm = 0x7D0
subl %ecx, %eax
movslq %eax, %rbx
movq 0x10(%r12,%rbx,8), %rdi
movq %r15, %rsi
callq 0x5fb0
movq %rax, 0x10(%r12,%rbx,8)
leal -0x1(%r14), %eax
addl $0xfffff82f, %r14d      # imm = 0xFFFFF82F
cmpl $0xfffff830, %r14d      # imm = 0xFFFFF830
movl %eax, %r14d
jg 0x864d
movq 0x20(%rsp), %rdi
callq 0x5340
movl %r13d, 0x10243(%rip)    # 0x188f4
movl %ebp, 0x10239(%rip)     # 0x188f0
movl $0x0, 0x14103(%rip)     # 0x1c7c4
leal -0x1(%rbp), %eax
movl %eax, 0x140fe(%rip)     # 0x1c7c8
testl %ebp, %ebp
jle 0x86ed
movq 0x140c3(%rip), %rax     # 0x1c798
xorl %ecx, %ecx
movl $0x1, (%rax,%rcx,4)
incq %rcx
movslq 0x10208(%rip), %rdx     # 0x188f0
cmpq %rdx, %rcx
jl 0x86d7
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x14082(%rip)     # 0x1c788
cmpl $-0x1, 0x101cf(%rip)    # 0x188dc
je 0x86aa
cmpl $0x0, 0x101d6(%rip)     # 0x188ec
jne 0x86aa
subl %ecx, 0x101c2(%rip)     # 0x188e0
subl %ecx, 0x101ac(%rip)     # 0x188d0
subl %ecx, 0x101be(%rip)     # 0x188e8
subl %ecx, 0x101a8(%rip)     # 0x188d8
jmp 0x86aa
movq 0x20(%rsp), %rax
movq 0x50(%rsp), %rcx
leaq (%rax,%rcx,8), %r15
movq (%r15), %rdi
movq %r8, %r13
callq 0x5340
movq %r13, %r8
movl 0x1405d(%rip), %eax     # 0x1c7b4
leal 0x1(%rax), %ecx
movl %ecx, 0x14054(%rip)     # 0x1c7b4
addq $-0x8, %r15
decl %r8d
cmpl $-0x1, %eax
jl 0x8743
jmp 0x846f