#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 airLogBesselI0(double);
double log(double);
double airLogRician(double mes, double tru, double sig) {
  double lb, ss;
  ss = sig * sig;
  lb = airLogBesselI0(mes * tru / ss);
  return lb + log(mes / ss) - (mes * mes + tru * tru) / (2 * ss);
}


x86 assembly (clang, -O0):
<airLogRician>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1030 <airLogBesselI0@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm2
mulsd  -0x10(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  0xe58(%rip),%xmm2
mulsd  -0x28(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<airLogRician>:
sub    $0x28,%rsp
movsd  %xmm1,0x20(%rsp)
movsd  %xmm0,0x8(%rsp)
mulsd  %xmm2,%xmm2
movsd  %xmm2,0x10(%rsp)
mulsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
call   1030 <airLogBesselI0@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0x10(%rsp),%xmm0
call   1040 <log@plt>
addsd  0x18(%rsp),%xmm0
movsd  0x20(%rsp),%xmm2
mulsd  %xmm2,%xmm2
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
movsd  0x10(%rsp),%xmm2
addsd  %xmm2,%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @airLogRician(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %6
%10 = load double, double* %6
%11 = fmul double %9, %10
store double %11, double* %8
%12 = load double, double* %4
%13 = load double, double* %5
%14 = fmul double %12, %13
%15 = load double, double* %8
%16 = fdiv double %14, %15
%17 = call double @airLogBesselI0(double %16)
store double %17, double* %7
%18 = load double, double* %7
%19 = load double, double* %4
%20 = load double, double* %8
%21 = fdiv double %19, %20
%22 = call double @log(double %21)
%23 = fadd double %18, %22
%24 = load double, double* %4
%25 = load double, double* %4
%26 = load double, double* %5
%27 = load double, double* %5
%28 = fmul double %26, %27
%29 = call double @llvm.fmuladd.f64(double %24, double %25, double %28)
%30 = load double, double* %8
%31 = fmul double 2.000000e+00, %30
%32 = fdiv double %29, %31
%33 = fsub double %23, %32
ret double %33
}

LLVM IR (-O2):
define double @airLogRician(double %0, double %1, double %2) {
%4 = fmul double %2, %2
%5 = fmul double %0, %1
%6 = fdiv double %5, %4
%7 = tail call double @airLogBesselI0(double %6)
%8 = fdiv double %0, %4
%9 = tail call double @log(double %8)
%10 = fadd double %7, %9
%11 = fmul double %1, %1
%12 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %11)
%13 = fmul double %4, 2.000000e+00
%14 = fdiv double %12, %13
%15 = fsub double %10, %14
ret double %15
}