#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 */
struct termios {
  int c_lflag;
  int *c_cc;
};

/* Variables and functions */
int ECHO;
int ICANON;
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ TCSANOW;
size_t VMIN;
size_t VTIME;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
char getchar();
int /*<<< orphan*/ printf(char *, ...);
int read(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ tcgetattr(int /*<<< orphan*/, struct termios *);
int /*<<< orphan*/ tcsetattr(int /*<<< orphan*/, int /*<<< orphan*/,
                             struct termios *);
int main(int argc, char *argv[]) {
  printf("regular reading\n");
  while (1) {
    char c;
    int b = read(STDIN_FILENO, &c, 1);
    if (b < 1) {
      printf("nothing read\n");
      continue;
    }
    printf("%c\n", c);
    fflush(stdout);
    if (c == '\n') {
      break;
    }
  }
  struct termios termios_struct;
  struct termios orig_termios_struct;
  tcgetattr(STDIN_FILENO, &orig_termios_struct);
  tcgetattr(STDIN_FILENO, &termios_struct);
  termios_struct.c_lflag &= (~ICANON) & (~ECHO);
  termios_struct.c_cc[VTIME] = 0;
  termios_struct.c_cc[VMIN] = 1;
  tcsetattr(STDIN_FILENO, TCSANOW, &termios_struct);
  sleep(1);
  printf("changed reading\n");
  while (1) {
    char c;
    int b = read(STDIN_FILENO, &c, 1);
    if (b < 1) {
      printf("nothing read\n");
      continue;
    }
    printf("%c\n", c);
    fflush(stdout);
    if (c == '\n') {
      break;
    }
  }
  while (1) {
    char c = getchar();
    printf("%c\n", c);
    fflush(stdout);
    if (c == '\n') {
      break;
    }
  }
  printf("regular reading\n");
  tcsetattr(STDIN_FILENO, TCSANOW, &orig_termios_struct);
  while (1) {
    char c;
    int b = read(STDIN_FILENO, &c, 1);
    if (b < 1) {
      printf("nothing read\n");
      continue;
    }
    printf("%c\n", c);
    fflush(stdout);
    if (c == '\n') {
      break;
    }
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e0d(%rip),%rax
mov    (%rax),%edi
lea    -0x11(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
jge    11db <main+0x5b>
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a4 <main+0x24>
movsbl -0x11(%rbp),%esi
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dd4(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
movsbl -0x11(%rbp),%eax
cmp    $0xa,%eax
jne    120d <main+0x8d>
jmp    1212 <main+0x92>
jmp    11a4 <main+0x24>
mov    0x2d9f(%rip),%rax
mov    (%rax),%edi
lea    -0x38(%rbp),%rsi
call   1070 <tcgetattr@plt>
mov    0x2d8d(%rip),%rax
mov    (%rax),%edi
lea    -0x28(%rbp),%rsi
call   1070 <tcgetattr@plt>
mov    0x2d73(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
mov    0x2d97(%rip),%rcx
mov    (%rcx),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
and    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2d5f(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
mov    0x2d62(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    0x2d31(%rip),%rax
mov    (%rax),%edi
mov    0x2d58(%rip),%rax
mov    (%rax),%esi
lea    -0x28(%rbp),%rdx
call   1080 <tcsetattr@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    0xd77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2cfe(%rip),%rax
mov    (%rax),%edi
lea    -0x39(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0x1,-0x40(%rbp)
jge    12ea <main+0x16a>
lea    0xd33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12b3 <main+0x133>
movsbl -0x39(%rbp),%esi
lea    0xd2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2cc5(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
movsbl -0x39(%rbp),%eax
cmp    $0xa,%eax
jne    131c <main+0x19c>
jmp    1321 <main+0x1a1>
jmp    12b3 <main+0x133>
jmp    1326 <main+0x1a6>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x41(%rbp)
movsbl -0x41(%rbp),%esi
lea    0xce4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2c7f(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
movsbl -0x41(%rbp),%eax
cmp    $0xa,%eax
jne    1362 <main+0x1e2>
jmp    1367 <main+0x1e7>
jmp    1326 <main+0x1a6>
lea    0xc92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2c3c(%rip),%rax
mov    (%rax),%edi
mov    0x2c63(%rip),%rax
mov    (%rax),%esi
lea    -0x38(%rbp),%rdx
call   1080 <tcsetattr@plt>
mov    0x2c21(%rip),%rax
mov    (%rax),%edi
lea    -0x42(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
mov    %eax,-0x48(%rbp)
cmpl   $0x1,-0x48(%rbp)
jge    13c7 <main+0x247>
lea    0xc56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1390 <main+0x210>
movsbl -0x42(%rbp),%esi
lea    0xc4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2be8(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
movsbl -0x42(%rbp),%eax
cmp    $0xa,%eax
jne    13f9 <main+0x279>
jmp    13fe <main+0x27e>
jmp    1390 <main+0x210>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xe6f(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e07(%rip),%r12
lea    0x8(%rsp),%rbx
lea    0xe67(%rip),%r14
lea    0xe3c(%rip),%r15
mov    0x2dfd(%rip),%r13
jmp    11d8 <main+0x48>
nopl   (%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
test   %eax,%eax
jle    11d0 <main+0x40>
movsbl 0x8(%rsp),%ebp
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x0(%r13),%edi
call   1070 <fflush@plt>
cmp    $0xa,%ebp
jne    11d8 <main+0x48>
mov    (%r12),%edi
lea    0x18(%rsp),%rsi
call   1080 <tcgetattr@plt>
mov    (%r12),%edi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
call   1080 <tcgetattr@plt>
mov    0x2d7e(%rip),%rax
mov    0x2da7(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
not    %ecx
and    %ecx,0x8(%rsp)
mov    0x10(%rsp),%rax
mov    0x2d71(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x2d78(%rip),%rcx
mov    (%rcx),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    (%r12),%edi
mov    0x2d73(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdx
call   1090 <tcsetattr@plt>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xd74(%rip),%rdi
call   1030 <puts@plt>
lea    0x7(%rsp),%rbx
lea    0xd83(%rip),%r14
lea    0xd58(%rip),%r15
jmp    12b8 <main+0x128>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
test   %eax,%eax
jle    12b0 <main+0x120>
movsbl 0x7(%rsp),%ebp
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x0(%r13),%edi
call   1070 <fflush@plt>
cmp    $0xa,%ebp
jne    12b8 <main+0x128>
lea    0xd0d(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1060 <getchar@plt>
movsbl %al,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x0(%r13),%edi
call   1070 <fflush@plt>
cmp    $0xa,%bpl
jne    1300 <main+0x170>
lea    0xce8(%rip),%rdi
call   1030 <puts@plt>
mov    (%r12),%edi
mov    0x2cac(%rip),%rax
mov    (%rax),%esi
lea    0x18(%rsp),%rdx
call   1090 <tcsetattr@plt>
lea    0x7(%rsp),%rbx
lea    0xcd0(%rip),%r14
lea    0xca5(%rip),%r15
jmp    1368 <main+0x1d8>
nopl   (%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    (%r12),%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
test   %eax,%eax
jle    1360 <main+0x1d0>
movsbl 0x7(%rsp),%ebp
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x0(%r13),%edi
call   1070 <fflush@plt>
cmp    $0xa,%ebp
jne    1368 <main+0x1d8>
xor    %edi,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
%struct.termios = type { i32, i32* }
@.str = [17 x i8] c"regular reading\0A\00"
@STDIN_FILENO = global i32 0
@.str.1 = [14 x i8] c"nothing read\0A\00"
@.str.2 = [4 x i8] c"%c\0A\00"
@stdout = global i32 0
@ICANON = global i32 0
@ECHO = global i32 0
@VTIME = global i64 0
@VMIN = global i64 0
@TCSANOW = global i32 0
@.str.3 = [17 x i8] c"changed reading\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i32
%8 = alloca %struct.termios
%9 = alloca %struct.termios
%10 = alloca i8
%11 = alloca i32
%12 = alloca i8
%13 = alloca i8
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %2, %21, %33
%17 = load i32, i32* @STDIN_FILENO
%18 = call i32 @read(i32 %17, i8* %6, i32 1)
store i32 %18, i32* %7
%19 = load i32, i32* %7
%20 = icmp slt i32 %19, 1
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %16
23: ; preds = %16
%24 = load i8, i8* %6
%25 = sext i8 %24 to i32
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %25)
%27 = load i32, i32* @stdout
%28 = call i32 @fflush(i32 %27)
%29 = load i8, i8* %6
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 10
br i1 %31, label %32, label %33
32: ; preds = %23
br label %34
33: ; preds = %23
br label %16
34: ; preds = %32
%35 = load i32, i32* @STDIN_FILENO
%36 = call i32 @tcgetattr(i32 %35, %struct.termios* %9)
%37 = load i32, i32* @STDIN_FILENO
%38 = call i32 @tcgetattr(i32 %37, %struct.termios* %8)
%39 = load i32, i32* @ICANON
%40 = xor i32 %39, -1
%41 = load i32, i32* @ECHO
%42 = xor i32 %41, -1
%43 = and i32 %40, %42
%44 = getelementptr inbounds %struct.termios, %struct.termios* %8, i32 0, i32 0
%45 = load i32, i32* %44
%46 = and i32 %45, %43
store i32 %46, i32* %44
%47 = getelementptr inbounds %struct.termios, %struct.termios* %8, i32 0, i32 1
%48 = load i32*, i32** %47
%49 = load i64, i64* @VTIME
%50 = getelementptr inbounds i32, i32* %48, i64 %49
store i32 0, i32* %50
%51 = getelementptr inbounds %struct.termios, %struct.termios* %8, i32 0, i32 1
%52 = load i32*, i32** %51
%53 = load i64, i64* @VMIN
%54 = getelementptr inbounds i32, i32* %52, i64 %53
store i32 1, i32* %54
%55 = load i32, i32* @STDIN_FILENO
%56 = load i32, i32* @TCSANOW
%57 = call i32 @tcsetattr(i32 %55, i32 %56, %struct.termios* %8)
%58 = call i32 @sleep(i32 1)
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %60
60: ; preds = %34, %65, %77
%61 = load i32, i32* @STDIN_FILENO
%62 = call i32 @read(i32 %61, i8* %10, i32 1)
store i32 %62, i32* %11
%63 = load i32, i32* %11
%64 = icmp slt i32 %63, 1
br i1 %64, label %65, label %67
65: ; preds = %60
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %60
67: ; preds = %60
%68 = load i8, i8* %10
%69 = sext i8 %68 to i32
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %69)
%71 = load i32, i32* @stdout
%72 = call i32 @fflush(i32 %71)
%73 = load i8, i8* %10
%74 = sext i8 %73 to i32
%75 = icmp eq i32 %74, 10
br i1 %75, label %76, label %77
76: ; preds = %67
br label %78
77: ; preds = %67
br label %60
78: ; preds = %76
br label %79
79: ; preds = %78, %90
%80 = call signext i8 (...) @getchar()
store i8 %80, i8* %12
%81 = load i8, i8* %12
%82 = sext i8 %81 to i32
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %82)
%84 = load i32, i32* @stdout
%85 = call i32 @fflush(i32 %84)
%86 = load i8, i8* %12
%87 = sext i8 %86 to i32
%88 = icmp eq i32 %87, 10
br i1 %88, label %89, label %90
89: ; preds = %79
br label %91
90: ; preds = %79
br label %79
91: ; preds = %89
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%93 = load i32, i32* @STDIN_FILENO
%94 = load i32, i32* @TCSANOW
%95 = call i32 @tcsetattr(i32 %93, i32 %94, %struct.termios* %9)
br label %96
96: ; preds = %91, %101, %113
%97 = load i32, i32* @STDIN_FILENO
%98 = call i32 @read(i32 %97, i8* %13, i32 1)
store i32 %98, i32* %14
%99 = load i32, i32* %14
%100 = icmp slt i32 %99, 1
br i1 %100, label %101, label %103
101: ; preds = %96
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %96
103: ; preds = %96
%104 = load i8, i8* %13
%105 = sext i8 %104 to i32
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %105)
%107 = load i32, i32* @stdout
%108 = call i32 @fflush(i32 %107)
%109 = load i8, i8* %13
%110 = sext i8 %109 to i32
%111 = icmp eq i32 %110, 10
br i1 %111, label %112, label %113
112: ; preds = %103
br label %114
113: ; preds = %103
br label %96
114: ; preds = %112
%115 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.termios = type { i32, i32* }
@STDIN_FILENO = global i32 0
@.str.2 = [4 x i8] c"%c\0A\00"
@stdout = global i32 0
@ICANON = global i32 0
@ECHO = global i32 0
@VTIME = global i64 0
@VMIN = global i64 0
@TCSANOW = global i32 0
@str.4 = [16 x i8] c"changed reading\00"
@str.5 = [16 x i8] c"regular reading\00"
@str.8 = [13 x i8] c"nothing read\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
%4 = alloca %struct.termios
%5 = alloca %struct.termios
%6 = alloca i8
%7 = alloca i8
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.5, i64 0, i64 0))
br label %9
9: ; preds = %22, %2
%10 = load i32, i32* @STDIN_FILENO
%11 = call i32 @read(i32 %10, i8* %3, i32 1)
%12 = icmp slt i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.8, i64 0, i64 0))
br label %22
15: ; preds = %9
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %17)
%19 = load i32, i32* @stdout
%20 = tail call i32 @fflush(i32 %19)
%21 = icmp eq i8 %16, 10
br i1 %21, label %23, label %22
22: ; preds = %15, %13
br label %9
23: ; preds = %15
%24 = bitcast %struct.termios* %4 to i8*
%25 = bitcast %struct.termios* %5 to i8*
%26 = load i32, i32* @STDIN_FILENO
%27 = call i32 @tcgetattr(i32 %26, %struct.termios* %5)
%28 = load i32, i32* @STDIN_FILENO
%29 = call i32 @tcgetattr(i32 %28, %struct.termios* %4)
%30 = load i32, i32* @ICANON
%31 = load i32, i32* @ECHO
%32 = or i32 %31, %30
%33 = xor i32 %32, -1
%34 = getelementptr inbounds %struct.termios, %struct.termios* %4, i64 0, i32 0
%35 = load i32, i32* %34
%36 = and i32 %35, %33
store i32 %36, i32* %34
%37 = getelementptr inbounds %struct.termios, %struct.termios* %4, i64 0, i32 1
%38 = load i32*, i32** %37
%39 = load i64, i64* @VTIME
%40 = getelementptr inbounds i32, i32* %38, i64 %39
store i32 0, i32* %40
%41 = load i64, i64* @VMIN
%42 = getelementptr inbounds i32, i32* %38, i64 %41
store i32 1, i32* %42
%43 = load i32, i32* @STDIN_FILENO
%44 = load i32, i32* @TCSANOW
%45 = call i32 @tcsetattr(i32 %43, i32 %44, %struct.termios* %4)
%46 = call i32 @sleep(i32 1)
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.4, i64 0, i64 0))
br label %48
48: ; preds = %61, %23
%49 = load i32, i32* @STDIN_FILENO
%50 = call i32 @read(i32 %49, i8* %6, i32 1)
%51 = icmp slt i32 %50, 1
br i1 %51, label %52, label %54
52: ; preds = %48
%53 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.8, i64 0, i64 0))
br label %61
54: ; preds = %48
%55 = load i8, i8* %6
%56 = sext i8 %55 to i32
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %56)
%58 = load i32, i32* @stdout
%59 = call i32 @fflush(i32 %58)
%60 = icmp eq i8 %55, 10
br i1 %60, label %62, label %61
61: ; preds = %54, %52
br label %48
62: ; preds = %54
br label %63
63: ; preds = %62, %63
%64 = call signext i8 (...) @getchar()
%65 = sext i8 %64 to i32
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %65)
%67 = load i32, i32* @stdout
%68 = call i32 @fflush(i32 %67)
%69 = icmp eq i8 %64, 10
br i1 %69, label %70, label %63
70: ; preds = %63
%71 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.5, i64 0, i64 0))
%72 = load i32, i32* @STDIN_FILENO
%73 = load i32, i32* @TCSANOW
%74 = call i32 @tcsetattr(i32 %72, i32 %73, %struct.termios* %5)
br label %75
75: ; preds = %88, %70
%76 = load i32, i32* @STDIN_FILENO
%77 = call i32 @read(i32 %76, i8* %7, i32 1)
%78 = icmp slt i32 %77, 1
br i1 %78, label %79, label %81
79: ; preds = %75
%80 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.8, i64 0, i64 0))
br label %88
81: ; preds = %75
%82 = load i8, i8* %7
%83 = sext i8 %82 to i32
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %83)
%85 = load i32, i32* @stdout
%86 = call i32 @fflush(i32 %85)
%87 = icmp eq i8 %82, 10
br i1 %87, label %89, label %88
88: ; preds = %81, %79
br label %75
89: ; preds = %81
%90 = call i32 @exit(i32 0)
unreachable
}