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

/* Variables and functions */
scalar_t__ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ fread(int *, int, int, int /*<<< orphan*/ *);
int fwrite(int *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(int *, int *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int main(int argc, char **argv) {
  FILE *lut = NULL;
  char RGBAfile[1024];
  uint8_t lutBufferRGB[768];
  uint8_t lutBufferRGBA[1024];
  int32_t readBytes = 0, i = 0;
  printf("Reading LUT at %s\n", argv[1]);
  lut = fopen(argv[1], "rb");
  if (lut == NULL) {
    printf("Unable to open LUT at %s\n", argv[1]);
    return 0;
  }
  readBytes = (int32_t)fread(lutBufferRGB, 1, 768, lut);
  if (readBytes != 768) {
    printf("File %s does not have 768 bytes.\n", argv[1]);
    if (fclose(lut) != 0) {
      printf("Additionally, an error occured closing the file");
    }
    return 0;
  }
  memcpy(lutBufferRGBA, lutBufferRGB, 768);
  for (i = 768; i < 1024; i++)
    lutBufferRGBA[i] = 0x80;
  if (fclose(lut) != 0) {
    printf("Error closing LUT file.\n");
    return 0;
  }
  sprintf(RGBAfile, "%s.rgba", argv[1]);
  lut = fopen(RGBAfile, "w+b");
  if (lut == NULL) {
    printf("Unable to open RGBA file at %s\n", RGBAfile);
    return 0;
  }
  if (fwrite(lutBufferRGBA, 1, 1024, lut) != 1024) {
    printf("Unable to write RGBA file.\n");
    if (fclose(lut) != 0)
      printf("Additionally, an error occured closing the file.\n");
    return 0;
  }
  if (fclose(lut) != 0)
    printf("Error closing the RGBA file\n");
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2030,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x2024(%rbp)
movl   $0x0,-0x2028(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe49(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1200 <main+0x90>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13de <main+0x26e>
lea    -0x1020(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
mov    $0x300,%edx
call   1030 <fread@plt>
mov    %eax,-0x2024(%rbp)
cmpl   $0x300,-0x2024(%rbp)
je     1273 <main+0x103>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
cmp    $0x0,%rax
je     1267 <main+0xf7>
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13de <main+0x26e>
lea    -0x2020(%rbp),%rdi
lea    -0x1020(%rbp),%rsi
mov    $0x300,%edx
call   1060 <memcpy@plt>
movl   $0x300,-0x2028(%rbp)
cmpl   $0x400,-0x2028(%rbp)
jge    12cb <main+0x15b>
movslq -0x2028(%rbp),%rax
movl   $0x80,-0x2020(%rbp,%rax,4)
mov    -0x2028(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2028(%rbp)
jmp    1295 <main+0x125>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
cmp    $0x0,%rax
je     12f8 <main+0x188>
lea    0xd9d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13de <main+0x26e>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd8d(%rip),%rsi
call   1080 <sprintf@plt>
lea    -0x420(%rbp),%rdi
lea    0xd82(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1356 <main+0x1e6>
lea    -0x420(%rbp),%rsi
lea    0xd64(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13de <main+0x26e>
lea    -0x2020(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
mov    $0x400,%edx
call   1090 <fwrite@plt>
cmp    $0x400,%eax
je     13b6 <main+0x246>
lea    0xd45(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
cmp    $0x0,%rax
je     13aa <main+0x23a>
lea    0xd40(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13de <main+0x26e>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
cmp    $0x0,%rax
je     13d7 <main+0x267>
lea    0xd45(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2030,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x2000,%rsp
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
lea    0xe77(%rip),%rdi
xor    %r14d,%r14d
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x8(%rbx),%rdi
lea    0xe75(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     141e <main+0x29e>
mov    %rax,%rbp
lea    0x1400(%rsp),%rdi
mov    $0x1,%esi
mov    $0x300,%edx
mov    %rax,%rcx
call   1040 <fread@plt>
cmp    $0x300,%eax
jne    1432 <main+0x2b2>
mov    %rsp,%rdi
lea    0x1400(%rsp),%rsi
mov    $0x300,%edx
call   1070 <memcpy@plt>
movaps 0xe00(%rip),%xmm0
movaps %xmm0,0xc00(%rsp)
movaps %xmm0,0xc10(%rsp)
movaps %xmm0,0xc20(%rsp)
movaps %xmm0,0xc30(%rsp)
movaps %xmm0,0xc40(%rsp)
movaps %xmm0,0xc50(%rsp)
movaps %xmm0,0xc60(%rsp)
movaps %xmm0,0xc70(%rsp)
movaps %xmm0,0xc80(%rsp)
movaps %xmm0,0xc90(%rsp)
movaps %xmm0,0xca0(%rsp)
movaps %xmm0,0xcb0(%rsp)
movaps %xmm0,0xcc0(%rsp)
movaps %xmm0,0xcd0(%rsp)
movaps %xmm0,0xce0(%rsp)
movaps %xmm0,0xcf0(%rsp)
movaps %xmm0,0xd00(%rsp)
movaps %xmm0,0xd10(%rsp)
movaps %xmm0,0xd20(%rsp)
movaps %xmm0,0xd30(%rsp)
movaps %xmm0,0xd40(%rsp)
movaps %xmm0,0xd50(%rsp)
movaps %xmm0,0xd60(%rsp)
movaps %xmm0,0xd70(%rsp)
movaps %xmm0,0xd80(%rsp)
movaps %xmm0,0xd90(%rsp)
movaps %xmm0,0xda0(%rsp)
movaps %xmm0,0xdb0(%rsp)
movaps %xmm0,0xdc0(%rsp)
movaps %xmm0,0xdd0(%rsp)
movaps %xmm0,0xde0(%rsp)
movaps %xmm0,0xdf0(%rsp)
movaps %xmm0,0xe00(%rsp)
movaps %xmm0,0xe10(%rsp)
movaps %xmm0,0xe20(%rsp)
movaps %xmm0,0xe30(%rsp)
movaps %xmm0,0xe40(%rsp)
movaps %xmm0,0xe50(%rsp)
movaps %xmm0,0xe60(%rsp)
movaps %xmm0,0xe70(%rsp)
movaps %xmm0,0xe80(%rsp)
movaps %xmm0,0xe90(%rsp)
movaps %xmm0,0xea0(%rsp)
movaps %xmm0,0xeb0(%rsp)
movaps %xmm0,0xec0(%rsp)
movaps %xmm0,0xed0(%rsp)
movaps %xmm0,0xee0(%rsp)
movaps %xmm0,0xef0(%rsp)
movaps %xmm0,0xf00(%rsp)
movaps %xmm0,0xf10(%rsp)
movaps %xmm0,0xf20(%rsp)
movaps %xmm0,0xf30(%rsp)
movaps %xmm0,0xf40(%rsp)
movaps %xmm0,0xf50(%rsp)
movaps %xmm0,0xf60(%rsp)
movaps %xmm0,0xf70(%rsp)
movaps %xmm0,0xf80(%rsp)
movaps %xmm0,0xf90(%rsp)
movaps %xmm0,0xfa0(%rsp)
movaps %xmm0,0xfb0(%rsp)
movaps %xmm0,0xfc0(%rsp)
movaps %xmm0,0xfd0(%rsp)
movaps %xmm0,0xfe0(%rsp)
movaps %xmm0,0xff0(%rsp)
mov    %rbp,%rdi
call   1050 <fclose@plt>
test   %rax,%rax
je     1474 <main+0x2f4>
lea    0xd12(%rip),%rdi
call   1030 <puts@plt>
xor    %r14d,%r14d
jmp    1465 <main+0x2e5>
mov    0x8(%rbx),%rsi
lea    0xbfd(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1465 <main+0x2e5>
mov    0x8(%rbx),%rsi
lea    0xc03(%rip),%rdi
xor    %r14d,%r14d
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%rdi
call   1050 <fclose@plt>
test   %rax,%rax
je     1465 <main+0x2e5>
lea    0xc07(%rip),%rdi
xor    %r14d,%r14d
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14d,%eax
add    $0x2000,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    0x8(%rbx),%rdx
lea    0xc13(%rip),%rsi
lea    0x1000(%rsp),%rbx
mov    %rbx,%rdi
call   1090 <sprintf@plt>
lea    0xc04(%rip),%rsi
mov    %rbx,%rdi
call   1080 <fopen@plt>
test   %rax,%rax
je     14de <main+0x35e>
mov    %rax,%rbx
mov    %rsp,%rdi
mov    $0x1,%r14d
mov    $0x1,%esi
mov    $0x400,%edx
mov    %rax,%rcx
call   10a0 <fwrite@plt>
cmp    $0x400,%eax
jne    14f5 <main+0x375>
mov    %rbx,%rdi
call   1050 <fclose@plt>
test   %rax,%rax
je     1465 <main+0x2e5>
lea    0xbe2(%rip),%rdi
jmp    151c <main+0x39c>
lea    0xbb9(%rip),%rdi
xor    %r14d,%r14d
lea    0x1000(%rsp),%rsi
jmp    1429 <main+0x2a9>
lea    0xbde(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
xor    %r14d,%r14d
test   %rax,%rax
je     1465 <main+0x2e5>
lea    0xbd9(%rip),%rdi
call   1030 <puts@plt>
jmp    1465 <main+0x2e5>

LLVM IR (-O0):
@.str = [19 x i8] c"Reading LUT at %s\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [26 x i8] c"Unable to open LUT at %s\0A\00"
@.str.3 = [34 x i8] c"File %s does not have 768 bytes.\0A\00"
@.str.4 = [48 x i8] c"Additionally, an error occured closing the file\00"
@.str.5 = [25 x i8] c"Error closing LUT file.\0A\00"
@.str.6 = [8 x i8] c"%s.rgba\00"
@.str.7 = [4 x i8] c"w+b\00"
@.str.8 = [32 x i8] c"Unable to open RGBA file at %s\0A\00"
@.str.9 = [28 x i8] c"Unable to write RGBA file.\0A\00"
@.str.10 = [50 x i8] c"Additionally, an error occured closing the file.\0A\00"
@.str.11 = [29 x i8] c"Error closing the RGBA file\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca [1024 x i8]
%8 = alloca [768 x i32]
%9 = alloca [1024 x i32]
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* null, i32** %6
store i32 0, i32* %10
store i32 0, i32* %11
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call i32* @fopen(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %19, i32** %6
%20 = load i32*, i32** %6
%21 = icmp eq i32* %20, null
br i1 %21, label %22, label %27
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* %25)
store i32 0, i32* %3
br label %98
27: ; preds = %2
%28 = getelementptr inbounds [768 x i32], [768 x i32]* %8, i64 0, i64 0
%29 = load i32*, i32** %6
%30 = call i64 @fread(i32* %28, i32 1, i32 768, i32* %29)
%31 = trunc i64 %30 to i32
store i32 %31, i32* %10
%32 = load i32, i32* %10
%33 = icmp ne i32 %32, 768
br i1 %33, label %34, label %45
34: ; preds = %27
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8* %37)
%39 = load i32*, i32** %6
%40 = call i64 @fclose(i32* %39)
%41 = icmp ne i64 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %34
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0))
br label %44
44: ; preds = %42, %34
store i32 0, i32* %3
br label %98
45: ; preds = %27
%46 = getelementptr inbounds [1024 x i32], [1024 x i32]* %9, i64 0, i64 0
%47 = getelementptr inbounds [768 x i32], [768 x i32]* %8, i64 0, i64 0
%48 = call i32 @memcpy(i32* %46, i32* %47, i32 768)
store i32 768, i32* %11
br label %49
49: ; preds = %56, %45
%50 = load i32, i32* %11
%51 = icmp slt i32 %50, 1024
br i1 %51, label %52, label %59
52: ; preds = %49
%53 = load i32, i32* %11
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [1024 x i32], [1024 x i32]* %9, i64 0, i64 %54
store i32 128, i32* %55
br label %56
56: ; preds = %52
%57 = load i32, i32* %11
%58 = add nsw i32 %57, 1
store i32 %58, i32* %11
br label %49
59: ; preds = %49
%60 = load i32*, i32** %6
%61 = call i64 @fclose(i32* %60)
%62 = icmp ne i64 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %59
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %3
br label %98
65: ; preds = %59
%66 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%67 = load i8**, i8*** %5
%68 = getelementptr inbounds i8*, i8** %67, i64 1
%69 = load i8*, i8** %68
%70 = call i32 @sprintf(i8* %66, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %69)
%71 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%72 = call i32* @fopen(i8* %71, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
store i32* %72, i32** %6
%73 = load i32*, i32** %6
%74 = icmp eq i32* %73, null
br i1 %74, label %75, label %78
75: ; preds = %65
%76 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), i8* %76)
store i32 0, i32* %3
br label %98
78: ; preds = %65
%79 = getelementptr inbounds [1024 x i32], [1024 x i32]* %9, i64 0, i64 0
%80 = load i32*, i32** %6
%81 = call i32 @fwrite(i32* %79, i32 1, i32 1024, i32* %80)
%82 = icmp ne i32 %81, 1024
br i1 %82, label %83, label %91
83: ; preds = %78
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0))
%85 = load i32*, i32** %6
%86 = call i64 @fclose(i32* %85)
%87 = icmp ne i64 %86, 0
br i1 %87, label %88, label %90
88: ; preds = %83
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.10, i64 0, i64 0))
br label %90
90: ; preds = %88, %83
store i32 0, i32* %3
br label %98
91: ; preds = %78
%92 = load i32*, i32** %6
%93 = call i64 @fclose(i32* %92)
%94 = icmp ne i64 %93, 0
br i1 %94, label %95, label %97
95: ; preds = %91
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
br label %97
97: ; preds = %95, %91
store i32 1, i32* %3
br label %98
98: ; preds = %97, %90, %75, %63, %44, %22
%99 = load i32, i32* %3
ret i32 %99
}

LLVM IR (-O2):
@.str = [19 x i8] c"Reading LUT at %s\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [26 x i8] c"Unable to open LUT at %s\0A\00"
@.str.3 = [34 x i8] c"File %s does not have 768 bytes.\0A\00"
@.str.4 = [48 x i8] c"Additionally, an error occured closing the file\00"
@.str.6 = [8 x i8] c"%s.rgba\00"
@.str.7 = [4 x i8] c"w+b\00"
@.str.8 = [32 x i8] c"Unable to open RGBA file at %s\0A\00"
@str = [28 x i8] c"Error closing the RGBA file\00"
@str.12 = [27 x i8] c"Unable to write RGBA file.\00"
@str.13 = [49 x i8] c"Additionally, an error occured closing the file.\00"
@str.14 = [24 x i8] c"Error closing LUT file.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = alloca [768 x i32]
%5 = alloca [1024 x i32]
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%7 = bitcast [768 x i32]* %4 to i8*
%8 = bitcast [1024 x i32]* %5 to i8*
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8*, i8** %9
%13 = tail call i32* @fopen(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %18
15: ; preds = %2
%16 = load i8*, i8** %9
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* %16)
br label %186
18: ; preds = %2
%19 = getelementptr inbounds [768 x i32], [768 x i32]* %4, i64 0, i64 0
%20 = call i64 @fread(i32* %19, i32 1, i32 768, i32* %13)
%21 = trunc i64 %20 to i32
%22 = icmp eq i32 %21, 768
br i1 %22, label %30, label %23
23: ; preds = %18
%24 = load i8*, i8** %9
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8* %24)
%26 = tail call i64 @fclose(i32* %13)
%27 = icmp eq i64 %26, 0
br i1 %27, label %186, label %28
28: ; preds = %23
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0))
br label %186
30: ; preds = %18
%31 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 0
%32 = call i32 @memcpy(i32* %31, i32* %19, i32 768)
%33 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 768
%34 = bitcast i32* %33 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %34
%35 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 772
%36 = bitcast i32* %35 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %36
%37 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 776
%38 = bitcast i32* %37 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %38
%39 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 780
%40 = bitcast i32* %39 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %40
%41 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 784
%42 = bitcast i32* %41 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %42
%43 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 788
%44 = bitcast i32* %43 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %44
%45 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 792
%46 = bitcast i32* %45 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %46
%47 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 796
%48 = bitcast i32* %47 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %48
%49 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 800
%50 = bitcast i32* %49 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %50
%51 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 804
%52 = bitcast i32* %51 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %52
%53 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 808
%54 = bitcast i32* %53 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %54
%55 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 812
%56 = bitcast i32* %55 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %56
%57 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 816
%58 = bitcast i32* %57 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %58
%59 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 820
%60 = bitcast i32* %59 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %60
%61 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 824
%62 = bitcast i32* %61 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %62
%63 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 828
%64 = bitcast i32* %63 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %64
%65 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 832
%66 = bitcast i32* %65 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %66
%67 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 836
%68 = bitcast i32* %67 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %68
%69 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 840
%70 = bitcast i32* %69 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %70
%71 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 844
%72 = bitcast i32* %71 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %72
%73 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 848
%74 = bitcast i32* %73 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %74
%75 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 852
%76 = bitcast i32* %75 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %76
%77 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 856
%78 = bitcast i32* %77 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %78
%79 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 860
%80 = bitcast i32* %79 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %80
%81 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 864
%82 = bitcast i32* %81 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %82
%83 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 868
%84 = bitcast i32* %83 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %84
%85 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 872
%86 = bitcast i32* %85 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %86
%87 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 876
%88 = bitcast i32* %87 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %88
%89 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 880
%90 = bitcast i32* %89 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %90
%91 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 884
%92 = bitcast i32* %91 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %92
%93 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 888
%94 = bitcast i32* %93 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %94
%95 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 892
%96 = bitcast i32* %95 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %96
%97 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 896
%98 = bitcast i32* %97 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %98
%99 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 900
%100 = bitcast i32* %99 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %100
%101 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 904
%102 = bitcast i32* %101 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %102
%103 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 908
%104 = bitcast i32* %103 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %104
%105 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 912
%106 = bitcast i32* %105 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %106
%107 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 916
%108 = bitcast i32* %107 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %108
%109 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 920
%110 = bitcast i32* %109 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %110
%111 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 924
%112 = bitcast i32* %111 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %112
%113 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 928
%114 = bitcast i32* %113 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %114
%115 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 932
%116 = bitcast i32* %115 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %116
%117 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 936
%118 = bitcast i32* %117 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %118
%119 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 940
%120 = bitcast i32* %119 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %120
%121 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 944
%122 = bitcast i32* %121 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %122
%123 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 948
%124 = bitcast i32* %123 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %124
%125 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 952
%126 = bitcast i32* %125 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %126
%127 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 956
%128 = bitcast i32* %127 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %128
%129 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 960
%130 = bitcast i32* %129 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %130
%131 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 964
%132 = bitcast i32* %131 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %132
%133 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 968
%134 = bitcast i32* %133 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %134
%135 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 972
%136 = bitcast i32* %135 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %136
%137 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 976
%138 = bitcast i32* %137 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %138
%139 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 980
%140 = bitcast i32* %139 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %140
%141 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 984
%142 = bitcast i32* %141 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %142
%143 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 988
%144 = bitcast i32* %143 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %144
%145 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 992
%146 = bitcast i32* %145 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %146
%147 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 996
%148 = bitcast i32* %147 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %148
%149 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 1000
%150 = bitcast i32* %149 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %150
%151 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 1004
%152 = bitcast i32* %151 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %152
%153 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 1008
%154 = bitcast i32* %153 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %154
%155 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 1012
%156 = bitcast i32* %155 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %156
%157 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 1016
%158 = bitcast i32* %157 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %158
%159 = getelementptr inbounds [1024 x i32], [1024 x i32]* %5, i64 0, i64 1020
%160 = bitcast i32* %159 to <4 x i32>*
store <4 x i32> <i32 128, i32 128, i32 128, i32 128>, <4 x i32>* %160
%161 = call i64 @fclose(i32* %13)
%162 = icmp eq i64 %161, 0
br i1 %162, label %165, label %163
163: ; preds = %30
%164 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.14, i64 0, i64 0))
br label %186
165: ; preds = %30
%166 = load i8*, i8** %9
%167 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %166)
%168 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%169 = icmp eq i32* %168, null
br i1 %169, label %170, label %172
170: ; preds = %165
%171 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), i8* %6)
br label %186
172: ; preds = %165
%173 = call i32 @fwrite(i32* %31, i32 1, i32 1024, i32* %168)
%174 = icmp eq i32 %173, 1024
br i1 %174, label %181, label %175
175: ; preds = %172
%176 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.12, i64 0, i64 0))
%177 = call i64 @fclose(i32* %168)
%178 = icmp eq i64 %177, 0
br i1 %178, label %186, label %179
179: ; preds = %175
%180 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.13, i64 0, i64 0))
br label %186
181: ; preds = %172
%182 = call i64 @fclose(i32* %168)
%183 = icmp eq i64 %182, 0
br i1 %183, label %186, label %184
184: ; preds = %181
%185 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
br label %186
186: ; preds = %181, %184, %175, %179, %23, %28, %170, %163, %15
%187 = phi i32 [ 0, %15 ], [ 0, %163 ], [ 0, %170 ], [ 0, %28 ], [ 0, %23 ], [ 0, %179 ], [ 0, %175 ], [ 1, %184 ], [ 1, %181 ]
ret i32 %187
}