double AURAE_sind(double x) {
  int q = (x * 6.3661977236758138e-1) + 0.5;
  double t = x - q * 1.5707963267923333e+00;
  t = t - q * 2.5633441515945189e-12;
  double t2 = t * t;
  if (q & 1)
    t = ((-1.36058866707554670912e-03 * t2 + 4.16566258031673830195e-02) * t2 -
         4.99998875577611430384e-01) *
            t2 +
        9.99999980750852337007e-01;
  else
    t = (((-1.94842039748219288187e-04 * t2 + 8.33179571459221545387e-03) * t2 -
          1.66666423796176028737e-01) *
             t2 +
         9.99999989793669848536e-01) *
        t;
  if (q & 2)
    t = -t;
  return t;
}


x86 assembly (clang, -O0):
<AURAE_sind>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xefa(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xef6(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm1
cvtsi2sdl -0xc(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xeb2(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
cvtsi2sdl -0xc(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe74(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1208 <AURAE_sind+0x108>
movsd  -0x20(%rbp),%xmm0
movsd  0xe8c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe88(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe63(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe46(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1259 <AURAE_sind+0x159>
movsd  -0x20(%rbp),%xmm0
movsd  0xe1b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe17(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdf2(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdd5(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1289 <AURAE_sind+0x189>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<AURAE_sind>:
movapd %xmm0,%xmm1
movsd  0xef4(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xef0(%rip),%xmm0
cvttsd2si %xmm0,%eax
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
movsd  0xee4(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  0xee0(%rip),%xmm0
addsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
test   $0x1,%al
jne    1182 <AURAE_sind+0x82>
movsd  0xeec(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xee8(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xee4(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xee0(%rip),%xmm2
mulsd  %xmm2,%xmm0
test   $0x2,%al
jne    11b2 <AURAE_sind+0xb2>
jmp    11ba <AURAE_sind+0xba>
movsd  0xe96(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe92(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe8e(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe8a(%rip),%xmm0
test   $0x2,%al
je     11ba <AURAE_sind+0xba>
xorpd  0xea6(%rip),%xmm0
ret

LLVM IR (-O0):
define double @AURAE_sind(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store double %0, double* %2
%6 = load double, double* %2
%7 = call double @llvm.fmuladd.f64(double %6, double 0x3FE45F306DC9C883, double 5.000000e-01)
%8 = fptosi double %7 to i32
store i32 %8, i32* %3
%9 = load double, double* %2
%10 = load i32, i32* %3
%11 = sitofp i32 %10 to double
%12 = fneg double %11
%13 = call double @llvm.fmuladd.f64(double %12, double 0x3FF921FB54440000, double %9)
store double %13, double* %4
%14 = load double, double* %4
%15 = load i32, i32* %3
%16 = sitofp i32 %15 to double
%17 = fneg double %16
%18 = call double @llvm.fmuladd.f64(double %17, double 0x3D868C234C4C6629, double %14)
store double %18, double* %4
%19 = load double, double* %4
%20 = load double, double* %4
%21 = fmul double %19, %20
store double %21, double* %5
%22 = load i32, i32* %3
%23 = and i32 %22, 1
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %32
25: ; preds = %1
%26 = load double, double* %5
%27 = call double @llvm.fmuladd.f64(double 0xBF564AB8F50477CF, double %26, double 0x3FA554046AF8FE1A)
%28 = load double, double* %5
%29 = call double @llvm.fmuladd.f64(double %27, double %28, double 0xBFDFFFFB48A92097)
%30 = load double, double* %5
%31 = call double @llvm.fmuladd.f64(double %29, double %30, double 0x3FEFFFFFF5AA6AD4)
store double %31, double* %4
br label %41
32: ; preds = %1
%33 = load double, double* %5
%34 = call double @llvm.fmuladd.f64(double 0xBF2989D06090C602, double %33, double 0x3F811042B0E3964C)
%35 = load double, double* %5
%36 = call double @llvm.fmuladd.f64(double %34, double %35, double 0xBFC555534BC5DE7C)
%37 = load double, double* %5
%38 = call double @llvm.fmuladd.f64(double %36, double %37, double 0x3FEFFFFFFA8540AF)
%39 = load double, double* %4
%40 = fmul double %38, %39
store double %40, double* %4
br label %41
41: ; preds = %32, %25
%42 = load i32, i32* %3
%43 = and i32 %42, 2
%44 = icmp ne i32 %43, 0
br i1 %44, label %45, label %48
45: ; preds = %41
%46 = load double, double* %4
%47 = fneg double %46
store double %47, double* %4
br label %48
48: ; preds = %45, %41
%49 = load double, double* %4
ret double %49
}

LLVM IR (-O2):
define double @AURAE_sind(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 0x3FE45F306DC9C883, double 5.000000e-01)
%3 = fptosi double %2 to i32
%4 = sitofp i32 %3 to double
%5 = fneg double %4
%6 = tail call double @llvm.fmuladd.f64(double %5, double 0x3FF921FB54440000, double %0)
%7 = tail call double @llvm.fmuladd.f64(double %5, double 0x3D868C234C4C6629, double %6)
%8 = fmul double %7, %7
%9 = and i32 %3, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %1
%12 = tail call double @llvm.fmuladd.f64(double %8, double 0xBF564AB8F50477CF, double 0x3FA554046AF8FE1A)
%13 = tail call double @llvm.fmuladd.f64(double %12, double %8, double 0xBFDFFFFB48A92097)
%14 = tail call double @llvm.fmuladd.f64(double %13, double %8, double 0x3FEFFFFFF5AA6AD4)
br label %20
15: ; preds = %1
%16 = tail call double @llvm.fmuladd.f64(double %8, double 0xBF2989D06090C602, double 0x3F811042B0E3964C)
%17 = tail call double @llvm.fmuladd.f64(double %16, double %8, double 0xBFC555534BC5DE7C)
%18 = tail call double @llvm.fmuladd.f64(double %17, double %8, double 0x3FEFFFFFFA8540AF)
%19 = fmul double %7, %18
br label %20
20: ; preds = %15, %11
%21 = phi double [ %14, %11 ], [ %19, %15 ]
%22 = and i32 %3, 2
%23 = icmp eq i32 %22, 0
%24 = fneg double %21
%25 = select i1 %23, double %21, double %24
ret double %25
}