#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;
  }
  fp = fopen("opt.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);
  printf("\nFinish calculating, run 'make plot' to see the result\n\n");
  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>
lea    0xe08(%rip),%rdi
lea    0xd65(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    12d5 <main+0x165>
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>
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    139c <main+0x22c>
mov    -0x10(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%rax
je     1335 <main+0x1c5>
mov    -0x1c(%rbp),%esi
lea    0xd2a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd45(%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    0xd53(%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    12f2 <main+0x182>
mov    -0x18(%rbp),%rdi
movsd  -0x98(%rbp),%xmm0
ff
movsd  0xc50(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0xb8(%rbp),%xmm1
ff
movsd  0xc3c(%rip),%xmm2
divsd  %xmm2,%xmm1
lea    0xd08(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
movsd  -0xa0(%rbp),%xmm0
ff
movsd  0xc18(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0xc0(%rbp),%xmm1
ff
movsd  0xc04(%rip),%xmm2
divsd  %xmm2,%xmm1
lea    0xce2(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xcd7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@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     13a0 <main+0x220>
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    137d <main+0x1fd>
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>
lea    0xe50(%rip),%rdi
lea    0xda2(%rip),%rsi
call   1090 <fopen@plt>
test   %rax,%rax
je     13a9 <main+0x229>
mov    %rax,%rbx
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
xchg   %ax,%ax
movsd  %xmm1,0x28(%rsp)
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %rax,%rax
jne    137d <main+0x1fd>
mov    %rbx,%rdi
lea    0xd7f(%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    12a0 <main+0x120>
movsd  0xd00(%rip),%xmm2
movsd  0x10(%rsp),%xmm0
divsd  %xmm2,%xmm0
divsd  %xmm2,%xmm1
lea    0xd3a(%rip),%rsi
mov    0x20(%rsp),%rbp
mov    %rbp,%rdi
call   1070 <fprintf@plt>
movsd  0x18(%rsp),%xmm0
movsd  0xcd0(%rip),%xmm2
divsd  %xmm2,%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm2,%xmm1
lea    0xd1c(%rip),%rsi
mov    %rbp,%rdi
call   1070 <fprintf@plt>
mov    %rbp,%rdi
call   1040 <fclose@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
lea    0xd53(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc93(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd5b(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
lea    0xccd(%rip),%rdi
jmp    1394 <main+0x214>
lea    0xce6(%rip),%rdi
jmp    1394 <main+0x214>

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"
@.str.12 = [57 x i8] c"\0AFinish calculating, run 'make plot' to see the result\0A\0A\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 = 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* %50, i32** %2
%51 = load i32*, i32** %2
%52 = icmp ne i32* %51, null
br i1 %52, label %56, label %53
53: ; preds = %49
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%55 = call i32 @exit(i32 0)
unreachable
56: ; preds = %49
store double 0.000000e+00, double* %11
store double 0.000000e+00, double* %12
store i32 0, i32* %4
br label %57
57: ; preds = %80, %56
%58 = load i32, i32* %4
%59 = icmp slt i32 %58, 100
br i1 %59, label %60, label %83
60: ; preds = %57
%61 = load i32*, i32** %2
%62 = call i64 @feof(i32* %61)
%63 = icmp ne i64 %62, 0
br i1 %63, label %64, label %69
64: ; preds = %60
%65 = load i32, i32* %4
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 %65)
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%68 = call i32 @exit(i32 0)
unreachable
69: ; preds = %60
%70 = load i32*, i32** %2
%71 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%72 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%73 = call i32 @fscanf(i32* %70, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %71, i8* %72, double* %13, double* %14)
%74 = load double, double* %13
%75 = load double, double* %11
%76 = fadd double %75, %74
store double %76, double* %11
%77 = load double, double* %14
%78 = load double, double* %12
%79 = fadd double %78, %77
store double %79, double* %12
br label %80
80: ; preds = %69
%81 = load i32, i32* %4
%82 = add nsw i32 %81, 1
store i32 %82, i32* %4
br label %57
83: ; preds = %57
%84 = load i32*, i32** %3
%85 = load double, double* %7
%86 = fdiv double %85, 1.000000e+02
%87 = load double, double* %11
%88 = fdiv double %87, 1.000000e+02
%89 = call i32 @fprintf(i32* %84, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), double %86, double %88)
%90 = load i32*, i32** %3
%91 = load double, double* %8
%92 = fdiv double %91, 1.000000e+02
%93 = load double, double* %12
%94 = fdiv double %93, 1.000000e+02
%95 = call i32 @fprintf(i32* %90, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), double %92, double %94)
%96 = load i32*, i32** %3
%97 = call i32 @fclose(i32* %96)
%98 = load i32*, i32** %2
%99 = call i32 @fclose(i32* %98)
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.12, i64 0, i64 0))
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.13 = [33 x i8] c"ERROR opening input file opt.txt\00"
@str.14 = [56 x i8] c"\0AFinish calculating, run 'make plot' to see the result\0A\00"
@str.16 = [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.16, 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* @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))
%38 = icmp eq i32* %37, null
br i1 %38, label %39, label %42
39: ; preds = %36
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.13, i64 0, i64 0))
%41 = call i32 @exit(i32 0)
unreachable
42: ; preds = %36
%43 = bitcast double* %5 to i8*
%44 = bitcast double* %6 to i8*
br label %45
45: ; preds = %42, %55
%46 = phi double [ 0.000000e+00, %42 ], [ %60, %55 ]
%47 = phi double [ 0.000000e+00, %42 ], [ %58, %55 ]
%48 = phi i32 [ 0, %42 ], [ %61, %55 ]
%49 = call i64 @feof(i32* %37)
%50 = icmp eq i64 %49, 0
br i1 %50, label %55, label %51
51: ; preds = %45
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 %48)
%53 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.16, i64 0, i64 0))
%54 = call i32 @exit(i32 0)
unreachable
55: ; preds = %45
%56 = call i32 @fscanf(i32* %37, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %14, i8* %15, double* %5, double* %6)
%57 = load double, double* %5
%58 = fadd double %47, %57
%59 = load double, double* %6
%60 = fadd double %46, %59
%61 = add nuw nsw i32 %48, 1
%62 = icmp eq i32 %61, 100
br i1 %62, label %63, label %45
63: ; preds = %55
%64 = fdiv double %31, 1.000000e+02
%65 = fdiv double %58, 1.000000e+02
%66 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), double %64, double %65)
%67 = fdiv double %33, 1.000000e+02
%68 = fdiv double %60, 1.000000e+02
%69 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), double %67, double %68)
%70 = call i32 @fclose(i32* %8)
%71 = call i32 @fclose(i32* %37)
%72 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.14, i64 0, i64 0))
ret i32 0
}