#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 */
float exp(float);
float log(float);
void borch_ampf(float *ampf, float *dt, int n, float *vref, float *vsite,
                float *pga, float *fmin, float *fmidbot, float *fmid,
                float *fhigh, float *fhightop, float *fmax) {
  float ma, mv, fa, fv, fac, df, freq;
  float vr;
  int i;
  vr = (*vref) / (*vsite);
  if (*pga < 0.1) {
    ma = 0.35;
    mv = 0.65;
  } else if (*pga < 0.2) {
    ma = 0.35 - (*pga - 0.1);
    mv = 0.65 - 0.5 * (*pga - 0.1);
  } else if (*pga < 0.3) {
    ma = 0.25 - 1.5 * (*pga - 0.2);
    mv = 0.60 - 0.7 * (*pga - 0.2);
  } else if (*pga < 0.4) {
    ma = 0.10 - 1.5 * (*pga - 0.3);
    mv = 0.53 - 0.8 * (*pga - 0.3);
  } else {
    ma = -0.05;
    mv = 0.45;
  }
  fa = exp(ma * log(vr));
  fv = exp(mv * log(vr));
  if (*fmin > *fmidbot)
    *fmin = *fmidbot;
  if (*fmax < *fhightop)
    *fmin = *fhightop;
  df = 1.0 / (n * (*dt));
  for (i = 1; i < n / 2; i++) {
    freq = i * df;
    if (freq < *fmin)
      fac = 1.0;
    else if (freq < *fmidbot)
      fac = 1.0 + (freq - *fmin) * (fv - 1.0) / (*fmidbot - *fmin);
    else if (freq < *fmid)
      fac = fv;
    else if (freq < *fhigh)
      fac = fv + (freq - *fmid) * (fa - fv) / (*fhigh - *fmid);
    else if (freq < *fhightop)
      fac = fa;
    else if (freq < *fmax)
      fac = fa + (freq - *fhightop) * (1.0 - fa) / (*fmax - *fhightop);
    else
      fac = 1.0;
    ampf[i] = fac;
  }
}


