#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 getlittleline(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  int len;
  char line[1000000];
  while ((len = getlittleline(line)) > 0) {
    if (len > 80 - 1) {
      printf("%s", line);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf4260,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xf4260(%rbp),%rdi
call   1040 <getlittleline@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jle    1173 <main+0x53>
cmpl   $0x4f,-0x14(%rbp)
jle    116e <main+0x4e>
lea    -0xf4260(%rbp),%rsi
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
jmp    1139 <main+0x19>
xor    %eax,%eax
add    $0xf4260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xf4248,%rsp
mov    %rsp,%rdi
call   1040 <getlittleline@plt>
test   %eax,%eax
jle    116e <main+0x4e>
lea    0xec3(%rip),%r14
mov    %rsp,%rbx
jmp    115c <main+0x3c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1040 <getlittleline@plt>
test   %eax,%eax
jle    116e <main+0x4e>
cmp    $0x50,%eax
jb     1150 <main+0x30>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0xf4248,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [1000000 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %8
8: ; preds = %18, %2
%9 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %7, i64 0, i64 0
%10 = call i32 @getlittleline(i8* %9)
store i32 %10, i32* %6
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load i32, i32* %6
%14 = icmp sgt i32 %13, 79
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %7, i64 0, i64 0
%17 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %15, %12
br label %8
19: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000000 x i8]
%4 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %3, i64 0, i64 0
%5 = call i32 @getlittleline(i8* %4)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %2, %12
%8 = phi i32 [ %13, %12 ], [ %5, %2 ]
%9 = icmp ugt i32 %8, 79
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %12
12: ; preds = %10, %7
%13 = call i32 @getlittleline(i8* %4)
%14 = icmp sgt i32 %13, 0
br i1 %14, label %7, label %15
15: ; preds = %12, %2
ret i32 0
}