#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 */
char EOF;
scalar_t__ countbn(char);
char getchar();
int lastwordbegin(char *, int);
int lastwordend(char *, int);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ putline(char *, int);
int main(int argc, char *argv[]) {
  static char line[80 * 2];
  char c;
  int ci = 0;
  int p = -1;
  int ep, bp;
  int infolding = 0;
  int i, j;
  while ((c = getchar()) != EOF) {
    if (ci < 80) {
      line[ci++] = c;
      if (0 == countbn(c))
        p = ci;
    } else {
      if (countbn(c)) {
        putline(line, p + 1);
        putchar('\n');
        ci = 0;
        p = -1;
        while ((c = getchar()) != EOF && (countbn(c)))
          ;
        if (c == EOF)
          break;
        else
          line[0] = c;
      } else {
        if (countbn(line[80])) {
          putline(line, p + 1);
          putchar('\n');
          ci = 0;
          p = -1;
          line[ci++] = c;
        } else {
          ep = lastwordend(line, p);
          if (ep != -1) {
            putline(line, ep);
            putchar('\n');
            bp = lastwordbegin(line, p);
            for (ci = 0; ci < p - bp + 1; ++ci)
              line[ci] = line[ci + bp];
            p = ci;
            line[ci++] = c;
          } else {
            putline(line, 80 - 1);
            putchar('-');
            putchar('\n');
            line[0] = line[80];
            line[1] = c;
            p = ci = 1;
          }
          ep = -1;
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
movl   $0x0,-0x28(%rbp)
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %al,-0x11(%rbp)
movsbl %al,%eax
mov    0x2e49(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1418 <main+0x2b8>
cmpl   $0x50,-0x18(%rbp)
jge    11f1 <main+0x91>
mov    -0x11(%rbp),%dl
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
movslq %eax,%rcx
lea    0x2e94(%rip),%rax
mov    %dl,(%rax,%rcx,1)
movsbl -0x11(%rbp),%edi
call   1070 <countbn@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    11ec <main+0x8c>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1413 <main+0x2b3>
movsbl -0x11(%rbp),%edi
call   1070 <countbn@plt>
cmp    $0x0,%rax
je     12a3 <main+0x143>
mov    -0x1c(%rbp),%esi
add    $0x1,%esi
lea    0x2e4f(%rip),%rdi
call   1050 <putline@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movl   $0x0,-0x18(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %al,-0x11(%rbp)
movsbl %al,%ecx
mov    0x2da6(%rip),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x31(%rbp)
je     1265 <main+0x105>
movsbl -0x11(%rbp),%edi
call   1070 <countbn@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
test   $0x1,%al
jne    1275 <main+0x115>
jmp    127a <main+0x11a>
jmp    122e <main+0xce>
movsbl -0x11(%rbp),%eax
mov    0x2d63(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1295 <main+0x135>
jmp    1418 <main+0x2b8>
mov    -0x11(%rbp),%al
mov    %al,0x2dc2(%rip)
jmp    140e <main+0x2ae>
movsbl 0x2e06(%rip),%edi
call   1070 <countbn@plt>
cmp    $0x0,%rax
je     1303 <main+0x1a3>
mov    -0x1c(%rbp),%esi
add    $0x1,%esi
lea    0x2d9a(%rip),%rdi
call   1050 <putline@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movl   $0x0,-0x18(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x11(%rbp),%dl
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
movslq %eax,%rcx
lea    0x2d65(%rip),%rax
mov    %dl,(%rax,%rcx,1)
jmp    1409 <main+0x2a9>
mov    -0x1c(%rbp),%esi
lea    0x2d53(%rip),%rdi
call   1040 <lastwordend@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0xffffffff,-0x20(%rbp)
je     13ba <main+0x25a>
mov    -0x20(%rbp),%esi
lea    0x2d37(%rip),%rdi
call   1050 <putline@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x1c(%rbp),%esi
lea    0x2d1e(%rip),%rdi
call   1080 <lastwordbegin@plt>
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    -0x24(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1394 <main+0x234>
mov    -0x18(%rbp),%eax
add    -0x24(%rbp),%eax
movslq %eax,%rcx
lea    0x2ceb(%rip),%rax
mov    (%rax,%rcx,1),%dl
movslq -0x18(%rbp),%rcx
lea    0x2cdd(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1351 <main+0x1f1>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x11(%rbp),%dl
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
movslq %eax,%rcx
lea    0x2cae(%rip),%rax
mov    %dl,(%rax,%rcx,1)
jmp    1402 <main+0x2a2>
lea    0x2c9f(%rip),%rdi
mov    $0x4f,%esi
call   1050 <putline@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2ccb(%rip),%al
mov    %al,0x2c75(%rip)
mov    -0x11(%rbp),%al
mov    %al,0x2c6d(%rip)
movl   $0x1,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0xffffffff,-0x20(%rbp)
jmp    140e <main+0x2ae>
jmp    1413 <main+0x2b3>
jmp    118b <main+0x2b>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
xor    %eax,%eax
call   1060 <getchar@plt>
mov    0x2e72(%rip),%r12
cmp    (%r12),%al
jne    1187 <main+0x27>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %eax,%ebx
mov    $0xffffffff,%r15d
lea    0x2eca(%rip),%r14
xor    %ebp,%ebp
jmp    11c8 <main+0x68>
nopw   0x0(%rax,%rax,1)
movslq %ebp,%rax
add    $0x1,%ebp
mov    %bl,(%rax,%r14,1)
movsbl %bl,%edi
call   1070 <countbn@plt>
test   %rax,%rax
cmove  %ebp,%r15d
xor    %eax,%eax
call   1060 <getchar@plt>
mov    %eax,%ebx
cmp    (%r12),%al
je     117c <main+0x1c>
cmp    $0x4f,%ebp
jle    11a0 <main+0x40>
movsbl %bl,%edi
call   1070 <countbn@plt>
test   %rax,%rax
je     123d <main+0xdd>
add    $0x1,%r15d
mov    %r14,%rdi
mov    %r15d,%esi
call   1050 <putline@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1060 <getchar@plt>
cmp    (%r12),%al
je     117c <main+0x1c>
mov    %eax,%ebx
movsbl %al,%edi
call   1070 <countbn@plt>
test   %rax,%rax
jne    1200 <main+0xa0>
cmp    (%r12),%bl
je     117c <main+0x1c>
mov    %bl,0x2e30(%rip)
xor    %ebp,%ebp
mov    $0xffffffff,%r15d
jmp    11b9 <main+0x59>
movsbl 0x2e6c(%rip),%edi
call   1070 <countbn@plt>
test   %rax,%rax
je     127d <main+0x11d>
add    $0x1,%r15d
mov    %r14,%rdi
mov    %r15d,%esi
call   1050 <putline@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %bl,0x2df3(%rip)
mov    $0x1,%ebp
mov    $0xffffffff,%r15d
jmp    11b9 <main+0x59>
mov    %r14,%rdi
mov    %r15d,%esi
call   1040 <lastwordend@plt>
mov    %r14,%rdi
cmp    $0xffffffff,%eax
je     136f <main+0x20f>
mov    %eax,%esi
call   1050 <putline@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %r15d,%esi
call   1080 <lastwordbegin@plt>
xor    %r8d,%r8d
sub    %eax,%r15d
jl     135c <main+0x1fc>
movslq %eax,%r9
lea    0x1(%r15),%r8d
cmp    $0x8,%r8d
jb     12ea <main+0x18a>
lea    (%r9,%r8,1),%rcx
add    %r14,%rcx
cmp    %r14,%rcx
jbe    13af <main+0x24f>
lea    (%r14,%r8,1),%rcx
lea    (%r14,%r9,1),%rdx
cmp    %rcx,%rdx
jae    13af <main+0x24f>
xor    %edx,%edx
mov    %rdx,%rbp
not    %rbp
add    %r8,%rbp
mov    %r8,%rsi
and    $0x3,%rsi
je     1317 <main+0x1b7>
xchg   %ax,%ax
lea    (%r9,%rdx,1),%rdi
movzbl (%r14,%rdi,1),%ecx
mov    %cl,(%rdx,%r14,1)
add    $0x1,%rdx
add    $0xffffffffffffffff,%rsi
jne    1300 <main+0x1a0>
cmp    $0x3,%rbp
jb     135c <main+0x1fc>
mov    %r8,%rcx
sub    %rdx,%rcx
add    %r14,%rdx
add    $0x3,%rdx
nopw   0x0(%rax,%rax,1)
movzbl -0x3(%rdx,%r9,1),%eax
mov    %al,-0x3(%rdx)
movzbl -0x2(%rdx,%r9,1),%eax
mov    %al,-0x2(%rdx)
movzbl -0x1(%rdx,%r9,1),%eax
mov    %al,-0x1(%rdx)
movzbl (%rdx,%r9,1),%eax
mov    %al,(%rdx)
add    $0x4,%rdx
add    $0xfffffffffffffffc,%rcx
jne    1330 <main+0x1d0>
lea    0x1(%r8),%ebp
mov    %r8d,%eax
mov    %bl,(%rax,%r14,1)
mov    %r8d,%r15d
jmp    11b9 <main+0x59>
mov    $0x4f,%esi
call   1050 <putline@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2d1d(%rip),%al
mov    %al,0x2cc7(%rip)
mov    %bl,0x2cc2(%rip)
mov    $0x1,%r15d
mov    $0x1,%ebp
jmp    11b9 <main+0x59>
cmp    $0x20,%r8d
jae    13bc <main+0x25c>
xor    %edx,%edx
jmp    148b <main+0x32b>
mov    %r8d,%edx
and    $0xffffffe0,%edx
lea    -0x20(%rdx),%rcx
mov    %rcx,%rdi
shr    $0x5,%rdi
add    $0x1,%rdi
mov    %edi,%esi
and    $0x3,%esi
cmp    $0x60,%rcx
jae    13e0 <main+0x280>
xor    %ebp,%ebp
jmp    144f <main+0x2ef>
and    $0xfffffffffffffffc,%rdi
lea    (%r9,%r14,1),%rcx
add    $0x70,%rcx
xor    %ebp,%ebp
movups -0x70(%rcx,%rbp,1),%xmm0
movups -0x60(%rcx,%rbp,1),%xmm1
movaps %xmm0,0x0(%rbp,%r14,1)
movaps %xmm1,0x10(%rbp,%r14,1)
movups -0x50(%rcx,%rbp,1),%xmm0
movups -0x40(%rcx,%rbp,1),%xmm1
movaps %xmm0,0x20(%rbp,%r14,1)
movaps %xmm1,0x30(%rbp,%r14,1)
movups -0x30(%rcx,%rbp,1),%xmm0
movups -0x20(%rcx,%rbp,1),%xmm1
movaps %xmm0,0x40(%rbp,%r14,1)
movaps %xmm1,0x50(%rbp,%r14,1)
movups -0x10(%rcx,%rbp,1),%xmm0
movups (%rcx,%rbp,1),%xmm1
movaps %xmm0,0x60(%rbp,%r14,1)
movaps %xmm1,0x70(%rbp,%r14,1)
sub    $0xffffffffffffff80,%rbp
add    $0xfffffffffffffffc,%rdi
jne    13ee <main+0x28e>
test   %rsi,%rsi
je     1478 <main+0x318>
lea    (%r14,%rbp,1),%rcx
add    $0x10,%rcx
movups -0x10(%rcx,%r9,1),%xmm0
movups (%rcx,%r9,1),%xmm1
movaps %xmm0,-0x10(%rcx)
movaps %xmm1,(%rcx)
add    $0x20,%rcx
add    $0xffffffffffffffff,%rsi
jne    145c <main+0x2fc>
cmp    %r8,%rdx
je     135c <main+0x1fc>
test   $0x18,%r8b
je     12ec <main+0x18c>
mov    %rdx,%rcx
add    $0x1,%r15d
mov    %r15d,%edx
and    $0xfffffff8,%edx
nopl   0x0(%rax,%rax,1)
lea    (%r9,%rcx,1),%rsi
mov    (%r14,%rsi,1),%rsi
mov    %rsi,(%rcx,%r14,1)
add    $0x8,%rcx
cmp    %rcx,%rdx
jne    14a0 <main+0x340>
cmp    %r15,%rdx
je     135c <main+0x1fc>
jmp    12ec <main+0x18c>

LLVM IR (-O0):
@main.line = internal global [160 x i8] zeroinitializer
@EOF = global i8 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 -1, i32* %8
store i32 0, i32* %11
br label %14
14: ; preds = %128, %2
%15 = call signext i8 (...) @getchar()
store i8 %15, i8* %6
%16 = sext i8 %15 to i32
%17 = load i8, i8* @EOF
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %16, %18
br i1 %19, label %20, label %129
20: ; preds = %14
%21 = load i32, i32* %7
%22 = icmp slt i32 %21, 80
br i1 %22, label %23, label %35
23: ; preds = %20
%24 = load i8, i8* %6
%25 = load i32, i32* %7
%26 = add nsw i32 %25, 1
store i32 %26, i32* %7
%27 = sext i32 %25 to i64
%28 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %27
store i8 %24, i8* %28
%29 = load i8, i8* %6
%30 = call i64 @countbn(i8 signext %29)
%31 = icmp eq i64 0, %30
br i1 %31, label %32, label %34
32: ; preds = %23
%33 = load i32, i32* %7
store i32 %33, i32* %8
br label %34
34: ; preds = %32, %23
br label %128
35: ; preds = %20
%36 = load i8, i8* %6
%37 = call i64 @countbn(i8 signext %36)
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %67
39: ; preds = %35
%40 = load i32, i32* %8
%41 = add nsw i32 %40, 1
%42 = call i32 @putline(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0), i32 %41)
%43 = call i32 @putchar(i8 signext 10)
store i32 0, i32* %7
store i32 -1, i32* %8
br label %44
44: ; preds = %56, %39
%45 = call signext i8 (...) @getchar()
store i8 %45, i8* %6
%46 = sext i8 %45 to i32
%47 = load i8, i8* @EOF
%48 = sext i8 %47 to i32
%49 = icmp ne i32 %46, %48
br i1 %49, label %50, label %54
50: ; preds = %44
%51 = load i8, i8* %6
%52 = call i64 @countbn(i8 signext %51)
%53 = icmp ne i64 %52, 0
br label %54
54: ; preds = %50, %44
%55 = phi i1 [ false, %44 ], [ %53, %50 ]
br i1 %55, label %56, label %57
56: ; preds = %54
br label %44
57: ; preds = %54
%58 = load i8, i8* %6
%59 = sext i8 %58 to i32
%60 = load i8, i8* @EOF
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %59, %61
br i1 %62, label %63, label %64
63: ; preds = %57
br label %129
64: ; preds = %57
%65 = load i8, i8* %6
store i8 %65, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0)
br label %66
66: ; preds = %64
br label %127
67: ; preds = %35
%68 = load i8, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 80)
%69 = call i64 @countbn(i8 signext %68)
%70 = icmp ne i64 %69, 0
br i1 %70, label %71, label %81
71: ; preds = %67
%72 = load i32, i32* %8
%73 = add nsw i32 %72, 1
%74 = call i32 @putline(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0), i32 %73)
%75 = call i32 @putchar(i8 signext 10)
store i32 0, i32* %7
store i32 -1, i32* %8
%76 = load i8, i8* %6
%77 = load i32, i32* %7
%78 = add nsw i32 %77, 1
store i32 %78, i32* %7
%79 = sext i32 %77 to i64
%80 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %79
store i8 %76, i8* %80
br label %126
81: ; preds = %67
%82 = load i32, i32* %8
%83 = call i32 @lastwordend(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0), i32 %82)
store i32 %83, i32* %9
%84 = load i32, i32* %9
%85 = icmp ne i32 %84, -1
br i1 %85, label %86, label %119
86: ; preds = %81
%87 = load i32, i32* %9
%88 = call i32 @putline(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0), i32 %87)
%89 = call i32 @putchar(i8 signext 10)
%90 = load i32, i32* %8
%91 = call i32 @lastwordbegin(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0), i32 %90)
store i32 %91, i32* %10
store i32 0, i32* %7
br label %92
92: ; preds = %109, %86
%93 = load i32, i32* %7
%94 = load i32, i32* %8
%95 = load i32, i32* %10
%96 = sub nsw i32 %94, %95
%97 = add nsw i32 %96, 1
%98 = icmp slt i32 %93, %97
br i1 %98, label %99, label %112
99: ; preds = %92
%100 = load i32, i32* %7
%101 = load i32, i32* %10
%102 = add nsw i32 %100, %101
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %103
%105 = load i8, i8* %104
%106 = load i32, i32* %7
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %107
store i8 %105, i8* %108
br label %109
109: ; preds = %99
%110 = load i32, i32* %7
%111 = add nsw i32 %110, 1
store i32 %111, i32* %7
br label %92
112: ; preds = %92
%113 = load i32, i32* %7
store i32 %113, i32* %8
%114 = load i8, i8* %6
%115 = load i32, i32* %7
%116 = add nsw i32 %115, 1
store i32 %116, i32* %7
%117 = sext i32 %115 to i64
%118 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %117
store i8 %114, i8* %118
br label %125
119: ; preds = %81
%120 = call i32 @putline(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0), i32 79)
%121 = call i32 @putchar(i8 signext 45)
%122 = call i32 @putchar(i8 signext 10)
%123 = load i8, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 80)
store i8 %123, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0)
%124 = load i8, i8* %6
store i8 %124, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 1)
store i32 1, i32* %7
store i32 1, i32* %8
br label %125
125: ; preds = %119, %112
store i32 -1, i32* %9
br label %126
126: ; preds = %125, %71
br label %127
127: ; preds = %126, %66
br label %128
128: ; preds = %127, %34
br label %14
129: ; preds = %63, %14
ret i32 0
}

