#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int bisect(double *alpha, double *beta, int j, double Anorm, double *workj,
           double *ritz, int nevals_left, int nevals_right, double tol,
           double *ritz_sav, int max_steps) {
  extern int DEBUG_EVECS;
  extern double DOUBLE_MAX;
  int index;
  int i;
  double *pntr;
  double x1, x2;
  int x1cnt, x2cnt;
  double x;
  int xcnt;
  int steps;
  int tot_steps;
  int numbracketed;
  int x1ck;
  int x2ck;
  int numck;
  int sturmcnt();
  double diff;
  int ii;
  void cksturmcnt();
  if (ritz_sav != NULL) {
    printf("\nAnorm %g j %d nevals_left %d\n", Anorm, j, nevals_left);
    printf("step              x1                 x2         x1cnt  ck  x2cnt  "
           "ck  brack   ck   "
           "x2-x1\n");
    ii = 0;
  }
  pntr = &ritz[1];
  for (i = j; i; i--) {
    *pntr++ = DOUBLE_MAX;
  }
  tot_steps = 0;
  x2 = Anorm;
  x2cnt = j;
  numbracketed = j;
  for (index = nevals_left; index >= 1; index--) {
    x1 = 0;
    x1cnt = 0;
    steps = 1;
    while ((x2 - x1) > tol || numbracketed > 1) {
      x = 0.5 * (x1 + x2);
      xcnt = sturmcnt(alpha, beta, j, x, workj);
      if (xcnt == -1) {
        return (1);
      }
      if (xcnt >= index) {
        x2 = x;
        x2cnt = xcnt;
      } else {
        x1 = x;
        x1cnt = xcnt;
      }
      numbracketed = x2cnt - x1cnt;
      steps++;
      if (steps == max_steps) {
        return (2);
      }
      if (ritz_sav != NULL) {
        diff = x2 - x1;
        cksturmcnt(ritz_sav, 1, j, x1, x2, &x1ck, &x2ck, &numck);
        printf("%4d %20.16f %20.16f   %3d   %3d  %3d   %3d   %3d   %3d   %g",
               ii++, x1, x2, x1cnt, x1ck, x2cnt, x2ck, numbracketed, numck,
               diff);
        if (x1cnt != x1ck || x2cnt != x2ck || numbracketed != numck) {
          printf("**\n");
        } else {
          printf("\n");
        }
      }
    }
    ritz[index] = 0.5 * (x1 + x2);
    if (ritz_sav != NULL) {
      printf("Ritzval #%d:\n", index);
      printf("            bisection %20.16f\n", ritz[index]);
      printf("                   ql %20.16f\n", ritz_sav[index]);
      printf("           difference %20.16f\n", ritz[index] - ritz_sav[index]);
      printf("---------------------------------------------------\n");
    }
    if (DEBUG_EVECS > 2) {
      printf("    index %d, bisection steps %d, root %20.16f\n", index, steps,
             ritz[index]);
    }
    tot_steps += steps;
  }
  x1 = 0;
  x1cnt = 0;
  for (index = j - nevals_right + 1; index <= j; index++) {
    x2 = Anorm;
    x2cnt = j;
    steps = 1;
    while ((x2 - x1) > tol || numbracketed > 1) {
      x = 0.5 * (x1 + x2);
      xcnt = sturmcnt(alpha, beta, j, x, workj);
      if (xcnt == -1) {
        return (1);
      }
      if (xcnt >= index) {
        x2 = x;
        x2cnt = xcnt;
      } else {
        x1 = x;
        x1cnt = xcnt;
      }
      numbracketed = x2cnt - x1cnt;
      steps++;
      if (steps == max_steps) {
        return (2);
      }
      if (ritz_sav != NULL) {
        diff = x2 - x1;
        cksturmcnt(ritz_sav, 1, j, x1, x2, &x1ck, &x2ck, &numck);
        printf("%4d %20.16f %20.16f   %3d   %3d  %3d   %3d   %3d   %3d   %g",
               ii++, x1, x2, x1cnt, x1ck, x2cnt, x2ck, numbracketed, numck,
               diff);
        if (x1cnt != x1ck || x2cnt != x2ck || numbracketed != numck) {
          printf("**\n");
        } else {
          printf("\n");
        }
      }
    }
    ritz[index] = 0.5 * (x1 + x2);
    if (ritz_sav != NULL) {
      printf("Ritzval #%d:\n", index);
      printf("            bisection %20.16f\n", ritz[index]);
      printf("                   ql %20.16f\n", ritz_sav[index]);
      printf("           difference %20.16f\n", ritz[index] - ritz_sav[index]);
      printf("---------------------------------------------------\n");
    }
    if (DEBUG_EVECS > 2) {
      printf("    index %d, bisection steps %d, root %20.16f\n", index, steps,
             ritz[index]);
    }
    tot_steps += steps;
  }
  if (DEBUG_EVECS > 2) {
    printf("  Total number of bisection steps %d.\n", tot_steps);
  }
  return (0);
}


