// File: /workspace/github_c_makefile_star2_O0/martintopholm[P]xping/termio.c
// Function: termio_init
void
termio_init(void)
{
#ifndef NCURSES
	struct termios term;
	struct target *t;
	int x, y;

	signal(SIGWINCH, sigwinch);
	x = getmaxx();
	y = getmaxy();
	if (x > 0 && y > 0) {
	scrbuffer = malloc(x * y);
	if (scrbuffer != NULL)
		setvbuf(stdout, scrbuffer, _IOFBF, x * y);
	else
		perror("malloc");
	} else {
		scrbuffer = NULL;
	}

	/* Reserve space on terminal */
	cursor_y = 0;
	DL_FOREACH(list, t) {
		cursor_y++;
		scrolldown(1);
	}
	scrollup(cursor_y);

	/* Establish reference point for move() */
	fprintf(stdout, "\r%c[s", 0x1b);
	cursor_y = 0;

	/* Avoid mangling output by disabling input echo and wrapping */
	fprintf(stdout, "%c[7l", 0x1b);
	if (isatty(STDOUT_FILENO) && tcgetattr(STDOUT_FILENO, &oterm) == 0) {
		memcpy(&term, &oterm, sizeof(term));
		term.c_lflag &= ~(ECHO | ECHONL);
		tcsetattr(STDOUT_FILENO, TCSAFLUSH, &term);
	}
#else /* NCURSES */
	initscr();
#endif /* !NCURSES */
	labelwidth = (w_width > 0 ? w_width + 1 : 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl $0x1c, %edi
leaq -0x224(%rip), %rsi      # 0x4270
callq 0x2250
callq 0x40e0
movl %eax, -0x4c(%rbp)
callq 0x4160
movl %eax, -0x50(%rbp)
cmpl $0x0, -0x4c(%rbp)
jle 0x4507
cmpl $0x0, -0x50(%rbp)
jle 0x4507
movl -0x4c(%rbp), %eax
imull -0x50(%rbp), %eax
movslq %eax, %rdi
callq 0x22d0
movq %rax, 0x4e4d(%rip)      # 0x9318
cmpq $0x0, 0x4e45(%rip)      # 0x9318
je 0x44f9
movq 0x4ad4(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
movq 0x4e32(%rip), %rsi      # 0x9318
movl -0x4c(%rbp), %eax
imull -0x50(%rbp), %eax
movslq %eax, %rcx
xorl %edx, %edx
callq 0x2030
jmp 0x4505
leaq 0x1cd3(%rip), %rdi      # 0x61d3
callq 0x2190
jmp 0x4512
movq $0x0, 0x4e06(%rip) # 0x9318
movl $0x0, 0x4df4(%rip)      # 0x9310
leaq 0x4d65(%rip), %rax      # 0x9288
movq (%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x455b
movl 0x4dd9(%rip), %eax      # 0x9310
addl $0x1, %eax
movl %eax, 0x4dd0(%rip)      # 0x9310
movl $0x1, %edi
callq 0x4640
movq -0x48(%rbp), %rax
movq 0x198(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x452a
movl 0x4daf(%rip), %edi      # 0x9310
callq 0x4690
movq 0x4a43(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
leaq 0x1f41(%rip), %rsi      # 0x64b8
movl $0x1b, %edx
movb $0x0, %al
callq 0x2320
movl $0x0, 0x4d83(%rip)      # 0x9310
movq 0x4a1c(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
leaq 0x1f27(%rip), %rsi      # 0x64c5
movl $0x1b, %edx
movb $0x0, %al
callq 0x2320
movl $0x1, %edi
callq 0x23c0
cmpl $0x0, %eax
je 0x4600
movl $0x1, %edi
leaq 0x4d5b(%rip), %rsi      # 0x9320
callq 0x2210
cmpl $0x0, %eax
jne 0x4600
leaq -0x3c(%rbp), %rdi
leaq 0x4d46(%rip), %rsi      # 0x9320
movl $0x3c, %edx
callq 0x2180
movl -0x30(%rbp), %eax
andl $-0x49, %eax
movl %eax, -0x30(%rbp)
movl $0x1, %edi
movl $0x2, %esi
leaq -0x3c(%rbp), %rdx
callq 0x22c0
leaq 0x4c1d(%rip), %rax      # 0x9224
cmpl $0x0, (%rax)
jle 0x461d
leaq 0x4c11(%rip), %rax      # 0x9224
movl (%rax), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x4624
xorl %eax, %eax
movl %eax, -0x54(%rbp)
jmp 0x4624
movl -0x54(%rbp), %eax
movl %eax, 0x4d2f(%rip)      # 0x935c
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)