#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 */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void __hv_and_f(float bIn0, float bIn1, float *bOut) {
  if (bIn0 == 0.0f || bIn1 == 0.0f)
    *bOut = 0.0f;
  else if (bIn0 == 1.0f)
    *bOut = bIn1;
  else if (bIn1 == 1.0f)
    *bOut = bIn0;
  else
    assert(0);
}


x86 assembly (clang, -O0):
<__hv_and_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1142 <__hv_and_f+0x32>
jp     1142 <__hv_and_f+0x32>
jmp    1159 <__hv_and_f+0x49>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1169 <__hv_and_f+0x59>
jp     1169 <__hv_and_f+0x59>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
jmp    11d6 <__hv_and_f+0xc6>
movss  -0x4(%rbp),%xmm0
movss  0xe8a(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1197 <__hv_and_f+0x87>
jp     1197 <__hv_and_f+0x87>
movss  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
jmp    11d1 <__hv_and_f+0xc1>
movss  -0x8(%rbp),%xmm0
movss  0xe5c(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    11c5 <__hv_and_f+0xb5>
jp     11c5 <__hv_and_f+0xb5>
movss  -0x4(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
jmp    11cc <__hv_and_f+0xbc>
xor    %edi,%edi
call   1030 <assert@plt>
jmp    11d1 <__hv_and_f+0xc1>
jmp    11d6 <__hv_and_f+0xc6>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hv_and_f>:
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
jne    111a <__hv_and_f+0xa>
jnp    1131 <__hv_and_f+0x21>
ucomiss %xmm2,%xmm1
jne    1121 <__hv_and_f+0x11>
jnp    1131 <__hv_and_f+0x21>
ucomiss 0xed8(%rip),%xmm0
jne    1138 <__hv_and_f+0x28>
jp     1138 <__hv_and_f+0x28>
movss  %xmm1,(%rdi)
ret
movl   $0x0,(%rdi)
ret
ucomiss 0xec1(%rip),%xmm1
jne    1148 <__hv_and_f+0x38>
jp     1148 <__hv_and_f+0x38>
movss  %xmm0,(%rdi)
ret
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @__hv_and_f(float %0, float %1, float* %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float*
store float %0, float* %4
store float %1, float* %5
store float* %2, float** %6
%7 = load float, float* %4
%8 = fcmp oeq float %7, 0.000000e+00
br i1 %8, label %12, label %9
9: ; preds = %3
%10 = load float, float* %5
%11 = fcmp oeq float %10, 0.000000e+00
br i1 %11, label %12, label %14
12: ; preds = %9, %3
%13 = load float*, float** %6
store float 0.000000e+00, float* %13
br label %30
14: ; preds = %9
%15 = load float, float* %4
%16 = fcmp oeq float %15, 1.000000e+00
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load float, float* %5
%19 = load float*, float** %6
store float %18, float* %19
br label %29
20: ; preds = %14
%21 = load float, float* %5
%22 = fcmp oeq float %21, 1.000000e+00
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load float, float* %4
%25 = load float*, float** %6
store float %24, float* %25
br label %28
26: ; preds = %20
%27 = call i32 @assert(i32 0)
br label %28
28: ; preds = %26, %23
br label %29
29: ; preds = %28, %17
br label %30
30: ; preds = %29, %12
ret void
}

LLVM IR (-O2):
define void @__hv_and_f(float %0, float %1, float* nocapture writeonly %2) {
%4 = fcmp oeq float %0, 0.000000e+00
%5 = fcmp oeq float %1, 0.000000e+00
%6 = or i1 %4, %5
br i1 %6, label %7, label %8
7: ; preds = %3
store float 0.000000e+00, float* %2
br label %16
8: ; preds = %3
%9 = fcmp oeq float %0, 1.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %8
store float %1, float* %2
br label %16
11: ; preds = %8
%12 = fcmp oeq float %1, 1.000000e+00
br i1 %12, label %13, label %14
13: ; preds = %11
store float %0, float* %2
br label %16
14: ; preds = %11
%15 = tail call i32 @assert(i32 0)
br label %16
16: ; preds = %10, %14, %13, %7
ret void
}