#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 */
int /*<<< orphan*/ abort();
scalar_t__ test(double);
scalar_t__ testf(float);
int main() {
  if (test(1.0) != 0)
    abort();
  if (test(-2.0) == 0)
    abort();
  if (testf(1.0f) != 0)
    abort();
  if (testf(-2.0f) == 0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb9(%rip),%xmm0
call   1050 <test@plt>
cmp    $0x0,%rax
je     115d <main+0x2d>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xea3(%rip),%xmm0
call   1050 <test@plt>
cmp    $0x0,%rax
jne    117b <main+0x4b>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xe8d(%rip),%xmm0
call   1040 <testf@plt>
cmp    $0x0,%rax
je     1199 <main+0x69>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xe73(%rip),%xmm0
call   1040 <testf@plt>
cmp    $0x0,%rax
jne    11b7 <main+0x87>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xec7(%rip),%xmm0
call   1050 <test@plt>
test   %rax,%rax
jne    117d <main+0x4d>
movsd  0xebd(%rip),%xmm0
call   1050 <test@plt>
test   %rax,%rax
je     117d <main+0x4d>
movss  0xeb3(%rip),%xmm0
call   1040 <testf@plt>
test   %rax,%rax
jne    117d <main+0x4d>
movss  0xea5(%rip),%xmm0
call   1040 <testf@plt>
test   %rax,%rax
je     117d <main+0x4d>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @test(double 1.000000e+00)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i64 @test(double -2.000000e+00)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = call i64 @testf(float 1.000000e+00)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %11
%17 = call i64 @testf(float -2.000000e+00)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %16
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @test(double 1.000000e+00)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i64 @test(double -2.000000e+00)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i64 @testf(float 1.000000e+00)
%12 = icmp eq i64 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = tail call i64 @testf(float -2.000000e+00)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %15
ret i32 0
}