#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 */
double DBL_MAX;
float FLT_MAX;
long double const LDBL_MAX;
int /*<<< orphan*/ log2(double);
int /*<<< orphan*/ log2f(float);
int /*<<< orphan*/ log2l(long double const);
void invalidFunctionArg_log2(float f, double d, const long double ld) {
  (void)log2f(0.0f);
  (void)log2f(1.4013e-45f);
  (void)log2f(f);
  (void)log2f(FLT_MAX);
  (void)log2(0.0);
  (void)log2(4.94066e-324);
  (void)log2(d);
  (void)log2(DBL_MAX);
  (void)log2l(0.0L);
  (void)log2l(4.94066e-324L);
  (void)log2l(ld);
  (void)log2l(LDBL_MAX);
}


x86 assembly (clang, -O0):
<invalidFunctionArg_log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
movss  %xmm0,-0x4(%rbp)
movsd  %xmm1,-0x10(%rbp)
fstpt  -0x20(%rbp)
xorps  %xmm0,%xmm0
call   1050 <log2f@plt>
movss  0xea8(%rip),%xmm0
call   1050 <log2f@plt>
movss  -0x4(%rbp),%xmm0
call   1050 <log2f@plt>
mov    0x2e7a(%rip),%rax
movss  (%rax),%xmm0
call   1050 <log2f@plt>
xorps  %xmm0,%xmm0
call   1030 <log2@plt>
movsd  0xe81(%rip),%xmm0
call   1030 <log2@plt>
movsd  -0x10(%rbp),%xmm0
call   1030 <log2@plt>
mov    0x2e33(%rip),%rax
movsd  (%rax),%xmm0
call   1030 <log2@plt>
mov    %rsp,%rax
fldz
fstpt  (%rax)
call   1040 <log2l@plt>
mov    %rsp,%rax
fldt   0xe55(%rip)
fstpt  (%rax)
call   1040 <log2l@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <log2l@plt>
mov    0x2e02(%rip),%rax
fldt   (%rax)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <log2l@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invalidFunctionArg_log2>:
sub    $0x38,%rsp
movsd  %xmm1,0x20(%rsp)
movss  %xmm0,0x1c(%rsp)
fldt   0x40(%rsp)
fstpt  0x2c(%rsp)
xorps  %xmm0,%xmm0
call   1050 <log2f@plt>
movss  0xea8(%rip),%xmm0
call   1050 <log2f@plt>
movss  0x1c(%rsp),%xmm0
call   1050 <log2f@plt>
mov    0x2e79(%rip),%rax
movss  (%rax),%xmm0
call   1050 <log2f@plt>
xorps  %xmm0,%xmm0
call   1030 <log2@plt>
movsd  0xe80(%rip),%xmm0
call   1030 <log2@plt>
movsd  0x20(%rsp),%xmm0
call   1030 <log2@plt>
mov    0x2e39(%rip),%rax
movsd  (%rax),%xmm0
call   1030 <log2@plt>
fldz
fld    %st(0)
fstpt  0x20(%rsp)
fstpt  (%rsp)
call   1040 <log2l@plt>
fldt   0xe52(%rip)
fstpt  (%rsp)
call   1040 <log2l@plt>
fldt   0x2c(%rsp)
fstpt  (%rsp)
call   1040 <log2l@plt>
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1040 <log2l@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@FLT_MAX = global float 0.000000e+00
@DBL_MAX = global double 0.000000e+00
@LDBL_MAX = constant x86_fp80 0xK00000000000000000000
define void @invalidFunctionArg_log2(float %0, double %1, x86_fp80 %2) {
%4 = alloca float
%5 = alloca double
%6 = alloca x86_fp80
store float %0, float* %4
store double %1, double* %5
store x86_fp80 %2, x86_fp80* %6
%7 = call i32 @log2f(float 0.000000e+00)
%8 = call i32 @log2f(float 0x36A0000000000000)
%9 = load float, float* %4
%10 = call i32 @log2f(float %9)
%11 = load float, float* @FLT_MAX
%12 = call i32 @log2f(float %11)
%13 = call i32 @log2(double 0.000000e+00)
%14 = call i32 @log2(double 4.940660e-324)
%15 = load double, double* %5
%16 = call i32 @log2(double %15)
%17 = load double, double* @DBL_MAX
%18 = call i32 @log2(double %17)
%19 = call i32 @log2l(x86_fp80 0xK00000000000000000000)
%20 = call i32 @log2l(x86_fp80 0xK3BCD800006035EDFEDBF)
%21 = load x86_fp80, x86_fp80* %6
%22 = call i32 @log2l(x86_fp80 %21)
%23 = load x86_fp80, x86_fp80* @LDBL_MAX
%24 = call i32 @log2l(x86_fp80 %23)
ret void
}

LLVM IR (-O2):
@FLT_MAX = global float 0.000000e+00
@DBL_MAX = global double 0.000000e+00
@LDBL_MAX = constant x86_fp80 0xK00000000000000000000
define void @invalidFunctionArg_log2(float %0, double %1, x86_fp80 %2) {
%4 = tail call i32 @log2f(float 0.000000e+00)
%5 = tail call i32 @log2f(float 0x36A0000000000000)
%6 = tail call i32 @log2f(float %0)
%7 = load float, float* @FLT_MAX
%8 = tail call i32 @log2f(float %7)
%9 = tail call i32 @log2(double 0.000000e+00)
%10 = tail call i32 @log2(double 4.940660e-324)
%11 = tail call i32 @log2(double %1)
%12 = load double, double* @DBL_MAX
%13 = tail call i32 @log2(double %12)
%14 = tail call i32 @log2l(x86_fp80 0xK00000000000000000000)
%15 = tail call i32 @log2l(x86_fp80 0xK3BCD800006035EDFEDBF)
%16 = tail call i32 @log2l(x86_fp80 %2)
%17 = tail call i32 @log2l(x86_fp80 0xK00000000000000000000)
ret void
}