#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;
  unsigned char src;
  char *Buf, *a;
  int BufLen;
  int nbytes, fileLen;
  unsigned int checksum = 0;
  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);
  for (i = 0; i < (14 * 1024) - 4; i++) {
    checksum += (unsigned char)(Buf[i]);
  }
  *(unsigned int *)(Buf + i) = 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    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x40(%rbp)
cmpl   $0x4,-0x8(%rbp)
je     11ef <main+0x3f>
lea    0xe22(%rip),%rdi
call   1060 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1417 <main+0x267>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%edi
call   1090 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x34(%rbp),%edx
xor    %esi,%esi
call   1070 <memset@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe0f(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    125d <main+0xad>
lea    0xdf7(%rip),%rdi
call   1060 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1417 <main+0x267>
mov    -0x18(%rbp),%rdi
mov    0x2d80(%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,-0x3c(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2d4e(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   10a0 <fseek@plt>
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jle    12cb <main+0x11b>
lea    0xdaa(%rip),%rdi
call   1060 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1417 <main+0x267>
mov    -0x28(%rbp),%rdi
mov    -0x34(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fread@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
je     1319 <main+0x169>
lea    0xd75(%rip),%rdi
call   1060 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1417 <main+0x267>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x37fc,-0x44(%rbp)
jge    1356 <main+0x1a6>
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
add    -0x40(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1329 <main+0x179>
mov    -0x40(%rbp),%edx
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %edx,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xd10(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    13a8 <main+0x1f8>
lea    0xcf8(%rip),%rdi
call   1060 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1417 <main+0x267>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   10d0 <fwrite@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
je     13fe <main+0x24e>
lea    0xcc8(%rip),%rdi
call   1060 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1417 <main+0x267>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%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 i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %13
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 4
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %127
19: ; preds = %2
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 3
%22 = load i8*, i8** %21
%23 = call i32 @atoi(i8* %22)
store i32 %23, i32* %10
%24 = load i32, i32* %10
%25 = call i64 @malloc(i32 %24)
%26 = inttoptr i64 %25 to i8*
store i8* %26, i8** %8
%27 = load i8*, i8** %8
%28 = load i32, i32* %10
%29 = call i32 @memset(i8* %27, i32 0, i32 %28)
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = call i32* @fopen(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %33, i32** %6
%34 = load i32*, i32** %6
%35 = icmp eq i32* %34, null
br i1 %35, label %36, label %40
36: ; preds = %19
%37 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%38 = load i8*, i8** %8
%39 = call i32 @free(i8* %38)
store i32 -1, i32* %3
br label %127
40: ; preds = %19
%41 = load i32*, i32** %6
%42 = load i32, i32* @SEEK_END
%43 = call i32 @fseek(i32* %41, i64 0, i32 %42)
%44 = load i32*, i32** %6
%45 = call i32 @ftell(i32* %44)
store i32 %45, i32* %12
%46 = load i32*, i32** %6
%47 = load i32, i32* @SEEK_SET
%48 = call i32 @fseek(i32* %46, i64 0, i32 %47)
%49 = load i32, i32* %10
%50 = load i32, i32* %12
%51 = icmp sgt i32 %49, %50
br i1 %51, label %52, label %58
52: ; preds = %40
%53 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%54 = load i8*, i8** %8
%55 = call i32 @free(i8* %54)
%56 = load i32*, i32** %6
%57 = call i32 @fclose(i32* %56)
store i32 -1, i32* %3
br label %127
58: ; preds = %40
%59 = load i8*, i8** %8
%60 = load i32, i32* %10
%61 = load i32*, i32** %6
%62 = call i32 @fread(i8* %59, i32 1, i32 %60, i32* %61)
store i32 %62, i32* %11
%63 = load i32, i32* %11
%64 = load i32, i32* %10
%65 = icmp ne i32 %63, %64
br i1 %65, label %66, label %72
66: ; preds = %58
%67 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%68 = load i8*, i8** %8
%69 = call i32 @free(i8* %68)
%70 = load i32*, i32** %6
%71 = call i32 @fclose(i32* %70)
store i32 -1, i32* %3
br label %127
72: ; preds = %58
%73 = load i32*, i32** %6
%74 = call i32 @fclose(i32* %73)
store i32 0, i32* %14
br label %75
75: ; preds = %87, %72
%76 = load i32, i32* %14
%77 = icmp slt i32 %76, 14332
br i1 %77, label %78, label %90
78: ; preds = %75
%79 = load i8*, i8** %8
%80 = load i32, i32* %14
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8, i8* %79, i64 %81
%83 = load i8, i8* %82
%84 = zext i8 %83 to i32
%85 = load i32, i32* %13
%86 = add i32 %85, %84
store i32 %86, i32* %13
br label %87
87: ; preds = %78
%88 = load i32, i32* %14
%89 = add nsw i32 %88, 1
store i32 %89, i32* %14
br label %75
90: ; preds = %75
%91 = load i32, i32* %13
%92 = load i8*, i8** %8
%93 = load i32, i32* %14
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds i8, i8* %92, i64 %94
%96 = bitcast i8* %95 to i32*
store i32 %91, i32* %96
%97 = load i8**, i8*** %5
%98 = getelementptr inbounds i8*, i8** %97, i64 2
%99 = load i8*, i8** %98
%100 = call i32* @fopen(i8* %99, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i32* %100, i32** %6
%101 = load i32*, i32** %6
%102 = icmp eq i32* %101, null
br i1 %102, label %103, label %107
103: ; preds = %90
%104 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
%105 = load i8*, i8** %8
%106 = call i32 @free(i8* %105)
store i32 -1, i32* %3
br label %127
107: ; preds = %90
%108 = load i8*, i8** %8
store i8* %108, i8** %9
%109 = load i8*, i8** %9
%110 = load i32, i32* %10
%111 = load i32*, i32** %6
%112 = call i32 @fwrite(i8* %109, i32 1, i32 %110, i32* %111)
store i32 %112, i32* %11
%113 = load i32, i32* %11
%114 = load i32, i32* %10
%115 = icmp ne i32 %113, %114
br i1 %115, label %116, label %122
116: ; preds = %107
%117 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%118 = load i8*, i8** %8
%119 = call i32 @free(i8* %118)
%120 = load i32*, i32** %6
%121 = call i32 @fclose(i32* %120)
store i32 -1, i32* %3
br label %127
122: ; preds = %107
%123 = load i8*, i8** %8
%124 = call i32 @free(i8* %123)
%125 = load i32*, i32** %6
%126 = call i32 @fclose(i32* %125)
store i32 0, i32* %3
br label %127
127: ; preds = %122, %116, %103, %66, %52, %36, %17
%128 = load i32, i32* %3
ret i32 %128
}

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)
br label %40
40: ; preds = %40, %38
%41 = phi i64 [ 0, %38 ], [ %76, %40 ]
%42 = phi <4 x i32> [ zeroinitializer, %38 ], [ %74, %40 ]
%43 = phi <4 x i32> [ zeroinitializer, %38 ], [ %75, %40 ]
%44 = getelementptr inbounds i8, i8* %11, i64 %41
%45 = bitcast i8* %44 to <4 x i8>*
%46 = load <4 x i8>, <4 x i8>* %45
%47 = getelementptr inbounds i8, i8* %44, i64 4
%48 = bitcast i8* %47 to <4 x i8>*
%49 = load <4 x i8>, <4 x i8>* %48
%50 = zext <4 x i8> %46 to <4 x i32>
%51 = zext <4 x i8> %49 to <4 x i32>
%52 = add <4 x i32> %42, %50
%53 = add <4 x i32> %43, %51
%54 = add nuw nsw i64 %41, 8
%55 = getelementptr inbounds i8, i8* %11, i64 %54
%56 = bitcast i8* %55 to <4 x i8>*
%57 = load <4 x i8>, <4 x i8>* %56
%58 = getelementptr inbounds i8, i8* %55, i64 4
%59 = bitcast i8* %58 to <4 x i8>*
%60 = load <4 x i8>, <4 x i8>* %59
%61 = zext <4 x i8> %57 to <4 x i32>
%62 = zext <4 x i8> %60 to <4 x i32>
%63 = add <4 x i32> %52, %61
%64 = add <4 x i32> %53, %62
%65 = add nuw nsw i64 %41, 16
%66 = getelementptr inbounds i8, i8* %11, i64 %65
%67 = bitcast i8* %66 to <4 x i8>*
%68 = load <4 x i8>, <4 x i8>* %67
%69 = getelementptr inbounds i8, i8* %66, i64 4
%70 = bitcast i8* %69 to <4 x i8>*
%71 = load <4 x i8>, <4 x i8>* %70
%72 = zext <4 x i8> %68 to <4 x i32>
%73 = zext <4 x i8> %71 to <4 x i32>
%74 = add <4 x i32> %63, %72
%75 = add <4 x i32> %64, %73
%76 = add nuw nsw i64 %41, 24
%77 = icmp eq i64 %76, 14328
br i1 %77, label %78, label %40
78: ; preds = %40
%79 = add <4 x i32> %75, %74
%80 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %79)
%81 = getelementptr inbounds i8, i8* %11, i64 14328
%82 = load i8, i8* %81
%83 = zext i8 %82 to i32
%84 = add i32 %80, %83
%85 = getelementptr inbounds i8, i8* %11, i64 14329
%86 = load i8, i8* %85
%87 = zext i8 %86 to i32
%88 = add i32 %84, %87
%89 = getelementptr inbounds i8, i8* %11, i64 14330
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = add i32 %88, %91
%93 = getelementptr inbounds i8, i8* %11, i64 14331
%94 = load i8, i8* %93
%95 = zext i8 %94 to i32
%96 = add i32 %92, %95
%97 = getelementptr inbounds 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 = %78
%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 = %78
%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
}