#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 /*<<< orphan*/ buf;

/* Variables and functions */
int EINVAL;
int MTD_OTP_FACTORY;
int MTD_OTP_USER;
int /*<<< orphan*/ OTPSELECT;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int ioctl(int, int /*<<< orphan*/, int *);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int read(int, unsigned char *, int);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  int fd, val, i, offset, ret;
  unsigned char buf[16];
  if (argc != 3 || (strcmp(argv[1], "-f") && strcmp(argv[1], "-u"))) {
    fprintf(stderr, "Usage: %s [ -f | -u ] <device>\n", argv[0]);
    return EINVAL;
  }
  fd = open(argv[2], O_RDONLY);
  if (fd < 0) {
    perror(argv[2]);
    return errno;
  }
  val = argv[1][1] == 'f' ? MTD_OTP_FACTORY : MTD_OTP_USER;
  ret = ioctl(fd, OTPSELECT, &val);
  if (ret < 0) {
    perror("OTPSELECT");
    return errno;
  }
  printf("OTP %s data for %s\n", argv[1][1] == 'f' ? "factory" : "user",
         argv[2]);
  offset = 0;
  while ((ret = read(fd, buf, sizeof(buf)))) {
    if (ret < 0) {
      perror("read()");
      return errno;
    }
    printf("0x%04x:", offset);
    for (i = 0; i < ret; i++)
      printf(" %02x", buf[i]);
    printf("\n");
    offset += ret;
  }
  close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    11dc <main+0x5c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe51(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     1209 <main+0x89>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe36(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     1209 <main+0x89>
mov    0x2ddd(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe13(%rip),%rsi
call   1080 <fprintf@plt>
mov    0x2db1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    13b7 <main+0x237>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    0x2dc8(%rip),%rax
mov    (%rax),%esi
call   1090 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    124a <main+0xca>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10a0 <perror@plt>
mov    0x2d78(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    13b7 <main+0x237>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x66,%eax
jne    1270 <main+0xf0>
mov    0x2d92(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
jmp    127c <main+0xfc>
mov    0x2d61(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    0x2d44(%rip),%rax
mov    (%rax),%esi
lea    -0x18(%rbp),%rdx
call   1040 <ioctl@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    12c1 <main+0x141>
lea    0xd7b(%rip),%rdi
call   10a0 <perror@plt>
mov    0x2d01(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    13b7 <main+0x237>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%ecx
lea    0xd78(%rip),%rsi
lea    0xd69(%rip),%rax
cmp    $0x66,%ecx
cmove  %rax,%rsi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xd3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    $0x10,%edx
call   1060 <read@plt>
mov    %eax,-0x24(%rbp)
cmp    $0x0,%eax
je     13a8 <main+0x228>
cmpl   $0x0,-0x24(%rbp)
jge    1343 <main+0x1c3>
lea    0xd24(%rip),%rdi
call   10a0 <perror@plt>
mov    0x2c7f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    13b7 <main+0x237>
mov    -0x20(%rbp),%esi
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    138c <main+0x20c>
movslq -0x1c(%rbp),%rax
movzbl -0x40(%rbp,%rax,1),%esi
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    135b <main+0x1db>
lea    0xc91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    12ff <main+0x17f>
mov    -0x14(%rbp),%edi
call   1050 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
cmp    $0x3,%edi
jne    11d0 <main+0x40>
mov    0x8(%r14),%rdi
lea    0xe4f(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     11f6 <main+0x66>
mov    0x8(%r14),%rdi
lea    0xe3d(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     11f6 <main+0x66>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%rdx
lea    0xe23(%rip),%rsi
call   1090 <fprintf@plt>
mov    0x2dc1(%rip),%rax
mov    (%rax),%eax
jmp    1309 <main+0x179>
mov    0x10(%r14),%rdi
mov    0x2ddf(%rip),%rax
mov    (%rax),%esi
call   10a0 <open@plt>
test   %eax,%eax
js     1318 <main+0x188>
mov    %eax,%r15d
mov    0x8(%r14),%rax
cmpb   $0x66,0x1(%rax)
jne    1226 <main+0x96>
mov    0x2dd4(%rip),%rax
jmp    122d <main+0x9d>
mov    0x2dab(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xc(%rsp)
mov    0x2d96(%rip),%rax
mov    (%rax),%esi
lea    0xc(%rsp),%rdx
mov    %r15d,%edi
call   1050 <ioctl@plt>
test   %eax,%eax
js     131e <main+0x18e>
mov    0x8(%r14),%rax
mov    0x10(%r14),%rdx
cmpb   $0x66,0x1(%rax)
lea    0xde0(%rip),%rax
lea    0xde1(%rip),%rsi
cmove  %rax,%rsi
lea    0xdba(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %r15d,%edi
mov    $0x10,%edx
call   1070 <read@plt>
test   %eax,%eax
je     12ff <main+0x16f>
mov    %eax,%r13d
lea    0xdc3(%rip),%rbx
xor    %ebp,%ebp
nop
test   %r13d,%r13d
js     1327 <main+0x197>
lea    0xda8(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13d,%r14d
xor    %r12d,%r12d
nop
movzbl 0x10(%rsp,%r12,1),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r12
cmp    %r12,%r14
jne    12c0 <main+0x130>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    %r13d,%ebp
mov    %r15d,%edi
lea    0x10(%rsp),%rsi
mov    $0x10,%edx
call   1070 <read@plt>
mov    %eax,%r13d
test   %eax,%eax
jne    12a0 <main+0x110>
mov    %r15d,%edi
call   1060 <close@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x10(%r14),%rdi
jmp    132e <main+0x19e>
lea    0xd01(%rip),%rdi
jmp    132e <main+0x19e>
lea    0xd23(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2c7e(%rip),%rax
mov    (%rax),%eax
jmp    1309 <main+0x179>

LLVM IR (-O0):
@.str = [3 x i8] c"-f\00"
@.str.1 = [3 x i8] c"-u\00"
@stderr = global i32 0
@.str.2 = [32 x i8] c"Usage: %s [ -f | -u ] <device>\0A\00"
@EINVAL = global i32 0
@O_RDONLY = global i32 0
@errno = global i32 0
@MTD_OTP_FACTORY = global i32 0
@MTD_OTP_USER = global i32 0
@OTPSELECT = global i32 0
@.str.3 = [10 x i8] c"OTPSELECT\00"
@.str.4 = [20 x i8] c"OTP %s data for %s\0A\00"
@.str.5 = [8 x i8] c"factory\00"
@.str.6 = [5 x i8] c"user\00"
@.str.7 = [7 x i8] c"read()\00"
@.str.8 = [8 x i8] c"0x%04x:\00"
@.str.9 = [6 x i8] c" %02x\00"
@.str.10 = [2 x i8] c"\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 i32
%10 = alloca i32
%11 = alloca [16 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 3
br i1 %13, label %26, label %14
14: ; preds = %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %33
20: ; preds = %14
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %33
26: ; preds = %20, %2
%27 = load i32, i32* @stderr
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 0
%30 = load i8*, i8** %29
%31 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %30)
%32 = load i32, i32* @EINVAL
store i32 %32, i32* %3
br label %119
33: ; preds = %20, %14
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 2
%36 = load i8*, i8** %35
%37 = load i32, i32* @O_RDONLY
%38 = call i32 @open(i8* %36, i32 %37)
store i32 %38, i32* %6
%39 = load i32, i32* %6
%40 = icmp slt i32 %39, 0
br i1 %40, label %41, label %47
41: ; preds = %33
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 2
%44 = load i8*, i8** %43
%45 = call i32 @perror(i8* %44)
%46 = load i32, i32* @errno
store i32 %46, i32* %3
br label %119
47: ; preds = %33
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 1
%50 = load i8*, i8** %49
%51 = getelementptr inbounds i8, i8* %50, i64 1
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = icmp eq i32 %53, 102
br i1 %54, label %55, label %57
55: ; preds = %47
%56 = load i32, i32* @MTD_OTP_FACTORY
br label %59
57: ; preds = %47
%58 = load i32, i32* @MTD_OTP_USER
br label %59
59: ; preds = %57, %55
%60 = phi i32 [ %56, %55 ], [ %58, %57 ]
store i32 %60, i32* %7
%61 = load i32, i32* %6
%62 = load i32, i32* @OTPSELECT
%63 = call i32 @ioctl(i32 %61, i32 %62, i32* %7)
store i32 %63, i32* %10
%64 = load i32, i32* %10
%65 = icmp slt i32 %64, 0
br i1 %65, label %66, label %69
66: ; preds = %59
%67 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%68 = load i32, i32* @errno
store i32 %68, i32* %3
br label %119
69: ; preds = %59
%70 = load i8**, i8*** %5
%71 = getelementptr inbounds i8*, i8** %70, i64 1
%72 = load i8*, i8** %71
%73 = getelementptr inbounds i8, i8* %72, i64 1
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 102
%77 = zext i1 %76 to i64
%78 = select i1 %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0)
%79 = load i8**, i8*** %5
%80 = getelementptr inbounds i8*, i8** %79, i64 2
%81 = load i8*, i8** %80
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* %78, i8* %81)
store i32 0, i32* %9
br label %83
83: ; preds = %111, %69
%84 = load i32, i32* %6
%85 = getelementptr inbounds [16 x i8], [16 x i8]* %11, i64 0, i64 0
%86 = call i32 @read(i32 %84, i8* %85, i32 16)
store i32 %86, i32* %10
%87 = icmp ne i32 %86, 0
br i1 %87, label %88, label %116
88: ; preds = %83
%89 = load i32, i32* %10
%90 = icmp slt i32 %89, 0
br i1 %90, label %91, label %94
91: ; preds = %88
%92 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%93 = load i32, i32* @errno
store i32 %93, i32* %3
br label %119
94: ; preds = %88
%95 = load i32, i32* %9
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %95)
store i32 0, i32* %8
br label %97
97: ; preds = %108, %94
%98 = load i32, i32* %8
%99 = load i32, i32* %10
%100 = icmp slt i32 %98, %99
br i1 %100, label %101, label %111
101: ; preds = %97
%102 = load i32, i32* %8
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [16 x i8], [16 x i8]* %11, i64 0, i64 %103
%105 = load i8, i8* %104
%106 = zext i8 %105 to i32
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %106)
br label %108
108: ; preds = %101
%109 = load i32, i32* %8
%110 = add nsw i32 %109, 1
store i32 %110, i32* %8
br label %97
111: ; preds = %97
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%113 = load i32, i32* %10
%114 = load i32, i32* %9
%115 = add nsw i32 %114, %113
store i32 %115, i32* %9
br label %83
116: ; preds = %83
%117 = load i32, i32* %6
%118 = call i32 @close(i32 %117)
store i32 0, i32* %3
br label %119
119: ; preds = %116, %91, %66, %41, %26
%120 = load i32, i32* %3
ret i32 %120
}

LLVM IR (-O2):
@.str = [3 x i8] c"-f\00"
@.str.1 = [3 x i8] c"-u\00"
@stderr = global i32 0
@.str.2 = [32 x i8] c"Usage: %s [ -f | -u ] <device>\0A\00"
@EINVAL = global i32 0
@O_RDONLY = global i32 0
@errno = global i32 0
@MTD_OTP_FACTORY = global i32 0
@MTD_OTP_USER = global i32 0
@OTPSELECT = global i32 0
@.str.3 = [10 x i8] c"OTPSELECT\00"
@.str.4 = [20 x i8] c"OTP %s data for %s\0A\00"
@.str.5 = [8 x i8] c"factory\00"
@.str.6 = [5 x i8] c"user\00"
@.str.7 = [7 x i8] c"read()\00"
@.str.8 = [8 x i8] c"0x%04x:\00"
@.str.9 = [6 x i8] c" %02x\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca [16 x i8]
%5 = bitcast i32* %3 to i8*
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%7 = icmp eq i32 %0, 3
br i1 %7, label %8, label %17
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %22, label %13
13: ; preds = %8
%14 = load i8*, i8** %9
%15 = tail call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %22, label %17
17: ; preds = %13, %2
%18 = load i32, i32* @stderr
%19 = load i8*, i8** %1
%20 = tail call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %19)
%21 = load i32, i32* @EINVAL
br label %81
22: ; preds = %13, %8
%23 = getelementptr inbounds i8*, i8** %1, i64 2
%24 = load i8*, i8** %23
%25 = load i32, i32* @O_RDONLY
%26 = tail call i32 @open(i8* %24, i32 %25)
%27 = icmp slt i32 %26, 0
br i1 %27, label %28, label %32
28: ; preds = %22
%29 = load i8*, i8** %23
%30 = tail call i32 @perror(i8* %29)
%31 = load i32, i32* @errno
br label %81
32: ; preds = %22
%33 = load i8*, i8** %9
%34 = getelementptr inbounds i8, i8* %33, i64 1
%35 = load i8, i8* %34
%36 = icmp eq i8 %35, 102
%37 = load i32, i32* @MTD_OTP_FACTORY
%38 = load i32, i32* @MTD_OTP_USER
%39 = select i1 %36, i32 %37, i32 %38
store i32 %39, i32* %3
%40 = load i32, i32* @OTPSELECT
%41 = call i32 @ioctl(i32 %26, i32 %40, i32* %3)
%42 = icmp slt i32 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %32
%44 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%45 = load i32, i32* @errno
br label %81
46: ; preds = %32
%47 = load i8*, i8** %9
%48 = getelementptr inbounds i8, i8* %47, i64 1
%49 = load i8, i8* %48
%50 = icmp eq i8 %49, 102
%51 = select i1 %50, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0)
%52 = load i8*, i8** %23
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* %51, i8* %52)
%54 = call i32 @read(i32 %26, i8* %6, i32 16)
%55 = icmp eq i32 %54, 0
br i1 %55, label %79, label %56
56: ; preds = %46, %74
%57 = phi i32 [ %77, %74 ], [ %54, %46 ]
%58 = phi i32 [ %76, %74 ], [ 0, %46 ]
%59 = icmp slt i32 %57, 0
br i1 %59, label %60, label %63
60: ; preds = %56
%61 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%62 = load i32, i32* @errno
br label %81
63: ; preds = %56
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %58)
%65 = zext i32 %57 to i64
br label %66
66: ; preds = %63, %66
%67 = phi i64 [ 0, %63 ], [ %72, %66 ]
%68 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 %67
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %70)
%72 = add nuw nsw i64 %67, 1
%73 = icmp eq i64 %72, %65
br i1 %73, label %74, label %66
74: ; preds = %66
%75 = call i32 @putchar(i32 10)
%76 = add nsw i32 %57, %58
%77 = call i32 @read(i32 %26, i8* %6, i32 16)
%78 = icmp eq i32 %77, 0
br i1 %78, label %79, label %56
79: ; preds = %74, %46
%80 = call i32 @close(i32 %26)
br label %81
81: ; preds = %79, %60, %43, %28, %17
%82 = phi i32 [ %21, %17 ], [ %31, %28 ], [ %45, %43 ], [ %62, %60 ], [ 0, %79 ]
ret i32 %82
}