#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 sqrt(double);
double gamma_air(double x, double p) {
  double ax;
  double val = 0.0;
  ax = fabs(x);
  if (ax == 0.0) {
    val = 0.63E08 * p / sqrt(1.055);
  } else {
    val = 0.63E08 * p / sqrt(1.055 + ax) +
          1.3E08 * exp(-25.0 / (ax + 1.0E-04 / p));
  }
  return val;
}


x86 assembly (clang, -O0):
<gamma_air>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xeba(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    119c <gamma_air+0x7c>
jp     119c <gamma_air+0x7c>
movsd  0xec1(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xea7(%rip),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1212 <gamma_air+0xf2>
movsd  0xe8c(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe72(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  0xe42(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe29(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  -0x30(%rbp),%xmm1
movsd  0xe0b(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gamma_air>:
sub    $0x28,%rsp
movapd %xmm0,%xmm2
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
movsd  0xed8(%rip),%xmm0
mulsd  %xmm1,%xmm0
jne    114d <gamma_air+0x2d>
jp     114d <gamma_air+0x2d>
divsd  0xef0(%rip),%xmm0
add    $0x28,%rsp
ret
movsd  %xmm0,(%rsp)
andpd  0xea6(%rip),%xmm2
movsd  0xeb6(%rip),%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm3,%xmm0
jb     1172 <gamma_air+0x52>
sqrtsd %xmm0,%xmm0
jmp    118f <gamma_air+0x6f>
movapd %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
call   1040 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
movapd 0x10(%rsp),%xmm2
movsd  (%rsp),%xmm3
divsd  %xmm0,%xmm3
movsd  %xmm3,(%rsp)
movsd  0xe7b(%rip),%xmm0
divsd  %xmm1,%xmm0
addsd  %xmm0,%xmm2
movsd  0xe73(%rip),%xmm0
divsd  %xmm2,%xmm0
call   1030 <exp@plt>
mulsd  0xe6a(%rip),%xmm0
addsd  (%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @gamma_air(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0.000000e+00, double* %6
%7 = load double, double* %3
%8 = call double @llvm.fabs.f64(double %7)
store double %8, double* %5
%9 = load double, double* %5
%10 = fcmp oeq double %9, 0.000000e+00
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load double, double* %4
%13 = fmul double 6.300000e+07, %12
%14 = call double @sqrt(double 1.055000e+00)
%15 = fdiv double %13, %14
store double %15, double* %6
br label %30
16: ; preds = %2
%17 = load double, double* %4
%18 = fmul double 6.300000e+07, %17
%19 = load double, double* %5
%20 = fadd double 1.055000e+00, %19
%21 = call double @sqrt(double %20)
%22 = fdiv double %18, %21
%23 = load double, double* %5
%24 = load double, double* %4
%25 = fdiv double 1.000000e-04, %24
%26 = fadd double %23, %25
%27 = fdiv double -2.500000e+01, %26
%28 = call double @exp(double %27)
%29 = call double @llvm.fmuladd.f64(double 1.300000e+08, double %28, double %22)
store double %29, double* %6
br label %30
30: ; preds = %16, %11
%31 = load double, double* %6
ret double %31
}

LLVM IR (-O2):
define double @gamma_air(double %0, double %1) {
%3 = tail call double @llvm.fabs.f64(double %0)
%4 = fcmp oeq double %0, 0.000000e+00
%5 = fmul double %1, 6.300000e+07
br i1 %4, label %6, label %8
6: ; preds = %2
%7 = fdiv double %5, 0x3FF06F21E3CA0F7F
br label %17
8: ; preds = %2
%9 = fadd double %3, 1.055000e+00
%10 = tail call double @sqrt(double %9)
%11 = fdiv double %5, %10
%12 = fdiv double 1.000000e-04, %1
%13 = fadd double %3, %12
%14 = fdiv double -2.500000e+01, %13
%15 = tail call double @exp(double %14)
%16 = tail call double @llvm.fmuladd.f64(double %15, double 1.300000e+08, double %11)
br label %17
17: ; preds = %8, %6
%18 = phi double [ %7, %6 ], [ %16, %8 ]
ret double %18
}