#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);
int floor(double);
int dlacon2_(int *n, double *v, double *x, int *isgn, double *est, int *kase,
             int isave[3]) {
  int c__1 = 1;
  double zero = 0.0;
  double one = 1.0;
  int jlast;
  double altsgn, estold;
  int i;
  double temp;
  extern int idamax_(int *, double *, int *);
  extern double dasum_(int *, double *, int *);
  extern int dcopy_(int *, double *, int *, double *, int *);
  if (*kase == 0) {
    for (i = 0; i < *n; ++i) {
      x[i] = 1. / (double)(*n);
    }
    *kase = 1;
    isave[0] = 1;
    return 0;
  }
  switch (isave[0]) {
  case 1:
    goto L20;
  case 2:
    goto L40;
  case 3:
    goto L70;
  case 4:
    goto L110;
  case 5:
    goto L140;
  }
L20:
  if (*n == 1) {
    v[0] = x[0];
    *est = fabs(v[0]);
    goto L150;
  }
  *est = dasum_(n, x, &c__1);
  for (i = 0; i < *n; ++i) {
    x[i] = (x[i] >= 0 ? fabs(one) : -fabs(one));
    isgn[i] = (x[i] >= 0 ? floor(x[i] + .5) : -floor(.5 - x[i]));
  }
  *kase = 2;
  isave[0] = 2;
  return 0;
L40:
  isave[1] = idamax_(n, &x[0], &c__1);
  --isave[1];
  isave[2] = 2;
L50:
  for (i = 0; i < *n; ++i)
    x[i] = zero;
  x[isave[1]] = one;
  *kase = 1;
  isave[0] = 3;
  return 0;
L70:
  dcopy_(n, x, &c__1, v, &c__1);
  estold = *est;
  *est = dasum_(n, v, &c__1);
  for (i = 0; i < *n; ++i)
    if (((x[i] >= 0 ? fabs(one) : -fabs(one)) >= 0
             ? floor((x[i] >= 0 ? fabs(one) : -fabs(one)) + .5)
             : -floor(.5 - (x[i] >= 0 ? fabs(one) : -fabs(one)))) != isgn[i])
      goto L90;
  goto L120;
L90:
  if (*est <= estold)
    goto L120;
  for (i = 0; i < *n; ++i) {
    x[i] = (x[i] >= 0 ? fabs(one) : -fabs(one));
    isgn[i] = (x[i] >= 0 ? floor(x[i] + .5) : -floor(.5 - x[i]));
  }
  *kase = 2;
  isave[0] = 4;
  return 0;
L110:
  jlast = isave[1];
  isave[1] = idamax_(n, &x[0], &c__1);
  isave[1] = isave[1] - 1;
  if (x[jlast] != fabs(x[isave[1]]) && isave[2] < 5) {
    isave[2] = isave[2] + 1;
    goto L50;
  }
L120:
  altsgn = 1.;
  for (i = 1; i <= *n; ++i) {
    x[i - 1] = altsgn * ((double)(i - 1) / (double)(*n - 1) + 1.);
    altsgn = -altsgn;
  }
  *kase = 1;
  isave[0] = 5;
  return 0;
L140:
  temp = dasum_(n, x, &c__1) / (double)(*n * 3) * 2.;
  if (temp > *est) {
    dcopy_(n, &x[0], &c__1, &v[0], &c__1);
    *est = temp;
  }
L150:
  *kase = 0;
  return 0;
}


