#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 fabs(double);
double loss_Tukey(double x, double c) {
  if (fabs(x / c) < 1)
    return (
        (x / c) * (x / c) / 2. *
        (1 - (x / c) * (x / c) + (x / c) * (x / c) * (x / c) * (x / c) / 3.));
  else
    return (1. / 6.);
}


x86 assembly (clang, -O0):
<loss_Tukey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1030 <fabs@plt>
cmp    $0x1,%eax
jge    11eb <loss_Tukey+0xdb>
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
divsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xebe(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
divsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
divsd  -0x18(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe7b(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x10(%rbp),%xmm2
divsd  -0x18(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
divsd  -0x18(%rbp),%xmm3
mulsd  %xmm3,%xmm2
movsd  -0x10(%rbp),%xmm3
divsd  -0x18(%rbp),%xmm3
mulsd  %xmm3,%xmm2
movsd  -0x10(%rbp),%xmm3
divsd  -0x18(%rbp),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe33(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11f8 <loss_Tukey+0xe8>
movsd  0xe0d(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loss_Tukey>:
push   %rax
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
call   1030 <fabs@plt>
test   %eax,%eax
jle    112d <loss_Tukey+0x1d>
movsd  0xed5(%rip),%xmm0
pop    %rax
ret
movsd  (%rsp),%xmm3
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
movsd  0xec6(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xec2(%rip),%xmm2
subsd  %xmm0,%xmm2
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
divsd  0xeb6(%rip),%xmm0
addsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @loss_Tukey(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fdiv double %6, %7
%9 = call i32 @fabs(double %8)
%10 = icmp slt i32 %9, 1
br i1 %10, label %11, label %46
11: ; preds = %2
%12 = load double, double* %4
%13 = load double, double* %5
%14 = fdiv double %12, %13
%15 = load double, double* %4
%16 = load double, double* %5
%17 = fdiv double %15, %16
%18 = fmul double %14, %17
%19 = fdiv double %18, 2.000000e+00
%20 = load double, double* %4
%21 = load double, double* %5
%22 = fdiv double %20, %21
%23 = load double, double* %4
%24 = load double, double* %5
%25 = fdiv double %23, %24
%26 = fneg double %22
%27 = call double @llvm.fmuladd.f64(double %26, double %25, double 1.000000e+00)
%28 = load double, double* %4
%29 = load double, double* %5
%30 = fdiv double %28, %29
%31 = load double, double* %4
%32 = load double, double* %5
%33 = fdiv double %31, %32
%34 = fmul double %30, %33
%35 = load double, double* %4
%36 = load double, double* %5
%37 = fdiv double %35, %36
%38 = fmul double %34, %37
%39 = load double, double* %4
%40 = load double, double* %5
%41 = fdiv double %39, %40
%42 = fmul double %38, %41
%43 = fdiv double %42, 3.000000e+00
%44 = fadd double %27, %43
%45 = fmul double %19, %44
store double %45, double* %3
br label %47
46: ; preds = %2
store double 0x3FC5555555555555, double* %3
br label %47
47: ; preds = %46, %11
%48 = load double, double* %3
ret double %48
}

LLVM IR (-O2):
define double @loss_Tukey(double %0, double %1) {
%3 = fdiv double %0, %1
%4 = tail call i32 @fabs(double %3)
%5 = icmp slt i32 %4, 1
br i1 %5, label %6, label %16
6: ; preds = %2
%7 = fmul double %3, %3
%8 = fmul double %7, 5.000000e-01
%9 = fneg double %3
%10 = tail call double @llvm.fmuladd.f64(double %9, double %3, double 1.000000e+00)
%11 = fmul double %3, %7
%12 = fmul double %3, %11
%13 = fdiv double %12, 3.000000e+00
%14 = fadd double %10, %13
%15 = fmul double %8, %14
br label %16
16: ; preds = %2, %6
%17 = phi double [ %15, %6 ], [ 0x3FC5555555555555, %2 ]
ret double %17
}