#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;
};

/* Variables and functions */
int ECHO;
int ICANON;
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ TCSANOW;
char *calloc(int, long);
scalar_t__ cmp_end(char *, char *, char *, char *);
int /*<<< orphan*/ feof(int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
char getchar();
int /*<<< orphan*/ printf(char *, ...);
char *realloc(char *, long);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ tcgetattr(int /*<<< orphan*/, struct termios *);
int /*<<< orphan*/ tcsetattr(int /*<<< orphan*/, int /*<<< orphan*/,
                             struct termios *);
double time_now();
int /*<<< orphan*/ time_since_replace(double *);
int main(int argc, char *argv[]) {
  if (argc > 1 &&
      ((0 == strcmp(argv[1], "-?")) || (0 == strcmp(argv[1], "--help")))) {
    printf("bt - counts the time between occurrences of the given string on "
           "stdin\n"
           "   - stdin is consumed.\n"
           "   - output will be the times in floating point seconds, one per "
           "line\n"
           "\n"
           "   Usage: bt <string>\n"
           "\n"
           "   If the string is not given, \"\\n\" is used.\n"
           "   Note that bt disables buffering of stdin and operates one\n"
           "   character at a time, but buffering may need to be disabled for "
           "the\n"
           "   program generating input data.\n");
    return -1;
  }
  char *string = "\n";
  long inbuf_size = 65536;
  long inbuf_stop = 0;
  char *inbuf = calloc(sizeof(char), inbuf_size);
  if (argc > 1) {
    string = argv[1];
  }
  char *string_end = string;
  while (string_end[0] != '\0') {
    string_end++;
  }
  struct termios old_tio, new_tio;
  tcgetattr(STDIN_FILENO, &old_tio);
  new_tio = old_tio;
  new_tio.c_lflag &= (~ICANON & ~ECHO);
  tcsetattr(STDIN_FILENO, TCSANOW, &new_tio);
  double last_time = time_now();
  while (!feof(stdin)) {
    if (inbuf_stop >= inbuf_size - 1) {
      inbuf_size *= 1.3;
      inbuf = realloc(inbuf, inbuf_size);
    }
    inbuf[inbuf_stop++] = getchar();
    inbuf[inbuf_stop] = '\0';
    if (cmp_end(inbuf, inbuf + inbuf_stop, string, string_end)) {
      printf("%lf\n", time_since_replace(&last_time));
      inbuf_stop = 0;
    }
  }
  tcsetattr(STDIN_FILENO, TCSANOW, &old_tio);
  free(inbuf);
}


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)
cmpl   $0x1,-0x8(%rbp)
jle    123e <main+0x7e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe19(%rip),%rsi
call   1080 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1224 <main+0x64>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdfa(%rip),%rsi
call   1080 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    123e <main+0x7e>
lea    0xde7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1405 <main+0x245>
lea    0xf5a(%rip),%rax
mov    %rax,-0x18(%rbp)
movq   $0x10000,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x20(%rbp),%rsi
mov    $0x1,%edi
call   1070 <calloc@plt>
mov    %rax,-0x30(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1281 <main+0xc1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     12aa <main+0xea>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1289 <main+0xc9>
mov    0x2d17(%rip),%rax
mov    (%rax),%edi
lea    -0x40(%rbp),%rsi
call   10d0 <tcgetattr@plt>
mov    -0x40(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    0x2cf7(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
mov    0x2d03(%rip),%rcx
mov    (%rcx),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
and    -0x48(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    0x2cdf(%rip),%rax
mov    (%rax),%edi
mov    0x2cee(%rip),%rax
mov    (%rax),%esi
lea    -0x48(%rbp),%rdx
call   10e0 <tcsetattr@plt>
mov    $0x0,%al
call   10c0 <time_now@plt>
movsd  %xmm0,-0x50(%rbp)
mov    0x2cd8(%rip),%rax
mov    (%rax),%edi
call   10a0 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    132c <main+0x16c>
jmp    13e1 <main+0x221>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
jl     136d <main+0x1ad>
cvtsi2sdq -0x20(%rbp),%xmm0
movsd  0xcb1(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x20(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10b0 <realloc@plt>
mov    %rax,-0x30(%rbp)
mov    $0x0,%al
call   1090 <getchar@plt>
mov    %al,%dl
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x28(%rbp)
mov    %dl,(%rax,%rcx,1)
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x30(%rbp),%rdi
mov    -0x30(%rbp),%rsi
add    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x38(%rbp),%rcx
call   1060 <cmp_end@plt>
cmp    $0x0,%rax
je     13dc <main+0x21c>
lea    -0x50(%rbp),%rdi
call   1050 <time_since_replace@plt>
mov    %eax,%esi
lea    0xdd4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x0,-0x28(%rbp)
jmp    1309 <main+0x149>
mov    0x2be0(%rip),%rax
mov    (%rax),%edi
mov    0x2bef(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   10e0 <tcsetattr@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
cmp    $0x2,%edi
jl     1230 <main+0x60>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0xe17(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     12e4 <main+0x114>
mov    0x8(%rbx),%rdi
lea    0xe01(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     12e4 <main+0x114>
mov    $0x10000,%esi
mov    $0x1,%edi
call   1080 <calloc@plt>
mov    %rax,%r15
mov    0x8(%rbx),%r14
jmp    1249 <main+0x79>
mov    $0x10000,%esi
mov    $0x1,%edi
call   1080 <calloc@plt>
mov    %rax,%r15
lea    0xdcc(%rip),%r14
lea    -0x1(%r14),%rbx
nopl   (%rax)
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1250 <main+0x80>
mov    0x2d67(%rip),%rbp
mov    0x0(%rbp),%edi
mov    %rsp,%rsi
call   10e0 <tcgetattr@plt>
mov    0x2d4d(%rip),%rax
mov    0x2d5e(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
not    %ecx
and    (%rsp),%ecx
mov    %ecx,0x8(%rsp)
mov    0x0(%rbp),%edi
mov    0x2d4f(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
call   10f0 <tcsetattr@plt>
xor    %eax,%eax
call   10d0 <time_now@plt>
movsd  %xmm0,0x10(%rsp)
mov    0x2d37(%rip),%r13
mov    0x0(%r13),%edi
call   10b0 <feof@plt>
test   %eax,%eax
je     1304 <main+0x134>
mov    0x2d03(%rip),%rax
mov    (%rax),%edi
mov    0x2d12(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   10f0 <tcsetattr@plt>
mov    %r15,%rdi
call   1030 <free@plt>
xor    %eax,%eax
jmp    12f5 <main+0x125>
lea    0xd2c(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x10000,%ebp
xor    %r12d,%r12d
jmp    1321 <main+0x151>
xchg   %ax,%ax
add    $0x1,%r12
mov    0x0(%r13),%edi
call   10b0 <feof@plt>
test   %eax,%eax
jne    12be <main+0xee>
lea    -0x1(%rbp),%rax
cmp    %rax,%r12
jl     134d <main+0x17d>
xorps  %xmm0,%xmm0
cvtsi2sd %rbp,%xmm0
mulsd  0xcc6(%rip),%xmm0
cvttsd2si %xmm0,%rbp
mov    %r15,%rdi
mov    %rbp,%rsi
call   10c0 <realloc@plt>
mov    %rax,%r15
xor    %eax,%eax
call   10a0 <getchar@plt>
mov    %al,(%r15,%r12,1)
lea    (%r15,%r12,1),%rsi
add    $0x1,%rsi
movb   $0x0,0x1(%r15,%r12,1)
mov    %r15,%rdi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1070 <cmp_end@plt>
test   %rax,%rax
je     1310 <main+0x140>
lea    0x10(%rsp),%rdi
call   1060 <time_since_replace@plt>
lea    0xc88(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %r12d,%r12d
jmp    1314 <main+0x144>

LLVM IR (-O0):
%struct.termios = type { i32 }
@.str = [3 x i8] c"-?\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [399 x i8] c"bt - counts the time between occurrences of the given string on stdin\0A - stdin is consumed.\0A - output will be the times in floating point seconds, one per line\0A\0A Usage: bt <string>\0A\0A If the string is not given, \22\\n\22 is used.\0A Note that bt disables buffering of stdin and operates one\0A character at a time, but buffering may need to be disabled for the\0A program generating input data.\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@STDIN_FILENO = global i32 0
@ICANON = global i32 0
@ECHO = global i32 0
@TCSANOW = global i32 0
@stdin = global i32 0
@.str.4 = [5 x i8] c"%lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca %struct.termios
%12 = alloca %struct.termios
%13 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 1
br i1 %15, label %16, label %30
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%21 = icmp eq i64 0, %20
br i1 %21, label %28, label %22
22: ; preds = %16
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp eq i64 0, %26
br i1 %27, label %28, label %30
28: ; preds = %22, %16
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([399 x i8], [399 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %3
br label %112
30: ; preds = %22, %2
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8** %6
store i64 65536, i64* %7
store i64 0, i64* %8
%31 = load i64, i64* %7
%32 = call i8* @calloc(i32 1, i64 %31)
store i8* %32, i8** %9
%33 = load i32, i32* %4
%34 = icmp sgt i32 %33, 1
br i1 %34, label %35, label %39
35: ; preds = %30
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 1
%38 = load i8*, i8** %37
store i8* %38, i8** %6
br label %39
39: ; preds = %35, %30
%40 = load i8*, i8** %6
store i8* %40, i8** %10
br label %41
41: ; preds = %47, %39
%42 = load i8*, i8** %10
%43 = getelementptr inbounds i8, i8* %42, i64 0
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp ne i32 %45, 0
br i1 %46, label %47, label %50
47: ; preds = %41
%48 = load i8*, i8** %10
%49 = getelementptr inbounds i8, i8* %48, i32 1
store i8* %49, i8** %10
br label %41
50: ; preds = %41
%51 = load i32, i32* @STDIN_FILENO
%52 = call i32 @tcgetattr(i32 %51, %struct.termios* %11)
%53 = bitcast %struct.termios* %12 to i8*
%54 = bitcast %struct.termios* %11 to i8*
%55 = load i32, i32* @ICANON
%56 = xor i32 %55, -1
%57 = load i32, i32* @ECHO
%58 = xor i32 %57, -1
%59 = and i32 %56, %58
%60 = getelementptr inbounds %struct.termios, %struct.termios* %12, i32 0, i32 0
%61 = load i32, i32* %60
%62 = and i32 %61, %59
store i32 %62, i32* %60
%63 = load i32, i32* @STDIN_FILENO
%64 = load i32, i32* @TCSANOW
%65 = call i32 @tcsetattr(i32 %63, i32 %64, %struct.termios* %12)
%66 = call double (...) @time_now()
store double %66, double* %13
br label %67
67: ; preds = %105, %50
%68 = load i32, i32* @stdin
%69 = call i32 @feof(i32 %68)
%70 = icmp ne i32 %69, 0
%71 = xor i1 %70, true
br i1 %71, label %72, label %106
72: ; preds = %67
%73 = load i64, i64* %8
%74 = load i64, i64* %7
%75 = sub nsw i64 %74, 1
%76 = icmp sge i64 %73, %75
br i1 %76, label %77, label %85
77: ; preds = %72
%78 = load i64, i64* %7
%79 = sitofp i64 %78 to double
%80 = fmul double %79, 1.300000e+00
%81 = fptosi double %80 to i64
store i64 %81, i64* %7
%82 = load i8*, i8** %9
%83 = load i64, i64* %7
%84 = call i8* @realloc(i8* %82, i64 %83)
store i8* %84, i8** %9
br label %85
85: ; preds = %77, %72
%86 = call signext i8 (...) @getchar()
%87 = load i8*, i8** %9
%88 = load i64, i64* %8
%89 = add nsw i64 %88, 1
store i64 %89, i64* %8
%90 = getelementptr inbounds i8, i8* %87, i64 %88
store i8 %86, i8* %90
%91 = load i8*, i8** %9
%92 = load i64, i64* %8
%93 = getelementptr inbounds i8, i8* %91, i64 %92
store i8 0, i8* %93
%94 = load i8*, i8** %9
%95 = load i8*, i8** %9
%96 = load i64, i64* %8
%97 = getelementptr inbounds i8, i8* %95, i64 %96
%98 = load i8*, i8** %6
%99 = load i8*, i8** %10
%100 = call i64 @cmp_end(i8* %94, i8* %97, i8* %98, i8* %99)
%101 = icmp ne i64 %100, 0
br i1 %101, label %102, label %105
102: ; preds = %85
%103 = call i32 @time_since_replace(double* %13)
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %103)
store i64 0, i64* %8
br label %105
105: ; preds = %102, %85
br label %67
106: ; preds = %67
%107 = load i32, i32* @STDIN_FILENO
%108 = load i32, i32* @TCSANOW
%109 = call i32 @tcsetattr(i32 %107, i32 %108, %struct.termios* %11)
%110 = load i8*, i8** %9
%111 = call i32 @free(i8* %110)
br label %112
112: ; preds = %106, %28
%113 = load i32, i32* %3
ret i32 %113
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@.str = [3 x i8] c"-?\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.3 = [2 x i8] c"\0A\00"
@STDIN_FILENO = global i32 0
@ICANON = global i32 0
@ECHO = global i32 0
@TCSANOW = global i32 0
@stdin = global i32 0
@.str.4 = [5 x i8] c"%lf\0A\00"
@str = [398 x i8] c"bt - counts the time between occurrences of the given string on stdin\0A - stdin is consumed.\0A - output will be the times in floating point seconds, one per line\0A\0A Usage: bt <string>\0A\0A If the string is not given, \22\\n\22 is used.\0A Note that bt disables buffering of stdin and operates one\0A character at a time, but buffering may need to be disabled for the\0A program generating input data.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.termios
%4 = alloca %struct.termios
%5 = alloca double
%6 = icmp sgt i32 %0, 1
br i1 %6, label %7, label %18
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %7
%13 = load i8*, i8** %8
%14 = tail call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %12, %7
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([398 x i8], [398 x i8]* @str, i64 0, i64 0))
br label %86
18: ; preds = %2
%19 = tail call i8* @calloc(i32 1, i64 65536)
br label %23
20: ; preds = %12
%21 = tail call i8* @calloc(i32 1, i64 65536)
%22 = load i8*, i8** %8
br label %23
23: ; preds = %18, %20
%24 = phi i8* [ %21, %20 ], [ %19, %18 ]
%25 = phi i8* [ %22, %20 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), %18 ]
br label %26
26: ; preds = %26, %23
%27 = phi i8* [ %25, %23 ], [ %30, %26 ]
%28 = load i8, i8* %27
%29 = icmp eq i8 %28, 0
%30 = getelementptr inbounds i8, i8* %27, i64 1
br i1 %29, label %31, label %26
31: ; preds = %26
%32 = bitcast %struct.termios* %3 to i8*
%33 = bitcast %struct.termios* %4 to i8*
%34 = load i32, i32* @STDIN_FILENO
%35 = call i32 @tcgetattr(i32 %34, %struct.termios* %3)
%36 = getelementptr inbounds %struct.termios, %struct.termios* %3, i64 0, i32 0
%37 = getelementptr inbounds %struct.termios, %struct.termios* %4, i64 0, i32 0
%38 = load i32, i32* %36
%39 = load i32, i32* @ICANON
%40 = load i32, i32* @ECHO
%41 = or i32 %40, %39
%42 = xor i32 %41, -1
%43 = and i32 %38, %42
store i32 %43, i32* %37
%44 = load i32, i32* @STDIN_FILENO
%45 = load i32, i32* @TCSANOW
%46 = call i32 @tcsetattr(i32 %44, i32 %45, %struct.termios* %4)
%47 = bitcast double* %5 to i8*
%48 = call double (...) @time_now()
store double %48, double* %5
%49 = load i32, i32* @stdin
%50 = call i32 @feof(i32 %49)
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %80
52: ; preds = %31, %75
%53 = phi i8* [ %65, %75 ], [ %24, %31 ]
%54 = phi i64 [ %76, %75 ], [ 0, %31 ]
%55 = phi i64 [ %64, %75 ], [ 65536, %31 ]
%56 = add nsw i64 %55, -1
%57 = icmp slt i64 %54, %56
br i1 %57, label %63, label %58
58: ; preds = %52
%59 = sitofp i64 %55 to double
%60 = fmul double %59, 1.300000e+00
%61 = fptosi double %60 to i64
%62 = call i8* @realloc(i8* %53, i64 %61)
br label %63
63: ; preds = %58, %52
%64 = phi i64 [ %61, %58 ], [ %55, %52 ]
%65 = phi i8* [ %62, %58 ], [ %53, %52 ]
%66 = call signext i8 (...) @getchar()
%67 = add nsw i64 %54, 1
%68 = getelementptr inbounds i8, i8* %65, i64 %54
store i8 %66, i8* %68
%69 = getelementptr inbounds i8, i8* %65, i64 %67
store i8 0, i8* %69
%70 = call i64 @cmp_end(i8* %65, i8* %69, i8* %25, i8* %27)
%71 = icmp eq i64 %70, 0
br i1 %71, label %75, label %72
72: ; preds = %63
%73 = call i32 @time_since_replace(double* %5)
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %73)
br label %75
75: ; preds = %72, %63
%76 = phi i64 [ 0, %72 ], [ %67, %63 ]
%77 = load i32, i32* @stdin
%78 = call i32 @feof(i32 %77)
%79 = icmp eq i32 %78, 0
br i1 %79, label %52, label %80
80: ; preds = %75, %31
%81 = phi i8* [ %24, %31 ], [ %65, %75 ]
%82 = load i32, i32* @STDIN_FILENO
%83 = load i32, i32* @TCSANOW
%84 = call i32 @tcsetattr(i32 %82, i32 %83, %struct.termios* %3)
%85 = call i32 @free(i8* %81)
br label %86
86: ; preds = %80, %16
%87 = phi i32 [ -1, %16 ], [ 0, %80 ]
ret i32 %87
}