#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 */
double cos(double const);
double sin(double const);
void Calc_fillRotated(double const inV, double const inW, double const inAngle,
                      double *const inOutX, double *const inOutY) {
  double const s = sin(inAngle), c = cos(inAngle);
  *inOutX = inV * c - inW * s;
  *inOutY = inV * s + inW * c;
}


x86 assembly (clang, -O0):
<Calc_fillRotated>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Calc_fillRotated(double %0, double %1, double %2, double* %3, double* %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double*
%10 = alloca double*
%11 = alloca double
%12 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double* %3, double** %9
store double* %4, double** %10
%13 = load double, double* %8
%14 = call double @sin(double %13)
store double %14, double* %11
%15 = load double, double* %8
%16 = call double @cos(double %15)
store double %16, double* %12
%17 = load double, double* %6
%18 = load double, double* %12
%19 = load double, double* %7
%20 = load double, double* %11
%21 = fmul double %19, %20
%22 = fneg double %21
%23 = call double @llvm.fmuladd.f64(double %17, double %18, double %22)
%24 = load double*, double** %9
store double %23, double* %24
%25 = load double, double* %6
%26 = load double, double* %11
%27 = load double, double* %7
%28 = load double, double* %12
%29 = fmul double %27, %28
%30 = call double @llvm.fmuladd.f64(double %25, double %26, double %29)
%31 = load double*, double** %10
store double %30, double* %31
ret void
}

LLVM IR (-O2):
define void @Calc_fillRotated(double %0, double %1, double %2, double* nocapture writeonly %3, double* nocapture writeonly %4) {
%6 = tail call double @sin(double %2)
%7 = tail call double @cos(double %2)
%8 = fneg double %6
%9 = fmul double %8, %1
%10 = tail call double @llvm.fmuladd.f64(double %0, double %7, double %9)
store double %10, double* %3
%11 = fmul double %7, %1
%12 = tail call double @llvm.fmuladd.f64(double %0, double %6, double %11)
store double %12, double* %4
ret void
}