x86 assembly (clang, -O0):
<borch_ampf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x28(%rbp),%rax
divss  (%rax),%xmm0
movss  %xmm0,-0x50(%rbp)
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe80(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11a9 <borch_ampf+0x89>
movss  0xeea(%rip),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x38(%rbp)
jmp    1385 <borch_ampf+0x265>
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe4b(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1232 <borch_ampf+0x112>
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe25(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe79(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdf8(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe3c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe38(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
jmp    1380 <borch_ampf+0x260>
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdca(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    12c7 <borch_ampf+0x1a7>
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xda4(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xdc0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdcc(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd6b(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xd8f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd8b(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
jmp    137b <borch_ampf+0x25b>
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd3d(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    135c <borch_ampf+0x23c>
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd17(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xd2b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcef(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcde(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xce2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcde(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
jmp    1376 <borch_ampf+0x256>
movss  0xd10(%rip),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  0xcff(%rip),%xmm0
movss  %xmm0,-0x38(%rbp)
jmp    137b <borch_ampf+0x25b>
jmp    1380 <borch_ampf+0x260>
jmp    1385 <borch_ampf+0x265>
movss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x50(%rbp),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movss  -0x5c(%rbp),%xmm0
mulss  %xmm1,%xmm0
call   1030 <exp@plt>
movss  %xmm0,-0x3c(%rbp)
movss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x50(%rbp),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movss  -0x58(%rbp),%xmm0
mulss  %xmm1,%xmm0
call   1030 <exp@plt>
movss  %xmm0,-0x40(%rbp)
mov    0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    0x18(%rbp),%rax
ucomiss (%rax),%xmm0
jbe    13fe <borch_ampf+0x2de>
mov    0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    0x38(%rbp),%rax
movss  (%rax),%xmm1
mov    0x30(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    1427 <borch_ampf+0x307>
mov    0x30(%rbp),%rax
movss  (%rax),%xmm0
mov    0x10(%rbp),%rax
movss  %xmm0,(%rax)
cvtsi2ssl -0x14(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mulss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc28(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
movl   $0x1,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x60(%rbp),%eax
cmp    %ecx,%eax
jge    1676 <borch_ampf+0x556>
cvtsi2ssl -0x54(%rbp),%xmm0
mulss  -0x48(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x4c(%rbp),%xmm1
mov    0x10(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    14a9 <borch_ampf+0x389>
movss  0xbe1(%rip),%xmm0
movss  %xmm0,-0x44(%rbp)
jmp    1656 <borch_ampf+0x536>
movss  -0x4c(%rbp),%xmm1
mov    0x18(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    151b <borch_ampf+0x3fb>
movss  -0x4c(%rbp),%xmm0
mov    0x10(%rbp),%rax
subss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x40(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xb87(%rip),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm1
mov    0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    0x10(%rbp),%rax
subss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  %xmm0,%xmm1
movsd  0xb5f(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
jmp    1651 <borch_ampf+0x531>
movss  -0x4c(%rbp),%xmm1
mov    0x20(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    1540 <borch_ampf+0x420>
movss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
jmp    164c <borch_ampf+0x52c>
movss  -0x4c(%rbp),%xmm1
mov    0x28(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    1598 <borch_ampf+0x478>
movss  -0x40(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm1
mov    0x20(%rbp),%rax
subss  (%rax),%xmm1
movss  -0x3c(%rbp),%xmm2
subss  -0x40(%rbp),%xmm2
mulss  %xmm2,%xmm1
mov    0x28(%rbp),%rax
movss  (%rax),%xmm2
mov    0x20(%rbp),%rax
subss  (%rax),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x44(%rbp)
jmp    1647 <borch_ampf+0x527>
movss  -0x4c(%rbp),%xmm1
mov    0x30(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    15bd <borch_ampf+0x49d>
movss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
jmp    1642 <borch_ampf+0x522>
movss  -0x4c(%rbp),%xmm1
mov    0x38(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    1630 <borch_ampf+0x510>
movss  -0x3c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4c(%rbp),%xmm1
mov    0x30(%rbp),%rax
subss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x3c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm3
movsd  0xa6a(%rip),%xmm2
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
mov    0x38(%rbp),%rax
movss  (%rax),%xmm2
mov    0x30(%rbp),%rax
subss  (%rax),%xmm2
cvtss2sd %xmm2,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
jmp    163d <borch_ampf+0x51d>
movss  0xa48(%rip),%xmm0
movss  %xmm0,-0x44(%rbp)
jmp    1642 <borch_ampf+0x522>
jmp    1647 <borch_ampf+0x527>
jmp    164c <borch_ampf+0x52c>
jmp    1651 <borch_ampf+0x531>
jmp    1656 <borch_ampf+0x536>
movss  -0x44(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x54(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1454 <borch_ampf+0x334>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<borch_ampf>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %edx,%r14d
mov    %rsi,0x20(%rsp)
mov    %rdi,%rbx
mov    0x68(%rsp),%r12
mov    0x60(%rsp),%r13
movss  (%rcx),%xmm0
divss  (%r8),%xmm0
movss  (%r9),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xf03(%rip),%xmm1
ucomisd %xmm2,%xmm1
jbe    1170 <borch_ampf+0x50>
movapd 0xe95(%rip),%xmm1
jmp    1206 <borch_ampf+0xe6>
movsd  0xef0(%rip),%xmm1
ucomisd %xmm2,%xmm1
jbe    11a8 <borch_ampf+0x88>
addsd  0xf0a(%rip),%xmm2
movsd  0xf0a(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  0xf06(%rip),%xmm2
addsd  0xf06(%rip),%xmm2
unpcklpd %xmm1,%xmm2
jmp    1202 <borch_ampf+0xe2>
movsd  0xec0(%rip),%xmm1
ucomisd %xmm2,%xmm1
jbe    11d4 <borch_ampf+0xb4>
addsd  0xeca(%rip),%xmm2
unpcklpd %xmm2,%xmm2
mulpd  0xe76(%rip),%xmm2
addpd  0xe7e(%rip),%xmm2
jmp    1202 <borch_ampf+0xe2>
movsd  0xe9c(%rip),%xmm1
ucomisd %xmm2,%xmm1
jbe    13fd <borch_ampf+0x2dd>
addsd  0xe92(%rip),%xmm2
unpcklpd %xmm2,%xmm2
mulpd  0xe26(%rip),%xmm2
addpd  0xe2e(%rip),%xmm2
cvtpd2ps %xmm2,%xmm1
movapd %xmm1,0x10(%rsp)
mov    0x88(%rsp),%rbp
mov    0x80(%rsp),%r15
movss  %xmm0,0x8(%rsp)
call   1040 <log@plt>
movaps 0x10(%rsp),%xmm1
shufps $0x55,%xmm1,%xmm1
mulss  %xmm1,%xmm0
call   1030 <exp@plt>
movss  %xmm0,0xc(%rsp)
movss  0x8(%rsp),%xmm0
call   1040 <log@plt>
mulss  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movss  0x0(%r13),%xmm3
movss  (%r12),%xmm1
ucomiss %xmm1,%xmm3
jbe    126f <borch_ampf+0x14f>
movss  %xmm1,0x0(%r13)
movaps %xmm1,%xmm3
movss  (%r15),%xmm1
ucomiss 0x0(%rbp),%xmm1
jbe    1283 <borch_ampf+0x163>
movss  %xmm1,0x0(%r13)
movaps %xmm1,%xmm3
cmp    $0x4,%r14d
movss  0xc(%rsp),%xmm12
jl     13ee <borch_ampf+0x2ce>
mov    0x78(%rsp),%r8
xorps  %xmm1,%xmm1
cvtsi2ss %r14d,%xmm1
mov    0x70(%rsp),%rcx
mov    0x20(%rsp),%rdx
mulss  (%rdx),%xmm1
movss  0xe09(%rip),%xmm4
movaps %xmm4,%xmm2
divss  %xmm1,%xmm2
shr    %r14d
cvtss2sd %xmm12,%xmm8
movsd  0xde1(%rip),%xmm10
movapd %xmm10,%xmm9
subsd  %xmm8,%xmm9
movaps %xmm12,%xmm11
cvtss2sd %xmm0,%xmm7
addsd  0xdcf(%rip),%xmm7
subss  %xmm0,%xmm11
mov    $0x2,%edx
sub    %r14,%rdx
mov    $0x1,%esi
nopl   0x0(%rax,%rax,1)
xorps  %xmm5,%xmm5
cvtsi2ss %esi,%xmm5
mulss  %xmm2,%xmm5
ucomiss %xmm5,%xmm3
movaps %xmm4,%xmm1
ja     13d0 <borch_ampf+0x2b0>
movss  (%r12),%xmm1
ucomiss %xmm5,%xmm1
jbe    1350 <borch_ampf+0x230>
subss  %xmm3,%xmm5
cvtss2sd %xmm5,%xmm5
mulsd  %xmm7,%xmm5
subss  %xmm3,%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm5
addsd  %xmm10,%xmm5
xorps  %xmm1,%xmm1
cvtsd2ss %xmm5,%xmm1
jmp    13d0 <borch_ampf+0x2b0>
nopl   0x0(%rax,%rax,1)
movss  (%rcx),%xmm3
ucomiss %xmm5,%xmm3
movaps %xmm0,%xmm1
ja     13d0 <borch_ampf+0x2b0>
movss  (%r8),%xmm1
ucomiss %xmm5,%xmm1
jbe    1380 <borch_ampf+0x260>
subss  %xmm3,%xmm5
mulss  %xmm11,%xmm5
subss  %xmm3,%xmm1
divss  %xmm1,%xmm5
addss  %xmm0,%xmm5
movaps %xmm5,%xmm1
jmp    13d0 <borch_ampf+0x2b0>
movss  (%r15),%xmm3
ucomiss %xmm5,%xmm3
movaps %xmm12,%xmm1
ja     13d0 <borch_ampf+0x2b0>
movss  0x0(%rbp),%xmm6
ucomiss %xmm5,%xmm6
movaps %xmm4,%xmm1
jbe    13d0 <borch_ampf+0x2b0>
subss  %xmm3,%xmm5
xorps  %xmm1,%xmm1
cvtss2sd %xmm5,%xmm1
mulsd  %xmm9,%xmm1
subss  %xmm3,%xmm6
xorps  %xmm3,%xmm3
cvtss2sd %xmm6,%xmm3
divsd  %xmm3,%xmm1
addsd  %xmm8,%xmm1
cvtsd2ss %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movss  %xmm1,(%rbx,%rsi,4)
lea    (%rdx,%rsi,1),%rdi
cmp    $0x1,%rdi
je     13ee <borch_ampf+0x2ce>
movss  0x0(%r13),%xmm3
add    $0x1,%rsi
jmp    1300 <borch_ampf+0x1e0>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movapd 0xc0b(%rip),%xmm1
jmp    1206 <borch_ampf+0xe6>

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

LLVM IR (-O2):
define void @borch_ampf(float* nocapture writeonly %0, float* nocapture %1, i32 %2, float* nocapture %3, float* nocapture %4, float* nocapture %5, float* nocapture %6, float* nocapture %7, float* nocapture %8, float* nocapture %9, float* nocapture %10, float* nocapture %11) {
%13 = load float, float* %3
%14 = load float, float* %4
%15 = fdiv float %13, %14
%16 = load float, float* %5
%17 = fpext float %16 to double
%18 = fcmp olt double %17, 1.000000e-01
br i1 %18, label %44, label %19
19: ; preds = %12
%20 = fcmp olt double %17, 2.000000e-01
br i1 %20, label %21, label %28
21: ; preds = %19
%22 = fadd double %17, -1.000000e-01
%23 = fsub double 3.500000e-01, %22
%24 = tail call double @llvm.fmuladd.f64(double %22, double -5.000000e-01, double 6.500000e-01)
%25 = insertelement <2 x double> poison, double %24, i64 0
%26 = insertelement <2 x double> %25, double %23, i64 1
%27 = fptrunc <2 x double> %26 to <2 x float>
br label %44
28: ; preds = %19
%29 = fcmp olt double %17, 3.000000e-01
br i1 %29, label %30, label %36
30: ; preds = %28
%31 = fadd double %17, -2.000000e-01
%32 = insertelement <2 x double> poison, double %31, i64 0
%33 = shufflevector <2 x double> %32, <2 x double> poison, <2 x i32> zeroinitializer
%34 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %33, <2 x double> <double 0xBFE6666666666666, double -1.500000e+00>, <2 x double> <double 6.000000e-01, double 2.500000e-01>)
%35 = fptrunc <2 x double> %34 to <2 x float>
br label %44
36: ; preds = %28
%37 = fcmp olt double %17, 4.000000e-01
br i1 %37, label %38, label %44
38: ; preds = %36
%39 = fadd double %17, -3.000000e-01
%40 = insertelement <2 x double> poison, double %39, i64 0
%41 = shufflevector <2 x double> %40, <2 x double> poison, <2 x i32> zeroinitializer
%42 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %41, <2 x double> <double -8.000000e-01, double -1.500000e+00>, <2 x double> <double 5.300000e-01, double 1.000000e-01>)
%43 = fptrunc <2 x double> %42 to <2 x float>
br label %44
44: ; preds = %36, %12, %21, %38, %30
%45 = phi <2 x float> [ %27, %21 ], [ %35, %30 ], [ %43, %38 ], [ <float 0x3FE4CCCCC0000000, float 0x3FD6666660000000>, %12 ], [ <float 0x3FDCCCCCC0000000, float 0xBFA99999A0000000>, %36 ]
%46 = tail call float @log(float %15)
%47 = extractelement <2 x float> %45, i64 1
%48 = fmul float %47, %46
%49 = tail call float @exp(float %48)
%50 = tail call float @log(float %15)
%51 = extractelement <2 x float> %45, i64 0
%52 = fmul float %51, %50
%53 = tail call float @exp(float %52)
%54 = load float, float* %6
%55 = load float, float* %7
%56 = fcmp ogt float %54, %55
br i1 %56, label %57, label %58
57: ; preds = %44
store float %55, float* %6
br label %58
58: ; preds = %57, %44
%59 = phi float [ %55, %57 ], [ %54, %44 ]
%60 = load float, float* %11
%61 = load float, float* %10
%62 = fcmp olt float %60, %61
br i1 %62, label %63, label %64
63: ; preds = %58
store float %61, float* %6
br label %64
64: ; preds = %63, %58
%65 = phi float [ %61, %63 ], [ %59, %58 ]
%66 = sitofp i32 %2 to float
%67 = load float, float* %1
%68 = fmul float %67, %66
%69 = fdiv float 1.000000e+00, %68
%70 = icmp sgt i32 %2, 3
br i1 %70, label %71, label %132
71: ; preds = %64
%72 = lshr i32 %2, 1
%73 = fpext float %49 to double
%74 = fsub double 1.000000e+00, %73
%75 = fsub float %49, %53
%76 = fpext float %53 to double
%77 = fadd double %76, -1.000000e+00
%78 = zext i32 %72 to i64
br label %79
79: ; preds = %130, %71
%80 = phi float [ %65, %71 ], [ %131, %130 ]
%81 = phi i64 [ 1, %71 ], [ %128, %130 ]
%82 = trunc i64 %81 to i32
%83 = sitofp i32 %82 to float
%84 = fmul float %69, %83
%85 = fcmp olt float %84, %80
br i1 %85, label %125, label %86
86: ; preds = %79
%87 = load float, float* %7
%88 = fcmp olt float %84, %87
br i1 %88, label %89, label %98
89: ; preds = %86
%90 = fsub float %84, %80
%91 = fpext float %90 to double
%92 = fmul double %77, %91
%93 = fsub float %87, %80
%94 = fpext float %93 to double
%95 = fdiv double %92, %94
%96 = fadd double %95, 1.000000e+00
%97 = fptrunc double %96 to float
br label %125
98: ; preds = %86
%99 = load float, float* %8
%100 = fcmp olt float %84, %99
br i1 %100, label %125, label %101
101: ; preds = %98
%102 = load float, float* %9
%103 = fcmp olt float %84, %102
br i1 %103, label %104, label %110
104: ; preds = %101
%105 = fsub float %84, %99
%106 = fmul float %75, %105
%107 = fsub float %102, %99
%108 = fdiv float %106, %107
%109 = fadd float %53, %108
br label %125
110: ; preds = %101
%111 = load float, float* %10
%112 = fcmp olt float %84, %111
br i1 %112, label %125, label %113
113: ; preds = %110
%114 = load float, float* %11
%115 = fcmp olt float %84, %114
br i1 %115, label %116, label %125
116: ; preds = %113
%117 = fsub float %84, %111
%118 = fpext float %117 to double
%119 = fmul double %74, %118
%120 = fsub float %114, %111
%121 = fpext float %120 to double
%122 = fdiv double %119, %121
%123 = fadd double %122, %73
%124 = fptrunc double %123 to float
br label %125
125: ; preds = %113, %110, %98, %79, %89, %104, %116
%126 = phi float [ %97, %89 ], [ %109, %104 ], [ %124, %116 ], [ 1.000000e+00, %79 ], [ %53, %98 ], [ %49, %110 ], [ 1.000000e+00, %113 ]
%127 = getelementptr inbounds float, float* %0, i64 %81
store float %126, float* %127
%128 = add nuw nsw i64 %81, 1
%129 = icmp eq i64 %128, %78
br i1 %129, label %132, label %130
130: ; preds = %125
%131 = load float, float* %6
br label %79
132: ; preds = %125, %64
ret void
}