#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 */
bool chkcir(const double x, const double y) {
  const double x_c = 1.5;
  const double y_c = 0.5;
  const double r = 0.5;
  const double f = (x - x_c) * (x - x_c) / 9 + (y - y_c) * (y - y_c) - r * r;
  if (f > 0.0) {
    return false;
  } else {
    return true;
  }
}


x86 assembly (clang, -O0):
<chkcir>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  0xf02(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xee5(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xed6(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xec5(%rip),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm1
movsd  0xead(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xe94(%rip),%xmm2
subsd  %xmm2,%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xe83(%rip),%xmm3
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe67(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11c0 <chkcir+0xc0>
movl   $0x0,-0x4(%rbp)
jmp    11c7 <chkcir+0xc7>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chkcir>:
addsd  0xef8(%rip),%xmm0
mulsd  %xmm0,%xmm0
divsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
addsd  0xeec(%rip),%xmm1
xorpd  %xmm0,%xmm0
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
ret

LLVM IR (-O0):
define i32 @chkcir(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %4
store double %1, double* %5
store double 1.500000e+00, double* %6
store double 5.000000e-01, double* %7
store double 5.000000e-01, double* %8
%10 = load double, double* %4
%11 = fsub double %10, 1.500000e+00
%12 = load double, double* %4
%13 = fsub double %12, 1.500000e+00
%14 = fmul double %11, %13
%15 = fdiv double %14, 9.000000e+00
%16 = load double, double* %5
%17 = fsub double %16, 5.000000e-01
%18 = load double, double* %5
%19 = fsub double %18, 5.000000e-01
%20 = call double @llvm.fmuladd.f64(double %17, double %19, double %15)
%21 = fsub double %20, 2.500000e-01
store double %21, double* %9
%22 = load double, double* %9
%23 = fcmp ogt double %22, 0.000000e+00
br i1 %23, label %24, label %25
24: ; preds = %2
store i32 0, i32* %3
br label %26
25: ; preds = %2
store i32 1, i32* %3
br label %26
26: ; preds = %25, %24
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @chkcir(double %0, double %1) {
%3 = fadd double %0, -1.500000e+00
%4 = fmul double %3, %3
%5 = fdiv double %4, 9.000000e+00
%6 = fadd double %1, -5.000000e-01
%7 = tail call double @llvm.fmuladd.f64(double %6, double %6, double %5)
%8 = fadd double %7, -2.500000e-01
%9 = fcmp ule double %8, 0.000000e+00
%10 = zext i1 %9 to i32
ret i32 %10
}