x86 assembly (clang, -O0):
<bisect>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9d,-0x3c(%rbp)
movsd  %xmm1,-0x48(%rbp)
cmpq   $0x0,0x18(%rbp)
je     11a2 <bisect+0x72>
movsd  -0x28(%rbp),%xmm0
mov    -0x1c(%rbp),%esi
mov    -0x3c(%rbp),%edx
lea    0xe85(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xa4(%rbp)
mov    -0x38(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x58(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x50(%rbp)
cmpl   $0x0,-0x50(%rbp)
je     11ea <bisect+0xba>
mov    0x2e13(%rip),%rax
movsd  (%rax),%xmm0
mov    -0x58(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x58(%rbp)
movsd  %xmm0,(%rax)
mov    -0x50(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x50(%rbp)
jmp    11b4 <bisect+0x84>
movl   $0x0,-0x84(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
cmpl   $0x1,-0x4c(%rbp)
jl     151d <bisect+0x3ed>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x1,-0x80(%rbp)
movsd  -0x68(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
mov    $0x1,%al
ucomisd -0x48(%rbp),%xmm0
mov    %al,-0xa5(%rbp)
ja     1260 <bisect+0x130>
cmpl   $0x1,-0x88(%rbp)
setg   %al
mov    %al,-0xa5(%rbp)
mov    -0xa5(%rbp),%al
test   $0x1,%al
jne    1273 <bisect+0x143>
jmp    1424 <bisect+0x2f4>
movsd  -0x60(%rbp),%xmm1
addsd  -0x68(%rbp),%xmm1
movsd  0xd7b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
movsd  -0x78(%rbp),%xmm0
mov    -0x30(%rbp),%rcx
mov    $0x1,%al
call   1050 <sturmcnt@plt>
mov    %eax,-0x7c(%rbp)
cmpl   $0xffffffff,-0x7c(%rbp)
jne    12c2 <bisect+0x192>
movl   $0x1,-0x4(%rbp)
jmp    1870 <bisect+0x740>
mov    -0x7c(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jl     12e3 <bisect+0x1b3>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x7c(%rbp),%eax
mov    %eax,-0x70(%rbp)
jmp    12f3 <bisect+0x1c3>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x7c(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x70(%rbp),%eax
sub    -0x6c(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    0x20(%rbp),%eax
jne    1320 <bisect+0x1f0>
movl   $0x2,-0x4(%rbp)
jmp    1870 <bisect+0x740>
cmpq   $0x0,0x18(%rbp)
je     141f <bisect+0x2ef>
movsd  -0x68(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
movsd  -0x60(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
mov    $0x1,%esi
lea    -0x8c(%rbp),%rcx
lea    -0x90(%rbp),%r8
lea    -0x94(%rbp),%r9
mov    $0x2,%al
call   1040 <cksturmcnt@plt>
mov    -0xa4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
mov    -0x6c(%rbp),%edx
mov    -0x8c(%rbp),%ecx
mov    -0x70(%rbp),%r8d
mov    -0x90(%rbp),%r9d
mov    -0x88(%rbp),%r10d
mov    -0x94(%rbp),%eax
movsd  -0xa0(%rbp),%xmm2
ff
lea    0xcc7(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x3,%al
call   1030 <printf@plt>
mov    -0x6c(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jne    13f9 <bisect+0x2c9>
mov    -0x70(%rbp),%eax
cmp    -0x90(%rbp),%eax
jne    13f9 <bisect+0x2c9>
mov    -0x88(%rbp),%eax
cmp    -0x94(%rbp),%eax
je     140c <bisect+0x2dc>
lea    0xcbd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    141a <bisect+0x2ea>
lea    0xcac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    141f <bisect+0x2ef>
jmp    1233 <bisect+0x103>
movsd  -0x60(%rbp),%xmm1
addsd  -0x68(%rbp),%xmm1
movsd  0xbca(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
cmpq   $0x0,0x18(%rbp)
je     14cf <bisect+0x39f>
mov    -0x4c(%rbp),%esi
lea    0xc65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xc58(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xc5c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
lea    0xc53(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xc64(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2b12(%rip),%rax
cmpl   $0x2,(%rax)
jle    1500 <bisect+0x3d0>
mov    -0x4c(%rbp),%esi
mov    -0x80(%rbp),%edx
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xc68(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x80(%rbp),%eax
add    -0x84(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x4c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4c(%rbp)
jmp    1213 <bisect+0xe3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    -0x1c(%rbp),%eax
sub    0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     1845 <bisect+0x715>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x70(%rbp)
movl   $0x1,-0x80(%rbp)
movsd  -0x68(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
mov    $0x1,%al
ucomisd -0x48(%rbp),%xmm0
mov    %al,-0xa6(%rbp)
ja     1588 <bisect+0x458>
cmpl   $0x1,-0x88(%rbp)
setg   %al
mov    %al,-0xa6(%rbp)
mov    -0xa6(%rbp),%al
test   $0x1,%al
jne    159b <bisect+0x46b>
jmp    174c <bisect+0x61c>
movsd  -0x60(%rbp),%xmm1
addsd  -0x68(%rbp),%xmm1
movsd  0xa53(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
movsd  -0x78(%rbp),%xmm0
mov    -0x30(%rbp),%rcx
mov    $0x1,%al
call   1050 <sturmcnt@plt>
mov    %eax,-0x7c(%rbp)
cmpl   $0xffffffff,-0x7c(%rbp)
jne    15ea <bisect+0x4ba>
movl   $0x1,-0x4(%rbp)
jmp    1870 <bisect+0x740>
mov    -0x7c(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jl     160b <bisect+0x4db>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x7c(%rbp),%eax
mov    %eax,-0x70(%rbp)
jmp    161b <bisect+0x4eb>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x7c(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x70(%rbp),%eax
sub    -0x6c(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    0x20(%rbp),%eax
jne    1648 <bisect+0x518>
movl   $0x2,-0x4(%rbp)
jmp    1870 <bisect+0x740>
cmpq   $0x0,0x18(%rbp)
je     1747 <bisect+0x617>
movsd  -0x68(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
movsd  -0x60(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
mov    $0x1,%esi
lea    -0x8c(%rbp),%rcx
lea    -0x90(%rbp),%r8
lea    -0x94(%rbp),%r9
mov    $0x2,%al
call   1040 <cksturmcnt@plt>
mov    -0xa4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
mov    -0x6c(%rbp),%edx
mov    -0x8c(%rbp),%ecx
mov    -0x70(%rbp),%r8d
mov    -0x90(%rbp),%r9d
mov    -0x88(%rbp),%r10d
mov    -0x94(%rbp),%eax
movsd  -0xa0(%rbp),%xmm2
ff
lea    0x99f(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x3,%al
call   1030 <printf@plt>
mov    -0x6c(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jne    1721 <bisect+0x5f1>
mov    -0x70(%rbp),%eax
cmp    -0x90(%rbp),%eax
jne    1721 <bisect+0x5f1>
mov    -0x88(%rbp),%eax
cmp    -0x94(%rbp),%eax
je     1734 <bisect+0x604>
lea    0x995(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1742 <bisect+0x612>
lea    0x984(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1747 <bisect+0x617>
jmp    155b <bisect+0x42b>
movsd  -0x60(%rbp),%xmm1
addsd  -0x68(%rbp),%xmm1
movsd  0x8a2(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
cmpq   $0x0,0x18(%rbp)
je     17f7 <bisect+0x6c7>
mov    -0x4c(%rbp),%esi
lea    0x93d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0x930(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0x934(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
lea    0x92b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0x93c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x27ea(%rip),%rax
cmpl   $0x2,(%rax)
jle    1828 <bisect+0x6f8>
mov    -0x4c(%rbp),%esi
mov    -0x80(%rbp),%edx
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0x940(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x80(%rbp),%eax
add    -0x84(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1538 <bisect+0x408>
mov    0x279c(%rip),%rax
cmpl   $0x2,(%rax)
jle    1869 <bisect+0x739>
mov    -0x84(%rbp),%esi
lea    0x92f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bisect>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
movsd  %xmm1,0x50(%rsp)
mov    %r9d,%ebp
mov    %r8,%rbx
mov    %rcx,0x78(%rsp)
mov    %edx,%r14d
mov    %rsi,0x70(%rsp)
mov    %rdi,0x68(%rsp)
cmpq   $0x0,0xc8(%rsp)
movsd  %xmm0,0x58(%rsp)
je     11b5 <bisect+0x65>
lea    0xe71(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xfb2(%rip),%rdi
call   1040 <puts@plt>
movsd  0x58(%rsp),%xmm0
test   %r14d,%r14d
je     12fe <bisect+0x1ae>
mov    0x2e13(%rip),%rax
movsd  (%rax),%xmm2
lea    -0x1(%r14),%eax
mov    %rbx,%rdx
mov    %r14d,%esi
cmp    $0x3,%eax
jb     12e2 <bisect+0x192>
add    $0x1,%rax
mov    %rax,%rcx
and    $0xfffffffffffffffc,%rcx
movapd %xmm2,%xmm1
unpcklpd %xmm2,%xmm1
lea    -0x4(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x7,%edx
cmp    $0x1c,%rdi
jae    1210 <bisect+0xc0>
xor    %edi,%edi
jmp    12a6 <bisect+0x156>
and    $0xfffffffffffffff8,%rsi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
movupd %xmm1,0x8(%rbx,%rdi,8)
movupd %xmm1,0x18(%rbx,%rdi,8)
movupd %xmm1,0x28(%rbx,%rdi,8)
movupd %xmm1,0x38(%rbx,%rdi,8)
movupd %xmm1,0x48(%rbx,%rdi,8)
movupd %xmm1,0x58(%rbx,%rdi,8)
movupd %xmm1,0x68(%rbx,%rdi,8)
movupd %xmm1,0x78(%rbx,%rdi,8)
movupd %xmm1,0x88(%rbx,%rdi,8)
movupd %xmm1,0x98(%rbx,%rdi,8)
movupd %xmm1,0xa8(%rbx,%rdi,8)
movupd %xmm1,0xb8(%rbx,%rdi,8)
movupd %xmm1,0xc8(%rbx,%rdi,8)
movupd %xmm1,0xd8(%rbx,%rdi,8)
movupd %xmm1,0xe8(%rbx,%rdi,8)
movupd %xmm1,0xf8(%rbx,%rdi,8)
add    $0x20,%rdi
add    $0xfffffffffffffff8,%rsi
jne    1220 <bisect+0xd0>
test   %rdx,%rdx
je     12d4 <bisect+0x184>
lea    (%rbx,%rdi,8),%rsi
add    $0x18,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
nopl   0x0(%rax)
movupd %xmm1,-0x10(%rsi,%rdi,1)
movupd %xmm1,(%rsi,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    12c0 <bisect+0x170>
cmp    %rcx,%rax
je     12fe <bisect+0x1ae>
lea    (%rbx,%rcx,8),%rdx
mov    %r14d,%esi
sub    %ecx,%esi
mov    %esi,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm2,0x8(%rdx,%rcx,8)
add    $0x1,%rcx
cmp    %ecx,%eax
jne    12f0 <bisect+0x1a0>
test   %ebp,%ebp
mov    %r14,0x38(%rsp)
jle    15eb <bisect+0x49b>
mov    %ebp,%ecx
mov    $0x2,%eax
sub    0xd0(%rsp),%eax
mov    %rax,0x60(%rsp)
xor    %eax,%eax
mov    %rax,0x28(%rsp)
movapd %xmm0,%xmm1
mov    %r14d,%r13d
xor    %esi,%esi
mov    %r14d,%r12d
mov    %rbx,0x48(%rsp)
jmp    135f <bisect+0x20f>
nopl   0x0(%rax,%rax,1)
mov    0x34(%rsp),%esi
add    %ebp,%esi
lea    -0x1(%r14),%rcx
cmp    $0x1,%r14
movsd  0x58(%rsp),%xmm0
mov    0x38(%rsp),%r14
jle    15f7 <bisect+0x4a7>
mov    %rcx,0x40(%rsp)
mov    %esi,0x34(%rsp)
ucomisd 0x50(%rsp),%xmm1
ja     1390 <bisect+0x240>
xorpd  %xmm0,%xmm0
cmp    $0x2,%r13d
jge    1390 <bisect+0x240>
mov    $0x1,%ebp
mov    0xc8(%rsp),%rbx
jmp    152b <bisect+0x3db>
nopl   0x0(%rax)
xorpd  %xmm0,%xmm0
xor    %r15d,%r15d
mov    $0x1,%ebp
mov    0xc8(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,(%rsp)
addsd  %xmm1,%xmm0
mulsd  0xc39(%rip),%xmm0
mov    0x68(%rsp),%rdi
mov    0x70(%rsp),%rsi
mov    %r14d,%edx
movsd  %xmm0,0x8(%rsp)
mov    0x78(%rsp),%rcx
mov    $0x1,%al
call   1070 <sturmcnt@plt>
cmp    $0xffffffff,%eax
je     190e <bisect+0x7be>
movslq %eax,%rcx
cmp    %rcx,0x40(%rsp)
jg     1410 <bisect+0x2c0>
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
jmp    141b <bisect+0x2cb>
nopw   0x0(%rax,%rax,1)
movsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
cmovg  %eax,%r15d
cmovle %eax,%r12d
mov    0x60(%rsp),%rax
add    %ebp,%eax
cmp    $0x1,%eax
je     1915 <bisect+0x7c5>
mov    %r12d,%r13d
sub    %r15d,%r13d
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
test   %rbx,%rbx
je     1512 <bisect+0x3c2>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %r14d,%edx
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,(%rsp)
lea    0x24(%rsp),%rcx
lea    0x20(%rsp),%r8
lea    0x1c(%rsp),%r9
mov    $0x2,%al
movsd  %xmm2,0x8(%rsp)
call   1060 <cksturmcnt@plt>
mov    0x28(%rsp),%rsi
lea    0x1(%rsi),%r14d
mov    0x24(%rsp),%ecx
mov    0x20(%rsp),%r9d
mov    0x1c(%rsp),%ebx
lea    0xb8e(%rip),%rdi
movsd  0x10(%rsp),%xmm0
movsd  (%rsp),%xmm1
mov    %r15d,%edx
mov    %r12d,%r8d
movsd  0x8(%rsp),%xmm2
mov    $0x3,%al
push   %rbx
push   %r13
call   1050 <printf@plt>
add    $0x10,%rsp
cmp    0x24(%rsp),%r15d
jne    14e0 <bisect+0x390>
cmp    0x20(%rsp),%r12d
jne    14e0 <bisect+0x390>
cmp    0x1c(%rsp),%r13d
jne    14e0 <bisect+0x390>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    14ec <bisect+0x39c>
nop
lea    0xc72(%rip),%rdi
call   1040 <puts@plt>
mov    %r14d,%eax
mov    %rax,0x28(%rsp)
mov    0x38(%rsp),%r14
mov    0xc8(%rsp),%rbx
movsd  (%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
add    $0x1,%ebp
ucomisd 0x50(%rsp),%xmm2
ja     13b0 <bisect+0x260>
cmp    $0x1,%r13d
jg     13b0 <bisect+0x260>
addsd  %xmm1,%xmm0
mulsd  0xac9(%rip),%xmm0
mov    %rbx,%r15
mov    0x48(%rsp),%rbx
mov    0x40(%rsp),%r14
movsd  %xmm0,(%rbx,%r14,8)
test   %r15,%r15
movsd  %xmm1,(%rsp)
je     15b8 <bisect+0x468>
lea    0xb08(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  (%rbx,%r14,8),%xmm0
lea    0xaff(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  (%r15,%r14,8),%xmm0
lea    0xb0a(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  (%rbx,%r14,8),%xmm0
subsd  (%r15,%r14,8),%xmm0
lea    0xb0f(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xb77(%rip),%rdi
call   1040 <puts@plt>
movsd  (%rsp),%xmm1
mov    0x2a29(%rip),%rax
cmpl   $0x3,(%rax)
jl     1340 <bisect+0x1f0>
movsd  (%rbx,%r14,8),%xmm0
lea    0xaf9(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    $0x1,%al
call   1050 <printf@plt>
movsd  (%rsp),%xmm1
jmp    1340 <bisect+0x1f0>
xor    %esi,%esi
mov    %r14d,%r13d
xor    %eax,%eax
mov    %rax,0x28(%rsp)
mov    0xc0(%rsp),%eax
test   %eax,%eax
jle    192e <bisect+0x7de>
mov    %rbx,0x48(%rsp)
mov    %r14d,%ecx
sub    %eax,%ecx
movslq %ecx,%rbp
movslq %r14d,%rcx
mov    %rcx,0x80(%rsp)
mov    $0x2,%ecx
sub    0xd0(%rsp),%ecx
mov    %rcx,0x60(%rsp)
xorpd  %xmm2,%xmm2
xor    %r15d,%r15d
mov    0xc8(%rsp),%rbx
jmp    1663 <bisect+0x513>
mov    0x34(%rsp),%esi
add    %r12d,%esi
cmp    0x80(%rsp),%rbp
movsd  0x58(%rsp),%xmm0
mov    0xc8(%rsp),%rbx
jge    192e <bisect+0x7de>
movapd %xmm0,%xmm1
subsd  %xmm2,%xmm1
ucomisd 0x50(%rsp),%xmm1
mov    %esi,0x34(%rsp)
mov    %rbp,0x40(%rsp)
ja     16a0 <bisect+0x550>
cmp    $0x2,%r13d
jge    16a0 <bisect+0x550>
movapd %xmm0,%xmm1
mov    $0x1,%r12d
jmp    183c <bisect+0x6ec>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%r12d
mov    %r14d,%ebp
movapd %xmm0,%xmm1
nopl   (%rax)
movsd  %xmm2,(%rsp)
movsd  %xmm1,0x10(%rsp)
addsd  %xmm1,%xmm2
mulsd  0x939(%rip),%xmm2
mov    0x68(%rsp),%rdi
mov    0x70(%rsp),%rsi
mov    %r14d,%edx
movsd  %xmm2,0x8(%rsp)
movapd %xmm2,%xmm0
mov    0x78(%rsp),%rcx
mov    $0x1,%al
call   1070 <sturmcnt@plt>
cmp    $0xffffffff,%eax
je     190e <bisect+0x7be>
movslq %eax,%rcx
cmp    %rcx,0x40(%rsp)
jl     1710 <bisect+0x5c0>
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
jmp    171b <bisect+0x5cb>
nopl   0x0(%rax,%rax,1)
movsd  0x8(%rsp),%xmm1
movsd  (%rsp),%xmm2
cmovge %eax,%r15d
cmovl  %eax,%ebp
mov    0x60(%rsp),%rax
add    %r12d,%eax
cmp    $0x1,%eax
je     1915 <bisect+0x7c5>
mov    %ebp,%r13d
sub    %r15d,%r13d
movapd %xmm1,%xmm0
subsd  %xmm2,%xmm0
test   %rbx,%rbx
je     1822 <bisect+0x6d2>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %r14d,%edx
movsd  %xmm0,0x8(%rsp)
movapd %xmm2,%xmm0
movsd  %xmm1,0x10(%rsp)
lea    0x24(%rsp),%rcx
lea    0x20(%rsp),%r8
lea    0x1c(%rsp),%r9
mov    $0x2,%al
movsd  %xmm2,(%rsp)
call   1060 <cksturmcnt@plt>
mov    0x28(%rsp),%rsi
lea    0x1(%rsi),%r14d
mov    0x24(%rsp),%ecx
mov    0x20(%rsp),%r9d
mov    0x1c(%rsp),%ebx
lea    0x88a(%rip),%rdi
movsd  (%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %r15d,%edx
mov    %ebp,%r8d
movsd  0x8(%rsp),%xmm2
mov    $0x3,%al
push   %rbx
push   %r13
call   1050 <printf@plt>
add    $0x10,%rsp
cmp    0x24(%rsp),%r15d
jne    17f0 <bisect+0x6a0>
cmp    0x20(%rsp),%ebp
jne    17f0 <bisect+0x6a0>
cmp    0x1c(%rsp),%r13d
jne    17f0 <bisect+0x6a0>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    17fc <bisect+0x6ac>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x962(%rip),%rdi
call   1040 <puts@plt>
mov    %r14d,%eax
mov    %rax,0x28(%rsp)
mov    0x38(%rsp),%r14
mov    0xc8(%rsp),%rbx
movsd  (%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
add    $0x1,%r12d
ucomisd 0x50(%rsp),%xmm0
ja     16b0 <bisect+0x560>
cmp    $0x1,%r13d
jg     16b0 <bisect+0x560>
mov    0x40(%rsp),%rbp
add    $0x1,%rbp
addsd  %xmm2,%xmm1
mulsd  0x7af(%rip),%xmm1
mov    %rbx,%rcx
mov    0x48(%rsp),%rbx
movsd  %xmm1,(%rbx,%rbp,8)
test   %rcx,%rcx
movsd  %xmm2,(%rsp)
je     18d7 <bisect+0x787>
lea    0x7f4(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  (%rbx,%rbp,8),%xmm0
lea    0x7ed(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    0xc8(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm0
lea    0x7f1(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  (%rbx,%rbp,8),%xmm0
mov    0xc8(%rsp),%rax
subsd  (%rax,%rbp,8),%xmm0
lea    0x7f0(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0x858(%rip),%rdi
call   1040 <puts@plt>
movsd  (%rsp),%xmm2
mov    0x270a(%rip),%rcx
cmpl   $0x3,(%rcx)
jl     1640 <bisect+0x4f0>
mov    0x48(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm0
lea    0x7d6(%rip),%rdi
mov    %ebp,%esi
mov    %r12d,%edx
mov    $0x1,%al
call   1050 <printf@plt>
movsd  (%rsp),%xmm2
jmp    1640 <bisect+0x4f0>
mov    $0x1,%ebx
jmp    191a <bisect+0x7ca>
mov    $0x2,%ebx
mov    %ebx,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x26b3(%rip),%rax
xor    %ebx,%ebx
cmpl   $0x3,(%rax)
jl     191a <bisect+0x7ca>
lea    0x7bb(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    191a <bisect+0x7ca>

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

LLVM IR (-O2):
@.str = [31 x i8] c"\0AAnorm %g j %d nevals_left %d\0A\00"
@DOUBLE_MAX = external global double
@.str.2 = [60 x i8] c"%4d %20.16f %20.16f %3d %3d %3d %3d %3d %3d %g\00"
@.str.5 = [14 x i8] c"Ritzval #%d:\0A\00"
@.str.6 = [31 x i8] c" bisection %20.16f\0A\00"
@.str.7 = [31 x i8] c" ql %20.16f\0A\00"
@.str.8 = [31 x i8] c" difference %20.16f\0A\00"
@DEBUG_EVECS = external global i32
@.str.10 = [48 x i8] c" index %d, bisection steps %d, root %20.16f\0A\00"
@.str.11 = [39 x i8] c" Total number of bisection steps %d.\0A\00"
@str.13 = [52 x i8] c"---------------------------------------------------\00"
@str.14 = [3 x i8] c"**\00"
@str.15 = [89 x i8] c"step x1 x2 x1cnt ck x2cnt ck brack ck x2-x1\00"
define i32 @bisect(double* %0, double* %1, i32 %2, double %3, double* %4, double* nocapture %5, i32 %6, i32 %7, double %8, double* %9, i32 %10) {
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = bitcast i32* %12 to i8*
%16 = bitcast i32* %13 to i8*
%17 = bitcast i32* %14 to i8*
%18 = icmp eq double* %9, null
br i1 %18, label %22, label %19
19: ; preds = %11
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double %3, i32 %2, i32 %6)
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([89 x i8], [89 x i8]* @str.15, i64 0, i64 0))
br label %22
22: ; preds = %19, %11
%23 = icmp eq i32 %2, 0
br i1 %23, label %119, label %24
24: ; preds = %22
%25 = load double, double* @DOUBLE_MAX
%26 = add i32 %2, -1
%27 = zext i32 %26 to i64
%28 = add nuw nsw i64 %27, 1
%29 = icmp ult i32 %26, 3
br i1 %29, label %116, label %30
30: ; preds = %24
%31 = and i64 %28, 8589934588
%32 = getelementptr double, double* %5, i64 %31
%33 = trunc i64 %31 to i32
%34 = sub i32 %2, %33
%35 = insertelement <2 x double> poison, double %25, i64 0
%36 = shufflevector <2 x double> %35, <2 x double> poison, <2 x i32> zeroinitializer
%37 = insertelement <2 x double> poison, double %25, i64 0
%38 = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> zeroinitializer
%39 = add nsw i64 %31, -4
%40 = lshr exact i64 %39, 2
%41 = add nuw nsw i64 %40, 1
%42 = and i64 %41, 7
%43 = icmp ult i64 %39, 28
br i1 %43, label %99, label %44
44: ; preds = %30
%45 = and i64 %41, 9223372036854775800
%46 = getelementptr double, double* %5, i64 1
%47 = getelementptr double, double* %5, i64 1
%48 = getelementptr double, double* %5, i64 1
%49 = getelementptr double, double* %5, i64 1
%50 = getelementptr double, double* %5, i64 1
%51 = getelementptr double, double* %5, i64 1
%52 = getelementptr double, double* %5, i64 1
%53 = getelementptr double, double* %5, i64 1
br label %54
54: ; preds = %54, %44
%55 = phi i64 [ 0, %44 ], [ %96, %54 ]
%56 = phi i64 [ 0, %44 ], [ %97, %54 ]
%57 = getelementptr inbounds double, double* %46, i64 %55
%58 = bitcast double* %57 to <2 x double>*
store <2 x double> %36, <2 x double>* %58
%59 = getelementptr inbounds double, double* %57, i64 2
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> %38, <2 x double>* %60
%61 = or i64 %55, 4
%62 = getelementptr inbounds double, double* %47, i64 %61
%63 = bitcast double* %62 to <2 x double>*
store <2 x double> %36, <2 x double>* %63
%64 = getelementptr inbounds double, double* %62, i64 2
%65 = bitcast double* %64 to <2 x double>*
store <2 x double> %38, <2 x double>* %65
%66 = or i64 %55, 8
%67 = getelementptr inbounds double, double* %48, i64 %66
%68 = bitcast double* %67 to <2 x double>*
store <2 x double> %36, <2 x double>* %68
%69 = getelementptr inbounds double, double* %67, i64 2
%70 = bitcast double* %69 to <2 x double>*
store <2 x double> %38, <2 x double>* %70
%71 = or i64 %55, 12
%72 = getelementptr inbounds double, double* %49, i64 %71
%73 = bitcast double* %72 to <2 x double>*
store <2 x double> %36, <2 x double>* %73
%74 = getelementptr inbounds double, double* %72, i64 2
%75 = bitcast double* %74 to <2 x double>*
store <2 x double> %38, <2 x double>* %75
%76 = or i64 %55, 16
%77 = getelementptr inbounds double, double* %50, i64 %76
%78 = bitcast double* %77 to <2 x double>*
store <2 x double> %36, <2 x double>* %78
%79 = getelementptr inbounds double, double* %77, i64 2
%80 = bitcast double* %79 to <2 x double>*
store <2 x double> %38, <2 x double>* %80
%81 = or i64 %55, 20
%82 = getelementptr inbounds double, double* %51, i64 %81
%83 = bitcast double* %82 to <2 x double>*
store <2 x double> %36, <2 x double>* %83
%84 = getelementptr inbounds double, double* %82, i64 2
%85 = bitcast double* %84 to <2 x double>*
store <2 x double> %38, <2 x double>* %85
%86 = or i64 %55, 24
%87 = getelementptr inbounds double, double* %52, i64 %86
%88 = bitcast double* %87 to <2 x double>*
store <2 x double> %36, <2 x double>* %88
%89 = getelementptr inbounds double, double* %87, i64 2
%90 = bitcast double* %89 to <2 x double>*
store <2 x double> %38, <2 x double>* %90
%91 = or i64 %55, 28
%92 = getelementptr inbounds double, double* %53, i64 %91
%93 = bitcast double* %92 to <2 x double>*
store <2 x double> %36, <2 x double>* %93
%94 = getelementptr inbounds double, double* %92, i64 2
%95 = bitcast double* %94 to <2 x double>*
store <2 x double> %38, <2 x double>* %95
%96 = add nuw i64 %55, 32
%97 = add i64 %56, 8
%98 = icmp eq i64 %97, %45
br i1 %98, label %99, label %54
99: ; preds = %54, %30
%100 = phi i64 [ 0, %30 ], [ %96, %54 ]
%101 = icmp eq i64 %42, 0
br i1 %101, label %114, label %102
102: ; preds = %99
%103 = getelementptr double, double* %5, i64 1
br label %104
104: ; preds = %104, %102
%105 = phi i64 [ %100, %102 ], [ %111, %104 ]
%106 = phi i64 [ 0, %102 ], [ %112, %104 ]
%107 = getelementptr inbounds double, double* %103, i64 %105
%108 = bitcast double* %107 to <2 x double>*
store <2 x double> %36, <2 x double>* %108
%109 = getelementptr inbounds double, double* %107, i64 2
%110 = bitcast double* %109 to <2 x double>*
store <2 x double> %38, <2 x double>* %110
%111 = add nuw i64 %105, 4
%112 = add i64 %106, 1
%113 = icmp eq i64 %112, %42
br i1 %113, label %114, label %104
114: ; preds = %104, %99
%115 = icmp eq i64 %28, %31
br i1 %115, label %119, label %116
116: ; preds = %24, %114
%117 = phi double* [ %5, %24 ], [ %32, %114 ]
%118 = phi i32 [ %2, %24 ], [ %34, %114 ]
br label %123
119: ; preds = %123, %114, %22
%120 = icmp sgt i32 %6, 0
br i1 %120, label %121, label %219
121: ; preds = %119
%122 = zext i32 %6 to i64
br label %129
123: ; preds = %116, %123
%124 = phi double* [ %126, %123 ], [ %117, %116 ]
%125 = phi i32 [ %127, %123 ], [ %118, %116 ]
%126 = getelementptr inbounds double, double* %124, i64 1
store double %25, double* %126
%127 = add nsw i32 %125, -1
%128 = icmp eq i32 %127, 0
br i1 %128, label %119, label %123
129: ; preds = %121, %215
%130 = phi i64 [ %122, %121 ], [ %217, %215 ]
%131 = phi i32 [ 0, %121 ], [ %191, %215 ]
%132 = phi i32 [ %2, %121 ], [ %190, %215 ]
%133 = phi i32 [ 0, %121 ], [ %216, %215 ]
%134 = phi i32 [ %2, %121 ], [ %188, %215 ]
%135 = phi double [ %3, %121 ], [ %187, %215 ]
%136 = fcmp ogt double %135, %8
%137 = icmp sgt i32 %132, 1
%138 = select i1 %136, i1 true, i1 %137
br i1 %138, label %139, label %185
139: ; preds = %129, %180
%140 = phi i32 [ %181, %180 ], [ %131, %129 ]
%141 = phi i32 [ %158, %180 ], [ 1, %129 ]
%142 = phi i32 [ %156, %180 ], [ %134, %129 ]
%143 = phi i32 [ %155, %180 ], [ 0, %129 ]
%144 = phi double [ %154, %180 ], [ %135, %129 ]
%145 = phi double [ %153, %180 ], [ 0.000000e+00, %129 ]
%146 = fadd double %145, %144
%147 = fmul double %146, 5.000000e-01
%148 = call i32 (double*, double*, i32, double, double*, ...) bitcast (i32 (...)* @sturmcnt to i32 (double*, double*, i32, double, double*, ...)*)(double* %0, double* %1, i32 %2, double %147, double* %4)
%149 = icmp eq i32 %148, -1
br i1 %149, label %325, label %150
150: ; preds = %139
%151 = sext i32 %148 to i64
%152 = icmp sgt i64 %130, %151
%153 = select i1 %152, double %147, double %145
%154 = select i1 %152, double %144, double %147
%155 = select i1 %152, i32 %148, i32 %143
%156 = select i1 %152, i32 %142, i32 %148
%157 = sub nsw i32 %156, %155
%158 = add nuw nsw i32 %141, 1
%159 = icmp eq i32 %158, %10
br i1 %159, label %325, label %160
160: ; preds = %150
%161 = fsub double %154, %153
br i1 %18, label %180, label %162
162: ; preds = %160
%163 = add nsw i32 %140, 1
%164 = load i32, i32* %12
%165 = load i32, i32* %13
%166 = load i32, i32* %14
%167 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i32 %140, double %153, double %154, i32 %155, i32 %164, i32 %156, i32 %165, i32 %157, i32 %166, double %161)
%168 = load i32, i32* %12
%169 = icmp eq i32 %155, %168
%170 = load i32, i32* %13
%171 = icmp eq i32 %156, %170
%172 = select i1 %169, i1 %171, i1 false
%173 = load i32, i32* %14
%174 = icmp eq i32 %157, %173
%175 = select i1 %172, i1 %174, i1 false
br i1 %175, label %178, label %176
176: ; preds = %162
%177 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.14, i64 0, i64 0))
br label %180
178: ; preds = %162
%179 = call i32 @putchar(i32 10)
br label %180
180: ; preds = %160, %176, %178
%181 = phi i32 [ %163, %176 ], [ %163, %178 ], [ %140, %160 ]
%182 = fcmp ogt double %161, %8
%183 = icmp sgt i32 %157, 1
%184 = select i1 %182, i1 true, i1 %183
br i1 %184, label %139, label %185
185: ; preds = %180, %129
%186 = phi double [ 0.000000e+00, %129 ], [ %153, %180 ]
%187 = phi double [ %135, %129 ], [ %154, %180 ]
%188 = phi i32 [ %134, %129 ], [ %156, %180 ]
%189 = phi i32 [ 1, %129 ], [ %158, %180 ]
%190 = phi i32 [ %132, %129 ], [ %157, %180 ]
%191 = phi i32 [ %131, %129 ], [ %181, %180 ]
%192 = fadd double %186, %187
%193 = fmul double %192, 5.000000e-01
%194 = getelementptr inbounds double, double* %5, i64 %130
store double %193, double* %194
br i1 %18, label %208, label %195
195: ; preds = %185
%196 = trunc i64 %130 to i32
%197 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %196)
%198 = load double, double* %194
%199 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), double %198)
%200 = getelementptr inbounds double, double* %9, i64 %130
%201 = load double, double* %200
%202 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), double %201)
%203 = load double, double* %194
%204 = load double, double* %200
%205 = fsub double %203, %204
%206 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), double %205)
%207 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.13, i64 0, i64 0))
br label %208
208: ; preds = %195, %185
%209 = load i32, i32* @DEBUG_EVECS
%210 = icmp sgt i32 %209, 2
br i1 %210, label %211, label %215
211: ; preds = %208
%212 = load double, double* %194
%213 = trunc i64 %130 to i32
%214 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0), i32 %213, i32 %189, double %212)
br label %215
215: ; preds = %211, %208
%216 = add nuw nsw i32 %189, %133
%217 = add nsw i64 %130, -1
%218 = icmp sgt i64 %130, 1
br i1 %218, label %129, label %219
219: ; preds = %215, %119
%220 = phi i32 [ 0, %119 ], [ %216, %215 ]
%221 = phi i32 [ %2, %119 ], [ %190, %215 ]
%222 = phi i32 [ 0, %119 ], [ %191, %215 ]
%223 = icmp sgt i32 %7, 0
br i1 %223, label %224, label %319
224: ; preds = %219
%225 = sub i32 %2, %7
%226 = sext i32 %225 to i64
%227 = sext i32 %2 to i64
br label %228
228: ; preds = %224, %316
%229 = phi i64 [ %226, %224 ], [ %235, %316 ]
%230 = phi i32 [ %222, %224 ], [ %292, %316 ]
%231 = phi i32 [ %221, %224 ], [ %291, %316 ]
%232 = phi i32 [ %220, %224 ], [ %317, %316 ]
%233 = phi i32 [ 0, %224 ], [ %289, %316 ]
%234 = phi double [ 0.000000e+00, %224 ], [ %287, %316 ]
%235 = add nsw i64 %229, 1
%236 = fsub double %3, %234
%237 = fcmp ogt double %236, %8
%238 = icmp sgt i32 %231, 1
%239 = select i1 %237, i1 true, i1 %238
br i1 %239, label %240, label %286
240: ; preds = %228, %281
%241 = phi i32 [ %282, %281 ], [ %230, %228 ]
%242 = phi i32 [ %259, %281 ], [ 1, %228 ]
%243 = phi i32 [ %257, %281 ], [ %2, %228 ]
%244 = phi i32 [ %256, %281 ], [ %233, %228 ]
%245 = phi double [ %255, %281 ], [ %3, %228 ]
%246 = phi double [ %254, %281 ], [ %234, %228 ]
%247 = fadd double %246, %245
%248 = fmul double %247, 5.000000e-01
%249 = call i32 (double*, double*, i32, double, double*, ...) bitcast (i32 (...)* @sturmcnt to i32 (double*, double*, i32, double, double*, ...)*)(double* %0, double* %1, i32 %2, double %248, double* %4)
%250 = icmp eq i32 %249, -1
br i1 %250, label %325, label %251
251: ; preds = %240
%252 = sext i32 %249 to i64
%253 = icmp slt i64 %229, %252
%254 = select i1 %253, double %246, double %248
%255 = select i1 %253, double %248, double %245
%256 = select i1 %253, i32 %244, i32 %249
%257 = select i1 %253, i32 %249, i32 %243
%258 = sub nsw i32 %257, %256
%259 = add nuw nsw i32 %242, 1
%260 = icmp eq i32 %259, %10
br i1 %260, label %325, label %261
261: ; preds = %251
%262 = fsub double %255, %254
br i1 %18, label %281, label %263
263: ; preds = %261
%264 = add nsw i32 %241, 1
%265 = load i32, i32* %12
%266 = load i32, i32* %13
%267 = load i32, i32* %14
%268 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i32 %241, double %254, double %255, i32 %256, i32 %265, i32 %257, i32 %266, i32 %258, i32 %267, double %262)
%269 = load i32, i32* %12
%270 = icmp eq i32 %256, %269
%271 = load i32, i32* %13
%272 = icmp eq i32 %257, %271
%273 = select i1 %270, i1 %272, i1 false
%274 = load i32, i32* %14
%275 = icmp eq i32 %258, %274
%276 = select i1 %273, i1 %275, i1 false
br i1 %276, label %279, label %277
277: ; preds = %263
%278 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.14, i64 0, i64 0))
br label %281
279: ; preds = %263
%280 = call i32 @putchar(i32 10)
br label %281
281: ; preds = %261, %277, %279
%282 = phi i32 [ %264, %277 ], [ %264, %279 ], [ %241, %261 ]
%283 = fcmp ogt double %262, %8
%284 = icmp sgt i32 %258, 1
%285 = select i1 %283, i1 true, i1 %284
br i1 %285, label %240, label %286
286: ; preds = %281, %228
%287 = phi double [ %234, %228 ], [ %254, %281 ]
%288 = phi double [ %3, %228 ], [ %255, %281 ]
%289 = phi i32 [ %233, %228 ], [ %256, %281 ]
%290 = phi i32 [ 1, %228 ], [ %259, %281 ]
%291 = phi i32 [ %231, %228 ], [ %258, %281 ]
%292 = phi i32 [ %230, %228 ], [ %282, %281 ]
%293 = fadd double %287, %288
%294 = fmul double %293, 5.000000e-01
%295 = getelementptr inbounds double, double* %5, i64 %235
store double %294, double* %295
br i1 %18, label %309, label %296
296: ; preds = %286
%297 = trunc i64 %235 to i32
%298 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %297)
%299 = load double, double* %295
%300 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), double %299)
%301 = getelementptr inbounds double, double* %9, i64 %235
%302 = load double, double* %301
%303 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), double %302)
%304 = load double, double* %295
%305 = load double, double* %301
%306 = fsub double %304, %305
%307 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0), double %306)
%308 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.13, i64 0, i64 0))
br label %309
309: ; preds = %296, %286
%310 = load i32, i32* @DEBUG_EVECS
%311 = icmp sgt i32 %310, 2
br i1 %311, label %312, label %316
312: ; preds = %309
%313 = load double, double* %295
%314 = trunc i64 %235 to i32
%315 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0), i32 %314, i32 %290, double %313)
br label %316
316: ; preds = %312, %309
%317 = add nuw nsw i32 %290, %232
%318 = icmp slt i64 %235, %227
br i1 %318, label %228, label %319
319: ; preds = %316, %219
%320 = phi i32 [ %220, %219 ], [ %317, %316 ]
%321 = load i32, i32* @DEBUG_EVECS
%322 = icmp sgt i32 %321, 2
br i1 %322, label %323, label %325
323: ; preds = %319
%324 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.11, i64 0, i64 0), i32 %320)
br label %325
325: ; preds = %150, %139, %251, %240, %319, %323
%326 = phi i32 [ 0, %323 ], [ 0, %319 ], [ 2, %251 ], [ 1, %240 ], [ 2, %150 ], [ 1, %139 ]
ret i32 %326
}