#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 */
int /*<<< orphan*/ VecSet3fv(float *, float const, float const, float const);
void VecCrossProd3fv(float v[3], const float a[3], const float b[3]) {
  VecSet3fv(v, a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2],
            a[0] * b[1] - a[1] * b[0]);
}


x86 assembly (clang, -O0):
<VecCrossProd3fv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  0x8(%rax),%xmm2
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm1
mov    -0x18(%rbp),%rax
mulss  0x4(%rax),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm3
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x18(%rbp),%rax
mulss  0x8(%rax),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm4
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm3
mov    -0x18(%rbp),%rax
mulss  (%rax),%xmm3
movd   %xmm3,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm3
mulss  %xmm4,%xmm2
addss  %xmm3,%xmm2
call   1030 <VecSet3fv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VecCrossProd3fv>:
movss  (%rsi),%xmm2
movss  0x4(%rsi),%xmm3
movss  0x8(%rdx),%xmm4
movss  0x8(%rsi),%xmm1
movss  (%rdx),%xmm5
movss  0x4(%rdx),%xmm6
movaps %xmm3,%xmm0
mulss  %xmm4,%xmm0
mulss  %xmm2,%xmm4
mulss  %xmm6,%xmm2
mulss  %xmm1,%xmm6
subss  %xmm6,%xmm0
mulss  %xmm5,%xmm1
subss  %xmm4,%xmm1
mulss  %xmm3,%xmm5
subss  %xmm5,%xmm2
jmp    1030 <VecSet3fv@plt>

LLVM IR (-O0):
define void @VecCrossProd3fv(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %4
%8 = load float*, float** %5
%9 = getelementptr inbounds float, float* %8, i64 1
%10 = load float, float* %9
%11 = load float*, float** %6
%12 = getelementptr inbounds float, float* %11, i64 2
%13 = load float, float* %12
%14 = load float*, float** %5
%15 = getelementptr inbounds float, float* %14, i64 2
%16 = load float, float* %15
%17 = load float*, float** %6
%18 = getelementptr inbounds float, float* %17, i64 1
%19 = load float, float* %18
%20 = fmul float %16, %19
%21 = fneg float %20
%22 = call float @llvm.fmuladd.f32(float %10, float %13, float %21)
%23 = load float*, float** %5
%24 = getelementptr inbounds float, float* %23, i64 2
%25 = load float, float* %24
%26 = load float*, float** %6
%27 = getelementptr inbounds float, float* %26, i64 0
%28 = load float, float* %27
%29 = load float*, float** %5
%30 = getelementptr inbounds float, float* %29, i64 0
%31 = load float, float* %30
%32 = load float*, float** %6
%33 = getelementptr inbounds float, float* %32, i64 2
%34 = load float, float* %33
%35 = fmul float %31, %34
%36 = fneg float %35
%37 = call float @llvm.fmuladd.f32(float %25, float %28, float %36)
%38 = load float*, float** %5
%39 = getelementptr inbounds float, float* %38, i64 0
%40 = load float, float* %39
%41 = load float*, float** %6
%42 = getelementptr inbounds float, float* %41, i64 1
%43 = load float, float* %42
%44 = load float*, float** %5
%45 = getelementptr inbounds float, float* %44, i64 1
%46 = load float, float* %45
%47 = load float*, float** %6
%48 = getelementptr inbounds float, float* %47, i64 0
%49 = load float, float* %48
%50 = fmul float %46, %49
%51 = fneg float %50
%52 = call float @llvm.fmuladd.f32(float %40, float %43, float %51)
%53 = call i32 @VecSet3fv(float* %7, float %22, float %37, float %52)
ret void
}

LLVM IR (-O2):
define void @VecCrossProd3fv(float* %0, float* nocapture %1, float* nocapture %2) {
%4 = getelementptr inbounds float, float* %1, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %2, i64 2
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %1, i64 2
%9 = load float, float* %8
%10 = getelementptr inbounds float, float* %2, i64 1
%11 = load float, float* %10
%12 = fneg float %9
%13 = fmul float %11, %12
%14 = tail call float @llvm.fmuladd.f32(float %5, float %7, float %13)
%15 = load float, float* %2
%16 = load float, float* %1
%17 = fneg float %16
%18 = fmul float %7, %17
%19 = tail call float @llvm.fmuladd.f32(float %9, float %15, float %18)
%20 = fneg float %5
%21 = fmul float %15, %20
%22 = tail call float @llvm.fmuladd.f32(float %16, float %11, float %21)
%23 = tail call i32 @VecSet3fv(float* %0, float %14, float %19, float %22)
ret void
}