#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);
double sqrt(double);
int odrra_(int *n, double *d__, double *e, double *e2, double *spltol,
           double *tnrm, int *nsplit, int *isplit, int *info) {
  int i__1;
  double d__1, d__2;
  int i__;
  double tmp1, eabs;
  --isplit;
  --e2;
  --e;
  --d__;
  *info = 0;
  *nsplit = 1;
  if (*spltol < 0.) {
    tmp1 = fabs(*spltol) * *tnrm;
    i__1 = *n - 1;
    for (i__ = 1; i__ <= i__1; ++i__) {
      eabs = (d__1 = e[i__], fabs(d__1));
      if (eabs <= tmp1) {
        e[i__] = 0.;
        e2[i__] = 0.;
        isplit[*nsplit] = i__;
        ++(*nsplit);
      }
    }
  } else {
    i__1 = *n - 1;
    for (i__ = 1; i__ <= i__1; ++i__) {
      eabs = (d__1 = e[i__], fabs(d__1));
      if (eabs <= *spltol * sqrt((d__1 = d__[i__], fabs(d__1))) *
                      sqrt((d__2 = d__[i__ + 1], fabs(d__2)))) {
        e[i__] = 0.;
        e2[i__] = 0.;
        isplit[*nsplit] = i__;
        ++(*nsplit);
      }
    }
  }
  isplit[*nsplit] = *n;
  return 0;
}


