#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 */

/* Variables and functions */
int /*<<< orphan*/ assert(int);
double sqrt(double);
int ti_vidya_start(double const *);
int ti_vidya(int size, double const *const *inputs, double const *options,
             double *const *outputs) {
  const double *input = inputs[0];
  const int short_period = (int)options[0];
  const int long_period = (int)options[1];
  const double alpha = options[2];
  double *output = outputs[0];
  const double short_div = 1.0 / short_period;
  const double long_div = 1.0 / long_period;
  if (short_period < 1)
    return 1;
  if (long_period < short_period)
    return 1;
  if (long_period < 2)
    return 1;
  if (alpha < 0.0 || alpha > 1.0)
    return 1;
  if (size <= ti_vidya_start(options))
    return 0;
  double short_sum = 0;
  double short_sum2 = 0;
  double long_sum = 0;
  double long_sum2 = 0;
  int i;
  for (i = 0; i < long_period; ++i) {
    long_sum += input[i];
    long_sum2 += input[i] * input[i];
    if (i >= long_period - short_period) {
      short_sum += input[i];
      short_sum2 += input[i] * input[i];
    }
  }
  double val = input[long_period - 2];
  *output++ = val;
  if (long_period - 1 < size) {
    double short_stddev =
        sqrt(short_sum2 * short_div -
             (short_sum * short_div) * (short_sum * short_div));
    double long_stddev = sqrt(long_sum2 * long_div -
                              (long_sum * long_div) * (long_sum * long_div));
    double k = short_stddev / long_stddev;
    if (k != k)
      k = 0;
    k *= alpha;
    val = (input[long_period - 1] - val) * k + val;
    *output++ = val;
  }
  for (i = long_period; i < size; ++i) {
    long_sum += input[i];
    long_sum2 += input[i] * input[i];
    short_sum += input[i];
    short_sum2 += input[i] * input[i];
    long_sum -= input[i - long_period];
    long_sum2 -= input[i - long_period] * input[i - long_period];
    short_sum -= input[i - short_period];
    short_sum2 -= input[i - short_period] * input[i - short_period];
    {
      double short_stddev =
          sqrt(short_sum2 * short_div -
               (short_sum * short_div) * (short_sum * short_div));
      double long_stddev = sqrt(long_sum2 * long_div -
                                (long_sum * long_div) * (long_sum * long_div));
      double k = short_stddev / long_stddev;
      if (k != k)
        k = 0;
      k *= alpha;
      val = (input[i] - val) * k + val;
      *output++ = val;
    }
  }
  assert(output - outputs[0] == size - ti_vidya_start(options));
  return 0;
}


