// File: /workspace/github_c_makefile_star2_O3/martintopholm[P]xping/termio.c
// Function: termio_update
void
termio_update(struct target *selective)
{
	struct target *t;
	int col;

	int imax, ifirst, ilast;

	t = list;
	if (t == NULL)
		return;

	col = getmaxx(stdscr);
	imax = MIN(t->npkts, col - labelwidth);
	imax = MIN(imax, NUM);
	ifirst = (t->npkts > imax ? t->npkts - imax : 0);
	ilast = t->npkts;

	if (selective != NULL && ifirst == ifirst_state) {
		updatesingle(ifirst, selective);
	} else {
#ifndef NCURSES
		/* Re-establish the reference point for move() */
		if (cursor_y > 0)
			fprintf(stdout, "%c[%dA\r", 0x1b, cursor_y);
		fprintf(stdout, "\r%c[s", 0x1b);
		cursor_y = 0;
#endif /* !NCURSES */
		updatefull(ifirst, ilast);
		ifirst_state = ifirst;
		clrtoeol();
		clrtobot();
	}
	refresh();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x38bc(%rip), %r15      # 0x7270
movq (%r15), %r12
testq %r12, %r12
je 0x3a64
movq %rdi, %r14
callq 0x37f0
movl 0x40(%r12), %r12d
movl 0x3971(%rip), %esi      # 0x7344
subl %esi, %eax
cmpl %eax, %r12d
cmovll %r12d, %eax
movl $0x12c, %ecx            # imm = 0x12C
cmpl %ecx, %eax
cmovgel %ecx, %eax
xorl %ecx, %ecx
movl %r12d, %r13d
movl %eax, 0x4(%rsp)
subl %eax, %r13d
cmovlel %ecx, %r13d
testq %r14, %r14
je 0x3a73
cmpl 0x3836(%rip), %r13d     # 0x7238
jne 0x3a73
movl 0x188(%r14), %edi
notl %r13d
addl %r13d, %esi
addl 0x40(%r14), %esi
callq 0x38b7
movl 0x40(%r14), %eax
movl %eax, %ecx
decl %ecx
movslq %ecx, %rcx
imulq $0x1b4e81b5, %rcx, %rcx # imm = 0x1B4E81B5
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x12c, %ecx, %ecx      # imm = 0x12C
negl %ecx
addl %ecx, %eax
decl %eax
cltq
movsbl 0x44(%r14,%rax), %edi
callq 0x3e32
movl 0x38f0(%rip), %edi      # 0x7348
xorl %esi, %esi
callq 0x38b7
jmp 0x3c09
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x387f(%rip), %ecx      # 0x72f8
testl %ecx, %ecx
jle 0x3a9a
movq 0x352c(%rip), %rax      # 0x6fb0
movq (%rax), %rdi
leaq 0x18fa(%rip), %rsi      # 0x5388
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
movq 0x350f(%rip), %rax      # 0x6fb0
movq (%rax), %rdi
leaq 0x18e5(%rip), %rsi      # 0x5390
xorl %ebp, %ebp
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
movl $0x0, 0x3835(%rip)      # 0x72f8
movq (%r15), %r14
testq %r14, %r14
je 0x3bc9
negl 0x4(%rsp)
leaq 0x3742(%rip), %r15      # 0x721c
xorl %ebp, %ebp
movl %ebp, 0x188(%r14)
leaq 0x376e(%rip), %rax      # 0x7258
cmpl $0x0, (%rax)
je 0x3b0e
movl 0x18c(%r14), %eax
cmpl $0x2, %eax
je 0x3b29
cmpl $0xa, %eax
jne 0x3b0e
movl (%r15), %r8d
movl %ebp, %edi
leaq 0x18ea(%rip), %rdx      # 0x53f6
jmp 0x3b35
movl (%r15), %ecx
movl %ebp, %edi
leaq 0x1902(%rip), %rdx      # 0x541c
movl %ecx, %r8d
movq %r14, %r9
xorl %eax, %eax
callq 0x3f84
jmp 0x3b4c
movl (%r15), %r8d
movl %ebp, %edi
leaq 0x18d4(%rip), %rdx      # 0x5409
movl $0x1b, %ecx
movl %r8d, %r9d
xorl %eax, %eax
pushq $0x1b
pushq %r14
callq 0x3f84
addq $0x10, %rsp
movq %r15, %rbx
cmpl $0x0, (%r15)
je 0x3b5f
movl $0x20, %edi
callq 0x3e32
cmpl %r12d, %r13d
jge 0x3bab
movl 0x4(%rsp), %eax
movl %eax, %r15d
leal (%r12,%r15), %eax
movl $0x20, %edi
cmpl 0x40(%r14), %eax
jge 0x3ba1
movslq %eax, %rcx
imulq $0x1b4e81b5, %rcx, %rcx # imm = 0x1B4E81B5
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x12c, %ecx, %ecx      # imm = 0x12C
subl %ecx, %eax
cltq
movsbl 0x44(%r14,%rax), %edi
callq 0x3e32
incl %r15d
jne 0x3b6b
incl %ebp
movl %ebp, %edi
xorl %esi, %esi
callq 0x38b7
movq 0x198(%r14), %r14
testq %r14, %r14
movq %rbx, %r15
jne 0x3adc
movl %ebp, 0x3779(%rip)      # 0x7348
movl %r13d, 0x3662(%rip)     # 0x7238
movq 0x33d3(%rip), %rbx      # 0x6fb0
movq (%rbx), %rdi
leaq 0x17d2(%rip), %rsi      # 0x53b9
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
movq (%rbx), %rdi
leaq 0x17a6(%rip), %rsi      # 0x53a3
movl $0x1b, %edx
xorl %eax, %eax
callq 0x2310
movq 0x33a0(%rip), %rax      # 0x6fb0
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2230