#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 sqrt(double);
int /*<<< orphan*/ test(double, double);
int main() {
  test(100000000000000.01, 100000000000000.011);
  test(100.01, 100.011);
  test(10000000000000.001 / 10000.0, 1000000000.0000001000);
  test(0.001, 0.0010000001);
  test(0.000000000000000000000101, 0.0);
  test(sqrt(2.0) * sqrt(2.0), 2.0);
  test(-sqrt(2.0) * sqrt(2.0), -2.0);
  test(3.14159265358979323846, 3.14159265358979324);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xf19(%rip),%xmm1
movaps %xmm1,%xmm0
call   1040 <test@plt>
movsd  0xef9(%rip),%xmm0
movsd  0xef9(%rip),%xmm1
call   1040 <test@plt>
movsd  0xed4(%rip),%xmm0
movsd  0xed4(%rip),%xmm1
call   1040 <test@plt>
movsd  0xeaf(%rip),%xmm0
movsd  0xeaf(%rip),%xmm1
call   1040 <test@plt>
movsd  0xe92(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1040 <test@plt>
movsd  0xe7a(%rip),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xe68(%rip),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe4f(%rip),%xmm1
call   1040 <test@plt>
movsd  0xe42(%rip),%xmm0
call   1030 <sqrt@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe19(%rip),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xdf8(%rip),%xmm1
call   1040 <test@plt>
movsd  0xde3(%rip),%xmm1
movaps %xmm1,%xmm0
call   1040 <test@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
movaps %xmm0,%xmm1
call   1030 <test@plt>
movsd  0xedf(%rip),%xmm0
movsd  0xedf(%rip),%xmm1
call   1030 <test@plt>
movsd  0xeda(%rip),%xmm0
movsd  0xeda(%rip),%xmm1
call   1030 <test@plt>
movsd  0xed5(%rip),%xmm0
movsd  0xed5(%rip),%xmm1
call   1030 <test@plt>
movsd  0xed0(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1030 <test@plt>
movsd  0xec8(%rip),%xmm0
movsd  0xec8(%rip),%xmm1
call   1030 <test@plt>
movsd  0xec3(%rip),%xmm0
movsd  0xec3(%rip),%xmm1
call   1030 <test@plt>
movsd  0xebe(%rip),%xmm0
movaps %xmm0,%xmm1
call   1030 <test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test(double 0x42D6BCC41E900001, double 0x42D6BCC41E900001)
%3 = call i32 @test(double 1.000100e+02, double 1.000110e+02)
%4 = call i32 @test(double 0x41CDCD6500000002, double 0x41CDCD6500000001)
%5 = call i32 @test(double 1.000000e-03, double 0x3F50624DEE6E89D6)
%6 = call i32 @test(double 1.010000e-22, double 0.000000e+00)
%7 = call double @sqrt(double 2.000000e+00)
%8 = call double @sqrt(double 2.000000e+00)
%9 = fmul double %7, %8
%10 = call i32 @test(double %9, double 2.000000e+00)
%11 = call double @sqrt(double 2.000000e+00)
%12 = fneg double %11
%13 = call double @sqrt(double 2.000000e+00)
%14 = fmul double %12, %13
%15 = call i32 @test(double %14, double -2.000000e+00)
%16 = call i32 @test(double 0x400921FB54442D18, double 0x400921FB54442D18)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(double 0x42D6BCC41E900001, double 0x42D6BCC41E900001)
%2 = tail call i32 @test(double 1.000100e+02, double 1.000110e+02)
%3 = tail call i32 @test(double 0x41CDCD6500000002, double 0x41CDCD6500000001)
%4 = tail call i32 @test(double 1.000000e-03, double 0x3F50624DEE6E89D6)
%5 = tail call i32 @test(double 1.010000e-22, double 0.000000e+00)
%6 = tail call i32 @test(double 0x4000000000000001, double 2.000000e+00)
%7 = tail call i32 @test(double 0xC000000000000001, double -2.000000e+00)
%8 = tail call i32 @test(double 0x400921FB54442D18, double 0x400921FB54442D18)
ret i32 0
}