x86 assembly (clang, -O0):
<odrra_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    0x18(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x10(%rbp)
mov    0x20(%rbp),%rax
movl   $0x0,(%rax)
mov    0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    1262 <odrra_+0x152>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movaps 0xe5d(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x30(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jg     125d <odrra_+0x14d>
mov    -0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movaps 0xe0f(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     124a <odrra_+0x13a>
mov    -0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x4c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%edx
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    124f <odrra_+0x13f>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11c7 <odrra_+0xb7>
jmp    1392 <odrra_+0x282>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jg     138d <odrra_+0x27d>
mov    -0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movaps 0xd61(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movaps 0xd23(%rip),%xmm1
pand   %xmm1,%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movaps 0xce6(%rip),%xmm1
pand   %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  -0x70(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     137a <odrra_+0x26a>
mov    -0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x4c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%edx
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    137f <odrra_+0x26f>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1275 <odrra_+0x165>
jmp    1392 <odrra_+0x282>
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    %edx,(%rax,%rcx,4)
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odrra_>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdx,%rbx
mov    %rsi,%r13
mov    0x88(%rsp),%rsi
mov    0x80(%rsp),%r14
mov    0x90(%rsp),%rax
movl   $0x0,(%rax)
movl   $0x1,(%r14)
movsd  (%r8),%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm2,%xmm0
jbe    11d1 <odrra_+0xc1>
mov    (%rdi),%eax
mov    $0x1,%ebp
cmp    $0x2,%eax
jl     12ff <odrra_+0x1ef>
andpd  0xe90(%rip),%xmm2
mulsd  (%r9),%xmm2
mov    $0x1,%edx
mov    $0x1,%ebp
movapd 0xe79(%rip),%xmm0
jmp    119d <odrra_+0x8d>
nopl   0x0(%rax)
add    $0x1,%rdx
cmp    %rdx,%rax
je     12ff <odrra_+0x1ef>
movsd  -0x8(%rbx,%rdx,8),%xmm1
andpd  %xmm0,%xmm1
ucomisd %xmm1,%xmm2
jb     1190 <odrra_+0x80>
movq   $0x0,-0x8(%rbx,%rdx,8)
movq   $0x0,-0x8(%rcx,%rdx,8)
movslq %ebp,%rbp
mov    %edx,-0x4(%rsi,%rbp,4)
mov    (%r14),%ebp
add    $0x1,%ebp
mov    %ebp,(%r14)
jmp    1190 <odrra_+0x80>
mov    (%rdi),%eax
mov    $0x1,%ebp
cmp    $0x2,%eax
jl     12ff <odrra_+0x1ef>
mov    %r8,%r12
mov    %rcx,0x10(%rsp)
mov    %rdi,0x8(%rsp)
mov    $0x2,%ebp
sub    %rax,%rbp
mov    $0x1,%r15d
movapd 0xdfc(%rip),%xmm3
xorpd  %xmm4,%xmm4
nopl   0x0(%rax,%rax,1)
movsd  -0x8(%rbx,%r15,8),%xmm1
movsd  -0x8(%r13,%r15,8),%xmm0
andpd  %xmm3,%xmm0
ucomisd %xmm4,%xmm0
movapd %xmm2,0x30(%rsp)
movaps %xmm1,0x20(%rsp)
jb     1240 <odrra_+0x130>
xorps  %xmm5,%xmm5
sqrtsd %xmm0,%xmm5
jmp    124d <odrra_+0x13d>
nopl   0x0(%rax)
call   1030 <sqrt@plt>
xorpd  %xmm4,%xmm4
movapd %xmm0,%xmm5
movsd  0x0(%r13,%r15,8),%xmm0
andpd  0xda4(%rip),%xmm0
ucomisd %xmm4,%xmm0
jb     1270 <odrra_+0x160>
sqrtsd %xmm0,%xmm0
jmp    1285 <odrra_+0x175>
nopl   0x0(%rax,%rax,1)
movsd  %xmm5,0x18(%rsp)
call   1030 <sqrt@plt>
movsd  0x18(%rsp),%xmm5
xorpd  %xmm4,%xmm4
movapd 0x30(%rsp),%xmm1
movapd 0xd6d(%rip),%xmm3
movapd 0x20(%rsp),%xmm2
andpd  %xmm3,%xmm2
mulsd  %xmm5,%xmm1
mulsd  %xmm0,%xmm1
lea    (%r15,%rbp,1),%rax
ucomisd %xmm2,%xmm1
jb     12da <odrra_+0x1ca>
movq   $0x0,-0x8(%rbx,%r15,8)
mov    0x10(%rsp),%rcx
movq   $0x0,-0x8(%rcx,%r15,8)
movslq (%r14),%rcx
mov    0x88(%rsp),%rdx
mov    %r15d,-0x4(%rdx,%rcx,4)
addl   $0x1,(%r14)
cmp    $0x1,%rax
je     12ef <odrra_+0x1df>
movsd  (%r12),%xmm2
add    $0x1,%r15
jmp    1210 <odrra_+0x100>
mov    (%r14),%ebp
mov    0x88(%rsp),%rsi
mov    0x8(%rsp),%rdi
mov    (%rdi),%eax
movslq %ebp,%rcx
mov    %eax,-0x4(%rsi,%rcx,4)
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @odrra_(i32* %0, double* %1, double* %2, double* %3, double* %4, double* %5, i32* %6, i32* %7, i32* %8) {
%10 = alloca i32*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca i32
%20 = alloca double
%21 = alloca double
%22 = alloca i32
%23 = alloca double
%24 = alloca double
store i32* %0, i32** %10
store double* %1, double** %11
store double* %2, double** %12
store double* %3, double** %13
store double* %4, double** %14
store double* %5, double** %15
store i32* %6, i32** %16
store i32* %7, i32** %17
store i32* %8, i32** %18
%25 = load i32*, i32** %17
%26 = getelementptr inbounds i32, i32* %25, i32 -1
store i32* %26, i32** %17
%27 = load double*, double** %13
%28 = getelementptr inbounds double, double* %27, i32 -1
store double* %28, double** %13
%29 = load double*, double** %12
%30 = getelementptr inbounds double, double* %29, i32 -1
store double* %30, double** %12
%31 = load double*, double** %11
%32 = getelementptr inbounds double, double* %31, i32 -1
store double* %32, double** %11
%33 = load i32*, i32** %18
store i32 0, i32* %33
%34 = load i32*, i32** %16
store i32 1, i32* %34
%35 = load double*, double** %14
%36 = load double, double* %35
%37 = fcmp olt double %36, 0.000000e+00
br i1 %37, label %38, label %86
38: ; preds = %9
%39 = load double*, double** %14
%40 = load double, double* %39
%41 = call double @llvm.fabs.f64(double %40)
%42 = load double*, double** %15
%43 = load double, double* %42
%44 = fmul double %41, %43
store double %44, double* %23
%45 = load i32*, i32** %10
%46 = load i32, i32* %45
%47 = sub nsw i32 %46, 1
store i32 %47, i32* %19
store i32 1, i32* %22
br label %48
48: ; preds = %82, %38
%49 = load i32, i32* %22
%50 = load i32, i32* %19
%51 = icmp sle i32 %49, %50
br i1 %51, label %52, label %85
52: ; preds = %48
%53 = load double*, double** %12
%54 = load i32, i32* %22
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds double, double* %53, i64 %55
%57 = load double, double* %56
store double %57, double* %20
%58 = load double, double* %20
%59 = call double @llvm.fabs.f64(double %58)
store double %59, double* %24
%60 = load double, double* %24
%61 = load double, double* %23
%62 = fcmp ole double %60, %61
br i1 %62, label %63, label %81
63: ; preds = %52
%64 = load double*, double** %12
%65 = load i32, i32* %22
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %64, i64 %66
store double 0.000000e+00, double* %67
%68 = load double*, double** %13
%69 = load i32, i32* %22
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %68, i64 %70
store double 0.000000e+00, double* %71
%72 = load i32, i32* %22
%73 = load i32*, i32** %17
%74 = load i32*, i32** %16
%75 = load i32, i32* %74
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i32, i32* %73, i64 %76
store i32 %72, i32* %77
%78 = load i32*, i32** %16
%79 = load i32, i32* %78
%80 = add nsw i32 %79, 1
store i32 %80, i32* %78
br label %81
81: ; preds = %63, %52
br label %82
82: ; preds = %81
%83 = load i32, i32* %22
%84 = add nsw i32 %83, 1
store i32 %84, i32* %22
br label %48
85: ; preds = %48
br label %148
86: ; preds = %9
%87 = load i32*, i32** %10
%88 = load i32, i32* %87
%89 = sub nsw i32 %88, 1
store i32 %89, i32* %19
store i32 1, i32* %22
br label %90
90: ; preds = %144, %86
%91 = load i32, i32* %22
%92 = load i32, i32* %19
%93 = icmp sle i32 %91, %92
br i1 %93, label %94, label %147
94: ; preds = %90
%95 = load double*, double** %12
%96 = load i32, i32* %22
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds double, double* %95, i64 %97
%99 = load double, double* %98
store double %99, double* %20
%100 = load double, double* %20
%101 = call double @llvm.fabs.f64(double %100)
store double %101, double* %24
%102 = load double, double* %24
%103 = load double*, double** %14
%104 = load double, double* %103
%105 = load double*, double** %11
%106 = load i32, i32* %22
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %105, i64 %107
%109 = load double, double* %108
store double %109, double* %20
%110 = load double, double* %20
%111 = call double @llvm.fabs.f64(double %110)
%112 = call double @sqrt(double %111)
%113 = fmul double %104, %112
%114 = load double*, double** %11
%115 = load i32, i32* %22
%116 = add nsw i32 %115, 1
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds double, double* %114, i64 %117
%119 = load double, double* %118
store double %119, double* %21
%120 = load double, double* %21
%121 = call double @llvm.fabs.f64(double %120)
%122 = call double @sqrt(double %121)
%123 = fmul double %113, %122
%124 = fcmp ole double %102, %123
br i1 %124, label %125, label %143
125: ; preds = %94
%126 = load double*, double** %12
%127 = load i32, i32* %22
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds double, double* %126, i64 %128
store double 0.000000e+00, double* %129
%130 = load double*, double** %13
%131 = load i32, i32* %22
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds double, double* %130, i64 %132
store double 0.000000e+00, double* %133
%134 = load i32, i32* %22
%135 = load i32*, i32** %17
%136 = load i32*, i32** %16
%137 = load i32, i32* %136
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds i32, i32* %135, i64 %138
store i32 %134, i32* %139
%140 = load i32*, i32** %16
%141 = load i32, i32* %140
%142 = add nsw i32 %141, 1
store i32 %142, i32* %140
br label %143
143: ; preds = %125, %94
br label %144
144: ; preds = %143
%145 = load i32, i32* %22
%146 = add nsw i32 %145, 1
store i32 %146, i32* %22
br label %90
147: ; preds = %90
br label %148
148: ; preds = %147, %85
%149 = load i32*, i32** %10
%150 = load i32, i32* %149
%151 = load i32*, i32** %17
%152 = load i32*, i32** %16
%153 = load i32, i32* %152
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds i32, i32* %151, i64 %154
store i32 %150, i32* %155
ret i32 0
}

LLVM IR (-O2):
define i32 @odrra_(i32* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture writeonly %3, double* nocapture %4, double* nocapture %5, i32* nocapture %6, i32* nocapture writeonly %7, i32* nocapture writeonly %8) {
%10 = getelementptr inbounds i32, i32* %7, i64 -1
%11 = getelementptr inbounds double, double* %3, i64 -1
%12 = getelementptr inbounds double, double* %2, i64 -1
%13 = getelementptr inbounds double, double* %1, i64 -1
store i32 0, i32* %8
store i32 1, i32* %6
%14 = load double, double* %4
%15 = fcmp olt double %14, 0.000000e+00
br i1 %15, label %16, label %42
16: ; preds = %9
%17 = tail call double @llvm.fabs.f64(double %14)
%18 = load double, double* %5
%19 = fmul double %17, %18
%20 = load i32, i32* %0
%21 = icmp sgt i32 %20, 1
br i1 %21, label %22, label %79
22: ; preds = %16
%23 = zext i32 %20 to i64
br label %24
24: ; preds = %22, %38
%25 = phi i32 [ 1, %22 ], [ %39, %38 ]
%26 = phi i64 [ 1, %22 ], [ %40, %38 ]
%27 = getelementptr inbounds double, double* %12, i64 %26
%28 = load double, double* %27
%29 = tail call double @llvm.fabs.f64(double %28)
%30 = fcmp ugt double %29, %19
br i1 %30, label %38, label %31
31: ; preds = %24
store double 0.000000e+00, double* %27
%32 = getelementptr inbounds double, double* %11, i64 %26
store double 0.000000e+00, double* %32
%33 = sext i32 %25 to i64
%34 = getelementptr inbounds i32, i32* %10, i64 %33
%35 = trunc i64 %26 to i32
store i32 %35, i32* %34
%36 = load i32, i32* %6
%37 = add nsw i32 %36, 1
store i32 %37, i32* %6
br label %38
38: ; preds = %24, %31
%39 = phi i32 [ %25, %24 ], [ %37, %31 ]
%40 = add nuw nsw i64 %26, 1
%41 = icmp eq i64 %40, %23
br i1 %41, label %79, label %24
42: ; preds = %9
%43 = load i32, i32* %0
%44 = icmp sgt i32 %43, 1
br i1 %44, label %45, label %79
45: ; preds = %42
%46 = zext i32 %43 to i64
br label %47
47: ; preds = %75, %45
%48 = phi double [ %14, %45 ], [ %76, %75 ]
%49 = phi i64 [ 1, %45 ], [ %58, %75 ]
%50 = getelementptr inbounds double, double* %12, i64 %49
%51 = load double, double* %50
%52 = tail call double @llvm.fabs.f64(double %51)
%53 = getelementptr inbounds double, double* %13, i64 %49
%54 = load double, double* %53
%55 = tail call double @llvm.fabs.f64(double %54)
%56 = tail call double @sqrt(double %55)
%57 = fmul double %48, %56
%58 = add nuw nsw i64 %49, 1
%59 = getelementptr inbounds double, double* %1, i64 %49
%60 = load double, double* %59
%61 = tail call double @llvm.fabs.f64(double %60)
%62 = tail call double @sqrt(double %61)
%63 = fmul double %57, %62
%64 = fcmp ugt double %52, %63
br i1 %64, label %73, label %65
65: ; preds = %47
store double 0.000000e+00, double* %50
%66 = getelementptr inbounds double, double* %11, i64 %49
store double 0.000000e+00, double* %66
%67 = load i32, i32* %6
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i32, i32* %10, i64 %68
%70 = trunc i64 %49 to i32
store i32 %70, i32* %69
%71 = load i32, i32* %6
%72 = add nsw i32 %71, 1
store i32 %72, i32* %6
br label %73
73: ; preds = %47, %65
%74 = icmp eq i64 %58, %46
br i1 %74, label %77, label %75
75: ; preds = %73
%76 = load double, double* %4
br label %47
77: ; preds = %73
%78 = load i32, i32* %6
br label %79
79: ; preds = %38, %77, %42, %16
%80 = phi i32 [ %78, %77 ], [ 1, %42 ], [ 1, %16 ], [ %39, %38 ]
%81 = load i32, i32* %0
%82 = sext i32 %80 to i64
%83 = getelementptr inbounds i32, i32* %10, i64 %82
store i32 %81, i32* %83
ret i32 0
}