#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 /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ exit(int);
scalar_t__ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
unsigned long fread(char *, int, unsigned long, int /*<<< orphan*/ *);
scalar_t__ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/);
unsigned long ftell(int /*<<< orphan*/ *);
scalar_t__ malloc(unsigned long);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
char *_icl_load_program_source(const char *filename, size_t *filesize) {
  if (!(filename != NULL && filesize != NULL)) {
    fprintf(
        stderr, "OpenCL Assertion failure in %s#%d:\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/klois/SAMPO/refs/heads/master/src/lib_icl.c",
        753);
    printf("Error input parameters");
    printf("\n");
    exit(-1);
  };
  FILE *fp = fopen(filename, "rb");
  if (!(fp != NULL)) {
    fprintf(
        stderr, "OpenCL Assertion failure in %s#%d:\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/klois/SAMPO/refs/heads/master/src/lib_icl.c",
        755);
    printf("Error opening kernel file");
    printf("\n");
    exit(-1);
  };
  if (!(fseek(fp, 0, SEEK_END) == 0)) {
    fprintf(
        stderr, "OpenCL Assertion failure in %s#%d:\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/klois/SAMPO/refs/heads/master/src/lib_icl.c",
        756);
    printf("Error seeking to end of file");
    printf("\n");
    exit(-1);
  };
  long unsigned int size = ftell(fp);
  if (!(fseek(fp, 0, SEEK_SET) == 0)) {
    fprintf(
        stderr, "OpenCL Assertion failure in %s#%d:\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/klois/SAMPO/refs/heads/master/src/lib_icl.c",
        758);
    printf("Error seeking to begin of file");
    printf("\n");
    exit(-1);
  };
  char *source = (char *)malloc(size + 1);
  if (!(source != NULL)) {
    fprintf(
        stderr, "OpenCL Assertion failure in %s#%d:\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/klois/SAMPO/refs/heads/master/src/lib_icl.c",
        760);
    printf("Error allocating space for program source");
    printf("\n");
    exit(-1);
  };
  if (!(fread(source, 1, size, fp) == size)) {
    fprintf(
        stderr, "OpenCL Assertion failure in %s#%d:\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/klois/SAMPO/refs/heads/master/src/lib_icl.c",
        761);
    printf("Error reading file");
    printf("\n");
    exit(-1);
  };
  source[size] = '\0';
  *filesize = size;
  if (!(fclose(fp) == 0)) {
    fprintf(
        stderr, "OpenCL Assertion failure in %s#%d:\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/klois/SAMPO/refs/heads/master/src/lib_icl.c",
        764);
    printf("Error closing the file");
    printf("\n");
    exit(-1);
  };
  return source;
}


