#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 uint32_t;
struct stat {
  int /*<<< orphan*/ st_mode;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EISDIR;
int /*<<< orphan*/ S_ISREG(int /*<<< orphan*/);
int cksum(int /*<<< orphan*/ *, int *, int *);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, int, int, ...);
scalar_t__ stat(char *, struct stat *);
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  FILE *file = NULL;
  if (argc < 2)
    file = stdin;
  int i, ret = 0;
  for (i = 1; i < argc || file; i++, file = NULL) {
    if (!file) {
      if (!strcmp(argv[i], "-"))
        file = stdin;
      else
        file = fopen(argv[i], "r");
    }
    struct stat st;
    if (!file || stat(argv[i], &st) < 0) {
      perror("cksum");
      ret = 1;
      continue;
    }
    if (!S_ISREG(st.st_mode)) {
      errno = EISDIR;
      perror("cksum");
      ret = 1;
      continue;
    }
    int blocks = 0;
    uint32_t sum = 0;
    int err = cksum(file, &sum, &blocks);
    if (file != stdin)
      fclose(file);
    if (err) {
      perror("cksum");
      ret = 1;
      continue;
    }
    if (argc < 2)
      printf("%u %d\n", sum, blocks);
    else
      printf("%u %d %s\n", sum, blocks, argv[i]);
  }
  return ret;
}


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)
movq   $0x0,-0x18(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11b6 <main+0x36>
mov    0x2e31(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%ecx
mov    $0x1,%al
cmp    -0x8(%rbp),%ecx
mov    %al,-0x35(%rbp)
jl     11e0 <main+0x60>
cmpq   $0x0,-0x18(%rbp)
setne  %al
mov    %al,-0x35(%rbp)
mov    -0x35(%rbp),%al
test   $0x1,%al
jne    11f0 <main+0x70>
jmp    138c <main+0x20c>
cmpq   $0x0,-0x18(%rbp)
jne    1250 <main+0xd0>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdf2(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    122f <main+0xaf>
mov    0x2dbd(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    124b <main+0xcb>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdc0(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x18(%rbp)
jmp    1250 <main+0xd0>
cmpq   $0x0,-0x18(%rbp)
je     127a <main+0xfa>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x28(%rbp),%rsi
call   1070 <stat@plt>
cmp    $0x0,%rax
jge    1292 <main+0x112>
lea    0xd83(%rip),%rdi
call   10a0 <perror@plt>
movl   $0x1,-0x20(%rbp)
jmp    1376 <main+0x1f6>
mov    -0x28(%rbp),%edi
call   1080 <S_ISREG@plt>
cmp    $0x0,%eax
jne    12cd <main+0x14d>
mov    0x2d3e(%rip),%rax
mov    (%rax),%ecx
mov    0x2d1d(%rip),%rax
mov    %ecx,(%rax)
lea    0xd48(%rip),%rdi
call   10a0 <perror@plt>
movl   $0x1,-0x20(%rbp)
jmp    1376 <main+0x1f6>
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
call   1050 <cksum@plt>
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%rax
mov    0x2ce6(%rip),%rcx
cmp    (%rcx),%rax
je     130c <main+0x18c>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
cmpl   $0x0,-0x34(%rbp)
je     132e <main+0x1ae>
lea    0xce7(%rip),%rdi
call   10a0 <perror@plt>
movl   $0x1,-0x20(%rbp)
jmp    1376 <main+0x1f6>
cmpl   $0x2,-0x8(%rbp)
jge    1351 <main+0x1d1>
mov    -0x30(%rbp),%esi
mov    -0x2c(%rbp),%edx
lea    0xcc5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1371 <main+0x1f1>
mov    -0x30(%rbp),%esi
mov    -0x2c(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xca7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1376 <main+0x1f6>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
movq   $0x0,-0x18(%rbp)
jmp    11c4 <main+0x44>
mov    -0x20(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%r12d
mov    0x2e45(%rip),%rax
mov    (%rax),%rbp
cmp    $0x1,%edi
jg     11b4 <main+0x34>
movl   $0x0,0x4(%rsp)
test   %rbp,%rbp
je     12df <main+0x15f>
cmp    $0x3,%r12d
mov    $0x2,%r13d
cmovge %r12d,%r13d
cmp    $0x1,%r12d
jg     11cd <main+0x4d>
test   %rbp,%rbp
jne    11ff <main+0x7f>
mov    0x8(%rbx),%r14
lea    0xe28(%rip),%rsi
mov    %r14,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     11f6 <main+0x76>
lea    0xe17(%rip),%rsi
mov    %r14,%rdi
call   1090 <fopen@plt>
mov    %rax,%rbp
test   %rbp,%rbp
je     12c5 <main+0x145>
mov    0x8(%rbx),%rdi
lea    0x10(%rsp),%rsi
call   1070 <stat@plt>
test   %rax,%rax
js     12c5 <main+0x145>
mov    0x10(%rsp),%edi
call   1080 <S_ISREG@plt>
test   %eax,%eax
je     12b3 <main+0x133>
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %rbp,%rdi
call   1050 <cksum@plt>
mov    %eax,%r14d
mov    0x2d8d(%rip),%rax
cmp    (%rax),%rbp
je     1260 <main+0xe0>
mov    %rbp,%rdi
call   1030 <fclose@plt>
test   %r14d,%r14d
jne    12c5 <main+0x145>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
cmp    $0x2,%r12d
jge    1291 <main+0x111>
lea    0xd90(%rip),%rdi
movl   $0x0,0x4(%rsp)
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x3,%r12d
jl     12df <main+0x15f>
jmp    12f2 <main+0x172>
mov    0x8(%rbx),%rcx
lea    0xd75(%rip),%rdi
movl   $0x0,0x4(%rsp)
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x3,%r12d
jl     12df <main+0x15f>
jmp    12f2 <main+0x172>
mov    0x2d2e(%rip),%rax
mov    (%rax),%eax
mov    0x2d0d(%rip),%rcx
mov    %eax,(%rcx)
lea    0xd38(%rip),%rdi
call   10a0 <perror@plt>
movl   $0x1,0x4(%rsp)
cmp    $0x3,%r12d
jge    12f2 <main+0x172>
mov    0x4(%rsp),%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x2,%r15d
jmp    131b <main+0x19b>
nopw   0x0(%rax,%rax,1)
mov    (%rbx,%r15,8),%rcx
lea    0xd06(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r15
cmp    %r15,%r13
je     12df <main+0x15f>
mov    (%rbx,%r15,8),%rbp
mov    %rbp,%rdi
lea    0xcd7(%rip),%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1350 <main+0x1d0>
mov    %rbp,%rdi
lea    0xcc6(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbp
test   %rbp,%rbp
jne    1363 <main+0x1e3>
jmp    13fc <main+0x27c>
xchg   %ax,%ax
mov    0x2c89(%rip),%rax
mov    (%rax),%rbp
test   %rbp,%rbp
je     13fc <main+0x27c>
mov    (%rbx,%r15,8),%rdi
lea    0x10(%rsp),%rsi
call   1070 <stat@plt>
test   %rax,%rax
js     13fc <main+0x27c>
mov    0x10(%rsp),%edi
call   1080 <S_ISREG@plt>
test   %eax,%eax
je     13ea <main+0x26a>
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
mov    %rbp,%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1050 <cksum@plt>
mov    %eax,%r14d
mov    0x2c2d(%rip),%rax
cmp    (%rax),%rbp
je     13c0 <main+0x240>
mov    %rbp,%rdi
call   1030 <fclose@plt>
test   %r14d,%r14d
jne    13fc <main+0x27c>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
cmp    $0x1,%r12d
jg     1300 <main+0x180>
lea    0xc2c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1312 <main+0x192>
mov    0x2bf7(%rip),%rax
mov    (%rax),%eax
mov    0x2bd6(%rip),%rcx
mov    %eax,(%rcx)
lea    0xc01(%rip),%rdi
call   10a0 <perror@plt>
movl   $0x1,0x4(%rsp)
jmp    1312 <main+0x192>

LLVM IR (-O0):
%struct.stat = type { i32 }
@stdin = global i32* null
@.str = [2 x i8] c"-\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [6 x i8] c"cksum\00"
@EISDIR = global i32 0
@errno = global i32 0
@.str.3 = [7 x i8] c"%u %d\0A\00"
@.str.4 = [10 x i8] c"%u %d %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca %struct.stat
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* null, i32** %6
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 2
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load i32*, i32** @stdin
store i32* %16, i32** %6
br label %17
17: ; preds = %15, %2
store i32 0, i32* %8
store i32 1, i32* %7
br label %18
18: ; preds = %100, %17
%19 = load i32, i32* %7
%20 = load i32, i32* %4
%21 = icmp slt i32 %19, %20
br i1 %21, label %25, label %22
22: ; preds = %18
%23 = load i32*, i32** %6
%24 = icmp ne i32* %23, null
br label %25
25: ; preds = %22, %18
%26 = phi i1 [ true, %18 ], [ %24, %22 ]
br i1 %26, label %27, label %103
27: ; preds = %25
%28 = load i32*, i32** %6
%29 = icmp ne i32* %28, null
br i1 %29, label %48, label %30
30: ; preds = %27
%31 = load i8**, i8*** %5
%32 = load i32, i32* %7
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8*, i8** %31, i64 %33
%35 = load i8*, i8** %34
%36 = call i32 @strcmp(i8* %35, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%37 = icmp ne i32 %36, 0
br i1 %37, label %40, label %38
38: ; preds = %30
%39 = load i32*, i32** @stdin
store i32* %39, i32** %6
br label %47
40: ; preds = %30
%41 = load i8**, i8*** %5
%42 = load i32, i32* %7
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8*, i8** %41, i64 %43
%45 = load i8*, i8** %44
%46 = call i32* @fopen(i8* %45, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %46, i32** %6
br label %47
47: ; preds = %40, %38
br label %48
48: ; preds = %47, %27
%49 = load i32*, i32** %6
%50 = icmp ne i32* %49, null
br i1 %50, label %51, label %59
51: ; preds = %48
%52 = load i8**, i8*** %5
%53 = load i32, i32* %7
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i8*, i8** %52, i64 %54
%56 = load i8*, i8** %55
%57 = call i64 @stat(i8* %56, %struct.stat* %9)
%58 = icmp slt i64 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %51, %48
%60 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %8
br label %100
61: ; preds = %51
%62 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%63 = load i32, i32* %62
%64 = call i32 @S_ISREG(i32 %63)
%65 = icmp ne i32 %64, 0
br i1 %65, label %69, label %66
66: ; preds = %61
%67 = load i32, i32* @EISDIR
store i32 %67, i32* @errno
%68 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %8
br label %100
69: ; preds = %61
store i32 0, i32* %10
store i32 0, i32* %11
%70 = load i32*, i32** %6
%71 = call i32 @cksum(i32* %70, i32* %11, i32* %10)
store i32 %71, i32* %12
%72 = load i32*, i32** %6
%73 = load i32*, i32** @stdin
%74 = icmp ne i32* %72, %73
br i1 %74, label %75, label %78
75: ; preds = %69
%76 = load i32*, i32** %6
%77 = call i32 @fclose(i32* %76)
br label %78
78: ; preds = %75, %69
%79 = load i32, i32* %12
%80 = icmp ne i32 %79, 0
br i1 %80, label %81, label %83
81: ; preds = %78
%82 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %8
br label %100
83: ; preds = %78
%84 = load i32, i32* %4
%85 = icmp slt i32 %84, 2
br i1 %85, label %86, label %90
86: ; preds = %83
%87 = load i32, i32* %11
%88 = load i32, i32* %10
%89 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %87, i32 %88)
br label %99
90: ; preds = %83
%91 = load i32, i32* %11
%92 = load i32, i32* %10
%93 = load i8**, i8*** %5
%94 = load i32, i32* %7
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i8*, i8** %93, i64 %95
%97 = load i8*, i8** %96
%98 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %91, i32 %92, i8* %97)
br label %99
99: ; preds = %90, %86
br label %100
100: ; preds = %99, %81, %66, %59
%101 = load i32, i32* %7
%102 = add nsw i32 %101, 1
store i32 %102, i32* %7
store i32* null, i32** %6
br label %18
103: ; preds = %25
%104 = load i32, i32* %8
ret i32 %104
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@stdin = global i32* null
@.str = [2 x i8] c"-\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [6 x i8] c"cksum\00"
@EISDIR = global i32 0
@errno = global i32 0
@.str.3 = [7 x i8] c"%u %d\0A\00"
@.str.4 = [10 x i8] c"%u %d %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = alloca i32
%5 = alloca i32
%6 = icmp slt i32 %0, 2
%7 = load i32*, i32** @stdin
%8 = icmp sgt i32 %0, 1
%9 = icmp ne i32* %7, null
%10 = select i1 %8, i1 true, i1 %9
br i1 %10, label %11, label %120
11: ; preds = %2
%12 = select i1 %6, i1 %9, i1 false
%13 = bitcast %struct.stat* %3 to i8*
%14 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%15 = bitcast i32* %4 to i8*
%16 = bitcast i32* %5 to i8*
%17 = call i32 @llvm.smax.i32(i32 %0, i32 2)
%18 = zext i32 %17 to i64
br i1 %12, label %29, label %19
19: ; preds = %11
%20 = getelementptr inbounds i8*, i8** %1, i64 1
%21 = load i8*, i8** %20
%22 = call i32 @strcmp(i8* dereferenceable(1) %21, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
br i1 %23, label %26, label %24
24: ; preds = %19
%25 = call i32* @fopen(i8* %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %26
26: ; preds = %19, %24
%27 = phi i32* [ %25, %24 ], [ %7, %19 ]
%28 = icmp eq i32* %27, null
br i1 %28, label %63, label %30
29: ; preds = %11
br label %30
30: ; preds = %29, %26
%31 = phi i32* [ %7, %29 ], [ %27, %26 ]
%32 = getelementptr inbounds i8*, i8** %1, i64 1
%33 = load i8*, i8** %32
%34 = call i64 @stat(i8* %33, %struct.stat* %3)
%35 = icmp slt i64 %34, 0
br i1 %35, label %63, label %36
36: ; preds = %30
%37 = load i32, i32* %14
%38 = call i32 @S_ISREG(i32 %37)
%39 = icmp eq i32 %38, 0
br i1 %39, label %60, label %40
40: ; preds = %36
store i32 0, i32* %4
store i32 0, i32* %5
%41 = call i32 @cksum(i32* %31, i32* %5, i32* %4)
%42 = load i32*, i32** @stdin
%43 = icmp eq i32* %31, %42
br i1 %43, label %46, label %44
44: ; preds = %40
%45 = call i32 @fclose(i32* %31)
br label %46
46: ; preds = %44, %40
%47 = icmp eq i32 %41, 0
br i1 %47, label %50, label %48
48: ; preds = %46
%49 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %58
50: ; preds = %46
%51 = load i32, i32* %5
%52 = load i32, i32* %4
br i1 %6, label %56, label %53
53: ; preds = %50
%54 = load i8*, i8** %32
%55 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %51, i32 %52, i8* %54)
br label %58
56: ; preds = %50
%57 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %51, i32 %52)
br label %58
58: ; preds = %56, %53, %48
%59 = phi i32 [ 1, %48 ], [ 0, %53 ], [ 0, %56 ]
br label %65
60: ; preds = %36
%61 = load i32, i32* @EISDIR
store i32 %61, i32* @errno
%62 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %65
63: ; preds = %30, %26
%64 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %65
65: ; preds = %63, %60, %58
%66 = phi i32 [ 1, %63 ], [ %59, %58 ], [ 1, %60 ]
%67 = icmp slt i32 %0, 3
br i1 %67, label %120, label %68
68: ; preds = %65, %116
%69 = phi i64 [ %118, %116 ], [ 2, %65 ]
%70 = phi i32 [ %117, %116 ], [ %66, %65 ]
%71 = getelementptr inbounds i8*, i8** %1, i64 %69
%72 = load i8*, i8** %71
%73 = call i32 @strcmp(i8* dereferenceable(1) %72, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%74 = icmp eq i32 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %68
%76 = load i32*, i32** @stdin
br label %79
77: ; preds = %68
%78 = call i32* @fopen(i8* %72, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %79
79: ; preds = %75, %77
%80 = phi i32* [ %78, %77 ], [ %76, %75 ]
%81 = icmp eq i32* %80, null
br i1 %81, label %87, label %82
82: ; preds = %79
%83 = getelementptr inbounds i8*, i8** %1, i64 %69
%84 = load i8*, i8** %83
%85 = call i64 @stat(i8* %84, %struct.stat* %3)
%86 = icmp slt i64 %85, 0
br i1 %86, label %87, label %89
87: ; preds = %82, %79
%88 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %116
89: ; preds = %82
%90 = load i32, i32* %14
%91 = call i32 @S_ISREG(i32 %90)
%92 = icmp eq i32 %91, 0
br i1 %92, label %93, label %96
93: ; preds = %89
%94 = load i32, i32* @EISDIR
store i32 %94, i32* @errno
%95 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %116
96: ; preds = %89
store i32 0, i32* %4
store i32 0, i32* %5
%97 = call i32 @cksum(i32* %80, i32* %5, i32* %4)
%98 = load i32*, i32** @stdin
%99 = icmp eq i32* %80, %98
br i1 %99, label %102, label %100
100: ; preds = %96
%101 = call i32 @fclose(i32* %80)
br label %102
102: ; preds = %100, %96
%103 = icmp eq i32 %97, 0
br i1 %103, label %106, label %104
104: ; preds = %102
%105 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %114
106: ; preds = %102
%107 = load i32, i32* %5
%108 = load i32, i32* %4
br i1 %6, label %109, label %111
109: ; preds = %106
%110 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %107, i32 %108)
br label %114
111: ; preds = %106
%112 = load i8*, i8** %83
%113 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %107, i32 %108, i8* %112)
br label %114
114: ; preds = %109, %111, %104
%115 = phi i32 [ 1, %104 ], [ %70, %111 ], [ %70, %109 ]
br label %116
116: ; preds = %114, %93, %87
%117 = phi i32 [ 1, %87 ], [ %115, %114 ], [ 1, %93 ]
%118 = add nuw nsw i64 %69, 1
%119 = icmp eq i64 %118, %18
br i1 %119, label %120, label %68
120: ; preds = %116, %65, %2
%121 = phi i32 [ 0, %2 ], [ %66, %65 ], [ %117, %116 ]
ret i32 %121
}