#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, float, char *, float,
                           char *, float);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ sscanf(char *, char *, char *, char *, ...);
scalar_t__ strncmp(char *, char *, int);
main() {
  int i = 0, j = 0, k = 0, line_length = 1000, atom_numb;
  float numb_1, numb_2, numb_3, bef_int, bef_ext, bef_total, aft_int, aft_ext,
      aft_total, delta_energy;
  char buffer[line_length], *word_1[1000], *word_2[1000], *word_3[1000],
      *word_4[1000], *word_5[1000], *word_6[1000];
  for (i = 0; i < 1000; i++) {
    word_1[i] = (char *)malloc(line_length);
    word_2[i] = (char *)malloc(line_length);
    word_3[i] = (char *)malloc(line_length);
    word_4[i] = (char *)malloc(line_length);
    word_5[i] = (char *)malloc(line_length);
    word_6[i] = (char *)malloc(line_length);
  }
  FILE *before, *after, *final, *fopen();
  before = fopen("before_opt.txt", "r");
  after = fopen("after_opt.txt", "r");
  final = fopen("energy.txt", "w");
  for (j = 0; j < 1000; j++) {
    fgets(buffer, line_length, before);
    sscanf(buffer, "%s %s %s %i %s %f %s %f %s %f", word_1[j], word_2[j],
           word_3[j], &atom_numb, word_4[j], &numb_1, word_5[j], &numb_2,
           word_6[j], &numb_3);
    if (strncmp(word_3[j], "internal", 8) == 0)
      break;
    else
      continue;
  }
  sscanf(buffer, "%s %s %s %f", word_1[j], word_2[j], word_3[j], &bef_int);
  fgets(buffer, line_length, before);
  sscanf(buffer, "%s %s %s %f", word_1[j], word_2[j], word_3[j], &bef_ext);
  fgets(buffer, line_length, before);
  sscanf(buffer, "%s %s %f", word_1[j], word_2[j], &bef_total);
  for (j = 0; j < 1000; j++) {
    fgets(buffer, line_length, after);
    sscanf(buffer, "%s %s %s %i %s %f %s %f %s %f", word_1[j], word_2[j],
           word_3[j], &atom_numb, word_4[j], &numb_1, word_5[j], &numb_2,
           word_6[j], &numb_3);
    if (strncmp(word_3[j], "internal", 8) == 0)
      break;
    else
      continue;
  }
  sscanf(buffer, "%s %s %s %f", word_1[j], word_2[j], word_3[j], &aft_int);
  fgets(buffer, line_length, after);
  sscanf(buffer, "%s %s %s %f", word_1[j], word_2[j], word_3[j], &aft_ext);
  fgets(buffer, line_length, after);
  sscanf(buffer, "%s %s %f", word_1[j], word_2[j], &aft_total);
  delta_energy = bef_int - aft_int;
  fprintf(final, " %f %s %f %s %f", bef_int, ":", aft_int, ":", delta_energy);
  for (i = 0; i < 1000; ++i) {
    free(word_1[i]);
    free(word_2[i]);
    free(word_3[i]);
    free(word_4[i]);
    free(word_5[i]);
    free(word_6[i]);
  }
  fclose(before);
  fclose(after);
  fclose(final);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0xbbf8,%rsp
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x3e8,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x60(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xbc10(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x68(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x3e8,-0x20(%rbp)
jge    1288 <main+0x108>
mov    -0x2c(%rbp),%edi
call   1080 <malloc@plt>
mov    %rax,%rcx
movslq -0x20(%rbp),%rax
mov    %rcx,-0x1fb0(%rbp,%rax,8)
ff
mov    -0x2c(%rbp),%edi
call   1080 <malloc@plt>
mov    %rax,%rcx
movslq -0x20(%rbp),%rax
mov    %rcx,-0x3ef0(%rbp,%rax,8)
ff
mov    -0x2c(%rbp),%edi
call   1080 <malloc@plt>
mov    %rax,%rcx
movslq -0x20(%rbp),%rax
mov    %rcx,-0x5e30(%rbp,%rax,8)
ff
mov    -0x2c(%rbp),%edi
call   1080 <malloc@plt>
mov    %rax,%rcx
movslq -0x20(%rbp),%rax
mov    %rcx,-0x7d70(%rbp,%rax,8)
ff
mov    -0x2c(%rbp),%edi
call   1080 <malloc@plt>
mov    %rax,%rcx
movslq -0x20(%rbp),%rax
mov    %rcx,-0x9cb0(%rbp,%rax,8)
ff
mov    -0x2c(%rbp),%edi
call   1080 <malloc@plt>
mov    %rax,%rcx
movslq -0x20(%rbp),%rax
mov    %rcx,-0xbbf0(%rbp,%rax,8)
ff
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11e3 <main+0x63>
lea    0xd71(%rip),%rdi
lea    0xd79(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xbbf8(%rbp)
lea    0xd68(%rip),%rdi
lea    0xd5f(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xbc00(%rbp)
lea    0xd5c(%rip),%rdi
lea    0xd60(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xbc08(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x3e8,-0x24(%rbp)
jge    13d1 <main+0x251>
mov    -0xbc10(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0xbbf8(%rbp),%rdx
call   1060 <fgets@plt>
mov    -0xbc10(%rbp),%rdi
movslq -0x24(%rbp),%rax
mov    -0x1fb0(%rbp,%rax,8),%rdx
ff
movslq -0x24(%rbp),%rax
mov    -0x3ef0(%rbp,%rax,8),%rcx
ff
movslq -0x24(%rbp),%rax
mov    -0x5e30(%rbp,%rax,8),%r8
ff
movslq -0x24(%rbp),%rax
mov    -0x7d70(%rbp,%rax,8),%r15
ff
movslq -0x24(%rbp),%rax
mov    -0x9cb0(%rbp,%rax,8),%rbx
ff
movslq -0x24(%rbp),%rax
mov    -0xbbf0(%rbp,%rax,8),%r10
ff
lea    0xcd6(%rip),%rsi
lea    -0x30(%rbp),%r9
lea    -0x34(%rbp),%r14
lea    -0x38(%rbp),%r11
lea    -0x3c(%rbp),%rax
sub    $0x30,%rsp
mov    %r15,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
mov    $0x0,%al
call   1090 <sscanf@plt>
add    $0x30,%rsp
movslq -0x24(%rbp),%rax
mov    -0x5e30(%rbp,%rax,8),%rdi
ff
lea    0xca5(%rip),%rsi
mov    $0x8,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    13be <main+0x23e>
jmp    13d1 <main+0x251>
jmp    13c3 <main+0x243>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12dd <main+0x15d>
mov    -0xbc10(%rbp),%rdi
movslq -0x24(%rbp),%rax
mov    -0x1fb0(%rbp,%rax,8),%rdx
ff
movslq -0x24(%rbp),%rax
mov    -0x3ef0(%rbp,%rax,8),%rcx
ff
movslq -0x24(%rbp),%rax
mov    -0x5e30(%rbp,%rax,8),%r8
ff
lea    0xc50(%rip),%rsi
lea    -0x40(%rbp),%r9
mov    $0x0,%al
call   1090 <sscanf@plt>
mov    -0xbc10(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0xbbf8(%rbp),%rdx
call   1060 <fgets@plt>
mov    -0xbc10(%rbp),%rdi
movslq -0x24(%rbp),%rax
mov    -0x1fb0(%rbp,%rax,8),%rdx
ff
movslq -0x24(%rbp),%rax
mov    -0x3ef0(%rbp,%rax,8),%rcx
ff
movslq -0x24(%rbp),%rax
mov    -0x5e30(%rbp,%rax,8),%r8
ff
lea    0xbfd(%rip),%rsi
lea    -0x44(%rbp),%r9
mov    $0x0,%al
call   1090 <sscanf@plt>
mov    -0xbc10(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0xbbf8(%rbp),%rdx
call   1060 <fgets@plt>
mov    -0xbc10(%rbp),%rdi
movslq -0x24(%rbp),%rax
mov    -0x1fb0(%rbp,%rax,8),%rdx
ff
movslq -0x24(%rbp),%rax
mov    -0x3ef0(%rbp,%rax,8),%rcx
ff
lea    0xbb9(%rip),%rsi
lea    -0x48(%rbp),%r8
mov    $0x0,%al
call   1090 <sscanf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x3e8,-0x24(%rbp)
jge    15a3 <main+0x423>
mov    -0xbc10(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0xbc00(%rbp),%rdx
call   1060 <fgets@plt>
mov    -0xbc10(%rbp),%rdi
movslq -0x24(%rbp),%rax
mov    -0x1fb0(%rbp,%rax,8),%rdx
ff
movslq -0x24(%rbp),%rax
mov    -0x3ef0(%rbp,%rax,8),%rcx
ff
movslq -0x24(%rbp),%rax
mov    -0x5e30(%rbp,%rax,8),%r8
ff
movslq -0x24(%rbp),%rax
mov    -0x7d70(%rbp,%rax,8),%r15
ff
movslq -0x24(%rbp),%rax
mov    -0x9cb0(%rbp,%rax,8),%rbx
ff
movslq -0x24(%rbp),%rax
mov    -0xbbf0(%rbp,%rax,8),%r10
ff
lea    0xb04(%rip),%rsi
lea    -0x30(%rbp),%r9
lea    -0x34(%rbp),%r14
lea    -0x38(%rbp),%r11
lea    -0x3c(%rbp),%rax
sub    $0x30,%rsp
mov    %r15,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
mov    $0x0,%al
call   1090 <sscanf@plt>
add    $0x30,%rsp
movslq -0x24(%rbp),%rax
mov    -0x5e30(%rbp,%rax,8),%rdi
ff
lea    0xad3(%rip),%rsi
mov    $0x8,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1590 <main+0x410>
jmp    15a3 <main+0x423>
jmp    1595 <main+0x415>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    14af <main+0x32f>
mov    -0xbc10(%rbp),%rdi
movslq -0x24(%rbp),%rax
mov    -0x1fb0(%rbp,%rax,8),%rdx
ff
movslq -0x24(%rbp),%rax
mov    -0x3ef0(%rbp,%rax,8),%rcx
ff
movslq -0x24(%rbp),%rax
mov    -0x5e30(%rbp,%rax,8),%r8
ff
lea    0xa7e(%rip),%rsi
lea    -0x4c(%rbp),%r9
mov    $0x0,%al
call   1090 <sscanf@plt>
mov    -0xbc10(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0xbc00(%rbp),%rdx
call   1060 <fgets@plt>
mov    -0xbc10(%rbp),%rdi
movslq -0x24(%rbp),%rax
mov    -0x1fb0(%rbp,%rax,8),%rdx
ff
movslq -0x24(%rbp),%rax
mov    -0x3ef0(%rbp,%rax,8),%rcx
ff
movslq -0x24(%rbp),%rax
mov    -0x5e30(%rbp,%rax,8),%r8
ff
lea    0xa2b(%rip),%rsi
lea    -0x50(%rbp),%r9
mov    $0x0,%al
call   1090 <sscanf@plt>
mov    -0xbc10(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0xbc00(%rbp),%rdx
call   1060 <fgets@plt>
mov    -0xbc10(%rbp),%rdi
movslq -0x24(%rbp),%rax
mov    -0x1fb0(%rbp,%rax,8),%rdx
ff
movslq -0x24(%rbp),%rax
mov    -0x3ef0(%rbp,%rax,8),%rcx
ff
lea    0x9e7(%rip),%rsi
lea    -0x54(%rbp),%r8
mov    $0x0,%al
call   1090 <sscanf@plt>
movss  -0x40(%rbp),%xmm0
subss  -0x4c(%rbp),%xmm0
movss  %xmm0,-0x58(%rbp)
mov    -0xbc08(%rbp),%rdi
movss  -0x40(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm1
movss  -0x58(%rbp),%xmm2
lea    0x994(%rip),%rsi
lea    0x9b2(%rip),%rcx
mov    %rcx,%rdx
call   1070 <fprintf@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x3e8,-0x20(%rbp)
jge    173d <main+0x5bd>
movslq -0x20(%rbp),%rax
mov    -0x1fb0(%rbp,%rax,8),%rdi
ff
call   1030 <free@plt>
movslq -0x20(%rbp),%rax
mov    -0x3ef0(%rbp,%rax,8),%rdi
ff
call   1030 <free@plt>
movslq -0x20(%rbp),%rax
mov    -0x5e30(%rbp,%rax,8),%rdi
ff
call   1030 <free@plt>
movslq -0x20(%rbp),%rax
mov    -0x7d70(%rbp,%rax,8),%rdi
ff
call   1030 <free@plt>
movslq -0x20(%rbp),%rax
mov    -0x9cb0(%rbp,%rax,8),%rdi
ff
call   1030 <free@plt>
movslq -0x20(%rbp),%rax
mov    -0xbbf0(%rbp,%rax,8),%rdi
ff
call   1030 <free@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    16bc <main+0x53c>
mov    -0xbbf8(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0xbc00(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0xbc08(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x60(%rbp),%rax
mov    %rax,%rsp
mov    -0x1c(%rbp),%eax
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xbfc8,%rsp
mov    %rsp,0x38(%rsp)
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0x3e8,%edi
call   1080 <malloc@plt>
mov    %rax,0x42c0(%rsp,%rbx,1)
mov    $0x3e8,%edi
call   1080 <malloc@plt>
mov    %rax,0x2380(%rsp,%rbx,1)
mov    $0x3e8,%edi
call   1080 <malloc@plt>
mov    %rax,0x440(%rsp,%rbx,1)
mov    $0x3e8,%edi
call   1080 <malloc@plt>
mov    %rax,0xa080(%rsp,%rbx,1)
mov    $0x3e8,%edi
call   1080 <malloc@plt>
mov    %rax,0x8140(%rsp,%rbx,1)
mov    $0x3e8,%edi
call   1080 <malloc@plt>
mov    %rax,0x6200(%rsp,%rbx,1)
add    $0x8,%rbx
cmp    $0x1f40,%rbx
jne    11a0 <main+0x20>
lea    0xde0(%rip),%rdi
lea    0xde8(%rip),%rbx
mov    %rbx,%rsi
call   10a0 <fopen@plt>
mov    %rax,0x10(%rsp)
lea    0xdd6(%rip),%rdi
mov    %rbx,%rsi
call   10a0 <fopen@plt>
mov    %rax,0x8(%rsp)
lea    0xdd0(%rip),%rdi
lea    0xdd4(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,0x30(%rsp)
lea    0x50(%rsp),%rbx
lea    0x2c(%rsp),%r13
lea    0xdd9(%rip),%r15
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x3e8,%esi
mov    0x10(%rsp),%rdx
call   1060 <fgets@plt>
mov    0x42c0(%rsp,%r12,8),%rdx
mov    0x2380(%rsp,%r12,8),%rcx
mov    0x440(%rsp,%r12,8),%r14
mov    %rbx,%rdi
lea    0xd78(%rip),%rsi
mov    %r14,%r8
mov    %r13,%r9
xor    %eax,%eax
lea    0x20(%rsp),%rbp
push   %rbp
push   0x6208(%rsp,%r12,8)
lea    0x34(%rsp),%rbp
push   %rbp
push   0x8158(%rsp,%r12,8)
lea    0x48(%rsp),%rbp
push   %rbp
push   0xa0a8(%rsp,%r12,8)
call   1090 <sscanf@plt>
add    $0x30,%rsp
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x8,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     131b <main+0x19b>
add    $0x1,%r12
cmp    $0x3e8,%r12
jne    1280 <main+0x100>
mov    $0x3e8,%r12d
mov    %r12d,%eax
shl    $0x3,%rax
mov    0x42c0(%rsp,%rax,1),%rbp
mov    0x2380(%rsp,%rax,1),%r15
mov    0x440(%rsp,%rax,1),%r14
lea    0xd12(%rip),%r13
lea    0x50(%rsp),%r12
lea    0x1c(%rsp),%r9
mov    %r12,%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
mov    %r15,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1090 <sscanf@plt>
mov    %r12,%rdi
mov    $0x3e8,%esi
mov    0x10(%rsp),%rbx
mov    %rbx,%rdx
call   1060 <fgets@plt>
lea    0x4c(%rsp),%r9
mov    %r12,%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
mov    %r15,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1090 <sscanf@plt>
mov    %r12,%rdi
mov    $0x3e8,%esi
mov    %rbx,%rdx
call   1060 <fgets@plt>
lea    0xcae(%rip),%rsi
lea    0x48(%rsp),%r8
mov    %r12,%rdi
mov    %rbp,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1090 <sscanf@plt>
lea    0x2c(%rsp),%r15
lea    0xc81(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    $0x3e8,%esi
mov    0x8(%rsp),%rdx
call   1060 <fgets@plt>
mov    0x42c0(%rsp,%rbx,8),%rdx
mov    0x2380(%rsp,%rbx,8),%rcx
mov    0x440(%rsp,%rbx,8),%r13
mov    %r12,%rdi
lea    0xc28(%rip),%rsi
mov    %r13,%r8
mov    %r15,%r9
xor    %eax,%eax
lea    0x20(%rsp),%rbp
push   %rbp
push   0x6208(%rsp,%rbx,8)
lea    0x34(%rsp),%rbp
push   %rbp
push   0x8158(%rsp,%rbx,8)
lea    0x48(%rsp),%rbp
push   %rbp
push   0xa0a8(%rsp,%rbx,8)
call   1090 <sscanf@plt>
add    $0x30,%rsp
mov    %r13,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1467 <main+0x2e7>
add    $0x1,%rbx
cmp    $0x3e8,%rbx
jne    13d0 <main+0x250>
mov    $0x3e8,%ebx
mov    %ebx,%eax
shl    $0x3,%rax
mov    0x42c0(%rsp,%rax,1),%r12
mov    0x2380(%rsp,%rax,1),%rbp
mov    0x440(%rsp,%rax,1),%r14
lea    0xbc7(%rip),%rsi
xor    %ebx,%ebx
lea    0x50(%rsp),%r15
lea    0x18(%rsp),%r9
mov    %r15,%rdi
mov    %r12,%rdx
mov    %rbp,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1090 <sscanf@plt>
mov    %r15,%rdi
mov    $0x3e8,%esi
mov    0x8(%rsp),%r13
mov    %r13,%rdx
call   1060 <fgets@plt>
lea    0x44(%rsp),%r9
mov    %r15,%rdi
lea    0xb84(%rip),%rsi
mov    %r12,%rdx
mov    %rbp,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1090 <sscanf@plt>
mov    %r15,%rdi
mov    $0x3e8,%esi
mov    %r13,%rdx
call   1060 <fgets@plt>
lea    0xb60(%rip),%rsi
lea    0x40(%rsp),%r8
mov    %r15,%rdi
mov    %r12,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   1090 <sscanf@plt>
movss  0x1c(%rsp),%xmm0
movss  0x18(%rsp),%xmm1
movaps %xmm0,%xmm2
subss  %xmm1,%xmm2
lea    0xb15(%rip),%rsi
lea    0xb33(%rip),%rcx
mov    0x30(%rsp),%rbp
mov    %rbp,%rdi
mov    %rcx,%rdx
call   1070 <fprintf@plt>
nopl   0x0(%rax)
mov    0x42c0(%rsp,%rbx,1),%rdi
call   1030 <free@plt>
mov    0x2380(%rsp,%rbx,1),%rdi
call   1030 <free@plt>
mov    0x440(%rsp,%rbx,1),%rdi
call   1030 <free@plt>
mov    0xa080(%rsp,%rbx,1),%rdi
call   1030 <free@plt>
mov    0x8140(%rsp,%rbx,1),%rdi
call   1030 <free@plt>
mov    0x6200(%rsp,%rbx,1),%rdi
call   1030 <free@plt>
add    $0x8,%rbx
cmp    $0x1f40,%rbx
jne    1540 <main+0x3c0>
mov    0x10(%rsp),%rdi
call   1050 <fclose@plt>
mov    0x8(%rsp),%rdi
call   1050 <fclose@plt>
mov    %rbp,%rdi
call   1050 <fclose@plt>
mov    0x38(%rsp),%rsp
xor    %eax,%eax
add    $0xbfc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"before_opt.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [14 x i8] c"after_opt.txt\00"
@.str.3 = [11 x i8] c"energy.txt\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [30 x i8] c"%s %s %s %i %s %f %s %f %s %f\00"
@.str.6 = [9 x i8] c"internal\00"
@.str.7 = [12 x i8] c"%s %s %s %f\00"
@.str.8 = [9 x i8] c"%s %s %f\00"
@.str.9 = [16 x i8] c" %f %s %f %s %f\00"
@.str.10 = [2 x i8] c":\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca i8*
%18 = alloca i64
%19 = alloca [1000 x i8*]
%20 = alloca [1000 x i8*]
%21 = alloca [1000 x i8*]
%22 = alloca [1000 x i8*]
%23 = alloca [1000 x i8*]
%24 = alloca [1000 x i8*]
%25 = alloca i32*
%26 = alloca i32*
%27 = alloca i32*
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 1000, i32* %5
%28 = load i32, i32* %5
%29 = zext i32 %28 to i64
%30 = call i8* @llvm.stacksave()
store i8* %30, i8** %17
%31 = alloca i8, i64 %29
store i64 %29, i64* %18
store i32 0, i32* %2
br label %32
32: ; preds = %72, %0
%33 = load i32, i32* %2
%34 = icmp slt i32 %33, 1000
br i1 %34, label %35, label %75
35: ; preds = %32
%36 = load i32, i32* %5
%37 = call i64 @malloc(i32 %36)
%38 = inttoptr i64 %37 to i8*
%39 = load i32, i32* %2
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %19, i64 0, i64 %40
store i8* %38, i8** %41
%42 = load i32, i32* %5
%43 = call i64 @malloc(i32 %42)
%44 = inttoptr i64 %43 to i8*
%45 = load i32, i32* %2
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %20, i64 0, i64 %46
store i8* %44, i8** %47
%48 = load i32, i32* %5
%49 = call i64 @malloc(i32 %48)
%50 = inttoptr i64 %49 to i8*
%51 = load i32, i32* %2
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %21, i64 0, i64 %52
store i8* %50, i8** %53
%54 = load i32, i32* %5
%55 = call i64 @malloc(i32 %54)
%56 = inttoptr i64 %55 to i8*
%57 = load i32, i32* %2
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %22, i64 0, i64 %58
store i8* %56, i8** %59
%60 = load i32, i32* %5
%61 = call i64 @malloc(i32 %60)
%62 = inttoptr i64 %61 to i8*
%63 = load i32, i32* %2
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %23, i64 0, i64 %64
store i8* %62, i8** %65
%66 = load i32, i32* %5
%67 = call i64 @malloc(i32 %66)
%68 = inttoptr i64 %67 to i8*
%69 = load i32, i32* %2
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %24, i64 0, i64 %70
store i8* %68, i8** %71
br label %72
72: ; preds = %35
%73 = load i32, i32* %2
%74 = add nsw i32 %73, 1
store i32 %74, i32* %2
br label %32
75: ; preds = %32
%76 = call i32* @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %76, i32** %25
%77 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %77, i32** %26
%78 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %78, i32** %27
store i32 0, i32* %3
br label %79
79: ; preds = %119, %75
%80 = load i32, i32* %3
%81 = icmp slt i32 %80, 1000
br i1 %81, label %82, label %122
82: ; preds = %79
%83 = load i32, i32* %5
%84 = load i32*, i32** %25
%85 = call i32 @fgets(i8* %31, i32 %83, i32* %84)
%86 = load i32, i32* %3
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %19, i64 0, i64 %87
%89 = load i8*, i8** %88
%90 = load i32, i32* %3
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %20, i64 0, i64 %91
%93 = load i8*, i8** %92
%94 = load i32, i32* %3
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %21, i64 0, i64 %95
%97 = load i8*, i8** %96
%98 = load i32, i32* %3
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %22, i64 0, i64 %99
%101 = load i8*, i8** %100
%102 = load i32, i32* %3
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %23, i64 0, i64 %103
%105 = load i8*, i8** %104
%106 = load i32, i32* %3
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %24, i64 0, i64 %107
%109 = load i8*, i8** %108
%110 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %31, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* %89, i8* %93, i8* %97, i32* %6, i8* %101, float* %7, i8* %105, float* %8, i8* %109, float* %9)
%111 = load i32, i32* %3
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %21, i64 0, i64 %112
%114 = load i8*, i8** %113
%115 = call i64 @strncmp(i8* %114, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 8)
%116 = icmp eq i64 %115, 0
br i1 %116, label %117, label %118
117: ; preds = %82
br label %122
118: ; preds = %82
br label %119
119: ; preds = %118
%120 = load i32, i32* %3
%121 = add nsw i32 %120, 1
store i32 %121, i32* %3
br label %79
122: ; preds = %117, %79
%123 = load i32, i32* %3
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %19, i64 0, i64 %124
%126 = load i8*, i8** %125
%127 = load i32, i32* %3
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %20, i64 0, i64 %128
%130 = load i8*, i8** %129
%131 = load i32, i32* %3
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %21, i64 0, i64 %132
%134 = load i8*, i8** %133
%135 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %31, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* %126, i8* %130, i8* %134, float* %10)
%136 = load i32, i32* %5
%137 = load i32*, i32** %25
%138 = call i32 @fgets(i8* %31, i32 %136, i32* %137)
%139 = load i32, i32* %3
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %19, i64 0, i64 %140
%142 = load i8*, i8** %141
%143 = load i32, i32* %3
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %20, i64 0, i64 %144
%146 = load i8*, i8** %145
%147 = load i32, i32* %3
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %21, i64 0, i64 %148
%150 = load i8*, i8** %149
%151 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %31, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* %142, i8* %146, i8* %150, float* %11)
%152 = load i32, i32* %5
%153 = load i32*, i32** %25
%154 = call i32 @fgets(i8* %31, i32 %152, i32* %153)
%155 = load i32, i32* %3
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %19, i64 0, i64 %156
%158 = load i8*, i8** %157
%159 = load i32, i32* %3
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %20, i64 0, i64 %160
%162 = load i8*, i8** %161
%163 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %31, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* %158, i8* %162, float* %12)
store i32 0, i32* %3
br label %164
164: ; preds = %204, %122
%165 = load i32, i32* %3
%166 = icmp slt i32 %165, 1000
br i1 %166, label %167, label %207
167: ; preds = %164
%168 = load i32, i32* %5
%169 = load i32*, i32** %26
%170 = call i32 @fgets(i8* %31, i32 %168, i32* %169)
%171 = load i32, i32* %3
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %19, i64 0, i64 %172
%174 = load i8*, i8** %173
%175 = load i32, i32* %3
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %20, i64 0, i64 %176
%178 = load i8*, i8** %177
%179 = load i32, i32* %3
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %21, i64 0, i64 %180
%182 = load i8*, i8** %181
%183 = load i32, i32* %3
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %22, i64 0, i64 %184
%186 = load i8*, i8** %185
%187 = load i32, i32* %3
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %23, i64 0, i64 %188
%190 = load i8*, i8** %189
%191 = load i32, i32* %3
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %24, i64 0, i64 %192
%194 = load i8*, i8** %193
%195 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %31, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* %174, i8* %178, i8* %182, i32* %6, i8* %186, float* %7, i8* %190, float* %8, i8* %194, float* %9)
%196 = load i32, i32* %3
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %21, i64 0, i64 %197
%199 = load i8*, i8** %198
%200 = call i64 @strncmp(i8* %199, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 8)
%201 = icmp eq i64 %200, 0
br i1 %201, label %202, label %203
202: ; preds = %167
br label %207
203: ; preds = %167
br label %204
204: ; preds = %203
%205 = load i32, i32* %3
%206 = add nsw i32 %205, 1
store i32 %206, i32* %3
br label %164
207: ; preds = %202, %164
%208 = load i32, i32* %3
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %19, i64 0, i64 %209
%211 = load i8*, i8** %210
%212 = load i32, i32* %3
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %20, i64 0, i64 %213
%215 = load i8*, i8** %214
%216 = load i32, i32* %3
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %21, i64 0, i64 %217
%219 = load i8*, i8** %218
%220 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %31, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* %211, i8* %215, i8* %219, float* %13)
%221 = load i32, i32* %5
%222 = load i32*, i32** %26
%223 = call i32 @fgets(i8* %31, i32 %221, i32* %222)
%224 = load i32, i32* %3
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %19, i64 0, i64 %225
%227 = load i8*, i8** %226
%228 = load i32, i32* %3
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %20, i64 0, i64 %229
%231 = load i8*, i8** %230
%232 = load i32, i32* %3
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %21, i64 0, i64 %233
%235 = load i8*, i8** %234
%236 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %31, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* %227, i8* %231, i8* %235, float* %14)
%237 = load i32, i32* %5
%238 = load i32*, i32** %26
%239 = call i32 @fgets(i8* %31, i32 %237, i32* %238)
%240 = load i32, i32* %3
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %19, i64 0, i64 %241
%243 = load i8*, i8** %242
%244 = load i32, i32* %3
%245 = sext i32 %244 to i64
%246 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %20, i64 0, i64 %245
%247 = load i8*, i8** %246
%248 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %31, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* %243, i8* %247, float* %15)
%249 = load float, float* %10
%250 = load float, float* %13
%251 = fsub float %249, %250
store float %251, float* %16
%252 = load i32*, i32** %27
%253 = load float, float* %10
%254 = load float, float* %13
%255 = load float, float* %16
%256 = call i32 @fprintf(i32* %252, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), float %253, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), float %254, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), float %255)
store i32 0, i32* %2
br label %257
257: ; preds = %291, %207
%258 = load i32, i32* %2
%259 = icmp slt i32 %258, 1000
br i1 %259, label %260, label %294
260: ; preds = %257
%261 = load i32, i32* %2
%262 = sext i32 %261 to i64
%263 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %19, i64 0, i64 %262
%264 = load i8*, i8** %263
%265 = call i32 @free(i8* %264)
%266 = load i32, i32* %2
%267 = sext i32 %266 to i64
%268 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %20, i64 0, i64 %267
%269 = load i8*, i8** %268
%270 = call i32 @free(i8* %269)
%271 = load i32, i32* %2
%272 = sext i32 %271 to i64
%273 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %21, i64 0, i64 %272
%274 = load i8*, i8** %273
%275 = call i32 @free(i8* %274)
%276 = load i32, i32* %2
%277 = sext i32 %276 to i64
%278 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %22, i64 0, i64 %277
%279 = load i8*, i8** %278
%280 = call i32 @free(i8* %279)
%281 = load i32, i32* %2
%282 = sext i32 %281 to i64
%283 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %23, i64 0, i64 %282
%284 = load i8*, i8** %283
%285 = call i32 @free(i8* %284)
%286 = load i32, i32* %2
%287 = sext i32 %286 to i64
%288 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %24, i64 0, i64 %287
%289 = load i8*, i8** %288
%290 = call i32 @free(i8* %289)
br label %291
291: ; preds = %260
%292 = load i32, i32* %2
%293 = add nsw i32 %292, 1
store i32 %293, i32* %2
br label %257
294: ; preds = %257
%295 = load i32*, i32** %25
%296 = call i32 @fclose(i32* %295)
%297 = load i32*, i32** %26
%298 = call i32 @fclose(i32* %297)
%299 = load i32*, i32** %27
%300 = call i32 @fclose(i32* %299)
%301 = load i8*, i8** %17
%302 = load i32, i32* %1
ret i32 %302
}

LLVM IR (-O2):
@.str = [15 x i8] c"before_opt.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [14 x i8] c"after_opt.txt\00"
@.str.3 = [11 x i8] c"energy.txt\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [30 x i8] c"%s %s %s %i %s %f %s %f %s %f\00"
@.str.6 = [9 x i8] c"internal\00"
@.str.7 = [12 x i8] c"%s %s %s %f\00"
@.str.8 = [9 x i8] c"%s %s %f\00"
@.str.9 = [16 x i8] c" %f %s %f %s %f\00"
@.str.10 = [2 x i8] c":\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca [1000 x i8*]
%12 = alloca [1000 x i8*]
%13 = alloca [1000 x i8*]
%14 = alloca [1000 x i8*]
%15 = alloca [1000 x i8*]
%16 = alloca [1000 x i8*]
%17 = bitcast i32* %1 to i8*
%18 = bitcast float* %2 to i8*
%19 = bitcast float* %3 to i8*
%20 = bitcast float* %4 to i8*
%21 = bitcast float* %5 to i8*
%22 = bitcast float* %6 to i8*
%23 = bitcast float* %7 to i8*
%24 = bitcast float* %8 to i8*
%25 = bitcast float* %9 to i8*
%26 = bitcast float* %10 to i8*
%27 = tail call i8* @llvm.stacksave()
%28 = alloca [1000 x i8]
%29 = bitcast [1000 x i8*]* %11 to i8*
%30 = bitcast [1000 x i8*]* %12 to i8*
%31 = bitcast [1000 x i8*]* %13 to i8*
%32 = bitcast [1000 x i8*]* %14 to i8*
%33 = bitcast [1000 x i8*]* %15 to i8*
%34 = bitcast [1000 x i8*]* %16 to i8*
br label %35
35: ; preds = %0, %35
%36 = phi i64 [ 0, %0 ], [ %55, %35 ]
%37 = tail call i64 @malloc(i32 1000)
%38 = inttoptr i64 %37 to i8*
%39 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %11, i64 0, i64 %36
store i8* %38, i8** %39
%40 = tail call i64 @malloc(i32 1000)
%41 = inttoptr i64 %40 to i8*
%42 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %12, i64 0, i64 %36
store i8* %41, i8** %42
%43 = tail call i64 @malloc(i32 1000)
%44 = inttoptr i64 %43 to i8*
%45 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %13, i64 0, i64 %36
store i8* %44, i8** %45
%46 = tail call i64 @malloc(i32 1000)
%47 = inttoptr i64 %46 to i8*
%48 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %14, i64 0, i64 %36
store i8* %47, i8** %48
%49 = tail call i64 @malloc(i32 1000)
%50 = inttoptr i64 %49 to i8*
%51 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %15, i64 0, i64 %36
store i8* %50, i8** %51
%52 = tail call i64 @malloc(i32 1000)
%53 = inttoptr i64 %52 to i8*
%54 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %16, i64 0, i64 %36
store i8* %53, i8** %54
%55 = add nuw nsw i64 %36, 1
%56 = icmp eq i64 %55, 1000
br i1 %56, label %57, label %35
57: ; preds = %35
%58 = getelementptr inbounds [1000 x i8], [1000 x i8]* %28, i64 0, i64 0
%59 = tail call i32* @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%60 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%61 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %62
62: ; preds = %57, %80
%63 = phi i64 [ 0, %57 ], [ %81, %80 ]
%64 = call i32 @fgets(i8* %58, i32 1000, i32* %59)
%65 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %11, i64 0, i64 %63
%66 = load i8*, i8** %65
%67 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %12, i64 0, i64 %63
%68 = load i8*, i8** %67
%69 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %13, i64 0, i64 %63
%70 = load i8*, i8** %69
%71 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %14, i64 0, i64 %63
%72 = load i8*, i8** %71
%73 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %15, i64 0, i64 %63
%74 = load i8*, i8** %73
%75 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %16, i64 0, i64 %63
%76 = load i8*, i8** %75
%77 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %58, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* %66, i8* %68, i8* %70, i32* %1, i8* %72, float* %2, i8* %74, float* %3, i8* %76, float* %4)
%78 = call i64 @strncmp(i8* %70, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 8)
%79 = icmp eq i64 %78, 0
br i1 %79, label %83, label %80
80: ; preds = %62
%81 = add nuw nsw i64 %63, 1
%82 = icmp eq i64 %81, 1000
br i1 %82, label %83, label %62
83: ; preds = %62, %80
%84 = phi i64 [ %63, %62 ], [ 1000, %80 ]
%85 = and i64 %84, 4294967295
%86 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %11, i64 0, i64 %85
%87 = load i8*, i8** %86
%88 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %12, i64 0, i64 %85
%89 = load i8*, i8** %88
%90 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %13, i64 0, i64 %85
%91 = load i8*, i8** %90
%92 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %58, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* %87, i8* %89, i8* %91, float* %5)
%93 = call i32 @fgets(i8* %58, i32 1000, i32* %59)
%94 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %58, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* %87, i8* %89, i8* %91, float* %6)
%95 = call i32 @fgets(i8* %58, i32 1000, i32* %59)
%96 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %58, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* %87, i8* %89, float* %7)
br label %97
97: ; preds = %83, %115
%98 = phi i64 [ 0, %83 ], [ %116, %115 ]
%99 = call i32 @fgets(i8* %58, i32 1000, i32* %60)
%100 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %11, i64 0, i64 %98
%101 = load i8*, i8** %100
%102 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %12, i64 0, i64 %98
%103 = load i8*, i8** %102
%104 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %13, i64 0, i64 %98
%105 = load i8*, i8** %104
%106 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %14, i64 0, i64 %98
%107 = load i8*, i8** %106
%108 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %15, i64 0, i64 %98
%109 = load i8*, i8** %108
%110 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %16, i64 0, i64 %98
%111 = load i8*, i8** %110
%112 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %58, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* %101, i8* %103, i8* %105, i32* %1, i8* %107, float* %2, i8* %109, float* %3, i8* %111, float* %4)
%113 = call i64 @strncmp(i8* %105, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 8)
%114 = icmp eq i64 %113, 0
br i1 %114, label %118, label %115
115: ; preds = %97
%116 = add nuw nsw i64 %98, 1
%117 = icmp eq i64 %116, 1000
br i1 %117, label %118, label %97
118: ; preds = %97, %115
%119 = phi i64 [ %98, %97 ], [ 1000, %115 ]
%120 = and i64 %119, 4294967295
%121 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %11, i64 0, i64 %120
%122 = load i8*, i8** %121
%123 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %12, i64 0, i64 %120
%124 = load i8*, i8** %123
%125 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %13, i64 0, i64 %120
%126 = load i8*, i8** %125
%127 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %58, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* %122, i8* %124, i8* %126, float* %8)
%128 = call i32 @fgets(i8* %58, i32 1000, i32* %60)
%129 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %58, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* %122, i8* %124, i8* %126, float* %9)
%130 = call i32 @fgets(i8* %58, i32 1000, i32* %60)
%131 = call i32 (i8*, i8*, i8*, i8*, ...) @sscanf(i8* %58, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* %122, i8* %124, float* %10)
%132 = load float, float* %5
%133 = load float, float* %8
%134 = fsub float %132, %133
%135 = call i32 @fprintf(i32* %61, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), float %132, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), float %133, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), float %134)
br label %136
136: ; preds = %118, %136
%137 = phi i64 [ 0, %118 ], [ %156, %136 ]
%138 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %11, i64 0, i64 %137
%139 = load i8*, i8** %138
%140 = call i32 @free(i8* %139)
%141 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %12, i64 0, i64 %137
%142 = load i8*, i8** %141
%143 = call i32 @free(i8* %142)
%144 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %13, i64 0, i64 %137
%145 = load i8*, i8** %144
%146 = call i32 @free(i8* %145)
%147 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %14, i64 0, i64 %137
%148 = load i8*, i8** %147
%149 = call i32 @free(i8* %148)
%150 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %15, i64 0, i64 %137
%151 = load i8*, i8** %150
%152 = call i32 @free(i8* %151)
%153 = getelementptr inbounds [1000 x i8*], [1000 x i8*]* %16, i64 0, i64 %137
%154 = load i8*, i8** %153
%155 = call i32 @free(i8* %154)
%156 = add nuw nsw i64 %137, 1
%157 = icmp eq i64 %156, 1000
br i1 %157, label %158, label %136
158: ; preds = %136
%159 = call i32 @fclose(i32* %59)
%160 = call i32 @fclose(i32* %60)
%161 = call i32 @fclose(i32* %61)
ret i32 0
}