#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 */
double fabs(double);
scalar_t__ finite(double);
double sqrt(double);
double stub1(double *);
int /*<<< orphan*/ validate_x(double *, double *);
void my_lnsrch(int n, double xold[], double fold, double g[], double p[],
               double x[], double *f, double TOLX, double stpmax, int *check,
               double (*func)(double[])) {
  int i;
  double a, alam, alam2, alamin, b, disc, f2, fold2, rhs1, rhs2, slope, sum,
      temp, test, tmplam;
  int icount = 0;
  int bad_step;
  double bad_step_factor = 2.0;
  const int ltrace = 0;
  *check = 0;
  for (sum = 0.0, i = 1; i <= n; i++)
    sum += p[i] * p[i];
  sum = sqrt(sum);
  if (sum > stpmax)
    for (i = 1; i <= n; i++)
      p[i] *= stpmax / sum;
  for (slope = 0.0, i = 1; i <= n; i++)
    slope += g[i] * p[i];
  test = 0.0;
  for (i = 1; i <= n; i++) {
    temp = (xold[i] == 0.) ? fabs(p[i]) : fabs(p[i] / xold[i]);
    if (temp > test)
      test = temp;
  }
  alamin = TOLX / test;
  alam = 1.0;
  for (;;) {
    for (i = 1; i <= n; i++)
      x[i] = xold[i] + alam * p[i];
    validate_x((x + 1), (xold + 1));
    *f = (*func)(x + 1);
    bad_step = 0;
    if (finite(*f) == 0) {
      bad_step = 1;
    }
    if (bad_step) {
      *check = 2;
      return;
    }
    if (alam < alamin) {
      for (i = 1; i <= n; i++)
        x[i] = xold[i];
      *check = 1;
      return;
    } else if (*f <= fold + 1.0e-4 * alam * slope) {
      return;
    } else {
      if (alam == 1.0) {
        tmplam = -slope / (2.0 * (*f - fold - slope));
      } else {
        rhs1 = *f - fold - alam * slope;
        rhs2 = f2 - fold2 - alam2 * slope;
        a = (rhs1 / (alam * alam) - rhs2 / (alam2 * alam2)) / (alam - alam2);
        b = (-alam2 * rhs1 / (alam * alam) + alam * rhs2 / (alam2 * alam2)) /
            (alam - alam2);
        if (a == 0.0)
          tmplam = -slope / (2.0 * b);
        else {
          disc = b * b - 3.0 * a * slope;
          if (disc < 0.0) {
            disc = 0.;
          } else
            tmplam = (-b + sqrt(disc)) / (3.0 * a);
        }
        if (tmplam > 0.5 * alam)
          tmplam = 0.5 * alam;
      }
    }
    alam2 = alam;
    f2 = *f;
    fold2 = fold;
    alam = (((tmplam) > (0.1 * alam)) ? (tmplam) : (0.1 * alam));
    icount++;
  }
}


