void so3_rotxyz(double R[9], const double rph[3]) {
  double sr, sp, sh, cr, cp, ch;
  _fsincos(rph[0], &sr, &cr, __func__,
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/arpit15/OnlineCalibration/refs/heads/"
           "master/src/common/so3.h",
           82);
  _fsincos(rph[1], &sp, &cp, __func__,
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/arpit15/OnlineCalibration/refs/heads/"
           "master/src/common/so3.h",
           83);
  _fsincos(rph[2], &sh, &ch, __func__,
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/arpit15/OnlineCalibration/refs/heads/"
           "master/src/common/so3.h",
           84);
  const double data[] = {ch * cp,
                         -sh * cr + ch * sp * sr,
                         sh * sr + ch * sp * cr,
                         sh * cp,
                         ch * cr + sh * sp * sr,
                         -ch * sr + sh * sp * cr,
                         -sp,
                         cp * sr,
                         cp * cr};
  memcpy(R, data, 9 * sizeof(double));
}


x86 assembly (clang, -O0):
<so3_rotxyz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
lea    -0x18(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    0xeb6(%rip),%rdx
lea    0xeba(%rip),%rcx
mov    $0x52,%r8d
mov    $0x1,%al
call   1040 <_fsincos@plt>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
lea    -0x20(%rbp),%rdi
lea    -0x38(%rbp),%rsi
lea    0xe8a(%rip),%rdx
lea    0xe8e(%rip),%rcx
mov    $0x53,%r8d
mov    $0x1,%al
call   1040 <_fsincos@plt>
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
lea    -0x28(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    0xe5e(%rip),%rdx
lea    0xe62(%rip),%rcx
mov    $0x54,%r8d
mov    $0x1,%al
call   1040 <_fsincos@plt>
movsd  -0x40(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rsi
mov    $0x48,%edx
call   1030 <memcpy@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<so3_rotxyz>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%rbx
mov    %rdi,%r12
movsd  (%rsi),%xmm0
lea    0xee4(%rip),%r14
lea    0xee8(%rip),%r15
lea    0x30(%rsp),%rdi
lea    0x18(%rsp),%rsi
mov    %r14,%rdx
mov    %r15,%rcx
mov    $0x52,%r8d
mov    $0x1,%al
call   1030 <_fsincos@plt>
movsd  0x8(%rbx),%xmm0
lea    0x28(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    %r14,%rdx
mov    %r15,%rcx
mov    $0x53,%r8d
mov    $0x1,%al
call   1030 <_fsincos@plt>
movsd  0x10(%rbx),%xmm0
lea    0x20(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    %r14,%rdx
mov    %r15,%rcx
mov    $0x54,%r8d
mov    $0x1,%al
call   1030 <_fsincos@plt>
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm0
movapd %xmm2,%xmm9
mulsd  %xmm0,%xmm9
movsd  0x20(%rsp),%xmm6
movapd 0xe47(%rip),%xmm8
movapd %xmm6,%xmm4
xorpd  %xmm8,%xmm4
movsd  0x28(%rsp),%xmm10
movapd %xmm2,%xmm1
mulsd  %xmm10,%xmm1
unpcklpd %xmm1,%xmm1
movsd  0x18(%rsp),%xmm5
movsd  0x30(%rsp),%xmm3
movapd %xmm3,%xmm7
unpcklpd %xmm5,%xmm7
mulpd  %xmm7,%xmm1
unpcklpd %xmm6,%xmm4
unpcklpd %xmm3,%xmm5
mulpd  %xmm5,%xmm4
addpd  %xmm1,%xmm4
movapd %xmm0,%xmm1
mulsd  %xmm6,%xmm1
mulsd  %xmm10,%xmm6
movapd %xmm2,%xmm3
xorpd  %xmm8,%xmm3
unpcklpd %xmm6,%xmm6
mulpd  %xmm7,%xmm6
unpcklpd %xmm3,%xmm2
mulpd  %xmm5,%xmm2
addpd  %xmm6,%xmm2
xorpd  %xmm8,%xmm10
unpcklpd %xmm0,%xmm0
mulpd  %xmm7,%xmm0
movsd  %xmm9,(%r12)
movupd %xmm4,0x8(%r12)
movsd  %xmm1,0x18(%r12)
movupd %xmm2,0x20(%r12)
movlpd %xmm10,0x30(%r12)
movupd %xmm0,0x38(%r12)
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__func__.so3_rotxyz = [11 x i8] c"so3_rotxyz\00"
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/arpit15/OnlineCalibration/refs/heads/master/src/common/so3.h\00"
define void @so3_rotxyz(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 [9 x double]
store double* %0, double** %3
store double* %1, double** %4
%12 = load double*, double** %4
%13 = getelementptr inbounds double, double* %12, i64 0
%14 = load double, double* %13
%15 = call i32 (double, double*, double*, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fsincos to i32 (double, double*, double*, i8*, i8*, i32, ...)*)(double %14, double* %5, double* %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.so3_rotxyz, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 82)
%16 = load double*, double** %4
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = call i32 (double, double*, double*, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fsincos to i32 (double, double*, double*, i8*, i8*, i32, ...)*)(double %18, double* %6, double* %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.so3_rotxyz, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 83)
%20 = load double*, double** %4
%21 = getelementptr inbounds double, double* %20, i64 2
%22 = load double, double* %21
%23 = call i32 (double, double*, double*, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fsincos to i32 (double, double*, double*, i8*, i8*, i32, ...)*)(double %22, double* %7, double* %10, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.so3_rotxyz, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 84)
%24 = getelementptr inbounds [9 x double], [9 x double]* %11, i64 0, i64 0
%25 = load double, double* %10
%26 = load double, double* %9
%27 = fmul double %25, %26
store double %27, double* %24
%28 = getelementptr inbounds double, double* %24, i64 1
%29 = load double, double* %7
%30 = fneg double %29
%31 = load double, double* %8
%32 = load double, double* %10
%33 = load double, double* %6
%34 = fmul double %32, %33
%35 = load double, double* %5
%36 = fmul double %34, %35
%37 = call double @llvm.fmuladd.f64(double %30, double %31, double %36)
store double %37, double* %28
%38 = getelementptr inbounds double, double* %28, i64 1
%39 = load double, double* %7
%40 = load double, double* %5
%41 = load double, double* %10
%42 = load double, double* %6
%43 = fmul double %41, %42
%44 = load double, double* %8
%45 = fmul double %43, %44
%46 = call double @llvm.fmuladd.f64(double %39, double %40, double %45)
store double %46, double* %38
%47 = getelementptr inbounds double, double* %38, i64 1
%48 = load double, double* %7
%49 = load double, double* %9
%50 = fmul double %48, %49
store double %50, double* %47
%51 = getelementptr inbounds double, double* %47, i64 1
%52 = load double, double* %10
%53 = load double, double* %8
%54 = load double, double* %7
%55 = load double, double* %6
%56 = fmul double %54, %55
%57 = load double, double* %5
%58 = fmul double %56, %57
%59 = call double @llvm.fmuladd.f64(double %52, double %53, double %58)
store double %59, double* %51
%60 = getelementptr inbounds double, double* %51, i64 1
%61 = load double, double* %10
%62 = fneg double %61
%63 = load double, double* %5
%64 = load double, double* %7
%65 = load double, double* %6
%66 = fmul double %64, %65
%67 = load double, double* %8
%68 = fmul double %66, %67
%69 = call double @llvm.fmuladd.f64(double %62, double %63, double %68)
store double %69, double* %60
%70 = getelementptr inbounds double, double* %60, i64 1
%71 = load double, double* %6
%72 = fneg double %71
store double %72, double* %70
%73 = getelementptr inbounds double, double* %70, i64 1
%74 = load double, double* %9
%75 = load double, double* %5
%76 = fmul double %74, %75
store double %76, double* %73
%77 = getelementptr inbounds double, double* %73, i64 1
%78 = load double, double* %9
%79 = load double, double* %8
%80 = fmul double %78, %79
store double %80, double* %77
%81 = load double*, double** %3
%82 = bitcast double* %81 to i8*
%83 = getelementptr inbounds [9 x double], [9 x double]* %11, i64 0, i64 0
%84 = bitcast double* %83 to i8*
ret void
}

LLVM IR (-O2):
@__func__.so3_rotxyz = [11 x i8] c"so3_rotxyz\00"
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/arpit15/OnlineCalibration/refs/heads/master/src/common/so3.h\00"
define void @so3_rotxyz(double* nocapture writeonly %0, double* nocapture %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = bitcast double* %3 to i8*
%10 = bitcast double* %4 to i8*
%11 = bitcast double* %5 to i8*
%12 = bitcast double* %6 to i8*
%13 = bitcast double* %7 to i8*
%14 = bitcast double* %8 to i8*
%15 = load double, double* %1
%16 = call i32 (double, double*, double*, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fsincos to i32 (double, double*, double*, i8*, i8*, i32, ...)*)(double %15, double* %3, double* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.so3_rotxyz, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 82)
%17 = getelementptr inbounds double, double* %1, i64 1
%18 = load double, double* %17
%19 = call i32 (double, double*, double*, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fsincos to i32 (double, double*, double*, i8*, i8*, i32, ...)*)(double %18, double* %4, double* %7, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.so3_rotxyz, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 83)
%20 = getelementptr inbounds double, double* %1, i64 2
%21 = load double, double* %20
%22 = call i32 (double, double*, double*, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fsincos to i32 (double, double*, double*, i8*, i8*, i32, ...)*)(double %21, double* %5, double* %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.so3_rotxyz, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 84)
%23 = load double, double* %8
%24 = load double, double* %7
%25 = fmul double %23, %24
%26 = load double, double* %5
%27 = fneg double %26
%28 = load double, double* %6
%29 = load double, double* %4
%30 = fmul double %23, %29
%31 = load double, double* %3
%32 = insertelement <2 x double> poison, double %30, i64 0
%33 = shufflevector <2 x double> %32, <2 x double> poison, <2 x i32> zeroinitializer
%34 = insertelement <2 x double> poison, double %31, i64 0
%35 = insertelement <2 x double> %34, double %28, i64 1
%36 = fmul <2 x double> %33, %35
%37 = insertelement <2 x double> poison, double %27, i64 0
%38 = insertelement <2 x double> %37, double %26, i64 1
%39 = insertelement <2 x double> poison, double %28, i64 0
%40 = insertelement <2 x double> %39, double %31, i64 1
%41 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %38, <2 x double> %40, <2 x double> %36)
%42 = fmul double %24, %26
%43 = fmul double %26, %29
%44 = fneg double %23
%45 = insertelement <2 x double> poison, double %43, i64 0
%46 = shufflevector <2 x double> %45, <2 x double> poison, <2 x i32> zeroinitializer
%47 = fmul <2 x double> %46, %35
%48 = insertelement <2 x double> poison, double %23, i64 0
%49 = insertelement <2 x double> %48, double %44, i64 1
%50 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %49, <2 x double> %40, <2 x double> %47)
%51 = fneg double %29
%52 = insertelement <2 x double> poison, double %24, i64 0
%53 = shufflevector <2 x double> %52, <2 x double> poison, <2 x i32> zeroinitializer
%54 = fmul <2 x double> %53, %35
store double %25, double* %0
%55 = getelementptr inbounds double, double* %0, i64 1
%56 = bitcast double* %55 to <2 x double>*
store <2 x double> %41, <2 x double>* %56
%57 = getelementptr inbounds double, double* %0, i64 3
store double %42, double* %57
%58 = getelementptr inbounds double, double* %0, i64 4
%59 = bitcast double* %58 to <2 x double>*
store <2 x double> %50, <2 x double>* %59
%60 = getelementptr inbounds double, double* %0, i64 6
store double %51, double* %60
%61 = getelementptr inbounds double, double* %0, i64 7
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> %54, <2 x double>* %62
ret void
}