#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 ssize_t;

/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int close(int);
int errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
char *malloc(int);
int open(char *, int /*<<< orphan*/);
int read(int, char *, int);
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *);
int /*<<< orphan*/ stderr;
int strlen(char const *);
char *readFile(const char *dir, const char *file) {
  char *path = malloc(sizeof(char) * (strlen(dir) + strlen(file) + 2));
  sprintf(path, "%s/%s", dir, file);
  int fd = open(path, O_RDONLY);
  free(path);
  if (fd == -1) {
    do {
      if (1) {
        fprintf(stderr, "%s: %d: ",
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/CRUx-BPHC/crux-judge/refs/"
                "heads/development/src/server/contest/sandbox/terminate.c",
                66);
        fprintf(stderr, "open failed: errno: %d", errno);
        fprintf(stderr, "\n");
      }
    } while (0);
    return NULL;
  }
  char *buf = malloc(50);
  ssize_t bytes_read;
  if ((bytes_read = read(fd, buf, 50)) == -1) {
    do {
      if (1) {
        fprintf(stderr, "%s: %d: ",
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/CRUx-BPHC/crux-judge/refs/"
                "heads/development/src/server/contest/sandbox/terminate.c",
                73);
        fprintf(stderr, "read failed: errno: %d", errno);
        fprintf(stderr, "\n");
      }
    } while (0);
    if (close(fd) == -1) {
      do {
        if (1) {
          fprintf(stderr, "%s: %d: ",
                  "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/CRUx-BPHC/crux-judge/refs/"
                  "heads/development/src/server/contest/sandbox/terminate.c",
                  75);
          fprintf(stderr, "close failed: errno: %d", errno);
          fprintf(stderr, "\n");
        }
      } while (0);
    }
    if (buf != NULL) {
      free(buf);
    }
    return NULL;
  }
  buf[bytes_read - 1] = '\0';
  if (close(fd) == -1) {
    do {
      if (1) {
        fprintf(stderr, "%s: %d: ",
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/CRUx-BPHC/crux-judge/refs/"
                "heads/development/src/server/contest/sandbox/terminate.c",
                86);
        fprintf(stderr, "close failed: errno: %d", errno);
        fprintf(stderr, "\n");
      }
    } while (0);
    free(buf);
    return NULL;
  }
  return buf;
}


