#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*/ test_fcmp(int, int);
int /*<<< orphan*/ test_fconst();
int /*<<< orphan*/ test_fcvt(int);
int /*<<< orphan*/ test_fops(double, int);
void test_floats(void) {
  test_fops(2, 3);
  test_fops(1.4, -5);
  test_fcmp(2, -1);
  test_fcmp(2, 2);
  test_fcmp(2, 3);
  test_fcvt(0.5);
  test_fcvt(-0.5);
  test_fcvt(1.0 / 7.0);
  test_fcvt(-1.0 / 9.0);
  test_fcvt(32768);
  test_fcvt(-1e20);
  test_fconst();
}


x86 assembly (clang, -O0):
<test_floats>:
push   %rbp
mov    %rsp,%rbp
movsd  0xebc(%rip),%xmm0
mov    $0x3,%edi
call   1040 <test_fops@plt>
movsd  0xea2(%rip),%xmm0
mov    $0xfffffffb,%edi
call   1040 <test_fops@plt>
mov    $0x2,%edi
mov    $0xffffffff,%esi
call   1050 <test_fcmp@plt>
mov    $0x2,%esi
mov    %esi,%edi
call   1050 <test_fcmp@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1050 <test_fcmp@plt>
xor    %edi,%edi
call   1060 <test_fcvt@plt>
xor    %edi,%edi
call   1060 <test_fcvt@plt>
xor    %edi,%edi
call   1060 <test_fcvt@plt>
xor    %edi,%edi
call   1060 <test_fcvt@plt>
mov    $0x8000,%edi
call   1060 <test_fcvt@plt>
call   1060 <test_fcvt@plt>
mov    $0x0,%al
call   1030 <test_fconst@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_floats>:
push   %rax
movsd  0xeb7(%rip),%xmm0
mov    $0x3,%edi
call   1040 <test_fops@plt>
movsd  0xead(%rip),%xmm0
mov    $0xfffffffb,%edi
call   1040 <test_fops@plt>
mov    $0x2,%edi
mov    $0xffffffff,%esi
call   1050 <test_fcmp@plt>
mov    $0x2,%edi
mov    $0x2,%esi
call   1050 <test_fcmp@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1050 <test_fcmp@plt>
xor    %edi,%edi
call   1060 <test_fcvt@plt>
xor    %edi,%edi
call   1060 <test_fcvt@plt>
xor    %edi,%edi
call   1060 <test_fcvt@plt>
xor    %edi,%edi
call   1060 <test_fcvt@plt>
mov    $0x8000,%edi
call   1060 <test_fcvt@plt>
call   1060 <test_fcvt@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_fconst@plt>

LLVM IR (-O0):
define void @test_floats() {
%1 = call i32 @test_fops(double 2.000000e+00, i32 3)
%2 = call i32 @test_fops(double 1.400000e+00, i32 -5)
%3 = call i32 @test_fcmp(i32 2, i32 -1)
%4 = call i32 @test_fcmp(i32 2, i32 2)
%5 = call i32 @test_fcmp(i32 2, i32 3)
%6 = call i32 @test_fcvt(i32 0)
%7 = call i32 @test_fcvt(i32 0)
%8 = call i32 @test_fcvt(i32 0)
%9 = call i32 @test_fcvt(i32 0)
%10 = call i32 @test_fcvt(i32 32768)
%11 = call i32 @test_fcvt(i32 poison)
%12 = call i32 (...) @test_fconst()
ret void
}

LLVM IR (-O2):
define void @test_floats() {
%1 = tail call i32 @test_fops(double 2.000000e+00, i32 3)
%2 = tail call i32 @test_fops(double 1.400000e+00, i32 -5)
%3 = tail call i32 @test_fcmp(i32 2, i32 -1)
%4 = tail call i32 @test_fcmp(i32 2, i32 2)
%5 = tail call i32 @test_fcmp(i32 2, i32 3)
%6 = tail call i32 @test_fcvt(i32 0)
%7 = tail call i32 @test_fcvt(i32 0)
%8 = tail call i32 @test_fcvt(i32 0)
%9 = tail call i32 @test_fcvt(i32 0)
%10 = tail call i32 @test_fcvt(i32 32768)
%11 = tail call i32 @test_fcvt(i32 poison)
%12 = tail call i32 (...) @test_fconst()
ret void
}