#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*/ ATM_Dos(double *, double *, double *);
void ATM_Spectrum(double *et, double *at, double *e, double *spectrum) {
  double a21, a31, a32, a41;
  double e21, e31, e32, e41, e42, e43;
  double a42, a43;
  double dos;
  --at;
  ATM_Dos(et, e, &dos);
  --et;
  e21 = et[2] - et[1];
  e31 = et[3] - et[1];
  e32 = et[3] - et[2];
  e41 = et[4] - et[1];
  e42 = et[4] - et[2];
  e43 = et[4] - et[3];
  a21 = at[2] - at[1];
  a31 = at[3] - at[1];
  a32 = at[3] - at[2];
  a41 = at[4] - at[1];
  a42 = at[4] - at[2];
  a43 = at[4] - at[3];
  if (*e < et[1]) {
    *spectrum = 0.;
  } else if (*e > et[1] && *e < et[2]) {
    *spectrum = dos * (at[1] + (*e - et[1]) * .33333333333333331 *
                                   (a21 / e21 + a31 / e31 + a41 / e41));
  } else if (*e > et[2] && *e < et[3]) {
    *spectrum =
        dos *
        (at[1] +
         (a21 + e21 * a31 / e31 + e21 * a41 / e41) * .33333333333333331 *
             (et[3] - *e) / e32 +
         (at[4] - at[1] -
          (e43 * a41 / e41 + e43 * a42 / e42 + a43) * .33333333333333331) *
             (*e - et[2]) / e32);
  } else if (*e > et[3] && *e < et[4]) {
    *spectrum = dos * (at[4] + (*e - et[4]) * .33333333333333331 *
                                   (a41 / e41 + a42 / e42 + a43 / e43));
  } else if (*e > et[4]) {
    *spectrum = 0.;
  }
}


