#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 */
char *calloc(scalar_t__, int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ split_root_suffix(char *, char **, char **);
int /*<<< orphan*/ sprintf(char *, char *, char *, int, ...);
scalar_t__ strlen(char *);
int main(int argc, char *argv[]) {
  FILE *infile, *outfiles[13];
  int ii, numrec = 0;
  char *outname, *root = NULL, *suffix = NULL;
  unsigned char buffer[49792 * 13];
  if (argc != 2) {
    printf("\n  Usage:  split_parkes_beams infilename\n\n");
    printf("  This routine splits all 13 beams from a Parkes Multibeam raw "
           "data file.\n\n");
    exit(0);
  }
  split_root_suffix(argv[1], &root, &suffix);
  if (suffix)
    outname = calloc(strlen(root) + strlen(suffix) + 5, 1);
  else
    outname = calloc(strlen(root) + 5, 1);
  for (ii = 0; ii < 13; ii++) {
    if (suffix)
      sprintf(outname, "%s_%02d.%s", root, ii + 1, suffix);
    else
      sprintf(outname, "%s_%02d", root, ii + 1);
    outfiles[ii] = fopen(outname, "wb");
  }
  free(outname);
  free(root);
  free(suffix);
  infile = fopen(argv[1], "rb");
  while (fread(buffer, 49792 * 13, 1, infile)) {
    for (ii = 0; ii < 13; ii++)
      fwrite(buffer + ii * 49792, 49792, 1, outfiles[ii]);
    numrec++;
  }
  fclose(infile);
  for (ii = 0; ii < 13; ii++)
    fclose(outfiles[ii]);
  printf("\nDone.  Split %d records.\n", numrec);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9e130,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x88(%rbp)
movq   $0x0,-0x98(%rbp)
movq   $0x0,-0xa0(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1216 <main+0x66>
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x98(%rbp),%rsi
lea    -0xa0(%rbp),%rdx
call   1090 <split_root_suffix@plt>
cmpq   $0x0,-0xa0(%rbp)
je     1282 <main+0xd2>
mov    -0x98(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,-0x9e128(%rbp)
mov    -0xa0(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x9e128(%rbp),%rdi
add    %rax,%rdi
add    $0x5,%rdi
mov    $0x1,%esi
call   1080 <calloc@plt>
mov    %rax,-0x90(%rbp)
jmp    12a6 <main+0xf6>
mov    -0x98(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,%rdi
add    $0x5,%rdi
mov    $0x1,%esi
call   1080 <calloc@plt>
mov    %rax,-0x90(%rbp)
movl   $0x0,-0x84(%rbp)
cmpl   $0xd,-0x84(%rbp)
jge    1357 <main+0x1a7>
cmpq   $0x0,-0xa0(%rbp)
je     12fc <main+0x14c>
mov    -0x90(%rbp),%rdi
mov    -0x98(%rbp),%rdx
mov    -0x84(%rbp),%ecx
add    $0x1,%ecx
mov    -0xa0(%rbp),%r8
lea    0xd87(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
jmp    1321 <main+0x171>
mov    -0x90(%rbp),%rdi
mov    -0x98(%rbp),%rdx
mov    -0x84(%rbp),%ecx
add    $0x1,%ecx
lea    0xd68(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
mov    -0x90(%rbp),%rdi
lea    0xd5b(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%rcx
movslq -0x84(%rbp),%rax
mov    %rcx,-0x80(%rbp,%rax,8)
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    12b0 <main+0x100>
mov    -0x90(%rbp),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa0(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd03(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
lea    -0x9e120(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x9e080,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
cmp    $0x0,%rax
je     1427 <main+0x277>
movl   $0x0,-0x84(%rbp)
cmpl   $0xd,-0x84(%rbp)
jge    1413 <main+0x263>
lea    -0x9e120(%rbp),%rdi
imul   $0xc280,-0x84(%rbp),%eax
cltq
add    %rax,%rdi
movslq -0x84(%rbp),%rax
mov    -0x80(%rbp,%rax,8),%rcx
mov    $0xc280,%esi
mov    $0x1,%edx
call   10d0 <fwrite@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    13c1 <main+0x211>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1393 <main+0x1e3>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x84(%rbp)
cmpl   $0xd,-0x84(%rbp)
jge    146c <main+0x2bc>
movslq -0x84(%rbp),%rax
mov    -0x80(%rbp,%rax,8),%rdi
call   1050 <fclose@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    143a <main+0x28a>
mov    -0x88(%rbp),%esi
lea    0xc17(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x9e108,%rsp
movq   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
cmp    $0x2,%edi
jne    1219 <main+0x59>
mov    %rsi,0x78(%rsp)
mov    0x8(%rsi),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   10a0 <split_root_suffix@plt>
mov    (%rsp),%rbp
mov    0x8(%rsp),%rdi
call   1070 <strlen@plt>
mov    %rax,%rbx
test   %rbp,%rbp
jne    1238 <main+0x78>
add    $0x5,%rbx
jmp    1247 <main+0x87>
lea    0xe14(%rip),%rdi
call   1040 <puts@plt>
lea    0xe32(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   10d0 <exit@plt>
mov    %rbp,%rdi
call   1070 <strlen@plt>
add    %rax,%rbx
add    $0x5,%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1090 <calloc@plt>
mov    %rax,%rbp
lea    0xdad(%rip),%r15
lea    0xdae(%rip),%r13
lea    0xd94(%rip),%r12
xor    %ebx,%ebx
jmp    1296 <main+0xd6>
mov    %r15,%rsi
mov    %r14d,%ecx
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
call   10b0 <fopen@plt>
mov    %rax,0x10(%rsp,%rbx,8)
mov    %r14,%rbx
cmp    $0xd,%r14
je     12ba <main+0xfa>
mov    (%rsp),%r8
lea    0x1(%rbx),%r14
mov    0x8(%rsp),%rdx
mov    %rbp,%rdi
test   %r8,%r8
je     1270 <main+0xb0>
mov    %r12,%rsi
mov    %r14d,%ecx
xor    %eax,%eax
call   10c0 <sprintf@plt>
jmp    127d <main+0xbd>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
mov    0x78(%rsp),%rax
mov    0x8(%rax),%rdi
lea    0xd31(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%r14
lea    0x80(%rsp),%rdi
mov    $0x9e080,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fread@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     14b9 <main+0x2f9>
lea    0x79980(%rsp),%r12
lea    0x85c00(%rsp),%r13
xor    %ebx,%ebx
lea    0x91e80(%rsp),%rbp
lea    0x80(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x10(%rsp),%rcx
mov    %r15,%rdi
mov    $0xc280,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
mov    0x18(%rsp),%rcx
lea    0xc300(%rsp),%rdi
mov    $0xc280,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
mov    0x20(%rsp),%rcx
lea    0x18580(%rsp),%rdi
mov    $0xc280,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
mov    0x28(%rsp),%rcx
lea    0x24800(%rsp),%rdi
mov    $0xc280,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
mov    0x30(%rsp),%rcx
lea    0x30a80(%rsp),%rdi
mov    $0xc280,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
mov    0x38(%rsp),%rcx
lea    0x3cd00(%rsp),%rdi
mov    $0xc280,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
mov    0x40(%rsp),%rcx
lea    0x48f80(%rsp),%rdi
mov    $0xc280,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
mov    0x48(%rsp),%rcx
lea    0x55200(%rsp),%rdi
mov    $0xc280,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
mov    0x50(%rsp),%rcx
lea    0x61480(%rsp),%rdi
mov    $0xc280,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
mov    0x58(%rsp),%rcx
lea    0x6d700(%rsp),%rdi
mov    $0xc280,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
mov    0x60(%rsp),%rcx
mov    %r12,%rdi
mov    $0xc280,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
mov    0x68(%rsp),%rcx
mov    %r13,%rdi
mov    $0xc280,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
mov    0x70(%rsp),%rcx
mov    %rbp,%rdi
mov    $0xc280,%esi
mov    $0x1,%edx
call   10e0 <fwrite@plt>
add    $0x1,%ebx
mov    %r15,%rdi
mov    $0x9e080,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1050 <fread@plt>
test   %rax,%rax
jne    1340 <main+0x180>
mov    %r14,%rdi
call   1060 <fclose@plt>
mov    0x10(%rsp),%rdi
call   1060 <fclose@plt>
mov    0x18(%rsp),%rdi
call   1060 <fclose@plt>
mov    0x20(%rsp),%rdi
call   1060 <fclose@plt>
mov    0x28(%rsp),%rdi
call   1060 <fclose@plt>
mov    0x30(%rsp),%rdi
call   1060 <fclose@plt>
mov    0x38(%rsp),%rdi
call   1060 <fclose@plt>
mov    0x40(%rsp),%rdi
call   1060 <fclose@plt>
mov    0x48(%rsp),%rdi
call   1060 <fclose@plt>
mov    0x50(%rsp),%rdi
call   1060 <fclose@plt>
mov    0x58(%rsp),%rdi
call   1060 <fclose@plt>
mov    0x60(%rsp),%rdi
call   1060 <fclose@plt>
mov    0x68(%rsp),%rdi
call   1060 <fclose@plt>
mov    0x70(%rsp),%rdi
call   1060 <fclose@plt>
lea    0xacf(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1080 <printf@plt>
xor    %edi,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"\0A Usage: split_parkes_beams infilename\0A\0A\00"
@.str.1 = [76 x i8] c" This routine splits all 13 beams from a Parkes Multibeam raw data file.\0A\0A\00"
@.str.2 = [11 x i8] c"%s_%02d.%s\00"
@.str.3 = [8 x i8] c"%s_%02d\00"
@.str.4 = [3 x i8] c"wb\00"
@.str.5 = [3 x i8] c"rb\00"
@.str.6 = [27 x i8] c"\0ADone. Split %d records.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca [13 x i32*]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca [647296 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
store i8* null, i8** %11
store i8* null, i8** %12
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 2
br i1 %15, label %16, label %20
16: ; preds = %2
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @exit(i32 0)
unreachable
20: ; preds = %2
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i32 @split_root_suffix(i8* %23, i8** %11, i8** %12)
%25 = load i8*, i8** %12
%26 = icmp ne i8* %25, null
br i1 %26, label %27, label %35
27: ; preds = %20
%28 = load i8*, i8** %11
%29 = call i64 @strlen(i8* %28)
%30 = load i8*, i8** %12
%31 = call i64 @strlen(i8* %30)
%32 = add nsw i64 %29, %31
%33 = add nsw i64 %32, 5
%34 = call i8* @calloc(i64 %33, i32 1)
store i8* %34, i8** %10
br label %40
35: ; preds = %20
%36 = load i8*, i8** %11
%37 = call i64 @strlen(i8* %36)
%38 = add nsw i64 %37, 5
%39 = call i8* @calloc(i64 %38, i32 1)
store i8* %39, i8** %10
br label %40
40: ; preds = %35, %27
store i32 0, i32* %8
br label %41
41: ; preds = %66, %40
%42 = load i32, i32* %8
%43 = icmp slt i32 %42, 13
br i1 %43, label %44, label %69
44: ; preds = %41
%45 = load i8*, i8** %12
%46 = icmp ne i8* %45, null
br i1 %46, label %47, label %54
47: ; preds = %44
%48 = load i8*, i8** %10
%49 = load i8*, i8** %11
%50 = load i32, i32* %8
%51 = add nsw i32 %50, 1
%52 = load i8*, i8** %12
%53 = call i32 (i8*, i8*, i8*, i32, ...) @sprintf(i8* %48, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %49, i32 %51, i8* %52)
br label %60
54: ; preds = %44
%55 = load i8*, i8** %10
%56 = load i8*, i8** %11
%57 = load i32, i32* %8
%58 = add nsw i32 %57, 1
%59 = call i32 (i8*, i8*, i8*, i32, ...) @sprintf(i8* %55, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %56, i32 %58)
br label %60
60: ; preds = %54, %47
%61 = load i8*, i8** %10
%62 = call i32* @fopen(i8* %61, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%63 = load i32, i32* %8
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [13 x i32*], [13 x i32*]* %7, i64 0, i64 %64
store i32* %62, i32** %65
br label %66
66: ; preds = %60
%67 = load i32, i32* %8
%68 = add nsw i32 %67, 1
store i32 %68, i32* %8
br label %41
69: ; preds = %41
%70 = load i8*, i8** %10
%71 = call i32 @free(i8* %70)
%72 = load i8*, i8** %11
%73 = call i32 @free(i8* %72)
%74 = load i8*, i8** %12
%75 = call i32 @free(i8* %74)
%76 = load i8**, i8*** %5
%77 = getelementptr inbounds i8*, i8** %76, i64 1
%78 = load i8*, i8** %77
%79 = call i32* @fopen(i8* %78, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i32* %79, i32** %6
br label %80
80: ; preds = %103, %69
%81 = getelementptr inbounds [647296 x i8], [647296 x i8]* %13, i64 0, i64 0
%82 = load i32*, i32** %6
%83 = call i64 @fread(i8* %81, i32 647296, i32 1, i32* %82)
%84 = icmp ne i64 %83, 0
br i1 %84, label %85, label %106
85: ; preds = %80
store i32 0, i32* %8
br label %86
86: ; preds = %100, %85
%87 = load i32, i32* %8
%88 = icmp slt i32 %87, 13
br i1 %88, label %89, label %103
89: ; preds = %86
%90 = getelementptr inbounds [647296 x i8], [647296 x i8]* %13, i64 0, i64 0
%91 = load i32, i32* %8
%92 = mul nsw i32 %91, 49792
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i8, i8* %90, i64 %93
%95 = load i32, i32* %8
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [13 x i32*], [13 x i32*]* %7, i64 0, i64 %96
%98 = load i32*, i32** %97
%99 = call i32 @fwrite(i8* %94, i32 49792, i32 1, i32* %98)
br label %100
100: ; preds = %89
%101 = load i32, i32* %8
%102 = add nsw i32 %101, 1
store i32 %102, i32* %8
br label %86
103: ; preds = %86
%104 = load i32, i32* %9
%105 = add nsw i32 %104, 1
store i32 %105, i32* %9
br label %80
106: ; preds = %80
%107 = load i32*, i32** %6
%108 = call i32 @fclose(i32* %107)
store i32 0, i32* %8
br label %109
109: ; preds = %118, %106
%110 = load i32, i32* %8
%111 = icmp slt i32 %110, 13
br i1 %111, label %112, label %121
112: ; preds = %109
%113 = load i32, i32* %8
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [13 x i32*], [13 x i32*]* %7, i64 0, i64 %114
%116 = load i32*, i32** %115
%117 = call i32 @fclose(i32* %116)
br label %118
118: ; preds = %112
%119 = load i32, i32* %8
%120 = add nsw i32 %119, 1
store i32 %120, i32* %8
br label %109
121: ; preds = %109
%122 = load i32, i32* %9
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i32 %122)
%124 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.2 = [11 x i8] c"%s_%02d.%s\00"
@.str.3 = [8 x i8] c"%s_%02d\00"
@.str.4 = [3 x i8] c"wb\00"
@.str.5 = [3 x i8] c"rb\00"
@.str.6 = [27 x i8] c"\0ADone. Split %d records.\0A\00"
@str = [42 x i8] c"\0A Usage: split_parkes_beams infilename\0A\00"
@str.7 = [75 x i8] c" This routine splits all 13 beams from a Parkes Multibeam raw data file.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [13 x i32*]
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca [647296 x i8]
%7 = bitcast [13 x i32*]* %3 to i8*
%8 = bitcast i8** %4 to i8*
store i8* null, i8** %4
%9 = bitcast i8** %5 to i8*
store i8* null, i8** %5
%10 = getelementptr inbounds [647296 x i8], [647296 x i8]* %6, i64 0, i64 0
%11 = icmp eq i32 %0, 2
br i1 %11, label %16, label %12
12: ; preds = %2
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str.7, i64 0, i64 0))
%15 = tail call i32 @exit(i32 0)
unreachable
16: ; preds = %2
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @split_root_suffix(i8* %18, i8** %4, i8** %5)
%20 = load i8*, i8** %5
%21 = icmp eq i8* %20, null
%22 = load i8*, i8** %4
%23 = call i64 @strlen(i8* dereferenceable(1) %22)
br i1 %21, label %28, label %24
24: ; preds = %16
%25 = call i64 @strlen(i8* %20)
%26 = add i64 %23, 5
%27 = add i64 %26, %25
br label %30
28: ; preds = %16
%29 = add nsw i64 %23, 5
br label %30
30: ; preds = %28, %24
%31 = phi i64 [ %29, %28 ], [ %27, %24 ]
%32 = call i8* @calloc(i64 %31, i32 1)
br label %33
33: ; preds = %30, %44
%34 = phi i64 [ 0, %30 ], [ %38, %44 ]
%35 = load i8*, i8** %5
%36 = icmp eq i8* %35, null
%37 = load i8*, i8** %4
%38 = add nuw nsw i64 %34, 1
%39 = trunc i64 %38 to i32
br i1 %36, label %42, label %40
40: ; preds = %33
%41 = call i32 (i8*, i8*, i8*, i32, ...) @sprintf(i8* dereferenceable(1) %32, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %37, i32 %39, i8* %35)
br label %44
42: ; preds = %33
%43 = call i32 (i8*, i8*, i8*, i32, ...) @sprintf(i8* dereferenceable(1) %32, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %37, i32 %39)
br label %44
44: ; preds = %42, %40
%45 = call i32* @fopen(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%46 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 %34
store i32* %45, i32** %46
%47 = icmp eq i64 %38, 13
br i1 %47, label %48, label %33
48: ; preds = %44
%49 = call i32 @free(i8* %32)
%50 = load i8*, i8** %4
%51 = call i32 @free(i8* %50)
%52 = load i8*, i8** %5
%53 = call i32 @free(i8* %52)
%54 = load i8*, i8** %17
%55 = call i32* @fopen(i8* %54, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%56 = call i64 @fread(i8* %10, i32 647296, i32 1, i32* %55)
%57 = icmp eq i64 %56, 0
br i1 %57, label %115, label %58
58: ; preds = %48
%59 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 0
%60 = getelementptr inbounds [647296 x i8], [647296 x i8]* %6, i64 0, i64 49792
%61 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 1
%62 = getelementptr inbounds [647296 x i8], [647296 x i8]* %6, i64 0, i64 99584
%63 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 2
%64 = getelementptr inbounds [647296 x i8], [647296 x i8]* %6, i64 0, i64 149376
%65 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 3
%66 = getelementptr inbounds [647296 x i8], [647296 x i8]* %6, i64 0, i64 199168
%67 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 4
%68 = getelementptr inbounds [647296 x i8], [647296 x i8]* %6, i64 0, i64 248960
%69 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 5
%70 = getelementptr inbounds [647296 x i8], [647296 x i8]* %6, i64 0, i64 298752
%71 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 6
%72 = getelementptr inbounds [647296 x i8], [647296 x i8]* %6, i64 0, i64 348544
%73 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 7
%74 = getelementptr inbounds [647296 x i8], [647296 x i8]* %6, i64 0, i64 398336
%75 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 8
%76 = getelementptr inbounds [647296 x i8], [647296 x i8]* %6, i64 0, i64 448128
%77 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 9
%78 = getelementptr inbounds [647296 x i8], [647296 x i8]* %6, i64 0, i64 497920
%79 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 10
%80 = getelementptr inbounds [647296 x i8], [647296 x i8]* %6, i64 0, i64 547712
%81 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 11
%82 = getelementptr inbounds [647296 x i8], [647296 x i8]* %6, i64 0, i64 597504
%83 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 12
br label %84
84: ; preds = %58, %84
%85 = phi i32 [ %112, %84 ], [ 0, %58 ]
%86 = load i32*, i32** %59
%87 = call i32 @fwrite(i8* %10, i32 49792, i32 1, i32* %86)
%88 = load i32*, i32** %61
%89 = call i32 @fwrite(i8* %60, i32 49792, i32 1, i32* %88)
%90 = load i32*, i32** %63
%91 = call i32 @fwrite(i8* %62, i32 49792, i32 1, i32* %90)
%92 = load i32*, i32** %65
%93 = call i32 @fwrite(i8* %64, i32 49792, i32 1, i32* %92)
%94 = load i32*, i32** %67
%95 = call i32 @fwrite(i8* %66, i32 49792, i32 1, i32* %94)
%96 = load i32*, i32** %69
%97 = call i32 @fwrite(i8* %68, i32 49792, i32 1, i32* %96)
%98 = load i32*, i32** %71
%99 = call i32 @fwrite(i8* %70, i32 49792, i32 1, i32* %98)
%100 = load i32*, i32** %73
%101 = call i32 @fwrite(i8* %72, i32 49792, i32 1, i32* %100)
%102 = load i32*, i32** %75
%103 = call i32 @fwrite(i8* %74, i32 49792, i32 1, i32* %102)
%104 = load i32*, i32** %77
%105 = call i32 @fwrite(i8* %76, i32 49792, i32 1, i32* %104)
%106 = load i32*, i32** %79
%107 = call i32 @fwrite(i8* %78, i32 49792, i32 1, i32* %106)
%108 = load i32*, i32** %81
%109 = call i32 @fwrite(i8* %80, i32 49792, i32 1, i32* %108)
%110 = load i32*, i32** %83
%111 = call i32 @fwrite(i8* %82, i32 49792, i32 1, i32* %110)
%112 = add nuw nsw i32 %85, 1
%113 = call i64 @fread(i8* %10, i32 647296, i32 1, i32* %55)
%114 = icmp eq i64 %113, 0
br i1 %114, label %115, label %84
115: ; preds = %84, %48
%116 = phi i32 [ 0, %48 ], [ %112, %84 ]
%117 = call i32 @fclose(i32* %55)
%118 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 0
%119 = load i32*, i32** %118
%120 = call i32 @fclose(i32* %119)
%121 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 1
%122 = load i32*, i32** %121
%123 = call i32 @fclose(i32* %122)
%124 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 2
%125 = load i32*, i32** %124
%126 = call i32 @fclose(i32* %125)
%127 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 3
%128 = load i32*, i32** %127
%129 = call i32 @fclose(i32* %128)
%130 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 4
%131 = load i32*, i32** %130
%132 = call i32 @fclose(i32* %131)
%133 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 5
%134 = load i32*, i32** %133
%135 = call i32 @fclose(i32* %134)
%136 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 6
%137 = load i32*, i32** %136
%138 = call i32 @fclose(i32* %137)
%139 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 7
%140 = load i32*, i32** %139
%141 = call i32 @fclose(i32* %140)
%142 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 8
%143 = load i32*, i32** %142
%144 = call i32 @fclose(i32* %143)
%145 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 9
%146 = load i32*, i32** %145
%147 = call i32 @fclose(i32* %146)
%148 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 10
%149 = load i32*, i32** %148
%150 = call i32 @fclose(i32* %149)
%151 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 11
%152 = load i32*, i32** %151
%153 = call i32 @fclose(i32* %152)
%154 = getelementptr inbounds [13 x i32*], [13 x i32*]* %3, i64 0, i64 12
%155 = load i32*, i32** %154
%156 = call i32 @fclose(i32* %155)
%157 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i32 %116)
%158 = call i32 @exit(i32 0)
unreachable
}