void so3_rot2rph(const double R[9], double rph[3]) {
  rph[2] = _fatan2((R[1 * 3 + 0]), (R[0 * 3 + 0]), __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",
                   104);
  double sh, ch;
  _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",
           106);
  rph[1] = _fatan2(-(R[2 * 3 + 0]), (R[0 * 3 + 0]) * ch + (R[1 * 3 + 0]) * sh,
                   __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",
                   109);
  rph[0] = _fatan2((R[0 * 3 + 2]) * sh - (R[1 * 3 + 2]) * ch,
                   -(R[0 * 3 + 1]) * sh + (R[1 * 3 + 1]) * 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",
                   112);
}


x86 assembly (clang, -O0):
<so3_rot2rph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
lea    0xeb8(%rip),%rdi
lea    0xebd(%rip),%rsi
mov    $0x68,%edx
mov    $0x2,%al
call   1030 <_fatan2@plt>
cvtsi2sd %eax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    0xe80(%rip),%rdx
lea    0xe85(%rip),%rcx
mov    $0x6a,%r8d
mov    $0x1,%al
call   1040 <_fsincos@plt>
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x20(%rbp),%xmm3
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
mulsd  -0x18(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
lea    0xe22(%rip),%rdi
lea    0xe27(%rip),%rsi
mov    $0x6d,%edx
mov    $0x2,%al
call   1030 <_fatan2@plt>
cvtsi2sd %eax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x18(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm1
mulsd  -0x20(%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  0x8(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x18(%rbp),%xmm3
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm2
mulsd  -0x20(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
lea    0xd85(%rip),%rdi
lea    0xd8a(%rip),%rsi
mov    $0x70,%edx
mov    $0x2,%al
call   1030 <_fatan2@plt>
cvtsi2sd %eax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<so3_rot2rph>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r12
mov    %rdi,%rbx
movsd  (%rdi),%xmm1
movsd  0x18(%rdi),%xmm0
lea    0xecf(%rip),%r14
lea    0xed4(%rip),%r15
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x68,%edx
mov    $0x2,%al
call   1030 <_fatan2@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x10(%r12)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    %r14,%rdx
mov    %r15,%rcx
mov    $0x6a,%r8d
mov    $0x1,%al
call   1040 <_fsincos@plt>
movsd  0x30(%rbx),%xmm0
xorps  0xe6f(%rip),%xmm0
movsd  0x18(%rbx),%xmm2
mulsd  0x10(%rsp),%xmm2
movsd  (%rbx),%xmm1
mulsd  0x8(%rsp),%xmm1
addsd  %xmm2,%xmm1
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x6d,%edx
mov    $0x2,%al
call   1030 <_fatan2@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%r12)
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm1
movsd  0x28(%rbx),%xmm3
mulsd  %xmm1,%xmm3
movsd  0x10(%rbx),%xmm0
mulsd  %xmm2,%xmm0
mulsd  0x20(%rbx),%xmm1
subsd  %xmm3,%xmm0
mulsd  0x8(%rbx),%xmm2
subsd  %xmm2,%xmm1
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x70,%edx
mov    $0x2,%al
call   1030 <_fatan2@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r12)
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__func__.so3_rot2rph = [12 x i8] c"so3_rot2rph\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_rot2rph(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%7 = load double*, double** %3
%8 = getelementptr inbounds double, double* %7, i64 3
%9 = load double, double* %8
%10 = load double*, double** %3
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = call i32 (double, double, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fatan2 to i32 (double, double, i8*, i8*, i32, ...)*)(double %9, double %12, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.so3_rot2rph, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 104)
%14 = sitofp i32 %13 to double
%15 = load double*, double** %4
%16 = getelementptr inbounds double, double* %15, i64 2
store double %14, double* %16
%17 = load double*, double** %4
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = call i32 (double, double*, double*, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fsincos to i32 (double, double*, double*, i8*, i8*, i32, ...)*)(double %19, double* %5, double* %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.so3_rot2rph, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 106)
%21 = load double*, double** %3
%22 = getelementptr inbounds double, double* %21, i64 6
%23 = load double, double* %22
%24 = fneg double %23
%25 = load double*, double** %3
%26 = getelementptr inbounds double, double* %25, i64 0
%27 = load double, double* %26
%28 = load double, double* %6
%29 = load double*, double** %3
%30 = getelementptr inbounds double, double* %29, i64 3
%31 = load double, double* %30
%32 = load double, double* %5
%33 = fmul double %31, %32
%34 = call double @llvm.fmuladd.f64(double %27, double %28, double %33)
%35 = call i32 (double, double, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fatan2 to i32 (double, double, i8*, i8*, i32, ...)*)(double %24, double %34, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.so3_rot2rph, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 109)
%36 = sitofp i32 %35 to double
%37 = load double*, double** %4
%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
%41 = load double, double* %40
%42 = load double, double* %5
%43 = load double*, double** %3
%44 = getelementptr inbounds double, double* %43, i64 5
%45 = load double, double* %44
%46 = load double, double* %6
%47 = fmul double %45, %46
%48 = fneg double %47
%49 = call double @llvm.fmuladd.f64(double %41, double %42, double %48)
%50 = load double*, double** %3
%51 = getelementptr inbounds double, double* %50, i64 1
%52 = load double, double* %51
%53 = fneg double %52
%54 = load double, double* %5
%55 = load double*, double** %3
%56 = getelementptr inbounds double, double* %55, i64 4
%57 = load double, double* %56
%58 = load double, double* %6
%59 = fmul double %57, %58
%60 = call double @llvm.fmuladd.f64(double %53, double %54, double %59)
%61 = call i32 (double, double, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fatan2 to i32 (double, double, i8*, i8*, i32, ...)*)(double %49, double %60, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.so3_rot2rph, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 112)
%62 = sitofp i32 %61 to double
%63 = load double*, double** %4
%64 = getelementptr inbounds double, double* %63, i64 0
store double %62, double* %64
ret void
}

LLVM IR (-O2):
@__func__.so3_rot2rph = [12 x i8] c"so3_rot2rph\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_rot2rph(double* nocapture %0, double* nocapture writeonly %1) {
%3 = alloca double
%4 = alloca double
%5 = getelementptr inbounds double, double* %0, i64 3
%6 = load double, double* %5
%7 = load double, double* %0
%8 = tail call i32 (double, double, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fatan2 to i32 (double, double, i8*, i8*, i32, ...)*)(double %6, double %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.so3_rot2rph, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 104)
%9 = sitofp i32 %8 to double
%10 = getelementptr inbounds double, double* %1, i64 2
store double %9, double* %10
%11 = bitcast double* %3 to i8*
%12 = bitcast double* %4 to i8*
%13 = call i32 (double, double*, double*, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fsincos to i32 (double, double*, double*, i8*, i8*, i32, ...)*)(double %9, double* %3, double* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.so3_rot2rph, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 106)
%14 = getelementptr inbounds double, double* %0, i64 6
%15 = load double, double* %14
%16 = fneg double %15
%17 = load double, double* %0
%18 = load double, double* %4
%19 = load double, double* %5
%20 = load double, double* %3
%21 = fmul double %19, %20
%22 = call double @llvm.fmuladd.f64(double %17, double %18, double %21)
%23 = call i32 (double, double, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fatan2 to i32 (double, double, i8*, i8*, i32, ...)*)(double %16, double %22, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.so3_rot2rph, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 109)
%24 = sitofp i32 %23 to double
%25 = getelementptr inbounds double, double* %1, i64 1
store double %24, double* %25
%26 = getelementptr inbounds double, double* %0, i64 2
%27 = load double, double* %26
%28 = load double, double* %3
%29 = getelementptr inbounds double, double* %0, i64 5
%30 = load double, double* %29
%31 = load double, double* %4
%32 = fneg double %30
%33 = fmul double %31, %32
%34 = call double @llvm.fmuladd.f64(double %27, double %28, double %33)
%35 = getelementptr inbounds double, double* %0, i64 1
%36 = load double, double* %35
%37 = fneg double %36
%38 = getelementptr inbounds double, double* %0, i64 4
%39 = load double, double* %38
%40 = fmul double %31, %39
%41 = call double @llvm.fmuladd.f64(double %37, double %28, double %40)
%42 = call i32 (double, double, i8*, i8*, i32, ...) bitcast (i32 (...)* @_fatan2 to i32 (double, double, i8*, i8*, i32, ...)*)(double %34, double %41, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.so3_rot2rph, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 112)
%43 = sitofp i32 %42 to double
store double %43, double* %1
ret void
}