#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 __builtin_inff();
int /*<<< orphan*/ df(float, float);
int /*<<< orphan*/ dfmul_f2_f2_f(int /*<<< orphan*/, float);
float expkf(int /*<<< orphan*/);
scalar_t__ xisminff(float);
scalar_t__ xispinff(float);
float xexp2f(float a) {
  float u = expkf(dfmul_f2_f2_f(
      df(0.69314718246459960938f, -1.904654323148236017e-09f), a));
  if (xispinff(a))
    u = __builtin_inff();
  if (xisminff(a))
    u = 0;
  return u;
}


x86 assembly (clang, -O0):
<xexp2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xe9b(%rip),%xmm0
movss  0xe97(%rip),%xmm1
call   1070 <df@plt>
mov    %eax,%edi
movss  -0x4(%rbp),%xmm0
call   1050 <dfmul_f2_f2_f@plt>
mov    %eax,%edi
call   1030 <expkf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1060 <xispinff@plt>
cmp    $0x0,%rax
je     11ab <xexp2f+0x5b>
movss  0xe62(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <xisminff@plt>
cmp    $0x0,%rax
je     11c7 <xexp2f+0x77>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xexp2f>:
push   %rax
movss  %xmm0,(%rsp)
movss  0xea2(%rip),%xmm0
movss  0xe9e(%rip),%xmm1
call   1070 <df@plt>
mov    %eax,%edi
movss  (%rsp),%xmm0
call   1050 <dfmul_f2_f2_f@plt>
mov    %eax,%edi
call   1030 <expkf@plt>
movss  %xmm0,0x4(%rsp)
movss  (%rsp),%xmm0
call   1060 <xispinff@plt>
test   %rax,%rax
je     11a1 <xexp2f+0x51>
movss  0xe6d(%rip),%xmm0
movss  %xmm0,0x4(%rsp)
movss  (%rsp),%xmm0
call   1040 <xisminff@plt>
test   %rax,%rax
movss  0x4(%rsp),%xmm0
je     11b9 <xexp2f+0x69>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @xexp2f(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = call i32 @df(float 0x3FE62E4300000000, float 0xBE205C6100000000)
%5 = load float, float* %2
%6 = call i32 @dfmul_f2_f2_f(i32 %4, float %5)
%7 = call float @expkf(i32 %6)
store float %7, float* %3
%8 = load float, float* %2
%9 = call i64 @xispinff(float %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store float 0x7FF0000000000000, float* %3
br label %12
12: ; preds = %11, %1
%13 = load float, float* %2
%14 = call i64 @xisminff(float %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
store float 0.000000e+00, float* %3
br label %17
17: ; preds = %16, %12
%18 = load float, float* %3
ret float %18
}

LLVM IR (-O2):
define float @xexp2f(float %0) {
%2 = tail call i32 @df(float 0x3FE62E4300000000, float 0xBE205C6100000000)
%3 = tail call i32 @dfmul_f2_f2_f(i32 %2, float %0)
%4 = tail call float @expkf(i32 %3)
%5 = tail call i64 @xispinff(float %0)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, float %4, float 0x7FF0000000000000
%8 = tail call i64 @xisminff(float %0)
%9 = icmp eq i64 %8, 0
%10 = select i1 %9, float %7, float 0.000000e+00
ret float %10
}