#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();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
double g(double, double, double, double);
main() {
  double a, b, c, d;
  a = 1.0;
  b = 0.0;
  c = 10.0;
  d = 0.0;
  if (g(a, b, c, d) != 0.0)
    abort();
  if (a != 1.0 || b != 0.0 || c != 10.0 || d != 0.0)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xea4(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
call   1040 <g@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    119a <main+0x6a>
jp     119a <main+0x6a>
jmp    11a1 <main+0x71>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xe5a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1210 <main+0xe0>
jp     1210 <main+0xe0>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1210 <main+0xe0>
jp     1210 <main+0xe0>
movsd  -0x20(%rbp),%xmm0
movsd  0xe1d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1210 <main+0xe0>
jp     1210 <main+0xe0>
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1210 <main+0xe0>
jp     1210 <main+0xe0>
jmp    1217 <main+0xe7>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xec7(%rip),%xmm0
movsd  0xec7(%rip),%xmm2
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
call   1040 <g@plt>
ucomisd 0xebc(%rip),%xmm0
jne    1158 <main+0x28>
jnp    115f <main+0x2f>
xor    %eax,%eax
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
store double 1.000000e+00, double* %2
store double 0.000000e+00, double* %3
store double 1.000000e+01, double* %4
store double 0.000000e+00, double* %5
%6 = load double, double* %2
%7 = load double, double* %3
%8 = load double, double* %4
%9 = load double, double* %5
%10 = call double @g(double %6, double %7, double %8, double %9)
%11 = fcmp une double %10, 0.000000e+00
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %0
%15 = load double, double* %2
%16 = fcmp une double %15, 1.000000e+00
br i1 %16, label %26, label %17
17: ; preds = %14
%18 = load double, double* %3
%19 = fcmp une double %18, 0.000000e+00
br i1 %19, label %26, label %20
20: ; preds = %17
%21 = load double, double* %4
%22 = fcmp une double %21, 1.000000e+01
br i1 %22, label %26, label %23
23: ; preds = %20
%24 = load double, double* %5
%25 = fcmp une double %24, 0.000000e+00
br i1 %25, label %26, label %28
26: ; preds = %23, %20, %17, %14
%27 = call i32 (...) @abort()
unreachable
28: ; preds = %23
%29 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double @g(double 1.000000e+00, double 0.000000e+00, double 1.000000e+01, double 0.000000e+00)
%2 = fcmp une double %1, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}