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

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fread(char **, int, int, int /*<<< orphan*/ *);
int fwrite(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int main(int argc, char *argv[]) {
  FILE *inputFILEPointer, *outputFILEPointer;
  int numBytes, i, k, k2, counter;
  char x[16];
  char s[10240];
  puts("Aldebaro. March 10, 2009");
  if (argc != 4) {
    printf("Usage: <input_file> <output_file> "
           "<number_of_bytes_of_each_element>\n");
    printf("Example: in.bin out.bin 4  (for swapping 4 bytes of floats)\n");
    exit(1);
  }
  sprintf(s, "%s", argv[1]);
  inputFILEPointer = fopen(s, "rb");
  if (inputFILEPointer == NULL) {
    printf("Error opening file: %s", s);
    exit(1);
  }
  sprintf(s, "%s", argv[2]);
  outputFILEPointer = fopen(s, "wb");
  if (outputFILEPointer == NULL) {
    printf("Error opening file: %s", s);
    exit(1);
  }
  numBytes = atoi(argv[3]);
  if (numBytes < 1 || numBytes > 16) {
    puts("The <number_of_bytes_of_each_element> must be in the range from 1 to "
         "16!");
    exit(-1);
  }
  counter = 0;
  do {
    k = fread(&x, 1, numBytes, inputFILEPointer);
    if (k != numBytes) {
      puts("End of file!");
      printf("%d", k);
      break;
    }
    for (i = numBytes - 1; i >= 0; i--) {
      k2 = fwrite(&x[i], 1, 1, outputFILEPointer);
      if (k2 != 1) {
        printf("Error writing file: %s", s);
        exit(-1);
      }
    }
    counter++;
  } while (k == numBytes);
  fclose(inputFILEPointer);
  fclose(outputFILEPointer);
  printf("Happy end. Wrote file %s with %d bytes.\n", s, numBytes * counter);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2850,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe50(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x4,-0x8(%rbp)
je     11e5 <main+0x55>
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
lea    -0x2850(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xeb7(%rip),%rsi
call   1090 <sprintf@plt>
lea    -0x2850(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1241 <main+0xb1>
lea    -0x2850(%rbp),%rsi
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
lea    -0x2850(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xe5b(%rip),%rsi
call   1090 <sprintf@plt>
lea    -0x2850(%rbp),%rdi
lea    0xe4b(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    129d <main+0x10d>
lea    -0x2850(%rbp),%rsi
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
jl     12c1 <main+0x131>
cmpl   $0x10,-0x24(%rbp)
jle    12d7 <main+0x147>
lea    0xdf0(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
movl   $0x0,-0x34(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x24(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fread@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
je     1324 <main+0x194>
lea    0xdf8(%rip),%rdi
call   1030 <puts@plt>
mov    -0x2c(%rbp),%esi
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13a6 <main+0x216>
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jl     1391 <main+0x201>
movslq -0x28(%rbp),%rax
lea    -0x50(%rbp),%rdi
add    %rax,%rdi
mov    -0x20(%rbp),%rcx
mov    $0x1,%edx
mov    %edx,%esi
call   10b0 <fwrite@plt>
mov    %eax,-0x30(%rbp)
cmpl   $0x1,-0x30(%rbp)
je     137e <main+0x1ee>
lea    -0x2850(%rbp),%rsi
lea    0xda4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
jmp    1383 <main+0x1f3>
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
jmp    132d <main+0x19d>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
je     12de <main+0x14e>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0x2850(%rbp),%rsi
mov    -0x24(%rbp),%edx
imul   -0x34(%rbp),%edx
lea    0xd5b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x2850,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2828,%rsp
mov    %rsi,%rbp
mov    %edi,%ebx
lea    0xe53(%rip),%rdi
call   1040 <puts@plt>
cmp    $0x4,%ebx
jne    1352 <main+0x1c2>
mov    0x8(%rbp),%rsi
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xe46(%rip),%rsi
mov    %rbx,%rdi
call   1080 <fopen@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     1335 <main+0x1a5>
mov    0x10(%rbp),%rsi
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xe32(%rip),%rsi
mov    %rbx,%rdi
call   1080 <fopen@plt>
test   %rax,%rax
je     1335 <main+0x1a5>
mov    %rax,%rbx
mov    0x18(%rbp),%rdi
call   1090 <atoi@plt>
mov    %eax,%r15d
lea    -0x11(%r15),%eax
cmp    $0xfffffff0,%eax
jb     1374 <main+0x1e4>
lea    0x10(%rsp),%rdi
mov    $0x1,%esi
mov    %r15d,%edx
mov    0x8(%rsp),%rcx
call   1050 <fread@plt>
cmp    %r15d,%eax
jne    12d0 <main+0x140>
mov    %r15d,%r12d
xor    %r13d,%r13d
lea    0xf(%rsp),%r14
jmp    1280 <main+0xf0>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r13d
lea    0x10(%rsp),%rdi
mov    $0x1,%esi
mov    %r15d,%edx
mov    0x8(%rsp),%rcx
call   1050 <fread@plt>
cmp    %r15d,%eax
jne    12d7 <main+0x147>
mov    %r12,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %ebp,%ebp
jle    1260 <main+0xd0>
lea    (%r14,%rbp,1),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
add    $0xffffffffffffffff,%rbp
cmp    $0x1,%eax
je     1290 <main+0x100>
lea    0xdd5(%rip),%rdi
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>
mov    %eax,%ebp
xor    %r13d,%r13d
jmp    12d9 <main+0x149>
mov    %eax,%ebp
lea    0xd9f(%rip),%rdi
call   1040 <puts@plt>
lea    0xda0(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x8(%rsp),%rdi
call   1060 <fclose@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
imul   %r15d,%r13d
lea    0xd94(%rip),%rdi
lea    0x20(%rsp),%rsi
mov    %r13d,%edx
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
add    $0x2828,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xce0(%rip),%rdi
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
lea    0xd76(%rip),%rdi
call   1040 <puts@plt>
lea    0xdae(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
lea    0xcbb(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Aldebaro. March 10, 2009\00"
@.str.1 = [69 x i8] c"Usage: <input_file> <output_file> <number_of_bytes_of_each_element>\0A\00"
@.str.2 = [61 x i8] c"Example: in.bin out.bin 4 (for swapping 4 bytes of floats)\0A\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [3 x i8] c"rb\00"
@.str.5 = [23 x i8] c"Error opening file: %s\00"
@.str.6 = [3 x i8] c"wb\00"
@.str.7 = [73 x i8] c"The <number_of_bytes_of_each_element> must be in the range from 1 to 16!\00"
@.str.8 = [13 x i8] c"End of file!\00"
@.str.9 = [3 x i8] c"%d\00"
@.str.10 = [23 x i8] c"Error writing file: %s\00"
@.str.11 = [41 x i8] c"Happy end. Wrote file %s with %d bytes.\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 i32
%12 = alloca i32
%13 = alloca [16 x i8]
%14 = alloca [10240 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 4
br i1 %17, label %18, label %22
18: ; preds = %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 @exit(i32 1)
unreachable
22: ; preds = %2
%23 = getelementptr inbounds [10240 x i8], [10240 x i8]* %14, i64 0, i64 0
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 @sprintf(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %26)
%28 = getelementptr inbounds [10240 x i8], [10240 x i8]* %14, i64 0, i64 0
%29 = call i32* @fopen(i8* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %29, i32** %6
%30 = load i32*, i32** %6
%31 = icmp eq i32* %30, null
br i1 %31, label %32, label %36
32: ; preds = %22
%33 = getelementptr inbounds [10240 x i8], [10240 x i8]* %14, i64 0, i64 0
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %33)
%35 = call i32 @exit(i32 1)
unreachable
36: ; preds = %22
%37 = getelementptr inbounds [10240 x i8], [10240 x i8]* %14, i64 0, i64 0
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i8*, i8** %39
%41 = call i32 @sprintf(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %40)
%42 = getelementptr inbounds [10240 x i8], [10240 x i8]* %14, i64 0, i64 0
%43 = call i32* @fopen(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
store i32* %43, i32** %7
%44 = load i32*, i32** %7
%45 = icmp eq i32* %44, null
br i1 %45, label %46, label %50
46: ; preds = %36
%47 = getelementptr inbounds [10240 x i8], [10240 x i8]* %14, i64 0, i64 0
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %47)
%49 = call i32 @exit(i32 1)
unreachable
50: ; preds = %36
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 3
%53 = load i8*, i8** %52
%54 = call i32 @atoi(i8* %53)
store i32 %54, i32* %8
%55 = load i32, i32* %8
%56 = icmp slt i32 %55, 1
br i1 %56, label %60, label %57
57: ; preds = %50
%58 = load i32, i32* %8
%59 = icmp sgt i32 %58, 16
br i1 %59, label %60, label %63
60: ; preds = %57, %50
%61 = call i32 @puts(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.7, i64 0, i64 0))
%62 = call i32 @exit(i32 -1)
unreachable
63: ; preds = %57
store i32 0, i32* %12
br label %64
64: ; preds = %101, %63
%65 = bitcast [16 x i8]* %13 to i8**
%66 = load i32, i32* %8
%67 = load i32*, i32** %6
%68 = call i32 @fread(i8** %65, i32 1, i32 %66, i32* %67)
store i32 %68, i32* %10
%69 = load i32, i32* %10
%70 = load i32, i32* %8
%71 = icmp ne i32 %69, %70
br i1 %71, label %72, label %76
72: ; preds = %64
%73 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%74 = load i32, i32* %10
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 %74)
br label %105
76: ; preds = %64
%77 = load i32, i32* %8
%78 = sub nsw i32 %77, 1
store i32 %78, i32* %9
br label %79
79: ; preds = %95, %76
%80 = load i32, i32* %9
%81 = icmp sge i32 %80, 0
br i1 %81, label %82, label %98
82: ; preds = %79
%83 = load i32, i32* %9
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 %84
%86 = load i32*, i32** %7
%87 = call i32 @fwrite(i8* %85, i32 1, i32 1, i32* %86)
store i32 %87, i32* %11
%88 = load i32, i32* %11
%89 = icmp ne i32 %88, 1
br i1 %89, label %90, label %94
90: ; preds = %82
%91 = getelementptr inbounds [10240 x i8], [10240 x i8]* %14, i64 0, i64 0
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i8* %91)
%93 = call i32 @exit(i32 -1)
unreachable
94: ; preds = %82
br label %95
95: ; preds = %94
%96 = load i32, i32* %9
%97 = add nsw i32 %96, -1
store i32 %97, i32* %9
br label %79
98: ; preds = %79
%99 = load i32, i32* %12
%100 = add nsw i32 %99, 1
store i32 %100, i32* %12
br label %101
101: ; preds = %98
%102 = load i32, i32* %10
%103 = load i32, i32* %8
%104 = icmp eq i32 %102, %103
br i1 %104, label %64, label %105
105: ; preds = %101, %72
%106 = load i32*, i32** %6
%107 = call i32 @fclose(i32* %106)
%108 = load i32*, i32** %7
%109 = call i32 @fclose(i32* %108)
%110 = getelementptr inbounds [10240 x i8], [10240 x i8]* %14, i64 0, i64 0
%111 = load i32, i32* %8
%112 = load i32, i32* %12
%113 = mul nsw i32 %111, %112
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0), i8* %110, i32 %113)
%115 = load i32, i32* %3
ret i32 %115
}

LLVM IR (-O2):
@.str = [25 x i8] c"Aldebaro. March 10, 2009\00"
@.str.4 = [3 x i8] c"rb\00"
@.str.5 = [23 x i8] c"Error opening file: %s\00"
@.str.6 = [3 x i8] c"wb\00"
@.str.7 = [73 x i8] c"The <number_of_bytes_of_each_element> must be in the range from 1 to 16!\00"
@.str.8 = [13 x i8] c"End of file!\00"
@.str.9 = [3 x i8] c"%d\00"
@.str.10 = [23 x i8] c"Error writing file: %s\00"
@.str.11 = [41 x i8] c"Happy end. Wrote file %s with %d bytes.\0A\00"
@str = [68 x i8] c"Usage: <input_file> <output_file> <number_of_bytes_of_each_element>\00"
@str.12 = [60 x i8] c"Example: in.bin out.bin 4 (for swapping 4 bytes of floats)\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [16 x i8]
%4 = alloca [10240 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [10240 x i8], [10240 x i8]* %4, i64 0, i64 0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %0, 4
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.12, i64 0, i64 0))
%12 = tail call i32 @exit(i32 1)
unreachable
13: ; preds = %2
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = call i8* @strcpy(i8* %6, i8* dereferenceable(1) %15)
%17 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%18 = icmp eq i32* %17, null
br i1 %18, label %19, label %22
19: ; preds = %13
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %6)
%21 = call i32 @exit(i32 1)
unreachable
22: ; preds = %13
%23 = getelementptr inbounds i8*, i8** %1, i64 2
%24 = load i8*, i8** %23
%25 = call i8* @strcpy(i8* %6, i8* dereferenceable(1) %24)
%26 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%27 = icmp eq i32* %26, null
br i1 %27, label %28, label %31
28: ; preds = %22
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* %6)
%30 = call i32 @exit(i32 1)
unreachable
31: ; preds = %22
%32 = getelementptr inbounds i8*, i8** %1, i64 3
%33 = load i8*, i8** %32
%34 = call i32 @atoi(i8* %33)
%35 = add i32 %34, -17
%36 = icmp ult i32 %35, -16
br i1 %36, label %42, label %37
37: ; preds = %31
%38 = bitcast [16 x i8]* %3 to i8**
%39 = zext i32 %34 to i64
%40 = call i32 @fread(i8** %38, i32 1, i32 %34, i32* %17)
%41 = icmp eq i32 %40, %34
br i1 %41, label %45, label %63
42: ; preds = %31
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @.str.7, i64 0, i64 0))
%44 = call i32 @exit(i32 -1)
unreachable
45: ; preds = %37, %59
%46 = phi i32 [ %60, %59 ], [ 0, %37 ]
br label %47
47: ; preds = %45, %52
%48 = phi i64 [ %49, %52 ], [ %39, %45 ]
%49 = add nsw i64 %48, -1
%50 = trunc i64 %48 to i32
%51 = icmp sgt i32 %50, 0
br i1 %51, label %52, label %59
52: ; preds = %47
%53 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 %49
%54 = call i32 @fwrite(i8* %53, i32 1, i32 1, i32* %26)
%55 = icmp eq i32 %54, 1
br i1 %55, label %47, label %56
56: ; preds = %52
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i8* %6)
%58 = call i32 @exit(i32 -1)
unreachable
59: ; preds = %47
%60 = add nuw nsw i32 %46, 1
%61 = call i32 @fread(i8** %38, i32 1, i32 %34, i32* %17)
%62 = icmp eq i32 %61, %34
br i1 %62, label %45, label %63
63: ; preds = %59, %37
%64 = phi i32 [ 0, %37 ], [ %60, %59 ]
%65 = phi i32 [ %40, %37 ], [ %61, %59 ]
%66 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 %65)
%68 = call i32 @fclose(i32* %17)
%69 = call i32 @fclose(i32* %26)
%70 = mul nsw i32 %64, %34
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0), i8* %6, i32 %70)
ret i32 0
}