x86 assembly (clang, -O0):
<ti_vidya>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%rax
cvttsd2si 0x8(%rax),%eax
mov    %eax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
cvtsi2sdl -0x2c(%rbp),%xmm1
movsd  0xe6e(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
cvtsi2sdl -0x30(%rbp),%xmm1
movsd  0xe58(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
cmpl   $0x1,-0x2c(%rbp)
jge    11c7 <ti_vidya+0x97>
movl   $0x1,-0x4(%rbp)
jmp    17bc <ti_vidya+0x68c>
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    11df <ti_vidya+0xaf>
movl   $0x1,-0x4(%rbp)
jmp    17bc <ti_vidya+0x68c>
cmpl   $0x2,-0x30(%rbp)
jge    11f5 <ti_vidya+0xc5>
movl   $0x1,-0x4(%rbp)
jmp    17bc <ti_vidya+0x68c>
xorps  %xmm0,%xmm0
ucomisd -0x38(%rbp),%xmm0
ja     121a <ti_vidya+0xea>
movsd  -0x38(%rbp),%xmm0
movsd  0xdf0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1226 <ti_vidya+0xf6>
movl   $0x1,-0x4(%rbp)
jmp    17bc <ti_vidya+0x68c>
mov    -0x8(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <ti_vidya_start@plt>
mov    %eax,%ecx
mov    -0xb4(%rbp),%eax
cmp    %ecx,%eax
jg     1254 <ti_vidya+0x124>
movl   $0x0,-0x4(%rbp)
jmp    17bc <ti_vidya+0x68c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    1331 <ti_vidya+0x201>
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x74(%rbp),%eax
mov    -0x30(%rbp),%ecx
sub    -0x2c(%rbp),%ecx
cmp    %ecx,%eax
jl     131e <ti_vidya+0x1ee>
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1323 <ti_vidya+0x1f3>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    127b <ti_vidya+0x14b>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x40(%rbp)
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%eax
sub    $0x1,%eax
cmp    -0x8(%rbp),%eax
jge    14ad <ti_vidya+0x37d>
movsd  -0x60(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm3
mulsd  -0x48(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm3
mulsd  -0x50(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
divsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
ucomisd -0x98(%rbp),%xmm0
ff
jne    1444 <ti_vidya+0x314>
jp     1444 <ti_vidya+0x314>
jmp    144f <ti_vidya+0x31f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x80(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x40(%rbp)
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1766 <ti_vidya+0x636>
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x74(%rbp),%ecx
sub    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x68(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x74(%rbp),%ecx
sub    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x74(%rbp),%ecx
sub    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x74(%rbp),%ecx
sub    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x58(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x74(%rbp),%ecx
sub    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x74(%rbp),%ecx
sub    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x60(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm3
mulsd  -0x48(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm3
mulsd  -0x50(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
divsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
ucomisd -0xb0(%rbp),%xmm0
ff
jne    16f4 <ti_vidya+0x5c4>
jp     16f4 <ti_vidya+0x5c4>
jmp    16ff <ti_vidya+0x5cf>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x28(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x80(%rbp),%xmm0
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x40(%rbp)
movsd  %xmm0,(%rax)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    14b3 <ti_vidya+0x383>
mov    -0x40(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rcx),%rcx
sub    %rcx,%rax
sar    $0x3,%rax
mov    %rax,-0xc0(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc4(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <ti_vidya_start@plt>
mov    -0xc4(%rbp),%ecx
mov    %eax,%edx
mov    -0xc0(%rbp),%rax
sub    %edx,%ecx
movslq %ecx,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ti_vidya>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdx,%r12
mov    %edi,%edx
movupd (%r12),%xmm0
cvttpd2dq %xmm0,%xmm0
movdqa 0xeb8(%rip),%xmm1
pcmpgtd %xmm0,%xmm1
pshufd $0x50,%xmm1,%xmm1
movmskpd %xmm1,%edi
mov    $0x1,%eax
test   $0x1,%dil
jne    160e <ti_vidya+0x4de>
movd   %xmm0,%r13d
pshufd $0x55,%xmm0,%xmm0
movd   %xmm0,%r14d
mov    %r14d,%ebp
sub    %r13d,%ebp
jl     160e <ti_vidya+0x4de>
shr    %dil
jne    160e <ti_vidya+0x4de>
movsd  0x10(%r12),%xmm1
pxor   %xmm0,%xmm0
ucomisd %xmm1,%xmm0
ja     160e <ti_vidya+0x4de>
mov    %rcx,0x58(%rsp)
movsd  %xmm1,0x28(%rsp)
ucomisd 0xe40(%rip),%xmm1
ja     160e <ti_vidya+0x4de>
mov    (%rsi),%rbx
mov    0x58(%rsp),%rax
mov    (%rax),%r15
mov    %r12,%rdi
mov    %edx,0xc(%rsp)
call   1030 <ti_vidya_start@plt>
mov    0xc(%rsp),%r8d
mov    %eax,%ecx
xor    %eax,%eax
cmp    %r8d,%ecx
jge    160e <ti_vidya+0x4de>
movslq %ebp,%rax
mov    %r14d,%ecx
cmp    $0x1,%r14d
jne    1252 <ti_vidya+0x122>
xorpd  %xmm8,%xmm8
xorpd  %xmm7,%xmm7
xor    %edx,%edx
xorpd  %xmm9,%xmm9
xorps  %xmm0,%xmm0
cvtsi2sd %r13d,%xmm0
movsd  0xde5(%rip),%xmm5
xorps  %xmm1,%xmm1
cvtsi2sd %r14d,%xmm1
test   $0x1,%cl
je     130c <ti_vidya+0x1dc>
movsd  (%rbx,%rdx,8),%xmm2
movapd %xmm2,%xmm3
mulsd  %xmm2,%xmm3
cmp    %rax,%rdx
jl     1243 <ti_vidya+0x113>
addsd  %xmm3,%xmm9
jl     12f7 <ti_vidya+0x1c7>
movapd %xmm2,%xmm4
jmp    12ff <ti_vidya+0x1cf>
mov    %ecx,%esi
and    $0xfffffffe,%esi
xorpd  %xmm8,%xmm8
xorpd  %xmm7,%xmm7
xor    %edx,%edx
movsd  0xd9e(%rip),%xmm0
xorpd  %xmm9,%xmm9
jmp    12b9 <ti_vidya+0x189>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
addsd  %xmm5,%xmm9
movapd %xmm4,%xmm6
addsd  %xmm2,%xmm7
unpcklpd %xmm1,%xmm3
movapd %xmm8,%xmm1
addpd  %xmm3,%xmm1
addsd  %xmm5,%xmm7
unpcklpd %xmm4,%xmm6
movapd %xmm6,%xmm8
addpd  %xmm1,%xmm8
add    $0x2,%rdx
cmp    %rsi,%rdx
je     120b <ti_vidya+0xdb>
movsd  (%rbx,%rdx,8),%xmm1
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
cmp    %rax,%rdx
jl     12d0 <ti_vidya+0x1a0>
addsd  %xmm2,%xmm9
movapd %xmm0,%xmm3
jl     12da <ti_vidya+0x1aa>
movapd %xmm1,%xmm3
movsd  0x8(%rbx,%rdx,8),%xmm4
movapd %xmm4,%xmm5
mulsd  %xmm4,%xmm5
lea    0x1(%rdx),%rdi
cmp    %rax,%rdi
jge    1280 <ti_vidya+0x150>
movapd %xmm0,%xmm6
jmp    1289 <ti_vidya+0x159>
movsd  0xd09(%rip),%xmm4
addsd  %xmm3,%xmm7
unpcklpd %xmm2,%xmm4
addpd  %xmm4,%xmm8
movapd %xmm5,%xmm3
divsd  %xmm0,%xmm3
divsd  %xmm1,%xmm5
lea    -0x2(%r14),%eax
movsd  (%rbx,%rax,8),%xmm4
movsd  %xmm4,(%r15)
cmp    %r8d,%r14d
movsd  %xmm5,0x20(%rsp)
movsd  %xmm3,0x18(%rsp)
jle    1349 <ti_vidya+0x219>
add    $0x8,%r15
cmp    %r8d,%r14d
jl     145c <ti_vidya+0x32c>
jmp    15e1 <ti_vidya+0x4b1>
movapd %xmm3,%xmm1
mulsd  %xmm8,%xmm1
mulsd  %xmm1,%xmm1
movapd %xmm9,%xmm0
mulsd  %xmm3,%xmm0
subsd  %xmm1,%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
movapd %xmm7,0x40(%rsp)
movapd %xmm8,0x30(%rsp)
movapd %xmm9,0x60(%rsp)
movsd  %xmm4,0x10(%rsp)
jb     1390 <ti_vidya+0x260>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
jmp    13b0 <ti_vidya+0x280>
call   1050 <sqrt@plt>
xorpd  %xmm3,%xmm3
movsd  0x20(%rsp),%xmm5
movapd 0x30(%rsp),%xmm8
movapd 0x40(%rsp),%xmm7
movapd %xmm0,%xmm2
lea    -0x1(%r14),%ebp
movapd %xmm8,%xmm1
unpckhpd %xmm8,%xmm1
mulsd  %xmm5,%xmm1
mulsd  %xmm1,%xmm1
movapd %xmm7,%xmm0
mulsd  %xmm5,%xmm0
subsd  %xmm1,%xmm0
ucomisd %xmm3,%xmm0
jb     13de <ti_vidya+0x2ae>
sqrtsd %xmm0,%xmm0
jmp    1402 <ti_vidya+0x2d2>
movapd %xmm2,0x70(%rsp)
call   1050 <sqrt@plt>
movapd 0x70(%rsp),%xmm2
movsd  0x20(%rsp),%xmm5
movapd 0x30(%rsp),%xmm8
movapd 0x40(%rsp),%xmm7
mov    0xc(%rsp),%r8d
movsd  0x28(%rsp),%xmm1
movapd 0x60(%rsp),%xmm9
movsd  0x18(%rsp),%xmm3
movsd  0x10(%rsp),%xmm4
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
cmpordsd %xmm2,%xmm0
andpd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
movslq %ebp,%rax
movsd  (%rbx,%rax,8),%xmm1
subsd  %xmm4,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm1,%xmm4
movsd  %xmm4,0x8(%r15)
add    $0x10,%r15
cmp    %r8d,%r14d
jge    15e1 <ti_vidya+0x4b1>
movslq %r14d,%rax
movslq %r13d,%rcx
movslq %r8d,%rbp
unpcklpd %xmm9,%xmm7
lea    0x0(,%rax,8),%r14
shl    $0x3,%rcx
mov    %r14,%r13
sub    %rcx,%r13
sub    %rax,%rbp
xorpd  %xmm6,%xmm6
jmp    1508 <ti_vidya+0x3d8>
nopl   0x0(%rax,%rax,1)
movapd %xmm2,0x60(%rsp)
call   1050 <sqrt@plt>
movapd 0x60(%rsp),%xmm2
xorpd  %xmm6,%xmm6
movsd  0x20(%rsp),%xmm5
movapd 0x30(%rsp),%xmm8
movapd 0x40(%rsp),%xmm7
movsd  0x28(%rsp),%xmm1
movsd  0x18(%rsp),%xmm3
movsd  0x10(%rsp),%xmm4
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
cmpordsd %xmm2,%xmm0
andpd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
movsd  (%rbx,%r14,1),%xmm1
subsd  %xmm4,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm1,%xmm4
movsd  %xmm4,(%r15)
add    $0x8,%r15
add    $0x8,%rbx
add    $0xffffffffffffffff,%rbp
je     15e1 <ti_vidya+0x4b1>
movsd  (%rbx,%r14,1),%xmm0
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
addpd  %xmm1,%xmm8
mulsd  %xmm0,%xmm0
unpcklpd %xmm0,%xmm0
addpd  %xmm0,%xmm7
movsd  (%rbx,%r13,1),%xmm0
movsd  (%rbx),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm1,%xmm2
subpd  %xmm2,%xmm8
unpcklpd %xmm0,%xmm1
mulpd  %xmm1,%xmm1
subpd  %xmm1,%xmm7
movapd %xmm3,%xmm1
mulsd  %xmm8,%xmm1
mulsd  %xmm1,%xmm1
movapd %xmm7,%xmm0
unpckhpd %xmm7,%xmm0
mulsd  %xmm3,%xmm0
subsd  %xmm1,%xmm0
ucomisd %xmm6,%xmm0
movapd %xmm7,0x40(%rsp)
movapd %xmm8,0x30(%rsp)
movsd  %xmm4,0x10(%rsp)
jb     1590 <ti_vidya+0x460>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
jmp    15b0 <ti_vidya+0x480>
nopl   0x0(%rax)
call   1050 <sqrt@plt>
xorpd  %xmm6,%xmm6
movsd  0x20(%rsp),%xmm5
movapd 0x30(%rsp),%xmm8
movapd 0x40(%rsp),%xmm7
movapd %xmm0,%xmm2
movapd %xmm8,%xmm1
unpckhpd %xmm8,%xmm1
mulsd  %xmm5,%xmm1
mulsd  %xmm1,%xmm1
movapd %xmm7,%xmm0
mulsd  %xmm5,%xmm0
subsd  %xmm1,%xmm0
ucomisd %xmm6,%xmm0
jb     1490 <ti_vidya+0x360>
sqrtsd %xmm0,%xmm0
jmp    14b8 <ti_vidya+0x388>
mov    0x58(%rsp),%rax
sub    (%rax),%r15
sar    $0x3,%r15
mov    %r12,%rdi
call   1030 <ti_vidya_start@plt>
mov    0xc(%rsp),%ecx
sub    %eax,%ecx
movslq %ecx,%rax
xor    %edi,%edi
cmp    %rax,%r15
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ti_vidya(i32 %0, double** %1, double* %2, double** %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double**
%8 = alloca double*
%9 = alloca double**
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%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 i32
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
store i32 %0, i32* %6
store double** %1, double*** %7
store double* %2, double** %8
store double** %3, double*** %9
%29 = load double**, double*** %7
%30 = getelementptr inbounds double*, double** %29, i64 0
%31 = load double*, double** %30
store double* %31, double** %10
%32 = load double*, double** %8
%33 = getelementptr inbounds double, double* %32, i64 0
%34 = load double, double* %33
%35 = fptosi double %34 to i32
store i32 %35, i32* %11
%36 = load double*, double** %8
%37 = getelementptr inbounds double, double* %36, i64 1
%38 = load double, double* %37
%39 = fptosi double %38 to i32
store i32 %39, i32* %12
%40 = load double*, double** %8
%41 = getelementptr inbounds double, double* %40, i64 2
%42 = load double, double* %41
store double %42, double* %13
%43 = load double**, double*** %9
%44 = getelementptr inbounds double*, double** %43, i64 0
%45 = load double*, double** %44
store double* %45, double** %14
%46 = load i32, i32* %11
%47 = sitofp i32 %46 to double
%48 = fdiv double 1.000000e+00, %47
store double %48, double* %15
%49 = load i32, i32* %12
%50 = sitofp i32 %49 to double
%51 = fdiv double 1.000000e+00, %50
store double %51, double* %16
%52 = load i32, i32* %11
%53 = icmp slt i32 %52, 1
br i1 %53, label %54, label %55
54: ; preds = %4
store i32 1, i32* %5
br label %360
55: ; preds = %4
%56 = load i32, i32* %12
%57 = load i32, i32* %11
%58 = icmp slt i32 %56, %57
br i1 %58, label %59, label %60
59: ; preds = %55
store i32 1, i32* %5
br label %360
60: ; preds = %55
%61 = load i32, i32* %12
%62 = icmp slt i32 %61, 2
br i1 %62, label %63, label %64
63: ; preds = %60
store i32 1, i32* %5
br label %360
64: ; preds = %60
%65 = load double, double* %13
%66 = fcmp olt double %65, 0.000000e+00
br i1 %66, label %70, label %67
67: ; preds = %64
%68 = load double, double* %13
%69 = fcmp ogt double %68, 1.000000e+00
br i1 %69, label %70, label %71
70: ; preds = %67, %64
store i32 1, i32* %5
br label %360
71: ; preds = %67
%72 = load i32, i32* %6
%73 = load double*, double** %8
%74 = call i32 @ti_vidya_start(double* %73)
%75 = icmp sle i32 %72, %74
br i1 %75, label %76, label %77
76: ; preds = %71
store i32 0, i32* %5
br label %360
77: ; preds = %71
store double 0.000000e+00, double* %17
store double 0.000000e+00, double* %18
store double 0.000000e+00, double* %19
store double 0.000000e+00, double* %20
store i32 0, i32* %21
br label %78
78: ; preds = %128, %77
%79 = load i32, i32* %21
%80 = load i32, i32* %12
%81 = icmp slt i32 %79, %80
br i1 %81, label %82, label %131
82: ; preds = %78
%83 = load double*, double** %10
%84 = load i32, i32* %21
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds double, double* %83, i64 %85
%87 = load double, double* %86
%88 = load double, double* %19
%89 = fadd double %88, %87
store double %89, double* %19
%90 = load double*, double** %10
%91 = load i32, i32* %21
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds double, double* %90, i64 %92
%94 = load double, double* %93
%95 = load double*, double** %10
%96 = load i32, i32* %21
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds double, double* %95, i64 %97
%99 = load double, double* %98
%100 = load double, double* %20
%101 = call double @llvm.fmuladd.f64(double %94, double %99, double %100)
store double %101, double* %20
%102 = load i32, i32* %21
%103 = load i32, i32* %12
%104 = load i32, i32* %11
%105 = sub nsw i32 %103, %104
%106 = icmp sge i32 %102, %105
br i1 %106, label %107, label %127
107: ; preds = %82
%108 = load double*, double** %10
%109 = load i32, i32* %21
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double, double* %108, i64 %110
%112 = load double, double* %111
%113 = load double, double* %17
%114 = fadd double %113, %112
store double %114, double* %17
%115 = load double*, double** %10
%116 = load i32, i32* %21
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds double, double* %115, i64 %117
%119 = load double, double* %118
%120 = load double*, double** %10
%121 = load i32, i32* %21
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds double, double* %120, i64 %122
%124 = load double, double* %123
%125 = load double, double* %18
%126 = call double @llvm.fmuladd.f64(double %119, double %124, double %125)
store double %126, double* %18
br label %127
127: ; preds = %107, %82
br label %128
128: ; preds = %127
%129 = load i32, i32* %21
%130 = add nsw i32 %129, 1
store i32 %130, i32* %21
br label %78
131: ; preds = %78
%132 = load double*, double** %10
%133 = load i32, i32* %12
%134 = sub nsw i32 %133, 2
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double, double* %132, i64 %135
%137 = load double, double* %136
store double %137, double* %22
%138 = load double, double* %22
%139 = load double*, double** %14
%140 = getelementptr inbounds double, double* %139, i32 1
store double* %140, double** %14
store double %138, double* %139
%141 = load i32, i32* %12
%142 = sub nsw i32 %141, 1
%143 = load i32, i32* %6
%144 = icmp slt i32 %142, %143
br i1 %144, label %145, label %195
145: ; preds = %131
%146 = load double, double* %18
%147 = load double, double* %15
%148 = load double, double* %17
%149 = load double, double* %15
%150 = fmul double %148, %149
%151 = load double, double* %17
%152 = load double, double* %15
%153 = fmul double %151, %152
%154 = fmul double %150, %153
%155 = fneg double %154
%156 = call double @llvm.fmuladd.f64(double %146, double %147, double %155)
%157 = call double @sqrt(double %156)
store double %157, double* %23
%158 = load double, double* %20
%159 = load double, double* %16
%160 = load double, double* %19
%161 = load double, double* %16
%162 = fmul double %160, %161
%163 = load double, double* %19
%164 = load double, double* %16
%165 = fmul double %163, %164
%166 = fmul double %162, %165
%167 = fneg double %166
%168 = call double @llvm.fmuladd.f64(double %158, double %159, double %167)
%169 = call double @sqrt(double %168)
store double %169, double* %24
%170 = load double, double* %23
%171 = load double, double* %24
%172 = fdiv double %170, %171
store double %172, double* %25
%173 = load double, double* %25
%174 = load double, double* %25
%175 = fcmp une double %173, %174
br i1 %175, label %176, label %177
176: ; preds = %145
store double 0.000000e+00, double* %25
br label %177
177: ; preds = %176, %145
%178 = load double, double* %13
%179 = load double, double* %25
%180 = fmul double %179, %178
store double %180, double* %25
%181 = load double*, double** %10
%182 = load i32, i32* %12
%183 = sub nsw i32 %182, 1
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds double, double* %181, i64 %184
%186 = load double, double* %185
%187 = load double, double* %22
%188 = fsub double %186, %187
%189 = load double, double* %25
%190 = load double, double* %22
%191 = call double @llvm.fmuladd.f64(double %188, double %189, double %190)
store double %191, double* %22
%192 = load double, double* %22
%193 = load double*, double** %14
%194 = getelementptr inbounds double, double* %193, i32 1
store double* %194, double** %14
store double %192, double* %193
br label %195
195: ; preds = %177, %131
%196 = load i32, i32* %12
store i32 %196, i32* %21
br label %197
197: ; preds = %340, %195
%198 = load i32, i32* %21
%199 = load i32, i32* %6
%200 = icmp slt i32 %198, %199
br i1 %200, label %201, label %343
201: ; preds = %197
%202 = load double*, double** %10
%203 = load i32, i32* %21
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds double, double* %202, i64 %204
%206 = load double, double* %205
%207 = load double, double* %19
%208 = fadd double %207, %206
store double %208, double* %19
%209 = load double*, double** %10
%210 = load i32, i32* %21
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds double, double* %209, i64 %211
%213 = load double, double* %212
%214 = load double*, double** %10
%215 = load i32, i32* %21
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds double, double* %214, i64 %216
%218 = load double, double* %217
%219 = load double, double* %20
%220 = call double @llvm.fmuladd.f64(double %213, double %218, double %219)
store double %220, double* %20
%221 = load double*, double** %10
%222 = load i32, i32* %21
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds double, double* %221, i64 %223
%225 = load double, double* %224
%226 = load double, double* %17
%227 = fadd double %226, %225
store double %227, double* %17
%228 = load double*, double** %10
%229 = load i32, i32* %21
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds double, double* %228, i64 %230
%232 = load double, double* %231
%233 = load double*, double** %10
%234 = load i32, i32* %21
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds double, double* %233, i64 %235
%237 = load double, double* %236
%238 = load double, double* %18
%239 = call double @llvm.fmuladd.f64(double %232, double %237, double %238)
store double %239, double* %18
%240 = load double*, double** %10
%241 = load i32, i32* %21
%242 = load i32, i32* %12
%243 = sub nsw i32 %241, %242
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds double, double* %240, i64 %244
%246 = load double, double* %245
%247 = load double, double* %19
%248 = fsub double %247, %246
store double %248, double* %19
%249 = load double*, double** %10
%250 = load i32, i32* %21
%251 = load i32, i32* %12
%252 = sub nsw i32 %250, %251
%253 = sext i32 %252 to i64
%254 = getelementptr inbounds double, double* %249, i64 %253
%255 = load double, double* %254
%256 = load double*, double** %10
%257 = load i32, i32* %21
%258 = load i32, i32* %12
%259 = sub nsw i32 %257, %258
%260 = sext i32 %259 to i64
%261 = getelementptr inbounds double, double* %256, i64 %260
%262 = load double, double* %261
%263 = load double, double* %20
%264 = fneg double %255
%265 = call double @llvm.fmuladd.f64(double %264, double %262, double %263)
store double %265, double* %20
%266 = load double*, double** %10
%267 = load i32, i32* %21
%268 = load i32, i32* %11
%269 = sub nsw i32 %267, %268
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds double, double* %266, i64 %270
%272 = load double, double* %271
%273 = load double, double* %17
%274 = fsub double %273, %272
store double %274, double* %17
%275 = load double*, double** %10
%276 = load i32, i32* %21
%277 = load i32, i32* %11
%278 = sub nsw i32 %276, %277
%279 = sext i32 %278 to i64
%280 = getelementptr inbounds double, double* %275, i64 %279
%281 = load double, double* %280
%282 = load double*, double** %10
%283 = load i32, i32* %21
%284 = load i32, i32* %11
%285 = sub nsw i32 %283, %284
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds double, double* %282, i64 %286
%288 = load double, double* %287
%289 = load double, double* %18
%290 = fneg double %281
%291 = call double @llvm.fmuladd.f64(double %290, double %288, double %289)
store double %291, double* %18
%292 = load double, double* %18
%293 = load double, double* %15
%294 = load double, double* %17
%295 = load double, double* %15
%296 = fmul double %294, %295
%297 = load double, double* %17
%298 = load double, double* %15
%299 = fmul double %297, %298
%300 = fmul double %296, %299
%301 = fneg double %300
%302 = call double @llvm.fmuladd.f64(double %292, double %293, double %301)
%303 = call double @sqrt(double %302)
store double %303, double* %26
%304 = load double, double* %20
%305 = load double, double* %16
%306 = load double, double* %19
%307 = load double, double* %16
%308 = fmul double %306, %307
%309 = load double, double* %19
%310 = load double, double* %16
%311 = fmul double %309, %310
%312 = fmul double %308, %311
%313 = fneg double %312
%314 = call double @llvm.fmuladd.f64(double %304, double %305, double %313)
%315 = call double @sqrt(double %314)
store double %315, double* %27
%316 = load double, double* %26
%317 = load double, double* %27
%318 = fdiv double %316, %317
store double %318, double* %28
%319 = load double, double* %28
%320 = load double, double* %28
%321 = fcmp une double %319, %320
br i1 %321, label %322, label %323
322: ; preds = %201
store double 0.000000e+00, double* %28
br label %323
323: ; preds = %322, %201
%324 = load double, double* %13
%325 = load double, double* %28
%326 = fmul double %325, %324
store double %326, double* %28
%327 = load double*, double** %10
%328 = load i32, i32* %21
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds double, double* %327, i64 %329
%331 = load double, double* %330
%332 = load double, double* %22
%333 = fsub double %331, %332
%334 = load double, double* %28
%335 = load double, double* %22
%336 = call double @llvm.fmuladd.f64(double %333, double %334, double %335)
store double %336, double* %22
%337 = load double, double* %22
%338 = load double*, double** %14
%339 = getelementptr inbounds double, double* %338, i32 1
store double* %339, double** %14
store double %337, double* %338
br label %340
340: ; preds = %323
%341 = load i32, i32* %21
%342 = add nsw i32 %341, 1
store i32 %342, i32* %21
br label %197
343: ; preds = %197
%344 = load double*, double** %14
%345 = load double**, double*** %9
%346 = getelementptr inbounds double*, double** %345, i64 0
%347 = load double*, double** %346
%348 = ptrtoint double* %344 to i64
%349 = ptrtoint double* %347 to i64
%350 = sub i64 %348, %349
%351 = sdiv exact i64 %350, 8
%352 = load i32, i32* %6
%353 = load double*, double** %8
%354 = call i32 @ti_vidya_start(double* %353)
%355 = sub nsw i32 %352, %354
%356 = sext i32 %355 to i64
%357 = icmp eq i64 %351, %356
%358 = zext i1 %357 to i32
%359 = call i32 @assert(i32 %358)
store i32 0, i32* %5
br label %360
360: ; preds = %343, %76, %70, %63, %59, %54
%361 = load i32, i32* %5
ret i32 %361
}

LLVM IR (-O2):
define i32 @ti_vidya(i32 %0, double** nocapture %1, double* %2, double** nocapture %3) {
%5 = load double*, double** %1
%6 = bitcast double* %2 to <2 x double>*
%7 = load <2 x double>, <2 x double>* %6
%8 = fptosi <2 x double> %7 to <2 x i32>
%9 = getelementptr inbounds double, double* %2, i64 2
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = extractelement <2 x i32> %8, i64 0
%13 = sitofp i32 %12 to double
%14 = fdiv double 1.000000e+00, %13
%15 = extractelement <2 x i32> %8, i64 1
%16 = sitofp i32 %15 to double
%17 = fdiv double 1.000000e+00, %16
%18 = icmp slt i32 %15, %12
%19 = icmp slt <2 x i32> %8, <i32 1, i32 2>
%20 = extractelement <2 x i1> %19, i64 0
%21 = select i1 %20, i1 true, i1 %18
%22 = extractelement <2 x i1> %19, i64 1
%23 = select i1 %21, i1 true, i1 %22
br i1 %23, label %195, label %24
24: ; preds = %4
%25 = fcmp olt double %10, 0.000000e+00
%26 = fcmp ogt double %10, 1.000000e+00
%27 = or i1 %25, %26
br i1 %27, label %195, label %28
28: ; preds = %24
%29 = tail call i32 @ti_vidya_start(double* %2)
%30 = icmp slt i32 %29, %0
br i1 %30, label %31, label %195
31: ; preds = %28
%32 = sub nsw i32 %15, %12
%33 = sext i32 %32 to i64
%34 = zext i32 %15 to i64
%35 = and i64 %34, 1
%36 = icmp eq i32 %15, 1
br i1 %36, label %69, label %37
37: ; preds = %31
%38 = and i64 %34, 4294967294
br label %39
39: ; preds = %39, %37
%40 = phi i64 [ 0, %37 ], [ %66, %39 ]
%41 = phi double [ 0.000000e+00, %37 ], [ %58, %39 ]
%42 = phi double [ 0.000000e+00, %37 ], [ %61, %39 ]
%43 = phi <2 x double> [ zeroinitializer, %37 ], [ %65, %39 ]
%44 = phi i64 [ 0, %37 ], [ %67, %39 ]
%45 = getelementptr inbounds double, double* %5, i64 %40
%46 = load double, double* %45
%47 = tail call double @llvm.fmuladd.f64(double %46, double %46, double %41)
%48 = icmp slt i64 %40, %33
%49 = tail call double @llvm.fmuladd.f64(double %46, double %46, double %42)
%50 = select i1 %48, double %42, double %49
%51 = select i1 %48, double -0.000000e+00, double %46
%52 = insertelement <2 x double> poison, double %51, i64 0
%53 = insertelement <2 x double> %52, double %46, i64 1
%54 = fadd <2 x double> %43, %53
%55 = or i64 %40, 1
%56 = getelementptr inbounds double, double* %5, i64 %55
%57 = load double, double* %56
%58 = tail call double @llvm.fmuladd.f64(double %57, double %57, double %47)
%59 = icmp slt i64 %55, %33
%60 = tail call double @llvm.fmuladd.f64(double %57, double %57, double %50)
%61 = select i1 %59, double %50, double %60
%62 = select i1 %59, double -0.000000e+00, double %57
%63 = insertelement <2 x double> poison, double %62, i64 0
%64 = insertelement <2 x double> %63, double %57, i64 1
%65 = fadd <2 x double> %54, %64
%66 = add nuw nsw i64 %40, 2
%67 = add i64 %44, 2
%68 = icmp eq i64 %67, %38
br i1 %68, label %69, label %39
69: ; preds = %39, %31
%70 = phi double [ undef, %31 ], [ %58, %39 ]
%71 = phi double [ undef, %31 ], [ %61, %39 ]
%72 = phi <2 x double> [ undef, %31 ], [ %65, %39 ]
%73 = phi i64 [ 0, %31 ], [ %66, %39 ]
%74 = phi double [ 0.000000e+00, %31 ], [ %58, %39 ]
%75 = phi double [ 0.000000e+00, %31 ], [ %61, %39 ]
%76 = phi <2 x double> [ zeroinitializer, %31 ], [ %65, %39 ]
%77 = icmp eq i64 %35, 0
br i1 %77, label %89, label %78
78: ; preds = %69
%79 = getelementptr inbounds double, double* %5, i64 %73
%80 = load double, double* %79
%81 = tail call double @llvm.fmuladd.f64(double %80, double %80, double %74)
%82 = icmp slt i64 %73, %33
%83 = tail call double @llvm.fmuladd.f64(double %80, double %80, double %75)
%84 = select i1 %82, double %75, double %83
%85 = select i1 %82, double -0.000000e+00, double %80
%86 = insertelement <2 x double> poison, double %85, i64 0
%87 = insertelement <2 x double> %86, double %80, i64 1
%88 = fadd <2 x double> %76, %87
br label %89
89: ; preds = %69, %78
%90 = phi double [ %70, %69 ], [ %81, %78 ]
%91 = phi double [ %71, %69 ], [ %84, %78 ]
%92 = phi <2 x double> [ %72, %69 ], [ %88, %78 ]
%93 = add nsw i32 %15, -2
%94 = zext i32 %93 to i64
%95 = getelementptr inbounds double, double* %5, i64 %94
%96 = load double, double* %95
%97 = getelementptr inbounds double, double* %11, i64 1
store double %96, double* %11
%98 = icmp sgt i32 %15, %0
br i1 %98, label %123, label %99
99: ; preds = %89
%100 = add nsw i32 %15, -1
%101 = extractelement <2 x double> %92, i64 0
%102 = fmul double %14, %101
%103 = fneg double %102
%104 = fmul double %102, %103
%105 = tail call double @llvm.fmuladd.f64(double %91, double %14, double %104)
%106 = tail call double @sqrt(double %105)
%107 = extractelement <2 x double> %92, i64 1
%108 = fmul double %17, %107
%109 = fneg double %108
%110 = fmul double %108, %109
%111 = tail call double @llvm.fmuladd.f64(double %90, double %17, double %110)
%112 = tail call double @sqrt(double %111)
%113 = fdiv double %106, %112
%114 = fcmp ord double %113, 0.000000e+00
%115 = select i1 %114, double %113, double 0.000000e+00
%116 = fmul double %10, %115
%117 = sext i32 %100 to i64
%118 = getelementptr inbounds double, double* %5, i64 %117
%119 = load double, double* %118
%120 = fsub double %119, %96
%121 = tail call double @llvm.fmuladd.f64(double %120, double %116, double %96)
%122 = getelementptr inbounds double, double* %11, i64 2
store double %121, double* %97
br label %123
123: ; preds = %99, %89
%124 = phi double [ %121, %99 ], [ %96, %89 ]
%125 = phi double* [ %122, %99 ], [ %97, %89 ]
%126 = icmp slt i32 %15, %0
br i1 %126, label %127, label %182
127: ; preds = %123
%128 = sext i32 %15 to i64
%129 = sext i32 %12 to i64
%130 = sext i32 %0 to i64
%131 = insertelement <2 x double> poison, double %90, i64 0
%132 = insertelement <2 x double> %131, double %91, i64 1
br label %133
133: ; preds = %127, %133
%134 = phi i64 [ %128, %127 ], [ %180, %133 ]
%135 = phi double* [ %125, %127 ], [ %179, %133 ]
%136 = phi double [ %124, %127 ], [ %178, %133 ]
%137 = phi <2 x double> [ %92, %127 ], [ %153, %133 ]
%138 = phi <2 x double> [ %132, %127 ], [ %157, %133 ]
%139 = getelementptr inbounds double, double* %5, i64 %134
%140 = load double, double* %139
%141 = insertelement <2 x double> poison, double %140, i64 0
%142 = shufflevector <2 x double> %141, <2 x double> poison, <2 x i32> zeroinitializer
%143 = fadd <2 x double> %137, %142
%144 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %142, <2 x double> %142, <2 x double> %138)
%145 = sub nsw i64 %134, %128
%146 = getelementptr inbounds double, double* %5, i64 %145
%147 = load double, double* %146
%148 = sub nsw i64 %134, %129
%149 = getelementptr inbounds double, double* %5, i64 %148
%150 = load double, double* %149
%151 = insertelement <2 x double> poison, double %150, i64 0
%152 = insertelement <2 x double> %151, double %147, i64 1
%153 = fsub <2 x double> %143, %152
%154 = insertelement <2 x double> poison, double %147, i64 0
%155 = insertelement <2 x double> %154, double %150, i64 1
%156 = fneg <2 x double> %155
%157 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %156, <2 x double> %155, <2 x double> %144)
%158 = extractelement <2 x double> %153, i64 0
%159 = fmul double %14, %158
%160 = fneg double %159
%161 = fmul double %159, %160
%162 = extractelement <2 x double> %157, i64 1
%163 = tail call double @llvm.fmuladd.f64(double %162, double %14, double %161)
%164 = tail call double @sqrt(double %163)
%165 = extractelement <2 x double> %153, i64 1
%166 = fmul double %17, %165
%167 = fneg double %166
%168 = fmul double %166, %167
%169 = extractelement <2 x double> %157, i64 0
%170 = tail call double @llvm.fmuladd.f64(double %169, double %17, double %168)
%171 = tail call double @sqrt(double %170)
%172 = fdiv double %164, %171
%173 = fcmp ord double %172, 0.000000e+00
%174 = select i1 %173, double %172, double 0.000000e+00
%175 = fmul double %10, %174
%176 = load double, double* %139
%177 = fsub double %176, %136
%178 = tail call double @llvm.fmuladd.f64(double %177, double %175, double %136)
%179 = getelementptr inbounds double, double* %135, i64 1
store double %178, double* %135
%180 = add nsw i64 %134, 1
%181 = icmp eq i64 %180, %130
br i1 %181, label %182, label %133
182: ; preds = %133, %123
%183 = phi double* [ %125, %123 ], [ %179, %133 ]
%184 = load double*, double** %3
%185 = ptrtoint double* %183 to i64
%186 = ptrtoint double* %184 to i64
%187 = sub i64 %185, %186
%188 = ashr exact i64 %187, 3
%189 = tail call i32 @ti_vidya_start(double* %2)
%190 = sub nsw i32 %0, %189
%191 = sext i32 %190 to i64
%192 = icmp eq i64 %188, %191
%193 = zext i1 %192 to i32
%194 = tail call i32 @assert(i32 %193)
br label %195
195: ; preds = %28, %24, %4, %182
%196 = phi i32 [ 0, %182 ], [ 1, %4 ], [ 1, %24 ], [ 0, %28 ]
ret i32 %196
}