#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 FLT_MAX;
float FLT_MIN;
float INFINITY;
float NAN;
int /*<<< orphan*/ checkDivide(float);
int /*<<< orphan*/ printf(char *);
int main(void) {
  checkDivide(0.0f);
  checkDivide(-0.0f);
  printf("\n");
  checkDivide(FLT_MIN);
  checkDivide(FLT_MIN / 4.0f);
  printf("\n");
  checkDivide(FLT_MAX);
  checkDivide(INFINITY);
  checkDivide(-INFINITY);
  checkDivide(NAN);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
call   1040 <checkDivide@plt>
movss  0xec5(%rip),%xmm0
call   1040 <checkDivide@plt>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e81(%rip),%rax
movss  (%rax),%xmm0
call   1040 <checkDivide@plt>
mov    0x2e71(%rip),%rax
movss  (%rax),%xmm0
movss  0xe8d(%rip),%xmm1
divss  %xmm1,%xmm0
call   1040 <checkDivide@plt>
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e41(%rip),%rax
movss  (%rax),%xmm0
call   1040 <checkDivide@plt>
mov    0x2e41(%rip),%rax
movss  (%rax),%xmm0
call   1040 <checkDivide@plt>
mov    0x2e31(%rip),%rax
movss  (%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1040 <checkDivide@plt>
mov    0x2e2c(%rip),%rax
movss  (%rax),%xmm0
call   1040 <checkDivide@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xorps  %xmm0,%xmm0
call   1040 <checkDivide@plt>
movss  0xecf(%rip),%xmm0
call   1040 <checkDivide@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e91(%rip),%rbx
movss  (%rbx),%xmm0
call   1040 <checkDivide@plt>
movss  (%rbx),%xmm0
mulss  0xea8(%rip),%xmm0
call   1040 <checkDivide@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e5e(%rip),%rax
movss  (%rax),%xmm0
call   1040 <checkDivide@plt>
mov    0x2e5e(%rip),%rbx
movss  (%rbx),%xmm0
call   1040 <checkDivide@plt>
movss  (%rbx),%xmm0
xorps  0xe7a(%rip),%xmm0
call   1040 <checkDivide@plt>
mov    0x2e56(%rip),%rax
movss  (%rax),%xmm0
call   1040 <checkDivide@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@FLT_MIN = global float 0.000000e+00
@FLT_MAX = global float 0.000000e+00
@INFINITY = global float 0.000000e+00
@NAN = global float 0.000000e+00
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @checkDivide(float 0.000000e+00)
%3 = call i32 @checkDivide(float -0.000000e+00)
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = load float, float* @FLT_MIN
%6 = call i32 @checkDivide(float %5)
%7 = load float, float* @FLT_MIN
%8 = fdiv float %7, 4.000000e+00
%9 = call i32 @checkDivide(float %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = load float, float* @FLT_MAX
%12 = call i32 @checkDivide(float %11)
%13 = load float, float* @INFINITY
%14 = call i32 @checkDivide(float %13)
%15 = load float, float* @INFINITY
%16 = fneg float %15
%17 = call i32 @checkDivide(float %16)
%18 = load float, float* @NAN
%19 = call i32 @checkDivide(float %18)
ret i32 0
}

LLVM IR (-O2):
@FLT_MIN = global float 0.000000e+00
@FLT_MAX = global float 0.000000e+00
@INFINITY = global float 0.000000e+00
@NAN = global float 0.000000e+00
define i32 @main() {
%1 = tail call i32 @checkDivide(float 0.000000e+00)
%2 = tail call i32 @checkDivide(float -0.000000e+00)
%3 = tail call i32 @putchar(i32 10)
%4 = load float, float* @FLT_MIN
%5 = tail call i32 @checkDivide(float %4)
%6 = load float, float* @FLT_MIN
%7 = fmul float %6, 2.500000e-01
%8 = tail call i32 @checkDivide(float %7)
%9 = tail call i32 @putchar(i32 10)
%10 = load float, float* @FLT_MAX
%11 = tail call i32 @checkDivide(float %10)
%12 = load float, float* @INFINITY
%13 = tail call i32 @checkDivide(float %12)
%14 = load float, float* @INFINITY
%15 = fneg float %14
%16 = tail call i32 @checkDivide(float %15)
%17 = load float, float* @NAN
%18 = tail call i32 @checkDivide(float %17)
ret i32 0
}