#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*/ plotvel;
typedef int /*<<< orphan*/ ploterr;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
double fabs(double);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, double);
int /*<<< orphan*/ printf(char *, ...);
double sqrt(double);
int /*<<< orphan*/ sscanf(char *, char *, ...);
int main(int argc, char *argv[]) {
  char buf[32768];
  char fname[256];
  int line, j, np, yr, dy, hr, mn, sc, mon, qual;
  double vvel, velerr, sum1, sum2, h, dt;
  double plotvel[21], ploterr[21];
  static double tim[100000], vel[100000], verr[100000], wt[100000];
  FILE *file1;
  if (argc > 1)
    sscanf(argv[1], "%s", "data.txt");
  if ((file1 = fopen("data.txt", "r")) == NULL) {
    printf("cannot open file:%s\n", "data.txt");
    return 0;
  }
  line = j = np = 0;
  printf("file %s\n", fname);
  while (fgets(buf, 32768, file1) != 0) {
    if (buf[0] != '*' && buf[0] != '\n') {
      velerr = 0;
      sscanf(buf, "%d %d %d %lf %d %lf %d %d %d", &mn, &hr, &sc, &velerr, &dy,
             &vvel, &yr, &mon, &qual);
      if (velerr && fabs(vvel) < 200) {
        vel[j] = vvel;
        verr[j] = velerr;
        tim[j] = hr + mn / 60.0 - 4.0;
        if (tim[j] > 12)
          tim[j] += -12;
        j++;
      }
      line++;
    }
  }
  np = j;
  fclose(file1);
  dt = 0.5;
  int i = 0;
  for (h = -5; h <= 5; h += dt) {
    vvel = sum1 = 0;
    for (j = 0; j < np; j++) {
      wt[j] = 0;
      if (fabs(tim[j] - h) < dt / 2.0) {
        vvel += vel[j];
        wt[j] = 1;
        sum1++;
      }
    }
    vvel = vvel / sum1;
    sum1 = sum2 = 0;
    for (j = 0; j < np; j++) {
      if (wt[j]) {
        sum2 += (vel[j] - vvel) * (vel[j] - vvel);
        sum1++;
      }
    }
    velerr = 3.0 * sqrt(sum2 / sum1) / sqrt(sum1 - 1);
    printf("hr %4.1f vvel %5.2f err %5.2f num %4.0f\n", h, vvel, velerr, sum1);
    plotvel[i] = vvel;
    ploterr[i] = velerr;
    i++;
  }
  FILE *f = fopen("out_half.txt", "wb");
  for (int k = 0; k < sizeof(plotvel) / sizeof(plotvel[0]); k++) {
    fprintf(f, "%5.2f\n", plotvel[k]);
  }
  fclose(f);
  FILE *f2 = fopen("out_err_half.txt", "wb");
  for (int k = 0; k < sizeof(ploterr) / sizeof(ploterr[0]); k++) {
    fprintf(f2, "%5.2f\n", ploterr[k]);
  }
  fclose(f2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x8320,%rsp
movl   $0x0,-0x14(%rbp)
mov    %edi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
cmpl   $0x1,-0x18(%rbp)
jle    11b3 <main+0x43>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xecb(%rip),%rsi
lea    0xec7(%rip),%rdx
mov    $0x0,%al
call   1070 <sscanf@plt>
lea    0xeb9(%rip),%rdi
lea    0xebb(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x82d8(%rbp)
cmp    $0x0,%rax
jne    11f8 <main+0x88>
lea    0xea0(%rip),%rdi
lea    0xe8e(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
jmp    1831 <main+0x6c1>
movl   $0x0,-0x812c(%rbp)
movl   $0x0,-0x8128(%rbp)
movl   $0x0,-0x8124(%rbp)
lea    -0x8120(%rbp),%rsi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x8020(%rbp),%rdi
mov    -0x82d8(%rbp),%rdx
mov    $0x8000,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     140d <main+0x29d>
movsbl -0x8020(%rbp),%eax
cmp    $0x2a,%eax
je     1408 <main+0x298>
movsbl -0x8020(%rbp),%eax
cmp    $0xa,%eax
je     1408 <main+0x298>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8158(%rbp)
ff
lea    -0x8020(%rbp),%rdi
lea    0xe16(%rip),%rsi
lea    -0x813c(%rbp),%rdx
lea    -0x8138(%rbp),%rcx
lea    -0x8140(%rbp),%r8
lea    -0x8158(%rbp),%r9
lea    -0x8134(%rbp),%r14
lea    -0x8150(%rbp),%rbx
lea    -0x8130(%rbp),%r11
lea    -0x8144(%rbp),%r10
lea    -0x8148(%rbp),%rax
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    $0x0,%al
call   1070 <sscanf@plt>
movsd  -0x8158(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1304 <main+0x194>
jp     1304 <main+0x194>
jmp    13f9 <main+0x289>
movsd  -0x8150(%rbp),%xmm1
ff
movaps 0xd4d(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xd11(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    13f9 <main+0x289>
movsd  -0x8150(%rbp),%xmm0
ff
movslq -0x8128(%rbp),%rcx
lea    0xc6231(%rip),%rax
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x8158(%rbp),%xmm0
ff
movslq -0x8128(%rbp),%rcx
lea    0x189716(%rip),%rax
movsd  %xmm0,(%rax,%rcx,8)
cvtsi2sdl -0x8138(%rbp),%xmm0
ff
cvtsi2sdl -0x813c(%rbp),%xmm1
ff
movsd  0xcd1(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xcb9(%rip),%xmm1
subsd  %xmm1,%xmm0
movslq -0x8128(%rbp),%rcx
lea    0x2cd7(%rip),%rax
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x8128(%rbp),%rcx
lea    0x2cc4(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
movsd  0xc7f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13ea <main+0x27a>
movslq -0x8128(%rbp),%rcx
movsd  0xc7e(%rip),%xmm0
lea    0x2c97(%rip),%rax
addsd  (%rax,%rcx,8),%xmm0
lea    0x2c8b(%rip),%rax
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8128(%rbp)
mov    -0x8124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8124(%rbp)
jmp    122b <main+0xbb>
mov    -0x8128(%rbp),%eax
mov    %eax,-0x812c(%rbp)
mov    -0x82d8(%rbp),%rdi
call   1030 <fclose@plt>
movsd  0xbdb(%rip),%xmm0
movsd  %xmm0,-0x8178(%rbp)
ff
movl   $0x0,-0x82dc(%rbp)
movsd  0xbb9(%rip),%xmm0
movsd  %xmm0,-0x8170(%rbp)
ff
movsd  0xbb9(%rip),%xmm0
ucomisd -0x8170(%rbp),%xmm0
ff
jb     173a <main+0x5ca>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8160(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8150(%rbp)
ff
movl   $0x0,-0x8128(%rbp)
mov    -0x8128(%rbp),%eax
cmp    -0x812c(%rbp),%eax
jge    1560 <main+0x3f0>
movslq -0x8128(%rbp),%rcx
lea    0x24cacb(%rip),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x8128(%rbp),%rcx
lea    0x2bb5(%rip),%rax
movsd  (%rax,%rcx,8),%xmm1
subsd  -0x8170(%rbp),%xmm1
ff
movaps 0xb91(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x8178(%rbp),%xmm0
ff
movsd  0xb45(%rip),%xmm2
divsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1547 <main+0x3d7>
movslq -0x8128(%rbp),%rcx
lea    0xc6071(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x8150(%rbp),%xmm0
ff
movsd  %xmm0,-0x8150(%rbp)
ff
movslq -0x8128(%rbp),%rcx
lea    0x24ca4e(%rip),%rax
movsd  0xaee(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xae1(%rip),%xmm0
addsd  -0x8160(%rbp),%xmm0
ff
movsd  %xmm0,-0x8160(%rbp)
ff
jmp    154c <main+0x3dc>
mov    -0x8128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8128(%rbp)
jmp    1485 <main+0x315>
movsd  -0x8150(%rbp),%xmm0
ff
divsd  -0x8160(%rbp),%xmm0
ff
movsd  %xmm0,-0x8150(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8168(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8160(%rbp)
ff
movl   $0x0,-0x8128(%rbp)
mov    -0x8128(%rbp),%eax
cmp    -0x812c(%rbp),%eax
jge    1654 <main+0x4e4>
movslq -0x8128(%rbp),%rcx
lea    0x24c9b8(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    15d5 <main+0x465>
jp     15d5 <main+0x465>
jmp    163b <main+0x4cb>
movslq -0x8128(%rbp),%rcx
lea    0xc5f8d(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x8150(%rbp),%xmm0
ff
movslq -0x8128(%rbp),%rcx
lea    0xc5f72(%rip),%rax
movsd  (%rax,%rcx,8),%xmm2
subsd  -0x8150(%rbp),%xmm2
ff
movsd  -0x8168(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8168(%rbp)
ff
movsd  0x9ed(%rip),%xmm0
addsd  -0x8160(%rbp),%xmm0
ff
movsd  %xmm0,-0x8160(%rbp)
ff
jmp    1640 <main+0x4d0>
mov    -0x8128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8128(%rbp)
jmp    1598 <main+0x428>
movsd  -0x8168(%rbp),%xmm0
ff
divsd  -0x8160(%rbp),%xmm0
ff
call   1090 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0x9ac(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8308(%rbp)
ff
movsd  -0x8160(%rbp),%xmm0
ff
movsd  0x988(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1090 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x8308(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8158(%rbp)
ff
movsd  -0x8170(%rbp),%xmm0
ff
movsd  -0x8150(%rbp),%xmm1
ff
movsd  -0x8158(%rbp),%xmm2
ff
movsd  -0x8160(%rbp),%xmm3
ff
lea    0x9e2(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  -0x8150(%rbp),%xmm0
ff
movslq -0x82dc(%rbp),%rax
movsd  %xmm0,-0x8220(%rbp,%rax,8)
ff ff
movsd  -0x8158(%rbp),%xmm0
ff
movslq -0x82dc(%rbp),%rax
movsd  %xmm0,-0x82d0(%rbp,%rax,8)
ff ff
mov    -0x82dc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x82dc(%rbp)
movsd  -0x8178(%rbp),%xmm0
ff
addsd  -0x8170(%rbp),%xmm0
ff
movsd  %xmm0,-0x8170(%rbp)
ff
jmp    144f <main+0x2df>
lea    0x9a1(%rip),%rdi
lea    0x9a7(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x82e8(%rbp)
movl   $0x0,-0x82ec(%rbp)
movslq -0x82ec(%rbp),%rax
cmp    $0x15,%rax
jae    17a6 <main+0x636>
mov    -0x82e8(%rbp),%rdi
movslq -0x82ec(%rbp),%rax
movsd  -0x8220(%rbp,%rax,8),%xmm0
ff ff
lea    0x965(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x82ec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x82ec(%rbp)
jmp    175e <main+0x5ee>
mov    -0x82e8(%rbp),%rdi
call   1030 <fclose@plt>
lea    0x940(%rip),%rdi
lea    0x92f(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x82f8(%rbp)
movl   $0x0,-0x82fc(%rbp)
movslq -0x82fc(%rbp),%rax
cmp    $0x15,%rax
jae    181e <main+0x6ae>
mov    -0x82f8(%rbp),%rdi
movslq -0x82fc(%rbp),%rax
movsd  -0x82d0(%rbp,%rax,8),%xmm0
ff ff
lea    0x8ed(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x82fc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x82fc(%rbp)
jmp    17d6 <main+0x666>
mov    -0x82f8(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x8320,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x82b8,%rsp
cmp    $0x2,%edi
jl     119f <main+0x2f>
mov    0x8(%rsi),%rdi
lea    0xedf(%rip),%rsi
lea    0xedb(%rip),%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
lea    0xecd(%rip),%rdi
lea    0xecf(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     1956 <main+0x7e6>
mov    %rax,%rbx
lea    0xece(%rip),%rdi
xor    %r12d,%r12d
lea    0x1b0(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x2b0(%rsp),%rdi
mov    $0x8000,%esi
mov    %rbx,%rdx
call   1050 <fgets@plt>
test   %rax,%rax
je     1331 <main+0x1c1>
lea    0x2b0(%rsp),%r14
lea    0x44(%rsp),%r13
lea    0x8(%rsp),%r15
xor    %r12d,%r12d
jmp    1229 <main+0xb9>
nopl   0x0(%rax)
mov    %r14,%rdi
mov    $0x8000,%esi
mov    %rbx,%rdx
call   1050 <fgets@plt>
test   %rax,%rax
je     1331 <main+0x1c1>
movzbl 0x2b0(%rsp),%eax
and    $0xdf,%al
cmp    $0xa,%al
je     1210 <main+0xa0>
movq   $0x0,0x8(%rsp)
sub    $0x8,%rsp
mov    %r14,%rdi
lea    0xe4e(%rip),%rsi
lea    0x20(%rsp),%rdx
lea    0x24(%rsp),%rcx
mov    %r13,%r8
mov    %r15,%r9
xor    %eax,%eax
lea    0x44(%rsp),%rbp
push   %rbp
lea    0x50(%rsp),%rbp
push   %rbp
lea    0x64(%rsp),%rbp
push   %rbp
lea    0x20(%rsp),%rbp
push   %rbp
lea    0x70(%rsp),%rbp
push   %rbp
call   1070 <sscanf@plt>
add    $0x30,%rsp
movsd  0x8(%rsp),%xmm0
ucomisd 0xdd3(%rip),%xmm0
jne    129d <main+0x12d>
jnp    1210 <main+0xa0>
movsd  (%rsp),%xmm0
movapd %xmm0,%xmm1
andpd  0xd52(%rip),%xmm1
movsd  0xd5a(%rip),%xmm2
ucomisd %xmm1,%xmm2
jbe    1210 <main+0xa0>
movslq %r12d,%r12
lea    0xc62a6(%rip),%rax
movsd  %xmm0,(%rax,%r12,8)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x1c(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdl 0x18(%rsp),%xmm1
divsd  0xd2e(%rip),%xmm1
addsd  %xmm0,%xmm1
addsd  0xd2a(%rip),%xmm1
movapd %xmm1,%xmm0
addsd  0xd26(%rip),%xmm0
movsd  0xd26(%rip),%xmm2
cmpltsd %xmm1,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm0,%xmm2
lea    0x2d4e(%rip),%rax
movlpd %xmm2,(%rax,%r12,8)
add    $0x1,%r12d
jmp    1210 <main+0xa0>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %r12d,%ecx
mov    %ecx,%r12d
and    $0xfffffffe,%r12d
lea    0x0(,%rcx,8),%rbx
movsd  0xce5(%rip),%xmm7
xor    %r13d,%r13d
lea    0x189713(%rip),%rbp
lea    0x2d0c(%rip),%r14
movapd 0xc94(%rip),%xmm4
movsd  0xccc(%rip),%xmm5
lea    0xc61f5(%rip),%r15
movabs $0x3ff0000000000000,%rdx
movsd  0xcbb(%rip),%xmm6
xorpd  %xmm8,%xmm8
mov    %rcx,0x30(%rsp)
jmp    1441 <main+0x2d1>
nopl   0x0(%rax)
movsd  %xmm2,0x28(%rsp)
call   1090 <sqrt@plt>
movsd  0x28(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
movsd  0x10(%rsp),%xmm4
divsd  %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  (%rsp),%xmm1
lea    0xce6(%rip),%rdi
movaps %xmm4,%xmm0
mov    $0x4,%al
call   1040 <printf@plt>
movsd  0x10(%rsp),%xmm7
movsd  (%rsp),%xmm0
movsd  %xmm0,0x100(%rsp,%r13,8)
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp,%r13,8)
add    $0x1,%r13
addsd  0xc55(%rip),%xmm7
cmp    $0x15,%r13
mov    0x30(%rsp),%rcx
movapd 0xbe4(%rip),%xmm4
movsd  0xc1c(%rip),%xmm5
movabs $0x3ff0000000000000,%rdx
movsd  0xc12(%rip),%xmm6
xorpd  %xmm8,%xmm8
je     15dc <main+0x46c>
test   %ecx,%ecx
jle    1560 <main+0x3f0>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
xorpd  %xmm1,%xmm1
jmp    1469 <main+0x2f9>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x8,%rax
cmp    %rax,%rbx
je     14a0 <main+0x330>
movq   $0x0,(%rax,%rbp,1)
movsd  (%rax,%r14,1),%xmm2
subsd  %xmm7,%xmm2
andpd  %xmm4,%xmm2
ucomisd %xmm2,%xmm5
jbe    1460 <main+0x2f0>
addsd  (%rax,%r15,1),%xmm1
mov    %rdx,(%rax,%rbp,1)
addsd  %xmm6,%xmm0
jmp    1460 <main+0x2f0>
cs nopw 0x0(%rax,%rax,1)
nop
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
test   %ecx,%ecx
jle    156e <main+0x3fe>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
xorpd  %xmm3,%xmm3
cmp    $0x1,%ecx
jne    1509 <main+0x399>
test   $0x1,%cl
je     1576 <main+0x406>
movsd  0x0(%rbp,%rax,8),%xmm2
ucomisd %xmm8,%xmm2
jne    14dc <main+0x36c>
jnp    1576 <main+0x406>
movsd  (%r15,%rax,8),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm2
addsd  %xmm2,%xmm0
addsd  %xmm6,%xmm3
jmp    1576 <main+0x406>
nopw   0x0(%rax,%rax,1)
add    $0x2,%rax
cmp    %rax,%r12
je     14c0 <main+0x350>
movsd  0x0(%rbp,%rax,8),%xmm2
ucomisd %xmm8,%xmm2
jne    1518 <main+0x3a8>
jnp    152e <main+0x3be>
movsd  (%r15,%rax,8),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm2
addsd  %xmm2,%xmm0
addsd  %xmm6,%xmm3
movsd  0x8(%rbp,%rax,8),%xmm2
ucomisd %xmm8,%xmm2
jne    153d <main+0x3cd>
jnp    1500 <main+0x390>
movsd  0x8(%r15,%rax,8),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm2
addsd  %xmm2,%xmm0
addsd  %xmm6,%xmm3
jmp    1500 <main+0x390>
cs nopw 0x0(%rax,%rax,1)
movabs $0x7ff8000000000000,%rax
mov    %rax,(%rsp)
xorpd  %xmm3,%xmm3
xorpd  %xmm0,%xmm0
divsd  %xmm3,%xmm0
ucomisd %xmm8,%xmm0
movsd  %xmm7,0x10(%rsp)
movsd  %xmm3,0x20(%rsp)
jb     15a0 <main+0x430>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
jmp    15b4 <main+0x444>
cs nopw 0x0(%rax,%rax,1)
call   1090 <sqrt@plt>
movsd  0x20(%rsp),%xmm3
xorpd  %xmm8,%xmm8
movapd %xmm0,%xmm2
mulsd  0xa94(%rip),%xmm2
movapd %xmm3,%xmm0
addsd  0xa90(%rip),%xmm0
ucomisd %xmm8,%xmm0
jb     13a0 <main+0x230>
sqrtsd %xmm0,%xmm0
jmp    13b7 <main+0x247>
lea    0xaff(%rip),%rdi
lea    0xb05(%rip),%r14
mov    %r14,%rsi
call   1080 <fopen@plt>
mov    %rax,%rbx
movsd  0x100(%rsp),%xmm0
lea    0xaed(%rip),%r15
mov    %rax,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x108(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x110(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x118(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x120(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x128(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x130(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x138(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x140(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x148(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x150(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x158(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x160(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x168(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x170(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x178(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x180(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x188(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x190(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x198(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x1a0(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0x94a(%rip),%rdi
mov    %r14,%rsi
call   1080 <fopen@plt>
mov    %rax,%rbx
movsd  0x50(%rsp),%xmm0
mov    %rax,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x58(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x60(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x68(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x70(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x78(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x80(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x88(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x90(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0x98(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0xa0(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0xa8(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0xb0(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0xb8(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0xc0(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0xc8(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0xd0(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0xd8(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0xe0(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0xe8(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
movsd  0xf0(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
jmp    196b <main+0x7fb>
lea    0x721(%rip),%rdi
lea    0x70f(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x82b8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@main.tim = internal global [100000 x double] zeroinitializer
@main.vel = internal global [100000 x double] zeroinitializer
@main.verr = internal global [100000 x double] zeroinitializer
@main.wt = internal global [100000 x double] zeroinitializer
@.str = [3 x i8] c"%s\00"
@.str.1 = [9 x i8] c"data.txt\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [21 x i8] c"cannot open file:%s\0A\00"
@.str.4 = [9 x i8] c"file %s\0A\00"
@.str.5 = [29 x i8] c"%d %d %d %lf %d %lf %d %d %d\00"
@.str.6 = [41 x i8] c"hr %4.1f vvel %5.2f err %5.2f num %4.0f\0A\00"
@.str.7 = [13 x i8] c"out_half.txt\00"
@.str.8 = [3 x i8] c"wb\00"
@.str.9 = [7 x i8] c"%5.2f\0A\00"
@.str.10 = [17 x i8] c"out_err_half.txt\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [32768 x i8]
%7 = alloca [256 x i8]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca [21 x double]
%25 = alloca [21 x double]
%26 = alloca i32*
%27 = alloca i32
%28 = alloca i32*
%29 = alloca i32
%30 = alloca i32*
%31 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%32 = load i32, i32* %4
%33 = icmp sgt i32 %32, 1
br i1 %33, label %34, label %39
34: ; preds = %2
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = call i32 (i8*, i8*, ...) @sscanf(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %39
39: ; preds = %34, %2
%40 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %40, i32** %26
%41 = icmp eq i32* %40, null
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %251
44: ; preds = %39
store i32 0, i32* %10
store i32 0, i32* %9
store i32 0, i32* %8
%45 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %45)
br label %47
47: ; preds = %107, %44
%48 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 0
%49 = load i32*, i32** %26
%50 = call i64 @fgets(i8* %48, i32 32768, i32* %49)
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %108
52: ; preds = %47
%53 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 0
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = icmp ne i32 %55, 42
br i1 %56, label %57, label %107
57: ; preds = %52
%58 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 0
%59 = load i8, i8* %58
%60 = sext i8 %59 to i32
%61 = icmp ne i32 %60, 10
br i1 %61, label %62, label %107
62: ; preds = %57
store double 0.000000e+00, double* %19
%63 = getelementptr inbounds [32768 x i8], [32768 x i8]* %6, i64 0, i64 0
%64 = call i32 (i8*, i8*, ...) @sscanf(i8* %63, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i32* %14, i32* %13, i32* %15, double* %19, i32* %12, double* %18, i32* %11, i32* %16, i32* %17)
%65 = load double, double* %19
%66 = fcmp une double %65, 0.000000e+00
br i1 %66, label %67, label %104
67: ; preds = %62
%68 = load double, double* %18
%69 = call double @llvm.fabs.f64(double %68)
%70 = fcmp olt double %69, 2.000000e+02
br i1 %70, label %71, label %104
71: ; preds = %67
%72 = load double, double* %18
%73 = load i32, i32* %9
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [100000 x double], [100000 x double]* @main.vel, i64 0, i64 %74
store double %72, double* %75
%76 = load double, double* %19
%77 = load i32, i32* %9
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [100000 x double], [100000 x double]* @main.verr, i64 0, i64 %78
store double %76, double* %79
%80 = load i32, i32* %13
%81 = sitofp i32 %80 to double
%82 = load i32, i32* %14
%83 = sitofp i32 %82 to double
%84 = fdiv double %83, 6.000000e+01
%85 = fadd double %81, %84
%86 = fsub double %85, 4.000000e+00
%87 = load i32, i32* %9
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [100000 x double], [100000 x double]* @main.tim, i64 0, i64 %88
store double %86, double* %89
%90 = load i32, i32* %9
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [100000 x double], [100000 x double]* @main.tim, i64 0, i64 %91
%93 = load double, double* %92
%94 = fcmp ogt double %93, 1.200000e+01
br i1 %94, label %95, label %101
95: ; preds = %71
%96 = load i32, i32* %9
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [100000 x double], [100000 x double]* @main.tim, i64 0, i64 %97
%99 = load double, double* %98
%100 = fadd double %99, -1.200000e+01
store double %100, double* %98
br label %101
101: ; preds = %95, %71
%102 = load i32, i32* %9
%103 = add nsw i32 %102, 1
store i32 %103, i32* %9
br label %104
104: ; preds = %101, %67, %62
%105 = load i32, i32* %8
%106 = add nsw i32 %105, 1
store i32 %106, i32* %8
br label %107
107: ; preds = %104, %57, %52
br label %47
108: ; preds = %47
%109 = load i32, i32* %9
store i32 %109, i32* %10
%110 = load i32*, i32** %26
%111 = call i32 @fclose(i32* %110)
store double 5.000000e-01, double* %23
store i32 0, i32* %27
store double -5.000000e+00, double* %22
br label %112
112: ; preds = %210, %108
%113 = load double, double* %22
%114 = fcmp ole double %113, 5.000000e+00
br i1 %114, label %115, label %214
115: ; preds = %112
store double 0.000000e+00, double* %20
store double 0.000000e+00, double* %18
store i32 0, i32* %9
br label %116
116: ; preds = %147, %115
%117 = load i32, i32* %9
%118 = load i32, i32* %10
%119 = icmp slt i32 %117, %118
br i1 %119, label %120, label %150
120: ; preds = %116
%121 = load i32, i32* %9
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [100000 x double], [100000 x double]* @main.wt, i64 0, i64 %122
store double 0.000000e+00, double* %123
%124 = load i32, i32* %9
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [100000 x double], [100000 x double]* @main.tim, i64 0, i64 %125
%127 = load double, double* %126
%128 = load double, double* %22
%129 = fsub double %127, %128
%130 = call double @llvm.fabs.f64(double %129)
%131 = load double, double* %23
%132 = fdiv double %131, 2.000000e+00
%133 = fcmp olt double %130, %132
br i1 %133, label %134, label %146
134: ; preds = %120
%135 = load i32, i32* %9
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds [100000 x double], [100000 x double]* @main.vel, i64 0, i64 %136
%138 = load double, double* %137
%139 = load double, double* %18
%140 = fadd double %139, %138
store double %140, double* %18
%141 = load i32, i32* %9
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds [100000 x double], [100000 x double]* @main.wt, i64 0, i64 %142
store double 1.000000e+00, double* %143
%144 = load double, double* %20
%145 = fadd double %144, 1.000000e+00
store double %145, double* %20
br label %146
146: ; preds = %134, %120
br label %147
147: ; preds = %146
%148 = load i32, i32* %9
%149 = add nsw i32 %148, 1
store i32 %149, i32* %9
br label %116
150: ; preds = %116
%151 = load double, double* %18
%152 = load double, double* %20
%153 = fdiv double %151, %152
store double %153, double* %18
store double 0.000000e+00, double* %21
store double 0.000000e+00, double* %20
store i32 0, i32* %9
br label %154
154: ; preds = %182, %150
%155 = load i32, i32* %9
%156 = load i32, i32* %10
%157 = icmp slt i32 %155, %156
br i1 %157, label %158, label %185
158: ; preds = %154
%159 = load i32, i32* %9
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds [100000 x double], [100000 x double]* @main.wt, i64 0, i64 %160
%162 = load double, double* %161
%163 = fcmp une double %162, 0.000000e+00
br i1 %163, label %164, label %181
164: ; preds = %158
%165 = load i32, i32* %9
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds [100000 x double], [100000 x double]* @main.vel, i64 0, i64 %166
%168 = load double, double* %167
%169 = load double, double* %18
%170 = fsub double %168, %169
%171 = load i32, i32* %9
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds [100000 x double], [100000 x double]* @main.vel, i64 0, i64 %172
%174 = load double, double* %173
%175 = load double, double* %18
%176 = fsub double %174, %175
%177 = load double, double* %21
%178 = call double @llvm.fmuladd.f64(double %170, double %176, double %177)
store double %178, double* %21
%179 = load double, double* %20
%180 = fadd double %179, 1.000000e+00
store double %180, double* %20
br label %181
181: ; preds = %164, %158
br label %182
182: ; preds = %181
%183 = load i32, i32* %9
%184 = add nsw i32 %183, 1
store i32 %184, i32* %9
br label %154
185: ; preds = %154
%186 = load double, double* %21
%187 = load double, double* %20
%188 = fdiv double %186, %187
%189 = call double @sqrt(double %188)
%190 = fmul double 3.000000e+00, %189
%191 = load double, double* %20
%192 = fsub double %191, 1.000000e+00
%193 = call double @sqrt(double %192)
%194 = fdiv double %190, %193
store double %194, double* %19
%195 = load double, double* %22
%196 = load double, double* %18
%197 = load double, double* %19
%198 = load double, double* %20
%199 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0), double %195, double %196, double %197, double %198)
%200 = load double, double* %18
%201 = load i32, i32* %27
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds [21 x double], [21 x double]* %24, i64 0, i64 %202
store double %200, double* %203
%204 = load double, double* %19
%205 = load i32, i32* %27
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds [21 x double], [21 x double]* %25, i64 0, i64 %206
store double %204, double* %207
%208 = load i32, i32* %27
%209 = add nsw i32 %208, 1
store i32 %209, i32* %27
br label %210
210: ; preds = %185
%211 = load double, double* %23
%212 = load double, double* %22
%213 = fadd double %212, %211
store double %213, double* %22
br label %112
214: ; preds = %112
%215 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
store i32* %215, i32** %28
store i32 0, i32* %29
br label %216
216: ; preds = %227, %214
%217 = load i32, i32* %29
%218 = sext i32 %217 to i64
%219 = icmp ult i64 %218, 21
br i1 %219, label %220, label %230
220: ; preds = %216
%221 = load i32*, i32** %28
%222 = load i32, i32* %29
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds [21 x double], [21 x double]* %24, i64 0, i64 %223
%225 = load double, double* %224
%226 = call i32 @fprintf(i32* %221, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), double %225)
br label %227
227: ; preds = %220
%228 = load i32, i32* %29
%229 = add nsw i32 %228, 1
store i32 %229, i32* %29
br label %216
230: ; preds = %216
%231 = load i32*, i32** %28
%232 = call i32 @fclose(i32* %231)
%233 = call i32* @fopen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
store i32* %233, i32** %30
store i32 0, i32* %31
br label %234
234: ; preds = %245, %230
%235 = load i32, i32* %31
%236 = sext i32 %235 to i64
%237 = icmp ult i64 %236, 21
br i1 %237, label %238, label %248
238: ; preds = %234
%239 = load i32*, i32** %30
%240 = load i32, i32* %31
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds [21 x double], [21 x double]* %25, i64 0, i64 %241
%243 = load double, double* %242
%244 = call i32 @fprintf(i32* %239, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), double %243)
br label %245
245: ; preds = %238
%246 = load i32, i32* %31
%247 = add nsw i32 %246, 1
store i32 %247, i32* %31
br label %234
248: ; preds = %234
%249 = load i32*, i32** %30
%250 = call i32 @fclose(i32* %249)
store i32 0, i32* %3
br label %251
251: ; preds = %248, %42
%252 = load i32, i32* %3
ret i32 %252
}

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