#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*/ rc_rotate_quaternion_array(float *, float *);
void rc_quaternion_rotate_vector_array(float v[3], float q[4]) {
  float vq[4];
  vq[0] = 0.0f;
  vq[1] = v[0];
  vq[2] = v[1];
  vq[3] = v[2];
  rc_rotate_quaternion_array(vq, q);
  v[0] = vq[1];
  v[1] = vq[2];
  v[2] = vq[3];
  return;
}


x86 assembly (clang, -O0):
<rc_quaternion_rotate_vector_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <rc_rotate_quaternion_array@plt>
movss  -0x1c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rc_quaternion_rotate_vector_array>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movl   $0x0,(%rsp)
movss  (%rdi),%xmm0
movss  %xmm0,0x4(%rsp)
movss  0x4(%rdi),%xmm0
movss  %xmm0,0x8(%rsp)
movss  0x8(%rdi),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %rsp,%rdi
call   1030 <rc_rotate_quaternion_array@plt>
movss  0x4(%rsp),%xmm0
movss  %xmm0,(%rbx)
movss  0x8(%rsp),%xmm0
movss  %xmm0,0x4(%rbx)
movss  0xc(%rsp),%xmm0
movss  %xmm0,0x8(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @rc_quaternion_rotate_vector_array(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca [4 x float]
store float* %0, float** %3
store float* %1, float** %4
%6 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 0
store float 0.000000e+00, float* %6
%7 = load float*, float** %3
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 1
store float %9, float* %10
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 2
store float %13, float* %14
%15 = load float*, float** %3
%16 = getelementptr inbounds float, float* %15, i64 2
%17 = load float, float* %16
%18 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 3
store float %17, float* %18
%19 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 0
%20 = load float*, float** %4
%21 = call i32 @rc_rotate_quaternion_array(float* %19, float* %20)
%22 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 1
%23 = load float, float* %22
%24 = load float*, float** %3
%25 = getelementptr inbounds float, float* %24, i64 0
store float %23, float* %25
%26 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 2
%27 = load float, float* %26
%28 = load float*, float** %3
%29 = getelementptr inbounds float, float* %28, i64 1
store float %27, float* %29
%30 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 3
%31 = load float, float* %30
%32 = load float*, float** %3
%33 = getelementptr inbounds float, float* %32, i64 2
store float %31, float* %33
ret void
}

LLVM IR (-O2):
define void @rc_quaternion_rotate_vector_array(float* nocapture %0, float* %1) {
%3 = alloca [4 x float]
%4 = bitcast [4 x float]* %3 to i8*
%5 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 0
store float 0.000000e+00, float* %5
%6 = load float, float* %0
%7 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 1
store float %6, float* %7
%8 = getelementptr inbounds float, float* %0, i64 1
%9 = load float, float* %8
%10 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 2
store float %9, float* %10
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 3
store float %12, float* %13
%14 = call i32 @rc_rotate_quaternion_array(float* %5, float* %1)
%15 = load float, float* %7
store float %15, float* %0
%16 = load float, float* %10
store float %16, float* %8
%17 = load float, float* %13
store float %17, float* %11
ret void
}