#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 */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ abort();
float f(float, int);
int main(void) {
  float a[] = {100.0, 0.0, 0.0};
  int b[] = {0x7fffffff, 0x7fffffff / 100.0f, -0x7fffffff / 100.0f};
  float c[] = {0.0, -1.0, 1.0};
  int i;
  for (i = 0; i < (sizeof(a) / sizeof(float)); i++)
    if (f(a[i], b[i]) != c[i])
      abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0x1c(%rbp)
mov    0xec0(%rip),%eax
mov    %eax,-0x14(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeb8(%rip),%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x2c(%rbp)
movslq -0x2c(%rbp),%rax
cmp    $0x3,%rax
jae    11cb <main+0xab>
movslq -0x2c(%rbp),%rax
movss  -0x10(%rbp,%rax,4),%xmm0
movslq -0x2c(%rbp),%rax
mov    -0x1c(%rbp,%rax,4),%edi
call   1040 <f@plt>
movslq -0x2c(%rbp),%rax
ucomiss -0x28(%rbp,%rax,4),%xmm0
jne    11b1 <main+0x91>
jp     11b1 <main+0x91>
jmp    11b8 <main+0x98>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11bd <main+0x9d>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1172 <main+0x52>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xed7(%rip),%xmm0
mov    $0x7fffffff,%edi
call   1040 <f@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1171 <main+0x51>
jp     1171 <main+0x51>
xorps  %xmm0,%xmm0
mov    $0x147ae14,%edi
call   1040 <f@plt>
ucomiss 0xeb3(%rip),%xmm0
jne    1171 <main+0x51>
jp     1171 <main+0x51>
xorps  %xmm0,%xmm0
mov    $0xfeb851ec,%edi
call   1040 <f@plt>
ucomiss 0xe9f(%rip),%xmm0
jne    1171 <main+0x51>
jp     1171 <main+0x51>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.main.a = [3 x float] [float 1.000000e+02, float 0.000000e+00, float 0.000000e+00]
@__const.main.b = [3 x i32] [i32 2147483647, i32 21474836, i32 -21474836]
@__const.main.c = [3 x float] [float 0.000000e+00, float -1.000000e+00, float 1.000000e+00]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x float]
%3 = alloca [3 x i32]
%4 = alloca [3 x float]
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [3 x float]* %2 to i8*
%7 = bitcast [3 x i32]* %3 to i8*
%8 = bitcast [3 x float]* %4 to i8*
store i32 0, i32* %5
br label %9
9: ; preds = %31, %0
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = icmp ult i64 %11, 3
br i1 %12, label %13, label %34
13: ; preds = %9
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 %15
%17 = load float, float* %16
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = call float @f(float %17, i32 %21)
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 %24
%26 = load float, float* %25
%27 = fcmp une float %22, %26
br i1 %27, label %28, label %30
28: ; preds = %13
%29 = call i32 (...) @abort()
unreachable
30: ; preds = %13
br label %31
31: ; preds = %30
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %5
br label %9
34: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call float @f(float 1.000000e+02, i32 2147483647)
%2 = fcmp une float %1, 0.000000e+00
br i1 %2, label %10, label %3
3: ; preds = %0
%4 = tail call float @f(float 0.000000e+00, i32 21474836)
%5 = fcmp une float %4, -1.000000e+00
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call float @f(float 0.000000e+00, i32 -21474836)
%8 = fcmp une float %7, 1.000000e+00
br i1 %8, label %10, label %9
9: ; preds = %6
ret i32 0
10: ; preds = %6, %3, %0
%11 = tail call i32 (...) @abort()
unreachable
}