#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 */
float fabs(float);
float mySinAbs(float x) {
  float y = 1.27323954474 * x - 0.40528473456 * x * fabs(x);
  return 0.225 * (y * fabs(y) - y) + y;
}


x86 assembly (clang, -O0):
<mySinAbs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed4(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fabs@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe85(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
movaps %xmm0,%xmm2
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe21(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mySinAbs>:
cvtss2sd %xmm0,%xmm1
movaps 0xef5(%rip),%xmm2
andps  %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xef6(%rip),%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
mulsd  0xeee(%rip),%xmm1
addsd  %xmm3,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
andps  %xmm0,%xmm2
mulss  %xmm0,%xmm2
subss  %xmm0,%xmm2
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
mulsd  0xed1(%rip),%xmm1
cvtss2sd %xmm0,%xmm0
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @mySinAbs(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = fmul double 0x3FD9F02F6220351A, %7
%9 = load float, float* %2
%10 = call float @fabs(float %9)
%11 = fpext float %10 to double
%12 = fmul double %8, %11
%13 = fneg double %12
%14 = call double @llvm.fmuladd.f64(double 0x3FF45F306DCA1D9C, double %5, double %13)
%15 = fptrunc double %14 to float
store float %15, float* %3
%16 = load float, float* %3
%17 = load float, float* %3
%18 = call float @fabs(float %17)
%19 = load float, float* %3
%20 = fneg float %19
%21 = call float @llvm.fmuladd.f32(float %16, float %18, float %20)
%22 = fpext float %21 to double
%23 = load float, float* %3
%24 = fpext float %23 to double
%25 = call double @llvm.fmuladd.f64(double 2.250000e-01, double %22, double %24)
%26 = fptrunc double %25 to float
ret float %26
}

LLVM IR (-O2):
define float @mySinAbs(float %0) {
%2 = fpext float %0 to double
%3 = tail call float @llvm.fabs.f32(float %0)
%4 = fpext float %3 to double
%5 = fmul double %2, 0xBFD9F02F6220351A
%6 = fmul double %5, %4
%7 = tail call double @llvm.fmuladd.f64(double %2, double 0x3FF45F306DCA1D9C, double %6)
%8 = fptrunc double %7 to float
%9 = tail call float @llvm.fabs.f32(float %8)
%10 = fneg float %8
%11 = tail call float @llvm.fmuladd.f32(float %8, float %9, float %10)
%12 = fpext float %11 to double
%13 = fpext float %8 to double
%14 = tail call double @llvm.fmuladd.f64(double %12, double 2.250000e-01, double %13)
%15 = fptrunc double %14 to float
ret float %15
}