#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, double, double);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char *, char *,
                          double *, double *);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  FILE *fp = fopen("orig.txt", "r");
  FILE *output = fopen("output.txt", "w");
  if (!fp) {
    printf("ERROR opening input file orig.txt\n");
    exit(0);
  }
  int i = 0;
  char append[50], find[50];
  double orig_sum_a = 0.0, orig_sum_f = 0.0, orig_a, orig_f;
  for (i = 0; i < 100; i++) {
    if (feof(fp)) {
      printf("ERROR: You need 100 datum instead of %d\n", i);
      printf("run 'make run' longer to get enough information\n\n");
      exit(0);
    }
    fscanf(fp, "%s %s %lf %lf\n", append, find, &orig_a, &orig_f);
    orig_sum_a += orig_a;
    orig_sum_f += orig_f;
  }
  fclose(fp);
  fp = fopen("opt.txt", "r");
  if (!fp) {
    fp = fopen("orig.txt", "r");
    if (!fp) {
      printf("ERROR opening input file opt.txt\n");
      exit(0);
    }
  }
  double opt_sum_a = 0.0, opt_sum_f = 0.0, opt_a, opt_f;
  for (i = 0; i < 100; i++) {
    if (feof(fp)) {
      printf("ERROR: You need 100 datum instead of %d\n", i);
      printf("run 'make run' longer to get enough information\n\n");
      exit(0);
    }
    fscanf(fp, "%s %s %lf %lf\n", append, find, &opt_a, &opt_f);
    opt_sum_a += opt_a;
    opt_sum_f += opt_f;
  }
  fprintf(output, "append() %lf %lf\n", orig_sum_a / 100.0, opt_sum_a / 100.0);
  fprintf(output, "findName() %lf %lf", orig_sum_f / 100.0, opt_sum_f / 100.0);
  fclose(output);
  fclose(fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe7f(%rip),%rdi
lea    0xe81(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    0xe73(%rip),%rdi
lea    0xe77(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11d0 <main+0x60>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>
movl   $0x0,-0x1c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movl   $0x0,-0x1c(%rbp)
cmpl   $0x64,-0x1c(%rbp)
jge    129e <main+0x12e>
mov    -0x10(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%rax
je     1237 <main+0xc7>
mov    -0x1c(%rbp),%esi
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rdi
lea    -0x50(%rbp),%rdx
lea    -0x90(%rbp),%rcx
lea    0xe51(%rip),%rsi
lea    -0xa8(%rbp),%r8
lea    -0xb0(%rbp),%r9
call   1050 <fscanf@plt>
movsd  -0xa8(%rbp),%xmm0
ff
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
addsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11f4 <main+0x84>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xdff(%rip),%rdi
lea    0xd5c(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1305 <main+0x195>
lea    0xd38(%rip),%rdi
lea    0xd3a(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1300 <main+0x190>
lea    0xdc3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>
jmp    1305 <main+0x195>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movl   $0x0,-0x1c(%rbp)
cmpl   $0x64,-0x1c(%rbp)
jge    13cc <main+0x25c>
mov    -0x10(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%rax
je     1365 <main+0x1f5>
mov    -0x1c(%rbp),%esi
lea    0xcfa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd15(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>
mov    -0x10(%rbp),%rdi
lea    -0x50(%rbp),%rdx
lea    -0x90(%rbp),%rcx
lea    0xd23(%rip),%rsi
lea    -0xc8(%rbp),%r8
lea    -0xd0(%rbp),%r9
call   1050 <fscanf@plt>
movsd  -0xc8(%rbp),%xmm0
ff
addsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
addsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1322 <main+0x1b2>
mov    -0x18(%rbp),%rdi
movsd  -0x98(%rbp),%xmm0
ff
movsd  0xc20(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0xb8(%rbp),%xmm1
ff
movsd  0xc0c(%rip),%xmm2
divsd  %xmm2,%xmm1
lea    0xcd8(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
movsd  -0xa0(%rbp),%xmm0
ff
movsd  0xbe8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0xc0(%rbp),%xmm1
ff
movsd  0xbd4(%rip),%xmm2
divsd  %xmm2,%xmm1
lea    0xcb2(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
lea    0xef5(%rip),%rdi
lea    0xe69(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
lea    0xe5c(%rip),%rdi
lea    0xe60(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,0x20(%rsp)
test   %rbx,%rbx
je     13c4 <main+0x244>
xor    %ebp,%ebp
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
lea    0x90(%rsp),%r12
lea    0x50(%rsp),%r13
lea    0x48(%rsp),%r14
lea    0x40(%rsp),%r15
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %rax,%rax
jne    13a1 <main+0x221>
mov    %rbx,%rdi
lea    0xe25(%rip),%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %r14,%r8
mov    %r15,%r9
call   1060 <fscanf@plt>
movsd  0x10(%rsp),%xmm0
addsd  0x48(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
add    $0x1,%ebp
cmp    $0x64,%ebp
jne    1200 <main+0x80>
mov    %rbx,%rdi
call   1040 <fclose@plt>
lea    0xe48(%rip),%rdi
lea    0xd9a(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    129a <main+0x11a>
lea    0xe0b(%rip),%rdi
lea    0xd7f(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     13cd <main+0x24d>
xor    %ebp,%ebp
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x90(%rsp),%r12
lea    0x50(%rsp),%r13
lea    0x38(%rsp),%r14
lea    0x30(%rsp),%r15
xorpd  %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  %xmm1,0x28(%rsp)
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %rax,%rax
jne    13a1 <main+0x221>
mov    %rbx,%rdi
lea    0xd4f(%rip),%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %r14,%r8
mov    %r15,%r9
call   1060 <fscanf@plt>
movsd  0x28(%rsp),%xmm1
addsd  0x38(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
addsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
add    $0x1,%ebp
cmp    $0x64,%ebp
jne    12d0 <main+0x150>
movsd  0xcd0(%rip),%xmm2
movsd  0x10(%rsp),%xmm0
divsd  %xmm2,%xmm0
divsd  %xmm2,%xmm1
lea    0xd0a(%rip),%rsi
mov    0x20(%rsp),%rbp
mov    %rbp,%rdi
call   1070 <fprintf@plt>
movsd  0x18(%rsp),%xmm0
movsd  0xca0(%rip),%xmm2
divsd  %xmm2,%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm2,%xmm1
lea    0xcec(%rip),%rsi
mov    %rbp,%rdi
call   1070 <fprintf@plt>
mov    %rbp,%rdi
call   1040 <fclose@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc6f(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcff(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
lea    0xca9(%rip),%rdi
jmp    13b8 <main+0x238>
lea    0xcc2(%rip),%rdi
jmp    13b8 <main+0x238>

LLVM IR (-O0):
@.str = [9 x i8] c"orig.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [11 x i8] c"output.txt\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [35 x i8] c"ERROR opening input file orig.txt\0A\00"
@.str.5 = [41 x i8] c"ERROR: You need 100 datum instead of %d\0A\00"
@.str.6 = [50 x i8] c"run 'make run' longer to get enough information\0A\0A\00"
@.str.7 = [15 x i8] c"%s %s %lf %lf\0A\00"
@.str.8 = [8 x i8] c"opt.txt\00"
@.str.9 = [34 x i8] c"ERROR opening input file opt.txt\0A\00"
@.str.10 = [18 x i8] c"append() %lf %lf\0A\00"
@.str.11 = [19 x i8] c"findName() %lf %lf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca [50 x i8]
%6 = alloca [50 x i8]
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store i32 0, i32* %1
%15 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %15, i32** %2
%16 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %16, i32** %3
%17 = load i32*, i32** %2
%18 = icmp ne i32* %17, null
br i1 %18, label %22, label %19
19: ; preds = %0
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
%21 = call i32 @exit(i32 0)
unreachable
22: ; preds = %0
store i32 0, i32* %4
store double 0.000000e+00, double* %7
store double 0.000000e+00, double* %8
store i32 0, i32* %4
br label %23
23: ; preds = %46, %22
%24 = load i32, i32* %4
%25 = icmp slt i32 %24, 100
br i1 %25, label %26, label %49
26: ; preds = %23
%27 = load i32*, i32** %2
%28 = call i64 @feof(i32* %27)
%29 = icmp ne i64 %28, 0
br i1 %29, label %30, label %35
30: ; preds = %26
%31 = load i32, i32* %4
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 %31)
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%34 = call i32 @exit(i32 0)
unreachable
35: ; preds = %26
%36 = load i32*, i32** %2
%37 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%38 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%39 = call i32 @fscanf(i32* %36, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %37, i8* %38, double* %9, double* %10)
%40 = load double, double* %9
%41 = load double, double* %7
%42 = fadd double %41, %40
store double %42, double* %7
%43 = load double, double* %10
%44 = load double, double* %8
%45 = fadd double %44, %43
store double %45, double* %8
br label %46
46: ; preds = %35
%47 = load i32, i32* %4
%48 = add nsw i32 %47, 1
store i32 %48, i32* %4
br label %23
49: ; preds = %23
%50 = load i32*, i32** %2
%51 = call i32 @fclose(i32* %50)
%52 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %52, i32** %2
%53 = load i32*, i32** %2
%54 = icmp ne i32* %53, null
br i1 %54, label %63, label %55
55: ; preds = %49
%56 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %56, i32** %2
%57 = load i32*, i32** %2
%58 = icmp ne i32* %57, null
br i1 %58, label %62, label %59
59: ; preds = %55
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%61 = call i32 @exit(i32 0)
unreachable
62: ; preds = %55
br label %63
63: ; preds = %62, %49
store double 0.000000e+00, double* %11
store double 0.000000e+00, double* %12
store i32 0, i32* %4
br label %64
64: ; preds = %87, %63
%65 = load i32, i32* %4
%66 = icmp slt i32 %65, 100
br i1 %66, label %67, label %90
67: ; preds = %64
%68 = load i32*, i32** %2
%69 = call i64 @feof(i32* %68)
%70 = icmp ne i64 %69, 0
br i1 %70, label %71, label %76
71: ; preds = %67
%72 = load i32, i32* %4
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 %72)
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%75 = call i32 @exit(i32 0)
unreachable
76: ; preds = %67
%77 = load i32*, i32** %2
%78 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%79 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%80 = call i32 @fscanf(i32* %77, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %78, i8* %79, double* %13, double* %14)
%81 = load double, double* %13
%82 = load double, double* %11
%83 = fadd double %82, %81
store double %83, double* %11
%84 = load double, double* %14
%85 = load double, double* %12
%86 = fadd double %85, %84
store double %86, double* %12
br label %87
87: ; preds = %76
%88 = load i32, i32* %4
%89 = add nsw i32 %88, 1
store i32 %89, i32* %4
br label %64
90: ; preds = %64
%91 = load i32*, i32** %3
%92 = load double, double* %7
%93 = fdiv double %92, 1.000000e+02
%94 = load double, double* %11
%95 = fdiv double %94, 1.000000e+02
%96 = call i32 @fprintf(i32* %91, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), double %93, double %95)
%97 = load i32*, i32** %3
%98 = load double, double* %8
%99 = fdiv double %98, 1.000000e+02
%100 = load double, double* %12
%101 = fdiv double %100, 1.000000e+02
%102 = call i32 @fprintf(i32* %97, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), double %99, double %101)
%103 = load i32*, i32** %3
%104 = call i32 @fclose(i32* %103)
%105 = load i32*, i32** %2
%106 = call i32 @fclose(i32* %105)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"orig.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [11 x i8] c"output.txt\00"
@.str.3 = [2 x i8] c"w\00"
@.str.5 = [41 x i8] c"ERROR: You need 100 datum instead of %d\0A\00"
@.str.7 = [15 x i8] c"%s %s %lf %lf\0A\00"
@.str.8 = [8 x i8] c"opt.txt\00"
@.str.10 = [18 x i8] c"append() %lf %lf\0A\00"
@.str.11 = [19 x i8] c"findName() %lf %lf\00"
@str = [34 x i8] c"ERROR opening input file orig.txt\00"
@str.12 = [33 x i8] c"ERROR opening input file opt.txt\00"
@str.14 = [49 x i8] c"run 'make run' longer to get enough information\0A\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = alloca [50 x i8]
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%9 = icmp eq i32* %7, null
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%12 = tail call i32 @exit(i32 0)
unreachable
13: ; preds = %0
%14 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%15 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%16 = bitcast double* %3 to i8*
%17 = bitcast double* %4 to i8*
br label %18
18: ; preds = %13, %28
%19 = phi double [ 0.000000e+00, %13 ], [ %33, %28 ]
%20 = phi double [ 0.000000e+00, %13 ], [ %31, %28 ]
%21 = phi i32 [ 0, %13 ], [ %34, %28 ]
%22 = call i64 @feof(i32* %7)
%23 = icmp eq i64 %22, 0
br i1 %23, label %28, label %24
24: ; preds = %18
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 %21)
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.14, i64 0, i64 0))
%27 = call i32 @exit(i32 0)
unreachable
28: ; preds = %18
%29 = call i32 @fscanf(i32* %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %14, i8* %15, double* %3, double* %4)
%30 = load double, double* %3
%31 = fadd double %20, %30
%32 = load double, double* %4
%33 = fadd double %19, %32
%34 = add nuw nsw i32 %21, 1
%35 = icmp eq i32 %34, 100
br i1 %35, label %36, label %18
36: ; preds = %28
%37 = call i32 @fclose(i32* %7)
%38 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%39 = icmp eq i32* %38, null
br i1 %39, label %40, label %46
40: ; preds = %36
%41 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%42 = icmp eq i32* %41, null
br i1 %42, label %43, label %46
43: ; preds = %40
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.12, i64 0, i64 0))
%45 = call i32 @exit(i32 0)
unreachable
46: ; preds = %40, %36
%47 = phi i32* [ %38, %36 ], [ %41, %40 ]
%48 = bitcast double* %5 to i8*
%49 = bitcast double* %6 to i8*
br label %50
50: ; preds = %46, %60
%51 = phi double [ 0.000000e+00, %46 ], [ %65, %60 ]
%52 = phi double [ 0.000000e+00, %46 ], [ %63, %60 ]
%53 = phi i32 [ 0, %46 ], [ %66, %60 ]
%54 = call i64 @feof(i32* %47)
%55 = icmp eq i64 %54, 0
br i1 %55, label %60, label %56
56: ; preds = %50
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 %53)
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.14, i64 0, i64 0))
%59 = call i32 @exit(i32 0)
unreachable
60: ; preds = %50
%61 = call i32 @fscanf(i32* %47, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %14, i8* %15, double* %5, double* %6)
%62 = load double, double* %5
%63 = fadd double %52, %62
%64 = load double, double* %6
%65 = fadd double %51, %64
%66 = add nuw nsw i32 %53, 1
%67 = icmp eq i32 %66, 100
br i1 %67, label %68, label %50
68: ; preds = %60
%69 = fdiv double %31, 1.000000e+02
%70 = fdiv double %63, 1.000000e+02
%71 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), double %69, double %70)
%72 = fdiv double %33, 1.000000e+02
%73 = fdiv double %65, 1.000000e+02
%74 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), double %72, double %73)
%75 = call i32 @fclose(i32* %8)
%76 = call i32 @fclose(i32* %47)
ret i32 0
}