#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*/ feof(int /*<<< orphan*/);
char getchar();
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ stdin;
int main() {
  int comment = 0;
  int col = 0;
  char c0, c1;
  c0 = getchar();
  while (!feof(stdin)) {
    c1 = getchar();
    if (c1 == 9)
      c1 = 32;
    if (col < 71 || c0 == 10) {
      putchar(c0);
    } else {
      if (c1 == 10 || c1 == 13) {
        putchar(c0);
      } else {
        putchar('\\');
        putchar(10);
        putchar(c0);
        col = 0;
      }
    }
    col++;
    if (c0 == 10)
      col = 0;
    c0 = c1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0xd(%rbp)
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
call   1050 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    117a <main+0x4a>
jmp    1233 <main+0x103>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0xe(%rbp)
movsbl -0xe(%rbp),%eax
cmp    $0x9,%eax
jne    1195 <main+0x65>
movb   $0x20,-0xe(%rbp)
cmpl   $0x47,-0xc(%rbp)
jl     11ac <main+0x7c>
movsbl -0xd(%rbp),%eax
cmp    $0xa,%eax
jne    11ba <main+0x8a>
movsbl -0xd(%rbp),%edi
call   1030 <putchar@plt>
jmp    120b <main+0xdb>
movsbl -0xe(%rbp),%eax
cmp    $0xa,%eax
je     11d4 <main+0xa4>
movsbl -0xe(%rbp),%eax
cmp    $0xd,%eax
jne    11e2 <main+0xb2>
movsbl -0xd(%rbp),%edi
call   1030 <putchar@plt>
jmp    1206 <main+0xd6>
mov    $0x5c,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl -0xd(%rbp),%edi
call   1030 <putchar@plt>
movl   $0x0,-0xc(%rbp)
jmp    120b <main+0xdb>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movsbl -0xd(%rbp),%eax
cmp    $0xa,%eax
jne    1228 <main+0xf8>
movl   $0x0,-0xc(%rbp)
mov    -0xe(%rbp),%al
mov    %al,-0xd(%rbp)
jmp    1157 <main+0x27>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %r14d,%r14d
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%r13d
mov    0x2e99(%rip),%r12
mov    (%r12),%edi
call   1050 <feof@plt>
test   %eax,%eax
je     116d <main+0x3d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x20,%r15d
xor    %ebp,%ebp
jmp    119f <main+0x6f>
nopw   0x0(%rax,%rax,1)
movsbl %bl,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    $0xa,%bl
cmove  %r14d,%ebp
mov    (%r12),%edi
call   1050 <feof@plt>
test   %eax,%eax
jne    115c <main+0x2c>
mov    %r13d,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0x9,%al
movzbl %al,%r13d
cmove  %r15d,%r13d
cmp    $0x47,%ebp
jl     1180 <main+0x50>
cmp    $0xa,%bl
je     1180 <main+0x50>
cmp    $0xa,%r13b
je     1180 <main+0x50>
cmp    $0xd,%r13b
je     1180 <main+0x50>
mov    $0x5c,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %ebp,%ebp
jmp    1180 <main+0x50>

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%6 = call signext i8 (...) @getchar()
store i8 %6, i8* %4
br label %7
7: ; preds = %52, %0
%8 = load i32, i32* @stdin
%9 = call i32 @feof(i32 %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
br i1 %11, label %12, label %54
12: ; preds = %7
%13 = call signext i8 (...) @getchar()
store i8 %13, i8* %5
%14 = load i8, i8* %5
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 9
br i1 %16, label %17, label %18
17: ; preds = %12
store i8 32, i8* %5
br label %18
18: ; preds = %17, %12
%19 = load i32, i32* %3
%20 = icmp slt i32 %19, 71
br i1 %20, label %25, label %21
21: ; preds = %18
%22 = load i8, i8* %4
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 10
br i1 %24, label %25, label %28
25: ; preds = %21, %18
%26 = load i8, i8* %4
%27 = call i32 @putchar(i8 signext %26)
br label %45
28: ; preds = %21
%29 = load i8, i8* %5
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 10
br i1 %31, label %36, label %32
32: ; preds = %28
%33 = load i8, i8* %5
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 13
br i1 %35, label %36, label %39
36: ; preds = %32, %28
%37 = load i8, i8* %4
%38 = call i32 @putchar(i8 signext %37)
br label %44
39: ; preds = %32
%40 = call i32 @putchar(i8 signext 92)
%41 = call i32 @putchar(i8 signext 10)
%42 = load i8, i8* %4
%43 = call i32 @putchar(i8 signext %42)
store i32 0, i32* %3
br label %44
44: ; preds = %39, %36
br label %45
45: ; preds = %44, %25
%46 = load i32, i32* %3
%47 = add nsw i32 %46, 1
store i32 %47, i32* %3
%48 = load i8, i8* %4
%49 = sext i8 %48 to i32
%50 = icmp eq i32 %49, 10
br i1 %50, label %51, label %52
51: ; preds = %45
store i32 0, i32* %3
br label %52
52: ; preds = %51, %45
%53 = load i8, i8* %5
store i8 %53, i8* %4
br label %7
54: ; preds = %7
%55 = load i32, i32* %1
ret i32 %55
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = load i32, i32* @stdin
%3 = tail call i32 @feof(i32 %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %26
5: ; preds = %0, %18
%6 = phi i8 [ %10, %18 ], [ %1, %0 ]
%7 = phi i32 [ %22, %18 ], [ 0, %0 ]
%8 = tail call signext i8 (...) @getchar()
%9 = icmp eq i8 %8, 9
%10 = select i1 %9, i8 32, i8 %8
%11 = icmp slt i32 %7, 71
%12 = icmp eq i8 %6, 10
%13 = or i1 %11, %12
br i1 %13, label %18, label %14
14: ; preds = %5
switch i8 %10, label %15 [
i8 13, label %18
i8 10, label %18
]
15: ; preds = %14
%16 = tail call i32 @putchar(i8 signext 92)
%17 = tail call i32 @putchar(i8 signext 10)
br label %18
18: ; preds = %14, %14, %5, %15
%19 = phi i32 [ 0, %15 ], [ %7, %5 ], [ %7, %14 ], [ %7, %14 ]
%20 = tail call i32 @putchar(i8 signext %6)
%21 = add nsw i32 %19, 1
%22 = select i1 %12, i32 0, i32 %21
%23 = load i32, i32* @stdin
%24 = tail call i32 @feof(i32 %23)
%25 = icmp eq i32 %24, 0
br i1 %25, label %5, label %26
26: ; preds = %18, %0
ret i32 0
}