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

/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int atoi(char *);
char *calloc(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
void main(int argc, char *argv[]) {
  int blockSize = 512;
  int keySize = 2048;
  FILE *device;
  if (argc == 3 && (sizeof(argv[1]) / sizeof(char)) > 1 &&
      (sizeof(argv[2]) / sizeof(char)) > 1 && (atoi(argv[2]) % 512) == 0) {
    device = fopen(argv[1], "r");
    if (device == NULL) {
      printf("\nI got trouble opening the device %s\n", argv[1]);
      exit(EXIT_FAILURE);
    }
    keySize = atoi(argv[2]);
  } else if (argc == 2 && (sizeof(argv[1]) / sizeof(char)) > 1) {
    device = fopen(argv[1], "r");
    if (device == NULL) {
      printf("\nI got trouble opening the device %s\n", argv[1]);
      exit(EXIT_FAILURE);
    }
  } else {
    printf("\nUsage: \n");
    printf("\nKey Size Provided: \n");
    printf("\n\t\treadkey </path/to/device> <keysize> \n");
    printf("\nDefault key size: %d\n", keySize);
    printf("\n\t\treadkey </path/to/device>\n");
    exit(1);
  }
  int count;
  char *block;
  int numBlocks = 0;
  if (keySize % 512 != 0) {
    printf(
        "\nSory but key size is not multiple of block size, try again. TA.\n");
    exit(1);
  }
  fseek(device, 0, SEEK_END);
  long endOfDisk = ftell(device);
  rewind(device);
  long startFrom = endOfDisk - blockSize - keySize;
  block = calloc(keySize, sizeof(char));
  fseek(device, startFrom, SEEK_SET);
  fread(block, 1, keySize, device);
  for (count = 0; count < keySize; count++) {
    printf("%c", block[count]);
  }
  fclose(device);
  memset(block, 0, keySize);
  free(block);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x200,-0x14(%rbp)
movl   $0x800,-0x18(%rbp)
cmpl   $0x3,-0x4(%rbp)
jne    1261 <main+0xa1>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10d0 <atoi@plt>
mov    $0x200,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1261 <main+0xa1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdec(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    124c <main+0x8c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xdcb(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2d8b(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    130f <main+0x14f>
cmpl   $0x2,-0x4(%rbp)
jne    12b7 <main+0xf7>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd86(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    12b2 <main+0xf2>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xd65(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2d25(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
jmp    130a <main+0x14a>
lea    0xd6a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd66(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd6e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xd86(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
jmp    130f <main+0x14f>
movl   $0x0,-0x34(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x200,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1342 <main+0x182>
lea    0xd75(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
mov    -0x20(%rbp),%rdi
mov    0x2c9b(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   10b0 <fseek@plt>
mov    -0x20(%rbp),%rdi
call   10a0 <ftell@plt>
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rdi
call   1070 <rewind@plt>
mov    -0x40(%rbp),%rax
movslq -0x14(%rbp),%rcx
sub    %rcx,%rax
movslq -0x18(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x18(%rbp),%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    0x2c34(%rip),%rax
mov    (%rax),%edx
call   10b0 <fseek@plt>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fread@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    13fb <main+0x23b>
mov    -0x30(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xd02(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    13c7 <main+0x207>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%edx
xor    %esi,%esi
call   1080 <memset@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbp
cmp    $0x2,%edi
je     1245 <main+0x65>
cmp    $0x3,%edi
jne    131f <main+0x13f>
mov    0x10(%rbp),%rdi
call   10f0 <atoi@plt>
test   $0x1ff,%eax
jne    131f <main+0x13f>
mov    0x8(%rbp),%rdi
lea    0xde5(%rip),%rsi
call   10e0 <fopen@plt>
test   %rax,%rax
je     135f <main+0x17f>
mov    %rax,%r15
mov    0x10(%rbp),%rdi
call   10f0 <atoi@plt>
test   $0x1ff,%eax
jne    137f <main+0x19f>
mov    %eax,%r14d
jmp    1267 <main+0x87>
mov    0x8(%rbp),%rdi
lea    0xdb0(%rip),%rsi
call   10e0 <fopen@plt>
test   %rax,%rax
je     135f <main+0x17f>
mov    %rax,%r15
mov    $0x800,%r14d
mov    0x2d7a(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
xor    %esi,%esi
call   10d0 <fseek@plt>
mov    %r15,%rdi
call   10c0 <ftell@plt>
mov    %rax,%rbp
mov    %r15,%rdi
call   1090 <rewind@plt>
movslq %r14d,%rbx
mov    %rbx,%rax
neg    %rax
lea    (%rax,%rbp,1),%r12
add    $0xfffffffffffffe00,%r12
mov    %ebx,%edi
mov    $0x1,%esi
call   10b0 <calloc@plt>
mov    %rax,%r13
mov    0x2d21(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    %r12,%rsi
call   10d0 <fseek@plt>
mov    %r13,%rdi
mov    $0x1,%esi
mov    %ebx,%edx
mov    %r15,%rcx
call   1060 <fread@plt>
test   %ebx,%ebx
jle    12f4 <main+0x114>
mov    %r14d,%ebx
xor    %ebp,%ebp
nop
movsbl 0x0(%r13,%rbp,1),%edi
call   1040 <putchar@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    12e0 <main+0x100>
mov    %r15,%rdi
call   1070 <fclose@plt>
mov    %r13,%rdi
xor    %esi,%esi
mov    %r14d,%edx
call   10a0 <memset@plt>
mov    %r13,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
lea    0xd19(%rip),%rdi
call   1050 <puts@plt>
lea    0xd16(%rip),%rdi
call   1050 <puts@plt>
lea    0xd1f(%rip),%rdi
call   1050 <puts@plt>
lea    0xcde(%rip),%rdi
mov    $0x800,%esi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xd28(%rip),%rdi
jmp    1386 <main+0x1a6>
mov    0x8(%rbp),%rsi
lea    0xc98(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    0x2c58(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
lea    0xd1c(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%edi
call   1100 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [38 x i8] c"\0AI got trouble opening the device %s\0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [10 x i8] c"\0AUsage: \0A\00"
@.str.3 = [22 x i8] c"\0AKey Size Provided: \0A\00"
@.str.4 = [41 x i8] c"\0A\09\09readkey </path/to/device> <keysize> \0A\00"
@.str.5 = [23 x i8] c"\0ADefault key size: %d\0A\00"
@.str.6 = [30 x i8] c"\0A\09\09readkey </path/to/device>\0A\00"
@.str.7 = [66 x i8] c"\0ASory but key size is not multiple of block size, try again. TA.\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.8 = [3 x i8] c"%c\00"
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i64
%12 = alloca i64
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 512, i32* %5
store i32 2048, i32* %6
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 3
br i1 %14, label %15, label %41
15: ; preds = %2
%16 = load i8**, i8*** %4
%17 = getelementptr inbounds i8*, i8** %16, i64 2
%18 = load i8*, i8** %17
%19 = call i32 @atoi(i8* %18)
%20 = srem i32 %19, 512
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %41
22: ; preds = %15
%23 = load i8**, i8*** %4
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32* @fopen(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %26, i32** %7
%27 = load i32*, i32** %7
%28 = icmp eq i32* %27, null
br i1 %28, label %29, label %36
29: ; preds = %22
%30 = load i8**, i8*** %4
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %32)
%34 = load i32, i32* @EXIT_FAILURE
%35 = call i32 @exit(i32 %34)
unreachable
36: ; preds = %22
%37 = load i8**, i8*** %4
%38 = getelementptr inbounds i8*, i8** %37, i64 2
%39 = load i8*, i8** %38
%40 = call i32 @atoi(i8* %39)
store i32 %40, i32* %6
br label %68
41: ; preds = %15, %2
%42 = load i32, i32* %3
%43 = icmp eq i32 %42, 2
br i1 %43, label %44, label %59
44: ; preds = %41
%45 = load i8**, i8*** %4
%46 = getelementptr inbounds i8*, i8** %45, i64 1
%47 = load i8*, i8** %46
%48 = call i32* @fopen(i8* %47, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %48, i32** %7
%49 = load i32*, i32** %7
%50 = icmp eq i32* %49, null
br i1 %50, label %51, label %58
51: ; preds = %44
%52 = load i8**, i8*** %4
%53 = getelementptr inbounds i8*, i8** %52, i64 1
%54 = load i8*, i8** %53
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %54)
%56 = load i32, i32* @EXIT_FAILURE
%57 = call i32 @exit(i32 %56)
unreachable
58: ; preds = %44
br label %67
59: ; preds = %41
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
%63 = load i32, i32* %6
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %63)
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%66 = call i32 @exit(i32 1)
unreachable
67: ; preds = %58
br label %68
68: ; preds = %67, %36
store i32 0, i32* %10
%69 = load i32, i32* %6
%70 = srem i32 %69, 512
%71 = icmp ne i32 %70, 0
br i1 %71, label %72, label %75
72: ; preds = %68
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.7, i64 0, i64 0))
%74 = call i32 @exit(i32 1)
unreachable
75: ; preds = %68
%76 = load i32*, i32** %7
%77 = load i32, i32* @SEEK_END
%78 = call i32 @fseek(i32* %76, i64 0, i32 %77)
%79 = load i32*, i32** %7
%80 = call i64 @ftell(i32* %79)
store i64 %80, i64* %11
%81 = load i32*, i32** %7
%82 = call i32 @rewind(i32* %81)
%83 = load i64, i64* %11
%84 = load i32, i32* %5
%85 = sext i32 %84 to i64
%86 = sub nsw i64 %83, %85
%87 = load i32, i32* %6
%88 = sext i32 %87 to i64
%89 = sub nsw i64 %86, %88
store i64 %89, i64* %12
%90 = load i32, i32* %6
%91 = call i8* @calloc(i32 %90, i32 1)
store i8* %91, i8** %9
%92 = load i32*, i32** %7
%93 = load i64, i64* %12
%94 = load i32, i32* @SEEK_SET
%95 = call i32 @fseek(i32* %92, i64 %93, i32 %94)
%96 = load i8*, i8** %9
%97 = load i32, i32* %6
%98 = load i32*, i32** %7
%99 = call i32 @fread(i8* %96, i32 1, i32 %97, i32* %98)
store i32 0, i32* %8
br label %100
100: ; preds = %112, %75
%101 = load i32, i32* %8
%102 = load i32, i32* %6
%103 = icmp slt i32 %101, %102
br i1 %103, label %104, label %115
104: ; preds = %100
%105 = load i8*, i8** %9
%106 = load i32, i32* %8
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds i8, i8* %105, i64 %107
%109 = load i8, i8* %108
%110 = sext i8 %109 to i32
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 %110)
br label %112
112: ; preds = %104
%113 = load i32, i32* %8
%114 = add nsw i32 %113, 1
store i32 %114, i32* %8
br label %100
115: ; preds = %100
%116 = load i32*, i32** %7
%117 = call i32 @fclose(i32* %116)
%118 = load i8*, i8** %9
%119 = load i32, i32* %6
%120 = call i32 @memset(i8* %118, i32 0, i32 %119)
%121 = load i8*, i8** %9
%122 = call i32 @free(i8* %121)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [38 x i8] c"\0AI got trouble opening the device %s\0A\00"
@EXIT_FAILURE = global i32 0
@.str.5 = [23 x i8] c"\0ADefault key size: %d\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@str = [9 x i8] c"\0AUsage: \00"
@str.9 = [21 x i8] c"\0AKey Size Provided: \00"
@str.10 = [40 x i8] c"\0A\09\09readkey </path/to/device> <keysize> \00"
@str.11 = [29 x i8] c"\0A\09\09readkey </path/to/device>\00"
@str.12 = [65 x i8] c"\0ASory but key size is not multiple of block size, try again. TA.\00"
define void @main(i32 %0, i8** nocapture %1) {
switch i32 %0, label %29 [
i32 3, label %3
i32 2, label %19
]
3: ; preds = %2
%4 = getelementptr inbounds i8*, i8** %1, i64 2
%5 = load i8*, i8** %4
%6 = tail call i32 @atoi(i8* %5)
%7 = and i32 %6, 511
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %29
9: ; preds = %3
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32* @fopen(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %36
14: ; preds = %9
%15 = load i8*, i8** %10
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = load i32, i32* @EXIT_FAILURE
%18 = tail call i32 @exit(i32 %17)
unreachable
19: ; preds = %2
%20 = getelementptr inbounds i8*, i8** %1, i64 1
%21 = load i8*, i8** %20
%22 = tail call i32* @fopen(i8* %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%23 = icmp eq i32* %22, null
br i1 %23, label %24, label %44
24: ; preds = %19
%25 = load i8*, i8** %20
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %25)
%27 = load i32, i32* @EXIT_FAILURE
%28 = tail call i32 @exit(i32 %27)
unreachable
29: ; preds = %3, %2
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.9, i64 0, i64 0))
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.10, i64 0, i64 0))
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 2048)
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.11, i64 0, i64 0))
%35 = tail call i32 @exit(i32 1)
unreachable
36: ; preds = %9
%37 = load i8*, i8** %4
%38 = tail call i32 @atoi(i8* %37)
%39 = and i32 %38, 511
%40 = icmp eq i32 %39, 0
br i1 %40, label %44, label %41
41: ; preds = %36
%42 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.12, i64 0, i64 0))
%43 = tail call i32 @exit(i32 1)
unreachable
44: ; preds = %19, %36
%45 = phi i32 [ %38, %36 ], [ 2048, %19 ]
%46 = phi i32* [ %12, %36 ], [ %22, %19 ]
%47 = load i32, i32* @SEEK_END
%48 = tail call i32 @fseek(i32* %46, i64 0, i32 %47)
%49 = tail call i64 @ftell(i32* %46)
%50 = tail call i32 @rewind(i32* %46)
%51 = sext i32 %45 to i64
%52 = sub nsw i64 -512, %51
%53 = add i64 %52, %49
%54 = tail call i8* @calloc(i32 %45, i32 1)
%55 = load i32, i32* @SEEK_SET
%56 = tail call i32 @fseek(i32* %46, i64 %53, i32 %55)
%57 = tail call i32 @fread(i8* %54, i32 1, i32 %45, i32* %46)
%58 = icmp sgt i32 %45, 0
br i1 %58, label %59, label %69
59: ; preds = %44
%60 = zext i32 %45 to i64
br label %61
61: ; preds = %59, %61
%62 = phi i64 [ 0, %59 ], [ %67, %61 ]
%63 = getelementptr inbounds i8, i8* %54, i64 %62
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = tail call i32 @putchar(i32 %65)
%67 = add nuw nsw i64 %62, 1
%68 = icmp eq i64 %67, %60
br i1 %68, label %69, label %61
69: ; preds = %61, %44
%70 = tail call i32 @fclose(i32* %46)
%71 = tail call i32 @memset(i8* %54, i32 0, i32 %45)
%72 = tail call i32 @free(i8* %54)
ret void
}