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

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ *alloc_wide_string(char *, int *);
char *calloc(int, int);
int errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char const *, char *);
char *strerror(int);
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
char *strtok(char *, char *);
wchar_t *readcharsetfile(const char *charfilename, const char *charsetname,
                         int *r_is_unicode) {
  FILE *optr;
  char *temp;
  char *chars;
  char *charset = NULL;
  wchar_t *wcharset = NULL;
  char buff[512];
  errno = 0;
  memset(buff, 0, sizeof(buff));
  if ((optr = fopen(charfilename, "r")) == NULL) {
    fprintf(stderr, "readcharset: File %s could not be opened\n", charfilename);
    fprintf(stderr, "The problem is = %s\n", strerror(errno));
    exit(EXIT_FAILURE);
  } else {
    while (fgets(buff, (int)sizeof(buff), optr) != NULL) {
      temp = strtok(buff, " ");
      if (strcmp(charsetname, temp) == 0) {
        chars = strtok(NULL, "[");
        if ((chars = strtok(NULL, "\n")) != NULL) {
          charset = calloc(strlen(chars), sizeof(char));
          if (charset == NULL) {
            fprintf(stderr, "readcharset: can't allocate memory for charset\n");
            exit(EXIT_FAILURE);
          }
          if (strncmp(&chars[(strlen(chars) - 1)], "]", 1) == 0)
            memcpy(charset, chars, strlen(chars) - 1);
          else
            memcpy(charset, chars, strlen(chars) - 2);
          wcharset = alloc_wide_string(charset, r_is_unicode);
          free(charset);
        }
        break;
      }
    }
    if (fclose(optr) != 0) {
      fprintf(stderr, "readcharset: fclose returned error number = %d\n",
              errno);
      fprintf(stderr, "The problem is = %s\n", strerror(errno));
      exit(EXIT_FAILURE);
    }
  }
  return wcharset;
}