x86 assembly (clang, -O0):
<readFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
add    %ecx,%eax
add    $0x2,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xe2d(%rip),%rsi
call   10a0 <sprintf@plt>
mov    -0x20(%rbp),%rdi
mov    0x2e05(%rip),%rax
mov    (%rax),%esi
call   1090 <open@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
cmpl   $0xffffffff,-0x24(%rbp)
jne    126c <readFile+0xec>
jmp    1205 <readFile+0x85>
mov    0x2dcc(%rip),%rax
mov    (%rax),%edi
lea    0xdf1(%rip),%rsi
lea    0xdf3(%rip),%rdx
mov    $0x42,%ecx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2da9(%rip),%rax
mov    (%rax),%edi
mov    0x2d98(%rip),%rax
mov    (%rax),%edx
lea    0xe7b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2d89(%rip),%rax
mov    (%rax),%edi
lea    0xe7b(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movq   $0x0,-0x8(%rbp)
jmp    142b <readFile+0x2ab>
mov    $0x32,%edi
call   1080 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    $0x32,%edx
call   1060 <read@plt>
mov    %eax,-0x34(%rbp)
cmp    $0xffffffff,%eax
jne    138c <readFile+0x20c>
jmp    129c <readFile+0x11c>
mov    0x2d35(%rip),%rax
mov    (%rax),%edi
lea    0xd5a(%rip),%rsi
lea    0xd5c(%rip),%rdx
mov    $0x49,%ecx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2d12(%rip),%rax
mov    (%rax),%edi
mov    0x2d01(%rip),%rax
mov    (%rax),%edx
lea    0xdfd(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2cf2(%rip),%rax
mov    (%rax),%edi
lea    0xde4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x24(%rbp),%edi
call   1050 <close@plt>
cmp    $0xffffffff,%eax
jne    136b <readFile+0x1eb>
jmp    130c <readFile+0x18c>
mov    0x2cc5(%rip),%rax
mov    (%rax),%edi
lea    0xcea(%rip),%rsi
lea    0xcec(%rip),%rdx
mov    $0x4b,%ecx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2ca2(%rip),%rax
mov    (%rax),%edi
mov    0x2c91(%rip),%rax
mov    (%rax),%edx
lea    0xda4(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2c82(%rip),%rax
mov    (%rax),%edi
lea    0xd74(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    136b <readFile+0x1eb>
cmpq   $0x0,-0x30(%rbp)
je     137f <readFile+0x1ff>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    142b <readFile+0x2ab>
mov    -0x30(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x24(%rbp),%edi
call   1050 <close@plt>
cmp    $0xffffffff,%eax
jne    1423 <readFile+0x2a3>
jmp    13b3 <readFile+0x233>
mov    0x2c1e(%rip),%rax
mov    (%rax),%edi
lea    0xc43(%rip),%rsi
lea    0xc45(%rip),%rdx
mov    $0x56,%ecx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2bfb(%rip),%rax
mov    (%rax),%edi
mov    0x2bea(%rip),%rax
mov    (%rax),%edx
lea    0xcfd(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2bdb(%rip),%rax
mov    (%rax),%edi
lea    0xccd(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    142b <readFile+0x2ab>
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readFile>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbp
call   1040 <strlen@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%rbx,%rax,1),%edi
add    $0x2,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
mov    %rbp,%rdx
mov    %r14,%rcx
call   10a0 <sprintf@plt>
mov    0x2e22(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1090 <open@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
cmp    $0xffffffff,%ebp
je     1273 <readFile+0xf3>
mov    $0x32,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,%edi
mov    %rax,%rsi
mov    $0x32,%edx
call   1060 <read@plt>
cmp    $0xffffffff,%eax
je     12c9 <readFile+0x149>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %ebp,%edi
call   1050 <close@plt>
cmp    $0xffffffff,%eax
jne    1376 <readFile+0x1f6>
mov    0x2db2(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xdd6(%rip),%rsi
lea    0xdd8(%rip),%rdx
mov    $0x56,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x0(%rbp),%edi
mov    0x2d83(%rip),%rax
mov    (%rax),%edx
lea    0xe96(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xe6c(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    136c <readFile+0x1ec>
mov    0x2d5e(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xd82(%rip),%rsi
lea    0xd84(%rip),%rdx
xor    %ebx,%ebx
mov    $0x42,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x0(%rbp),%edi
mov    0x2d2d(%rip),%rax
mov    (%rax),%edx
lea    0xe10(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xe16(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    1376 <readFile+0x1f6>
mov    0x2d08(%rip),%r14
mov    (%r14),%edi
lea    0xd2c(%rip),%rsi
lea    0xd2e(%rip),%rdx
mov    $0x49,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%r14),%edi
mov    0x2cd9(%rip),%r15
mov    (%r15),%edx
lea    0xdd4(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%r14),%edi
lea    0xdc1(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %ebp,%edi
call   1050 <close@plt>
cmp    $0xffffffff,%eax
jne    1367 <readFile+0x1e7>
mov    (%r14),%edi
lea    0xcd7(%rip),%rsi
lea    0xcd9(%rip),%rdx
mov    $0x4b,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%r14),%edi
mov    (%r15),%edx
lea    0xd9d(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%r14),%edi
lea    0xd73(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
test   %rbx,%rbx
je     1374 <readFile+0x1f4>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str.1 = [9 x i8] c"%s: %d: \00"
@.str.2 = [173 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CRUx-BPHC/crux-judge/refs/heads/development/src/server/contest/sandbox/terminate.c\00"
@.str.3 = [23 x i8] c"open failed: errno: %d\00"
@errno = global i32 0
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [23 x i8] c"read failed: errno: %d\00"
@.str.6 = [24 x i8] c"close failed: errno: %d\00"
define i8* @readFile(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%10 = load i8*, i8** %4
%11 = call i32 @strlen(i8* %10)
%12 = load i8*, i8** %5
%13 = call i32 @strlen(i8* %12)
%14 = add nsw i32 %11, %13
%15 = add nsw i32 %14, 2
%16 = sext i32 %15 to i64
%17 = mul i64 1, %16
%18 = trunc i64 %17 to i32
%19 = call i8* @malloc(i32 %18)
store i8* %19, i8** %6
%20 = load i8*, i8** %6
%21 = load i8*, i8** %4
%22 = load i8*, i8** %5
%23 = call i32 @sprintf(i8* %20, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %21, i8* %22)
%24 = load i8*, i8** %6
%25 = load i32, i32* @O_RDONLY
%26 = call i32 @open(i8* %24, i32 %25)
store i32 %26, i32* %7
%27 = load i8*, i8** %6
%28 = call i32 @free(i8* %27)
%29 = load i32, i32* %7
%30 = icmp eq i32 %29, -1
br i1 %30, label %31, label %41
31: ; preds = %2
br label %32
32: ; preds = %31
%33 = load i32, i32* @stderr
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.2, i64 0, i64 0), i32 66)
%35 = load i32, i32* @stderr
%36 = load i32, i32* @errno
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %36)
%38 = load i32, i32* @stderr
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %40
40: ; preds = %32
store i8* null, i8** %3
br label %100
41: ; preds = %2
%42 = call i8* @malloc(i32 50)
store i8* %42, i8** %8
%43 = load i32, i32* %7
%44 = load i8*, i8** %8
%45 = call i32 @read(i32 %43, i8* %44, i32 50)
store i32 %45, i32* %9
%46 = icmp eq i32 %45, -1
br i1 %46, label %47, label %77
47: ; preds = %41
br label %48
48: ; preds = %47
%49 = load i32, i32* @stderr
%50 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.2, i64 0, i64 0), i32 73)
%51 = load i32, i32* @stderr
%52 = load i32, i32* @errno
%53 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %52)
%54 = load i32, i32* @stderr
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %56
56: ; preds = %48
%57 = load i32, i32* %7
%58 = call i32 @close(i32 %57)
%59 = icmp eq i32 %58, -1
br i1 %59, label %60, label %70
60: ; preds = %56
br label %61
61: ; preds = %60
%62 = load i32, i32* @stderr
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.2, i64 0, i64 0), i32 75)
%64 = load i32, i32* @stderr
%65 = load i32, i32* @errno
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 %65)
%67 = load i32, i32* @stderr
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %69
69: ; preds = %61
br label %70
70: ; preds = %69, %56
%71 = load i8*, i8** %8
%72 = icmp ne i8* %71, null
br i1 %72, label %73, label %76
73: ; preds = %70
%74 = load i8*, i8** %8
%75 = call i32 @free(i8* %74)
br label %76
76: ; preds = %73, %70
store i8* null, i8** %3
br label %100
77: ; preds = %41
%78 = load i8*, i8** %8
%79 = load i32, i32* %9
%80 = sub nsw i32 %79, 1
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8, i8* %78, i64 %81
store i8 0, i8* %82
%83 = load i32, i32* %7
%84 = call i32 @close(i32 %83)
%85 = icmp eq i32 %84, -1
br i1 %85, label %86, label %98
86: ; preds = %77
br label %87
87: ; preds = %86
%88 = load i32, i32* @stderr
%89 = call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.2, i64 0, i64 0), i32 86)
%90 = load i32, i32* @stderr
%91 = load i32, i32* @errno
%92 = call i32 (i32, i8*, ...) @fprintf(i32 %90, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 %91)
%93 = load i32, i32* @stderr
%94 = call i32 (i32, i8*, ...) @fprintf(i32 %93, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %95
95: ; preds = %87
%96 = load i8*, i8** %8
%97 = call i32 @free(i8* %96)
store i8* null, i8** %3
br label %100
98: ; preds = %77
%99 = load i8*, i8** %8
store i8* %99, i8** %3
br label %100
100: ; preds = %98, %95, %76, %40
%101 = load i8*, i8** %3
ret i8* %101
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str.1 = [9 x i8] c"%s: %d: \00"
@.str.2 = [173 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CRUx-BPHC/crux-judge/refs/heads/development/src/server/contest/sandbox/terminate.c\00"
@.str.3 = [23 x i8] c"open failed: errno: %d\00"
@errno = global i32 0
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [23 x i8] c"read failed: errno: %d\00"
@.str.6 = [24 x i8] c"close failed: errno: %d\00"
define noalias i8* @readFile(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = add i32 %3, 2
%6 = add i32 %5, %4
%7 = tail call i8* @malloc(i32 %6)
%8 = tail call i32 @sprintf(i8* dereferenceable(1) %7, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%9 = load i32, i32* @O_RDONLY
%10 = tail call i32 @open(i8* %7, i32 %9)
%11 = tail call i32 @free(i8* %7)
%12 = icmp eq i32 %10, -1
br i1 %12, label %13, label %21
13: ; preds = %2
%14 = load i32, i32* @stderr
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.2, i64 0, i64 0), i32 66)
%16 = load i32, i32* @stderr
%17 = load i32, i32* @errno
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = load i32, i32* @stderr
%20 = tail call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %62
21: ; preds = %2
%22 = tail call dereferenceable_or_null(50) i8* @malloc(i32 50)
%23 = tail call i32 @read(i32 %10, i8* %22, i32 50)
%24 = icmp eq i32 %23, -1
br i1 %24, label %25, label %47
25: ; preds = %21
%26 = load i32, i32* @stderr
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.2, i64 0, i64 0), i32 73)
%28 = load i32, i32* @stderr
%29 = load i32, i32* @errno
%30 = tail call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %29)
%31 = load i32, i32* @stderr
%32 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%33 = tail call i32 @close(i32 %10)
%34 = icmp eq i32 %33, -1
br i1 %34, label %35, label %43
35: ; preds = %25
%36 = load i32, i32* @stderr
%37 = tail call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.2, i64 0, i64 0), i32 75)
%38 = load i32, i32* @stderr
%39 = load i32, i32* @errno
%40 = tail call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 %39)
%41 = load i32, i32* @stderr
%42 = tail call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %43
43: ; preds = %35, %25
%44 = icmp eq i8* %22, null
br i1 %44, label %62, label %45
45: ; preds = %43
%46 = tail call i32 @free(i8* %22)
br label %62
47: ; preds = %21
%48 = add nsw i32 %23, -1
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8, i8* %22, i64 %49
store i8 0, i8* %50
%51 = tail call i32 @close(i32 %10)
%52 = icmp eq i32 %51, -1
br i1 %52, label %53, label %62
53: ; preds = %47
%54 = load i32, i32* @stderr
%55 = tail call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.2, i64 0, i64 0), i32 86)
%56 = load i32, i32* @stderr
%57 = load i32, i32* @errno
%58 = tail call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 %57)
%59 = load i32, i32* @stderr
%60 = tail call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%61 = tail call i32 @free(i8* %22)
br label %62
62: ; preds = %53, %45, %43, %47, %13
%63 = phi i8* [ null, %13 ], [ null, %53 ], [ null, %45 ], [ null, %43 ], [ %22, %47 ]
ret i8* %63
}