#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 */
scalar_t__ stdlib_base_is_nanf(float const);
float stdlib_base_kronecker_deltaf(const float i, const float j) {
  if (stdlib_base_is_nanf(i) || stdlib_base_is_nanf(j)) {
    return 0.0f / 0.0f;
  }
  if (i == j) {
    return 1.0f;
  }
  return 0.0f;
}


x86 assembly (clang, -O0):
<stdlib_base_kronecker_deltaf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <stdlib_base_is_nanf@plt>
cmp    $0x0,%rax
jne    114a <stdlib_base_kronecker_deltaf+0x3a>
movss  -0xc(%rbp),%xmm0
call   1030 <stdlib_base_is_nanf@plt>
cmp    $0x0,%rax
je     115c <stdlib_base_kronecker_deltaf+0x4c>
movss  0xeb2(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    118b <stdlib_base_kronecker_deltaf+0x7b>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    1183 <stdlib_base_kronecker_deltaf+0x73>
jp     1183 <stdlib_base_kronecker_deltaf+0x73>
movss  0xe87(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    118b <stdlib_base_kronecker_deltaf+0x7b>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_base_kronecker_deltaf>:
sub    $0x28,%rsp
movss  %xmm1,0xc(%rsp)
movaps %xmm0,0x10(%rsp)
call   1030 <stdlib_base_is_nanf@plt>
movss  0xed4(%rip),%xmm0
test   %rax,%rax
je     1136 <stdlib_base_kronecker_deltaf+0x26>
add    $0x28,%rsp
ret
movss  0xc(%rsp),%xmm0
call   1030 <stdlib_base_is_nanf@plt>
movss  0xeb7(%rip),%xmm0
test   %rax,%rax
jne    1131 <stdlib_base_kronecker_deltaf+0x21>
movaps 0x10(%rsp),%xmm1
cmpeqss 0xc(%rsp),%xmm1
movss  0xea2(%rip),%xmm0
andps  %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define float @stdlib_base_kronecker_deltaf(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 = call i64 @stdlib_base_is_nanf(float %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load float, float* %5
%11 = call i64 @stdlib_base_is_nanf(float %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9, %2
store float 0x7FF8000000000000, float* %3
br label %20
14: ; preds = %9
%15 = load float, float* %4
%16 = load float, float* %5
%17 = fcmp oeq float %15, %16
br i1 %17, label %18, label %19
18: ; preds = %14
store float 1.000000e+00, float* %3
br label %20
19: ; preds = %14
store float 0.000000e+00, float* %3
br label %20
20: ; preds = %19, %18, %13
%21 = load float, float* %3
ret float %21
}

LLVM IR (-O2):
define float @stdlib_base_kronecker_deltaf(float %0, float %1) {
%3 = tail call i64 @stdlib_base_is_nanf(float %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = tail call i64 @stdlib_base_is_nanf(float %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = fcmp oeq float %0, %1
%10 = select i1 %9, float 1.000000e+00, float 0.000000e+00
br label %11
11: ; preds = %8, %2, %5
%12 = phi float [ 0x7FF8000000000000, %5 ], [ 0x7FF8000000000000, %2 ], [ %10, %8 ]
ret float %12
}