#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 beta_tau_finestructure(double);
double calc_background_radiation(double);
int pow(double, int);
void radiativeTransitions(const int transitions, const double *weights,
                          const int *lower, const int *upper,
                          const double *EinsA, const double *energy, double *nu,
                          double *betatau, const int slabInd, const double *dx,
                          double **popDensThis, double *Pnu, double **DFDX) {
  int i, k;
  double lw, uw;
  int li, ui;
  double Aul, lambda, background, Bul, Blu, tau;
  for (i = 1; i <= transitions; i++) {
    li = lower[i];
    lw = weights[li];
    ui = upper[i];
    uw = weights[ui];
    Aul = EinsA[i];
    nu[i] = 1.381e-16 * (energy[ui] - energy[li]) / 6.62618e-27;
    lambda = 2.997925e10 / nu[i];
    background = calc_background_radiation(lambda);
    Bul = pow(2.997925e10, 2e0) / (2e0 * 6.62618e-27 * pow(nu[i], 3e0)) * Aul;
    Blu = uw / lw * Bul;
    tau = 0e0;
    for (k = 0; k < slabInd; k++) {
      tau +=
          ((0e0) > ((Aul * pow(2.997925e10, 3e0)) /
                    (8e0 * 3.1415926536 * pow(nu[i], 3e0)) *
                    popDensThis[ui][k] *
                    ((popDensThis[li][k] * uw) / (popDensThis[ui][k] * lw) -
                     1e0) *
                    dx[k] / (1.0e0 * 1e5))
               ? (0e0)
               : ((Aul * pow(2.997925e10, 3e0)) /
                  (8e0 * 3.1415926536 * pow(nu[i], 3e0)) * popDensThis[ui][k] *
                  ((popDensThis[li][k] * uw) / (popDensThis[ui][k] * lw) -
                   1e0) *
                  dx[k] / (1.0e0 * 1e5)));
    }
    betatau[i] =
        ((0.5) < (beta_tau_finestructure(tau)) ? (0.5)
                                               : (beta_tau_finestructure(tau)));
    Pnu[i] = background;
    DFDX[li][li] -= Blu * background * betatau[i];
    DFDX[li][ui] += (Aul + Bul * background) * betatau[i];
    DFDX[ui][li] += Blu * background * betatau[i];
    DFDX[ui][ui] -= (Aul + Bul * background) * betatau[i];
  }
}


