float fmsynth_oscillator(float phase) {
  float x = phase < 0.5f ? (phase - 0.25f) : (0.75f - phase);
  float x2 = x * x;
  float x3 = x2 * x;
  x *= 2.0f * 3.14159265359f;
  x -= x3 * ((1.0f / 6.0f) * (2.0f * 3.14159265359f) * (2.0f * 3.14159265359f) *
             (2.0f * 3.14159265359f));
  float x5 = x3 * x2;
  x += x5 * ((1.0f / 120.0f) * (2.0f * 3.14159265359f) *
             (2.0f * 3.14159265359f) * (2.0f * 3.14159265359f) *
             (2.0f * 3.14159265359f) * (2.0f * 3.14159265359f));
  float x7 = x5 * x2;
  x -= x7 * ((1.0f / 5040.0f) * (2.0f * 3.14159265359f) *
             (2.0f * 3.14159265359f) * (2.0f * 3.14159265359f) *
             (2.0f * 3.14159265359f) * (2.0f * 3.14159265359f) *
             (2.0f * 3.14159265359f) * (2.0f * 3.14159265359f));
  return x;
}


x86 assembly (clang, -O0):
<fmsynth_oscillator>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1136 <fmsynth_oscillator+0x36>
movss  -0x4(%rbp),%xmm0
movss  0xee0(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1148 <fmsynth_oscillator+0x48>
movss  0xec6(%rip),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xea0(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xe73(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xe41(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x14(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xe02(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmsynth_oscillator>:
movss  0xef8(%rip),%xmm1
addss  %xmm0,%xmm1
movss  0xef0(%rip),%xmm2
subss  %xmm0,%xmm2
cmpltss 0xee7(%rip),%xmm0
andps  %xmm0,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
movaps %xmm0,%xmm2
mulss  0xed0(%rip),%xmm0
mulss  %xmm1,%xmm2
movaps %xmm1,%xmm3
mulss  %xmm2,%xmm3
mulss  0xec1(%rip),%xmm2
addss  %xmm2,%xmm0
mulss  %xmm3,%xmm1
mulss  0xeb5(%rip),%xmm3
addss  %xmm3,%xmm0
mulss  0xead(%rip),%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fmsynth_oscillator(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %2
%8 = load float, float* %2
%9 = fcmp olt float %8, 5.000000e-01
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load float, float* %2
%12 = fsub float %11, 2.500000e-01
br label %16
13: ; preds = %1
%14 = load float, float* %2
%15 = fsub float 7.500000e-01, %14
br label %16
16: ; preds = %13, %10
%17 = phi float [ %12, %10 ], [ %15, %13 ]
store float %17, float* %3
%18 = load float, float* %3
%19 = load float, float* %3
%20 = fmul float %18, %19
store float %20, float* %4
%21 = load float, float* %4
%22 = load float, float* %3
%23 = fmul float %21, %22
store float %23, float* %5
%24 = load float, float* %3
%25 = fmul float %24, 0x401921FB60000000
store float %25, float* %3
%26 = load float, float* %5
%27 = load float, float* %3
%28 = fneg float %26
%29 = call float @llvm.fmuladd.f32(float %28, float 0x4044ABBD00000000, float %27)
store float %29, float* %3
%30 = load float, float* %5
%31 = load float, float* %4
%32 = fmul float %30, %31
store float %32, float* %6
%33 = load float, float* %6
%34 = load float, float* %3
%35 = call float @llvm.fmuladd.f32(float %33, float 0x405466BCC0000000, float %34)
store float %35, float* %3
%36 = load float, float* %6
%37 = load float, float* %4
%38 = fmul float %36, %37
store float %38, float* %7
%39 = load float, float* %7
%40 = load float, float* %3
%41 = fneg float %39
%42 = call float @llvm.fmuladd.f32(float %41, float 0x40532D2D20000000, float %40)
store float %42, float* %3
%43 = load float, float* %3
ret float %43
}

LLVM IR (-O2):
define float @fmsynth_oscillator(float %0) {
%2 = fcmp olt float %0, 5.000000e-01
%3 = fadd float %0, -2.500000e-01
%4 = fsub float 7.500000e-01, %0
%5 = select i1 %2, float %3, float %4
%6 = fmul float %5, %5
%7 = fmul float %5, %6
%8 = fmul float %5, 0x401921FB60000000
%9 = fneg float %7
%10 = tail call float @llvm.fmuladd.f32(float %9, float 0x4044ABBD00000000, float %8)
%11 = fmul float %6, %7
%12 = tail call float @llvm.fmuladd.f32(float %11, float 0x405466BCC0000000, float %10)
%13 = fneg float %11
%14 = fmul float %6, %13
%15 = tail call float @llvm.fmuladd.f32(float %14, float 0x40532D2D20000000, float %12)
ret float %15
}