#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 exp(double);
double fabs(double);
double pow(double, double);
double sqrt(double);
double airy_pos(double x) {
  double z = sqrt(0.0425 + pow(fabs(x), 3.0));
  double y = 0;
  y += (-0.002800908 + 0.326662423 * z) / pow(z, 7.0 / 6.0);
  y += x * (-0.007232251 - 0.044567423 * z) / pow(z, 11.0 / 6.0);
  y *= exp(-(2.0 / 3.0) * z);
  return y;
}


x86 assembly (clang, -O0):
<airy_pos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xf07(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xeeb(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xed3(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xea0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe76(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
divsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xe39(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe35(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe0b(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
divsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xde0(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<airy_pos>:
sub    $0x48,%rsp
movapd %xmm0,%xmm1
movapd 0xec0(%rip),%xmm0
movapd %xmm1,0x30(%rsp)
andpd  %xmm1,%xmm0
movsd  0xebe(%rip),%xmm1
call   1040 <pow@plt>
addsd  0xeb9(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     116f <airy_pos+0x3f>
sqrtsd %xmm0,%xmm0
jmp    1174 <airy_pos+0x44>
call   1050 <sqrt@plt>
movsd  0xea4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xea0(%rip),%xmm1
movapd %xmm1,(%rsp)
movsd  0xe9b(%rip),%xmm1
movsd  %xmm0,0x18(%rsp)
call   1040 <pow@plt>
movapd %xmm0,0x20(%rsp)
movsd  0xe8a(%rip),%xmm1
movsd  0x18(%rsp),%xmm0
mulsd  %xmm0,%xmm1
addsd  0xe80(%rip),%xmm1
mulsd  0x30(%rsp),%xmm1
movapd (%rsp),%xmm2
unpcklpd %xmm1,%xmm2
movapd %xmm2,(%rsp)
movsd  0xe6c(%rip),%xmm1
call   1040 <pow@plt>
movapd 0x20(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
movapd (%rsp),%xmm1
divpd  %xmm2,%xmm1
xorpd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
unpckhpd %xmm1,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0xe39(%rip),%xmm0
call   1030 <exp@plt>
mulsd  (%rsp),%xmm0
add    $0x48,%rsp
ret

LLVM IR (-O0):
define double @airy_pos(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call double @llvm.fabs.f64(double %5)
%7 = call double @pow(double %6, double 3.000000e+00)
%8 = fadd double 4.250000e-02, %7
%9 = call double @sqrt(double %8)
store double %9, double* %3
store double 0.000000e+00, double* %4
%10 = load double, double* %3
%11 = call double @llvm.fmuladd.f64(double 0x3FD4E80981E77EDD, double %10, double 0xBF66F1EE084A9615)
%12 = load double, double* %3
%13 = call double @pow(double %12, double 0x3FF2AAAAAAAAAAAB)
%14 = fdiv double %11, %13
%15 = load double, double* %4
%16 = fadd double %15, %14
store double %16, double* %4
%17 = load double, double* %2
%18 = load double, double* %3
%19 = call double @llvm.fmuladd.f64(double 0xBFA6D18A908105E9, double %18, double 0xBF7D9F909857E9E6)
%20 = fmul double %17, %19
%21 = load double, double* %3
%22 = call double @pow(double %21, double 0x3FFD555555555555)
%23 = fdiv double %20, %22
%24 = load double, double* %4
%25 = fadd double %24, %23
store double %25, double* %4
%26 = load double, double* %3
%27 = fmul double 0xBFE5555555555555, %26
%28 = call double @exp(double %27)
%29 = load double, double* %4
%30 = fmul double %29, %28
store double %30, double* %4
%31 = load double, double* %4
ret double %31
}

LLVM IR (-O2):
define double @airy_pos(double %0) {
%2 = tail call double @llvm.fabs.f64(double %0)
%3 = tail call double @pow(double %2, double 3.000000e+00)
%4 = fadd double %3, 4.250000e-02
%5 = tail call double @sqrt(double %4)
%6 = tail call double @llvm.fmuladd.f64(double %5, double 0x3FD4E80981E77EDD, double 0xBF66F1EE084A9615)
%7 = tail call double @pow(double %5, double 0x3FF2AAAAAAAAAAAB)
%8 = tail call double @llvm.fmuladd.f64(double %5, double 0xBFA6D18A908105E9, double 0xBF7D9F909857E9E6)
%9 = fmul double %8, %0
%10 = tail call double @pow(double %5, double 0x3FFD555555555555)
%11 = insertelement <2 x double> poison, double %6, i64 0
%12 = insertelement <2 x double> %11, double %9, i64 1
%13 = insertelement <2 x double> poison, double %7, i64 0
%14 = insertelement <2 x double> %13, double %10, i64 1
%15 = fdiv <2 x double> %12, %14
%16 = extractelement <2 x double> %15, i64 0
%17 = fadd double %16, 0.000000e+00
%18 = extractelement <2 x double> %15, i64 1
%19 = fadd double %17, %18
%20 = fmul double %5, 0xBFE5555555555555
%21 = tail call double @exp(double %20)
%22 = fmul double %21, %19
ret double %22
}