x86 assembly (clang, -O0):
<_icl_load_program_source>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     11b6 <_icl_load_program_source+0x26>
cmpq   $0x0,-0x10(%rbp)
jne    11f9 <_icl_load_program_source+0x69>
mov    0x2e1b(%rip),%rax
mov    (%rax),%edi
lea    0xe3a(%rip),%rsi
lea    0xe57(%rip),%rdx
mov    $0x2f1,%ecx
call   1060 <fprintf@plt>
lea    0xecc(%rip),%rdi
call   1050 <printf@plt>
lea    0xe38(%rip),%rdi
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    -0x8(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    125b <_icl_load_program_source+0xcb>
mov    0x2db9(%rip),%rax
mov    (%rax),%edi
lea    0xdd8(%rip),%rsi
lea    0xdf5(%rip),%rdx
mov    $0x2f3,%ecx
call   1060 <fprintf@plt>
lea    0xe84(%rip),%rdi
call   1050 <printf@plt>
lea    0xdd6(%rip),%rdi
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    -0x18(%rbp),%rdi
mov    0x2d82(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1090 <fseek@plt>
cmp    $0x0,%rax
je     12bc <_icl_load_program_source+0x12c>
mov    0x2d58(%rip),%rax
mov    (%rax),%edi
lea    0xd77(%rip),%rsi
lea    0xd94(%rip),%rdx
mov    $0x2f4,%ecx
call   1060 <fprintf@plt>
lea    0xe3d(%rip),%rdi
call   1050 <printf@plt>
lea    0xd75(%rip),%rdi
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    -0x18(%rbp),%rdi
call   1070 <ftell@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2cfc(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1090 <fseek@plt>
cmp    $0x0,%rax
je     132a <_icl_load_program_source+0x19a>
mov    0x2cea(%rip),%rax
mov    (%rax),%edi
lea    0xd09(%rip),%rsi
lea    0xd26(%rip),%rdx
mov    $0x2f6,%ecx
call   1060 <fprintf@plt>
lea    0xdec(%rip),%rdi
call   1050 <printf@plt>
lea    0xd07(%rip),%rdi
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1389 <_icl_load_program_source+0x1f9>
mov    0x2c8b(%rip),%rax
mov    (%rax),%edi
lea    0xcaa(%rip),%rsi
lea    0xcc7(%rip),%rdx
mov    $0x2f8,%ecx
call   1060 <fprintf@plt>
lea    0xdac(%rip),%rdi
call   1050 <printf@plt>
lea    0xca8(%rip),%rdi
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
cmp    -0x20(%rbp),%rax
je     13ec <_icl_load_program_source+0x25c>
mov    0x2c28(%rip),%rax
mov    (%rax),%edi
lea    0xc47(%rip),%rsi
lea    0xc64(%rip),%rdx
mov    $0x2f9,%ecx
call   1060 <fprintf@plt>
lea    0xd73(%rip),%rdi
call   1050 <printf@plt>
lea    0xc45(%rip),%rdi
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
cmp    $0x0,%rax
je     1459 <_icl_load_program_source+0x2c9>
mov    0x2bbb(%rip),%rax
mov    (%rax),%edi
lea    0xbda(%rip),%rsi
lea    0xbf7(%rip),%rdx
mov    $0x2fc,%ecx
call   1060 <fprintf@plt>
lea    0xd19(%rip),%rdi
call   1050 <printf@plt>
lea    0xbd8(%rip),%rdi
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   10b0 <exit@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_icl_load_program_source>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
je     1271 <_icl_load_program_source+0xd1>
mov    %rsi,%r14
test   %rsi,%rsi
je     1271 <_icl_load_program_source+0xd1>
lea    0xefd(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     129e <_icl_load_program_source+0xfe>
mov    %rax,%r15
mov    0x2e0c(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
xor    %esi,%esi
call   10a0 <fseek@plt>
test   %rax,%rax
jne    12cb <_icl_load_program_source+0x12b>
mov    %r15,%rdi
call   1080 <ftell@plt>
mov    %rax,%rbx
mov    0x2dcd(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
xor    %esi,%esi
call   10a0 <fseek@plt>
test   %rax,%rax
jne    12f8 <_icl_load_program_source+0x158>
lea    0x1(%rbx),%rdi
call   1090 <malloc@plt>
test   %rax,%rax
je     1322 <_icl_load_program_source+0x182>
mov    %rax,%r12
mov    %rax,%rdi
mov    $0x1,%esi
mov    %rbx,%rdx
mov    %r15,%rcx
call   1040 <fread@plt>
cmp    %rbx,%rax
jne    134c <_icl_load_program_source+0x1ac>
movb   $0x0,(%r12,%rbx,1)
mov    %rbx,(%r14)
mov    %r15,%rdi
call   1050 <fclose@plt>
test   %rax,%rax
jne    1376 <_icl_load_program_source+0x1d6>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
mov    0x2d60(%rip),%rax
mov    (%rax),%edi
lea    0xd7f(%rip),%rsi
lea    0xd9c(%rip),%rdx
mov    $0x2f1,%ecx
call   1070 <fprintf@plt>
lea    0xe11(%rip),%rdi
jmp    139e <_icl_load_program_source+0x1fe>
mov    0x2d33(%rip),%rax
mov    (%rax),%edi
lea    0xd52(%rip),%rsi
lea    0xd6f(%rip),%rdx
mov    $0x2f3,%ecx
call   1070 <fprintf@plt>
lea    0xdfe(%rip),%rdi
jmp    139e <_icl_load_program_source+0x1fe>
mov    0x2d06(%rip),%rax
mov    (%rax),%edi
lea    0xd25(%rip),%rsi
lea    0xd42(%rip),%rdx
mov    $0x2f4,%ecx
call   1070 <fprintf@plt>
lea    0xdeb(%rip),%rdi
jmp    139e <_icl_load_program_source+0x1fe>
mov    0x2cd9(%rip),%rax
mov    (%rax),%edi
lea    0xcf8(%rip),%rsi
lea    0xd15(%rip),%rdx
mov    $0x2f6,%ecx
call   1070 <fprintf@plt>
lea    0xddb(%rip),%rdi
jmp    139e <_icl_load_program_source+0x1fe>
mov    0x2caf(%rip),%rax
mov    (%rax),%edi
lea    0xcce(%rip),%rsi
lea    0xceb(%rip),%rdx
mov    $0x2f8,%ecx
call   1070 <fprintf@plt>
lea    0xdd0(%rip),%rdi
jmp    139e <_icl_load_program_source+0x1fe>
mov    0x2c85(%rip),%rax
mov    (%rax),%edi
lea    0xca4(%rip),%rsi
lea    0xcc1(%rip),%rdx
mov    $0x2f9,%ecx
call   1070 <fprintf@plt>
lea    0xdd0(%rip),%rdi
jmp    139e <_icl_load_program_source+0x1fe>
mov    0x2c5b(%rip),%rax
mov    (%rax),%edi
lea    0xc7a(%rip),%rsi
lea    0xc97(%rip),%rdx
mov    $0x2fc,%ecx
call   1070 <fprintf@plt>
lea    0xdb9(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"OpenCL Assertion failure in %s#%d:\0A\00"
@.str.1 = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/klois/SAMPO/refs/heads/master/src/lib_icl.c\00"
@.str.2 = [23 x i8] c"Error input parameters\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [3 x i8] c"rb\00"
@.str.5 = [26 x i8] c"Error opening kernel file\00"
@SEEK_END = global i32 0
@.str.6 = [29 x i8] c"Error seeking to end of file\00"
@SEEK_SET = global i32 0
@.str.7 = [31 x i8] c"Error seeking to begin of file\00"
@.str.8 = [42 x i8] c"Error allocating space for program source\00"
@.str.9 = [19 x i8] c"Error reading file\00"
@.str.10 = [23 x i8] c"Error closing the file\00"
define i8* @_icl_load_program_source(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %3
store i64* %1, i64** %4
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i64*, i64** %4
%12 = icmp ne i64* %11, null
br i1 %12, label %19, label %13
13: ; preds = %10, %2
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 753)
%16 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%18 = call i32 @exit(i32 -1)
unreachable
19: ; preds = %10
%20 = load i8*, i8** %3
%21 = call i32* @fopen(i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %21, i32** %5
%22 = load i32*, i32** %5
%23 = icmp ne i32* %22, null
br i1 %23, label %30, label %24
24: ; preds = %19
%25 = load i32, i32* @stderr
%26 = call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 755)
%27 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%28 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%29 = call i32 @exit(i32 -1)
unreachable
30: ; preds = %19
%31 = load i32*, i32** %5
%32 = load i32, i32* @SEEK_END
%33 = call i64 @fseek(i32* %31, i32 0, i32 %32)
%34 = icmp eq i64 %33, 0
br i1 %34, label %41, label %35
35: ; preds = %30
%36 = load i32, i32* @stderr
%37 = call i32 @fprintf(i32 %36, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 756)
%38 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
%39 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%40 = call i32 @exit(i32 -1)
unreachable
41: ; preds = %30
%42 = load i32*, i32** %5
%43 = call i64 @ftell(i32* %42)
store i64 %43, i64* %6
%44 = load i32*, i32** %5
%45 = load i32, i32* @SEEK_SET
%46 = call i64 @fseek(i32* %44, i32 0, i32 %45)
%47 = icmp eq i64 %46, 0
br i1 %47, label %54, label %48
48: ; preds = %41
%49 = load i32, i32* @stderr
%50 = call i32 @fprintf(i32 %49, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 758)
%51 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0))
%52 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%53 = call i32 @exit(i32 -1)
unreachable
54: ; preds = %41
%55 = load i64, i64* %6
%56 = add i64 %55, 1
%57 = call i64 @malloc(i64 %56)
%58 = inttoptr i64 %57 to i8*
store i8* %58, i8** %7
%59 = load i8*, i8** %7
%60 = icmp ne i8* %59, null
br i1 %60, label %67, label %61
61: ; preds = %54
%62 = load i32, i32* @stderr
%63 = call i32 @fprintf(i32 %62, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 760)
%64 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
%65 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%66 = call i32 @exit(i32 -1)
unreachable
67: ; preds = %54
%68 = load i8*, i8** %7
%69 = load i64, i64* %6
%70 = load i32*, i32** %5
%71 = call i64 @fread(i8* %68, i32 1, i64 %69, i32* %70)
%72 = load i64, i64* %6
%73 = icmp eq i64 %71, %72
br i1 %73, label %80, label %74
74: ; preds = %67
%75 = load i32, i32* @stderr
%76 = call i32 @fprintf(i32 %75, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 761)
%77 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0))
%78 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%79 = call i32 @exit(i32 -1)
unreachable
80: ; preds = %67
%81 = load i8*, i8** %7
%82 = load i64, i64* %6
%83 = getelementptr inbounds i8, i8* %81, i64 %82
store i8 0, i8* %83
%84 = load i64, i64* %6
%85 = load i64*, i64** %4
store i64 %84, i64* %85
%86 = load i32*, i32** %5
%87 = call i64 @fclose(i32* %86)
%88 = icmp eq i64 %87, 0
br i1 %88, label %95, label %89
89: ; preds = %80
%90 = load i32, i32* @stderr
%91 = call i32 @fprintf(i32 %90, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 764)
%92 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
%93 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%94 = call i32 @exit(i32 -1)
unreachable
95: ; preds = %80
%96 = load i8*, i8** %7
ret i8* %96
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"OpenCL Assertion failure in %s#%d:\0A\00"
@.str.1 = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/klois/SAMPO/refs/heads/master/src/lib_icl.c\00"
@.str.2 = [23 x i8] c"Error input parameters\00"
@.str.4 = [3 x i8] c"rb\00"
@.str.5 = [26 x i8] c"Error opening kernel file\00"
@SEEK_END = global i32 0
@.str.6 = [29 x i8] c"Error seeking to end of file\00"
@SEEK_SET = global i32 0
@.str.7 = [31 x i8] c"Error seeking to begin of file\00"
@.str.8 = [42 x i8] c"Error allocating space for program source\00"
@.str.9 = [19 x i8] c"Error reading file\00"
@.str.10 = [23 x i8] c"Error closing the file\00"
define i8* @_icl_load_program_source(i8* %0, i64* writeonly %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i64* %1, null
%5 = and i1 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 753)
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%10 = tail call i32 @putchar(i32 10)
%11 = tail call i32 @exit(i32 -1)
unreachable
12: ; preds = %2
%13 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32, i32* @stderr
%17 = tail call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 755)
%18 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%19 = tail call i32 @putchar(i32 10)
%20 = tail call i32 @exit(i32 -1)
unreachable
21: ; preds = %12
%22 = load i32, i32* @SEEK_END
%23 = tail call i64 @fseek(i32* %13, i32 0, i32 %22)
%24 = icmp eq i64 %23, 0
br i1 %24, label %31, label %25
25: ; preds = %21
%26 = load i32, i32* @stderr
%27 = tail call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 756)
%28 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
%29 = tail call i32 @putchar(i32 10)
%30 = tail call i32 @exit(i32 -1)
unreachable
31: ; preds = %21
%32 = tail call i64 @ftell(i32* %13)
%33 = load i32, i32* @SEEK_SET
%34 = tail call i64 @fseek(i32* %13, i32 0, i32 %33)
%35 = icmp eq i64 %34, 0
br i1 %35, label %42, label %36
36: ; preds = %31
%37 = load i32, i32* @stderr
%38 = tail call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 758)
%39 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0))
%40 = tail call i32 @putchar(i32 10)
%41 = tail call i32 @exit(i32 -1)
unreachable
42: ; preds = %31
%43 = add i64 %32, 1
%44 = tail call i64 @malloc(i64 %43)
%45 = inttoptr i64 %44 to i8*
%46 = icmp eq i64 %44, 0
br i1 %46, label %47, label %53
47: ; preds = %42
%48 = load i32, i32* @stderr
%49 = tail call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 760)
%50 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
%51 = tail call i32 @putchar(i32 10)
%52 = tail call i32 @exit(i32 -1)
unreachable
53: ; preds = %42
%54 = tail call i64 @fread(i8* %45, i32 1, i64 %32, i32* %13)
%55 = icmp eq i64 %54, %32
br i1 %55, label %62, label %56
56: ; preds = %53
%57 = load i32, i32* @stderr
%58 = tail call i32 @fprintf(i32 %57, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 761)
%59 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0))
%60 = tail call i32 @putchar(i32 10)
%61 = tail call i32 @exit(i32 -1)
unreachable
62: ; preds = %53
%63 = getelementptr inbounds i8, i8* %45, i64 %32
store i8 0, i8* %63
store i64 %32, i64* %1
%64 = tail call i64 @fclose(i32* %13)
%65 = icmp eq i64 %64, 0
br i1 %65, label %72, label %66
66: ; preds = %62
%67 = load i32, i32* @stderr
%68 = tail call i32 @fprintf(i32 %67, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 764)
%69 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
%70 = tail call i32 @putchar(i32 10)
%71 = tail call i32 @exit(i32 -1)
unreachable
72: ; preds = %62
ret i8* %45
}