#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 *);
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];
    *f = (*func)(x + 1);
    bad_step = 0;
    if (finite(*f) == 0) {
      bad_step = 1;
    }
    if (x[1] <= 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  0xe95(%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     11e5 <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    1199 <my_lnsrch+0x79>
movsd  -0xb0(%rbp),%xmm0
ff
call   1030 <sqrt@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
ucomisd -0x48(%rbp),%xmm0
jbe    1252 <my_lnsrch+0x132>
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     124d <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    1214 <my_lnsrch+0xf4>
jmp    1252 <my_lnsrch+0x132>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     12b0 <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    1264 <my_lnsrch+0x144>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1389 <my_lnsrch+0x269>
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1313 <my_lnsrch+0x1f3>
jp     1313 <my_lnsrch+0x1f3>
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xd2e(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
jmp    1340 <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 0xcfc(%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    1376 <my_lnsrch+0x256>
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    137b <my_lnsrch+0x25b>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    12c2 <my_lnsrch+0x1a2>
movsd  -0x40(%rbp),%xmm0
divsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  0xc65(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     13fd <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    13af <my_lnsrch+0x28f>
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   1040 <finite@plt>
cmp    $0x0,%rax
jne    143e <my_lnsrch+0x31e>
movl   $0x1,-0xd0(%rbp)
mov    -0x30(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd 0x8(%rax),%xmm0
jb     145a <my_lnsrch+0x33a>
movl   $0x1,-0xd0(%rbp)
cmpl   $0x0,-0xd0(%rbp)
je     1476 <my_lnsrch+0x356>
mov    0x10(%rbp),%rax
movl   $0x2,(%rax)
jmp    1889 <my_lnsrch+0x769>
movsd  -0x60(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    14d4 <my_lnsrch+0x3b4>
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     14c5 <my_lnsrch+0x3a5>
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    1491 <my_lnsrch+0x371>
mov    0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    1889 <my_lnsrch+0x769>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  0xb27(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  -0xa8(%rbp),%xmm3
ff
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     150d <my_lnsrch+0x3ed>
jmp    1889 <my_lnsrch+0x769>
movsd  -0x60(%rbp),%xmm0
movsd  0xaee(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    157b <my_lnsrch+0x45b>
jp     157b <my_lnsrch+0x45b>
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  0xa9a(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    17ee <my_lnsrch+0x6ce>
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    16fc <my_lnsrch+0x5dc>
jp     16fc <my_lnsrch+0x5dc>
movsd  -0xa8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x91a(%rip),%xmm1
mulsd  -0x78(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    17b5 <my_lnsrch+0x695>
movsd  -0x78(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  0x90a(%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    175a <my_lnsrch+0x63a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    17b0 <my_lnsrch+0x690>
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   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  0x879(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    17b5 <my_lnsrch+0x695>
movsd  -0xc8(%rbp),%xmm0
ff
movsd  0x85b(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    17e9 <my_lnsrch+0x6c9>
movsd  0x844(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    17ee <my_lnsrch+0x6ce>
jmp    17f3 <my_lnsrch+0x6d3>
jmp    17f8 <my_lnsrch+0x6d8>
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  0x7f9(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    1853 <my_lnsrch+0x733>
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf8(%rbp)
ff
jmp    1868 <my_lnsrch+0x748>
movsd  0x7cd(%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    13a8 <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+0x413>
mov    %rdx,%rbp
mov    %edi,%r11d
lea    -0x1(%r11),%r13
mov    %r11d,%eax
and    $0x3,%eax
cmp    $0x3,%r13
jae    1198 <my_lnsrch+0x78>
xorpd  %xmm0,%xmm0
mov    $0x1,%ecx
test   %rax,%rax
jne    11fa <my_lnsrch+0xda>
jmp    1216 <my_lnsrch+0xf6>
mov    %r11d,%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    11b0 <my_lnsrch+0x90>
add    $0x1,%rcx
test   %rax,%rax
je     1216 <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    1200 <my_lnsrch+0xe0>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     122f <my_lnsrch+0x10f>
sqrtsd %xmm0,%xmm0
ucomisd %xmm2,%xmm0
ja     1259 <my_lnsrch+0x139>
jmp    1357 <my_lnsrch+0x237>
mov    %rdi,%r15
mov    %r11,0x50(%rsp)
movaps %xmm2,0x20(%rsp)
call   1030 <sqrt@plt>
movapd 0x20(%rsp),%xmm2
mov    0x50(%rsp),%r11
mov    %r15,%rdi
ucomisd %xmm2,%xmm0
jbe    1357 <my_lnsrch+0x237>
test   %edi,%edi
jle    1357 <my_lnsrch+0x237>
lea    0x1(%r11),%rax
divsd  %xmm0,%xmm2
lea    -0x1(%rax),%r8
mov    $0x1,%ecx
cmp    $0x4,%r8
jb     1340 <my_lnsrch+0x220>
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     1a52 <my_lnsrch+0x932>
mov    %r9,%rdx
movabs $0x7ffffffffffffffe,%rsi
ff ff 7f
and    %rsi,%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
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+0x1a0>
test   $0x1,%r9b
je     1336 <my_lnsrch+0x216>
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+0x237>
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+0x220>
test   %edi,%edi
jle    137a <my_lnsrch+0x25a>
mov    %r11d,%eax
and    $0x3,%eax
cmp    $0x3,%r13
jae    1387 <my_lnsrch+0x267>
xorpd  %xmm5,%xmm5
mov    $0x1,%ecx
test   %rax,%rax
jne    13f2 <my_lnsrch+0x2d2>
jmp    1427 <my_lnsrch+0x307>
xorpd  %xmm5,%xmm5
xorpd  %xmm0,%xmm0
jmp    1533 <my_lnsrch+0x413>
mov    %r11d,%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+0x280>
add    $0x1,%rcx
test   %rax,%rax
je     1427 <my_lnsrch+0x307>
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+0x2f0>
test   %edi,%edi
jle    14e2 <my_lnsrch+0x3c2>
test   %r13,%r13
je     14e8 <my_lnsrch+0x3c8>
mov    %r11d,%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+0x340>
test   $0x1,%r11b
jne    14f7 <my_lnsrch+0x3d7>
jmp    1533 <my_lnsrch+0x413>
xorpd  %xmm0,%xmm0
jmp    1533 <my_lnsrch+0x413>
xorpd  %xmm0,%xmm0
mov    $0x1,%eax
test   $0x1,%r11b
je     1533 <my_lnsrch+0x413>
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
movapd 0xaee(%rip),%xmm0
xorpd  %xmm5,%xmm0
movapd %xmm0,0xb0(%rsp)
lea    (%r14,%rdx,8),%rcx
lea    0x8(%r12),%r15
lea    (%r12,%rdx,8),%rax
lea    0x8(%rbx),%r8
lea    (%rbx,%rdx,8),%r9
lea    -0x1(%rdx),%rsi
movapd %xmm5,%xmm0
unpcklpd %xmm5,%xmm0
movapd %xmm0,0xd0(%rsp)
lea    -0x5(%rdx),%rbp
mov    %rbp,0x30(%rsp)
shr    $0x2,%rbp
add    $0x1,%rbp
mov    %rax,0x88(%rsp)
cmp    %rax,%r11
setb   %r10b
mov    %r15,0x78(%rsp)
cmp    %rcx,%r15
setb   %al
and    %r10b,%al
mov    %r11,0x48(%rsp)
cmp    %r9,%r11
setb   %r9b
mov    %rcx,0x80(%rsp)
cmp    %rcx,%r8
setb   %cl
and    %r9b,%cl
or     %al,%cl
mov    %cl,0x7(%rsp)
mov    %rsi,%rax
and    $0xfffffffffffffffc,%rax
mov    %rax,0x40(%rsp)
add    $0x1,%rax
mov    %rax,0x98(%rsp)
mov    %rbp,%rax
mov    %rbp,0x38(%rsp)
movabs $0x7ffffffffffffffe,%rax
ff ff 7f
and    %rax,%rbp
mov    %rbp,0x90(%rsp)
mov    %rdx,%rax
neg    %rax
mov    %rax,0xa0(%rsp)
movsd  0x9db(%rip),%xmm6
movapd %xmm5,0xe0(%rsp)
mov    %rdx,0x8(%rsp)
mov    0x48(%rsp),%r13
jmp    1686 <my_lnsrch+0x566>
nopw   0x0(%rax,%rax,1)
subsd  %xmm5,%xmm7
addsd  %xmm7,%xmm7
movapd 0xb0(%rsp),%xmm1
divsd  %xmm7,%xmm1
mov    0x18(%rsp),%rax
movsd  (%rax),%xmm0
movapd %xmm0,0x20(%rsp)
mulsd  0x9b4(%rip),%xmm6
movsd  %xmm1,0x60(%rsp)
maxsd  %xmm6,%xmm1
unpcklpd %xmm4,%xmm1
movapd %xmm1,%xmm6
mov    %rbp,%rsi
mov    0x8(%rsp),%rdx
test   %edi,%edi
jle    1806 <my_lnsrch+0x6e6>
cmp    $0x4,%rsi
setb   %al
or     0x7(%rsp),%al
mov    $0x1,%ecx
jne    179d <my_lnsrch+0x67d>
movapd %xmm6,%xmm0
unpcklpd %xmm6,%xmm0
cmpq   $0x4,0x30(%rsp)
jae    16bb <my_lnsrch+0x59b>
xor    %eax,%eax
jmp    174a <my_lnsrch+0x62a>
mov    0x90(%rsp),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
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+0x5b0>
testb  $0x1,0x38(%rsp)
je     178e <my_lnsrch+0x66e>
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    0x40(%rsp),%rsi
je     1806 <my_lnsrch+0x6e6>
mov    %rcx,%rax
test   $0x1,%dl
jne    17be <my_lnsrch+0x69e>
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+0x6e6>
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+0x6b0>
movapd %xmm6,0x50(%rsp)
mov    %rsi,%rbp
mov    %rdi,%r15
mov    %r13,%rdi
call   *0x138(%rsp)
mov    0x18(%rsp),%rax
movsd  %xmm0,(%rax)
call   1040 <finite@plt>
xorpd  %xmm9,%xmm9
ucomisd 0x0(%r13),%xmm9
mov    $0x2,%ecx
jae    1bbf <my_lnsrch+0xa9f>
test   %rax,%rax
movapd 0xe0(%rsp),%xmm5
je     1bbf <my_lnsrch+0xa9f>
movsd  0x10(%rsp),%xmm0
movapd 0x50(%rsp),%xmm4
ucomisd %xmm4,%xmm0
ja     19ef <my_lnsrch+0x8cf>
mov    0x18(%rsp),%rax
movsd  (%rax),%xmm7
movapd %xmm4,%xmm0
mulsd  0x78b(%rip),%xmm0
mulsd  %xmm5,%xmm0
movsd  0xa8(%rsp),%xmm8
addsd  %xmm8,%xmm0
ucomisd %xmm7,%xmm0
jae    1bc9 <my_lnsrch+0xaa9>
movapd %xmm4,%xmm6
mov    %r15,%rdi
ucomisd 0x757(%rip),%xmm4
subsd  %xmm8,%xmm7
jne    18b6 <my_lnsrch+0x796>
jnp    1640 <my_lnsrch+0x520>
movapd 0x20(%rsp),%xmm1
subsd  %xmm8,%xmm1
movapd %xmm4,%xmm0
xorpd  0x773(%rip),%xmm0
unpcklpd %xmm1,%xmm7
movapd %xmm4,%xmm1
mulpd  0xd0(%rsp),%xmm1
subpd  %xmm1,%xmm7
movapd %xmm4,%xmm1
mulpd  %xmm4,%xmm1
movapd %xmm7,%xmm2
divpd  %xmm1,%xmm2
movapd %xmm2,%xmm3
unpcklpd %xmm4,%xmm3
unpckhpd %xmm4,%xmm2
subpd  %xmm2,%xmm3
movapd %xmm3,%xmm2
unpckhpd %xmm3,%xmm2
divsd  %xmm2,%xmm3
pshufd $0xee,%xmm0,%xmm0
mulsd  %xmm7,%xmm0
divsd  %xmm1,%xmm0
unpckhpd %xmm7,%xmm7
mulsd  %xmm4,%xmm7
unpckhpd %xmm1,%xmm1
divsd  %xmm1,%xmm7
addsd  %xmm0,%xmm7
divsd  %xmm2,%xmm7
ucomisd %xmm9,%xmm3
jne    1952 <my_lnsrch+0x832>
jp     1952 <my_lnsrch+0x832>
addsd  %xmm7,%xmm7
movapd 0xb0(%rsp),%xmm1
divsd  %xmm7,%xmm1
jmp    19d0 <my_lnsrch+0x8b0>
mulsd  0x6b6(%rip),%xmm3
movapd %xmm5,%xmm1
mulsd  %xmm3,%xmm1
movapd %xmm7,%xmm0
mulsd  %xmm7,%xmm0
subsd  %xmm1,%xmm0
ucomisd %xmm0,%xmm9
movsd  0x60(%rsp),%xmm1
ja     19d0 <my_lnsrch+0x8b0>
ucomisd %xmm9,%xmm0
jb     198b <my_lnsrch+0x86b>
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
jmp    19c7 <my_lnsrch+0x8a7>
movsd  %xmm6,0x20(%rsp)
movapd %xmm7,0x60(%rsp)
movapd %xmm3,0xc0(%rsp)
call   1030 <sqrt@plt>
movapd 0xc0(%rsp),%xmm3
movapd 0x60(%rsp),%xmm7
movsd  0x20(%rsp),%xmm6
movapd 0x50(%rsp),%xmm4
mov    %r15,%rdi
movapd %xmm0,%xmm1
subsd  %xmm7,%xmm1
divsd  %xmm3,%xmm1
nop
movapd %xmm6,%xmm0
mulsd  0x63c(%rip),%xmm0
ucomisd %xmm0,%xmm1
jbe    1655 <my_lnsrch+0x535>
movapd %xmm0,%xmm1
jmp    1655 <my_lnsrch+0x535>
mov    $0x1,%ecx
test   %r15d,%r15d
jle    1bbf <my_lnsrch+0xa9f>
mov    $0x1,%eax
cmp    $0x4,%rbp
jae    1a12 <my_lnsrch+0x8f2>
mov    0x8(%rsp),%rdi
jmp    1b42 <my_lnsrch+0xa22>
mov    0x88(%rsp),%rdx
cmp    %rdx,0x48(%rsp)
mov    0x8(%rsp),%rdi
jae    1a39 <my_lnsrch+0x919>
mov    0x78(%rsp),%rdx
cmp    0x80(%rsp),%rdx
jb     1b42 <my_lnsrch+0xa22>
mov    0x38(%rsp),%rsi
mov    %esi,%eax
and    $0x3,%eax
cmpq   $0xc,0x30(%rsp)
jae    1a63 <my_lnsrch+0x943>
xor    %edx,%edx
jmp    1aee <my_lnsrch+0x9ce>
xor    %esi,%esi
test   $0x1,%r9b
jne    1310 <my_lnsrch+0x1f0>
jmp    1336 <my_lnsrch+0x216>
movabs $0x7ffffffffffffffe,%rdx
ff ff 7f
add    $0xfffffffffffffffe,%rdx
and    %rdx,%rsi
xor    %edx,%edx
cs 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+0x960>
test   %rax,%rax
je     1b30 <my_lnsrch+0xa10>
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,%rax
jne    1b00 <my_lnsrch+0x9e0>
mov    0x40(%rsp),%rax
cmp    %rax,%rbp
je     1bbf <my_lnsrch+0xa9f>
or     $0x1,%rax
mov    %edi,%esi
sub    %eax,%esi
mov    %rax,%rdx
not    %rdx
add    %rdi,%rdx
and    $0x3,%rsi
je     1b76 <my_lnsrch+0xa56>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rsi
jne    1b60 <my_lnsrch+0xa40>
cmp    $0x3,%rdx
jb     1bbf <my_lnsrch+0xa9f>
nopl   0x0(%rax)
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
movsd  0x8(%r12,%rax,8),%xmm0
movsd  %xmm0,0x8(%r14,%rax,8)
movsd  0x10(%r12,%rax,8),%xmm0
movsd  %xmm0,0x10(%r14,%rax,8)
movsd  0x18(%r12,%rax,8),%xmm0
movsd  %xmm0,0x18(%r14,%rax,8)
add    $0x4,%rax
cmp    %rax,%rdi
jne    1b80 <my_lnsrch+0xa60>
mov    0x130(%rsp),%rax
mov    %ecx,(%rax)
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 = %358, %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*)*, double (double*)** %22
%184 = load double*, double** %17
%185 = getelementptr inbounds double, double* %184, i64 1
%186 = call double %183(double* %185)
%187 = load double*, double** %18
store double %186, double* %187
store i32 0, i32* %40
%188 = load double*, double** %18
%189 = load double, double* %188
%190 = call i64 @finite(double %189)
%191 = icmp eq i64 %190, 0
br i1 %191, label %192, label %193
192: ; preds = %182
store i32 1, i32* %40
br label %193
193: ; preds = %192, %182
%194 = load double*, double** %17
%195 = getelementptr inbounds double, double* %194, i64 1
%196 = load double, double* %195
%197 = fcmp ole double %196, 0.000000e+00
br i1 %197, label %198, label %199
198: ; preds = %193
store i32 1, i32* %40
br label %199
199: ; preds = %198, %193
%200 = load i32, i32* %40
%201 = icmp ne i32 %200, 0
br i1 %201, label %202, label %204
202: ; preds = %199
%203 = load i32*, i32** %21
store i32 2, i32* %203
br label %362
204: ; preds = %199
%205 = load double, double* %25
%206 = load double, double* %27
%207 = fcmp olt double %205, %206
br i1 %207, label %208, label %228
208: ; preds = %204
store i32 1, i32* %23
br label %209
209: ; preds = %223, %208
%210 = load i32, i32* %23
%211 = load i32, i32* %12
%212 = icmp sle i32 %210, %211
br i1 %212, label %213, label %226
213: ; preds = %209
%214 = load double*, double** %13
%215 = load i32, i32* %23
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds double, double* %214, i64 %216
%218 = load double, double* %217
%219 = load double*, double** %17
%220 = load i32, i32* %23
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds double, double* %219, i64 %221
store double %218, double* %222
br label %223
223: ; preds = %213
%224 = load i32, i32* %23
%225 = add nsw i32 %224, 1
store i32 %225, i32* %23
br label %209
226: ; preds = %209
%227 = load i32*, i32** %21
store i32 1, i32* %227
br label %362
228: ; preds = %204
%229 = load double*, double** %18
%230 = load double, double* %229
%231 = load double, double* %14
%232 = load double, double* %25
%233 = fmul double 1.000000e-04, %232
%234 = load double, double* %34
%235 = call double @llvm.fmuladd.f64(double %233, double %234, double %231)
%236 = fcmp ole double %230, %235
br i1 %236, label %237, label %238
237: ; preds = %228
br label %362
238: ; preds = %228
%239 = load double, double* %25
%240 = fcmp oeq double %239, 1.000000e+00
br i1 %240, label %241, label %252
241: ; preds = %238
%242 = load double, double* %34
%243 = fneg double %242
%244 = load double*, double** %18
%245 = load double, double* %244
%246 = load double, double* %14
%247 = fsub double %245, %246
%248 = load double, double* %34
%249 = fsub double %247, %248
%250 = fmul double 2.000000e+00, %249
%251 = fdiv double %243, %250
store double %251, double* %38
br label %342
252: ; preds = %238
%253 = load double*, double** %18
%254 = load double, double* %253
%255 = load double, double* %14
%256 = fsub double %254, %255
%257 = load double, double* %25
%258 = load double, double* %34
%259 = fneg double %257
%260 = call double @llvm.fmuladd.f64(double %259, double %258, double %256)
store double %260, double* %32
%261 = load double, double* %30
%262 = load double, double* %31
%263 = fsub double %261, %262
%264 = load double, double* %26
%265 = load double, double* %34
%266 = fneg double %264
%267 = call double @llvm.fmuladd.f64(double %266, double %265, double %263)
store double %267, double* %33
%268 = load double, double* %32
%269 = load double, double* %25
%270 = load double, double* %25
%271 = fmul double %269, %270
%272 = fdiv double %268, %271
%273 = load double, double* %33
%274 = load double, double* %26
%275 = load double, double* %26
%276 = fmul double %274, %275
%277 = fdiv double %273, %276
%278 = fsub double %272, %277
%279 = load double, double* %25
%280 = load double, double* %26
%281 = fsub double %279, %280
%282 = fdiv double %278, %281
store double %282, double* %24
%283 = load double, double* %26
%284 = fneg double %283
%285 = load double, double* %32
%286 = fmul double %284, %285
%287 = load double, double* %25
%288 = load double, double* %25
%289 = fmul double %287, %288
%290 = fdiv double %286, %289
%291 = load double, double* %25
%292 = load double, double* %33
%293 = fmul double %291, %292
%294 = load double, double* %26
%295 = load double, double* %26
%296 = fmul double %294, %295
%297 = fdiv double %293, %296
%298 = fadd double %290, %297
%299 = load double, double* %25
%300 = load double, double* %26
%301 = fsub double %299, %300
%302 = fdiv double %298, %301
store double %302, double* %28
%303 = load double, double* %24
%304 = fcmp oeq double %303, 0.000000e+00
br i1 %304, label %305, label %311
305: ; preds = %252
%306 = load double, double* %34
%307 = fneg double %306
%308 = load double, double* %28
%309 = fmul double 2.000000e+00, %308
%310 = fdiv double %307, %309
store double %310, double* %38
br label %333
311: ; preds = %252
%312 = load double, double* %28
%313 = load double, double* %28
%314 = load double, double* %24
%315 = fmul double 3.000000e+00, %314
%316 = load double, double* %34
%317 = fmul double %315, %316
%318 = fneg double %317
%319 = call double @llvm.fmuladd.f64(double %312, double %313, double %318)
store double %319, double* %29
%320 = load double, double* %29
%321 = fcmp olt double %320, 0.000000e+00
br i1 %321, label %322, label %323
322: ; preds = %311
store double 0.000000e+00, double* %29
br label %332
323: ; preds = %311
%324 = load double, double* %28
%325 = fneg double %324
%326 = load double, double* %29
%327 = call double @sqrt(double %326)
%328 = fadd double %325, %327
%329 = load double, double* %24
%330 = fmul double 3.000000e+00, %329
%331 = fdiv double %328, %330
store double %331, double* %38
br label %332
332: ; preds = %323, %322
br label %333
333: ; preds = %332, %305
%334 = load double, double* %38
%335 = load double, double* %25
%336 = fmul double 5.000000e-01, %335
%337 = fcmp ogt double %334, %336
br i1 %337, label %338, label %341
338: ; preds = %333
%339 = load double, double* %25
%340 = fmul double 5.000000e-01, %339
store double %340, double* %38
br label %341
341: ; preds = %338, %333
br label %342
342: ; preds = %341, %241
br label %343
343: ; preds = %342
br label %344
344: ; preds = %343
%345 = load double, double* %25
store double %345, double* %26
%346 = load double*, double** %18
%347 = load double, double* %346
store double %347, double* %30
%348 = load double, double* %14
store double %348, double* %31
%349 = load double, double* %38
%350 = load double, double* %25
%351 = fmul double 1.000000e-01, %350
%352 = fcmp ogt double %349, %351
br i1 %352, label %353, label %355
353: ; preds = %344
%354 = load double, double* %38
br label %358
355: ; preds = %344
%356 = load double, double* %25
%357 = fmul double 1.000000e-01, %356
br label %358
358: ; preds = %355, %353
%359 = phi double [ %354, %353 ], [ %357, %355 ]
store double %359, double* %25
%360 = load i32, i32* %39
%361 = add nsw i32 %360, 1
store i32 %361, i32* %39
br label %157
362: ; preds = %237, %226, %202
ret void
}

LLVM IR (-O2):
define void @my_lnsrch(i32 %0, double* nocapture %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 = fneg double %243
%249 = zext i32 %245 to i64
%250 = getelementptr double, double* %5, i64 1
%251 = getelementptr double, double* %5, i64 %249
%252 = getelementptr double, double* %1, i64 1
%253 = getelementptr double, double* %1, i64 %249
%254 = getelementptr double, double* %4, i64 1
%255 = getelementptr double, double* %4, i64 %249
%256 = add nsw i64 %249, -1
%257 = insertelement <2 x double> poison, double %243, i64 0
%258 = shufflevector <2 x double> %257, <2 x double> poison, <2 x i32> zeroinitializer
%259 = add nsw i64 %249, -5
%260 = lshr i64 %259, 2
%261 = add nuw nsw i64 %260, 1
%262 = icmp ult i64 %256, 4
%263 = icmp ult double* %250, %253
%264 = icmp ult double* %252, %251
%265 = and i1 %263, %264
%266 = icmp ult double* %250, %255
%267 = icmp ult double* %254, %251
%268 = and i1 %266, %267
%269 = or i1 %265, %268
%270 = and i64 %256, -4
%271 = or i64 %270, 1
%272 = and i64 %261, 1
%273 = icmp ult i64 %259, 4
%274 = and i64 %261, 9223372036854775806
%275 = icmp eq i64 %272, 0
%276 = icmp eq i64 %256, %270
%277 = and i64 %249, 1
%278 = icmp eq i64 %277, 0
%279 = sub nsw i64 0, %249
br label %280
280: ; preds = %587, %242
%281 = phi double [ undef, %242 ], [ %589, %587 ]
%282 = phi double [ undef, %242 ], [ %588, %587 ]
%283 = phi <2 x double> [ <double 1.000000e+00, double undef>, %242 ], [ %594, %587 ]
br i1 %12, label %390, label %284
284: ; preds = %280
%285 = or i1 %262, %269
br i1 %285, label %355, label %286
286: ; preds = %284
%287 = shufflevector <2 x double> %283, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %273, label %332, label %288
288: ; preds = %286, %288
%289 = phi i64 [ %329, %288 ], [ 0, %286 ]
%290 = phi i64 [ %330, %288 ], [ 0, %286 ]
%291 = or i64 %289, 1
%292 = getelementptr inbounds double, double* %1, i64 %291
%293 = bitcast double* %292 to <2 x double>*
%294 = load <2 x double>, <2 x double>* %293
%295 = getelementptr inbounds double, double* %292, i64 2
%296 = bitcast double* %295 to <2 x double>*
%297 = load <2 x double>, <2 x double>* %296
%298 = getelementptr inbounds double, double* %4, i64 %291
%299 = bitcast double* %298 to <2 x double>*
%300 = load <2 x double>, <2 x double>* %299
%301 = getelementptr inbounds double, double* %298, i64 2
%302 = bitcast double* %301 to <2 x double>*
%303 = load <2 x double>, <2 x double>* %302
%304 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %287, <2 x double> %300, <2 x double> %294)
%305 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %287, <2 x double> %303, <2 x double> %297)
%306 = getelementptr inbounds double, double* %5, i64 %291
%307 = bitcast double* %306 to <2 x double>*
store <2 x double> %304, <2 x double>* %307
%308 = getelementptr inbounds double, double* %306, i64 2
%309 = bitcast double* %308 to <2 x double>*
store <2 x double> %305, <2 x double>* %309
%310 = or i64 %289, 5
%311 = getelementptr inbounds double, double* %1, i64 %310
%312 = bitcast double* %311 to <2 x double>*
%313 = load <2 x double>, <2 x double>* %312
%314 = getelementptr inbounds double, double* %311, i64 2
%315 = bitcast double* %314 to <2 x double>*
%316 = load <2 x double>, <2 x double>* %315
%317 = getelementptr inbounds double, double* %4, i64 %310
%318 = bitcast double* %317 to <2 x double>*
%319 = load <2 x double>, <2 x double>* %318
%320 = getelementptr inbounds double, double* %317, i64 2
%321 = bitcast double* %320 to <2 x double>*
%322 = load <2 x double>, <2 x double>* %321
%323 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %287, <2 x double> %319, <2 x double> %313)
%324 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %287, <2 x double> %322, <2 x double> %316)
%325 = getelementptr inbounds double, double* %5, i64 %310
%326 = bitcast double* %325 to <2 x double>*
store <2 x double> %323, <2 x double>* %326
%327 = getelementptr inbounds double, double* %325, i64 2
%328 = bitcast double* %327 to <2 x double>*
store <2 x double> %324, <2 x double>* %328
%329 = add nuw i64 %289, 8
%330 = add i64 %290, 2
%331 = icmp eq i64 %330, %274
br i1 %331, label %332, label %288
332: ; preds = %288, %286
%333 = phi i64 [ 0, %286 ], [ %329, %288 ]
br i1 %275, label %354, label %334
334: ; preds = %332
%335 = or i64 %333, 1
%336 = getelementptr inbounds double, double* %1, i64 %335
%337 = bitcast double* %336 to <2 x double>*
%338 = load <2 x double>, <2 x double>* %337
%339 = getelementptr inbounds double, double* %336, i64 2
%340 = bitcast double* %339 to <2 x double>*
%341 = load <2 x double>, <2 x double>* %340
%342 = getelementptr inbounds double, double* %4, i64 %335
%343 = bitcast double* %342 to <2 x double>*
%344 = load <2 x double>, <2 x double>* %343
%345 = getelementptr inbounds double, double* %342, i64 2
%346 = bitcast double* %345 to <2 x double>*
%347 = load <2 x double>, <2 x double>* %346
%348 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %287, <2 x double> %344, <2 x double> %338)
%349 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %287, <2 x double> %347, <2 x double> %341)
%350 = getelementptr inbounds double, double* %5, i64 %335
%351 = bitcast double* %350 to <2 x double>*
store <2 x double> %348, <2 x double>* %351
%352 = getelementptr inbounds double, double* %350, i64 2
%353 = bitcast double* %352 to <2 x double>*
store <2 x double> %349, <2 x double>* %353
br label %354
354: ; preds = %332, %334
br i1 %276, label %390, label %355
355: ; preds = %284, %354
%356 = phi i64 [ 1, %284 ], [ %271, %354 ]
%357 = xor i64 %356, -1
br i1 %278, label %358, label %367
358: ; preds = %355
%359 = getelementptr inbounds double, double* %1, i64 %356
%360 = load double, double* %359
%361 = getelementptr inbounds double, double* %4, i64 %356
%362 = load double, double* %361
%363 = extractelement <2 x double> %283, i64 0
%364 = tail call double @llvm.fmuladd.f64(double %363, double %362, double %360)
%365 = getelementptr inbounds double, double* %5, i64 %356
store double %364, double* %365
%366 = add nuw nsw i64 %356, 1
br label %367
367: ; preds = %358, %355
%368 = phi i64 [ %356, %355 ], [ %366, %358 ]
%369 = icmp eq i64 %357, %279
br i1 %369, label %390, label %370
370: ; preds = %367
%371 = extractelement <2 x double> %283, i64 0
%372 = extractelement <2 x double> %283, i64 0
br label %373
373: ; preds = %373, %370
%374 = phi i64 [ %368, %370 ], [ %388, %373 ]
%375 = getelementptr inbounds double, double* %1, i64 %374
%376 = load double, double* %375
%377 = getelementptr inbounds double, double* %4, i64 %374
%378 = load double, double* %377
%379 = tail call double @llvm.fmuladd.f64(double %371, double %378, double %376)
%380 = getelementptr inbounds double, double* %5, i64 %374
store double %379, double* %380
%381 = add nuw nsw i64 %374, 1
%382 = getelementptr inbounds double, double* %1, i64 %381
%383 = load double, double* %382
%384 = getelementptr inbounds double, double* %4, i64 %381
%385 = load double, double* %384
%386 = tail call double @llvm.fmuladd.f64(double %372, double %385, double %383)
%387 = getelementptr inbounds double, double* %5, i64 %381
store double %386, double* %387
%388 = add nuw nsw i64 %374, 2
%389 = icmp eq i64 %388, %249
br i1 %389, label %390, label %373
390: ; preds = %367, %373, %354, %280
%391 = tail call double %10(double* %247)
store double %391, double* %6
%392 = tail call i64 @finite(double %391)
%393 = icmp ne i64 %392, 0
%394 = load double, double* %247
%395 = fcmp ugt double %394, 0.000000e+00
%396 = select i1 %395, i1 %393, i1 false
br i1 %396, label %397, label %595
397: ; preds = %390
%398 = extractelement <2 x double> %283, i64 0
%399 = fcmp olt double %398, %246
br i1 %399, label %400, label %530
400: ; preds = %397
br i1 %12, label %595, label %401
401: ; preds = %400
%402 = zext i32 %245 to i64
%403 = add nsw i64 %249, -1
%404 = icmp ult i64 %403, 4
br i1 %404, label %492, label %405
405: ; preds = %401
%406 = getelementptr double, double* %5, i64 1
%407 = getelementptr double, double* %5, i64 %249
%408 = getelementptr double, double* %1, i64 1
%409 = getelementptr double, double* %1, i64 %249
%410 = icmp ult double* %406, %409
%411 = icmp ult double* %408, %407
%412 = and i1 %410, %411
br i1 %412, label %492, label %413
413: ; preds = %405
%414 = and i64 %403, -4
%415 = or i64 %414, 1
%416 = and i64 %261, 3
%417 = icmp ult i64 %259, 12
br i1 %417, label %470, label %418
418: ; preds = %413
%419 = and i64 %261, 9223372036854775804
br label %420
420: ; preds = %420, %418
%421 = phi i64 [ 0, %418 ], [ %467, %420 ]
%422 = phi i64 [ 0, %418 ], [ %468, %420 ]
%423 = or i64 %421, 1
%424 = getelementptr inbounds double, double* %1, i64 %423
%425 = bitcast double* %424 to <2 x double>*
%426 = load <2 x double>, <2 x double>* %425
%427 = getelementptr inbounds double, double* %424, i64 2
%428 = bitcast double* %427 to <2 x double>*
%429 = load <2 x double>, <2 x double>* %428
%430 = getelementptr inbounds double, double* %5, i64 %423
%431 = bitcast double* %430 to <2 x double>*
store <2 x double> %426, <2 x double>* %431
%432 = getelementptr inbounds double, double* %430, i64 2
%433 = bitcast double* %432 to <2 x double>*
store <2 x double> %429, <2 x double>* %433
%434 = or i64 %421, 5
%435 = getelementptr inbounds double, double* %1, i64 %434
%436 = bitcast double* %435 to <2 x double>*
%437 = load <2 x double>, <2 x double>* %436
%438 = getelementptr inbounds double, double* %435, i64 2
%439 = bitcast double* %438 to <2 x double>*
%440 = load <2 x double>, <2 x double>* %439
%441 = getelementptr inbounds double, double* %5, i64 %434
%442 = bitcast double* %441 to <2 x double>*
store <2 x double> %437, <2 x double>* %442
%443 = getelementptr inbounds double, double* %441, i64 2
%444 = bitcast double* %443 to <2 x double>*
store <2 x double> %440, <2 x double>* %444
%445 = or i64 %421, 9
%446 = getelementptr inbounds double, double* %1, i64 %445
%447 = bitcast double* %446 to <2 x double>*
%448 = load <2 x double>, <2 x double>* %447
%449 = getelementptr inbounds double, double* %446, i64 2
%450 = bitcast double* %449 to <2 x double>*
%451 = load <2 x double>, <2 x double>* %450
%452 = getelementptr inbounds double, double* %5, i64 %445
%453 = bitcast double* %452 to <2 x double>*
store <2 x double> %448, <2 x double>* %453
%454 = getelementptr inbounds double, double* %452, i64 2
%455 = bitcast double* %454 to <2 x double>*
store <2 x double> %451, <2 x double>* %455
%456 = or i64 %421, 13
%457 = getelementptr inbounds double, double* %1, i64 %456
%458 = bitcast double* %457 to <2 x double>*
%459 = load <2 x double>, <2 x double>* %458
%460 = getelementptr inbounds double, double* %457, i64 2
%461 = bitcast double* %460 to <2 x double>*
%462 = load <2 x double>, <2 x double>* %461
%463 = getelementptr inbounds double, double* %5, i64 %456
%464 = bitcast double* %463 to <2 x double>*
store <2 x double> %459, <2 x double>* %464
%465 = getelementptr inbounds double, double* %463, i64 2
%466 = bitcast double* %465 to <2 x double>*
store <2 x double> %462, <2 x double>* %466
%467 = add nuw i64 %421, 16
%468 = add nuw i64 %422, 4
%469 = icmp eq i64 %468, %419
br i1 %469, label %470, label %420
470: ; preds = %420, %413
%471 = phi i64 [ 0, %413 ], [ %467, %420 ]
%472 = icmp eq i64 %416, 0
br i1 %472, label %490, label %473
473: ; preds = %470, %473
%474 = phi i64 [ %487, %473 ], [ %471, %470 ]
%475 = phi i64 [ %488, %473 ], [ 0, %470 ]
%476 = or i64 %474, 1
%477 = getelementptr inbounds double, double* %1, i64 %476
%478 = bitcast double* %477 to <2 x double>*
%479 = load <2 x double>, <2 x double>* %478
%480 = getelementptr inbounds double, double* %477, i64 2
%481 = bitcast double* %480 to <2 x double>*
%482 = load <2 x double>, <2 x double>* %481
%483 = getelementptr inbounds double, double* %5, i64 %476
%484 = bitcast double* %483 to <2 x double>*
store <2 x double> %479, <2 x double>* %484
%485 = getelementptr inbounds double, double* %483, i64 2
%486 = bitcast double* %485 to <2 x double>*
store <2 x double> %482, <2 x double>* %486
%487 = add nuw i64 %474, 4
%488 = add i64 %475, 1
%489 = icmp eq i64 %488, %416
br i1 %489, label %490, label %473
490: ; preds = %473, %470
%491 = icmp eq i64 %403, %414
br i1 %491, label %595, label %492
492: ; preds = %405, %401, %490
%493 = phi i64 [ 1, %405 ], [ 1, %401 ], [ %415, %490 ]
%494 = sub nsw i64 %249, %493
%495 = xor i64 %493, -1
%496 = add nsw i64 %495, %249
%497 = and i64 %494, 3
%498 = icmp eq i64 %497, 0
br i1 %498, label %508, label %499
499: ; preds = %492, %499
%500 = phi i64 [ %505, %499 ], [ %493, %492 ]
%501 = phi i64 [ %506, %499 ], [ 0, %492 ]
%502 = getelementptr inbounds double, double* %1, i64 %500
%503 = load double, double* %502
%504 = getelementptr inbounds double, double* %5, i64 %500
store double %503, double* %504
%505 = add nuw nsw i64 %500, 1
%506 = add i64 %501, 1
%507 = icmp eq i64 %506, %497
br i1 %507, label %508, label %499
508: ; preds = %499, %492
%509 = phi i64 [ %493, %492 ], [ %505, %499 ]
%510 = icmp ult i64 %496, 3
br i1 %510, label %595, label %511
511: ; preds = %508, %511
%512 = phi i64 [ %528, %511 ], [ %509, %508 ]
%513 = getelementptr inbounds double, double* %1, i64 %512
%514 = load double, double* %513
%515 = getelementptr inbounds double, double* %5, i64 %512
store double %514, double* %515
%516 = add nuw nsw i64 %512, 1
%517 = getelementptr inbounds double, double* %1, i64 %516
%518 = load double, double* %517
%519 = getelementptr inbounds double, double* %5, i64 %516
store double %518, double* %519
%520 = add nuw nsw i64 %512, 2
%521 = getelementptr inbounds double, double* %1, i64 %520
%522 = load double, double* %521
%523 = getelementptr inbounds double, double* %5, i64 %520
store double %522, double* %523
%524 = add nuw nsw i64 %512, 3
%525 = getelementptr inbounds double, double* %1, i64 %524
%526 = load double, double* %525
%527 = getelementptr inbounds double, double* %5, i64 %524
store double %526, double* %527
%528 = add nuw nsw i64 %512, 4
%529 = icmp eq i64 %528, %402
br i1 %529, label %595, label %511
530: ; preds = %397
%531 = load double, double* %6
%532 = fmul double %398, 1.000000e-04
%533 = tail call double @llvm.fmuladd.f64(double %532, double %243, double %2)
%534 = fcmp ugt double %531, %533
br i1 %534, label %535, label %597
535: ; preds = %530
%536 = fcmp oeq double %398, 1.000000e+00
%537 = fsub double %531, %2
br i1 %536, label %538, label %542
538: ; preds = %535
%539 = fsub double %537, %243
%540 = fmul double %539, 2.000000e+00
%541 = fdiv double %248, %540
br label %587
542: ; preds = %535
%543 = fsub double %281, %2
%544 = fneg <2 x double> %283
%545 = insertelement <2 x double> poison, double %537, i64 0
%546 = insertelement <2 x double> %545, double %543, i64 1
%547 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %544, <2 x double> %258, <2 x double> %546)
%548 = fmul <2 x double> %283, %283
%549 = fdiv <2 x double> %547, %548
%550 = shufflevector <2 x double> %549, <2 x double> %283, <2 x i32> <i32 0, i32 2>
%551 = shufflevector <2 x double> %549, <2 x double> %283, <2 x i32> <i32 1, i32 3>
%552 = fsub <2 x double> %550, %551
%553 = extractelement <2 x double> %552, i64 0
%554 = extractelement <2 x double> %552, i64 1
%555 = fdiv double %553, %554
%556 = shufflevector <2 x double> %544, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%557 = fmul <2 x double> %547, %556
%558 = extractelement <2 x double> %557, i64 0
%559 = extractelement <2 x double> %548, i64 0
%560 = fdiv double %558, %559
%561 = shufflevector <2 x double> %547, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%562 = fmul <2 x double> %561, %283
%563 = extractelement <2 x double> %562, i64 0
%564 = extractelement <2 x double> %548, i64 1
%565 = fdiv double %563, %564
%566 = fadd double %565, %560
%567 = fdiv double %566, %554
%568 = fcmp oeq double %555, 0.000000e+00
br i1 %568, label %569, label %572
569: ; preds = %542
%570 = fmul double %567, 2.000000e+00
%571 = fdiv double %248, %570
br label %582
572: ; preds = %542
%573 = fmul double %555, 3.000000e+00
%574 = fneg double %573
%575 = fmul double %243, %574
%576 = tail call double @llvm.fmuladd.f64(double %567, double %567, double %575)
%577 = fcmp olt double %576, 0.000000e+00
br i1 %577, label %582, label %578
578: ; preds = %572
%579 = tail call double @sqrt(double %576)
%580 = fsub double %579, %567
%581 = fdiv double %580, %573
br label %582
582: ; preds = %572, %578, %569
%583 = phi double [ %571, %569 ], [ %581, %578 ], [ %282, %572 ]
%584 = fmul double %398, 5.000000e-01
%585 = fcmp ogt double %583, %584
br i1 %585, label %586, label %587
586: ; preds = %582
br label %587
587: ; preds = %582, %586, %538
%588 = phi double [ %541, %538 ], [ %584, %586 ], [ %583, %582 ]
%589 = load double, double* %6
%590 = fmul double %398, 1.000000e-01
%591 = fcmp ogt double %588, %590
%592 = select i1 %591, double %588, double %590
%593 = insertelement <2 x double> poison, double %592, i64 0
%594 = shufflevector <2 x double> %593, <2 x double> %283, <2 x i32> <i32 0, i32 2>
br label %280
595: ; preds = %390, %508, %511, %490, %400
%596 = phi i32 [ 1, %400 ], [ 1, %490 ], [ 1, %511 ], [ 1, %508 ], [ 2, %390 ]
store i32 %596, i32* %9
br label %597
597: ; preds = %530, %595
ret void
}