x86 assembly (clang, -O0):
<my_lnsrch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
movsd  %xmm1,-0x40(%rbp)
movsd  %xmm2,-0x48(%rbp)
movl   $0x0,-0xcc(%rbp)
movsd  0xe85(%rip),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movl   $0x0,-0xdc(%rbp)
mov    0x10(%rbp),%rax
movl   $0x0,(%rax)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     11f5 <my_lnsrch+0xc5>
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11a9 <my_lnsrch+0x79>
movsd  -0xb0(%rbp),%xmm0
ff
call   1040 <sqrt@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
ucomisd -0x48(%rbp),%xmm0
jbe    1262 <my_lnsrch+0x132>
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     125d <my_lnsrch+0x12d>
movsd  -0x48(%rbp),%xmm0
divsd  -0xb0(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1224 <my_lnsrch+0xf4>
jmp    1262 <my_lnsrch+0x132>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     12c0 <my_lnsrch+0x190>
mov    -0x20(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1274 <my_lnsrch+0x144>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1399 <my_lnsrch+0x269>
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1323 <my_lnsrch+0x1f3>
jp     1323 <my_lnsrch+0x1f3>
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xd1e(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
jmp    1350 <my_lnsrch+0x220>
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movaps 0xcec(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
ucomisd -0xc0(%rbp),%xmm0
ff
jbe    1386 <my_lnsrch+0x256>
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    138b <my_lnsrch+0x25b>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    12d2 <my_lnsrch+0x1a2>
movsd  -0x40(%rbp),%xmm0
divsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  0xc55(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     140d <my_lnsrch+0x2dd>
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x60(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    13bf <my_lnsrch+0x28f>
mov    -0x30(%rbp),%rdi
add    $0x8,%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1030 <validate_x@plt>
mov    0x18(%rbp),%rax
mov    -0x30(%rbp),%rdi
add    $0x8,%rdi
call   *%rax
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0xd0(%rbp)
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
call   1050 <finite@plt>
cmp    $0x0,%rax
jne    1463 <my_lnsrch+0x333>
movl   $0x1,-0xd0(%rbp)
cmpl   $0x0,-0xd0(%rbp)
je     147f <my_lnsrch+0x34f>
mov    0x10(%rbp),%rax
movl   $0x2,(%rax)
jmp    1892 <my_lnsrch+0x762>
movsd  -0x60(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    14dd <my_lnsrch+0x3ad>
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     14ce <my_lnsrch+0x39e>
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    149a <my_lnsrch+0x36a>
mov    0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    1892 <my_lnsrch+0x762>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  0xb1e(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  -0xa8(%rbp),%xmm3
ff
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     1516 <my_lnsrch+0x3e6>
jmp    1892 <my_lnsrch+0x762>
movsd  -0x60(%rbp),%xmm0
movsd  0xae5(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1584 <my_lnsrch+0x454>
jp     1584 <my_lnsrch+0x454>
movsd  -0xa8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm2
subsd  -0x18(%rbp),%xmm2
subsd  -0xa8(%rbp),%xmm2
ff
movsd  0xa91(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    17f7 <my_lnsrch+0x6c7>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
movsd  -0xa8(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x88(%rbp),%xmm1
ff
subsd  -0x90(%rbp),%xmm1
ff
movsd  -0x68(%rbp),%xmm0
movsd  -0xa8(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x68(%rbp),%xmm2
mulsd  -0x68(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  -0x60(%rbp),%xmm1
subsd  -0x68(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x60(%rbp),%xmm1
mulsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x68(%rbp),%xmm2
mulsd  -0x68(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  -0x60(%rbp),%xmm1
subsd  -0x68(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1705 <my_lnsrch+0x5d5>
jp     1705 <my_lnsrch+0x5d5>
movsd  -0xa8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x911(%rip),%xmm1
mulsd  -0x78(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    17be <my_lnsrch+0x68e>
movsd  -0x78(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  0x901(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  -0xa8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x80(%rbp),%xmm0
jbe    1763 <my_lnsrch+0x633>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    17b9 <my_lnsrch+0x689>
movsd  -0x78(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  0x870(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    17be <my_lnsrch+0x68e>
movsd  -0xc8(%rbp),%xmm0
ff
movsd  0x852(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    17f2 <my_lnsrch+0x6c2>
movsd  0x83b(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    17f7 <my_lnsrch+0x6c7>
jmp    17fc <my_lnsrch+0x6cc>
jmp    1801 <my_lnsrch+0x6d1>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  0x7f0(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    185c <my_lnsrch+0x72c>
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
jmp    1871 <my_lnsrch+0x741>
movsd  0x7c4(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
mov    -0xcc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xcc(%rbp)
jmp    13b8 <my_lnsrch+0x288>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_lnsrch>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
movsd  %xmm1,0x10(%rsp)
mov    %r9,0x18(%rsp)
mov    %r8,%r14
mov    %rcx,%rbx
movapd %xmm0,%xmm8
mov    %rsi,%r12
mov    0x130(%rsp),%rax
movl   $0x0,(%rax)
xorpd  %xmm5,%xmm5
xorpd  %xmm0,%xmm0
test   %edi,%edi
movsd  %xmm8,0xa8(%rsp)
jle    1533 <my_lnsrch+0x403>
mov    %rdx,%rbp
mov    %edi,%r15d
lea    -0x1(%r15),%r13
mov    %r15d,%eax
and    $0x3,%eax
cmp    $0x3,%r13
jae    11a8 <my_lnsrch+0x78>
xorpd  %xmm0,%xmm0
mov    $0x1,%ecx
test   %rax,%rax
jne    120a <my_lnsrch+0xda>
jmp    1226 <my_lnsrch+0xf6>
mov    %r15d,%edx
and    $0xfffffffc,%edx
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x8(%rbx,%rcx,8),%xmm1
movsd  0x10(%rbx,%rcx,8),%xmm3
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm3,%xmm3
addsd  %xmm1,%xmm3
movsd  0x18(%rbx,%rcx,8),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm3,%xmm1
movsd  0x20(%rbx,%rcx,8),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
add    $0x4,%rcx
cmp    %rcx,%rdx
jne    11c0 <my_lnsrch+0x90>
add    $0x1,%rcx
test   %rax,%rax
je     1226 <my_lnsrch+0xf6>
lea    (%rbx,%rcx,8),%rcx
xor    %edx,%edx
movsd  (%rcx,%rdx,8),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rdx
cmp    %rdx,%rax
jne    1210 <my_lnsrch+0xe0>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     123f <my_lnsrch+0x10f>
sqrtsd %xmm0,%xmm0
ucomisd %xmm2,%xmm0
ja     1263 <my_lnsrch+0x133>
jmp    1357 <my_lnsrch+0x227>
mov    %rdi,0x60(%rsp)
movaps %xmm2,0x20(%rsp)
call   1040 <sqrt@plt>
movapd 0x20(%rsp),%xmm2
mov    0x60(%rsp),%rdi
ucomisd %xmm2,%xmm0
jbe    1357 <my_lnsrch+0x227>
test   %edi,%edi
jle    1357 <my_lnsrch+0x227>
lea    0x1(%r15),%rax
divsd  %xmm0,%xmm2
lea    -0x1(%rax),%r8
mov    $0x1,%ecx
cmp    $0x4,%r8
jb     1340 <my_lnsrch+0x210>
mov    %r8,%rcx
and    $0xfffffffffffffffc,%rcx
movapd %xmm2,%xmm0
unpcklpd %xmm2,%xmm0
lea    -0x4(%rcx),%rsi
mov    %rsi,%r9
shr    $0x2,%r9
add    $0x1,%r9
test   %rsi,%rsi
je     1a56 <my_lnsrch+0x926>
mov    %r9,%rdx
movabs $0x7ffffffffffffffe,%rsi
ff ff 7f
and    %rsi,%rdx
xor    %esi,%esi
nop
movupd 0x8(%rbx,%rsi,8),%xmm1
movupd 0x18(%rbx,%rsi,8),%xmm5
movupd 0x28(%rbx,%rsi,8),%xmm3
movupd 0x38(%rbx,%rsi,8),%xmm4
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm5
movupd %xmm1,0x8(%rbx,%rsi,8)
movupd %xmm5,0x18(%rbx,%rsi,8)
mulpd  %xmm0,%xmm3
mulpd  %xmm0,%xmm4
movupd %xmm3,0x28(%rbx,%rsi,8)
movupd %xmm4,0x38(%rbx,%rsi,8)
add    $0x8,%rsi
add    $0xfffffffffffffffe,%rdx
jne    12c0 <my_lnsrch+0x190>
test   $0x1,%r9b
je     1336 <my_lnsrch+0x206>
shl    $0x3,%rsi
or     $0x8,%rsi
movupd (%rbx,%rsi,1),%xmm1
movupd 0x10(%rbx,%rsi,1),%xmm3
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm3
movupd %xmm1,(%rbx,%rsi,1)
movupd %xmm3,0x10(%rbx,%rsi,1)
cmp    %rcx,%r8
je     1357 <my_lnsrch+0x227>
or     $0x1,%rcx
nop
movsd  (%rbx,%rcx,8),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1340 <my_lnsrch+0x210>
test   %edi,%edi
jle    137a <my_lnsrch+0x24a>
mov    %r15d,%eax
and    $0x3,%eax
cmp    $0x3,%r13
jae    1387 <my_lnsrch+0x257>
xorpd  %xmm5,%xmm5
mov    $0x1,%ecx
test   %rax,%rax
jne    13f2 <my_lnsrch+0x2c2>
jmp    1427 <my_lnsrch+0x2f7>
xorpd  %xmm5,%xmm5
xorpd  %xmm0,%xmm0
jmp    1533 <my_lnsrch+0x403>
mov    %r15d,%edx
and    $0xfffffffc,%edx
xorpd  %xmm5,%xmm5
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  0x8(%rbp,%rcx,8),%xmm0
movsd  0x10(%rbp,%rcx,8),%xmm1
mulsd  0x8(%rbx,%rcx,8),%xmm0
mulsd  0x10(%rbx,%rcx,8),%xmm1
addsd  %xmm5,%xmm0
movsd  0x18(%rbp,%rcx,8),%xmm2
mulsd  0x18(%rbx,%rcx,8),%xmm2
addsd  %xmm0,%xmm1
movsd  0x20(%rbp,%rcx,8),%xmm5
mulsd  0x20(%rbx,%rcx,8),%xmm5
addsd  %xmm1,%xmm2
addsd  %xmm2,%xmm5
add    $0x4,%rcx
cmp    %rcx,%rdx
jne    13a0 <my_lnsrch+0x270>
add    $0x1,%rcx
test   %rax,%rax
je     1427 <my_lnsrch+0x2f7>
lea    (%rbx,%rcx,8),%rdx
lea    0x0(,%rcx,8),%rcx
add    %rbp,%rcx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rcx,%rsi,8),%xmm0
mulsd  (%rdx,%rsi,8),%xmm0
addsd  %xmm0,%xmm5
add    $0x1,%rsi
cmp    %rsi,%rax
jne    1410 <my_lnsrch+0x2e0>
test   %edi,%edi
jle    14e2 <my_lnsrch+0x3b2>
test   %r13,%r13
je     14e8 <my_lnsrch+0x3b8>
mov    %r15d,%ecx
and    $0xfffffffe,%ecx
neg    %rcx
xorpd  %xmm9,%xmm9
mov    $0x1,%eax
movsd  0xbad(%rip),%xmm2
movapd 0xbd5(%rip),%xmm3
xorpd  %xmm4,%xmm4
nop
movsd  (%r12,%rax,8),%xmm0
movsd  0x8(%r12,%rax,8),%xmm1
movapd %xmm0,%xmm6
cmpeqsd %xmm9,%xmm6
movapd %xmm6,%xmm7
andnpd %xmm0,%xmm7
andpd  %xmm2,%xmm6
orpd   %xmm7,%xmm6
movsd  (%rbx,%rax,8),%xmm7
movsd  0x8(%rbx,%rax,8),%xmm0
divsd  %xmm6,%xmm7
andpd  %xmm3,%xmm7
maxsd  %xmm4,%xmm7
movapd %xmm1,%xmm4
cmpeqsd %xmm9,%xmm4
movapd %xmm4,%xmm6
andnpd %xmm1,%xmm6
andpd  %xmm2,%xmm4
orpd   %xmm6,%xmm4
divsd  %xmm4,%xmm0
andpd  %xmm3,%xmm0
maxsd  %xmm7,%xmm0
lea    (%rcx,%rax,1),%rdx
add    $0x2,%rdx
add    $0x2,%rax
movapd %xmm0,%xmm4
cmp    $0x1,%rdx
jne    1460 <my_lnsrch+0x330>
test   $0x1,%r15b
jne    14f7 <my_lnsrch+0x3c7>
jmp    1533 <my_lnsrch+0x403>
xorpd  %xmm0,%xmm0
jmp    1533 <my_lnsrch+0x403>
xorpd  %xmm0,%xmm0
mov    $0x1,%eax
test   $0x1,%r15b
je     1533 <my_lnsrch+0x403>
movsd  (%r12,%rax,8),%xmm1
movsd  (%rbx,%rax,8),%xmm2
xorpd  %xmm3,%xmm3
cmpeqsd %xmm1,%xmm3
movsd  0xaed(%rip),%xmm4
andpd  %xmm3,%xmm4
andnpd %xmm1,%xmm3
orpd   %xmm3,%xmm4
divsd  %xmm4,%xmm2
andpd  0xb05(%rip),%xmm2
maxsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
lea    0x1(%rdi),%edx
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
lea    0x8(%r14),%r11
lea    0x8(%r12),%r15
movapd 0xae9(%rip),%xmm0
xorpd  %xmm5,%xmm0
movapd %xmm0,0xb0(%rsp)
lea    (%r14,%rdx,8),%rbp
lea    (%r12,%rdx,8),%rax
lea    0x8(%rbx),%r8
lea    (%rbx,%rdx,8),%r9
lea    -0x1(%rdx),%r13
movapd %xmm5,%xmm0
unpcklpd %xmm5,%xmm0
movapd %xmm0,0xd0(%rsp)
lea    -0x5(%rdx),%rcx
mov    %rcx,0x38(%rsp)
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %rax,0x88(%rsp)
cmp    %rax,%r11
setb   %r10b
mov    %r15,0x50(%rsp)
cmp    %rbp,%r15
setb   %r15b
and    %r10b,%r15b
mov    %r11,0x58(%rsp)
cmp    %r9,%r11
setb   %r9b
mov    %rbp,0x80(%rsp)
cmp    %rbp,%r8
setb   %al
and    %r9b,%al
or     %r15b,%al
mov    %al,0x7(%rsp)
mov    %r13,%rax
and    $0xfffffffffffffffc,%rax
mov    %rax,0x48(%rsp)
add    $0x1,%rax
mov    %rax,0x98(%rsp)
mov    %rcx,%rax
mov    %rcx,0x40(%rsp)
movabs $0x7ffffffffffffffe,%rax
ff ff 7f
and    %rax,%rcx
mov    %rcx,0x90(%rsp)
mov    %rdx,%rax
neg    %rax
mov    %rax,0xa0(%rsp)
movsd  0x9d9(%rip),%xmm6
movapd %xmm5,0xe0(%rsp)
mov    %rdx,0x8(%rsp)
mov    0x58(%rsp),%rbp
jmp    1683 <my_lnsrch+0x553>
nopl   0x0(%rax)
subsd  %xmm5,%xmm6
addsd  %xmm6,%xmm6
movapd 0xb0(%rsp),%xmm2
divsd  %xmm6,%xmm2
mov    0x8(%rsp),%rdx
mov    0x18(%rsp),%rax
movsd  (%rax),%xmm0
movapd %xmm0,0x20(%rsp)
mulsd  0x9af(%rip),%xmm4
movsd  %xmm2,0x70(%rsp)
maxsd  %xmm4,%xmm2
unpcklpd %xmm3,%xmm2
movapd %xmm2,%xmm6
test   %edi,%edi
jle    1806 <my_lnsrch+0x6d6>
cmp    $0x4,%r13
setb   %al
or     0x7(%rsp),%al
mov    $0x1,%ecx
jne    179d <my_lnsrch+0x66d>
movapd %xmm6,%xmm0
unpcklpd %xmm6,%xmm0
cmpq   $0x4,0x38(%rsp)
jae    16b8 <my_lnsrch+0x588>
xor    %eax,%eax
jmp    174a <my_lnsrch+0x61a>
mov    0x90(%rsp),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd 0x8(%r12,%rax,8),%xmm1
movupd 0x18(%r12,%rax,8),%xmm2
movupd 0x8(%rbx,%rax,8),%xmm3
movupd 0x18(%rbx,%rax,8),%xmm4
mulpd  %xmm0,%xmm3
addpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm4
addpd  %xmm2,%xmm4
movupd %xmm3,0x8(%r14,%rax,8)
movupd %xmm4,0x18(%r14,%rax,8)
movupd 0x28(%r12,%rax,8),%xmm1
movupd 0x38(%r12,%rax,8),%xmm2
movupd 0x28(%rbx,%rax,8),%xmm3
movupd 0x38(%rbx,%rax,8),%xmm4
mulpd  %xmm0,%xmm3
addpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm4
addpd  %xmm2,%xmm4
movupd %xmm3,0x28(%r14,%rax,8)
movupd %xmm4,0x38(%r14,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    16d0 <my_lnsrch+0x5a0>
testb  $0x1,0x40(%rsp)
je     178e <my_lnsrch+0x65e>
shl    $0x3,%rax
or     $0x8,%rax
movupd (%r12,%rax,1),%xmm1
movupd 0x10(%r12,%rax,1),%xmm2
movupd (%rbx,%rax,1),%xmm3
movupd 0x10(%rbx,%rax,1),%xmm4
mulpd  %xmm0,%xmm3
addpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm4
addpd  %xmm2,%xmm4
movupd %xmm3,(%r14,%rax,1)
movupd %xmm4,0x10(%r14,%rax,1)
mov    0x98(%rsp),%rcx
cmp    0x48(%rsp),%r13
je     1806 <my_lnsrch+0x6d6>
mov    %rcx,%rax
test   $0x1,%dl
jne    17be <my_lnsrch+0x68e>
movsd  (%rbx,%rcx,8),%xmm0
mulsd  %xmm6,%xmm0
addsd  (%r12,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
lea    0x1(%rcx),%rax
not    %rcx
cmp    0xa0(%rsp),%rcx
je     1806 <my_lnsrch+0x6d6>
nopl   0x0(%rax,%rax,1)
movsd  (%rbx,%rax,8),%xmm0
mulsd  %xmm6,%xmm0
addsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
movsd  0x8(%rbx,%rax,8),%xmm0
mulsd  %xmm6,%xmm0
addsd  0x8(%r12,%rax,8),%xmm0
movsd  %xmm0,0x8(%r14,%rax,8)
add    $0x2,%rax
cmp    %rax,%rdx
jne    17d0 <my_lnsrch+0x6a0>
movapd %xmm6,0x60(%rsp)
mov    %rdi,%r15
mov    %rbp,%rdi
mov    0x50(%rsp),%rsi
call   1030 <validate_x@plt>
mov    %rbp,%rdi
call   *0x138(%rsp)
mov    0x18(%rsp),%rax
movsd  %xmm0,(%rax)
call   1050 <finite@plt>
test   %rax,%rax
je     19f4 <my_lnsrch+0x8c4>
movsd  0x10(%rsp),%xmm0
movapd 0x60(%rsp),%xmm3
ucomisd %xmm3,%xmm0
ja     19fe <my_lnsrch+0x8ce>
mov    0x18(%rsp),%rax
movsd  (%rax),%xmm6
movapd %xmm3,%xmm0
mulsd  0x7a0(%rip),%xmm0
movapd 0xe0(%rsp),%xmm5
mulsd  %xmm5,%xmm0
movsd  0xa8(%rsp),%xmm8
addsd  %xmm8,%xmm0
ucomisd %xmm6,%xmm0
jae    1bc9 <my_lnsrch+0xa99>
movapd %xmm3,%xmm4
mov    %r15,%rdi
ucomisd 0x763(%rip),%xmm3
subsd  %xmm8,%xmm6
jne    18aa <my_lnsrch+0x77a>
jnp    1640 <my_lnsrch+0x510>
movapd 0x20(%rsp),%xmm1
subsd  %xmm8,%xmm1
movapd %xmm3,%xmm0
xorpd  0x77f(%rip),%xmm0
unpcklpd %xmm1,%xmm6
movapd %xmm3,%xmm1
mulpd  0xd0(%rsp),%xmm1
subpd  %xmm1,%xmm6
movapd %xmm3,%xmm1
mulpd  %xmm3,%xmm1
movapd %xmm6,%xmm2
divpd  %xmm1,%xmm2
movapd %xmm2,%xmm7
unpcklpd %xmm3,%xmm7
unpckhpd %xmm3,%xmm2
subpd  %xmm2,%xmm7
movapd %xmm7,%xmm2
unpckhpd %xmm7,%xmm2
divsd  %xmm2,%xmm7
pshufd $0xee,%xmm0,%xmm0
mulsd  %xmm6,%xmm0
divsd  %xmm1,%xmm0
unpckhpd %xmm6,%xmm6
mulsd  %xmm3,%xmm6
unpckhpd %xmm1,%xmm1
divsd  %xmm1,%xmm6
addsd  %xmm0,%xmm6
divsd  %xmm2,%xmm6
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm7
jne    1949 <my_lnsrch+0x819>
jp     1949 <my_lnsrch+0x819>
addsd  %xmm6,%xmm6
movapd 0xb0(%rsp),%xmm2
divsd  %xmm6,%xmm2
jmp    19d0 <my_lnsrch+0x8a0>
mulsd  0x6bf(%rip),%xmm7
movapd %xmm5,%xmm1
mulsd  %xmm7,%xmm1
xorpd  %xmm2,%xmm2
movapd %xmm6,%xmm0
mulsd  %xmm6,%xmm0
subsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm2
movsd  0x70(%rsp),%xmm2
ja     19d0 <my_lnsrch+0x8a0>
ucomisd %xmm1,%xmm0
jb     1988 <my_lnsrch+0x858>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
jmp    19c4 <my_lnsrch+0x894>
movsd  %xmm4,0x20(%rsp)
movapd %xmm6,0x70(%rsp)
movapd %xmm7,0xc0(%rsp)
call   1040 <sqrt@plt>
movapd 0xc0(%rsp),%xmm7
movapd 0x70(%rsp),%xmm6
movsd  0x20(%rsp),%xmm4
movapd 0x60(%rsp),%xmm3
mov    %r15,%rdi
movapd %xmm0,%xmm2
subsd  %xmm6,%xmm2
divsd  %xmm7,%xmm2
nopl   0x0(%rax)
movapd %xmm4,%xmm0
mulsd  0x63c(%rip),%xmm0
ucomisd %xmm0,%xmm2
mov    0x8(%rsp),%rdx
jbe    165a <my_lnsrch+0x52a>
movapd %xmm0,%xmm2
jmp    165a <my_lnsrch+0x52a>
mov    $0x2,%eax
jmp    1bbf <my_lnsrch+0xa8f>
mov    $0x1,%eax
test   %r15d,%r15d
jle    1bbf <my_lnsrch+0xa8f>
mov    $0x1,%ecx
cmp    $0x4,%r13
jb     1b42 <my_lnsrch+0xa12>
mov    0x88(%rsp),%rdx
cmp    %rdx,0x58(%rsp)
jae    1a3d <my_lnsrch+0x90d>
mov    0x80(%rsp),%rdx
cmp    %rdx,0x50(%rsp)
jb     1b42 <my_lnsrch+0xa12>
mov    0x40(%rsp),%rsi
mov    %esi,%ecx
and    $0x3,%ecx
cmpq   $0xc,0x38(%rsp)
jae    1a67 <my_lnsrch+0x937>
xor    %edx,%edx
jmp    1aee <my_lnsrch+0x9be>
xor    %esi,%esi
test   $0x1,%r9b
jne    1310 <my_lnsrch+0x1e0>
jmp    1336 <my_lnsrch+0x206>
movabs $0x7ffffffffffffffe,%rdx
ff ff 7f
add    $0xfffffffffffffffe,%rdx
and    %rdx,%rsi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movups 0x8(%r12,%rdx,8),%xmm0
movups 0x18(%r12,%rdx,8),%xmm1
movups %xmm0,0x8(%r14,%rdx,8)
movups %xmm1,0x18(%r14,%rdx,8)
movups 0x28(%r12,%rdx,8),%xmm0
movups 0x38(%r12,%rdx,8),%xmm1
movups %xmm0,0x28(%r14,%rdx,8)
movups %xmm1,0x38(%r14,%rdx,8)
movups 0x48(%r12,%rdx,8),%xmm0
movups 0x58(%r12,%rdx,8),%xmm1
movups %xmm0,0x48(%r14,%rdx,8)
movups %xmm1,0x58(%r14,%rdx,8)
movupd 0x68(%r12,%rdx,8),%xmm0
movupd 0x78(%r12,%rdx,8),%xmm1
movupd %xmm0,0x68(%r14,%rdx,8)
movupd %xmm1,0x78(%r14,%rdx,8)
add    $0x10,%rdx
add    $0xfffffffffffffffc,%rsi
jne    1a80 <my_lnsrch+0x950>
test   %rcx,%rcx
je     1b30 <my_lnsrch+0xa00>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x0(,%rdx,8),%rsi
or     $0x8,%rsi
movupd (%r12,%rsi,1),%xmm0
movupd 0x10(%r12,%rsi,1),%xmm1
movupd %xmm0,(%r14,%rsi,1)
movupd %xmm1,0x10(%r14,%rsi,1)
add    $0x4,%rdx
add    $0xffffffffffffffff,%rcx
jne    1b00 <my_lnsrch+0x9d0>
mov    0x48(%rsp),%rcx
cmp    %rcx,%r13
je     1bbf <my_lnsrch+0xa8f>
or     $0x1,%rcx
mov    0x8(%rsp),%rdi
mov    %edi,%esi
sub    %ecx,%esi
mov    %rcx,%rdx
not    %rdx
add    %rdi,%rdx
and    $0x3,%rsi
je     1b76 <my_lnsrch+0xa46>
nopw   0x0(%rax,%rax,1)
movsd  (%r12,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    1b60 <my_lnsrch+0xa30>
cmp    $0x3,%rdx
jb     1bbf <my_lnsrch+0xa8f>
nopl   0x0(%rax)
movsd  (%r12,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
movsd  0x8(%r12,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r14,%rcx,8)
movsd  0x10(%r12,%rcx,8),%xmm0
movsd  %xmm0,0x10(%r14,%rcx,8)
movsd  0x18(%r12,%rcx,8),%xmm0
movsd  %xmm0,0x18(%r14,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rdi
jne    1b80 <my_lnsrch+0xa50>
mov    0x130(%rsp),%rcx
mov    %eax,(%rcx)
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @my_lnsrch(i32 %0, double* %1, double %2, double* nocapture %3, double* nocapture %4, double* %5, double* nocapture %6, double %7, double %8, i32* nocapture writeonly %9, double (double*)* nocapture %10) {
store i32 0, i32* %9
%12 = icmp slt i32 %0, 1
br i1 %12, label %242, label %13
13: ; preds = %11
%14 = add nuw i32 %0, 1
%15 = zext i32 %14 to i64
%16 = add nsw i64 %15, -1
%17 = add nsw i64 %15, -2
%18 = and i64 %16, 3
%19 = icmp ult i64 %17, 3
br i1 %19, label %44, label %20
20: ; preds = %13
%21 = and i64 %16, -4
br label %22
22: ; preds = %22, %20
%23 = phi i64 [ 1, %20 ], [ %41, %22 ]
%24 = phi double [ 0.000000e+00, %20 ], [ %40, %22 ]
%25 = phi i64 [ 0, %20 ], [ %42, %22 ]
%26 = getelementptr inbounds double, double* %4, i64 %23
%27 = load double, double* %26
%28 = tail call double @llvm.fmuladd.f64(double %27, double %27, double %24)
%29 = add nuw nsw i64 %23, 1
%30 = getelementptr inbounds double, double* %4, i64 %29
%31 = load double, double* %30
%32 = tail call double @llvm.fmuladd.f64(double %31, double %31, double %28)
%33 = add nuw nsw i64 %23, 2
%34 = getelementptr inbounds double, double* %4, i64 %33
%35 = load double, double* %34
%36 = tail call double @llvm.fmuladd.f64(double %35, double %35, double %32)
%37 = add nuw nsw i64 %23, 3
%38 = getelementptr inbounds double, double* %4, i64 %37
%39 = load double, double* %38
%40 = tail call double @llvm.fmuladd.f64(double %39, double %39, double %36)
%41 = add nuw nsw i64 %23, 4
%42 = add i64 %25, 4
%43 = icmp eq i64 %42, %21
br i1 %43, label %44, label %22
44: ; preds = %22, %13
%45 = phi double [ undef, %13 ], [ %40, %22 ]
%46 = phi i64 [ 1, %13 ], [ %41, %22 ]
%47 = phi double [ 0.000000e+00, %13 ], [ %40, %22 ]
%48 = icmp eq i64 %18, 0
br i1 %48, label %59, label %49
49: ; preds = %44, %49
%50 = phi i64 [ %56, %49 ], [ %46, %44 ]
%51 = phi double [ %55, %49 ], [ %47, %44 ]
%52 = phi i64 [ %57, %49 ], [ 0, %44 ]
%53 = getelementptr inbounds double, double* %4, i64 %50
%54 = load double, double* %53
%55 = tail call double @llvm.fmuladd.f64(double %54, double %54, double %51)
%56 = add nuw nsw i64 %50, 1
%57 = add i64 %52, 1
%58 = icmp eq i64 %57, %18
br i1 %58, label %59, label %49
59: ; preds = %49, %44
%60 = phi double [ %45, %44 ], [ %55, %49 ]
%61 = tail call double @sqrt(double %60)
%62 = fcmp ule double %61, %8
%63 = or i1 %62, %12
br i1 %63, label %138, label %64
64: ; preds = %59
%65 = fdiv double %8, %61
%66 = add nuw i32 %0, 1
%67 = zext i32 %66 to i64
%68 = add nsw i64 %15, -1
%69 = icmp ult i64 %68, 4
br i1 %69, label %129, label %70
70: ; preds = %64
%71 = and i64 %68, -4
%72 = or i64 %71, 1
%73 = insertelement <2 x double> poison, double %65, i64 0
%74 = shufflevector <2 x double> %73, <2 x double> poison, <2 x i32> zeroinitializer
%75 = insertelement <2 x double> poison, double %65, i64 0
%76 = shufflevector <2 x double> %75, <2 x double> poison, <2 x i32> zeroinitializer
%77 = add nsw i64 %71, -4
%78 = lshr exact i64 %77, 2
%79 = add nuw nsw i64 %78, 1
%80 = and i64 %79, 1
%81 = icmp eq i64 %77, 0
br i1 %81, label %112, label %82
82: ; preds = %70
%83 = and i64 %79, 9223372036854775806
br label %84
84: ; preds = %84, %82
%85 = phi i64 [ 0, %82 ], [ %109, %84 ]
%86 = phi i64 [ 0, %82 ], [ %110, %84 ]
%87 = or i64 %85, 1
%88 = getelementptr inbounds double, double* %4, i64 %87
%89 = bitcast double* %88 to <2 x double>*
%90 = load <2 x double>, <2 x double>* %89
%91 = getelementptr inbounds double, double* %88, i64 2
%92 = bitcast double* %91 to <2 x double>*
%93 = load <2 x double>, <2 x double>* %92
%94 = fmul <2 x double> %74, %90
%95 = fmul <2 x double> %76, %93
%96 = bitcast double* %88 to <2 x double>*
store <2 x double> %94, <2 x double>* %96
%97 = bitcast double* %91 to <2 x double>*
store <2 x double> %95, <2 x double>* %97
%98 = or i64 %85, 5
%99 = getelementptr inbounds double, double* %4, i64 %98
%100 = bitcast double* %99 to <2 x double>*
%101 = load <2 x double>, <2 x double>* %100
%102 = getelementptr inbounds double, double* %99, i64 2
%103 = bitcast double* %102 to <2 x double>*
%104 = load <2 x double>, <2 x double>* %103
%105 = fmul <2 x double> %74, %101
%106 = fmul <2 x double> %76, %104
%107 = bitcast double* %99 to <2 x double>*
store <2 x double> %105, <2 x double>* %107
%108 = bitcast double* %102 to <2 x double>*
store <2 x double> %106, <2 x double>* %108
%109 = add nuw i64 %85, 8
%110 = add i64 %86, 2
%111 = icmp eq i64 %110, %83
br i1 %111, label %112, label %84
112: ; preds = %84, %70
%113 = phi i64 [ 0, %70 ], [ %109, %84 ]
%114 = icmp eq i64 %80, 0
br i1 %114, label %127, label %115
115: ; preds = %112
%116 = or i64 %113, 1
%117 = getelementptr inbounds double, double* %4, i64 %116
%118 = bitcast double* %117 to <2 x double>*
%119 = load <2 x double>, <2 x double>* %118
%120 = getelementptr inbounds double, double* %117, i64 2
%121 = bitcast double* %120 to <2 x double>*
%122 = load <2 x double>, <2 x double>* %121
%123 = fmul <2 x double> %74, %119
%124 = fmul <2 x double> %76, %122
%125 = bitcast double* %117 to <2 x double>*
store <2 x double> %123, <2 x double>* %125
%126 = bitcast double* %120 to <2 x double>*
store <2 x double> %124, <2 x double>* %126
br label %127
127: ; preds = %112, %115
%128 = icmp eq i64 %68, %71
br i1 %128, label %138, label %129
129: ; preds = %64, %127
%130 = phi i64 [ 1, %64 ], [ %72, %127 ]
br label %131
131: ; preds = %129, %131
%132 = phi i64 [ %136, %131 ], [ %130, %129 ]
%133 = getelementptr inbounds double, double* %4, i64 %132
%134 = load double, double* %133
%135 = fmul double %65, %134
store double %135, double* %133
%136 = add nuw nsw i64 %132, 1
%137 = icmp eq i64 %136, %67
br i1 %137, label %138, label %131
138: ; preds = %131, %127, %59
br i1 %12, label %242, label %139
139: ; preds = %138
%140 = and i64 %16, 3
%141 = icmp ult i64 %17, 3
br i1 %141, label %144, label %142
142: ; preds = %139
%143 = and i64 %16, -4
br label %168
144: ; preds = %168, %139
%145 = phi double [ undef, %139 ], [ %194, %168 ]
%146 = phi i64 [ 1, %139 ], [ %195, %168 ]
%147 = phi double [ 0.000000e+00, %139 ], [ %194, %168 ]
%148 = icmp eq i64 %140, 0
br i1 %148, label %161, label %149
149: ; preds = %144, %149
%150 = phi i64 [ %158, %149 ], [ %146, %144 ]
%151 = phi double [ %157, %149 ], [ %147, %144 ]
%152 = phi i64 [ %159, %149 ], [ 0, %144 ]
%153 = getelementptr inbounds double, double* %3, i64 %150
%154 = load double, double* %153
%155 = getelementptr inbounds double, double* %4, i64 %150
%156 = load double, double* %155
%157 = tail call double @llvm.fmuladd.f64(double %154, double %156, double %151)
%158 = add nuw nsw i64 %150, 1
%159 = add i64 %152, 1
%160 = icmp eq i64 %159, %140
br i1 %160, label %161, label %149
161: ; preds = %149, %144
%162 = phi double [ %145, %144 ], [ %157, %149 ]
br i1 %12, label %242, label %163
163: ; preds = %161
%164 = and i64 %16, 1
%165 = icmp eq i64 %17, 0
br i1 %165, label %226, label %166
166: ; preds = %163
%167 = and i64 %16, -2
br label %198
168: ; preds = %168, %142
%169 = phi i64 [ 1, %142 ], [ %195, %168 ]
%170 = phi double [ 0.000000e+00, %142 ], [ %194, %168 ]
%171 = phi i64 [ 0, %142 ], [ %196, %168 ]
%172 = getelementptr inbounds double, double* %3, i64 %169
%173 = load double, double* %172
%174 = getelementptr inbounds double, double* %4, i64 %169
%175 = load double, double* %174
%176 = tail call double @llvm.fmuladd.f64(double %173, double %175, double %170)
%177 = add nuw nsw i64 %169, 1
%178 = getelementptr inbounds double, double* %3, i64 %177
%179 = load double, double* %178
%180 = getelementptr inbounds double, double* %4, i64 %177
%181 = load double, double* %180
%182 = tail call double @llvm.fmuladd.f64(double %179, double %181, double %176)
%183 = add nuw nsw i64 %169, 2
%184 = getelementptr inbounds double, double* %3, i64 %183
%185 = load double, double* %184
%186 = getelementptr inbounds double, double* %4, i64 %183
%187 = load double, double* %186
%188 = tail call double @llvm.fmuladd.f64(double %185, double %187, double %182)
%189 = add nuw nsw i64 %169, 3
%190 = getelementptr inbounds double, double* %3, i64 %189
%191 = load double, double* %190
%192 = getelementptr inbounds double, double* %4, i64 %189
%193 = load double, double* %192
%194 = tail call double @llvm.fmuladd.f64(double %191, double %193, double %188)
%195 = add nuw nsw i64 %169, 4
%196 = add i64 %171, 4
%197 = icmp eq i64 %196, %143
br i1 %197, label %144, label %168
198: ; preds = %198, %166
%199 = phi i64 [ 1, %166 ], [ %223, %198 ]
%200 = phi double [ 0.000000e+00, %166 ], [ %222, %198 ]
%201 = phi i64 [ 0, %166 ], [ %224, %198 ]
%202 = getelementptr inbounds double, double* %1, i64 %199
%203 = load double, double* %202
%204 = fcmp oeq double %203, 0.000000e+00
%205 = getelementptr inbounds double, double* %4, i64 %199
%206 = load double, double* %205
%207 = select i1 %204, double 1.000000e+00, double %203
%208 = fdiv double %206, %207
%209 = tail call double @llvm.fabs.f64(double %208)
%210 = fcmp ogt double %209, %200
%211 = select i1 %210, double %209, double %200
%212 = add nuw nsw i64 %199, 1
%213 = getelementptr inbounds double, double* %1, i64 %212
%214 = load double, double* %213
%215 = fcmp oeq double %214, 0.000000e+00
%216 = getelementptr inbounds double, double* %4, i64 %212
%217 = load double, double* %216
%218 = select i1 %215, double 1.000000e+00, double %214
%219 = fdiv double %217, %218
%220 = tail call double @llvm.fabs.f64(double %219)
%221 = fcmp ogt double %220, %211
%222 = select i1 %221, double %220, double %211
%223 = add nuw nsw i64 %199, 2
%224 = add i64 %201, 2
%225 = icmp eq i64 %224, %167
br i1 %225, label %226, label %198
226: ; preds = %198, %163
%227 = phi double [ undef, %163 ], [ %222, %198 ]
%228 = phi i64 [ 1, %163 ], [ %223, %198 ]
%229 = phi double [ 0.000000e+00, %163 ], [ %222, %198 ]
%230 = icmp eq i64 %164, 0
br i1 %230, label %242, label %231
231: ; preds = %226
%232 = getelementptr inbounds double, double* %1, i64 %228
%233 = load double, double* %232
%234 = fcmp oeq double %233, 0.000000e+00
%235 = getelementptr inbounds double, double* %4, i64 %228
%236 = load double, double* %235
%237 = select i1 %234, double 1.000000e+00, double %233
%238 = fdiv double %236, %237
%239 = tail call double @llvm.fabs.f64(double %238)
%240 = fcmp ogt double %239, %229
%241 = select i1 %240, double %239, double %229
br label %242
242: ; preds = %231, %226, %161, %138, %11
%243 = phi double [ %162, %161 ], [ 0.000000e+00, %138 ], [ 0.000000e+00, %11 ], [ %162, %226 ], [ %162, %231 ]
%244 = phi double [ 0.000000e+00, %11 ], [ 0.000000e+00, %138 ], [ 0.000000e+00, %161 ], [ %227, %226 ], [ %241, %231 ]
%245 = add i32 %0, 1
%246 = fdiv double %7, %244
%247 = getelementptr inbounds double, double* %5, i64 1
%248 = getelementptr inbounds double, double* %1, i64 1
%249 = fneg double %243
%250 = zext i32 %245 to i64
%251 = getelementptr double, double* %5, i64 1
%252 = getelementptr double, double* %5, i64 %250
%253 = getelementptr double, double* %1, i64 1
%254 = getelementptr double, double* %1, i64 %250
%255 = getelementptr double, double* %4, i64 1
%256 = getelementptr double, double* %4, i64 %250
%257 = add nsw i64 %250, -1
%258 = insertelement <2 x double> poison, double %243, i64 0
%259 = shufflevector <2 x double> %258, <2 x double> poison, <2 x i32> zeroinitializer
%260 = add nsw i64 %250, -5
%261 = lshr i64 %260, 2
%262 = add nuw nsw i64 %261, 1
%263 = icmp ult i64 %257, 4
%264 = icmp ult double* %251, %254
%265 = icmp ult double* %253, %252
%266 = and i1 %264, %265
%267 = icmp ult double* %251, %256
%268 = icmp ult double* %255, %252
%269 = and i1 %267, %268
%270 = or i1 %266, %269
%271 = and i64 %257, -4
%272 = or i64 %271, 1
%273 = and i64 %262, 1
%274 = icmp ult i64 %260, 4
%275 = and i64 %262, 9223372036854775806
%276 = icmp eq i64 %273, 0
%277 = icmp eq i64 %257, %271
%278 = and i64 %250, 1
%279 = icmp eq i64 %278, 0
%280 = sub nsw i64 0, %250
br label %281
281: ; preds = %586, %242
%282 = phi double [ undef, %242 ], [ %588, %586 ]
%283 = phi double [ undef, %242 ], [ %587, %586 ]
%284 = phi <2 x double> [ <double 1.000000e+00, double undef>, %242 ], [ %593, %586 ]
br i1 %12, label %391, label %285
285: ; preds = %281
%286 = or i1 %263, %270
br i1 %286, label %356, label %287
287: ; preds = %285
%288 = shufflevector <2 x double> %284, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %274, label %333, label %289
289: ; preds = %287, %289
%290 = phi i64 [ %330, %289 ], [ 0, %287 ]
%291 = phi i64 [ %331, %289 ], [ 0, %287 ]
%292 = or i64 %290, 1
%293 = getelementptr inbounds double, double* %1, i64 %292
%294 = bitcast double* %293 to <2 x double>*
%295 = load <2 x double>, <2 x double>* %294
%296 = getelementptr inbounds double, double* %293, i64 2
%297 = bitcast double* %296 to <2 x double>*
%298 = load <2 x double>, <2 x double>* %297
%299 = getelementptr inbounds double, double* %4, i64 %292
%300 = bitcast double* %299 to <2 x double>*
%301 = load <2 x double>, <2 x double>* %300
%302 = getelementptr inbounds double, double* %299, i64 2
%303 = bitcast double* %302 to <2 x double>*
%304 = load <2 x double>, <2 x double>* %303
%305 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %288, <2 x double> %301, <2 x double> %295)
%306 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %288, <2 x double> %304, <2 x double> %298)
%307 = getelementptr inbounds double, double* %5, i64 %292
%308 = bitcast double* %307 to <2 x double>*
store <2 x double> %305, <2 x double>* %308
%309 = getelementptr inbounds double, double* %307, i64 2
%310 = bitcast double* %309 to <2 x double>*
store <2 x double> %306, <2 x double>* %310
%311 = or i64 %290, 5
%312 = getelementptr inbounds double, double* %1, i64 %311
%313 = bitcast double* %312 to <2 x double>*
%314 = load <2 x double>, <2 x double>* %313
%315 = getelementptr inbounds double, double* %312, i64 2
%316 = bitcast double* %315 to <2 x double>*
%317 = load <2 x double>, <2 x double>* %316
%318 = getelementptr inbounds double, double* %4, i64 %311
%319 = bitcast double* %318 to <2 x double>*
%320 = load <2 x double>, <2 x double>* %319
%321 = getelementptr inbounds double, double* %318, i64 2
%322 = bitcast double* %321 to <2 x double>*
%323 = load <2 x double>, <2 x double>* %322
%324 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %288, <2 x double> %320, <2 x double> %314)
%325 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %288, <2 x double> %323, <2 x double> %317)
%326 = getelementptr inbounds double, double* %5, i64 %311
%327 = bitcast double* %326 to <2 x double>*
store <2 x double> %324, <2 x double>* %327
%328 = getelementptr inbounds double, double* %326, i64 2
%329 = bitcast double* %328 to <2 x double>*
store <2 x double> %325, <2 x double>* %329
%330 = add nuw i64 %290, 8
%331 = add i64 %291, 2
%332 = icmp eq i64 %331, %275
br i1 %332, label %333, label %289
333: ; preds = %289, %287
%334 = phi i64 [ 0, %287 ], [ %330, %289 ]
br i1 %276, label %355, label %335
335: ; preds = %333
%336 = or i64 %334, 1
%337 = getelementptr inbounds double, double* %1, i64 %336
%338 = bitcast double* %337 to <2 x double>*
%339 = load <2 x double>, <2 x double>* %338
%340 = getelementptr inbounds double, double* %337, i64 2
%341 = bitcast double* %340 to <2 x double>*
%342 = load <2 x double>, <2 x double>* %341
%343 = getelementptr inbounds double, double* %4, i64 %336
%344 = bitcast double* %343 to <2 x double>*
%345 = load <2 x double>, <2 x double>* %344
%346 = getelementptr inbounds double, double* %343, i64 2
%347 = bitcast double* %346 to <2 x double>*
%348 = load <2 x double>, <2 x double>* %347
%349 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %288, <2 x double> %345, <2 x double> %339)
%350 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %288, <2 x double> %348, <2 x double> %342)
%351 = getelementptr inbounds double, double* %5, i64 %336
%352 = bitcast double* %351 to <2 x double>*
store <2 x double> %349, <2 x double>* %352
%353 = getelementptr inbounds double, double* %351, i64 2
%354 = bitcast double* %353 to <2 x double>*
store <2 x double> %350, <2 x double>* %354
br label %355
355: ; preds = %333, %335
br i1 %277, label %391, label %356
356: ; preds = %285, %355
%357 = phi i64 [ 1, %285 ], [ %272, %355 ]
%358 = xor i64 %357, -1
br i1 %279, label %359, label %368
359: ; preds = %356
%360 = getelementptr inbounds double, double* %1, i64 %357
%361 = load double, double* %360
%362 = getelementptr inbounds double, double* %4, i64 %357
%363 = load double, double* %362
%364 = extractelement <2 x double> %284, i64 0
%365 = tail call double @llvm.fmuladd.f64(double %364, double %363, double %361)
%366 = getelementptr inbounds double, double* %5, i64 %357
store double %365, double* %366
%367 = add nuw nsw i64 %357, 1
br label %368
368: ; preds = %359, %356
%369 = phi i64 [ %357, %356 ], [ %367, %359 ]
%370 = icmp eq i64 %358, %280
br i1 %370, label %391, label %371
371: ; preds = %368
%372 = extractelement <2 x double> %284, i64 0
%373 = extractelement <2 x double> %284, i64 0
br label %374
374: ; preds = %374, %371
%375 = phi i64 [ %369, %371 ], [ %389, %374 ]
%376 = getelementptr inbounds double, double* %1, i64 %375
%377 = load double, double* %376
%378 = getelementptr inbounds double, double* %4, i64 %375
%379 = load double, double* %378
%380 = tail call double @llvm.fmuladd.f64(double %372, double %379, double %377)
%381 = getelementptr inbounds double, double* %5, i64 %375
store double %380, double* %381
%382 = add nuw nsw i64 %375, 1
%383 = getelementptr inbounds double, double* %1, i64 %382
%384 = load double, double* %383
%385 = getelementptr inbounds double, double* %4, i64 %382
%386 = load double, double* %385
%387 = tail call double @llvm.fmuladd.f64(double %373, double %386, double %384)
%388 = getelementptr inbounds double, double* %5, i64 %382
store double %387, double* %388
%389 = add nuw nsw i64 %375, 2
%390 = icmp eq i64 %389, %250
br i1 %390, label %391, label %374
391: ; preds = %368, %374, %355, %281
%392 = tail call i32 @validate_x(double* %247, double* %248)
%393 = tail call double %10(double* %247)
store double %393, double* %6
%394 = tail call i64 @finite(double %393)
%395 = icmp eq i64 %394, 0
br i1 %395, label %594, label %396
396: ; preds = %391
%397 = extractelement <2 x double> %284, i64 0
%398 = fcmp olt double %397, %246
br i1 %398, label %399, label %529
399: ; preds = %396
br i1 %12, label %594, label %400
400: ; preds = %399
%401 = zext i32 %245 to i64
%402 = add nsw i64 %250, -1
%403 = icmp ult i64 %402, 4
br i1 %403, label %491, label %404
404: ; preds = %400
%405 = getelementptr double, double* %5, i64 1
%406 = getelementptr double, double* %5, i64 %250
%407 = getelementptr double, double* %1, i64 1
%408 = getelementptr double, double* %1, i64 %250
%409 = icmp ult double* %405, %408
%410 = icmp ult double* %407, %406
%411 = and i1 %409, %410
br i1 %411, label %491, label %412
412: ; preds = %404
%413 = and i64 %402, -4
%414 = or i64 %413, 1
%415 = and i64 %262, 3
%416 = icmp ult i64 %260, 12
br i1 %416, label %469, label %417
417: ; preds = %412
%418 = and i64 %262, 9223372036854775804
br label %419
419: ; preds = %419, %417
%420 = phi i64 [ 0, %417 ], [ %466, %419 ]
%421 = phi i64 [ 0, %417 ], [ %467, %419 ]
%422 = or i64 %420, 1
%423 = getelementptr inbounds double, double* %1, i64 %422
%424 = bitcast double* %423 to <2 x double>*
%425 = load <2 x double>, <2 x double>* %424
%426 = getelementptr inbounds double, double* %423, i64 2
%427 = bitcast double* %426 to <2 x double>*
%428 = load <2 x double>, <2 x double>* %427
%429 = getelementptr inbounds double, double* %5, i64 %422
%430 = bitcast double* %429 to <2 x double>*
store <2 x double> %425, <2 x double>* %430
%431 = getelementptr inbounds double, double* %429, i64 2
%432 = bitcast double* %431 to <2 x double>*
store <2 x double> %428, <2 x double>* %432
%433 = or i64 %420, 5
%434 = getelementptr inbounds double, double* %1, i64 %433
%435 = bitcast double* %434 to <2 x double>*
%436 = load <2 x double>, <2 x double>* %435
%437 = getelementptr inbounds double, double* %434, i64 2
%438 = bitcast double* %437 to <2 x double>*
%439 = load <2 x double>, <2 x double>* %438
%440 = getelementptr inbounds double, double* %5, i64 %433
%441 = bitcast double* %440 to <2 x double>*
store <2 x double> %436, <2 x double>* %441
%442 = getelementptr inbounds double, double* %440, i64 2
%443 = bitcast double* %442 to <2 x double>*
store <2 x double> %439, <2 x double>* %443
%444 = or i64 %420, 9
%445 = getelementptr inbounds double, double* %1, i64 %444
%446 = bitcast double* %445 to <2 x double>*
%447 = load <2 x double>, <2 x double>* %446
%448 = getelementptr inbounds double, double* %445, i64 2
%449 = bitcast double* %448 to <2 x double>*
%450 = load <2 x double>, <2 x double>* %449
%451 = getelementptr inbounds double, double* %5, i64 %444
%452 = bitcast double* %451 to <2 x double>*
store <2 x double> %447, <2 x double>* %452
%453 = getelementptr inbounds double, double* %451, i64 2
%454 = bitcast double* %453 to <2 x double>*
store <2 x double> %450, <2 x double>* %454
%455 = or i64 %420, 13
%456 = getelementptr inbounds double, double* %1, i64 %455
%457 = bitcast double* %456 to <2 x double>*
%458 = load <2 x double>, <2 x double>* %457
%459 = getelementptr inbounds double, double* %456, i64 2
%460 = bitcast double* %459 to <2 x double>*
%461 = load <2 x double>, <2 x double>* %460
%462 = getelementptr inbounds double, double* %5, i64 %455
%463 = bitcast double* %462 to <2 x double>*
store <2 x double> %458, <2 x double>* %463
%464 = getelementptr inbounds double, double* %462, i64 2
%465 = bitcast double* %464 to <2 x double>*
store <2 x double> %461, <2 x double>* %465
%466 = add nuw i64 %420, 16
%467 = add nuw i64 %421, 4
%468 = icmp eq i64 %467, %418
br i1 %468, label %469, label %419
469: ; preds = %419, %412
%470 = phi i64 [ 0, %412 ], [ %466, %419 ]
%471 = icmp eq i64 %415, 0
br i1 %471, label %489, label %472
472: ; preds = %469, %472
%473 = phi i64 [ %486, %472 ], [ %470, %469 ]
%474 = phi i64 [ %487, %472 ], [ 0, %469 ]
%475 = or i64 %473, 1
%476 = getelementptr inbounds double, double* %1, i64 %475
%477 = bitcast double* %476 to <2 x double>*
%478 = load <2 x double>, <2 x double>* %477
%479 = getelementptr inbounds double, double* %476, i64 2
%480 = bitcast double* %479 to <2 x double>*
%481 = load <2 x double>, <2 x double>* %480
%482 = getelementptr inbounds double, double* %5, i64 %475
%483 = bitcast double* %482 to <2 x double>*
store <2 x double> %478, <2 x double>* %483
%484 = getelementptr inbounds double, double* %482, i64 2
%485 = bitcast double* %484 to <2 x double>*
store <2 x double> %481, <2 x double>* %485
%486 = add nuw i64 %473, 4
%487 = add i64 %474, 1
%488 = icmp eq i64 %487, %415
br i1 %488, label %489, label %472
489: ; preds = %472, %469
%490 = icmp eq i64 %402, %413
br i1 %490, label %594, label %491
491: ; preds = %404, %400, %489
%492 = phi i64 [ 1, %404 ], [ 1, %400 ], [ %414, %489 ]
%493 = sub nsw i64 %250, %492
%494 = xor i64 %492, -1
%495 = add nsw i64 %494, %250
%496 = and i64 %493, 3
%497 = icmp eq i64 %496, 0
br i1 %497, label %507, label %498
498: ; preds = %491, %498
%499 = phi i64 [ %504, %498 ], [ %492, %491 ]
%500 = phi i64 [ %505, %498 ], [ 0, %491 ]
%501 = getelementptr inbounds double, double* %1, i64 %499
%502 = load double, double* %501
%503 = getelementptr inbounds double, double* %5, i64 %499
store double %502, double* %503
%504 = add nuw nsw i64 %499, 1
%505 = add i64 %500, 1
%506 = icmp eq i64 %505, %496
br i1 %506, label %507, label %498
507: ; preds = %498, %491
%508 = phi i64 [ %492, %491 ], [ %504, %498 ]
%509 = icmp ult i64 %495, 3
br i1 %509, label %594, label %510
510: ; preds = %507, %510
%511 = phi i64 [ %527, %510 ], [ %508, %507 ]
%512 = getelementptr inbounds double, double* %1, i64 %511
%513 = load double, double* %512
%514 = getelementptr inbounds double, double* %5, i64 %511
store double %513, double* %514
%515 = add nuw nsw i64 %511, 1
%516 = getelementptr inbounds double, double* %1, i64 %515
%517 = load double, double* %516
%518 = getelementptr inbounds double, double* %5, i64 %515
store double %517, double* %518
%519 = add nuw nsw i64 %511, 2
%520 = getelementptr inbounds double, double* %1, i64 %519
%521 = load double, double* %520
%522 = getelementptr inbounds double, double* %5, i64 %519
store double %521, double* %522
%523 = add nuw nsw i64 %511, 3
%524 = getelementptr inbounds double, double* %1, i64 %523
%525 = load double, double* %524
%526 = getelementptr inbounds double, double* %5, i64 %523
store double %525, double* %526
%527 = add nuw nsw i64 %511, 4
%528 = icmp eq i64 %527, %401
br i1 %528, label %594, label %510
529: ; preds = %396
%530 = load double, double* %6
%531 = fmul double %397, 1.000000e-04
%532 = tail call double @llvm.fmuladd.f64(double %531, double %243, double %2)
%533 = fcmp ugt double %530, %532
br i1 %533, label %534, label %596
534: ; preds = %529
%535 = fcmp oeq double %397, 1.000000e+00
%536 = fsub double %530, %2
br i1 %535, label %537, label %541
537: ; preds = %534
%538 = fsub double %536, %243
%539 = fmul double %538, 2.000000e+00
%540 = fdiv double %249, %539
br label %586
541: ; preds = %534
%542 = fsub double %282, %2
%543 = fneg <2 x double> %284
%544 = insertelement <2 x double> poison, double %536, i64 0
%545 = insertelement <2 x double> %544, double %542, i64 1
%546 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %543, <2 x double> %259, <2 x double> %545)
%547 = fmul <2 x double> %284, %284
%548 = fdiv <2 x double> %546, %547
%549 = shufflevector <2 x double> %548, <2 x double> %284, <2 x i32> <i32 0, i32 2>
%550 = shufflevector <2 x double> %548, <2 x double> %284, <2 x i32> <i32 1, i32 3>
%551 = fsub <2 x double> %549, %550
%552 = extractelement <2 x double> %551, i64 0
%553 = extractelement <2 x double> %551, i64 1
%554 = fdiv double %552, %553
%555 = shufflevector <2 x double> %543, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%556 = fmul <2 x double> %546, %555
%557 = extractelement <2 x double> %556, i64 0
%558 = extractelement <2 x double> %547, i64 0
%559 = fdiv double %557, %558
%560 = shufflevector <2 x double> %546, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%561 = fmul <2 x double> %560, %284
%562 = extractelement <2 x double> %561, i64 0
%563 = extractelement <2 x double> %547, i64 1
%564 = fdiv double %562, %563
%565 = fadd double %564, %559
%566 = fdiv double %565, %553
%567 = fcmp oeq double %554, 0.000000e+00
br i1 %567, label %568, label %571
568: ; preds = %541
%569 = fmul double %566, 2.000000e+00
%570 = fdiv double %249, %569
br label %581
571: ; preds = %541
%572 = fmul double %554, 3.000000e+00
%573 = fneg double %572
%574 = fmul double %243, %573
%575 = tail call double @llvm.fmuladd.f64(double %566, double %566, double %574)
%576 = fcmp olt double %575, 0.000000e+00
br i1 %576, label %581, label %577
577: ; preds = %571
%578 = tail call double @sqrt(double %575)
%579 = fsub double %578, %566
%580 = fdiv double %579, %572
br label %581
581: ; preds = %571, %577, %568
%582 = phi double [ %570, %568 ], [ %580, %577 ], [ %283, %571 ]
%583 = fmul double %397, 5.000000e-01
%584 = fcmp ogt double %582, %583
br i1 %584, label %585, label %586
585: ; preds = %581
br label %586
586: ; preds = %581, %585, %537
%587 = phi double [ %540, %537 ], [ %583, %585 ], [ %582, %581 ]
%588 = load double, double* %6
%589 = fmul double %397, 1.000000e-01
%590 = fcmp ogt double %587, %589
%591 = select i1 %590, double %587, double %589
%592 = insertelement <2 x double> poison, double %591, i64 0
%593 = shufflevector <2 x double> %592, <2 x double> %284, <2 x i32> <i32 0, i32 2>
br label %281
594: ; preds = %391, %507, %510, %489, %399
%595 = phi i32 [ 1, %399 ], [ 1, %489 ], [ 1, %510 ], [ 1, %507 ], [ 2, %391 ]
store i32 %595, i32* %9
br label %596
596: ; preds = %529, %594
ret void
}