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


x86 assembly (clang, -O0):
<mySin1Abs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fabs@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec4(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe9e(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe38(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mySin1Abs>:
movaps 0xef9(%rip),%xmm1
movaps %xmm0,%xmm2
andps  %xmm1,%xmm2
mulss  %xmm0,%xmm2
unpcklps %xmm2,%xmm0
cvtps2pd %xmm0,%xmm0
mulpd  0xef1(%rip),%xmm0
cvtpd2ps %xmm0,%xmm0
movapd %xmm0,%xmm2
shufps $0x55,%xmm0,%xmm2
addss  %xmm0,%xmm2
andps  %xmm2,%xmm1
mulss  %xmm2,%xmm1
subss  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mulsd  0xed7(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @mySin1Abs(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = call float @fabs(float %4)
store float %5, float* %3
%6 = load float, float* %2
%7 = load float, float* %3
%8 = fmul float %7, %6
store float %8, float* %3
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = fmul double %10, 0xBFD9F02F6220351A
%12 = fptrunc double %11 to float
store float %12, float* %3
%13 = load float, float* %2
%14 = fpext float %13 to double
%15 = fmul double %14, 0x3FF45F306DCA1D9C
%16 = fptrunc double %15 to float
store float %16, float* %2
%17 = load float, float* %2
%18 = load float, float* %3
%19 = fadd float %18, %17
store float %19, float* %3
%20 = load float, float* %3
%21 = call float @fabs(float %20)
store float %21, float* %2
%22 = load float, float* %3
%23 = load float, float* %2
%24 = fmul float %23, %22
store float %24, float* %2
%25 = load float, float* %3
%26 = load float, float* %2
%27 = fsub float %26, %25
store float %27, float* %2
%28 = load float, float* %2
%29 = fpext float %28 to double
%30 = fmul double %29, 2.250000e-01
%31 = fptrunc double %30 to float
store float %31, float* %2
%32 = load float, float* %2
%33 = load float, float* %3
%34 = fadd float %32, %33
ret float %34
}

LLVM IR (-O2):
define float @mySin1Abs(float %0) {
%2 = tail call float @llvm.fabs.f32(float %0)
%3 = fmul float %2, %0
%4 = insertelement <2 x float> poison, float %0, i64 0
%5 = insertelement <2 x float> %4, float %3, i64 1
%6 = fpext <2 x float> %5 to <2 x double>
%7 = fmul <2 x double> %6, <double 0x3FF45F306DCA1D9C, double 0xBFD9F02F6220351A>
%8 = fptrunc <2 x double> %7 to <2 x float>
%9 = shufflevector <2 x float> %8, <2 x float> poison, <2 x i32> <i32 1, i32 undef>
%10 = fadd <2 x float> %9, %8
%11 = extractelement <2 x float> %10, i64 0
%12 = tail call float @llvm.fabs.f32(float %11)
%13 = fmul float %11, %12
%14 = fsub float %13, %11
%15 = fpext float %14 to double
%16 = fmul double %15, 2.250000e-01
%17 = fptrunc double %16 to float
%18 = fadd float %11, %17
ret float %18
}