#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 */
float igamf(float, float);
int /*<<< orphan*/ mtherrf(char *, int);
float gdtrf(float aa, float bb, float xx) {
  float a, b, x;
  a = aa;
  b = bb;
  x = xx;
  if (x < 0.0) {
    mtherrf("gdtrf", 1);
    return (0.0);
  }
  return (igamf(b, a * x));
}


x86 assembly (clang, -O0):
<gdtrf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1189 <gdtrf+0x69>
lea    0xe8e(%rip),%rdi
mov    $0x1,%esi
call   1040 <mtherrf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11a2 <gdtrf+0x82>
movss  -0x18(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
mulss  -0x1c(%rbp),%xmm1
call   1030 <igamf@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdtrf>:
movaps %xmm0,%xmm3
xorps  %xmm0,%xmm0
ucomiss %xmm2,%xmm0
jbe    1142 <gdtrf+0x22>
push   %rax
lea    0xecd(%rip),%rdi
mov    $0x1,%esi
call   1040 <mtherrf@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret
mulss  %xmm2,%xmm3
movaps %xmm1,%xmm0
movaps %xmm3,%xmm1
jmp    1030 <igamf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"gdtrf\00"
define float @gdtrf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%11 = load float, float* %5
store float %11, float* %8
%12 = load float, float* %6
store float %12, float* %9
%13 = load float, float* %7
store float %13, float* %10
%14 = load float, float* %10
%15 = fpext float %14 to double
%16 = fcmp olt double %15, 0.000000e+00
br i1 %16, label %17, label %19
17: ; preds = %3
%18 = call i32 @mtherrf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
store float 0.000000e+00, float* %4
br label %25
19: ; preds = %3
%20 = load float, float* %9
%21 = load float, float* %8
%22 = load float, float* %10
%23 = fmul float %21, %22
%24 = call float @igamf(float %20, float %23)
store float %24, float* %4
br label %25
25: ; preds = %19, %17
%26 = load float, float* %4
ret float %26
}

LLVM IR (-O2):
@.str = [6 x i8] c"gdtrf\00"
define float @gdtrf(float %0, float %1, float %2) {
%4 = fcmp olt float %2, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @mtherrf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
br label %10
7: ; preds = %3
%8 = fmul float %0, %2
%9 = tail call float @igamf(float %1, float %8)
br label %10
10: ; preds = %7, %5
%11 = phi float [ 0.000000e+00, %5 ], [ %9, %7 ]
ret float %11
}