#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, double,
                           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 < 1; 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 < 1; 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;
  }
  fclose(fp);
  fp = fopen("bptree.txt", "r");
  if (!fp) {
    fp = fopen("orig.txt", "r");
    if (!fp) {
      printf("ERROR opening input file bptree.txt\n");
      exit(0);
    }
  }
  double bptree_sum_a = 0.0, bptree_sum_f = 0.0, bptree_a, bptree_f;
  for (i = 0; i < 1; i++) {
    if (feof(fp)) {
      printf("ERROR: You need 10 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, &bptree_a, &bptree_f);
    bptree_sum_a += bptree_a;
    bptree_sum_f += bptree_f;
  }
  fclose(fp);
  fp = fopen("bulk.txt", "r");
  if (!fp) {
    fp = fopen("orig.txt", "r");
    if (!fp) {
      printf("ERROR opening input file bulk.txt\n");
      exit(0);
    }
  }
  double bulk_sum_a = 0.0, bulk_sum_f = 0.0, bulk_a, bulk_f;
  for (i = 0; i < 1; i++) {
    if (feof(fp)) {
      printf("ERROR: You need 10 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, &bulk_a, &bulk_f);
    bulk_sum_a += bulk_a;
    bulk_sum_f += bulk_f;
  }
  fclose(fp);
  fp = fopen("bptreec.txt", "r");
  if (!fp) {
    fp = fopen("orig.txt", "r");
    if (!fp) {
      printf("ERROR opening input file bulk.txt\n");
      exit(0);
    }
  }
  double bptreec_sum_a = 0.0, bptreec_sum_f = 0.0, bptreec_a, bptreec_f;
  for (i = 0; i < 1; i++) {
    if (feof(fp)) {
      printf("ERROR: You need 10 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, &bptreec_a, &bptreec_f);
    bptreec_sum_a += bptreec_a;
    bptreec_sum_f += bptreec_f;
  }
  fclose(fp);
  fprintf(output, "append() %lf %lf %lf %lf %lf\n", orig_sum_a / 1.0,
          opt_sum_a / 1.0, bptree_sum_a / 1.0, bulk_sum_a / 1.0,
          bptreec_a / 1.0);
  fprintf(output, "findName() %lf %lf %lf %lf %lf", orig_sum_f / 1.0,
          opt_sum_f / 1.0, bptree_sum_f / 1.0, bulk_sum_f / 1.0,
          bptreec_a / 1.0);
  fclose(output);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%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   $0x1,-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   $0x1,-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    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xcfb(%rip),%rdi
lea    0xc2e(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1433 <main+0x2c3>
lea    0xc0a(%rip),%rdi
lea    0xc0c(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    142e <main+0x2be>
lea    0xcc2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>
jmp    1433 <main+0x2c3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jge    14fa <main+0x38a>
mov    -0x10(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%rax
je     1493 <main+0x323>
mov    -0x1c(%rbp),%esi
lea    0xc90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xbe7(%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    0xbf5(%rip),%rsi
lea    -0xe8(%rbp),%r8
lea    -0xf0(%rbp),%r9
call   1050 <fscanf@plt>
movsd  -0xe8(%rbp),%xmm0
ff
addsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
addsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1450 <main+0x2e0>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xc25(%rip),%rdi
lea    0xb00(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1561 <main+0x3f1>
lea    0xadc(%rip),%rdi
lea    0xade(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    155c <main+0x3ec>
lea    0xbea(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>
jmp    1561 <main+0x3f1>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jge    1628 <main+0x4b8>
mov    -0x10(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%rax
je     15c1 <main+0x451>
mov    -0x1c(%rbp),%esi
lea    0xb62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xab9(%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    0xac7(%rip),%rsi
lea    -0x108(%rbp),%r8
lea    -0x110(%rbp),%r9
call   1050 <fscanf@plt>
movsd  -0x108(%rbp),%xmm0
ff
addsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
addsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    157e <main+0x40e>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xb23(%rip),%rdi
lea    0x9d2(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    168f <main+0x51f>
lea    0x9ae(%rip),%rdi
lea    0x9b0(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    168a <main+0x51a>
lea    0xabc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>
jmp    168f <main+0x51f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jge    1756 <main+0x5e6>
mov    -0x10(%rbp),%rdi
call   1070 <feof@plt>
cmp    $0x0,%rax
je     16ef <main+0x57f>
mov    -0x1c(%rbp),%esi
lea    0xa34(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x98b(%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    0x999(%rip),%rsi
lea    -0x128(%rbp),%r8
lea    -0x130(%rbp),%r9
call   1050 <fscanf@plt>
movsd  -0x128(%rbp),%xmm0
ff
addsd  -0x118(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x130(%rbp),%xmm0
ff
addsd  -0x120(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    16ac <main+0x53c>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x18(%rbp),%rdi
movsd  -0x98(%rbp),%xmm0
ff
movsd  0x88d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0xb8(%rbp),%xmm1
ff
movsd  0x879(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  -0xd8(%rbp),%xmm2
ff
movsd  0x865(%rip),%xmm3
divsd  %xmm3,%xmm2
movsd  -0xf8(%rbp),%xmm3
ff
movsd  0x851(%rip),%xmm4
divsd  %xmm4,%xmm3
movsd  -0x128(%rbp),%xmm4
ff
movsd  0x83d(%rip),%xmm5
divsd  %xmm5,%xmm4
lea    0x999(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
movsd  -0xa0(%rbp),%xmm0
ff
movsd  0x819(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0xc0(%rbp),%xmm1
ff
movsd  0x805(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  -0xe0(%rbp),%xmm2
ff
movsd  0x7f1(%rip),%xmm3
divsd  %xmm3,%xmm2
movsd  -0x100(%rbp),%xmm3
ff
movsd  0x7dd(%rip),%xmm4
divsd  %xmm4,%xmm3
movsd  -0x128(%rbp),%xmm4
ff
movsd  0x7c9(%rip),%xmm5
divsd  %xmm5,%xmm4
lea    0x943(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x108,%rsp
lea    0xf40(%rip),%rdi
lea    0xe68(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
lea    0xe5b(%rip),%rdi
lea    0xe5f(%rip),%rsi
call   1090 <fopen@plt>
test   %rbx,%rbx
je     1575 <main+0x3f5>
mov    %rax,%r14
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %rax,%rax
jne    1552 <main+0x3d2>
lea    0xe61(%rip),%rsi
lea    0xd0(%rsp),%rdx
lea    0x90(%rsp),%rcx
lea    0x80(%rsp),%r8
lea    0x78(%rsp),%r9
mov    %rbx,%rdi
call   1060 <fscanf@plt>
movsd  0x80(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x78(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
mov    %rbx,%rdi
call   1040 <fclose@plt>
lea    0xecd(%rip),%rdi
lea    0xdd3(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1259 <main+0xd9>
lea    0xe90(%rip),%rdi
lea    0xdb8(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1587 <main+0x407>
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %rax,%rax
jne    1552 <main+0x3d2>
lea    0xdc7(%rip),%rsi
lea    0xd0(%rsp),%rdx
lea    0x90(%rsp),%rcx
lea    0x70(%rsp),%r8
lea    0x68(%rsp),%r9
mov    %rbx,%rdi
call   1060 <fscanf@plt>
movsd  0x70(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x68(%rsp),%xmm0
movsd  %xmm0,0x28(%rsp)
mov    %rbx,%rdi
call   1040 <fclose@plt>
lea    0xe5a(%rip),%rdi
lea    0xd3f(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    12ed <main+0x16d>
lea    0xdfc(%rip),%rdi
lea    0xd24(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1590 <main+0x410>
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %rax,%rax
jne    1549 <main+0x3c9>
lea    0xd33(%rip),%rsi
lea    0xd0(%rsp),%rdx
lea    0x90(%rsp),%rcx
lea    0x60(%rsp),%r8
lea    0x58(%rsp),%r9
mov    %rbx,%rdi
call   1060 <fscanf@plt>
movsd  0x60(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x58(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    %rbx,%rdi
call   1040 <fclose@plt>
lea    0xdea(%rip),%rdi
lea    0xcab(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1381 <main+0x201>
lea    0xd68(%rip),%rdi
lea    0xc90(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     157e <main+0x3fe>
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %rax,%rax
jne    1549 <main+0x3c9>
lea    0xc9f(%rip),%rsi
lea    0xd0(%rsp),%rdx
lea    0x90(%rsp),%rcx
lea    0x50(%rsp),%r8
lea    0x48(%rsp),%r9
mov    %rbx,%rdi
call   1060 <fscanf@plt>
movsd  0x50(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x48(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
call   1040 <fclose@plt>
lea    0xc8e(%rip),%rdi
lea    0xc18(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1414 <main+0x294>
lea    0xcd5(%rip),%rdi
lea    0xbfd(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     157e <main+0x3fe>
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %rax,%rax
jne    1549 <main+0x3c9>
xorpd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x18(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x28(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%rsp)
movsd  0x20(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x38(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x38(%rsp)
movsd  0x30(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsp)
lea    0xb8a(%rip),%rsi
lea    0xd0(%rsp),%rdx
lea    0x90(%rsp),%rcx
lea    0x40(%rsp),%r8
lea    0x88(%rsp),%r9
mov    %rbx,%rdi
call   1060 <fscanf@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
movsd  0x40(%rsp),%xmm4
lea    0xb93(%rip),%rsi
mov    %r14,%rdi
movsd  0x30(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  (%rsp),%xmm3
call   1070 <fprintf@plt>
movsd  0x40(%rsp),%xmm4
lea    0xb85(%rip),%rsi
mov    %r14,%rdi
movsd  0x38(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
call   1070 <fprintf@plt>
mov    %r14,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret
lea    0xaf7(%rip),%rdi
jmp    1559 <main+0x3d9>
lea    0xab6(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xbd8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
lea    0xb3c(%rip),%rdi
jmp    1569 <main+0x3e9>
lea    0xb9a(%rip),%rdi
jmp    1569 <main+0x3e9>
lea    0xb4c(%rip),%rdi
jmp    1569 <main+0x3e9>
lea    0xb64(%rip),%rdi
jmp    1569 <main+0x3e9>

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 = [11 x i8] c"bptree.txt\00"
@.str.11 = [37 x i8] c"ERROR opening input file bptree.txt\0A\00"
@.str.12 = [40 x i8] c"ERROR: You need 10 datum instead of %d\0A\00"
@.str.13 = [9 x i8] c"bulk.txt\00"
@.str.14 = [35 x i8] c"ERROR opening input file bulk.txt\0A\00"
@.str.15 = [12 x i8] c"bptreec.txt\00"
@.str.16 = [30 x i8] c"append() %lf %lf %lf %lf %lf\0A\00"
@.str.17 = [31 x i8] c"findName() %lf %lf %lf %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
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
store i32 0, i32* %1
%27 = 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* %27, i32** %2
%28 = 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* %28, i32** %3
%29 = load i32*, i32** %2
%30 = icmp ne i32* %29, null
br i1 %30, label %34, label %31
31: ; preds = %0
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
%33 = call i32 @exit(i32 0)
unreachable
34: ; 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 %35
35: ; preds = %58, %34
%36 = load i32, i32* %4
%37 = icmp slt i32 %36, 1
br i1 %37, label %38, label %61
38: ; preds = %35
%39 = load i32*, i32** %2
%40 = call i64 @feof(i32* %39)
%41 = icmp ne i64 %40, 0
br i1 %41, label %42, label %47
42: ; preds = %38
%43 = load i32, i32* %4
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 %43)
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%46 = call i32 @exit(i32 0)
unreachable
47: ; preds = %38
%48 = load i32*, i32** %2
%49 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%50 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%51 = call i32 @fscanf(i32* %48, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %49, i8* %50, double* %9, double* %10)
%52 = load double, double* %9
%53 = load double, double* %7
%54 = fadd double %53, %52
store double %54, double* %7
%55 = load double, double* %10
%56 = load double, double* %8
%57 = fadd double %56, %55
store double %57, double* %8
br label %58
58: ; preds = %47
%59 = load i32, i32* %4
%60 = add nsw i32 %59, 1
store i32 %60, i32* %4
br label %35
61: ; preds = %35
%62 = load i32*, i32** %2
%63 = call i32 @fclose(i32* %62)
%64 = 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* %64, i32** %2
%65 = load i32*, i32** %2
%66 = icmp ne i32* %65, null
br i1 %66, label %75, label %67
67: ; preds = %61
%68 = 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* %68, i32** %2
%69 = load i32*, i32** %2
%70 = icmp ne i32* %69, null
br i1 %70, label %74, label %71
71: ; preds = %67
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
%73 = call i32 @exit(i32 0)
unreachable
74: ; preds = %67
br label %75
75: ; preds = %74, %61
store double 0.000000e+00, double* %11
store double 0.000000e+00, double* %12
store i32 0, i32* %4
br label %76
76: ; preds = %99, %75
%77 = load i32, i32* %4
%78 = icmp slt i32 %77, 1
br i1 %78, label %79, label %102
79: ; preds = %76
%80 = load i32*, i32** %2
%81 = call i64 @feof(i32* %80)
%82 = icmp ne i64 %81, 0
br i1 %82, label %83, label %88
83: ; preds = %79
%84 = load i32, i32* %4
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 %84)
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%87 = call i32 @exit(i32 0)
unreachable
88: ; preds = %79
%89 = load i32*, i32** %2
%90 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%91 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%92 = call i32 @fscanf(i32* %89, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %90, i8* %91, double* %13, double* %14)
%93 = load double, double* %13
%94 = load double, double* %11
%95 = fadd double %94, %93
store double %95, double* %11
%96 = load double, double* %14
%97 = load double, double* %12
%98 = fadd double %97, %96
store double %98, double* %12
br label %99
99: ; preds = %88
%100 = load i32, i32* %4
%101 = add nsw i32 %100, 1
store i32 %101, i32* %4
br label %76
102: ; preds = %76
%103 = load i32*, i32** %2
%104 = call i32 @fclose(i32* %103)
%105 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %105, i32** %2
%106 = load i32*, i32** %2
%107 = icmp ne i32* %106, null
br i1 %107, label %116, label %108
108: ; preds = %102
%109 = 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* %109, i32** %2
%110 = load i32*, i32** %2
%111 = icmp ne i32* %110, null
br i1 %111, label %115, label %112
112: ; preds = %108
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0))
%114 = call i32 @exit(i32 0)
unreachable
115: ; preds = %108
br label %116
116: ; preds = %115, %102
store double 0.000000e+00, double* %15
store double 0.000000e+00, double* %16
store i32 0, i32* %4
br label %117
117: ; preds = %140, %116
%118 = load i32, i32* %4
%119 = icmp slt i32 %118, 1
br i1 %119, label %120, label %143
120: ; preds = %117
%121 = load i32*, i32** %2
%122 = call i64 @feof(i32* %121)
%123 = icmp ne i64 %122, 0
br i1 %123, label %124, label %129
124: ; preds = %120
%125 = load i32, i32* %4
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i32 %125)
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%128 = call i32 @exit(i32 0)
unreachable
129: ; preds = %120
%130 = load i32*, i32** %2
%131 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%132 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%133 = call i32 @fscanf(i32* %130, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %131, i8* %132, double* %17, double* %18)
%134 = load double, double* %17
%135 = load double, double* %15
%136 = fadd double %135, %134
store double %136, double* %15
%137 = load double, double* %18
%138 = load double, double* %16
%139 = fadd double %138, %137
store double %139, double* %16
br label %140
140: ; preds = %129
%141 = load i32, i32* %4
%142 = add nsw i32 %141, 1
store i32 %142, i32* %4
br label %117
143: ; preds = %117
%144 = load i32*, i32** %2
%145 = call i32 @fclose(i32* %144)
%146 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %146, i32** %2
%147 = load i32*, i32** %2
%148 = icmp ne i32* %147, null
br i1 %148, label %157, label %149
149: ; preds = %143
%150 = 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* %150, i32** %2
%151 = load i32*, i32** %2
%152 = icmp ne i32* %151, null
br i1 %152, label %156, label %153
153: ; preds = %149
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0))
%155 = call i32 @exit(i32 0)
unreachable
156: ; preds = %149
br label %157
157: ; preds = %156, %143
store double 0.000000e+00, double* %19
store double 0.000000e+00, double* %20
store i32 0, i32* %4
br label %158
158: ; preds = %181, %157
%159 = load i32, i32* %4
%160 = icmp slt i32 %159, 1
br i1 %160, label %161, label %184
161: ; preds = %158
%162 = load i32*, i32** %2
%163 = call i64 @feof(i32* %162)
%164 = icmp ne i64 %163, 0
br i1 %164, label %165, label %170
165: ; preds = %161
%166 = load i32, i32* %4
%167 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i32 %166)
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%169 = call i32 @exit(i32 0)
unreachable
170: ; preds = %161
%171 = load i32*, i32** %2
%172 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%173 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%174 = call i32 @fscanf(i32* %171, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %172, i8* %173, double* %21, double* %22)
%175 = load double, double* %21
%176 = load double, double* %19
%177 = fadd double %176, %175
store double %177, double* %19
%178 = load double, double* %22
%179 = load double, double* %20
%180 = fadd double %179, %178
store double %180, double* %20
br label %181
181: ; preds = %170
%182 = load i32, i32* %4
%183 = add nsw i32 %182, 1
store i32 %183, i32* %4
br label %158
184: ; preds = %158
%185 = load i32*, i32** %2
%186 = call i32 @fclose(i32* %185)
%187 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %187, i32** %2
%188 = load i32*, i32** %2
%189 = icmp ne i32* %188, null
br i1 %189, label %198, label %190
190: ; preds = %184
%191 = 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* %191, i32** %2
%192 = load i32*, i32** %2
%193 = icmp ne i32* %192, null
br i1 %193, label %197, label %194
194: ; preds = %190
%195 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0))
%196 = call i32 @exit(i32 0)
unreachable
197: ; preds = %190
br label %198
198: ; preds = %197, %184
store double 0.000000e+00, double* %23
store double 0.000000e+00, double* %24
store i32 0, i32* %4
br label %199
199: ; preds = %222, %198
%200 = load i32, i32* %4
%201 = icmp slt i32 %200, 1
br i1 %201, label %202, label %225
202: ; preds = %199
%203 = load i32*, i32** %2
%204 = call i64 @feof(i32* %203)
%205 = icmp ne i64 %204, 0
br i1 %205, label %206, label %211
206: ; preds = %202
%207 = load i32, i32* %4
%208 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i32 %207)
%209 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%210 = call i32 @exit(i32 0)
unreachable
211: ; preds = %202
%212 = load i32*, i32** %2
%213 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%214 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%215 = call i32 @fscanf(i32* %212, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %213, i8* %214, double* %25, double* %26)
%216 = load double, double* %25
%217 = load double, double* %23
%218 = fadd double %217, %216
store double %218, double* %23
%219 = load double, double* %26
%220 = load double, double* %24
%221 = fadd double %220, %219
store double %221, double* %24
br label %222
222: ; preds = %211
%223 = load i32, i32* %4
%224 = add nsw i32 %223, 1
store i32 %224, i32* %4
br label %199
225: ; preds = %199
%226 = load i32*, i32** %2
%227 = call i32 @fclose(i32* %226)
%228 = load i32*, i32** %3
%229 = load double, double* %7
%230 = fdiv double %229, 1.000000e+00
%231 = load double, double* %11
%232 = fdiv double %231, 1.000000e+00
%233 = load double, double* %15
%234 = fdiv double %233, 1.000000e+00
%235 = load double, double* %19
%236 = fdiv double %235, 1.000000e+00
%237 = load double, double* %25
%238 = fdiv double %237, 1.000000e+00
%239 = call i32 @fprintf(i32* %228, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0), double %230, double %232, double %234, double %236, double %238)
%240 = load i32*, i32** %3
%241 = load double, double* %8
%242 = fdiv double %241, 1.000000e+00
%243 = load double, double* %12
%244 = fdiv double %243, 1.000000e+00
%245 = load double, double* %16
%246 = fdiv double %245, 1.000000e+00
%247 = load double, double* %20
%248 = fdiv double %247, 1.000000e+00
%249 = load double, double* %25
%250 = fdiv double %249, 1.000000e+00
%251 = call i32 @fprintf(i32* %240, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.17, i64 0, i64 0), double %242, double %244, double %246, double %248, double %250)
%252 = load i32*, i32** %3
%253 = call i32 @fclose(i32* %252)
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 = [11 x i8] c"bptree.txt\00"
@.str.12 = [40 x i8] c"ERROR: You need 10 datum instead of %d\0A\00"
@.str.13 = [9 x i8] c"bulk.txt\00"
@.str.15 = [12 x i8] c"bptreec.txt\00"
@.str.16 = [30 x i8] c"append() %lf %lf %lf %lf %lf\0A\00"
@.str.17 = [31 x i8] c"findName() %lf %lf %lf %lf %lf\00"
@str = [34 x i8] c"ERROR opening input file orig.txt\00"
@str.18 = [33 x i8] c"ERROR opening input file opt.txt\00"
@str.19 = [36 x i8] c"ERROR opening input file bptree.txt\00"
@str.21 = [34 x i8] c"ERROR opening input file bulk.txt\00"
@str.26 = [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 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = 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))
%14 = 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))
%15 = icmp eq i32* %13, null
br i1 %15, label %16, label %19
16: ; preds = %0
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%18 = tail call i32 @exit(i32 0)
unreachable
19: ; preds = %0
%20 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%21 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%22 = bitcast double* %3 to i8*
%23 = bitcast double* %4 to i8*
%24 = call i64 @feof(i32* %13)
%25 = icmp eq i64 %24, 0
br i1 %25, label %30, label %26
26: ; preds = %19
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 0)
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.26, i64 0, i64 0))
%29 = call i32 @exit(i32 0)
unreachable
30: ; preds = %19
%31 = call i32 @fscanf(i32* %13, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %20, i8* %21, double* %3, double* %4)
%32 = load double, double* %3
%33 = load double, double* %4
%34 = call i32 @fclose(i32* %13)
%35 = 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))
%36 = icmp eq i32* %35, null
br i1 %36, label %37, label %43
37: ; preds = %30
%38 = 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))
%39 = icmp eq i32* %38, null
br i1 %39, label %40, label %43
40: ; preds = %37
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.18, i64 0, i64 0))
%42 = call i32 @exit(i32 0)
unreachable
43: ; preds = %37, %30
%44 = phi i32* [ %35, %30 ], [ %38, %37 ]
%45 = bitcast double* %5 to i8*
%46 = bitcast double* %6 to i8*
%47 = call i64 @feof(i32* %44)
%48 = icmp eq i64 %47, 0
br i1 %48, label %53, label %49
49: ; preds = %43
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 0)
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.26, i64 0, i64 0))
%52 = call i32 @exit(i32 0)
unreachable
53: ; preds = %43
%54 = call i32 @fscanf(i32* %44, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %20, i8* %21, double* %5, double* %6)
%55 = load double, double* %5
%56 = load double, double* %6
%57 = call i32 @fclose(i32* %44)
%58 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%59 = icmp eq i32* %58, null
br i1 %59, label %60, label %66
60: ; preds = %53
%61 = 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))
%62 = icmp eq i32* %61, null
br i1 %62, label %63, label %66
63: ; preds = %60
%64 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.19, i64 0, i64 0))
%65 = call i32 @exit(i32 0)
unreachable
66: ; preds = %60, %53
%67 = phi i32* [ %58, %53 ], [ %61, %60 ]
%68 = bitcast double* %7 to i8*
%69 = bitcast double* %8 to i8*
%70 = call i64 @feof(i32* %67)
%71 = icmp eq i64 %70, 0
br i1 %71, label %76, label %72
72: ; preds = %66
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i32 0)
%74 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.26, i64 0, i64 0))
%75 = call i32 @exit(i32 0)
unreachable
76: ; preds = %66
%77 = call i32 @fscanf(i32* %67, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %20, i8* %21, double* %7, double* %8)
%78 = load double, double* %7
%79 = load double, double* %8
%80 = call i32 @fclose(i32* %67)
%81 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%82 = icmp eq i32* %81, null
br i1 %82, label %83, label %89
83: ; preds = %76
%84 = 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))
%85 = icmp eq i32* %84, null
br i1 %85, label %86, label %89
86: ; preds = %83
%87 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.21, i64 0, i64 0))
%88 = call i32 @exit(i32 0)
unreachable
89: ; preds = %83, %76
%90 = phi i32* [ %81, %76 ], [ %84, %83 ]
%91 = bitcast double* %9 to i8*
%92 = bitcast double* %10 to i8*
%93 = call i64 @feof(i32* %90)
%94 = icmp eq i64 %93, 0
br i1 %94, label %99, label %95
95: ; preds = %89
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i32 0)
%97 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.26, i64 0, i64 0))
%98 = call i32 @exit(i32 0)
unreachable
99: ; preds = %89
%100 = call i32 @fscanf(i32* %90, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %20, i8* %21, double* %9, double* %10)
%101 = load double, double* %9
%102 = load double, double* %10
%103 = call i32 @fclose(i32* %90)
%104 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%105 = icmp eq i32* %104, null
br i1 %105, label %106, label %112
106: ; preds = %99
%107 = 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))
%108 = icmp eq i32* %107, null
br i1 %108, label %109, label %112
109: ; preds = %106
%110 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.21, i64 0, i64 0))
%111 = call i32 @exit(i32 0)
unreachable
112: ; preds = %106, %99
%113 = phi i32* [ %104, %99 ], [ %107, %106 ]
%114 = bitcast double* %11 to i8*
%115 = bitcast double* %12 to i8*
%116 = call i64 @feof(i32* %113)
%117 = icmp eq i64 %116, 0
br i1 %117, label %122, label %118
118: ; preds = %112
%119 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i32 0)
%120 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.26, i64 0, i64 0))
%121 = call i32 @exit(i32 0)
unreachable
122: ; preds = %112
%123 = fadd double %102, 0.000000e+00
%124 = fadd double %101, 0.000000e+00
%125 = fadd double %79, 0.000000e+00
%126 = fadd double %78, 0.000000e+00
%127 = fadd double %56, 0.000000e+00
%128 = fadd double %55, 0.000000e+00
%129 = fadd double %33, 0.000000e+00
%130 = fadd double %32, 0.000000e+00
%131 = call i32 @fscanf(i32* %113, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %20, i8* %21, double* %11, double* %12)
%132 = call i32 @fclose(i32* %113)
%133 = load double, double* %11
%134 = call i32 @fprintf(i32* %14, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0), double %130, double %128, double %126, double %124, double %133)
%135 = load double, double* %11
%136 = call i32 @fprintf(i32* %14, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.17, i64 0, i64 0), double %129, double %127, double %125, double %123, double %135)
%137 = call i32 @fclose(i32* %14)
ret i32 0
}