x86 assembly (clang, -O0):
<readcharsetfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x280,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
mov    0x2dba(%rip),%rax
movl   $0x0,(%rax)
lea    -0x240(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1070 <memset@plt>
mov    -0x8(%rbp),%rdi
lea    0xdbe(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    12b2 <readcharsetfile+0xc2>
mov    0x2d84(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xd99(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    0x2d69(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x244(%rbp)
mov    0x2d52(%rip),%rax
mov    (%rax),%edi
call   1110 <strerror@plt>
mov    -0x244(%rbp),%edi
mov    %rax,%rdx
lea    0xd8f(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    0x2d25(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
jmp    12b7 <readcharsetfile+0xc7>
lea    -0x240(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x200,%esi
call   1080 <fgets@plt>
cmp    $0x0,%rax
je     1454 <readcharsetfile+0x264>
lea    -0x240(%rbp),%rdi
lea    0xd5d(%rip),%rsi
call   10f0 <strtok@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    144f <readcharsetfile+0x25f>
xor    %eax,%eax
mov    %eax,%edi
lea    0xd34(%rip),%rsi
call   10f0 <strtok@plt>
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xd82(%rip),%rsi
call   10f0 <strtok@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
je     144a <readcharsetfile+0x25a>
mov    -0x30(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    137f <readcharsetfile+0x18f>
mov    0x2c7f(%rip),%rax
mov    (%rax),%edi
lea    0xcdb(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    0x2c58(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    -0x30(%rbp),%rax
mov    %rax,-0x250(%rbp)
mov    -0x30(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x250(%rbp),%rdi
sub    $0x1,%eax
cltq
add    %rax,%rdi
lea    0xccc(%rip),%rsi
mov    $0x1,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    13f9 <readcharsetfile+0x209>
mov    -0x38(%rbp),%rax
mov    %rax,-0x260(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x258(%rbp)
mov    -0x30(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x260(%rbp),%rdi
mov    -0x258(%rbp),%rsi
mov    %eax,%edx
sub    $0x1,%edx
call   10c0 <memcpy@plt>
jmp    1430 <readcharsetfile+0x240>
mov    -0x38(%rbp),%rax
mov    %rax,-0x270(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x268(%rbp)
mov    -0x30(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x270(%rbp),%rdi
mov    -0x268(%rbp),%rsi
mov    %eax,%edx
sub    $0x2,%edx
call   10c0 <memcpy@plt>
mov    -0x38(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   10d0 <alloc_wide_string@plt>
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
jmp    1454 <readcharsetfile+0x264>
jmp    12b7 <readcharsetfile+0xc7>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
cmp    $0x0,%rax
je     14c9 <readcharsetfile+0x2d9>
mov    0x2b72(%rip),%rax
mov    (%rax),%edi
mov    0x2b61(%rip),%rax
mov    (%rax),%edx
lea    0xbf7(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    0x2b52(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x274(%rbp)
mov    0x2b3b(%rip),%rax
mov    (%rax),%edi
call   1110 <strerror@plt>
mov    -0x274(%rbp),%edi
mov    %rax,%rdx
lea    0xb78(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    0x2b0e(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
jmp    14ce <readcharsetfile+0x2de>
mov    -0x40(%rbp),%rax
add    $0x280,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readcharsetfile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x208,%rsp
mov    %rdx,%r14
mov    %rsi,%r13
mov    %rdi,%rbx
mov    0x2dc7(%rip),%rax
movl   $0x0,(%rax)
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1070 <memset@plt>
lea    0xdd3(%rip),%rsi
mov    %rbx,%rdi
call   10e0 <fopen@plt>
test   %rax,%rax
je     1346 <readcharsetfile+0x156>
mov    %rax,%r12
mov    %rsp,%rbx
xor    %r15d,%r15d
lea    0xdf3(%rip),%rbp
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x200,%esi
mov    %r12,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     1324 <readcharsetfile+0x134>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10f0 <strtok@plt>
mov    %r13,%rdi
mov    %rax,%rsi
call   10a0 <strcmp@plt>
test   %rax,%rax
jne    1250 <readcharsetfile+0x60>
lea    0xdb8(%rip),%rsi
xor    %r15d,%r15d
xor    %edi,%edi
call   10f0 <strtok@plt>
lea    0xe09(%rip),%rsi
xor    %edi,%edi
call   10f0 <strtok@plt>
test   %rax,%rax
je     1324 <readcharsetfile+0x134>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <strlen@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1090 <calloc@plt>
test   %rax,%rax
je     13bb <readcharsetfile+0x1cb>
mov    %rax,%r13
mov    %rbx,%rdi
call   1060 <strlen@plt>
cltq
lea    (%rax,%rbx,1),%rdi
add    $0xffffffffffffffff,%rdi
lea    0xd91(%rip),%rsi
mov    $0x1,%edx
call   1040 <strncmp@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
call   1060 <strlen@plt>
cmp    $0x1,%rbp
adc    $0x0,%eax
lea    -0x2(%rax),%edx
mov    %r13,%rdi
mov    %rbx,%rsi
call   10c0 <memcpy@plt>
mov    %r13,%rdi
mov    %r14,%rsi
call   10d0 <alloc_wide_string@plt>
mov    %rax,%r15
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1050 <fclose@plt>
test   %rax,%rax
jne    136f <readcharsetfile+0x17f>
mov    %r15,%rax
add    $0x208,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c93(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xcab(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    0x0(%rbp),%ebx
mov    0x2c6d(%rip),%rax
mov    (%rax),%edi
jmp    1395 <readcharsetfile+0x1a5>
mov    0x2c6a(%rip),%rbx
mov    (%rbx),%edi
mov    0x2c59(%rip),%rbp
mov    0x0(%rbp),%edx
lea    0xcee(%rip),%rsi
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    (%rbx),%ebx
mov    0x0(%rbp),%edi
call   1110 <strerror@plt>
lea    0xc8b(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    0x2c1c(%rip),%rax
mov    (%rax),%edi
call   1100 <exit@plt>
mov    0x2c1e(%rip),%rax
mov    (%rax),%edi
lea    0xc7a(%rip),%rsi
xor    %eax,%eax
call   10b0 <fprintf@plt>
jmp    13ad <readcharsetfile+0x1bd>

LLVM IR (-O0):
@errno = global i32 0
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [42 x i8] c"readcharset: File %s could not be opened\0A\00"
@.str.2 = [21 x i8] c"The problem is = %s\0A\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [2 x i8] c" \00"
@.str.4 = [2 x i8] c"[\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [48 x i8] c"readcharset: can't allocate memory for charset\0A\00"
@.str.7 = [2 x i8] c"]\00"
@.str.8 = [48 x i8] c"readcharset: fclose returned error number = %d\0A\00"
define i32* @readcharsetfile(i8* %0, i8* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32*
%12 = alloca [512 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
store i8* null, i8** %10
store i32* null, i32** %11
store i32 0, i32* @errno
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%14 = call i32 @memset(i8* %13, i32 0, i32 512)
%15 = load i8*, i8** %4
%16 = call i32* @fopen(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %16, i32** %7
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %28
18: ; preds = %3
%19 = load i32, i32* @stderr
%20 = load i8*, i8** %4
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* %20)
%22 = load i32, i32* @stderr
%23 = load i32, i32* @errno
%24 = call i8* @strerror(i32 %23)
%25 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %24)
%26 = load i32, i32* @EXIT_FAILURE
%27 = call i32 @exit(i32 %26)
unreachable
28: ; preds = %3
br label %29
29: ; preds = %86, %28
%30 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%31 = load i32*, i32** %7
%32 = call i32* @fgets(i8* %30, i32 512, i32* %31)
%33 = icmp ne i32* %32, null
br i1 %33, label %34, label %87
34: ; preds = %29
%35 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%36 = call i8* @strtok(i8* %35, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* %36, i8** %8
%37 = load i8*, i8** %5
%38 = load i8*, i8** %8
%39 = call i64 @strcmp(i8* %37, i8* %38)
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %86
41: ; preds = %34
%42 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i8* %42, i8** %9
%43 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i8* %43, i8** %9
%44 = icmp ne i8* %43, null
br i1 %44, label %45, label %85
45: ; preds = %41
%46 = load i8*, i8** %9
%47 = call i32 @strlen(i8* %46)
%48 = call i8* @calloc(i32 %47, i32 1)
store i8* %48, i8** %10
%49 = load i8*, i8** %10
%50 = icmp eq i8* %49, null
br i1 %50, label %51, label %56
51: ; preds = %45
%52 = load i32, i32* @stderr
%53 = call i32 (i32, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%54 = load i32, i32* @EXIT_FAILURE
%55 = call i32 @exit(i32 %54)
unreachable
56: ; preds = %45
%57 = load i8*, i8** %9
%58 = load i8*, i8** %9
%59 = call i32 @strlen(i8* %58)
%60 = sub nsw i32 %59, 1
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i8, i8* %57, i64 %61
%63 = call i64 @strncmp(i8* %62, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i32 1)
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %72
65: ; preds = %56
%66 = load i8*, i8** %10
%67 = load i8*, i8** %9
%68 = load i8*, i8** %9
%69 = call i32 @strlen(i8* %68)
%70 = sub nsw i32 %69, 1
%71 = call i32 @memcpy(i8* %66, i8* %67, i32 %70)
br label %79
72: ; preds = %56
%73 = load i8*, i8** %10
%74 = load i8*, i8** %9
%75 = load i8*, i8** %9
%76 = call i32 @strlen(i8* %75)
%77 = sub nsw i32 %76, 2
%78 = call i32 @memcpy(i8* %73, i8* %74, i32 %77)
br label %79
79: ; preds = %72, %65
%80 = load i8*, i8** %10
%81 = load i32*, i32** %6
%82 = call i32* @alloc_wide_string(i8* %80, i32* %81)
store i32* %82, i32** %11
%83 = load i8*, i8** %10
%84 = call i32 @free(i8* %83)
br label %85
85: ; preds = %79, %41
br label %87
86: ; preds = %34
br label %29
87: ; preds = %85, %29
%88 = load i32*, i32** %7
%89 = call i64 @fclose(i32* %88)
%90 = icmp ne i64 %89, 0
br i1 %90, label %91, label %101
91: ; preds = %87
%92 = load i32, i32* @stderr
%93 = load i32, i32* @errno
%94 = call i32 (i32, i8*, ...) @fprintf(i32 %92, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i32 %93)
%95 = load i32, i32* @stderr
%96 = load i32, i32* @errno
%97 = call i8* @strerror(i32 %96)
%98 = call i32 (i32, i8*, ...) @fprintf(i32 %95, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %97)
%99 = load i32, i32* @EXIT_FAILURE
%100 = call i32 @exit(i32 %99)
unreachable
101: ; preds = %87
br label %102
102: ; preds = %101
%103 = load i32*, i32** %11
ret i32* %103
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [42 x i8] c"readcharset: File %s could not be opened\0A\00"
@.str.2 = [21 x i8] c"The problem is = %s\0A\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [2 x i8] c" \00"
@.str.4 = [2 x i8] c"[\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [48 x i8] c"readcharset: can't allocate memory for charset\0A\00"
@.str.7 = [2 x i8] c"]\00"
@.str.8 = [48 x i8] c"readcharset: fclose returned error number = %d\0A\00"
define i32* @readcharsetfile(i8* %0, i8* %1, i32* %2) {
%4 = alloca [512 x i8]
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
store i32 0, i32* @errno
%6 = call i32 @memset(i8* %5, i32 0, i32 512)
%7 = call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %18
9: ; preds = %3
%10 = load i32, i32* @stderr
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%12 = load i32, i32* @stderr
%13 = load i32, i32* @errno
%14 = call i8* @strerror(i32 %13)
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %14)
%16 = load i32, i32* @EXIT_FAILURE
%17 = call i32 @exit(i32 %16)
unreachable
18: ; preds = %3, %21
%19 = call i32* @fgets(i8* %5, i32 512, i32* %7)
%20 = icmp eq i32* %19, null
br i1 %20, label %51, label %21
21: ; preds = %18
%22 = call i8* @strtok(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%23 = call i64 @strcmp(i8* %1, i8* %22)
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %18
25: ; preds = %21
%26 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%27 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%28 = icmp eq i8* %27, null
br i1 %28, label %51, label %29
29: ; preds = %25
%30 = call i32 @strlen(i8* %27)
%31 = call i8* @calloc(i32 %30, i32 1)
%32 = icmp eq i8* %31, null
br i1 %32, label %33, label %38
33: ; preds = %29
%34 = load i32, i32* @stderr
%35 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%36 = load i32, i32* @EXIT_FAILURE
%37 = call i32 @exit(i32 %36)
unreachable
38: ; preds = %29
%39 = call i32 @strlen(i8* %27)
%40 = add nsw i32 %39, -1
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i8, i8* %27, i64 %41
%43 = call i64 @strncmp(i8* %42, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i32 1)
%44 = icmp eq i64 %43, 0
%45 = call i32 @strlen(i8* %27)
%46 = select i1 %44, i32 -1, i32 -2
%47 = add nsw i32 %45, %46
%48 = call i32 @memcpy(i8* %31, i8* %27, i32 %47)
%49 = call i32* @alloc_wide_string(i8* %31, i32* %2)
%50 = call i32 @free(i8* %31)
br label %51
51: ; preds = %18, %25, %38
%52 = phi i32* [ %49, %38 ], [ null, %25 ], [ null, %18 ]
%53 = call i64 @fclose(i32* %7)
%54 = icmp eq i64 %53, 0
br i1 %54, label %65, label %55
55: ; preds = %51
%56 = load i32, i32* @stderr
%57 = load i32, i32* @errno
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i32 %57)
%59 = load i32, i32* @stderr
%60 = load i32, i32* @errno
%61 = call i8* @strerror(i32 %60)
%62 = call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %61)
%63 = load i32, i32* @EXIT_FAILURE
%64 = call i32 @exit(i32 %63)
unreachable
65: ; preds = %51
ret i32* %52
}