#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 DBL_MIN;
double ighmm_rand_normal_density_trunc(double, double, double, double);
double ighmm_gtail_pmue(double mue, double A, double B, double eps) {
  double feps, u, Atil, Btil;
  Atil = A + eps;
  Btil = B + eps * A;
  u = Btil - mue * Atil;
  if (u <= DBL_MIN)
    return (mue - A);
  feps = ighmm_rand_normal_density_trunc(-eps, mue, u, -eps);
  return (A - mue - u * feps);
}


x86 assembly (clang, -O0):
<ighmm_gtail_pmue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm1
mov    0x2e4a(%rip),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     11b8 <ighmm_gtail_pmue+0xa8>
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    123c <ighmm_gtail_pmue+0x12c>
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
call   1030 <ighmm_rand_normal_density_trunc@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ighmm_gtail_pmue>:
sub    $0x28,%rsp
movapd %xmm0,%xmm4
movapd %xmm1,%xmm0
addsd  %xmm3,%xmm0
movapd %xmm3,%xmm5
mulsd  %xmm1,%xmm5
addsd  %xmm2,%xmm5
mulsd  %xmm4,%xmm0
subsd  %xmm0,%xmm5
mov    0x2ea5(%rip),%rax
movsd  (%rax),%xmm0
ucomisd %xmm5,%xmm0
jae    118d <ighmm_gtail_pmue+0x7d>
xorpd  0xeb3(%rip),%xmm3
movapd %xmm3,%xmm0
movsd  %xmm1,0x8(%rsp)
movapd %xmm4,%xmm1
movapd %xmm5,%xmm2
movsd  %xmm4,(%rsp)
movapd %xmm5,0x10(%rsp)
call   1030 <ighmm_rand_normal_density_trunc@plt>
movsd  0x8(%rsp),%xmm1
subsd  (%rsp),%xmm1
mulsd  0x10(%rsp),%xmm0
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret
subsd  %xmm1,%xmm4
movapd %xmm4,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
@DBL_MIN = global double 0.000000e+00
define double @ighmm_gtail_pmue(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
%14 = load double, double* %7
%15 = load double, double* %9
%16 = fadd double %14, %15
store double %16, double* %12
%17 = load double, double* %8
%18 = load double, double* %9
%19 = load double, double* %7
%20 = call double @llvm.fmuladd.f64(double %18, double %19, double %17)
store double %20, double* %13
%21 = load double, double* %13
%22 = load double, double* %6
%23 = load double, double* %12
%24 = fneg double %22
%25 = call double @llvm.fmuladd.f64(double %24, double %23, double %21)
store double %25, double* %11
%26 = load double, double* %11
%27 = load double, double* @DBL_MIN
%28 = fcmp ole double %26, %27
br i1 %28, label %29, label %33
29: ; preds = %4
%30 = load double, double* %6
%31 = load double, double* %7
%32 = fsub double %30, %31
store double %32, double* %5
br label %48
33: ; preds = %4
%34 = load double, double* %9
%35 = fneg double %34
%36 = load double, double* %6
%37 = load double, double* %11
%38 = load double, double* %9
%39 = fneg double %38
%40 = call double @ighmm_rand_normal_density_trunc(double %35, double %36, double %37, double %39)
store double %40, double* %10
%41 = load double, double* %7
%42 = load double, double* %6
%43 = fsub double %41, %42
%44 = load double, double* %11
%45 = load double, double* %10
%46 = fneg double %44
%47 = call double @llvm.fmuladd.f64(double %46, double %45, double %43)
store double %47, double* %5
br label %48
48: ; preds = %33, %29
%49 = load double, double* %5
ret double %49
}

LLVM IR (-O2):
@DBL_MIN = global double 0.000000e+00
define double @ighmm_gtail_pmue(double %0, double %1, double %2, double %3) {
%5 = fadd double %1, %3
%6 = tail call double @llvm.fmuladd.f64(double %3, double %1, double %2)
%7 = fneg double %0
%8 = tail call double @llvm.fmuladd.f64(double %7, double %5, double %6)
%9 = load double, double* @DBL_MIN
%10 = fcmp ugt double %8, %9
br i1 %10, label %13, label %11
11: ; preds = %4
%12 = fsub double %0, %1
br label %19
13: ; preds = %4
%14 = fneg double %3
%15 = tail call double @ighmm_rand_normal_density_trunc(double %14, double %0, double %8, double %14)
%16 = fsub double %1, %0
%17 = fneg double %8
%18 = tail call double @llvm.fmuladd.f64(double %17, double %15, double %16)
br label %19
19: ; preds = %13, %11
%20 = phi double [ %12, %11 ], [ %18, %13 ]
ret double %20
}