#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 Tanh(double);
double log(int);
double PupilDia(double Age, double B) {
  return (0.534 - 0.00211 * Age -
          (0.236 - 0.00127 * Age) * Tanh(0.4 * log(B) / log(10) - 2.2)) *
         10;
}


x86 assembly (clang, -O0):
<PupilDia>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xee9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee5(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
cvttsd2si -0x10(%rbp),%edi
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  0xe85(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    $0xa,%edi
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  0xe56(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <Tanh@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe11(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PupilDia>:
sub    $0x18,%rsp
movsd  0xed4(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xed0(%rip),%xmm2
movsd  %xmm2,0x10(%rsp)
mulsd  0xeca(%rip),%xmm0
addsd  0xeca(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
cvttsd2si %xmm1,%edi
call   1040 <log@plt>
mulsd  0xebb(%rip),%xmm0
movsd  %xmm0,(%rsp)
mov    $0xa,%edi
call   1040 <log@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
addsd  0xea3(%rip),%xmm1
movapd %xmm1,%xmm0
call   1030 <Tanh@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xe8a(%rip),%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @PupilDia(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call double @llvm.fmuladd.f64(double -2.110000e-03, double %5, double 5.340000e-01)
%7 = load double, double* %3
%8 = call double @llvm.fmuladd.f64(double -1.270000e-03, double %7, double 2.360000e-01)
%9 = load double, double* %4
%10 = fptosi double %9 to i32
%11 = call double @log(i32 %10)
%12 = fmul double 4.000000e-01, %11
%13 = call double @log(i32 10)
%14 = fdiv double %12, %13
%15 = fsub double %14, 2.200000e+00
%16 = call double @Tanh(double %15)
%17 = fneg double %8
%18 = call double @llvm.fmuladd.f64(double %17, double %16, double %6)
%19 = fmul double %18, 1.000000e+01
ret double %19
}

LLVM IR (-O2):
define double @PupilDia(double %0, double %1) {
%3 = tail call double @llvm.fmuladd.f64(double %0, double -2.110000e-03, double 5.340000e-01)
%4 = tail call double @llvm.fmuladd.f64(double %0, double -1.270000e-03, double 2.360000e-01)
%5 = fptosi double %1 to i32
%6 = tail call double @log(i32 %5)
%7 = fmul double %6, 4.000000e-01
%8 = tail call double @log(i32 10)
%9 = fdiv double %7, %8
%10 = fadd double %9, -2.200000e+00
%11 = tail call double @Tanh(double %10)
%12 = fneg double %4
%13 = tail call double @llvm.fmuladd.f64(double %12, double %11, double %3)
%14 = fmul double %13, 1.000000e+01
ret double %14
}