#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 */
float *reserva();
float *p_cruz(float *x, float *y) {
  float *z = reserva();
  z[0] = x[1] * y[2] - x[2] * y[1];
  z[1] = x[2] * y[0] - x[0] * y[2];
  z[2] = x[0] * y[1] - x[1] * y[0];
  return z;
}


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

x86 assembly (clang, -O2):
<p_cruz>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <reserva@plt>
movss  0x4(%rbx),%xmm0
movss  0x4(%r14),%xmm1
mulss  0x8(%rbx),%xmm1
mulss  0x8(%r14),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,(%rax)
movss  0x8(%rbx),%xmm0
movss  0x8(%r14),%xmm1
mulss  (%rbx),%xmm1
mulss  (%r14),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,0x4(%rax)
movss  (%rbx),%xmm0
movss  (%r14),%xmm1
mulss  0x4(%rbx),%xmm1
mulss  0x4(%r14),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,0x8(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define float* @p_cruz(float* nocapture %0, float* nocapture %1) {
%3 = tail call float* (...) @reserva()
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %1, i64 2
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %0, i64 2
%9 = load float, float* %8
%10 = getelementptr inbounds float, float* %1, 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)
store float %14, float* %3
%15 = load float, float* %8
%16 = load float, float* %1
%17 = load float, float* %0
%18 = load float, float* %6
%19 = fneg float %17
%20 = fmul float %18, %19
%21 = tail call float @llvm.fmuladd.f32(float %15, float %16, float %20)
%22 = getelementptr inbounds float, float* %3, i64 1
store float %21, float* %22
%23 = load float, float* %0
%24 = load float, float* %10
%25 = load float, float* %4
%26 = load float, float* %1
%27 = fneg float %25
%28 = fmul float %26, %27
%29 = tail call float @llvm.fmuladd.f32(float %23, float %24, float %28)
%30 = getelementptr inbounds float, float* %3, i64 2
store float %29, float* %30
ret float* %3
}