#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*/ time_t;
struct tm {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char EOF;
char *asctime(struct tm *);
unsigned int ceil(float);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
unsigned long fcountline(char *);
scalar_t__ feof(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ getname(char *, char *, int, char *, unsigned int);
struct tm *localtime(int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char fdividebyline(char *infile, unsigned long int line) {
  time_t rawtime;
  struct tm *timedata;
  char c;
  char *name = (char *)malloc(sizeof(char) * (strlen(infile) + 15));
  unsigned long int covered = 0;
  unsigned int files = 0;
  FILE *fin, *fout;
  if ((fin = fopen(infile, "rb")) == NULL) {
    printf("[!] There was a problem while reading the input file %s \n",
           infile);
    return 1;
  }
  unsigned long int lonfile = fcountline(infile);
  unsigned int nofiles = ceil((float)lonfile / line);
  printf("[+] The file %s has %lu lines. Im going to create %d files.\n",
         infile, lonfile, nofiles);
  if (lonfile < line) {
    printf("[!] ERROR: The file has only %lu lines!\n", lonfile);
    return 5;
  }
  while (files < nofiles) {
    getname(name, infile, strlen(infile), "-DivLine-", files);
    if ((fout = fopen(name, "wb")) == NULL) {
      printf("[!] There was a problem while creating the file %s \n", name);
      return 2;
    }
    while (covered < line) {
      c = fgetc(fin);
      if (c == EOF) {
        break;
      }
      fputc(c, fout);
      if (c == '\n') {
        covered++;
      } else if (feof(fin)) {
        printf("[!] Unexpected end of stream");
        return 4;
      }
    }
    fclose(fout);
    time(&rawtime);
    timedata = localtime(&rawtime);
    printf("[+] File %d created, %d files to go. -> %s", files + 1,
           nofiles - files - 1, asctime(timedata));
    covered = 0;
    files++;
  }
  fclose(fin);
  return 0;
}


x86 assembly (clang, -O0):
<fdividebyline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
add    $0xf,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   10f0 <malloc@plt>
mov    %rax,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xdd6(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,-0x50(%rbp)
cmp    $0x0,%rax
jne    1258 <fdividebyline+0x78>
mov    -0x10(%rbp),%rsi
lea    0xdbb(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movb   $0x1,-0x1(%rbp)
jmp    14e2 <fdividebyline+0x302>
mov    -0x10(%rbp),%rdi
call   10d0 <fcountline@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,%rdx
shr    %rdx
mov    %eax,%ecx
and    $0x1,%ecx
or     %rdx,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
cvtsi2ss %rax,%xmm1
movss  %xmm1,-0x6c(%rbp)
test   %rax,%rax
movss  %xmm0,-0x68(%rbp)
js     12a2 <fdividebyline+0xc2>
movss  -0x6c(%rbp),%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x68(%rbp),%xmm0
movss  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
shr    %rdx
mov    %eax,%ecx
and    $0x1,%ecx
or     %rdx,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
cvtsi2ss %rax,%xmm1
movss  %xmm1,-0x74(%rbp)
test   %rax,%rax
movss  %xmm0,-0x70(%rbp)
js     12e9 <fdividebyline+0x109>
movss  -0x74(%rbp),%xmm0
movss  %xmm0,-0x70(%rbp)
movss  -0x78(%rbp),%xmm0
movss  -0x70(%rbp),%xmm1
divss  %xmm1,%xmm0
call   1040 <ceil@plt>
mov    %eax,-0x64(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x60(%rbp),%rdx
mov    -0x64(%rbp),%ecx
lea    0xd2c(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x60(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1341 <fdividebyline+0x161>
mov    -0x60(%rbp),%rsi
lea    0xd49(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movb   $0x5,-0x1(%rbp)
jmp    14e2 <fdividebyline+0x302>
jmp    1346 <fdividebyline+0x166>
mov    -0x44(%rbp),%eax
cmp    -0x64(%rbp),%eax
jae    14d5 <fdividebyline+0x2f5>
mov    -0x38(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x88(%rbp),%rdi
mov    -0x80(%rbp),%rsi
mov    %eax,%edx
mov    -0x44(%rbp),%r8d
lea    0xd1d(%rip),%rcx
call   10b0 <getname@plt>
mov    -0x38(%rbp),%rdi
lea    0xd17(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,-0x58(%rbp)
cmp    $0x0,%rax
jne    13c4 <fdividebyline+0x1e4>
mov    -0x38(%rbp),%rsi
lea    0xcfc(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movb   $0x2,-0x1(%rbp)
jmp    14e2 <fdividebyline+0x302>
jmp    13c9 <fdividebyline+0x1e9>
mov    -0x40(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    145f <fdividebyline+0x27f>
mov    -0x50(%rbp),%rdi
call   1090 <fgetc@plt>
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
mov    0x2bfa(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    13fe <fdividebyline+0x21e>
jmp    145f <fdividebyline+0x27f>
mov    -0x29(%rbp),%al
mov    -0x58(%rbp),%rsi
movsbl %al,%edi
call   10a0 <fputc@plt>
movsbl -0x29(%rbp),%eax
cmp    $0xa,%eax
jne    142b <fdividebyline+0x24b>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    145a <fdividebyline+0x27a>
mov    -0x50(%rbp),%rdi
call   10c0 <feof@plt>
cmp    $0x0,%rax
je     1455 <fdividebyline+0x275>
lea    0xca0(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movb   $0x4,-0x1(%rbp)
jmp    14e2 <fdividebyline+0x302>
jmp    145a <fdividebyline+0x27a>
jmp    13c9 <fdividebyline+0x1e9>
mov    -0x58(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0x1c(%rbp),%rdi
call   10e0 <time@plt>
lea    -0x1c(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x28(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
mov    -0x64(%rbp),%eax
sub    -0x44(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8c(%rbp)
mov    -0x28(%rbp),%rdi
call   1070 <asctime@plt>
mov    -0x90(%rbp),%esi
mov    -0x8c(%rbp),%edx
mov    %rax,%rcx
lea    0xc4a(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movq   $0x0,-0x40(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1346 <fdividebyline+0x166>
mov    -0x50(%rbp),%rdi
call   1050 <fclose@plt>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdividebyline>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r12
mov    %rdi,%r14
call   1060 <strlen@plt>
lea    0xf(%rax),%edi
call   10f0 <malloc@plt>
mov    %rax,%r15
lea    0xdf5(%rip),%rsi
mov    %r14,%rdi
call   1100 <fopen@plt>
test   %rax,%rax
je     124f <fdividebyline+0x6f>
mov    %rax,%rbx
mov    %r14,%rdi
call   10d0 <fcountline@plt>
mov    %rax,%r13
test   %rax,%rax
js     1267 <fdividebyline+0x87>
cvtsi2ss %r13,%xmm0
test   %r12,%r12
jns    1284 <fdividebyline+0xa4>
mov    %r12,%rax
shr    %rax
mov    %r12d,%ecx
and    $0x1,%ecx
or     %rax,%rcx
cvtsi2ss %rcx,%xmm1
addss  %xmm1,%xmm1
jmp    1289 <fdividebyline+0xa9>
lea    0xdad(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0x1,%al
jmp    1418 <fdividebyline+0x238>
mov    %r13,%rax
shr    %rax
mov    %r13d,%ecx
and    $0x1,%ecx
or     %rax,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
test   %r12,%r12
js     1235 <fdividebyline+0x55>
cvtsi2ss %r12,%xmm1
divss  %xmm1,%xmm0
call   1040 <ceil@plt>
mov    %eax,%ebp
lea    0xda2(%rip),%rdi
mov    %r14,%rsi
mov    %r13,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   1080 <printf@plt>
cmp    %r12,%r13
jae    12c7 <fdividebyline+0xe7>
lea    0xdc4(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0x5,%al
jmp    1418 <fdividebyline+0x238>
mov    %ebp,0xc(%rsp)
test   %ebp,%ebp
je     13f9 <fdividebyline+0x219>
xor    %r13d,%r13d
mov    %r14,0x18(%rsp)
mov    %r15,0x10(%rsp)
jmp    1350 <fdividebyline+0x170>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbp,%rdi
call   1050 <fclose@plt>
lea    0x24(%rsp),%rbp
mov    %rbp,%rdi
call   10e0 <time@plt>
mov    %rbp,%rdi
call   1030 <localtime@plt>
lea    0x1(%r13),%ebp
not    %r13d
mov    0xc(%rsp),%r14d
add    %r14d,%r13d
mov    %rax,%rdi
call   1070 <asctime@plt>
lea    0xdd7(%rip),%rdi
mov    %ebp,%esi
mov    %r13d,%edx
mov    %rax,%rcx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,%r13d
cmp    %r14d,%ebp
mov    0x18(%rsp),%r14
mov    0x10(%rsp),%r15
je     13f9 <fdividebyline+0x219>
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %eax,%edx
lea    0xd3c(%rip),%rcx
mov    %r13d,%r8d
call   10b0 <getname@plt>
mov    %r15,%rdi
lea    0xd34(%rip),%rsi
call   1100 <fopen@plt>
test   %rax,%rax
je     1405 <fdividebyline+0x225>
mov    %rax,%rbp
test   %r12,%r12
je     12f0 <fdividebyline+0x110>
xor    %r14d,%r14d
jmp    13ad <fdividebyline+0x1cd>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14
cmp    %r12,%r14
jae    12f0 <fdividebyline+0x110>
mov    %rbx,%rdi
call   1090 <fgetc@plt>
mov    %eax,%r15d
mov    0x2c29(%rip),%rax
cmp    (%rax),%r15b
je     12f0 <fdividebyline+0x110>
movsbl %r15b,%edi
mov    %rbp,%rsi
call   10a0 <fputc@plt>
cmp    $0xa,%r15b
je     13a0 <fdividebyline+0x1c0>
mov    %rbx,%rdi
call   10c0 <feof@plt>
test   %rax,%rax
je     13a4 <fdividebyline+0x1c4>
lea    0xcf7(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0x4,%al
jmp    1418 <fdividebyline+0x238>
mov    %rbx,%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
jmp    1418 <fdividebyline+0x238>
lea    0xca4(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0x2,%al
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [3 x i8] c"rb\00"
@.str.1 = [58 x i8] c"[!] There was a problem while reading the input file %s \0A\00"
@.str.2 = [61 x i8] c"[+] The file %s has %lu lines. Im going to create %d files.\0A\00"
@.str.3 = [41 x i8] c"[!] ERROR: The file has only %lu lines!\0A\00"
@.str.4 = [10 x i8] c"-DivLine-\00"
@.str.5 = [3 x i8] c"wb\00"
@.str.6 = [53 x i8] c"[!] There was a problem while creating the file %s \0A\00"
@EOF = global i8 0
@.str.7 = [29 x i8] c"[!] Unexpected end of stream\00"
@.str.8 = [43 x i8] c"[+] File %d created, %d files to go. -> %s\00"
define signext i8 @fdividebyline(i8* %0, i64 %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca %struct.tm*
%8 = alloca i8
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i64
%15 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
%16 = load i8*, i8** %4
%17 = call i32 @strlen(i8* %16)
%18 = add nsw i32 %17, 15
%19 = sext i32 %18 to i64
%20 = mul i64 1, %19
%21 = trunc i64 %20 to i32
%22 = call i64 @malloc(i32 %21)
%23 = inttoptr i64 %22 to i8*
store i8* %23, i8** %9
store i64 0, i64* %10
store i32 0, i32* %11
%24 = load i8*, i8** %4
%25 = call i32* @fopen(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %25, i32** %12
%26 = icmp eq i32* %25, null
br i1 %26, label %27, label %30
27: ; preds = %2
%28 = load i8*, i8** %4
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i8* %28)
store i8 1, i8* %3
br label %118
30: ; preds = %2
%31 = load i8*, i8** %4
%32 = call i64 @fcountline(i8* %31)
store i64 %32, i64* %14
%33 = load i64, i64* %14
%34 = uitofp i64 %33 to float
%35 = load i64, i64* %5
%36 = uitofp i64 %35 to float
%37 = fdiv float %34, %36
%38 = call i32 @ceil(float %37)
store i32 %38, i32* %15
%39 = load i8*, i8** %4
%40 = load i64, i64* %14
%41 = load i32, i32* %15
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0), i8* %39, i64 %40, i32 %41)
%43 = load i64, i64* %14
%44 = load i64, i64* %5
%45 = icmp ult i64 %43, %44
br i1 %45, label %46, label %49
46: ; preds = %30
%47 = load i64, i64* %14
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i64 %47)
store i8 5, i8* %3
br label %118
49: ; preds = %30
br label %50
50: ; preds = %99, %49
%51 = load i32, i32* %11
%52 = load i32, i32* %15
%53 = icmp ult i32 %51, %52
br i1 %53, label %54, label %115
54: ; preds = %50
%55 = load i8*, i8** %9
%56 = load i8*, i8** %4
%57 = load i8*, i8** %4
%58 = call i32 @strlen(i8* %57)
%59 = load i32, i32* %11
%60 = call i32 @getname(i8* %55, i8* %56, i32 %58, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %59)
%61 = load i8*, i8** %9
%62 = call i32* @fopen(i8* %61, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i32* %62, i32** %13
%63 = icmp eq i32* %62, null
br i1 %63, label %64, label %67
64: ; preds = %54
%65 = load i8*, i8** %9
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0), i8* %65)
store i8 2, i8* %3
br label %118
67: ; preds = %54
br label %68
68: ; preds = %98, %67
%69 = load i64, i64* %10
%70 = load i64, i64* %5
%71 = icmp ult i64 %69, %70
br i1 %71, label %72, label %99
72: ; preds = %68
%73 = load i32*, i32** %12
%74 = call signext i8 @fgetc(i32* %73)
store i8 %74, i8* %8
%75 = load i8, i8* %8
%76 = sext i8 %75 to i32
%77 = load i8, i8* @EOF
%78 = sext i8 %77 to i32
%79 = icmp eq i32 %76, %78
br i1 %79, label %80, label %81
80: ; preds = %72
br label %99
81: ; preds = %72
%82 = load i8, i8* %8
%83 = load i32*, i32** %13
%84 = call i32 @fputc(i8 signext %82, i32* %83)
%85 = load i8, i8* %8
%86 = sext i8 %85 to i32
%87 = icmp eq i32 %86, 10
br i1 %87, label %88, label %91
88: ; preds = %81
%89 = load i64, i64* %10
%90 = add i64 %89, 1
store i64 %90, i64* %10
br label %98
91: ; preds = %81
%92 = load i32*, i32** %12
%93 = call i64 @feof(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.7, i64 0, i64 0))
store i8 4, i8* %3
br label %118
97: ; preds = %91
br label %98
98: ; preds = %97, %88
br label %68
99: ; preds = %80, %68
%100 = load i32*, i32** %13
%101 = call i32 @fclose(i32* %100)
%102 = call i32 @time(i32* %6)
%103 = call %struct.tm* @localtime(i32* %6)
store %struct.tm* %103, %struct.tm** %7
%104 = load i32, i32* %11
%105 = add i32 %104, 1
%106 = load i32, i32* %15
%107 = load i32, i32* %11
%108 = sub i32 %106, %107
%109 = sub i32 %108, 1
%110 = load %struct.tm*, %struct.tm** %7
%111 = call i8* @asctime(%struct.tm* %110)
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0), i32 %105, i32 %109, i8* %111)
store i64 0, i64* %10
%113 = load i32, i32* %11
%114 = add i32 %113, 1
store i32 %114, i32* %11
br label %50
115: ; preds = %50
%116 = load i32*, i32** %12
%117 = call i32 @fclose(i32* %116)
store i8 0, i8* %3
br label %118
118: ; preds = %115, %95, %64, %46, %27
%119 = load i8, i8* %3
ret i8 %119
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [3 x i8] c"rb\00"
@.str.1 = [58 x i8] c"[!] There was a problem while reading the input file %s \0A\00"
@.str.2 = [61 x i8] c"[+] The file %s has %lu lines. Im going to create %d files.\0A\00"
@.str.3 = [41 x i8] c"[!] ERROR: The file has only %lu lines!\0A\00"
@.str.4 = [10 x i8] c"-DivLine-\00"
@.str.5 = [3 x i8] c"wb\00"
@.str.6 = [53 x i8] c"[!] There was a problem while creating the file %s \0A\00"
@EOF = global i8 0
@.str.7 = [29 x i8] c"[!] Unexpected end of stream\00"
@.str.8 = [43 x i8] c"[+] File %d created, %d files to go. -> %s\00"
define signext i8 @fdividebyline(i8* %0, i64 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, 15
%7 = tail call i64 @malloc(i32 %6)
%8 = inttoptr i64 %7 to i8*
%9 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %66
13: ; preds = %2
%14 = tail call i64 @fcountline(i8* %0)
%15 = uitofp i64 %14 to float
%16 = uitofp i64 %1 to float
%17 = fdiv float %15, %16
%18 = tail call i32 @ceil(float %17)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0), i8* %0, i64 %14, i32 %18)
%20 = icmp ult i64 %14, %1
br i1 %20, label %25, label %21
21: ; preds = %13
%22 = icmp eq i32 %18, 0
br i1 %22, label %64, label %23
23: ; preds = %21
%24 = icmp eq i64 %1, 0
br label %27
25: ; preds = %13
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i64 %14)
br label %66
27: ; preds = %23, %54
%28 = phi i32 [ 0, %23 ], [ %58, %54 ]
%29 = call i32 @strlen(i8* %0)
%30 = call i32 @getname(i8* %8, i8* %0, i32 %29, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %28)
%31 = call i32* @fopen(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%32 = icmp eq i32* %31, null
br i1 %32, label %34, label %33
33: ; preds = %27
br i1 %24, label %54, label %36
34: ; preds = %27
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0), i8* %8)
br label %66
36: ; preds = %33, %51
%37 = phi i64 [ %52, %51 ], [ 0, %33 ]
%38 = call signext i8 @fgetc(i32* %9)
%39 = load i8, i8* @EOF
%40 = icmp eq i8 %38, %39
br i1 %40, label %54, label %41
41: ; preds = %36
%42 = call i32 @fputc(i8 signext %38, i32* %31)
%43 = icmp eq i8 %38, 10
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = add nuw i64 %37, 1
br label %51
46: ; preds = %41
%47 = call i64 @feof(i32* %9)
%48 = icmp eq i64 %47, 0
br i1 %48, label %51, label %49
49: ; preds = %46
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
br label %66
51: ; preds = %46, %44
%52 = phi i64 [ %45, %44 ], [ %37, %46 ]
%53 = icmp ult i64 %52, %1
br i1 %53, label %36, label %54
54: ; preds = %51, %36, %33
%55 = call i32 @fclose(i32* %31)
%56 = call i32 @time(i32* %3)
%57 = call %struct.tm* @localtime(i32* %3)
%58 = add nuw i32 %28, 1
%59 = xor i32 %28, -1
%60 = add i32 %18, %59
%61 = call i8* @asctime(%struct.tm* %57)
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0), i32 %58, i32 %60, i8* %61)
%63 = icmp eq i32 %58, %18
br i1 %63, label %64, label %27
64: ; preds = %54, %21
%65 = call i32 @fclose(i32* %9)
br label %66
66: ; preds = %25, %34, %49, %64, %11
%67 = phi i8 [ 1, %11 ], [ 5, %25 ], [ 2, %34 ], [ 4, %49 ], [ 0, %64 ]
ret i8 %67
}