#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 fabs(double);
double log(int);
double lnabova(double a, double b) {
  double c = a * b, t;
  if (fabs(c) > .01) {
    return log(1. + c) / a;
  } else {
    t = c / (2. + c);
    t *= t;
    return b / (2. + c) * (2. + t * (2. / 3. + t * (2. / 5. + t * (2. / 7.))));
  }
}


x86 assembly (clang, -O0):
<lnabova>:
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  -0x20(%rbp),%xmm0
movaps 0xef3(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xeb7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1178 <lnabova+0x68>
movsd  0xecd(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <log@plt>
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1208 <lnabova+0xf8>
movsd  -0x20(%rbp),%xmm0
movsd  0xe83(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe59(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  0xe49(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xe45(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe25(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe0d(%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):
<lnabova>:
push   %rax
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
movapd 0xedf(%rip),%xmm3
andpd  %xmm2,%xmm3
ucomisd 0xee3(%rip),%xmm3
jbe    114c <lnabova+0x3c>
addsd  0xf01(%rip),%xmm2
cvttsd2si %xmm2,%edi
movsd  %xmm0,(%rsp)
call   1030 <log@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret
movsd  0xec4(%rip),%xmm3
movapd %xmm2,%xmm4
addsd  %xmm3,%xmm4
divsd  %xmm4,%xmm2
mulsd  %xmm2,%xmm2
movsd  0xeb4(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xeb0(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xeac(%rip),%xmm0
divsd  %xmm4,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @lnabova(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 = call double @llvm.fabs.f64(double %11)
%13 = fcmp ogt double %12, 1.000000e-02
br i1 %13, label %14, label %21
14: ; preds = %2
%15 = load double, double* %6
%16 = fadd double 1.000000e+00, %15
%17 = fptosi double %16 to i32
%18 = call double @log(i32 %17)
%19 = load double, double* %4
%20 = fdiv double %18, %19
store double %20, double* %3
br label %40
21: ; preds = %2
%22 = load double, double* %6
%23 = load double, double* %6
%24 = fadd double 2.000000e+00, %23
%25 = fdiv double %22, %24
store double %25, double* %7
%26 = load double, double* %7
%27 = load double, double* %7
%28 = fmul double %27, %26
store double %28, double* %7
%29 = load double, double* %5
%30 = load double, double* %6
%31 = fadd double 2.000000e+00, %30
%32 = fdiv double %29, %31
%33 = load double, double* %7
%34 = load double, double* %7
%35 = load double, double* %7
%36 = call double @llvm.fmuladd.f64(double %35, double 0x3FD2492492492492, double 4.000000e-01)
%37 = call double @llvm.fmuladd.f64(double %34, double %36, double 0x3FE5555555555555)
%38 = call double @llvm.fmuladd.f64(double %33, double %37, double 2.000000e+00)
%39 = fmul double %32, %38
store double %39, double* %3
br label %40
40: ; preds = %21, %14
%41 = load double, double* %3
ret double %41
}

LLVM IR (-O2):
define double @lnabova(double %0, double %1) {
%3 = fmul double %0, %1
%4 = tail call double @llvm.fabs.f64(double %3)
%5 = fcmp ogt double %4, 1.000000e-02
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = fadd double %3, 1.000000e+00
%8 = fptosi double %7 to i32
%9 = tail call double @log(i32 %8)
%10 = fdiv double %9, %0
br label %20
11: ; preds = %2
%12 = fadd double %3, 2.000000e+00
%13 = fdiv double %3, %12
%14 = fmul double %13, %13
%15 = fdiv double %1, %12
%16 = tail call double @llvm.fmuladd.f64(double %14, double 0x3FD2492492492492, double 4.000000e-01)
%17 = tail call double @llvm.fmuladd.f64(double %14, double %16, double 0x3FE5555555555555)
%18 = tail call double @llvm.fmuladd.f64(double %14, double %17, double 2.000000e+00)
%19 = fmul double %15, %18
br label %20
20: ; preds = %11, %6
%21 = phi double [ %10, %6 ], [ %19, %11 ]
ret double %21
}