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

/* Variables and functions */
int /*<<< orphan*/ BUFSIZ;
int /*<<< orphan*/ EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ ferror(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
size_t fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ getchar();
scalar_t__ isprint(unsigned char);
char *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                           int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(char *, char *);
char *strerror(int /*<<< orphan*/);
int strlen(char *);
char toupper(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  char *filename;
  FILE *fp;
  size_t len, count, i;
  int lines;
  unsigned char buf[80 / 4 - 1];
  if (argc != 2) {
    fprintf(stderr, "Usage: %s <filename>\n", argv[0]);
    exit(EXIT_FAILURE);
  }
  filename = malloc(strlen(argv[1]) + 1);
  strcpy(filename, argv[1]);
  len = strlen(filename);
  filename[len] = '\0';
  if ((fp = fopen(filename, "rb")) == NULL) {
    fprintf(stderr, "Err. opening file, fopen(), %s\n", strerror(errno));
    exit(EXIT_FAILURE);
  }
  setvbuf(fp, NULL, _IONBF, BUFSIZ);
  while ((count = fread(buf, sizeof(char), sizeof(buf), fp)) != 0) {
    if (ferror(fp)) {
      fprintf(stderr, "File error: %s\n", strerror(errno));
      exit(EXIT_FAILURE);
    }
    for (i = 0; i < sizeof(buf); ++i) {
      if (i < count)
        printf("%02x ", buf[i]);
      else
        printf(" ");
    }
    printf("| ");
    for (i = 0; i < count; ++i)
      printf("%c", isprint(buf[i]) ? buf[i] : '.');
    printf("\n");
    if (!(++lines % 20))
      if (toupper(getchar()) == 'E')
        continue;
  }
  fclose(fp);
  fp = NULL;
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     123a <main+0x4a>
mov    0x2dc1(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xdd9(%rip),%rsi
call   10b0 <fprintf@plt>
mov    0x2d8d(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <strlen@plt>
mov    %eax,%edi
add    $0x1,%edi
call   10c0 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
call   1080 <strlen@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
lea    0xd8a(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    12d9 <main+0xe9>
mov    0x2d32(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x54(%rbp)
mov    0x2d16(%rip),%rax
mov    (%rax),%edi
call   1110 <strerror@plt>
mov    -0x54(%rbp),%edi
mov    %rax,%rdx
lea    0xd53(%rip),%rsi
call   10b0 <fprintf@plt>
mov    0x2cee(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    -0x20(%rbp),%rdi
mov    0x2d04(%rip),%rax
mov    (%rax),%edx
mov    0x2ce3(%rip),%rax
mov    (%rax),%ecx
xor    %eax,%eax
mov    %eax,%esi
call   10d0 <setvbuf@plt>
lea    -0x50(%rbp),%rdi
mov    -0x20(%rbp),%rcx
mov    $0x1,%esi
mov    $0x13,%edx
call   1060 <fread@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
je     1498 <main+0x2a8>
mov    -0x20(%rbp),%rdi
call   1050 <ferror@plt>
cmp    $0x0,%rax
je     136a <main+0x17a>
mov    0x2ca1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
mov    0x2c85(%rip),%rax
mov    (%rax),%edi
call   1110 <strerror@plt>
mov    -0x58(%rbp),%edi
mov    %rax,%rdx
lea    0xce2(%rip),%rsi
call   10b0 <fprintf@plt>
mov    0x2c5d(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
movq   $0x0,-0x38(%rbp)
cmpq   $0x13,-0x38(%rbp)
jae    13cb <main+0x1db>
mov    -0x38(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    13a7 <main+0x1b7>
mov    -0x38(%rbp),%rax
movzbl -0x50(%rbp,%rax,1),%esi
lea    0xcae(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
jmp    13b5 <main+0x1c5>
lea    0xc9f(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
jmp    13ba <main+0x1ca>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1372 <main+0x182>
lea    0xc7d(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    1447 <main+0x257>
mov    -0x38(%rbp),%rax
movzbl -0x50(%rbp,%rax,1),%edi
call   10e0 <isprint@plt>
cmp    $0x0,%rax
je     1418 <main+0x228>
mov    -0x38(%rbp),%rax
movzbl -0x50(%rbp,%rax,1),%eax
mov    %eax,-0x5c(%rbp)
jmp    1425 <main+0x235>
mov    $0x2e,%eax
mov    %eax,-0x5c(%rbp)
jmp    1425 <main+0x235>
mov    -0x5c(%rbp),%esi
lea    0xc23(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    13e1 <main+0x1f1>
lea    0xbc6(%rip),%rdi
mov    $0x0,%al
call   1090 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    $0x14,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1493 <main+0x2a3>
mov    $0x0,%al
call   10a0 <getchar@plt>
mov    %eax,%edi
call   1040 <toupper@plt>
movsbl %al,%eax
cmp    $0x45,%eax
jne    148e <main+0x29e>
jmp    12f8 <main+0x108>
jmp    1493 <main+0x2a3>
jmp    12f8 <main+0x108>
mov    -0x20(%rbp),%rdi
call   1070 <fclose@plt>
movq   $0x0,-0x20(%rbp)
mov    0x2b08(%rip),%rax
mov    (%rax),%eax
add    $0x60,%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    $0x2,%edi
jne    140b <main+0x20b>
mov    0x8(%r14),%rdi
call   1090 <strlen@plt>
lea    0x1(%rax),%edi
call   10d0 <malloc@plt>
mov    %rax,%rbx
mov    0x8(%r14),%rsi
mov    %rax,%rdi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
call   1090 <strlen@plt>
cltq
movb   $0x0,(%rbx,%rax,1)
lea    0xdc7(%rip),%rsi
mov    %rbx,%rdi
call   1100 <fopen@plt>
test   %rax,%rax
je     1420 <main+0x220>
mov    %rax,%r12
mov    0x2d7e(%rip),%rax
mov    (%rax),%edx
mov    0x2d5d(%rip),%rax
mov    (%rax),%ecx
mov    %r12,%rdi
xor    %esi,%esi
call   10e0 <setvbuf@plt>
lea    0x10(%rsp),%rdi
mov    $0x1,%esi
mov    $0x13,%edx
mov    %r12,%rcx
call   1070 <fread@plt>
test   %rax,%rax
je     13b5 <main+0x1b5>
mov    %rax,%rbx
lea    0xda0(%rip),%r13
mov    $0x2e,%r15d
jmp    12e3 <main+0xe3>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x10(%rsp),%rdi
mov    $0x1,%esi
mov    $0x13,%edx
mov    %r12,%rcx
call   1070 <fread@plt>
mov    %rax,%rbx
test   %rax,%rax
je     13b5 <main+0x1b5>
mov    %r12,%rdi
call   1060 <ferror@plt>
test   %rax,%rax
jne    13d5 <main+0x1d5>
xor    %ebp,%ebp
jmp    1314 <main+0x114>
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    $0x13,%rbp
je     1330 <main+0x130>
cmp    %rbx,%rbp
jae    1300 <main+0x100>
movzbl 0x10(%rsp,%rbp,1),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
jmp    130a <main+0x10a>
nopw   0x0(%rax,%rax,1)
lea    0xd18(%rip),%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
cmp    $0x2,%rbx
mov    $0x1,%eax
cmovb  %rax,%rbx
xor    %r14d,%r14d
xchg   %ax,%ax
movzbl 0x10(%rsp,%r14,1),%ebp
mov    %ebp,%edi
call   10f0 <isprint@plt>
test   %rax,%rax
cmove  %r15d,%ebp
mov    %ebp,%edi
call   1030 <putchar@plt>
add    $0x1,%r14
cmp    %r14,%rbx
jne    1350 <main+0x150>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
add    $0x1,%eax
mov    %eax,0xc(%rsp)
imul   $0xcccccccd,%eax,%eax
add    $0x19999998,%eax
ror    $0x2,%eax
cmp    $0xccccccc,%eax
ja     12c0 <main+0xc0>
xor    %eax,%eax
call   10b0 <getchar@plt>
mov    %eax,%edi
call   1050 <toupper@plt>
jmp    12c0 <main+0xc0>
mov    %r12,%rdi
call   1080 <fclose@plt>
mov    0x2bf4(%rip),%rax
mov    (%rax),%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2bfc(%rip),%rax
mov    (%rax),%ebx
mov    0x2be3(%rip),%rax
mov    (%rax),%edi
call   1120 <strerror@plt>
lea    0xc46(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   10c0 <fprintf@plt>
mov    0x2bbc(%rip),%rax
mov    (%rax),%edi
call   1110 <exit@plt>
mov    0x2bc6(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%rdx
lea    0xbe2(%rip),%rsi
jmp    13f8 <main+0x1f8>
mov    0x2bb1(%rip),%rax
mov    (%rax),%ebx
mov    0x2b98(%rip),%rax
mov    (%rax),%edi
call   1120 <strerror@plt>
lea    0xbdb(%rip),%rsi
jmp    13f3 <main+0x1f3>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Usage: %s <filename>\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [32 x i8] c"Err. opening file, fopen(), %s\0A\00"
@errno = global i32 0
@_IONBF = global i32 0
@BUFSIZ = global i32 0
@.str.3 = [16 x i8] c"File error: %s\0A\00"
@.str.4 = [6 x i8] c"%02x \00"
@.str.5 = [2 x i8] c" \00"
@.str.6 = [3 x i8] c"| \00"
@.str.7 = [3 x i8] c"%c\00"
@.str.8 = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 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 i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i32
%12 = alloca [19 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 2
br i1 %14, label %15, label %23
15: ; preds = %2
%16 = load i32, i32* @stderr
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 0
%19 = load i8*, i8** %18
%20 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %19)
%21 = load i32, i32* @EXIT_FAILURE
%22 = call i32 @exit(i32 %21)
unreachable
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 @strlen(i8* %26)
%28 = add nsw i32 %27, 1
%29 = call i8* @malloc(i32 %28)
store i8* %29, i8** %6
%30 = load i8*, i8** %6
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i32 @strcpy(i8* %30, i8* %33)
%35 = load i8*, i8** %6
%36 = call i32 @strlen(i8* %35)
%37 = sext i32 %36 to i64
store i64 %37, i64* %8
%38 = load i8*, i8** %6
%39 = load i64, i64* %8
%40 = getelementptr inbounds i8, i8* %38, i64 %39
store i8 0, i8* %40
%41 = load i8*, i8** %6
%42 = call i32* @fopen(i8* %41, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %42, i32** %7
%43 = icmp eq i32* %42, null
br i1 %43, label %44, label %51
44: ; preds = %23
%45 = load i32, i32* @stderr
%46 = load i32, i32* @errno
%47 = call i8* @strerror(i32 %46)
%48 = call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %47)
%49 = load i32, i32* @EXIT_FAILURE
%50 = call i32 @exit(i32 %49)
unreachable
51: ; preds = %23
%52 = load i32*, i32** %7
%53 = load i32, i32* @_IONBF
%54 = load i32, i32* @BUFSIZ
%55 = call i32 @setvbuf(i32* %52, i32* null, i32 %53, i32 %54)
br label %56
56: ; preds = %129, %127, %51
%57 = getelementptr inbounds [19 x i8], [19 x i8]* %12, i64 0, i64 0
%58 = load i32*, i32** %7
%59 = call i64 @fread(i8* %57, i32 1, i32 19, i32* %58)
store i64 %59, i64* %9
%60 = icmp ne i64 %59, 0
br i1 %60, label %61, label %130
61: ; preds = %56
%62 = load i32*, i32** %7
%63 = call i64 @ferror(i32* %62)
%64 = icmp ne i64 %63, 0
br i1 %64, label %65, label %72
65: ; preds = %61
%66 = load i32, i32* @stderr
%67 = load i32, i32* @errno
%68 = call i8* @strerror(i32 %67)
%69 = call i32 @fprintf(i32 %66, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %68)
%70 = load i32, i32* @EXIT_FAILURE
%71 = call i32 @exit(i32 %70)
unreachable
72: ; preds = %61
store i64 0, i64* %10
br label %73
73: ; preds = %89, %72
%74 = load i64, i64* %10
%75 = icmp ult i64 %74, 19
br i1 %75, label %76, label %92
76: ; preds = %73
%77 = load i64, i64* %10
%78 = load i64, i64* %9
%79 = icmp ult i64 %77, %78
br i1 %79, label %80, label %86
80: ; preds = %76
%81 = load i64, i64* %10
%82 = getelementptr inbounds [19 x i8], [19 x i8]* %12, i64 0, i64 %81
%83 = load i8, i8* %82
%84 = zext i8 %83 to i32
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %84)
br label %88
86: ; preds = %76
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %88
88: ; preds = %86, %80
br label %89
89: ; preds = %88
%90 = load i64, i64* %10
%91 = add i64 %90, 1
store i64 %91, i64* %10
br label %73
92: ; preds = %73
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
store i64 0, i64* %10
br label %94
94: ; preds = %113, %92
%95 = load i64, i64* %10
%96 = load i64, i64* %9
%97 = icmp ult i64 %95, %96
br i1 %97, label %98, label %116
98: ; preds = %94
%99 = load i64, i64* %10
%100 = getelementptr inbounds [19 x i8], [19 x i8]* %12, i64 0, i64 %99
%101 = load i8, i8* %100
%102 = call i64 @isprint(i8 zeroext %101)
%103 = icmp ne i64 %102, 0
br i1 %103, label %104, label %109
104: ; preds = %98
%105 = load i64, i64* %10
%106 = getelementptr inbounds [19 x i8], [19 x i8]* %12, i64 0, i64 %105
%107 = load i8, i8* %106
%108 = zext i8 %107 to i32
br label %110
109: ; preds = %98
br label %110
110: ; preds = %109, %104
%111 = phi i32 [ %108, %104 ], [ 46, %109 ]
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %111)
br label %113
113: ; preds = %110
%114 = load i64, i64* %10
%115 = add i64 %114, 1
store i64 %115, i64* %10
br label %94
116: ; preds = %94
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%118 = load i32, i32* %11
%119 = add nsw i32 %118, 1
store i32 %119, i32* %11
%120 = srem i32 %119, 20
%121 = icmp ne i32 %120, 0
br i1 %121, label %129, label %122
122: ; preds = %116
%123 = call i32 (...) @getchar()
%124 = call signext i8 @toupper(i32 %123)
%125 = sext i8 %124 to i32
%126 = icmp eq i32 %125, 69
br i1 %126, label %127, label %128
127: ; preds = %122
br label %56
128: ; preds = %122
br label %129
129: ; preds = %128, %116
br label %56
130: ; preds = %56
%131 = load i32*, i32** %7
%132 = call i32 @fclose(i32* %131)
store i32* null, i32** %7
%133 = load i32, i32* @EXIT_SUCCESS
ret i32 %133
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Usage: %s <filename>\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [32 x i8] c"Err. opening file, fopen(), %s\0A\00"
@errno = global i32 0
@_IONBF = global i32 0
@BUFSIZ = global i32 0
@.str.3 = [16 x i8] c"File error: %s\0A\00"
@.str.4 = [6 x i8] c"%02x \00"
@.str.6 = [3 x i8] c"| \00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [19 x i8]
%4 = getelementptr inbounds [19 x i8], [19 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32 %0, 2
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %1
%9 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32, i32* @EXIT_FAILURE
%11 = tail call i32 @exit(i32 %10)
unreachable
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i32 @strlen(i8* %14)
%16 = add nsw i32 %15, 1
%17 = tail call i8* @malloc(i32 %16)
%18 = load i8*, i8** %13
%19 = tail call i32 @strcpy(i8* %17, i8* %18)
%20 = tail call i32 @strlen(i8* %17)
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %17, i64 %21
store i8 0, i8* %22
%23 = tail call i32* @fopen(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %32
25: ; preds = %12
%26 = load i32, i32* @stderr
%27 = load i32, i32* @errno
%28 = tail call i8* @strerror(i32 %27)
%29 = tail call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %28)
%30 = load i32, i32* @EXIT_FAILURE
%31 = tail call i32 @exit(i32 %30)
unreachable
32: ; preds = %12
%33 = load i32, i32* @_IONBF
%34 = load i32, i32* @BUFSIZ
%35 = tail call i32 @setvbuf(i32* %23, i32* null, i32 %33, i32 %34)
%36 = call i64 @fread(i8* %4, i32 1, i32 19, i32* %23)
%37 = icmp eq i64 %36, 0
br i1 %37, label %88, label %38
38: ; preds = %32, %85
%39 = phi i64 [ %86, %85 ], [ %36, %32 ]
%40 = phi i32 [ %79, %85 ], [ undef, %32 ]
%41 = tail call i64 @ferror(i32* %23)
%42 = icmp eq i64 %41, 0
br i1 %42, label %50, label %43
43: ; preds = %38
%44 = load i32, i32* @stderr
%45 = load i32, i32* @errno
%46 = tail call i8* @strerror(i32 %45)
%47 = tail call i32 @fprintf(i32 %44, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %46)
%48 = load i32, i32* @EXIT_FAILURE
%49 = tail call i32 @exit(i32 %48)
unreachable
50: ; preds = %38, %60
%51 = phi i64 [ %61, %60 ], [ 0, %38 ]
%52 = icmp ult i64 %51, %39
br i1 %52, label %53, label %58
53: ; preds = %50
%54 = getelementptr inbounds [19 x i8], [19 x i8]* %3, i64 0, i64 %51
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %56)
br label %60
58: ; preds = %50
%59 = tail call i32 @putchar(i32 32)
br label %60
60: ; preds = %53, %58
%61 = add nuw nsw i64 %51, 1
%62 = icmp eq i64 %61, 19
br i1 %62, label %63, label %50
63: ; preds = %60
%64 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%65 = call i64 @llvm.umax.i64(i64 %39, i64 1)
br label %66
66: ; preds = %63, %66
%67 = phi i64 [ 0, %63 ], [ %75, %66 ]
%68 = getelementptr inbounds [19 x i8], [19 x i8]* %3, i64 0, i64 %67
%69 = load i8, i8* %68
%70 = tail call i64 @isprint(i8 zeroext %69)
%71 = icmp eq i64 %70, 0
%72 = zext i8 %69 to i32
%73 = select i1 %71, i32 46, i32 %72
%74 = tail call i32 @putchar(i32 %73)
%75 = add nuw i64 %67, 1
%76 = icmp eq i64 %75, %65
br i1 %76, label %77, label %66
77: ; preds = %66
%78 = tail call i32 @putchar(i32 10)
%79 = add nsw i32 %40, 1
%80 = srem i32 %79, 20
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %85
82: ; preds = %77
%83 = tail call i32 (...) @getchar()
%84 = tail call signext i8 @toupper(i32 %83)
br label %85
85: ; preds = %82, %77
%86 = call i64 @fread(i8* %4, i32 1, i32 19, i32* %23)
%87 = icmp eq i64 %86, 0
br i1 %87, label %88, label %38
88: ; preds = %85, %32
%89 = tail call i32 @fclose(i32* %23)
%90 = load i32, i32* @EXIT_SUCCESS
ret i32 %90
}