x86 assembly (clang, -O0):
<ATM_Spectrum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x88(%rbp),%rdx
call   1030 <ATM_Dos@plt>
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1296 <ATM_Spectrum+0x186>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    1531 <ATM_Spectrum+0x421>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
ucomisd 0x8(%rax),%xmm0
jbe    1335 <ATM_Spectrum+0x225>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1335 <ATM_Spectrum+0x225>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm1
movsd  0xd0e(%rip),%xmm3
mulsd  %xmm3,%xmm1
movsd  -0x28(%rbp),%xmm3
divsd  -0x48(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
divsd  -0x50(%rbp),%xmm4
addsd  %xmm4,%xmm3
movsd  -0x40(%rbp),%xmm4
divsd  -0x60(%rbp),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    152c <ATM_Spectrum+0x41c>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
ucomisd 0x10(%rax),%xmm0
jbe    145c <ATM_Spectrum+0x34c>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    145c <ATM_Spectrum+0x34c>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm3
mulsd  -0x30(%rbp),%xmm3
divsd  -0x50(%rbp),%xmm3
addsd  %xmm3,%xmm2
movsd  -0x48(%rbp),%xmm3
mulsd  -0x40(%rbp),%xmm3
divsd  -0x60(%rbp),%xmm3
addsd  %xmm3,%xmm2
movsd  0xc55(%rip),%xmm3
mulsd  %xmm3,%xmm2
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm3
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm3
mulsd  %xmm3,%xmm2
divsd  -0x58(%rbp),%xmm2
addsd  %xmm2,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm3
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm3
movsd  -0x70(%rbp),%xmm2
mulsd  -0x40(%rbp),%xmm2
divsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm4
mulsd  -0x78(%rbp),%xmm4
divsd  -0x68(%rbp),%xmm4
addsd  %xmm4,%xmm2
addsd  -0x80(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
movsd  0xbdb(%rip),%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm3
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm3
mulsd  %xmm3,%xmm2
divsd  -0x58(%rbp),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1527 <ATM_Spectrum+0x417>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
ucomisd 0x18(%rax),%xmm0
jbe    14fb <ATM_Spectrum+0x3eb>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    14fb <ATM_Spectrum+0x3eb>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  0x20(%rax),%xmm1
movsd  0xb48(%rip),%xmm3
mulsd  %xmm3,%xmm1
movsd  -0x40(%rbp),%xmm3
divsd  -0x60(%rbp),%xmm3
movsd  -0x78(%rbp),%xmm4
divsd  -0x68(%rbp),%xmm4
addsd  %xmm4,%xmm3
movsd  -0x80(%rbp),%xmm4
divsd  -0x70(%rbp),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1522 <ATM_Spectrum+0x412>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
ucomisd 0x20(%rax),%xmm0
jbe    151d <ATM_Spectrum+0x40d>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    1522 <ATM_Spectrum+0x412>
jmp    1527 <ATM_Spectrum+0x417>
jmp    152c <ATM_Spectrum+0x41c>
jmp    1531 <ATM_Spectrum+0x421>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ATM_Spectrum>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r12
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %rsp,%rdx
mov    %r12,%rsi
call   1030 <ATM_Dos@plt>
movsd  (%rbx),%xmm6
movsd  (%r12),%xmm0
xorpd  %xmm7,%xmm7
ucomisd %xmm0,%xmm6
ja     1341 <ATM_Spectrum+0x231>
movsd  0x8(%rbx),%xmm13
movsd  0x10(%rbx),%xmm3
movapd %xmm3,%xmm10
subsd  %xmm6,%xmm10
movsd  0x18(%rbx),%xmm15
movapd %xmm13,%xmm4
unpcklpd %xmm15,%xmm4
movapd %xmm6,%xmm1
unpcklpd %xmm6,%xmm1
subpd  %xmm1,%xmm4
movsd  (%r15),%xmm8
movsd  0x8(%r15),%xmm9
movsd  0x10(%r15),%xmm11
movapd %xmm11,%xmm5
subsd  %xmm8,%xmm5
movsd  0x18(%r15),%xmm14
movapd %xmm9,%xmm2
unpcklpd %xmm14,%xmm2
movapd %xmm8,%xmm1
unpcklpd %xmm8,%xmm1
subpd  %xmm1,%xmm2
ucomisd %xmm6,%xmm0
jbe    11f6 <ATM_Spectrum+0xe6>
ucomisd %xmm0,%xmm13
jbe    11f6 <ATM_Spectrum+0xe6>
subsd  %xmm6,%xmm0
mulsd  0xe36(%rip),%xmm0
divsd  %xmm10,%xmm5
divpd  %xmm4,%xmm2
addsd  %xmm2,%xmm5
unpckhpd %xmm2,%xmm2
addsd  %xmm5,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm8,%xmm2
mulsd  (%rsp),%xmm2
movapd %xmm2,%xmm7
jmp    1341 <ATM_Spectrum+0x231>
movapd %xmm15,%xmm1
subsd  %xmm13,%xmm1
movapd %xmm15,%xmm12
subsd  %xmm3,%xmm12
movapd %xmm14,%xmm6
subsd  %xmm9,%xmm6
movapd %xmm14,%xmm9
subsd  %xmm11,%xmm9
ucomisd %xmm13,%xmm0
jbe    12ee <ATM_Spectrum+0x1de>
ucomisd %xmm0,%xmm3
jbe    12ee <ATM_Spectrum+0x1de>
movapd %xmm3,%xmm11
subsd  %xmm13,%xmm11
movapd %xmm2,%xmm7
unpckhpd %xmm2,%xmm7
movapd %xmm1,%xmm14
movapd %xmm4,%xmm1
unpcklpd %xmm4,%xmm1
shufpd $0x2,%xmm2,%xmm5
mulpd  %xmm1,%xmm5
shufpd $0x2,%xmm4,%xmm10
divpd  %xmm10,%xmm5
movapd %xmm2,%xmm1
addsd  %xmm5,%xmm1
unpckhpd %xmm5,%xmm5
addsd  %xmm1,%xmm5
movsd  0xd82(%rip),%xmm1
mulsd  %xmm1,%xmm5
unpcklpd %xmm12,%xmm12
shufpd $0x1,%xmm6,%xmm2
mulpd  %xmm12,%xmm2
shufpd $0x1,%xmm14,%xmm4
divpd  %xmm4,%xmm2
movapd %xmm2,%xmm4
unpckhpd %xmm2,%xmm4
addsd  %xmm2,%xmm4
addsd  %xmm4,%xmm9
mulsd  %xmm1,%xmm9
subsd  %xmm9,%xmm7
unpcklpd %xmm7,%xmm5
unpcklpd %xmm0,%xmm3
unpcklpd %xmm13,%xmm0
subpd  %xmm0,%xmm3
mulpd  %xmm5,%xmm3
unpcklpd %xmm11,%xmm11
divpd  %xmm11,%xmm3
addsd  %xmm3,%xmm8
unpckhpd %xmm3,%xmm3
addsd  %xmm8,%xmm3
mulsd  (%rsp),%xmm3
movapd %xmm3,%xmm7
jmp    1341 <ATM_Spectrum+0x231>
ucomisd %xmm3,%xmm0
jbe    133a <ATM_Spectrum+0x22a>
ucomisd %xmm0,%xmm15
jbe    133a <ATM_Spectrum+0x22a>
subsd  %xmm15,%xmm0
mulsd  0xcf8(%rip),%xmm0
divsd  %xmm1,%xmm6
movsd  %xmm9,%xmm2
movsd  %xmm12,%xmm4
divpd  %xmm4,%xmm2
movapd %xmm2,%xmm7
unpckhpd %xmm2,%xmm7
addsd  %xmm6,%xmm7
addsd  %xmm2,%xmm7
mulsd  %xmm0,%xmm7
addsd  %xmm14,%xmm7
mulsd  (%rsp),%xmm7
jmp    1341 <ATM_Spectrum+0x231>
ucomisd %xmm15,%xmm0
jbe    1346 <ATM_Spectrum+0x236>
movsd  %xmm7,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ATM_Spectrum(double* %0, double* nocapture %1, double* %2, double* nocapture writeonly %3) {
%5 = alloca double
%6 = bitcast double* %5 to i8*
%7 = call i32 @ATM_Dos(double* %0, double* %2, double* %5)
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
%10 = load double, double* %0
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = fsub double %12, %10
%14 = fsub double %12, %9
%15 = getelementptr inbounds double, double* %0, i64 3
%16 = load double, double* %15
%17 = insertelement <2 x double> poison, double %9, i64 0
%18 = insertelement <2 x double> %17, double %16, i64 1
%19 = insertelement <2 x double> poison, double %10, i64 0
%20 = shufflevector <2 x double> %19, <2 x double> poison, <2 x i32> zeroinitializer
%21 = fsub <2 x double> %18, %20
%22 = fsub double %16, %9
%23 = fsub double %16, %12
%24 = getelementptr inbounds double, double* %1, i64 1
%25 = load double, double* %24
%26 = load double, double* %1
%27 = getelementptr inbounds double, double* %1, i64 2
%28 = load double, double* %27
%29 = fsub double %28, %26
%30 = getelementptr inbounds double, double* %1, i64 3
%31 = load double, double* %30
%32 = insertelement <2 x double> poison, double %25, i64 0
%33 = insertelement <2 x double> %32, double %31, i64 1
%34 = insertelement <2 x double> poison, double %26, i64 0
%35 = shufflevector <2 x double> %34, <2 x double> poison, <2 x i32> zeroinitializer
%36 = fsub <2 x double> %33, %35
%37 = fsub double %31, %25
%38 = fsub double %31, %28
%39 = load double, double* %2
%40 = fcmp olt double %39, %10
br i1 %40, label %125, label %41
41: ; preds = %4
%42 = fcmp ogt double %39, %10
%43 = fcmp olt double %39, %9
%44 = select i1 %42, i1 %43, i1 false
br i1 %44, label %45, label %57
45: ; preds = %41
%46 = load double, double* %5
%47 = fsub double %39, %10
%48 = fmul double %47, 0x3FD5555555555555
%49 = fdiv double %29, %13
%50 = fdiv <2 x double> %36, %21
%51 = extractelement <2 x double> %50, i64 0
%52 = fadd double %51, %49
%53 = extractelement <2 x double> %50, i64 1
%54 = fadd double %52, %53
%55 = call double @llvm.fmuladd.f64(double %48, double %54, double %26)
%56 = fmul double %55, %46
br label %125
57: ; preds = %41
%58 = fcmp ogt double %39, %9
%59 = fcmp olt double %39, %12
%60 = select i1 %58, i1 %59, i1 false
br i1 %60, label %61, label %105
61: ; preds = %57
%62 = load double, double* %5
%63 = extractelement <2 x double> %36, i64 1
%64 = shufflevector <2 x double> %21, <2 x double> undef, <2 x i32> zeroinitializer
%65 = insertelement <2 x double> %36, double %29, i64 0
%66 = fmul <2 x double> %64, %65
%67 = extractelement <2 x double> %21, i64 1
%68 = insertelement <2 x double> %21, double %13, i64 0
%69 = fdiv <2 x double> %66, %68
%70 = fadd <2 x double> %36, %69
%71 = shufflevector <2 x double> %69, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%72 = fadd <2 x double> %70, %71
%73 = extractelement <2 x double> %72, i64 0
%74 = fmul double %73, 0x3FD5555555555555
%75 = insertelement <2 x double> poison, double %23, i64 0
%76 = shufflevector <2 x double> %75, <2 x double> poison, <2 x i32> zeroinitializer
%77 = insertelement <2 x double> poison, double %63, i64 0
%78 = insertelement <2 x double> %77, double %37, i64 1
%79 = fmul <2 x double> %76, %78
%80 = insertelement <2 x double> poison, double %67, i64 0
%81 = insertelement <2 x double> %80, double %22, i64 1
%82 = fdiv <2 x double> %79, %81
%83 = shufflevector <2 x double> %82, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%84 = fadd <2 x double> %82, %83
%85 = extractelement <2 x double> %84, i64 0
%86 = fadd double %38, %85
%87 = fneg double %86
%88 = call double @llvm.fmuladd.f64(double %87, double 0x3FD5555555555555, double %63)
%89 = insertelement <2 x double> poison, double %12, i64 0
%90 = insertelement <2 x double> %89, double %39, i64 1
%91 = insertelement <2 x double> poison, double %39, i64 0
%92 = insertelement <2 x double> %91, double %9, i64 1
%93 = fsub <2 x double> %90, %92
%94 = insertelement <2 x double> poison, double %74, i64 0
%95 = insertelement <2 x double> %94, double %88, i64 1
%96 = fmul <2 x double> %93, %95
%97 = insertelement <2 x double> poison, double %14, i64 0
%98 = shufflevector <2 x double> %97, <2 x double> poison, <2 x i32> zeroinitializer
%99 = fdiv <2 x double> %96, %98
%100 = extractelement <2 x double> %99, i64 0
%101 = fadd double %26, %100
%102 = extractelement <2 x double> %99, i64 1
%103 = fadd double %101, %102
%104 = fmul double %103, %62
br label %125
105: ; preds = %57
%106 = fcmp ogt double %39, %12
%107 = fcmp olt double %39, %16
%108 = select i1 %106, i1 %107, i1 false
br i1 %108, label %109, label %123
109: ; preds = %105
%110 = load double, double* %5
%111 = fsub double %39, %16
%112 = fmul double %111, 0x3FD5555555555555
%113 = fdiv double %37, %22
%114 = insertelement <2 x double> %36, double %38, i64 0
%115 = insertelement <2 x double> %21, double %23, i64 0
%116 = fdiv <2 x double> %114, %115
%117 = extractelement <2 x double> %116, i64 1
%118 = fadd double %117, %113
%119 = extractelement <2 x double> %116, i64 0
%120 = fadd double %119, %118
%121 = call double @llvm.fmuladd.f64(double %112, double %120, double %31)
%122 = fmul double %121, %110
br label %125
123: ; preds = %105
%124 = fcmp ogt double %39, %16
br i1 %124, label %125, label %127
125: ; preds = %123, %4, %61, %109, %45
%126 = phi double [ %56, %45 ], [ %122, %109 ], [ %104, %61 ], [ 0.000000e+00, %4 ], [ 0.000000e+00, %123 ]
store double %126, double* %3
br label %127
127: ; preds = %125, %123
ret void
}