#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 */
scalar_t__ acos(float const);
float const sqrt(float const);
float mvVecAngleBetween3(const float *a, const float *b) {
  return (float)acos(((a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2])) /
                     (sqrt((a[0] * a[0]) + (a[1] * a[1]) + (a[2] * a[2])) *
                      sqrt((b[0] * b[0]) + (b[1] * b[1]) + (b[2] * b[2]))));
}


x86 assembly (clang, -O0):
<mvVecAngleBetween3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1040 <sqrt@plt>
movss  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1040 <sqrt@plt>
movss  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x14(%rbp),%xmm0
mulss  %xmm2,%xmm1
divss  %xmm1,%xmm0
call   1030 <acos@plt>
cvtsi2ss %rax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvVecAngleBetween3>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm2
movss  0x4(%rsi),%xmm0
mulss  %xmm2,%xmm0
movss  (%rsi),%xmm4
mulss  %xmm1,%xmm4
addss  %xmm0,%xmm4
movss  0x8(%rdi),%xmm0
movss  0x8(%rsi),%xmm3
mulss  %xmm0,%xmm3
mulss  %xmm2,%xmm2
mulss  %xmm1,%xmm1
addss  %xmm2,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm5,%xmm5
ucomiss %xmm5,%xmm0
jb     1179 <mvVecAngleBetween3+0x59>
xorps  %xmm2,%xmm2
sqrtss %xmm0,%xmm2
jmp    119c <mvVecAngleBetween3+0x7c>
movss  %xmm3,0xc(%rsp)
movss  %xmm4,0x8(%rsp)
call   1040 <sqrt@plt>
xorps  %xmm5,%xmm5
movss  0x8(%rsp),%xmm4
movss  0xc(%rsp),%xmm3
movaps %xmm0,%xmm2
addss  %xmm4,%xmm3
movss  (%rbx),%xmm1
movss  0x4(%rbx),%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rbx),%xmm0
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
ucomiss %xmm5,%xmm0
jb     11cd <mvVecAngleBetween3+0xad>
sqrtss %xmm0,%xmm0
jmp    11ea <mvVecAngleBetween3+0xca>
movss  %xmm3,0xc(%rsp)
movss  %xmm2,0x8(%rsp)
call   1040 <sqrt@plt>
movss  0x8(%rsp),%xmm2
movss  0xc(%rsp),%xmm3
mulss  %xmm0,%xmm2
divss  %xmm2,%xmm3
movaps %xmm3,%xmm0
call   1030 <acos@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @mvVecAngleBetween3(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = fmul float %13, %16
%18 = call float @llvm.fmuladd.f32(float %7, float %10, float %17)
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = load float*, float** %4
%23 = getelementptr inbounds float, float* %22, i64 2
%24 = load float, float* %23
%25 = call float @llvm.fmuladd.f32(float %21, float %24, float %18)
%26 = load float*, float** %3
%27 = getelementptr inbounds float, float* %26, i64 0
%28 = load float, float* %27
%29 = load float*, float** %3
%30 = getelementptr inbounds float, float* %29, i64 0
%31 = load float, float* %30
%32 = load float*, float** %3
%33 = getelementptr inbounds float, float* %32, i64 1
%34 = load float, float* %33
%35 = load float*, float** %3
%36 = getelementptr inbounds float, float* %35, i64 1
%37 = load float, float* %36
%38 = fmul float %34, %37
%39 = call float @llvm.fmuladd.f32(float %28, float %31, float %38)
%40 = load float*, float** %3
%41 = getelementptr inbounds float, float* %40, i64 2
%42 = load float, float* %41
%43 = load float*, float** %3
%44 = getelementptr inbounds float, float* %43, i64 2
%45 = load float, float* %44
%46 = call float @llvm.fmuladd.f32(float %42, float %45, float %39)
%47 = call float @sqrt(float %46)
%48 = load float*, float** %4
%49 = getelementptr inbounds float, float* %48, i64 0
%50 = load float, float* %49
%51 = load float*, float** %4
%52 = getelementptr inbounds float, float* %51, i64 0
%53 = load float, float* %52
%54 = load float*, float** %4
%55 = getelementptr inbounds float, float* %54, i64 1
%56 = load float, float* %55
%57 = load float*, float** %4
%58 = getelementptr inbounds float, float* %57, i64 1
%59 = load float, float* %58
%60 = fmul float %56, %59
%61 = call float @llvm.fmuladd.f32(float %50, float %53, float %60)
%62 = load float*, float** %4
%63 = getelementptr inbounds float, float* %62, i64 2
%64 = load float, float* %63
%65 = load float*, float** %4
%66 = getelementptr inbounds float, float* %65, i64 2
%67 = load float, float* %66
%68 = call float @llvm.fmuladd.f32(float %64, float %67, float %61)
%69 = call float @sqrt(float %68)
%70 = fmul float %47, %69
%71 = fdiv float %25, %70
%72 = call i64 @acos(float %71)
%73 = sitofp i64 %72 to float
ret float %73
}

LLVM IR (-O2):
define float @mvVecAngleBetween3(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fmul float %6, %8
%10 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %9)
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = tail call float @llvm.fmuladd.f32(float %12, float %14, float %10)
%16 = fmul float %6, %6
%17 = tail call float @llvm.fmuladd.f32(float %3, float %3, float %16)
%18 = tail call float @llvm.fmuladd.f32(float %12, float %12, float %17)
%19 = tail call float @sqrt(float %18)
%20 = load float, float* %1
%21 = load float, float* %7
%22 = fmul float %21, %21
%23 = tail call float @llvm.fmuladd.f32(float %20, float %20, float %22)
%24 = load float, float* %13
%25 = tail call float @llvm.fmuladd.f32(float %24, float %24, float %23)
%26 = tail call float @sqrt(float %25)
%27 = fmul float %19, %26
%28 = fdiv float %15, %27
%29 = tail call i64 @acos(float %28)
%30 = sitofp i64 %29 to float
ret float %30
}