#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 */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
int getline(char **, size_t *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ stdin;
int main(int argc, char **argv) {
  size_t n = 0;
  ssize_t len = 0;
  char *line = NULL;
  while ((len = getline(&line, &n, stdin)) > -1)
    if (len > 80)
      printf("%s", line);
  putchar('\n');
  free(line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movq   $0x0,-0x28(%rbp)
mov    0x2e74(%rip),%rax
mov    (%rax),%edx
lea    -0x28(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <getline@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0xffffffff,%eax
jle    11ae <main+0x6e>
cmpl   $0x50,-0x1c(%rbp)
jle    11a9 <main+0x69>
mov    -0x28(%rbp),%rsi
lea    0xe5c(%rip),%rdi
call   1050 <printf@plt>
jmp    116d <main+0x2d>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
mov    0x2e84(%rip),%r12
mov    (%r12),%edx
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1060 <getline@plt>
test   %eax,%eax
js     11b7 <main+0x77>
lea    0xe7e(%rip),%r14
lea    0x8(%rsp),%r15
lea    0x10(%rsp),%rbx
jmp    11a3 <main+0x63>
xchg   %ax,%ax
mov    (%r12),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <getline@plt>
test   %eax,%eax
js     11b7 <main+0x77>
cmp    $0x51,%eax
jb     1190 <main+0x50>
mov    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1050 <printf@plt>
jmp    1190 <main+0x50>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@.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 i64
%7 = alloca i32
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* %6
store i32 0, i32* %7
store i8* null, i8** %8
br label %9
9: ; preds = %19, %2
%10 = load i32, i32* @stdin
%11 = call i32 @getline(i8** %8, i64* %6, i32 %10)
store i32 %11, i32* %7
%12 = icmp sgt i32 %11, -1
br i1 %12, label %13, label %20
13: ; preds = %9
%14 = load i32, i32* %7
%15 = icmp sgt i32 %14, 80
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i8*, i8** %8
%18 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %16, %13
br label %9
20: ; preds = %9
%21 = call i32 @putchar(i8 signext 10)
%22 = load i8*, i8** %8
%23 = call i32 @free(i8* %22)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%6 = bitcast i8** %4 to i8*
store i8* null, i8** %4
%7 = load i32, i32* @stdin
%8 = call i32 @getline(i8** %4, i64* %3, i32 %7)
%9 = icmp sgt i32 %8, -1
br i1 %9, label %10, label %20
10: ; preds = %2, %16
%11 = phi i32 [ %18, %16 ], [ %8, %2 ]
%12 = icmp ugt i32 %11, 80
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i8*, i8** %4
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %14)
br label %16
16: ; preds = %13, %10
%17 = load i32, i32* @stdin
%18 = call i32 @getline(i8** %4, i64* %3, i32 %17)
%19 = icmp sgt i32 %18, -1
br i1 %19, label %10, label %20
20: ; preds = %16, %2
%21 = call i32 @putchar(i8 signext 10)
%22 = load i8*, i8** %4
%23 = call i32 @free(i8* %22)
ret i32 0
}