void rotate(x, y, t) float *x, *y, t;
{
  float x1, y1;
  x1 = *x;
  y1 = *y;
  *x = x1 * cos(t) + y1 * sin(t);
  *y = -x1 * sin(t) + y1 * cos(t);
}


x86 assembly (clang, -O0):
<rotate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
cvtsd2ss %xmm0,%xmm0
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x48(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <sin@plt>
movsd  -0x50(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x30(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1040 <cos@plt>
movsd  -0x38(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
cvtsd2ss %xmm0,%xmm0
movss  (%rdi),%xmm1
movss  (%rsi),%xmm2
movss  %xmm2,0x8(%rsp)
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,0x20(%rsp)
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
call   1040 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,(%rbx)
movsd  0x18(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
call   1040 <cos@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%r14)
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @rotate(float* %0, float* %1, double %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = fptrunc double %2 to float
store float* %0, float** %4
store float* %1, float** %5
store float %9, float* %6
%10 = load float*, float** %4
%11 = load float, float* %10
store float %11, float* %7
%12 = load float*, float** %5
%13 = load float, float* %12
store float %13, float* %8
%14 = load float, float* %7
%15 = fpext float %14 to double
%16 = load float, float* %6
%17 = fpext float %16 to double
%18 = call double @cos(double %17)
%19 = load float, float* %8
%20 = fpext float %19 to double
%21 = load float, float* %6
%22 = fpext float %21 to double
%23 = call double @sin(double %22)
%24 = fmul double %20, %23
%25 = call double @llvm.fmuladd.f64(double %15, double %18, double %24)
%26 = fptrunc double %25 to float
%27 = load float*, float** %4
store float %26, float* %27
%28 = load float, float* %7
%29 = fneg float %28
%30 = fpext float %29 to double
%31 = load float, float* %6
%32 = fpext float %31 to double
%33 = call double @sin(double %32)
%34 = load float, float* %8
%35 = fpext float %34 to double
%36 = load float, float* %6
%37 = fpext float %36 to double
%38 = call double @cos(double %37)
%39 = fmul double %35, %38
%40 = call double @llvm.fmuladd.f64(double %30, double %33, double %39)
%41 = fptrunc double %40 to float
%42 = load float*, float** %5
store float %41, float* %42
ret void
}

LLVM IR (-O2):
define void @rotate(float* nocapture %0, float* nocapture %1, double %2) {
%4 = fptrunc double %2 to float
%5 = load float, float* %0
%6 = load float, float* %1
%7 = fpext float %5 to double
%8 = fpext float %4 to double
%9 = tail call double @cos(double %8)
%10 = fpext float %6 to double
%11 = tail call double @sin(double %8)
%12 = fmul double %11, %10
%13 = tail call double @llvm.fmuladd.f64(double %7, double %9, double %12)
%14 = fptrunc double %13 to float
store float %14, float* %0
%15 = fneg float %5
%16 = fpext float %15 to double
%17 = tail call double @sin(double %8)
%18 = tail call double @cos(double %8)
%19 = fmul double %18, %10
%20 = tail call double @llvm.fmuladd.f64(double %16, double %17, double %19)
%21 = fptrunc double %20 to float
store float %21, float* %1
ret void
}