#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 const _get_float();
float _get_float_random_interval(const float *min, const float *max) {
  if (*min > *max)
    return _get_float() * (*min - *max) + *max;
  else
    return _get_float() * (*max - *min) + *min;
}


x86 assembly (clang, -O0):
<_get_float_random_interval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss (%rax),%xmm0
jbe    1166 <_get_float_random_interval+0x56>
mov    $0x0,%al
call   1030 <_get_float@plt>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x18(%rbp),%rax
subss  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1192 <_get_float_random_interval+0x82>
mov    $0x0,%al
call   1030 <_get_float@plt>
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x10(%rbp),%rax
subss  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_float_random_interval>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movss  (%rdi),%xmm0
movss  %xmm0,0x4(%rsp)
movss  (%rsi),%xmm0
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <_get_float@plt>
movss  0x4(%rsp),%xmm1
ucomiss (%rsp),%xmm1
jbe    114b <_get_float_random_interval+0x3b>
movss  (%rbx),%xmm1
movss  (%r14),%xmm2
jmp    1154 <_get_float_random_interval+0x44>
movss  (%r14),%xmm1
movss  (%rbx),%xmm2
subss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
addss  %xmm2,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define float @_get_float_random_interval(float* %0, float* %1) {
%3 = alloca float
%4 = alloca float*
%5 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
%6 = load float*, float** %4
%7 = load float, float* %6
%8 = load float*, float** %5
%9 = load float, float* %8
%10 = fcmp ogt float %7, %9
br i1 %10, label %11, label %21
11: ; preds = %2
%12 = call float (...) @_get_float()
%13 = load float*, float** %4
%14 = load float, float* %13
%15 = load float*, float** %5
%16 = load float, float* %15
%17 = fsub float %14, %16
%18 = load float*, float** %5
%19 = load float, float* %18
%20 = call float @llvm.fmuladd.f32(float %12, float %17, float %19)
store float %20, float* %3
br label %31
21: ; preds = %2
%22 = call float (...) @_get_float()
%23 = load float*, float** %5
%24 = load float, float* %23
%25 = load float*, float** %4
%26 = load float, float* %25
%27 = fsub float %24, %26
%28 = load float*, float** %4
%29 = load float, float* %28
%30 = call float @llvm.fmuladd.f32(float %22, float %27, float %29)
store float %30, float* %3
br label %31
31: ; preds = %21, %11
%32 = load float, float* %3
ret float %32
}

LLVM IR (-O2):
define float @_get_float_random_interval(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fcmp ogt float %3, %4
%6 = tail call float (...) @_get_float()
br i1 %5, label %7, label %12
7: ; preds = %2
%8 = load float, float* %0
%9 = load float, float* %1
%10 = fsub float %8, %9
%11 = tail call float @llvm.fmuladd.f32(float %6, float %10, float %9)
br label %17
12: ; preds = %2
%13 = load float, float* %1
%14 = load float, float* %0
%15 = fsub float %13, %14
%16 = tail call float @llvm.fmuladd.f32(float %6, float %15, float %14)
br label %17
17: ; preds = %12, %7
%18 = phi float [ %11, %7 ], [ %16, %12 ]
ret float %18
}