x86 assembly (clang, -O0):
<dlacon2_>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
movl   $0x1,-0x3c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe82(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x38(%rbp),%rax
cmpl   $0x0,(%rax)
jne    11f5 <dlacon2_+0xb5>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    11d5 <dlacon2_+0x95>
mov    -0x10(%rbp),%rax
cvtsi2sdl (%rax),%xmm1
movsd  0xe4a(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1197 <dlacon2_+0x57>
mov    -0x38(%rbp),%rax
movl   $0x1,(%rax)
mov    0x10(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    19a0 <dlacon2_+0x860>
mov    0x10(%rbp),%rax
mov    (%rax),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x80(%rbp)
sub    $0x4,%eax
ja     123a <dlacon2_+0xfa>
mov    -0x80(%rbp),%rax
lea    0xe18(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    123f <dlacon2_+0xff>
jmp    13ca <dlacon2_+0x28a>
jmp    1468 <dlacon2_+0x328>
jmp    17d1 <dlacon2_+0x691>
jmp    1921 <dlacon2_+0x7e1>
jmp    123f <dlacon2_+0xff>
mov    -0x10(%rbp),%rax
cmpl   $0x1,(%rax)
jne    127c <dlacon2_+0x13c>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movaps 0xdb5(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    198f <dlacon2_+0x84f>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
call   1050 <dasum_@plt>
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    13aa <dlacon2_+0x26a>
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     12e2 <dlacon2_+0x1a2>
movsd  -0x50(%rbp),%xmm0
movaps 0xd4f(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    1311 <dlacon2_+0x1d1>
movsd  -0x50(%rbp),%xmm0
movaps 0xd32(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1365 <dlacon2_+0x225>
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  0xcc0(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
call   1060 <floor@plt>
mov    %eax,-0x8c(%rbp)
jmp    138b <dlacon2_+0x24b>
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  0xc9b(%rip),%xmm0
subsd  (%rax,%rcx,8),%xmm0
call   1060 <floor@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%edx
mov    -0x28(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    129c <dlacon2_+0x15c>
mov    -0x38(%rbp),%rax
movl   $0x2,(%rax)
mov    0x10(%rbp),%rax
movl   $0x2,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    19a0 <dlacon2_+0x860>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
call   1040 <idamax_@plt>
mov    %eax,%ecx
mov    0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    0x10(%rbp),%rax
mov    0x4(%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,0x4(%rax)
mov    0x10(%rbp),%rax
movl   $0x2,0x8(%rax)
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    1432 <dlacon2_+0x2f2>
movsd  -0x48(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1403 <dlacon2_+0x2c3>
movsd  -0x50(%rbp),%xmm0
mov    -0x20(%rbp),%rax
mov    0x10(%rbp),%rcx
movslq 0x4(%rcx),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movl   $0x1,(%rax)
mov    0x10(%rbp),%rax
movl   $0x3,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    19a0 <dlacon2_+0x860>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rcx
lea    -0x3c(%rbp),%r8
mov    %r8,%rdx
call   1030 <dcopy_@plt>
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
call   1050 <dasum_@plt>
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    167b <dlacon2_+0x53b>
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     14f3 <dlacon2_+0x3b3>
movsd  -0x50(%rbp),%xmm0
movaps 0xb3e(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
jmp    1522 <dlacon2_+0x3e2>
movsd  -0x50(%rbp),%xmm0
movaps 0xb21(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     15c1 <dlacon2_+0x481>
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     156e <dlacon2_+0x42e>
movsd  -0x50(%rbp),%xmm0
movaps 0xac3(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    159d <dlacon2_+0x45d>
movsd  -0x50(%rbp),%xmm0
movaps 0xaa6(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  0xa63(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1060 <floor@plt>
mov    %eax,-0xa4(%rbp)
jmp    164c <dlacon2_+0x50c>
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     15f8 <dlacon2_+0x4b8>
movsd  -0x50(%rbp),%xmm0
movaps 0xa39(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1627 <dlacon2_+0x4e7>
movsd  -0x50(%rbp),%xmm0
movaps 0xa1c(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm1
ff
movsd  0x9d9(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1060 <floor@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
mov    -0x28(%rbp),%rcx
movslq -0x6c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     1668 <dlacon2_+0x528>
jmp    1680 <dlacon2_+0x540>
jmp    166d <dlacon2_+0x52d>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    14ad <dlacon2_+0x36d>
jmp    186d <dlacon2_+0x72d>
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x68(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     169c <dlacon2_+0x55c>
jmp    186d <dlacon2_+0x72d>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    17b1 <dlacon2_+0x671>
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     16e9 <dlacon2_+0x5a9>
movsd  -0x50(%rbp),%xmm0
movaps 0x948(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    1718 <dlacon2_+0x5d8>
movsd  -0x50(%rbp),%xmm0
movaps 0x92b(%rip),%xmm1
pand   %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     176c <dlacon2_+0x62c>
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  0x8b9(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
call   1060 <floor@plt>
mov    %eax,-0xbc(%rbp)
jmp    1792 <dlacon2_+0x652>
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  0x894(%rip),%xmm0
subsd  (%rax,%rcx,8),%xmm0
call   1060 <floor@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0xbc(%rbp)
mov    -0xbc(%rbp),%edx
mov    -0x28(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    16a3 <dlacon2_+0x563>
mov    -0x38(%rbp),%rax
movl   $0x2,(%rax)
mov    0x10(%rbp),%rax
movl   $0x4,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    19a0 <dlacon2_+0x860>
mov    0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x54(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
call   1040 <idamax_@plt>
mov    %eax,%ecx
mov    0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    0x10(%rbp),%rax
mov    0x4(%rax),%ecx
sub    $0x1,%ecx
mov    0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x20(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    0x10(%rbp),%rcx
movslq 0x4(%rcx),%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0x7f5(%rip),%xmm2
pand   %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jne    1844 <dlacon2_+0x704>
jp     1844 <dlacon2_+0x704>
jmp    1868 <dlacon2_+0x728>
mov    0x10(%rbp),%rax
cmpl   $0x5,0x8(%rax)
jge    1868 <dlacon2_+0x728>
mov    0x10(%rbp),%rax
mov    0x8(%rax),%ecx
add    $0x1,%ecx
mov    0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
jmp    13fc <dlacon2_+0x2bc>
jmp    186d <dlacon2_+0x72d>
movsd  0x78b(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x1,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jg     1901 <dlacon2_+0x7c1>
movsd  -0x60(%rbp),%xmm0
mov    -0x6c(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
movsd  0x748(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x6c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1881 <dlacon2_+0x741>
mov    -0x38(%rbp),%rax
movl   $0x1,(%rax)
mov    0x10(%rbp),%rax
movl   $0x5,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    19a0 <dlacon2_+0x860>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
call   1050 <dasum_@plt>
mov    -0x10(%rbp),%rax
imul   $0x3,(%rax),%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  0x6bf(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mov    -0x30(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    198a <dlacon2_+0x84a>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rcx
lea    -0x3c(%rbp),%r8
mov    %r8,%rdx
call   1030 <dcopy_@plt>
movsd  -0x78(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    198f <dlacon2_+0x84f>
mov    -0x38(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlacon2_>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,%r14
mov    %r8,%r13
mov    %rdx,%rbx
mov    %rdi,%r15
mov    0x60(%rsp),%r8
movl   $0x1,0x4(%rsp)
cmpl   $0x0,(%r9)
je     11c7 <dlacon2_+0x77>
mov    %rcx,%r12
mov    %rsi,%rbp
mov    (%r8),%eax
add    $0xfffffffe,%eax
cmp    $0x3,%eax
ja     11f2 <dlacon2_+0xa2>
lea    0xebb(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x4(%rsp),%rdx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <idamax_@plt>
mov    0x60(%rsp),%rdi
mov    %eax,%ebp
add    $0xffffffff,%ebp
mov    %ebp,0x4(%rdi)
movl   $0x2,0x8(%rdi)
jmp    1316 <dlacon2_+0x1c6>
mov    (%r15),%eax
test   %eax,%eax
jle    155e <dlacon2_+0x40e>
cvtsi2sd %eax,%xmm1
movsd  0xe62(%rip),%xmm0
divsd  %xmm1,%xmm0
cmp    $0x4,%eax
jae    13b1 <dlacon2_+0x261>
xor    %ecx,%ecx
jmp    1550 <dlacon2_+0x400>
cmpl   $0x1,(%r15)
jne    13e3 <dlacon2_+0x293>
movsd  (%rbx),%xmm0
movsd  %xmm0,0x0(%rbp)
andpd  0xdf3(%rip),%xmm0
jmp    139f <dlacon2_+0x24f>
mov    %r14,0x8(%rsp)
lea    0x4(%rsp),%r14
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    %r14,%r8
call   1030 <dcopy_@plt>
movsd  0x0(%r13),%xmm0
movsd  %xmm0,0x20(%rsp)
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
mov    0x8(%rsp),%r14
call   1060 <dasum_@plt>
mov    0x60(%rsp),%rdi
movsd  %xmm0,0x0(%r13)
cmpl   $0x0,(%r15)
jle    1695 <dlacon2_+0x545>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movsd  (%rbx,%rbp,8),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xdad(%rip),%xmm0
call   1070 <floor@plt>
mov    %eax,%ecx
neg    %ecx
movsd  0x10(%rsp),%xmm0
ucomisd 0xdae(%rip),%xmm0
cmovae %eax,%ecx
cmp    (%r12,%rbp,4),%ecx
jne    1571 <dlacon2_+0x421>
add    $0x1,%rbp
movslq (%r15),%rcx
cmp    %rcx,%rbp
jl     1270 <dlacon2_+0x120>
mov    0x60(%rsp),%rdi
jmp    15ff <dlacon2_+0x4af>
mov    %r14,%r12
movslq 0x4(%r8),%r14
lea    0x4(%rsp),%rdx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <idamax_@plt>
mov    0x60(%rsp),%rdi
lea    -0x1(%rax),%ebp
mov    %ebp,0x4(%rdi)
movsd  (%rbx,%r14,8),%xmm0
mov    %r12,%r14
cltq
movsd  -0x8(%rbx,%rax,8),%xmm1
andpd  0xd08(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1304 <dlacon2_+0x1b4>
jnp    15fc <dlacon2_+0x4ac>
mov    0x8(%rdi),%eax
cmp    $0x4,%eax
jg     15fc <dlacon2_+0x4ac>
add    $0x1,%eax
mov    %eax,0x8(%rdi)
mov    (%r15),%edx
test   %edx,%edx
jle    1330 <dlacon2_+0x1e0>
shl    $0x3,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    0x60(%rsp),%rdi
movslq %ebp,%rax
movabs $0x3ff0000000000000,%rcx
mov    %rcx,(%rbx,%rax,8)
movl   $0x1,(%r14)
movl   $0x3,(%rdi)
jmp    16a2 <dlacon2_+0x552>
lea    0x4(%rsp),%rdx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <dasum_@plt>
mov    (%r15),%eax
lea    (%rax,%rax,2),%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
ucomisd 0x0(%r13),%xmm0
jbe    13a5 <dlacon2_+0x255>
lea    0x4(%rsp),%rdx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %rbp,%rcx
mov    %rdx,%r8
movapd %xmm0,0x10(%rsp)
call   1030 <dcopy_@plt>
movapd 0x10(%rsp),%xmm0
movsd  %xmm0,0x0(%r13)
movl   $0x0,(%r14)
jmp    16a2 <dlacon2_+0x552>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x7,%edx
cmp    $0x1c,%rdi
jae    1480 <dlacon2_+0x330>
xor    %edi,%edi
jmp    1515 <dlacon2_+0x3c5>
mov    %r14,0x8(%rsp)
lea    0x4(%rsp),%rdx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <dasum_@plt>
movsd  %xmm0,0x0(%r13)
cmpl   $0x0,(%r15)
jle    1465 <dlacon2_+0x315>
xor    %ebp,%ebp
lea    0xc03(%rip),%r14
jmp    1437 <dlacon2_+0x2e7>
nop
movsd  0xc20(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1070 <floor@plt>
neg    %eax
mov    %eax,(%r12,%rbp,4)
add    $0x1,%rbp
movslq (%r15),%rax
cmp    %rax,%rbp
jge    1465 <dlacon2_+0x315>
movsd  (%rbx,%rbp,8),%xmm0
xor    %eax,%eax
ucomisd 0xc02(%rip),%xmm0
setb   %al
movsd  (%r14,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
jb     1410 <dlacon2_+0x2c0>
addsd  0xbda(%rip),%xmm0
call   1070 <floor@plt>
jmp    1427 <dlacon2_+0x2d7>
mov    0x8(%rsp),%rax
movl   $0x2,(%rax)
mov    0x60(%rsp),%rax
movl   $0x2,(%rax)
jmp    16a2 <dlacon2_+0x552>
and    $0xfffffffffffffff8,%rsi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
movupd %xmm1,(%rbx,%rdi,8)
movupd %xmm1,0x10(%rbx,%rdi,8)
movupd %xmm1,0x20(%rbx,%rdi,8)
movupd %xmm1,0x30(%rbx,%rdi,8)
movupd %xmm1,0x40(%rbx,%rdi,8)
movupd %xmm1,0x50(%rbx,%rdi,8)
movupd %xmm1,0x60(%rbx,%rdi,8)
movupd %xmm1,0x70(%rbx,%rdi,8)
movupd %xmm1,0x80(%rbx,%rdi,8)
movupd %xmm1,0x90(%rbx,%rdi,8)
movupd %xmm1,0xa0(%rbx,%rdi,8)
movupd %xmm1,0xb0(%rbx,%rdi,8)
movupd %xmm1,0xc0(%rbx,%rdi,8)
movupd %xmm1,0xd0(%rbx,%rdi,8)
movupd %xmm1,0xe0(%rbx,%rdi,8)
movupd %xmm1,0xf0(%rbx,%rdi,8)
add    $0x20,%rdi
add    $0xfffffffffffffff8,%rsi
jne    1490 <dlacon2_+0x340>
test   %rdx,%rdx
je     1544 <dlacon2_+0x3f4>
lea    (%rbx,%rdi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movupd %xmm1,-0x10(%rsi,%rdi,1)
movupd %xmm1,(%rsi,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    1530 <dlacon2_+0x3e0>
cmp    %rax,%rcx
je     155e <dlacon2_+0x40e>
nopl   0x0(%rax)
movsd  %xmm0,(%rbx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1550 <dlacon2_+0x400>
movl   $0x1,(%r14)
movl   $0x1,(%r8)
jmp    16a2 <dlacon2_+0x552>
movsd  0x20(%rsp),%xmm0
ucomisd 0x0(%r13),%xmm0
mov    0x60(%rsp),%rdi
jae    15fc <dlacon2_+0x4ac>
cmpl   $0x0,(%r15)
jle    16b3 <dlacon2_+0x563>
xor    %ebp,%ebp
lea    0xa79(%rip),%r14
jmp    15c9 <dlacon2_+0x479>
movsd  0xa97(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1070 <floor@plt>
mov    0x60(%rsp),%rdi
neg    %eax
mov    %eax,(%r12,%rbp,4)
add    $0x1,%rbp
movslq (%r15),%rax
cmp    %rax,%rbp
jge    16b3 <dlacon2_+0x563>
movsd  (%rbx,%rbp,8),%xmm0
xor    %eax,%eax
ucomisd 0xa70(%rip),%xmm0
setb   %al
movsd  (%r14,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
jb     1599 <dlacon2_+0x449>
addsd  0xa48(%rip),%xmm0
call   1070 <floor@plt>
mov    0x60(%rsp),%rdi
jmp    15b5 <dlacon2_+0x465>
mov    (%r15),%ecx
test   %ecx,%ecx
jle    1695 <dlacon2_+0x545>
lea    -0x1(%rcx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    %ecx,%eax
cmp    $0x1,%ecx
jne    161c <dlacon2_+0x4cc>
xor    %ecx,%ecx
jmp    1679 <dlacon2_+0x529>
mov    %eax,%edx
and    $0xfffffffe,%edx
xor    %ecx,%ecx
movsd  0xa15(%rip),%xmm1
movapd 0x9ed(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm3,%xmm3
cvtsi2sd %ecx,%xmm3
divsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,(%rbx,%rcx,8)
lea    0x1(%rcx),%esi
xorps  %xmm3,%xmm3
cvtsi2sd %esi,%xmm3
divsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
xorpd  %xmm2,%xmm3
movlpd %xmm3,0x8(%rbx,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%rdx
jne    1640 <dlacon2_+0x4f0>
test   $0x1,%al
je     1695 <dlacon2_+0x545>
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
divsd  %xmm0,%xmm1
addsd  0x9b0(%rip),%xmm1
movsd  %xmm1,(%rbx,%rcx,8)
movl   $0x1,(%r14)
movl   $0x5,(%rdi)
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x8(%rsp),%rax
movl   $0x2,(%rax)
movl   $0x4,(%rdi)
jmp    16a2 <dlacon2_+0x552>

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

LLVM IR (-O2):
define i32 @dlacon2_(i32* %0, double* %1, double* %2, i32* nocapture %3, double* nocapture %4, i32* nocapture %5, i32* nocapture %6) {
%8 = bitcast double* %2 to i8*
%9 = alloca i32
%10 = bitcast i32* %9 to i8*
store i32 1, i32* %9
%11 = load i32, i32* %5
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %102
13: ; preds = %7
%14 = load i32, i32* %0
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %101
16: ; preds = %13
%17 = sitofp i32 %14 to double
%18 = fdiv double 1.000000e+00, %17
%19 = zext i32 %14 to i64
%20 = icmp ult i32 %14, 4
br i1 %20, label %94, label %21
21: ; preds = %16
%22 = and i64 %19, 4294967292
%23 = insertelement <2 x double> poison, double %18, i64 0
%24 = shufflevector <2 x double> %23, <2 x double> poison, <2 x i32> zeroinitializer
%25 = insertelement <2 x double> poison, double %18, i64 0
%26 = shufflevector <2 x double> %25, <2 x double> poison, <2 x i32> zeroinitializer
%27 = add nsw i64 %22, -4
%28 = lshr exact i64 %27, 2
%29 = add nuw nsw i64 %28, 1
%30 = and i64 %29, 7
%31 = icmp ult i64 %27, 28
br i1 %31, label %79, label %32
32: ; preds = %21
%33 = and i64 %29, 9223372036854775800
br label %34
34: ; preds = %34, %32
%35 = phi i64 [ 0, %32 ], [ %76, %34 ]
%36 = phi i64 [ 0, %32 ], [ %77, %34 ]
%37 = getelementptr inbounds double, double* %2, i64 %35
%38 = bitcast double* %37 to <2 x double>*
store <2 x double> %24, <2 x double>* %38
%39 = getelementptr inbounds double, double* %37, i64 2
%40 = bitcast double* %39 to <2 x double>*
store <2 x double> %26, <2 x double>* %40
%41 = or i64 %35, 4
%42 = getelementptr inbounds double, double* %2, i64 %41
%43 = bitcast double* %42 to <2 x double>*
store <2 x double> %24, <2 x double>* %43
%44 = getelementptr inbounds double, double* %42, i64 2
%45 = bitcast double* %44 to <2 x double>*
store <2 x double> %26, <2 x double>* %45
%46 = or i64 %35, 8
%47 = getelementptr inbounds double, double* %2, i64 %46
%48 = bitcast double* %47 to <2 x double>*
store <2 x double> %24, <2 x double>* %48
%49 = getelementptr inbounds double, double* %47, i64 2
%50 = bitcast double* %49 to <2 x double>*
store <2 x double> %26, <2 x double>* %50
%51 = or i64 %35, 12
%52 = getelementptr inbounds double, double* %2, i64 %51
%53 = bitcast double* %52 to <2 x double>*
store <2 x double> %24, <2 x double>* %53
%54 = getelementptr inbounds double, double* %52, i64 2
%55 = bitcast double* %54 to <2 x double>*
store <2 x double> %26, <2 x double>* %55
%56 = or i64 %35, 16
%57 = getelementptr inbounds double, double* %2, i64 %56
%58 = bitcast double* %57 to <2 x double>*
store <2 x double> %24, <2 x double>* %58
%59 = getelementptr inbounds double, double* %57, i64 2
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> %26, <2 x double>* %60
%61 = or i64 %35, 20
%62 = getelementptr inbounds double, double* %2, i64 %61
%63 = bitcast double* %62 to <2 x double>*
store <2 x double> %24, <2 x double>* %63
%64 = getelementptr inbounds double, double* %62, i64 2
%65 = bitcast double* %64 to <2 x double>*
store <2 x double> %26, <2 x double>* %65
%66 = or i64 %35, 24
%67 = getelementptr inbounds double, double* %2, i64 %66
%68 = bitcast double* %67 to <2 x double>*
store <2 x double> %24, <2 x double>* %68
%69 = getelementptr inbounds double, double* %67, i64 2
%70 = bitcast double* %69 to <2 x double>*
store <2 x double> %26, <2 x double>* %70
%71 = or i64 %35, 28
%72 = getelementptr inbounds double, double* %2, i64 %71
%73 = bitcast double* %72 to <2 x double>*
store <2 x double> %24, <2 x double>* %73
%74 = getelementptr inbounds double, double* %72, i64 2
%75 = bitcast double* %74 to <2 x double>*
store <2 x double> %26, <2 x double>* %75
%76 = add nuw i64 %35, 32
%77 = add i64 %36, 8
%78 = icmp eq i64 %77, %33
br i1 %78, label %79, label %34
79: ; preds = %34, %21
%80 = phi i64 [ 0, %21 ], [ %76, %34 ]
%81 = icmp eq i64 %30, 0
br i1 %81, label %92, label %82
82: ; preds = %79, %82
%83 = phi i64 [ %89, %82 ], [ %80, %79 ]
%84 = phi i64 [ %90, %82 ], [ 0, %79 ]
%85 = getelementptr inbounds double, double* %2, i64 %83
%86 = bitcast double* %85 to <2 x double>*
store <2 x double> %24, <2 x double>* %86
%87 = getelementptr inbounds double, double* %85, i64 2
%88 = bitcast double* %87 to <2 x double>*
store <2 x double> %26, <2 x double>* %88
%89 = add nuw i64 %83, 4
%90 = add i64 %84, 1
%91 = icmp eq i64 %90, %30
br i1 %91, label %92, label %82
92: ; preds = %82, %79
%93 = icmp eq i64 %22, %19
br i1 %93, label %101, label %94
94: ; preds = %16, %92
%95 = phi i64 [ 0, %16 ], [ %22, %92 ]
br label %96
96: ; preds = %94, %96
%97 = phi i64 [ %99, %96 ], [ %95, %94 ]
%98 = getelementptr inbounds double, double* %2, i64 %97
store double %18, double* %98
%99 = add nuw nsw i64 %97, 1
%100 = icmp eq i64 %99, %19
br i1 %100, label %101, label %96
101: ; preds = %96, %92, %13
store i32 1, i32* %5
store i32 1, i32* %6
br label %275
102: ; preds = %7
%103 = load i32, i32* %6
switch i32 %103, label %104 [
i32 5, label %261
i32 2, label %135
i32 3, label %150
i32 4, label %199
]
104: ; preds = %102
%105 = load i32, i32* %0
%106 = icmp eq i32 %105, 1
br i1 %106, label %107, label %110
107: ; preds = %104
%108 = load double, double* %2
store double %108, double* %1
%109 = tail call double @llvm.fabs.f64(double %108)
br label %272
110: ; preds = %104
%111 = call double @dasum_(i32* %0, double* %2, i32* %9)
store double %111, double* %4
%112 = load i32, i32* %0
%113 = icmp sgt i32 %112, 0
br i1 %113, label %114, label %134
114: ; preds = %110, %127
%115 = phi i64 [ %130, %127 ], [ 0, %110 ]
%116 = getelementptr inbounds double, double* %2, i64 %115
%117 = load double, double* %116
%118 = fcmp ult double %117, 0.000000e+00
%119 = select i1 %118, double -1.000000e+00, double 1.000000e+00
store double %119, double* %116
br i1 %118, label %123, label %120
120: ; preds = %114
%121 = fadd double %119, 5.000000e-01
%122 = call i32 @floor(double %121)
br label %127
123: ; preds = %114
%124 = fsub double 5.000000e-01, %119
%125 = call i32 @floor(double %124)
%126 = sub nsw i32 0, %125
br label %127
127: ; preds = %123, %120
%128 = phi i32 [ %122, %120 ], [ %126, %123 ]
%129 = getelementptr inbounds i32, i32* %3, i64 %115
store i32 %128, i32* %129
%130 = add nuw nsw i64 %115, 1
%131 = load i32, i32* %0
%132 = sext i32 %131 to i64
%133 = icmp slt i64 %130, %132
br i1 %133, label %114, label %134
134: ; preds = %127, %110
store i32 2, i32* %5
store i32 2, i32* %6
br label %275
135: ; preds = %102
%136 = call i32 @idamax_(i32* %0, double* %2, i32* %9)
%137 = getelementptr inbounds i32, i32* %6, i64 1
%138 = add nsw i32 %136, -1
store i32 %138, i32* %137
%139 = getelementptr inbounds i32, i32* %6, i64 2
store i32 2, i32* %139
br label %140
140: ; preds = %216, %135
%141 = phi i32 [ %203, %216 ], [ %138, %135 ]
%142 = load i32, i32* %0
%143 = icmp sgt i32 %142, 0
br i1 %143, label %144, label %147
144: ; preds = %140
%145 = zext i32 %142 to i64
%146 = shl nuw nsw i64 %145, 3
br label %147
147: ; preds = %144, %140
%148 = sext i32 %141 to i64
%149 = getelementptr inbounds double, double* %2, i64 %148
store double 1.000000e+00, double* %149
store i32 1, i32* %5
store i32 3, i32* %6
br label %275
150: ; preds = %102
%151 = call i32 @dcopy_(i32* %0, double* %2, i32* %9, double* %1, i32* %9)
%152 = load double, double* %4
%153 = call double @dasum_(i32* %0, double* %1, i32* %9)
store double %153, double* %4
%154 = load i32, i32* %0
%155 = icmp sgt i32 %154, 0
br i1 %155, label %160, label %260
156: ; preds = %160
%157 = load i32, i32* %0
%158 = sext i32 %157 to i64
%159 = icmp slt i64 %171, %158
br i1 %159, label %160, label %220
160: ; preds = %150, %156
%161 = phi i64 [ %171, %156 ], [ 0, %150 ]
%162 = getelementptr inbounds double, double* %2, i64 %161
%163 = load double, double* %162
%164 = fcmp ult double %163, 0.000000e+00
%165 = call i32 @floor(double 1.500000e+00)
%166 = sub nsw i32 0, %165
%167 = select i1 %164, i32 %166, i32 %165
%168 = getelementptr inbounds i32, i32* %3, i64 %161
%169 = load i32, i32* %168
%170 = icmp eq i32 %167, %169
%171 = add nuw nsw i64 %161, 1
br i1 %170, label %156, label %172
172: ; preds = %160
%173 = load double, double* %4
%174 = fcmp ugt double %173, %152
br i1 %174, label %175, label %218
175: ; preds = %172
%176 = load i32, i32* %0
%177 = icmp sgt i32 %176, 0
br i1 %177, label %178, label %198
178: ; preds = %175, %191
%179 = phi i64 [ %194, %191 ], [ 0, %175 ]
%180 = getelementptr inbounds double, double* %2, i64 %179
%181 = load double, double* %180
%182 = fcmp ult double %181, 0.000000e+00
%183 = select i1 %182, double -1.000000e+00, double 1.000000e+00
store double %183, double* %180
br i1 %182, label %187, label %184
184: ; preds = %178
%185 = fadd double %183, 5.000000e-01
%186 = call i32 @floor(double %185)
br label %191
187: ; preds = %178
%188 = fsub double 5.000000e-01, %183
%189 = call i32 @floor(double %188)
%190 = sub nsw i32 0, %189
br label %191
191: ; preds = %187, %184
%192 = phi i32 [ %186, %184 ], [ %190, %187 ]
%193 = getelementptr inbounds i32, i32* %3, i64 %179
store i32 %192, i32* %193
%194 = add nuw nsw i64 %179, 1
%195 = load i32, i32* %0
%196 = sext i32 %195 to i64
%197 = icmp slt i64 %194, %196
br i1 %197, label %178, label %198
198: ; preds = %191, %175
store i32 2, i32* %5
store i32 4, i32* %6
br label %275
199: ; preds = %102
%200 = getelementptr inbounds i32, i32* %6, i64 1
%201 = load i32, i32* %200
%202 = call i32 @idamax_(i32* %0, double* %2, i32* %9)
%203 = add nsw i32 %202, -1
store i32 %203, i32* %200
%204 = sext i32 %201 to i64
%205 = getelementptr inbounds double, double* %2, i64 %204
%206 = load double, double* %205
%207 = sext i32 %203 to i64
%208 = getelementptr inbounds double, double* %2, i64 %207
%209 = load double, double* %208
%210 = call double @llvm.fabs.f64(double %209)
%211 = fcmp une double %206, %210
br i1 %211, label %212, label %218
212: ; preds = %199
%213 = getelementptr inbounds i32, i32* %6, i64 2
%214 = load i32, i32* %213
%215 = icmp slt i32 %214, 5
br i1 %215, label %216, label %218
216: ; preds = %212
%217 = add nsw i32 %214, 1
store i32 %217, i32* %213
br label %140
218: ; preds = %172, %212, %199
%219 = load i32, i32* %0
br label %220
220: ; preds = %156, %218
%221 = phi i32 [ %219, %218 ], [ %157, %156 ]
%222 = icmp slt i32 %221, 1
br i1 %222, label %260, label %223
223: ; preds = %220
%224 = add nsw i32 %221, -1
%225 = sitofp i32 %224 to double
%226 = zext i32 %221 to i64
%227 = and i64 %226, 1
%228 = icmp eq i32 %221, 1
br i1 %228, label %251, label %229
229: ; preds = %223
%230 = and i64 %226, 4294967294
br label %231
231: ; preds = %231, %229
%232 = phi i64 [ 1, %229 ], [ %246, %231 ]
%233 = phi i64 [ 0, %229 ], [ %247, %231 ]
%234 = add nsw i64 %232, -1
%235 = trunc i64 %234 to i32
%236 = sitofp i32 %235 to double
%237 = fdiv double %236, %225
%238 = fadd double %237, 1.000000e+00
%239 = getelementptr inbounds double, double* %2, i64 %234
store double %238, double* %239
%240 = trunc i64 %232 to i32
%241 = sitofp i32 %240 to double
%242 = fdiv double %241, %225
%243 = fadd double %242, 1.000000e+00
%244 = fneg double %243
%245 = getelementptr inbounds double, double* %2, i64 %232
store double %244, double* %245
%246 = add nuw nsw i64 %232, 2
%247 = add i64 %233, 2
%248 = icmp eq i64 %247, %230
br i1 %248, label %249, label %231
249: ; preds = %231
%250 = add nuw i64 %232, 1
br label %251
251: ; preds = %249, %223
%252 = phi i64 [ 0, %223 ], [ %250, %249 ]
%253 = icmp eq i64 %227, 0
br i1 %253, label %260, label %254
254: ; preds = %251
%255 = trunc i64 %252 to i32
%256 = sitofp i32 %255 to double
%257 = fdiv double %256, %225
%258 = fadd double %257, 1.000000e+00
%259 = getelementptr inbounds double, double* %2, i64 %252
store double %258, double* %259
br label %260
260: ; preds = %254, %251, %150, %220
store i32 1, i32* %5
store i32 5, i32* %6
br label %275
261: ; preds = %102
%262 = call double @dasum_(i32* %0, double* %2, i32* %9)
%263 = load i32, i32* %0
%264 = mul nsw i32 %263, 3
%265 = sitofp i32 %264 to double
%266 = fdiv double %262, %265
%267 = fmul double %266, 2.000000e+00
%268 = load double, double* %4
%269 = fcmp ogt double %267, %268
br i1 %269, label %270, label %274
270: ; preds = %261
%271 = call i32 @dcopy_(i32* %0, double* %2, i32* %9, double* %1, i32* %9)
br label %272
272: ; preds = %107, %270
%273 = phi double [ %267, %270 ], [ %109, %107 ]
store double %273, double* %4
br label %274
274: ; preds = %272, %261
store i32 0, i32* %5
br label %275
275: ; preds = %274, %260, %198, %147, %134, %101
ret i32 0
}