#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 fabs(double);
double Chi_prime(double x, double c) {
  double t;
  if (fabs(x) > c)
    return (0.0);
  else {
    t = x / c;
    return (6.0 * t * (1 - t * t) * (1 - t * t) / c);
  }
}


x86 assembly (clang, -O0):
<Chi_prime>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movaps 0xee6(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1136 <Chi_prime+0x36>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11c6 <Chi_prime+0xc6>
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xecb(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe91(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe5c(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Chi_prime>:
movapd %xmm0,%xmm2
movapd 0xef4(%rip),%xmm3
andpd  %xmm0,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm3
ja     1146 <Chi_prime+0x46>
divsd  %xmm1,%xmm2
movsd  0xeea(%rip),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm2
movsd  0xee2(%rip),%xmm3
subsd  %xmm2,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Chi_prime(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
%7 = load double, double* %4
%8 = call double @llvm.fabs.f64(double %7)
%9 = load double, double* %5
%10 = fcmp ogt double %8, %9
br i1 %10, label %11, label %12
11: ; preds = %2
store double 0.000000e+00, double* %3
br label %30
12: ; preds = %2
%13 = load double, double* %4
%14 = load double, double* %5
%15 = fdiv double %13, %14
store double %15, double* %6
%16 = load double, double* %6
%17 = fmul double 6.000000e+00, %16
%18 = load double, double* %6
%19 = load double, double* %6
%20 = fneg double %18
%21 = call double @llvm.fmuladd.f64(double %20, double %19, double 1.000000e+00)
%22 = fmul double %17, %21
%23 = load double, double* %6
%24 = load double, double* %6
%25 = fneg double %23
%26 = call double @llvm.fmuladd.f64(double %25, double %24, double 1.000000e+00)
%27 = fmul double %22, %26
%28 = load double, double* %5
%29 = fdiv double %27, %28
store double %29, double* %3
br label %30
30: ; preds = %12, %11
%31 = load double, double* %3
ret double %31
}

LLVM IR (-O2):
define double @Chi_prime(double %0, double %1) {
%3 = tail call double @llvm.fabs.f64(double %0)
%4 = fcmp ogt double %3, %1
br i1 %4, label %13, label %5
5: ; preds = %2
%6 = fdiv double %0, %1
%7 = fmul double %6, 6.000000e+00
%8 = fneg double %6
%9 = tail call double @llvm.fmuladd.f64(double %8, double %6, double 1.000000e+00)
%10 = fmul double %7, %9
%11 = fmul double %9, %10
%12 = fdiv double %11, %1
br label %13
13: ; preds = %2, %5
%14 = phi double [ %12, %5 ], [ 0.000000e+00, %2 ]
ret double %14
}