x86 assembly (clang, -O0):
<radiativeTransitions>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     166d <radiativeTransitions+0x53d>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
movsd  0xe24(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe10(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xde7(%rip),%xmm0
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1040 <calc_background_radiation@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  0xdc6(%rip),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
movsd  -0x88(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm2
movsd  0xd7d(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    14c9 <radiativeTransitions+0x399>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xd2f(%rip),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
movsd  -0x98(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
movsd  -0x90(%rbp),%xmm1
ff
cvtsi2sd %eax,%xmm2
movsd  0xd12(%rip),%xmm0
mulsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
mov    0x30(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mov    0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x48(%rbp),%xmm0
mov    0x30(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  -0x40(%rbp),%xmm2
divsd  %xmm2,%xmm0
movsd  0xcad(%rip),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm1
mov    0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
movsd  0xc88(%rip),%xmm0
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    13c1 <radiativeTransitions+0x291>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    14a9 <radiativeTransitions+0x379>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xc32(%rip),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
movsd  -0xb0(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
movsd  -0xa8(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm2
movsd  0xc15(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    0x30(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  -0x48(%rbp),%xmm1
mov    0x30(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  -0x40(%rbp),%xmm2
divsd  %xmm2,%xmm1
movsd  0xbb0(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  0xb8b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12b8 <radiativeTransitions+0x188>
movsd  -0x80(%rbp),%xmm0
call   1030 <beta_tau_finestructure@plt>
movsd  0xb45(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14fa <radiativeTransitions+0x3ca>
movsd  0xb33(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    150c <radiativeTransitions+0x3dc>
movsd  -0x80(%rbp),%xmm0
call   1030 <beta_tau_finestructure@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm0
mov    0x38(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x40(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x40(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1174 <radiativeTransitions+0x44>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radiativeTransitions>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r9,0x58(%rsp)
mov    %r8,0x50(%rsp)
mov    %rcx,0x48(%rsp)
mov    %rdx,0x40(%rsp)
mov    %rsi,0x38(%rsp)
mov    %rdi,0x8(%rsp)
test   %edi,%edi
jle    1525 <radiativeTransitions+0x3f5>
mov    0x120(%rsp),%r15
mov    0x8(%rsp),%rax
add    $0x1,%eax
mov    %rax,0x8(%rsp)
mov    0x110(%rsp),%ebx
mov    $0x1,%ebp
jmp    125e <radiativeTransitions+0x12e>
nopl   (%rax)
xorps  %xmm1,%xmm1
cvtsi2sdl 0x1c(%rsp),%xmm1
divsd  0x60(%rsp),%xmm1
movapd 0x80(%rsp),%xmm4
mulsd  %xmm4,%xmm1
movapd 0x90(%rsp),%xmm3
divsd  0x70(%rsp),%xmm3
mulsd  %xmm1,%xmm3
mov    0x108(%rsp),%rdx
movsd  %xmm0,(%rdx,%rbp,8)
mov    0x128(%rsp),%rax
movsd  0x68(%rsp),%xmm5
movsd  %xmm5,(%rax,%rbp,8)
mulsd  %xmm5,%xmm3
mov    0x130(%rsp),%rcx
mov    (%rcx,%r12,8),%rax
movsd  (%rax,%r12,8),%xmm0
movsd  (%rdx,%rbp,8),%xmm2
mulsd  %xmm3,%xmm2
subsd  %xmm2,%xmm0
movsd  %xmm0,(%rax,%r12,8)
mulsd  %xmm5,%xmm1
addsd  %xmm4,%xmm1
movsd  (%rdx,%rbp,8),%xmm0
mulsd  %xmm1,%xmm0
addsd  (%rax,%r14,8),%xmm0
movsd  %xmm0,(%rax,%r14,8)
mov    (%rcx,%r14,8),%rax
mulsd  (%rdx,%rbp,8),%xmm3
addsd  (%rax,%r12,8),%xmm3
movsd  %xmm3,(%rax,%r12,8)
movsd  (%rax,%r14,8),%xmm0
mulsd  (%rdx,%rbp,8),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%r14,8)
add    $0x1,%rbp
cmp    0x8(%rsp),%rbp
je     1525 <radiativeTransitions+0x3f5>
mov    0x40(%rsp),%rax
movslq (%rax,%rbp,4),%r12
mov    0x38(%rsp),%rcx
movsd  (%rcx,%r12,8),%xmm0
movaps %xmm0,0x70(%rsp)
mov    0x48(%rsp),%rax
movslq (%rax,%rbp,4),%r14
movsd  (%rcx,%r14,8),%xmm0
movaps %xmm0,0x90(%rsp)
mov    0x50(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm0
movaps %xmm0,0x80(%rsp)
mov    0x58(%rsp),%rax
movsd  (%rax,%r14,8),%xmm1
subsd  (%rax,%r12,8),%xmm1
mulsd  0xd47(%rip),%xmm1
divsd  0xd47(%rip),%xmm1
mov    0x100(%rsp),%r13
movsd  %xmm1,0x0(%r13,%rbp,8)
movsd  0xd38(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1040 <calc_background_radiation@plt>
movsd  %xmm0,0x68(%rsp)
movsd  0xd21(%rip),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %eax,0x1c(%rsp)
movsd  0x0(%r13,%rbp,8),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xcfb(%rip),%xmm0
cmpl   $0x0,0x110(%rsp)
movsd  %xmm0,0x60(%rsp)
jle    14f0 <radiativeTransitions+0x3c0>
movaps 0x80(%rsp),%xmm0
unpcklpd 0x90(%rsp),%xmm0
movaps %xmm0,0xb0(%rsp)
unpcklpd 0x70(%rsp),%xmm0
movaps %xmm0,0xa0(%rsp)
xor    %r13d,%r13d
xorps  %xmm0,%xmm0
jmp    1377 <radiativeTransitions+0x247>
movsd  0x10(%rsp),%xmm0
addsd  %xmm1,%xmm0
add    $0x1,%r13
cmp    %r13,%rbx
je     14f4 <radiativeTransitions+0x3c4>
movsd  %xmm0,0x10(%rsp)
movsd  0xc8b(%rip),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd %xmm0,0x20(%rsp)
mov    0x100(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
mov    (%r15,%r14,8),%rcx
movsd  (%rcx,%r13,8),%xmm0
mov    (%r15,%r12,8),%rcx
movapd 0x20(%rsp),%xmm3
movhpd (%rcx,%r13,8),%xmm3
mulpd  0xb0(%rsp),%xmm3
movapd 0xa0(%rsp),%xmm1
cvtsi2sd %eax,%xmm1
movapd 0xc55(%rip),%xmm2
unpcklpd %xmm0,%xmm2
mulpd  %xmm1,%xmm2
movapd %xmm3,%xmm1
divpd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
unpckhpd %xmm1,%xmm1
addsd  0xc15(%rip),%xmm1
mulsd  %xmm0,%xmm1
mov    0x118(%rsp),%rax
mulsd  (%rax,%r13,8),%xmm1
divsd  0xc03(%rip),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ja     1360 <radiativeTransitions+0x230>
movsd  0xbd1(%rip),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd %xmm0,0x20(%rsp)
mov    0x100(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
mov    (%r15,%r14,8),%rcx
movsd  (%rcx,%r13,8),%xmm0
mov    (%r15,%r12,8),%rcx
movapd 0x20(%rsp),%xmm3
movhpd (%rcx,%r13,8),%xmm3
mulpd  0xb0(%rsp),%xmm3
movapd 0xa0(%rsp),%xmm1
cvtsi2sd %eax,%xmm1
movapd 0xb9b(%rip),%xmm2
unpcklpd %xmm0,%xmm2
mulpd  %xmm1,%xmm2
movapd %xmm3,%xmm1
divpd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
unpckhpd %xmm1,%xmm1
addsd  0xb5b(%rip),%xmm1
mulsd  %xmm0,%xmm1
mov    0x118(%rsp),%rax
mulsd  (%rax,%r13,8),%xmm1
divsd  0xb49(%rip),%xmm1
jmp    1360 <radiativeTransitions+0x230>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
call   1030 <beta_tau_finestructure@plt>
movsd  0xb29(%rip),%xmm1
ucomisd %xmm1,%xmm0
movapd %xmm1,%xmm0
ja     1190 <radiativeTransitions+0x60>
movsd  0x10(%rsp),%xmm0
call   1030 <beta_tau_finestructure@plt>
jmp    1190 <radiativeTransitions+0x60>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @radiativeTransitions(i32 %0, double* nocapture %1, i32* nocapture %2, i32* nocapture %3, double* nocapture %4, double* nocapture %5, double* nocapture %6, double* nocapture %7, i32 %8, double* nocapture %9, double** nocapture %10, double* nocapture writeonly %11, double** nocapture %12) {
%14 = icmp slt i32 %0, 1
br i1 %14, label %162, label %15
15: ; preds = %13
%16 = icmp sgt i32 %8, 0
%17 = add nuw i32 %0, 1
%18 = zext i32 %17 to i64
%19 = zext i32 %8 to i64
br label %20
20: ; preds = %15, %132
%21 = phi i64 [ 1, %15 ], [ %160, %132 ]
%22 = getelementptr inbounds i32, i32* %2, i64 %21
%23 = load i32, i32* %22
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %1, i64 %24
%26 = load double, double* %25
%27 = getelementptr inbounds i32, i32* %3, i64 %21
%28 = load i32, i32* %27
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds double, double* %1, i64 %29
%31 = load double, double* %30
%32 = getelementptr inbounds double, double* %4, i64 %21
%33 = load double, double* %32
%34 = getelementptr inbounds double, double* %5, i64 %29
%35 = load double, double* %34
%36 = getelementptr inbounds double, double* %5, i64 %24
%37 = load double, double* %36
%38 = fsub double %35, %37
%39 = fmul double %38, 1.381000e-16
%40 = fdiv double %39, 6.626180e-27
%41 = getelementptr inbounds double, double* %6, i64 %21
store double %40, double* %41
%42 = fdiv double 0x421BEB9C35400000, %40
%43 = tail call double @calc_background_radiation(double %42)
%44 = tail call i32 @pow(double 0x421BEB9C35400000, i32 2)
%45 = sitofp i32 %44 to double
%46 = load double, double* %41
%47 = tail call i32 @pow(double %46, i32 3)
%48 = sitofp i32 %47 to double
%49 = fmul double %48, 0x3A9067D72CC8E179
%50 = fdiv double %45, %49
%51 = fmul double %33, %50
%52 = fdiv double %31, %26
%53 = fmul double %52, %51
br i1 %16, label %54, label %126
54: ; preds = %20
%55 = getelementptr inbounds double*, double** %10, i64 %29
%56 = getelementptr inbounds double*, double** %10, i64 %24
%57 = insertelement <2 x double> poison, double %33, i64 0
%58 = insertelement <2 x double> %57, double %31, i64 1
%59 = insertelement <2 x double> poison, double %26, i64 1
%60 = insertelement <2 x double> poison, double %33, i64 0
%61 = insertelement <2 x double> %60, double %31, i64 1
%62 = insertelement <2 x double> poison, double %26, i64 1
br label %63
63: ; preds = %54, %121
%64 = phi i64 [ 0, %54 ], [ %124, %121 ]
%65 = phi double [ 0.000000e+00, %54 ], [ %123, %121 ]
%66 = tail call i32 @pow(double 0x421BEB9C35400000, i32 3)
%67 = sitofp i32 %66 to double
%68 = load double, double* %41
%69 = tail call i32 @pow(double %68, i32 3)
%70 = sitofp i32 %69 to double
%71 = load double*, double** %55
%72 = getelementptr inbounds double, double* %71, i64 %64
%73 = load double, double* %72
%74 = load double*, double** %56
%75 = getelementptr inbounds double, double* %74, i64 %64
%76 = load double, double* %75
%77 = insertelement <2 x double> poison, double %67, i64 0
%78 = insertelement <2 x double> %77, double %76, i64 1
%79 = fmul <2 x double> %61, %78
%80 = insertelement <2 x double> %62, double %70, i64 0
%81 = insertelement <2 x double> <double 0x403921FB544486E0, double poison>, double %73, i64 1
%82 = fmul <2 x double> %80, %81
%83 = fdiv <2 x double> %79, %82
%84 = extractelement <2 x double> %83, i64 0
%85 = fmul double %73, %84
%86 = extractelement <2 x double> %83, i64 1
%87 = fadd double %86, -1.000000e+00
%88 = fmul double %85, %87
%89 = getelementptr inbounds double, double* %9, i64 %64
%90 = load double, double* %89
%91 = fmul double %90, %88
%92 = fdiv double %91, 1.000000e+05
%93 = fcmp olt double %92, 0.000000e+00
br i1 %93, label %121, label %94
94: ; preds = %63
%95 = tail call i32 @pow(double 0x421BEB9C35400000, i32 3)
%96 = sitofp i32 %95 to double
%97 = load double, double* %41
%98 = tail call i32 @pow(double %97, i32 3)
%99 = sitofp i32 %98 to double
%100 = load double*, double** %55
%101 = getelementptr inbounds double, double* %100, i64 %64
%102 = load double, double* %101
%103 = load double*, double** %56
%104 = getelementptr inbounds double, double* %103, i64 %64
%105 = load double, double* %104
%106 = insertelement <2 x double> poison, double %96, i64 0
%107 = insertelement <2 x double> %106, double %105, i64 1
%108 = fmul <2 x double> %58, %107
%109 = insertelement <2 x double> %59, double %99, i64 0
%110 = insertelement <2 x double> <double 0x403921FB544486E0, double poison>, double %102, i64 1
%111 = fmul <2 x double> %109, %110
%112 = fdiv <2 x double> %108, %111
%113 = extractelement <2 x double> %112, i64 0
%114 = fmul double %102, %113
%115 = extractelement <2 x double> %112, i64 1
%116 = fadd double %115, -1.000000e+00
%117 = fmul double %114, %116
%118 = load double, double* %89
%119 = fmul double %118, %117
%120 = fdiv double %119, 1.000000e+05
br label %121
121: ; preds = %63, %94
%122 = phi double [ %120, %94 ], [ 0.000000e+00, %63 ]
%123 = fadd double %65, %122
%124 = add nuw nsw i64 %64, 1
%125 = icmp eq i64 %124, %19
br i1 %125, label %126, label %63
126: ; preds = %121, %20
%127 = phi double [ 0.000000e+00, %20 ], [ %123, %121 ]
%128 = tail call double @beta_tau_finestructure(double %127)
%129 = fcmp ogt double %128, 5.000000e-01
br i1 %129, label %132, label %130
130: ; preds = %126
%131 = tail call double @beta_tau_finestructure(double %127)
br label %132
132: ; preds = %126, %130
%133 = phi double [ %131, %130 ], [ 5.000000e-01, %126 ]
%134 = getelementptr inbounds double, double* %7, i64 %21
store double %133, double* %134
%135 = getelementptr inbounds double, double* %11, i64 %21
store double %43, double* %135
%136 = fmul double %43, %53
%137 = load double, double* %134
%138 = getelementptr inbounds double*, double** %12, i64 %24
%139 = load double*, double** %138
%140 = getelementptr inbounds double, double* %139, i64 %24
%141 = load double, double* %140
%142 = fneg double %136
%143 = tail call double @llvm.fmuladd.f64(double %142, double %137, double %141)
store double %143, double* %140
%144 = tail call double @llvm.fmuladd.f64(double %51, double %43, double %33)
%145 = load double, double* %134
%146 = getelementptr inbounds double, double* %139, i64 %29
%147 = load double, double* %146
%148 = tail call double @llvm.fmuladd.f64(double %144, double %145, double %147)
store double %148, double* %146
%149 = load double, double* %134
%150 = getelementptr inbounds double*, double** %12, i64 %29
%151 = load double*, double** %150
%152 = getelementptr inbounds double, double* %151, i64 %24
%153 = load double, double* %152
%154 = tail call double @llvm.fmuladd.f64(double %136, double %149, double %153)
store double %154, double* %152
%155 = load double, double* %134
%156 = getelementptr inbounds double, double* %151, i64 %29
%157 = load double, double* %156
%158 = fneg double %144
%159 = tail call double @llvm.fmuladd.f64(double %158, double %155, double %157)
store double %159, double* %156
%160 = add nuw nsw i64 %21, 1
%161 = icmp eq i64 %160, %18
br i1 %161, label %162, label %20
162: ; preds = %132, %13
ret void
}