void Tags(T, q) double T[12];
double q[2];
{
  double t1;
  double t13;
  double t2;
  double t3;
  double t4;
  double t6;
  double t7;
  double t8;
  double t9;
  {
    T[0] = 0.0;
    t1 = q[0];
    T[1] = cos(t1);
    t2 = q[1];
    t3 = cos(t2);
    t4 = t3 + 1.0;
    t6 = sin(t1);
    t7 = sin(t2);
    t8 = t6 * t7;
    T[2] = T[1] * t4 - t8;
    t9 = 2.0 + t3;
    T[3] = T[1] * t9 / 2.0 - t8 / 2.0;
    T[4] = 0.0;
    T[5] = t6;
    t13 = T[1] * t7;
    T[6] = T[5] * t4 + t13;
    T[7] = T[5] * t9 / 2.0 + t13 / 2.0;
    T[8] = 0.0;
    T[9] = 0.0;
    T[10] = 0.0;
    T[11] = 0.0;
    return;
  }
}


x86 assembly (clang, -O0):
<Tags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%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>
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
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  0xe88(%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  -0x40(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x50(%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,0x10(%rax)
movsd  0xe06(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  0xde6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  0xdd5(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x20(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  0xd5d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xd4c(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x40(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x48(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x50(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x58(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tags>:
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,0x8(%rbx)
movsd  0x8(%r14),%xmm0
movsd  %xmm0,0x10(%rsp)
call   1040 <cos@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0xe99(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
movsd  0x8(%rsp),%xmm6
movapd %xmm6,%xmm1
mulsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm4
addsd  0xe5f(%rip),%xmm4
movsd  0x8(%rbx),%xmm2
movapd %xmm4,%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm2,%xmm0
movsd  0x20(%rsp),%xmm5
mulsd  %xmm5,%xmm2
subsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rbx)
movsd  0xe3b(%rip),%xmm2
mulsd  %xmm2,%xmm3
mulsd  %xmm2,%xmm1
subsd  %xmm1,%xmm3
movsd  %xmm3,0x18(%rbx)
movq   $0x0,0x20(%rbx)
movsd  %xmm6,0x28(%rbx)
mulsd  %xmm6,%xmm5
addsd  %xmm0,%xmm5
movsd  %xmm5,0x30(%rbx)
mulsd  %xmm6,%xmm4
mulsd  %xmm2,%xmm4
mulsd  %xmm2,%xmm0
addsd  %xmm4,%xmm0
movsd  %xmm0,0x38(%rbx)
xorpd  %xmm0,%xmm0
movupd %xmm0,0x40(%rbx)
movupd %xmm0,0x50(%rbx)
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @Tags(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
%12 = alloca double
%13 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%14 = load double*, double** %3
%15 = getelementptr inbounds double, double* %14, i64 0
store double 0.000000e+00, double* %15
%16 = load double*, double** %4
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
store double %18, double* %5
%19 = load double, double* %5
%20 = call double @cos(double %19)
%21 = load double*, double** %3
%22 = getelementptr inbounds double, double* %21, i64 1
store double %20, double* %22
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 1
%25 = load double, double* %24
store double %25, double* %7
%26 = load double, double* %7
%27 = call double @cos(double %26)
store double %27, double* %8
%28 = load double, double* %8
%29 = fadd double %28, 1.000000e+00
store double %29, double* %9
%30 = load double, double* %5
%31 = call double @sin(double %30)
store double %31, double* %10
%32 = load double, double* %7
%33 = call double @sin(double %32)
store double %33, double* %11
%34 = load double, double* %10
%35 = load double, double* %11
%36 = fmul double %34, %35
store double %36, double* %12
%37 = load double*, double** %3
%38 = getelementptr inbounds double, double* %37, i64 1
%39 = load double, double* %38
%40 = load double, double* %9
%41 = load double, double* %12
%42 = fneg double %41
%43 = call double @llvm.fmuladd.f64(double %39, double %40, double %42)
%44 = load double*, double** %3
%45 = getelementptr inbounds double, double* %44, i64 2
store double %43, double* %45
%46 = load double, double* %8
%47 = fadd double 2.000000e+00, %46
store double %47, double* %13
%48 = load double*, double** %3
%49 = getelementptr inbounds double, double* %48, i64 1
%50 = load double, double* %49
%51 = load double, double* %13
%52 = fmul double %50, %51
%53 = fdiv double %52, 2.000000e+00
%54 = load double, double* %12
%55 = fdiv double %54, 2.000000e+00
%56 = fsub double %53, %55
%57 = load double*, double** %3
%58 = getelementptr inbounds double, double* %57, i64 3
store double %56, double* %58
%59 = load double*, double** %3
%60 = getelementptr inbounds double, double* %59, i64 4
store double 0.000000e+00, double* %60
%61 = load double, double* %10
%62 = load double*, double** %3
%63 = getelementptr inbounds double, double* %62, i64 5
store double %61, double* %63
%64 = load double*, double** %3
%65 = getelementptr inbounds double, double* %64, i64 1
%66 = load double, double* %65
%67 = load double, double* %11
%68 = fmul double %66, %67
store double %68, double* %6
%69 = load double*, double** %3
%70 = getelementptr inbounds double, double* %69, i64 5
%71 = load double, double* %70
%72 = load double, double* %9
%73 = load double, double* %6
%74 = call double @llvm.fmuladd.f64(double %71, double %72, double %73)
%75 = load double*, double** %3
%76 = getelementptr inbounds double, double* %75, i64 6
store double %74, double* %76
%77 = load double*, double** %3
%78 = getelementptr inbounds double, double* %77, i64 5
%79 = load double, double* %78
%80 = load double, double* %13
%81 = fmul double %79, %80
%82 = fdiv double %81, 2.000000e+00
%83 = load double, double* %6
%84 = fdiv double %83, 2.000000e+00
%85 = fadd double %82, %84
%86 = load double*, double** %3
%87 = getelementptr inbounds double, double* %86, i64 7
store double %85, double* %87
%88 = load double*, double** %3
%89 = getelementptr inbounds double, double* %88, i64 8
store double 0.000000e+00, double* %89
%90 = load double*, double** %3
%91 = getelementptr inbounds double, double* %90, i64 9
store double 0.000000e+00, double* %91
%92 = load double*, double** %3
%93 = getelementptr inbounds double, double* %92, i64 10
store double 0.000000e+00, double* %93
%94 = load double*, double** %3
%95 = getelementptr inbounds double, double* %94, i64 11
store double 0.000000e+00, double* %95
ret void
}

LLVM IR (-O2):
define void @Tags(double* nocapture %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* %0, i64 1
store double %4, double* %5
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = load double, double* %6
%8 = tail call double @cos(double %7)
%9 = fadd double %8, 1.000000e+00
%10 = tail call double @sin(double %3)
%11 = tail call double @sin(double %7)
%12 = fmul double %10, %11
%13 = load double, double* %5
%14 = fneg double %12
%15 = tail call double @llvm.fmuladd.f64(double %13, double %9, double %14)
%16 = getelementptr inbounds double, double* %0, i64 2
store double %15, double* %16
%17 = fadd double %8, 2.000000e+00
%18 = fmul double %17, %13
%19 = fmul double %18, 5.000000e-01
%20 = fmul double %12, 5.000000e-01
%21 = fsub double %19, %20
%22 = getelementptr inbounds double, double* %0, i64 3
store double %21, double* %22
%23 = getelementptr inbounds double, double* %0, i64 4
store double 0.000000e+00, double* %23
%24 = getelementptr inbounds double, double* %0, i64 5
store double %10, double* %24
%25 = fmul double %11, %13
%26 = tail call double @llvm.fmuladd.f64(double %10, double %9, double %25)
%27 = getelementptr inbounds double, double* %0, i64 6
store double %26, double* %27
%28 = fmul double %10, %17
%29 = fmul double %28, 5.000000e-01
%30 = fmul double %25, 5.000000e-01
%31 = fadd double %29, %30
%32 = getelementptr inbounds double, double* %0, i64 7
store double %31, double* %32
%33 = getelementptr inbounds double, double* %0, i64 8
%34 = bitcast double* %33 to i8*
ret void
}