#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ echo();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ system(char *);
void cleanup_terminal_ncurses(void) {
  echo();
  system("setfont  >/dev/null 2>&1");
  system(
      "setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz  >/dev/null 2>&1");
  system("setterm -blank 10");
  endwin();
  system("clear");
  system("reset");
}


x86 assembly (clang, -O0):
<cleanup_terminal_ncurses>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <echo@plt>
lea    0xebe(%rip),%rdi
call   1040 <system@plt>
lea    0xecb(%rip),%rdi
call   1040 <system@plt>
lea    0xf04(%rip),%rdi
call   1040 <system@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
lea    0xf03(%rip),%rdi
call   1040 <system@plt>
lea    0xefd(%rip),%rdi
call   1040 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup_terminal_ncurses>:
push   %rax
xor    %eax,%eax
call   1030 <echo@plt>
lea    0xec1(%rip),%rdi
call   1040 <system@plt>
lea    0xece(%rip),%rdi
call   1040 <system@plt>
lea    0xf07(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
call   1050 <endwin@plt>
lea    0xf06(%rip),%rdi
call   1040 <system@plt>
lea    0xf00(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"setfont >/dev/null 2>&1\00"
@.str.1 = [69 x i8] c"setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz >/dev/null 2>&1\00"
@.str.2 = [18 x i8] c"setterm -blank 10\00"
@.str.3 = [6 x i8] c"clear\00"
@.str.4 = [6 x i8] c"reset\00"
define void @cleanup_terminal_ncurses() {
%1 = call i32 (...) @echo()
%2 = call i32 @system(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 (...) @endwin()
%6 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"setfont >/dev/null 2>&1\00"
@.str.1 = [69 x i8] c"setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz >/dev/null 2>&1\00"
@.str.2 = [18 x i8] c"setterm -blank 10\00"
@.str.3 = [6 x i8] c"clear\00"
@.str.4 = [6 x i8] c"reset\00"
define void @cleanup_terminal_ncurses() {
%1 = tail call i32 (...) @echo()
%2 = tail call i32 @system(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 (...) @endwin()
%6 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
ret void
}