void Contact(CC, q) double CC[6];
double q[2];
{
  double t1;
  double t2;
  double t3;
  double t4;
  double t5;
  double t7;
  double t8;
  {
    CC[0] = 0.0;
    t1 = q[0];
    t2 = cos(t1);
    t3 = q[1];
    t4 = cos(t3);
    t5 = t4 + 1.0;
    t7 = sin(t1);
    t8 = sin(t3);
    CC[1] = t2 * t5 - t7 * t8;
    CC[2] = 0.0;
    CC[3] = t7 * t5 + t2 * t8;
    CC[4] = 0.0;
    CC[5] = 0.0;
    return;
  }
}


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

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

LLVM IR (-O0):
define void @Contact(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%12 = load double*, double** %3
%13 = getelementptr inbounds double, double* %12, i64 0
store double 0.000000e+00, double* %13
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 0
%16 = load double, double* %15
store double %16, double* %5
%17 = load double, double* %5
%18 = call double @cos(double %17)
store double %18, double* %6
%19 = load double*, double** %4
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
store double %21, double* %7
%22 = load double, double* %7
%23 = call double @cos(double %22)
store double %23, double* %8
%24 = load double, double* %8
%25 = fadd double %24, 1.000000e+00
store double %25, double* %9
%26 = load double, double* %5
%27 = call double @sin(double %26)
store double %27, double* %10
%28 = load double, double* %7
%29 = call double @sin(double %28)
store double %29, double* %11
%30 = load double, double* %6
%31 = load double, double* %9
%32 = load double, double* %10
%33 = load double, double* %11
%34 = fmul double %32, %33
%35 = fneg double %34
%36 = call double @llvm.fmuladd.f64(double %30, double %31, double %35)
%37 = load double*, double** %3
%38 = getelementptr inbounds double, double* %37, i64 1
store double %36, double* %38
%39 = load double*, double** %3
%40 = getelementptr inbounds double, double* %39, i64 2
store double 0.000000e+00, double* %40
%41 = load double, double* %10
%42 = load double, double* %9
%43 = load double, double* %6
%44 = load double, double* %11
%45 = fmul double %43, %44
%46 = call double @llvm.fmuladd.f64(double %41, double %42, double %45)
%47 = load double*, double** %3
%48 = getelementptr inbounds double, double* %47, i64 3
store double %46, double* %48
%49 = load double*, double** %3
%50 = getelementptr inbounds double, double* %49, i64 4
store double 0.000000e+00, double* %50
%51 = load double*, double** %3
%52 = getelementptr inbounds double, double* %51, i64 5
store double 0.000000e+00, double* %52
ret void
}

LLVM IR (-O2):
define void @Contact(double* nocapture writeonly %0, double* nocapture %1) {
store double 0.000000e+00, double* %0
%3 = load double, double* %1
%4 = tail call double @cos(double %3)
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = tail call double @cos(double %6)
%8 = fadd double %7, 1.000000e+00
%9 = tail call double @sin(double %3)
%10 = tail call double @sin(double %6)
%11 = fneg double %9
%12 = fmul double %10, %11
%13 = tail call double @llvm.fmuladd.f64(double %4, double %8, double %12)
%14 = getelementptr inbounds double, double* %0, i64 1
store double %13, double* %14
%15 = getelementptr inbounds double, double* %0, i64 2
store double 0.000000e+00, double* %15
%16 = fmul double %4, %10
%17 = tail call double @llvm.fmuladd.f64(double %9, double %8, double %16)
%18 = getelementptr inbounds double, double* %0, i64 3
store double %17, double* %18
%19 = getelementptr inbounds double, double* %0, i64 4
%20 = bitcast double* %19 to i8*
ret void
}