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


x86 assembly (clang, -O0):
<invalidFunctionArg_log>:
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   1030 <logf@plt>
movss  0xea8(%rip),%xmm0
call   1030 <logf@plt>
movss  -0x4(%rbp),%xmm0
call   1030 <logf@plt>
mov    0x2e7a(%rip),%rax
movss  (%rax),%xmm0
call   1030 <logf@plt>
xorps  %xmm0,%xmm0
call   1050 <log@plt>
movsd  0xe81(%rip),%xmm0
call   1050 <log@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <log@plt>
mov    0x2e33(%rip),%rax
movsd  (%rax),%xmm0
call   1050 <log@plt>
mov    %rsp,%rax
fldz
fstpt  (%rax)
call   1040 <logl@plt>
mov    %rsp,%rax
fldt   0xe55(%rip)
fstpt  (%rax)
call   1040 <logl@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <logl@plt>
mov    0x2e02(%rip),%rax
fldt   (%rax)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <logl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invalidFunctionArg_log>:
sub    $0x38,%rsp
movsd  %xmm1,0x20(%rsp)
movss  %xmm0,0x1c(%rsp)
fldt   0x40(%rsp)
fstpt  0x2c(%rsp)
xorps  %xmm0,%xmm0
call   1030 <logf@plt>
movss  0xea8(%rip),%xmm0
call   1030 <logf@plt>
movss  0x1c(%rsp),%xmm0
call   1030 <logf@plt>
mov    0x2e79(%rip),%rax
movss  (%rax),%xmm0
call   1030 <logf@plt>
xorps  %xmm0,%xmm0
call   1050 <log@plt>
movsd  0xe80(%rip),%xmm0
call   1050 <log@plt>
movsd  0x20(%rsp),%xmm0
call   1050 <log@plt>
mov    0x2e39(%rip),%rax
movsd  (%rax),%xmm0
call   1050 <log@plt>
fldz
fld    %st(0)
fstpt  0x20(%rsp)
fstpt  (%rsp)
call   1040 <logl@plt>
fldt   0xe52(%rip)
fstpt  (%rsp)
call   1040 <logl@plt>
fldt   0x2c(%rsp)
fstpt  (%rsp)
call   1040 <logl@plt>
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1040 <logl@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_log(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 @logf(float 0.000000e+00)
%8 = call i32 @logf(float 0x36A0000000000000)
%9 = load float, float* %4
%10 = call i32 @logf(float %9)
%11 = load float, float* @FLT_MAX
%12 = call i32 @logf(float %11)
%13 = call i32 @log(double 0.000000e+00)
%14 = call i32 @log(double 4.940660e-324)
%15 = load double, double* %5
%16 = call i32 @log(double %15)
%17 = load double, double* @DBL_MAX
%18 = call i32 @log(double %17)
%19 = call i32 @logl(x86_fp80 0xK00000000000000000000)
%20 = call i32 @logl(x86_fp80 0xK3BCD800006035EDFEDBF)
%21 = load x86_fp80, x86_fp80* %6
%22 = call i32 @logl(x86_fp80 %21)
%23 = load x86_fp80, x86_fp80* @LDBL_MAX
%24 = call i32 @logl(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_log(float %0, double %1, x86_fp80 %2) {
%4 = tail call i32 @logf(float 0.000000e+00)
%5 = tail call i32 @logf(float 0x36A0000000000000)
%6 = tail call i32 @logf(float %0)
%7 = load float, float* @FLT_MAX
%8 = tail call i32 @logf(float %7)
%9 = tail call i32 @log(double 0.000000e+00)
%10 = tail call i32 @log(double 4.940660e-324)
%11 = tail call i32 @log(double %1)
%12 = load double, double* @DBL_MAX
%13 = tail call i32 @log(double %12)
%14 = tail call i32 @logl(x86_fp80 0xK00000000000000000000)
%15 = tail call i32 @logl(x86_fp80 0xK3BCD800006035EDFEDBF)
%16 = tail call i32 @logl(x86_fp80 %2)
%17 = tail call i32 @logl(x86_fp80 0xK00000000000000000000)
ret void
}