LLVM IR (-O2):
@main.line = internal global [160 x i8] zeroinitializer
@EOF = global i8 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call signext i8 (...) @getchar()
%4 = load i8, i8* @EOF
%5 = icmp eq i8 %3, %4
br i1 %5, label %231, label %6
6: ; preds = %2, %225
%7 = phi i8 [ %228, %225 ], [ %3, %2 ]
%8 = phi i32 [ %227, %225 ], [ 0, %2 ]
%9 = phi i32 [ %226, %225 ], [ -1, %2 ]
%10 = icmp slt i32 %8, 80
br i1 %10, label %11, label %18
11: ; preds = %6
%12 = add nsw i32 %8, 1
%13 = sext i32 %8 to i64
%14 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %13
store i8 %7, i8* %14
%15 = tail call i64 @countbn(i8 signext %7)
%16 = icmp eq i64 %15, 0
%17 = select i1 %16, i32 %12, i32 %9
br label %225
18: ; preds = %6
%19 = tail call i64 @countbn(i8 signext %7)
%20 = icmp eq i64 %19, 0
br i1 %20, label %36, label %21
21: ; preds = %18
%22 = add nsw i32 %9, 1
%23 = tail call i32 @putline(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0), i32 %22)
%24 = tail call i32 @putchar(i8 signext 10)
br label %25
25: ; preds = %29, %21
%26 = tail call signext i8 (...) @getchar()
%27 = load i8, i8* @EOF
%28 = icmp eq i8 %26, %27
br i1 %28, label %231, label %29
29: ; preds = %25
%30 = tail call i64 @countbn(i8 signext %26)
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %25
32: ; preds = %29
%33 = load i8, i8* @EOF
%34 = icmp eq i8 %26, %33
br i1 %34, label %231, label %35
35: ; preds = %32
store i8 %26, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0)
br label %225
36: ; preds = %18
%37 = load i8, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 80)
%38 = tail call i64 @countbn(i8 signext %37)
%39 = icmp eq i64 %38, 0
br i1 %39, label %44, label %40
40: ; preds = %36
%41 = add nsw i32 %9, 1
%42 = tail call i32 @putline(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0), i32 %41)
%43 = tail call i32 @putchar(i8 signext 10)
store i8 %7, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0)
br label %225
44: ; preds = %36
%45 = tail call i32 @lastwordend(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0), i32 %9)
%46 = icmp eq i32 %45, -1
br i1 %46, label %220, label %47
47: ; preds = %44
%48 = tail call i32 @putline(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0), i32 %45)
%49 = tail call i32 @putchar(i8 signext 10)
%50 = tail call i32 @lastwordbegin(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0), i32 %9)
%51 = icmp slt i32 %9, %50
br i1 %51, label %215, label %52
52: ; preds = %47
%53 = sext i32 %50 to i64
%54 = add i32 %9, 1
%55 = sub i32 %54, %50
%56 = zext i32 %55 to i64
%57 = icmp ult i32 %55, 8
br i1 %57, label %173, label %58
58: ; preds = %52
%59 = getelementptr [160 x i8], [160 x i8]* @main.line, i64 0, i64 %56
%60 = getelementptr [160 x i8], [160 x i8]* @main.line, i64 0, i64 %53
%61 = add nsw i64 %53, %56
%62 = getelementptr [160 x i8], [160 x i8]* @main.line, i64 0, i64 %61
%63 = icmp ugt i8* %62, getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0)
%64 = icmp ult i8* %60, %59
%65 = and i1 %63, %64
br i1 %65, label %173, label %66
66: ; preds = %58
%67 = icmp ult i32 %55, 32
br i1 %67, label %155, label %68
68: ; preds = %66
%69 = and i64 %56, 4294967264
%70 = add nsw i64 %69, -32
%71 = lshr exact i64 %70, 5
%72 = add nuw nsw i64 %71, 1
%73 = and i64 %72, 3
%74 = icmp ult i64 %70, 96
br i1 %74, label %130, label %75
75: ; preds = %68
%76 = and i64 %72, 1152921504606846972
br label %77
77: ; preds = %77, %75
%78 = phi i64 [ 0, %75 ], [ %127, %77 ]
%79 = phi i64 [ 0, %75 ], [ %128, %77 ]
%80 = add nsw i64 %78, %53
%81 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %80
%82 = bitcast i8* %81 to <16 x i8>*
%83 = load <16 x i8>, <16 x i8>* %82
%84 = getelementptr inbounds i8, i8* %81, i64 16
%85 = bitcast i8* %84 to <16 x i8>*
%86 = load <16 x i8>, <16 x i8>* %85
%87 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %78
%88 = bitcast i8* %87 to <16 x i8>*
store <16 x i8> %83, <16 x i8>* %88
%89 = getelementptr inbounds i8, i8* %87, i64 16
%90 = bitcast i8* %89 to <16 x i8>*
store <16 x i8> %86, <16 x i8>* %90
%91 = or i64 %78, 32
%92 = add nsw i64 %91, %53
%93 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %92
%94 = bitcast i8* %93 to <16 x i8>*
%95 = load <16 x i8>, <16 x i8>* %94
%96 = getelementptr inbounds i8, i8* %93, i64 16
%97 = bitcast i8* %96 to <16 x i8>*
%98 = load <16 x i8>, <16 x i8>* %97
%99 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %91
%100 = bitcast i8* %99 to <16 x i8>*
store <16 x i8> %95, <16 x i8>* %100
%101 = getelementptr inbounds i8, i8* %99, i64 16
%102 = bitcast i8* %101 to <16 x i8>*
store <16 x i8> %98, <16 x i8>* %102
%103 = or i64 %78, 64
%104 = add nsw i64 %103, %53
%105 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %104
%106 = bitcast i8* %105 to <16 x i8>*
%107 = load <16 x i8>, <16 x i8>* %106
%108 = getelementptr inbounds i8, i8* %105, i64 16
%109 = bitcast i8* %108 to <16 x i8>*
%110 = load <16 x i8>, <16 x i8>* %109
%111 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %103
%112 = bitcast i8* %111 to <16 x i8>*
store <16 x i8> %107, <16 x i8>* %112
%113 = getelementptr inbounds i8, i8* %111, i64 16
%114 = bitcast i8* %113 to <16 x i8>*
store <16 x i8> %110, <16 x i8>* %114
%115 = or i64 %78, 96
%116 = add nsw i64 %115, %53
%117 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %116
%118 = bitcast i8* %117 to <16 x i8>*
%119 = load <16 x i8>, <16 x i8>* %118
%120 = getelementptr inbounds i8, i8* %117, i64 16
%121 = bitcast i8* %120 to <16 x i8>*
%122 = load <16 x i8>, <16 x i8>* %121
%123 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %115
%124 = bitcast i8* %123 to <16 x i8>*
store <16 x i8> %119, <16 x i8>* %124
%125 = getelementptr inbounds i8, i8* %123, i64 16
%126 = bitcast i8* %125 to <16 x i8>*
store <16 x i8> %122, <16 x i8>* %126
%127 = add nuw i64 %78, 128
%128 = add i64 %79, 4
%129 = icmp eq i64 %128, %76
br i1 %129, label %130, label %77
130: ; preds = %77, %68
%131 = phi i64 [ 0, %68 ], [ %127, %77 ]
%132 = icmp eq i64 %73, 0
br i1 %132, label %150, label %133
133: ; preds = %130, %133
%134 = phi i64 [ %147, %133 ], [ %131, %130 ]
%135 = phi i64 [ %148, %133 ], [ 0, %130 ]
%136 = add nsw i64 %134, %53
%137 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %136
%138 = bitcast i8* %137 to <16 x i8>*
%139 = load <16 x i8>, <16 x i8>* %138
%140 = getelementptr inbounds i8, i8* %137, i64 16
%141 = bitcast i8* %140 to <16 x i8>*
%142 = load <16 x i8>, <16 x i8>* %141
%143 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %134
%144 = bitcast i8* %143 to <16 x i8>*
store <16 x i8> %139, <16 x i8>* %144
%145 = getelementptr inbounds i8, i8* %143, i64 16
%146 = bitcast i8* %145 to <16 x i8>*
store <16 x i8> %142, <16 x i8>* %146
%147 = add nuw i64 %134, 32
%148 = add i64 %135, 1
%149 = icmp eq i64 %148, %73
br i1 %149, label %150, label %133
150: ; preds = %133, %130
%151 = icmp eq i64 %69, %56
br i1 %151, label %215, label %152
152: ; preds = %150
%153 = and i64 %56, 24
%154 = icmp eq i64 %153, 0
br i1 %154, label %173, label %155
155: ; preds = %66, %152
%156 = phi i64 [ %69, %152 ], [ 0, %66 ]
%157 = add i32 %9, 1
%158 = sub i32 %157, %50
%159 = zext i32 %158 to i64
%160 = and i64 %159, 4294967288
br label %161
161: ; preds = %161, %155
%162 = phi i64 [ %156, %155 ], [ %169, %161 ]
%163 = add nsw i64 %162, %53
%164 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %163
%165 = bitcast i8* %164 to <8 x i8>*
%166 = load <8 x i8>, <8 x i8>* %165
%167 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %162
%168 = bitcast i8* %167 to <8 x i8>*
store <8 x i8> %166, <8 x i8>* %168
%169 = add nuw i64 %162, 8
%170 = icmp eq i64 %169, %160
br i1 %170, label %171, label %161
171: ; preds = %161
%172 = icmp eq i64 %160, %159
br i1 %172, label %215, label %173
173: ; preds = %58, %52, %152, %171
%174 = phi i64 [ 0, %52 ], [ 0, %58 ], [ %69, %152 ], [ %160, %171 ]
%175 = xor i64 %174, -1
%176 = add nsw i64 %175, %56
%177 = and i64 %56, 3
%178 = icmp eq i64 %177, 0
br i1 %178, label %189, label %179
179: ; preds = %173, %179
%180 = phi i64 [ %186, %179 ], [ %174, %173 ]
%181 = phi i64 [ %187, %179 ], [ 0, %173 ]
%182 = add nsw i64 %180, %53
%183 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %182
%184 = load i8, i8* %183
%185 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %180
store i8 %184, i8* %185
%186 = add nuw nsw i64 %180, 1
%187 = add i64 %181, 1
%188 = icmp eq i64 %187, %177
br i1 %188, label %189, label %179
189: ; preds = %179, %173
%190 = phi i64 [ %174, %173 ], [ %186, %179 ]
%191 = icmp ult i64 %176, 3
br i1 %191, label %215, label %192
192: ; preds = %189, %192
%193 = phi i64 [ %213, %192 ], [ %190, %189 ]
%194 = add nsw i64 %193, %53
%195 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %194
%196 = load i8, i8* %195
%197 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %193
store i8 %196, i8* %197
%198 = add nuw nsw i64 %193, 1
%199 = add nsw i64 %198, %53
%200 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %199
%201 = load i8, i8* %200
%202 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %198
store i8 %201, i8* %202
%203 = add nuw nsw i64 %193, 2
%204 = add nsw i64 %203, %53
%205 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %204
%206 = load i8, i8* %205
%207 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %203
store i8 %206, i8* %207
%208 = add nuw nsw i64 %193, 3
%209 = add nsw i64 %208, %53
%210 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %209
%211 = load i8, i8* %210
%212 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %208
store i8 %211, i8* %212
%213 = add nuw nsw i64 %193, 4
%214 = icmp eq i64 %213, %56
br i1 %214, label %215, label %192
215: ; preds = %189, %192, %150, %171, %47
%216 = phi i32 [ 0, %47 ], [ %55, %171 ], [ %55, %150 ], [ %55, %192 ], [ %55, %189 ]
%217 = add nuw nsw i32 %216, 1
%218 = zext i32 %216 to i64
%219 = getelementptr inbounds [160 x i8], [160 x i8]* @main.line, i64 0, i64 %218
store i8 %7, i8* %219
br label %225
220: ; preds = %44
%221 = tail call i32 @putline(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0), i32 79)
%222 = tail call i32 @putchar(i8 signext 45)
%223 = tail call i32 @putchar(i8 signext 10)
%224 = load i8, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 80)
store i8 %224, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 0)
store i8 %7, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @main.line, i64 0, i64 1)
br label %225
225: ; preds = %11, %215, %220, %35, %40
%226 = phi i32 [ -1, %35 ], [ -1, %40 ], [ %17, %11 ], [ %216, %215 ], [ 1, %220 ]
%227 = phi i32 [ 0, %35 ], [ 1, %40 ], [ %12, %11 ], [ %217, %215 ], [ 1, %220 ]
%228 = tail call signext i8 (...) @getchar()
%229 = load i8, i8* @EOF
%230 = icmp eq i8 %228, %229
br i1 %230, label %231, label %6
231: ; preds = %225, %32, %25, %2
ret i32 0
}