#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 xpabova(double a, double b) {
  double c = a * b, csq;
  if ((csq = .25 * c * c) > .001) {
    return (exp(c) - 1.) / a;
  } else {
    return exp(.5 * c) * b *
           (1. + csq / 6. * (1. + csq / 20. * (1. + csq / 42.)));
  }
}


x86 assembly (clang, -O0):
<xpabova>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xecf(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xeb0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    117f <xpabova+0x6f>
movsd  -0x20(%rbp),%xmm0
call   1030 <exp@plt>
movsd  0xea4(%rip),%xmm1
subsd  %xmm1,%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11fe <xpabova+0xee>
movsd  0xea9(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1030 <exp@plt>
mulsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xe85(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  0xe6c(%rip),%xmm3
divsd  %xmm3,%xmm2
movsd  -0x28(%rbp),%xmm4
movsd  0xe53(%rip),%xmm3
divsd  %xmm3,%xmm4
movsd  0xe3f(%rip),%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe2f(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe1f(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xpabova>:
sub    $0x18,%rsp
movapd %xmm0,%xmm3
mulsd  %xmm1,%xmm0
movsd  0xedc(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
ucomisd 0xed4(%rip),%xmm2
jbe    1155 <xpabova+0x45>
movsd  %xmm3,0x8(%rsp)
call   1030 <exp@plt>
movapd %xmm0,%xmm4
addsd  0xeeb(%rip),%xmm4
divsd  0x8(%rsp),%xmm4
jmp    11ba <xpabova+0xaa>
mulsd  0xeb3(%rip),%xmm0
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x10(%rsp)
call   1030 <exp@plt>
movsd  0x8(%rsp),%xmm4
movapd %xmm4,%xmm1
divsd  0xe98(%rip),%xmm1
movapd %xmm4,%xmm2
divsd  0xe94(%rip),%xmm2
divsd  0xe94(%rip),%xmm4
mulsd  0x10(%rsp),%xmm0
movsd  0xe8e(%rip),%xmm3
addsd  %xmm3,%xmm4
mulsd  %xmm2,%xmm4
addsd  %xmm3,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm4,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @xpabova(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
%8 = load double, double* %4
%9 = load double, double* %5
%10 = fmul double %8, %9
store double %10, double* %6
%11 = load double, double* %6
%12 = fmul double 2.500000e-01, %11
%13 = load double, double* %6
%14 = fmul double %12, %13
store double %14, double* %7
%15 = fcmp ogt double %14, 1.000000e-03
br i1 %15, label %16, label %22
16: ; preds = %2
%17 = load double, double* %6
%18 = call double @exp(double %17)
%19 = fsub double %18, 1.000000e+00
%20 = load double, double* %4
%21 = fdiv double %19, %20
store double %21, double* %3
br label %38
22: ; preds = %2
%23 = load double, double* %6
%24 = fmul double 5.000000e-01, %23
%25 = call double @exp(double %24)
%26 = load double, double* %5
%27 = fmul double %25, %26
%28 = load double, double* %7
%29 = fdiv double %28, 6.000000e+00
%30 = load double, double* %7
%31 = fdiv double %30, 2.000000e+01
%32 = load double, double* %7
%33 = fdiv double %32, 4.200000e+01
%34 = fadd double 1.000000e+00, %33
%35 = call double @llvm.fmuladd.f64(double %31, double %34, double 1.000000e+00)
%36 = call double @llvm.fmuladd.f64(double %29, double %35, double 1.000000e+00)
%37 = fmul double %27, %36
store double %37, double* %3
br label %38
38: ; preds = %22, %16
%39 = load double, double* %3
ret double %39
}

LLVM IR (-O2):
define double @xpabova(double %0, double %1) {
%3 = fmul double %0, %1
%4 = fmul double %3, 2.500000e-01
%5 = fmul double %3, %4
%6 = fcmp ogt double %5, 1.000000e-03
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = tail call double @exp(double %3)
%9 = fadd double %8, -1.000000e+00
%10 = fdiv double %9, %0
br label %22
11: ; preds = %2
%12 = fmul double %3, 5.000000e-01
%13 = tail call double @exp(double %12)
%14 = fmul double %13, %1
%15 = fdiv double %5, 6.000000e+00
%16 = fdiv double %5, 2.000000e+01
%17 = fdiv double %5, 4.200000e+01
%18 = fadd double %17, 1.000000e+00
%19 = tail call double @llvm.fmuladd.f64(double %16, double %18, double 1.000000e+00)
%20 = tail call double @llvm.fmuladd.f64(double %15, double %19, double 1.000000e+00)
%21 = fmul double %20, %14
br label %22
22: ; preds = %11, %7
%23 = phi double [ %10, %7 ], [ %21, %11 ]
ret double %23
}