#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);
double sin(double);
void matrix_rotate_y(double *a, double degree) {
  double temp;
  temp = a[0];
  a[0] = (cos(degree) * a[0]) + (-sin(degree) * a[8]);
  a[8] = (sin(degree) * temp) + (cos(degree) * a[8]);
  temp = a[1];
  a[1] = (cos(degree) * a[1]) + (-sin(degree) * a[9]);
  a[9] = (sin(degree) * temp) + (cos(degree) * a[9]);
  temp = a[2];
  a[2] = (cos(degree) * a[2]) + (-sin(degree) * a[10]);
  a[10] = (sin(degree) * temp) + (cos(degree) * a[10]);
  temp = a[3];
  a[3] = (cos(degree) * a[3]) + (-sin(degree) * a[11]);
  a[11] = (sin(degree) * temp) + (cos(degree) * a[11]);
}


x86 assembly (clang, -O0):
<matrix_rotate_y>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x98(%rbp),%xmm2
ff
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x40(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movsd  -0x88(%rbp),%xmm2
ff
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x40(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x40(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x78(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x48(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movsd  -0x68(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x48(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x48(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x58(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x50(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movsd  -0x48(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x50(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x50(%rax)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x38(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x58(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movsd  -0x28(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x58(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x58(%rax)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrix_rotate_y>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm0,0x10(%rsp)
mov    %rdi,%rbx
movsd  (%rdi),%xmm1
movsd  %xmm1,0x18(%rsp)
call   1040 <cos@plt>
mulsd  (%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x40(%rbx),%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <cos@plt>
mulsd  0x40(%rbx),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x40(%rbx)
movsd  0x8(%rbx),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <cos@plt>
mulsd  0x8(%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x48(%rbx),%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rbx)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <cos@plt>
mulsd  0x48(%rbx),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x48(%rbx)
movsd  0x10(%rbx),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <cos@plt>
mulsd  0x10(%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x50(%rbx),%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rbx)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <cos@plt>
mulsd  0x50(%rbx),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x50(%rbx)
movsd  0x18(%rbx),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <cos@plt>
mulsd  0x18(%rbx),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x58(%rbx),%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rbx)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <cos@plt>
mulsd  0x58(%rbx),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x58(%rbx)
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @matrix_rotate_y(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
%5 = alloca double
store double* %0, double** %3
store double %1, double* %4
%6 = load double*, double** %3
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
store double %8, double* %5
%9 = load double, double* %4
%10 = call double @cos(double %9)
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
%14 = load double, double* %4
%15 = call double @sin(double %14)
%16 = fneg double %15
%17 = load double*, double** %3
%18 = getelementptr inbounds double, double* %17, i64 8
%19 = load double, double* %18
%20 = fmul double %16, %19
%21 = call double @llvm.fmuladd.f64(double %10, double %13, double %20)
%22 = load double*, double** %3
%23 = getelementptr inbounds double, double* %22, i64 0
store double %21, double* %23
%24 = load double, double* %4
%25 = call double @sin(double %24)
%26 = load double, double* %5
%27 = load double, double* %4
%28 = call double @cos(double %27)
%29 = load double*, double** %3
%30 = getelementptr inbounds double, double* %29, i64 8
%31 = load double, double* %30
%32 = fmul double %28, %31
%33 = call double @llvm.fmuladd.f64(double %25, double %26, double %32)
%34 = load double*, double** %3
%35 = getelementptr inbounds double, double* %34, i64 8
store double %33, double* %35
%36 = load double*, double** %3
%37 = getelementptr inbounds double, double* %36, i64 1
%38 = load double, double* %37
store double %38, double* %5
%39 = load double, double* %4
%40 = call double @cos(double %39)
%41 = load double*, double** %3
%42 = getelementptr inbounds double, double* %41, i64 1
%43 = load double, double* %42
%44 = load double, double* %4
%45 = call double @sin(double %44)
%46 = fneg double %45
%47 = load double*, double** %3
%48 = getelementptr inbounds double, double* %47, i64 9
%49 = load double, double* %48
%50 = fmul double %46, %49
%51 = call double @llvm.fmuladd.f64(double %40, double %43, double %50)
%52 = load double*, double** %3
%53 = getelementptr inbounds double, double* %52, i64 1
store double %51, double* %53
%54 = load double, double* %4
%55 = call double @sin(double %54)
%56 = load double, double* %5
%57 = load double, double* %4
%58 = call double @cos(double %57)
%59 = load double*, double** %3
%60 = getelementptr inbounds double, double* %59, i64 9
%61 = load double, double* %60
%62 = fmul double %58, %61
%63 = call double @llvm.fmuladd.f64(double %55, double %56, double %62)
%64 = load double*, double** %3
%65 = getelementptr inbounds double, double* %64, i64 9
store double %63, double* %65
%66 = load double*, double** %3
%67 = getelementptr inbounds double, double* %66, i64 2
%68 = load double, double* %67
store double %68, double* %5
%69 = load double, double* %4
%70 = call double @cos(double %69)
%71 = load double*, double** %3
%72 = getelementptr inbounds double, double* %71, i64 2
%73 = load double, double* %72
%74 = load double, double* %4
%75 = call double @sin(double %74)
%76 = fneg double %75
%77 = load double*, double** %3
%78 = getelementptr inbounds double, double* %77, i64 10
%79 = load double, double* %78
%80 = fmul double %76, %79
%81 = call double @llvm.fmuladd.f64(double %70, double %73, double %80)
%82 = load double*, double** %3
%83 = getelementptr inbounds double, double* %82, i64 2
store double %81, double* %83
%84 = load double, double* %4
%85 = call double @sin(double %84)
%86 = load double, double* %5
%87 = load double, double* %4
%88 = call double @cos(double %87)
%89 = load double*, double** %3
%90 = getelementptr inbounds double, double* %89, i64 10
%91 = load double, double* %90
%92 = fmul double %88, %91
%93 = call double @llvm.fmuladd.f64(double %85, double %86, double %92)
%94 = load double*, double** %3
%95 = getelementptr inbounds double, double* %94, i64 10
store double %93, double* %95
%96 = load double*, double** %3
%97 = getelementptr inbounds double, double* %96, i64 3
%98 = load double, double* %97
store double %98, double* %5
%99 = load double, double* %4
%100 = call double @cos(double %99)
%101 = load double*, double** %3
%102 = getelementptr inbounds double, double* %101, i64 3
%103 = load double, double* %102
%104 = load double, double* %4
%105 = call double @sin(double %104)
%106 = fneg double %105
%107 = load double*, double** %3
%108 = getelementptr inbounds double, double* %107, i64 11
%109 = load double, double* %108
%110 = fmul double %106, %109
%111 = call double @llvm.fmuladd.f64(double %100, double %103, double %110)
%112 = load double*, double** %3
%113 = getelementptr inbounds double, double* %112, i64 3
store double %111, double* %113
%114 = load double, double* %4
%115 = call double @sin(double %114)
%116 = load double, double* %5
%117 = load double, double* %4
%118 = call double @cos(double %117)
%119 = load double*, double** %3
%120 = getelementptr inbounds double, double* %119, i64 11
%121 = load double, double* %120
%122 = fmul double %118, %121
%123 = call double @llvm.fmuladd.f64(double %115, double %116, double %122)
%124 = load double*, double** %3
%125 = getelementptr inbounds double, double* %124, i64 11
store double %123, double* %125
ret void
}

LLVM IR (-O2):
define void @matrix_rotate_y(double* nocapture %0, double %1) {
%3 = load double, double* %0
%4 = tail call double @cos(double %1)
%5 = load double, double* %0
%6 = tail call double @sin(double %1)
%7 = fneg double %6
%8 = getelementptr inbounds double, double* %0, i64 8
%9 = load double, double* %8
%10 = fmul double %9, %7
%11 = tail call double @llvm.fmuladd.f64(double %4, double %5, double %10)
store double %11, double* %0
%12 = tail call double @sin(double %1)
%13 = tail call double @cos(double %1)
%14 = load double, double* %8
%15 = fmul double %13, %14
%16 = tail call double @llvm.fmuladd.f64(double %12, double %3, double %15)
store double %16, double* %8
%17 = getelementptr inbounds double, double* %0, i64 1
%18 = load double, double* %17
%19 = tail call double @cos(double %1)
%20 = load double, double* %17
%21 = tail call double @sin(double %1)
%22 = fneg double %21
%23 = getelementptr inbounds double, double* %0, i64 9
%24 = load double, double* %23
%25 = fmul double %24, %22
%26 = tail call double @llvm.fmuladd.f64(double %19, double %20, double %25)
store double %26, double* %17
%27 = tail call double @sin(double %1)
%28 = tail call double @cos(double %1)
%29 = load double, double* %23
%30 = fmul double %28, %29
%31 = tail call double @llvm.fmuladd.f64(double %27, double %18, double %30)
store double %31, double* %23
%32 = getelementptr inbounds double, double* %0, i64 2
%33 = load double, double* %32
%34 = tail call double @cos(double %1)
%35 = load double, double* %32
%36 = tail call double @sin(double %1)
%37 = fneg double %36
%38 = getelementptr inbounds double, double* %0, i64 10
%39 = load double, double* %38
%40 = fmul double %39, %37
%41 = tail call double @llvm.fmuladd.f64(double %34, double %35, double %40)
store double %41, double* %32
%42 = tail call double @sin(double %1)
%43 = tail call double @cos(double %1)
%44 = load double, double* %38
%45 = fmul double %43, %44
%46 = tail call double @llvm.fmuladd.f64(double %42, double %33, double %45)
store double %46, double* %38
%47 = getelementptr inbounds double, double* %0, i64 3
%48 = load double, double* %47
%49 = tail call double @cos(double %1)
%50 = load double, double* %47
%51 = tail call double @sin(double %1)
%52 = fneg double %51
%53 = getelementptr inbounds double, double* %0, i64 11
%54 = load double, double* %53
%55 = fmul double %54, %52
%56 = tail call double @llvm.fmuladd.f64(double %49, double %50, double %55)
store double %56, double* %47
%57 = tail call double @sin(double %1)
%58 = tail call double @cos(double %1)
%59 = load double, double* %53
%60 = fmul double %58, %59
%61 = tail call double @llvm.fmuladd.f64(double %57, double %48, double %60)
store double %61, double* %53
ret void
}