#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 atoi(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int fwrite(char *, int, int, int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(char *, int, int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  FILE *fp;
  char *Buf, *a;
  int BufLen;
  int nbytes, fileLen;
  unsigned int checksum;
  int i;
  if (argc != 4) {
    printf("Usage: mkbl1 <source file> <destination file> <size> \n");
    return -1;
  }
  BufLen = atoi(argv[3]);
  Buf = (char *)malloc(BufLen);
  memset(Buf, 0x00, BufLen);
  fp = fopen(argv[1], "rb");
  if (fp == NULL) {
    printf("source file open error\n");
    free(Buf);
    return -1;
  }
  fseek(fp, 0L, SEEK_END);
  fileLen = ftell(fp);
  fseek(fp, 0L, SEEK_SET);
  if (BufLen > fileLen) {
    printf("Usage: unsupported size\n");
    free(Buf);
    fclose(fp);
    return -1;
  }
  nbytes = fread(Buf, 1, BufLen, fp);
  if (nbytes != BufLen) {
    printf("source file read error\n");
    free(Buf);
    fclose(fp);
    return -1;
  }
  fclose(fp);
  a = Buf;
  for (i = 0, checksum = 0; i < (14 * 1024) - 4; i++)
    checksum += (0x000000FF) & *a++;
  *((unsigned int *)a) = checksum;
  fp = fopen(argv[2], "wb");
  if (fp == NULL) {
    printf("destination file open error\n");
    free(Buf);
    return -1;
  }
  a = Buf;
  nbytes = fwrite(a, 1, BufLen, fp);
  if (nbytes != BufLen) {
    printf("destination file write error\n");
    free(Buf);
    fclose(fp);
    return -1;
  }
  free(Buf);
  fclose(fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
je     11e8 <main+0x38>
lea    0xe29(%rip),%rdi
call   1060 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1425 <main+0x275>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
call   1090 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x2c(%rbp),%edx
xor    %esi,%esi
call   1070 <memset@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe16(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1256 <main+0xa6>
lea    0xdfe(%rip),%rdi
call   1060 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1425 <main+0x275>
mov    -0x18(%rbp),%rdi
mov    0x2d87(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   10a0 <fseek@plt>
mov    -0x18(%rbp),%rdi
call   1080 <ftell@plt>
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2d55(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   10a0 <fseek@plt>
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jle    12c4 <main+0x114>
lea    0xdb1(%rip),%rdi
call   1060 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1425 <main+0x275>
mov    -0x20(%rbp),%rdi
mov    -0x2c(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fread@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
je     1312 <main+0x162>
lea    0xd7c(%rip),%rdi
call   1060 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1425 <main+0x275>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0x37fc,-0x3c(%rbp)
jge    1369 <main+0x1b9>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movsbl (%rax),%eax
and    $0xff,%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1331 <main+0x181>
mov    -0x38(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xd02(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    13b6 <main+0x206>
lea    0xcea(%rip),%rdi
call   1060 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1425 <main+0x275>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x2c(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   10d0 <fwrite@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
je     140c <main+0x25c>
lea    0xcba(%rip),%rdi
call   1060 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1425 <main+0x275>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
cmp    $0x4,%edi
jne    1241 <main+0x91>
mov    %rsi,%r14
mov    0x18(%rsi),%rdi
call   10c0 <atoi@plt>
mov    %eax,%r15d
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r15d,%edx
call   1070 <memset@plt>
mov    0x8(%r14),%rdi
lea    0xe0e(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     1252 <main+0xa2>
mov    %rax,%rbp
mov    0x2de2(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   10a0 <fseek@plt>
mov    %rbp,%rdi
call   1080 <ftell@plt>
mov    %eax,%r12d
mov    0x2db4(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   10a0 <fseek@plt>
cmp    %r12d,%r15d
jle    126b <main+0xbb>
lea    0xe1a(%rip),%rdi
jmp    13bb <main+0x20b>
lea    0xe3d(%rip),%rdi
call   1040 <puts@plt>
jmp    13d0 <main+0x220>
lea    0xe15(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
jmp    13d0 <main+0x220>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %r15d,%edx
mov    %rbp,%rcx
call   1050 <fread@plt>
cmp    %r15d,%eax
jne    139f <main+0x1ef>
mov    %rbp,%rdi
call   1060 <fclose@plt>
pxor   %xmm0,%xmm0
mov    $0x14,%eax
pxor   %xmm2,%xmm2
pxor   %xmm1,%xmm1
movd   -0x14(%rbx,%rax,1),%xmm4
movd   -0x10(%rbx,%rax,1),%xmm3
punpcklbw %xmm0,%xmm4
punpcklwd %xmm0,%xmm4
paddd  %xmm2,%xmm4
punpcklbw %xmm0,%xmm3
punpcklwd %xmm0,%xmm3
paddd  %xmm1,%xmm3
movd   -0xc(%rbx,%rax,1),%xmm5
movd   -0x8(%rbx,%rax,1),%xmm6
punpcklbw %xmm0,%xmm5
punpcklwd %xmm0,%xmm5
punpcklbw %xmm0,%xmm6
punpcklwd %xmm0,%xmm6
movd   -0x4(%rbx,%rax,1),%xmm2
movd   (%rbx,%rax,1),%xmm1
punpcklbw %xmm0,%xmm2
punpcklwd %xmm0,%xmm2
paddd  %xmm5,%xmm2
paddd  %xmm4,%xmm2
punpcklbw %xmm0,%xmm1
punpcklwd %xmm0,%xmm1
paddd  %xmm6,%xmm1
paddd  %xmm3,%xmm1
add    $0x18,%rax
cmp    $0x380c,%rax
jne    12a0 <main+0xf0>
paddd  %xmm2,%xmm1
pshufd $0xee,%xmm1,%xmm0
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%eax
movzbl 0x37f8(%rbx),%ecx
add    %eax,%ecx
movzbl 0x37f9(%rbx),%eax
add    %ecx,%eax
movzbl 0x37fa(%rbx),%ecx
add    %eax,%ecx
movzbl 0x37fb(%rbx),%eax
add    %ecx,%eax
mov    %eax,0x37fc(%rbx)
mov    0x10(%r14),%rdi
lea    0xc9d(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     13a8 <main+0x1f8>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %r15d,%edx
mov    %rax,%rcx
call   10d0 <fwrite@plt>
cmp    %r15d,%eax
jne    13b4 <main+0x204>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1060 <fclose@plt>
xor    %eax,%eax
jmp    13d5 <main+0x225>
lea    0xc99(%rip),%rdi
jmp    13bb <main+0x20b>
lea    0xc74(%rip),%rdi
jmp    1259 <main+0xa9>
lea    0xc4b(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1060 <fclose@plt>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [55 x i8] c"Usage: mkbl1 <source file> <destination file> <size> \0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [24 x i8] c"source file open error\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.3 = [25 x i8] c"Usage: unsupported size\0A\00"
@.str.4 = [24 x i8] c"source file read error\0A\00"
@.str.5 = [3 x i8] c"wb\00"
@.str.6 = [29 x i8] c"destination file open error\0A\00"
@.str.7 = [30 x i8] c"destination file write error\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 4
br i1 %15, label %16, label %18
16: ; preds = %2
%17 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %123
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 3
%21 = load i8*, i8** %20
%22 = call i32 @atoi(i8* %21)
store i32 %22, i32* %9
%23 = load i32, i32* %9
%24 = call i64 @malloc(i32 %23)
%25 = inttoptr i64 %24 to i8*
store i8* %25, i8** %7
%26 = load i8*, i8** %7
%27 = load i32, i32* %9
%28 = call i32 @memset(i8* %26, i32 0, i32 %27)
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = call i32* @fopen(i8* %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %32, i32** %6
%33 = load i32*, i32** %6
%34 = icmp eq i32* %33, null
br i1 %34, label %35, label %39
35: ; preds = %18
%36 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%37 = load i8*, i8** %7
%38 = call i32 @free(i8* %37)
store i32 -1, i32* %3
br label %123
39: ; preds = %18
%40 = load i32*, i32** %6
%41 = load i32, i32* @SEEK_END
%42 = call i32 @fseek(i32* %40, i64 0, i32 %41)
%43 = load i32*, i32** %6
%44 = call i32 @ftell(i32* %43)
store i32 %44, i32* %11
%45 = load i32*, i32** %6
%46 = load i32, i32* @SEEK_SET
%47 = call i32 @fseek(i32* %45, i64 0, i32 %46)
%48 = load i32, i32* %9
%49 = load i32, i32* %11
%50 = icmp sgt i32 %48, %49
br i1 %50, label %51, label %57
51: ; preds = %39
%52 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%53 = load i8*, i8** %7
%54 = call i32 @free(i8* %53)
%55 = load i32*, i32** %6
%56 = call i32 @fclose(i32* %55)
store i32 -1, i32* %3
br label %123
57: ; preds = %39
%58 = load i8*, i8** %7
%59 = load i32, i32* %9
%60 = load i32*, i32** %6
%61 = call i32 @fread(i8* %58, i32 1, i32 %59, i32* %60)
store i32 %61, i32* %10
%62 = load i32, i32* %10
%63 = load i32, i32* %9
%64 = icmp ne i32 %62, %63
br i1 %64, label %65, label %71
65: ; preds = %57
%66 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%67 = load i8*, i8** %7
%68 = call i32 @free(i8* %67)
%69 = load i32*, i32** %6
%70 = call i32 @fclose(i32* %69)
store i32 -1, i32* %3
br label %123
71: ; preds = %57
%72 = load i32*, i32** %6
%73 = call i32 @fclose(i32* %72)
%74 = load i8*, i8** %7
store i8* %74, i8** %8
store i32 0, i32* %13
store i32 0, i32* %12
br label %75
75: ; preds = %86, %71
%76 = load i32, i32* %13
%77 = icmp slt i32 %76, 14332
br i1 %77, label %78, label %89
78: ; preds = %75
%79 = load i8*, i8** %8
%80 = getelementptr inbounds i8, i8* %79, i32 1
store i8* %80, i8** %8
%81 = load i8, i8* %79
%82 = sext i8 %81 to i32
%83 = and i32 255, %82
%84 = load i32, i32* %12
%85 = add i32 %84, %83
store i32 %85, i32* %12
br label %86
86: ; preds = %78
%87 = load i32, i32* %13
%88 = add nsw i32 %87, 1
store i32 %88, i32* %13
br label %75
89: ; preds = %75
%90 = load i32, i32* %12
%91 = load i8*, i8** %8
%92 = bitcast i8* %91 to i32*
store i32 %90, i32* %92
%93 = load i8**, i8*** %5
%94 = getelementptr inbounds i8*, i8** %93, i64 2
%95 = load i8*, i8** %94
%96 = call i32* @fopen(i8* %95, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i32* %96, i32** %6
%97 = load i32*, i32** %6
%98 = icmp eq i32* %97, null
br i1 %98, label %99, label %103
99: ; preds = %89
%100 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
%101 = load i8*, i8** %7
%102 = call i32 @free(i8* %101)
store i32 -1, i32* %3
br label %123
103: ; preds = %89
%104 = load i8*, i8** %7
store i8* %104, i8** %8
%105 = load i8*, i8** %8
%106 = load i32, i32* %9
%107 = load i32*, i32** %6
%108 = call i32 @fwrite(i8* %105, i32 1, i32 %106, i32* %107)
store i32 %108, i32* %10
%109 = load i32, i32* %10
%110 = load i32, i32* %9
%111 = icmp ne i32 %109, %110
br i1 %111, label %112, label %118
112: ; preds = %103
%113 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%114 = load i8*, i8** %7
%115 = call i32 @free(i8* %114)
%116 = load i32*, i32** %6
%117 = call i32 @fclose(i32* %116)
store i32 -1, i32* %3
br label %123
118: ; preds = %103
%119 = load i8*, i8** %7
%120 = call i32 @free(i8* %119)
%121 = load i32*, i32** %6
%122 = call i32 @fclose(i32* %121)
store i32 0, i32* %3
br label %123
123: ; preds = %118, %112, %99, %65, %51, %35, %16
%124 = load i32, i32* %3
ret i32 %124
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"rb\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.5 = [3 x i8] c"wb\00"
@str = [29 x i8] c"destination file write error\00"
@str.8 = [28 x i8] c"destination file open error\00"
@str.9 = [23 x i8] c"source file read error\00"
@str.10 = [24 x i8] c"Usage: unsupported size\00"
@str.11 = [23 x i8] c"source file open error\00"
@str.12 = [54 x i8] c"Usage: mkbl1 <source file> <destination file> <size> \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 4
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.12, i64 0, i64 0))
br label %116
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 3
%8 = load i8*, i8** %7
%9 = tail call i32 @atoi(i8* %8)
%10 = tail call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
%12 = tail call i32 @memset(i8* %11, i32 0, i32 %9)
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i32* @fopen(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32* %15, null
br i1 %16, label %17, label %20
17: ; preds = %6
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.11, i64 0, i64 0))
%19 = tail call i32 @free(i8* %11)
br label %116
20: ; preds = %6
%21 = load i32, i32* @SEEK_END
%22 = tail call i32 @fseek(i32* %15, i64 0, i32 %21)
%23 = tail call i32 @ftell(i32* %15)
%24 = load i32, i32* @SEEK_SET
%25 = tail call i32 @fseek(i32* %15, i64 0, i32 %24)
%26 = icmp sgt i32 %9, %23
br i1 %26, label %27, label %31
27: ; preds = %20
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.10, i64 0, i64 0))
%29 = tail call i32 @free(i8* %11)
%30 = tail call i32 @fclose(i32* %15)
br label %116
31: ; preds = %20
%32 = tail call i32 @fread(i8* %11, i32 1, i32 %9, i32* %15)
%33 = icmp eq i32 %32, %9
br i1 %33, label %38, label %34
34: ; preds = %31
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.9, i64 0, i64 0))
%36 = tail call i32 @free(i8* %11)
%37 = tail call i32 @fclose(i32* %15)
br label %116
38: ; preds = %31
%39 = tail call i32 @fclose(i32* %15)
%40 = getelementptr i8, i8* %11, i64 14328
br label %41
41: ; preds = %41, %38
%42 = phi i64 [ 0, %38 ], [ %77, %41 ]
%43 = phi <4 x i32> [ zeroinitializer, %38 ], [ %75, %41 ]
%44 = phi <4 x i32> [ zeroinitializer, %38 ], [ %76, %41 ]
%45 = getelementptr i8, i8* %11, i64 %42
%46 = bitcast i8* %45 to <4 x i8>*
%47 = load <4 x i8>, <4 x i8>* %46
%48 = getelementptr i8, i8* %45, i64 4
%49 = bitcast i8* %48 to <4 x i8>*
%50 = load <4 x i8>, <4 x i8>* %49
%51 = zext <4 x i8> %47 to <4 x i32>
%52 = zext <4 x i8> %50 to <4 x i32>
%53 = add <4 x i32> %43, %51
%54 = add <4 x i32> %44, %52
%55 = add nuw nsw i64 %42, 8
%56 = getelementptr i8, i8* %11, i64 %55
%57 = bitcast i8* %56 to <4 x i8>*
%58 = load <4 x i8>, <4 x i8>* %57
%59 = getelementptr i8, i8* %56, i64 4
%60 = bitcast i8* %59 to <4 x i8>*
%61 = load <4 x i8>, <4 x i8>* %60
%62 = zext <4 x i8> %58 to <4 x i32>
%63 = zext <4 x i8> %61 to <4 x i32>
%64 = add <4 x i32> %53, %62
%65 = add <4 x i32> %54, %63
%66 = add nuw nsw i64 %42, 16
%67 = getelementptr i8, i8* %11, i64 %66
%68 = bitcast i8* %67 to <4 x i8>*
%69 = load <4 x i8>, <4 x i8>* %68
%70 = getelementptr i8, i8* %67, i64 4
%71 = bitcast i8* %70 to <4 x i8>*
%72 = load <4 x i8>, <4 x i8>* %71
%73 = zext <4 x i8> %69 to <4 x i32>
%74 = zext <4 x i8> %72 to <4 x i32>
%75 = add <4 x i32> %64, %73
%76 = add <4 x i32> %65, %74
%77 = add nuw nsw i64 %42, 24
%78 = icmp eq i64 %77, 14328
br i1 %78, label %79, label %41
79: ; preds = %41
%80 = add <4 x i32> %76, %75
%81 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %80)
%82 = getelementptr i8, i8* %11, i64 14329
%83 = load i8, i8* %40
%84 = zext i8 %83 to i32
%85 = add i32 %81, %84
%86 = getelementptr i8, i8* %11, i64 14330
%87 = load i8, i8* %82
%88 = zext i8 %87 to i32
%89 = add i32 %85, %88
%90 = getelementptr i8, i8* %11, i64 14331
%91 = load i8, i8* %86
%92 = zext i8 %91 to i32
%93 = add i32 %89, %92
%94 = load i8, i8* %90
%95 = zext i8 %94 to i32
%96 = add i32 %93, %95
%97 = getelementptr i8, i8* %11, i64 14332
%98 = bitcast i8* %97 to i32*
store i32 %96, i32* %98
%99 = getelementptr inbounds i8*, i8** %1, i64 2
%100 = load i8*, i8** %99
%101 = tail call i32* @fopen(i8* %100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%102 = icmp eq i32* %101, null
br i1 %102, label %103, label %106
103: ; preds = %79
%104 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.8, i64 0, i64 0))
%105 = tail call i32 @free(i8* %11)
br label %116
106: ; preds = %79
%107 = tail call i32 @fwrite(i8* %11, i32 1, i32 %9, i32* %101)
%108 = icmp eq i32 %107, %9
br i1 %108, label %113, label %109
109: ; preds = %106
%110 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%111 = tail call i32 @free(i8* %11)
%112 = tail call i32 @fclose(i32* %101)
br label %116
113: ; preds = %106
%114 = tail call i32 @free(i8* %11)
%115 = tail call i32 @fclose(i32* %101)
br label %116
116: ; preds = %113, %109, %103, %34, %27, %17, %4
%117 = phi i32 [ -1, %4 ], [ -1, %17 ], [ -1, %27 ], [ -1, %34 ], [ -1, %103 ], [ -1, %109 ], [ 0, %113 ]
ret i32 %117
}