#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*/ sla_dvxv_(double *, double *, double *);
void slaDvxv(double va[3], double vb[3], double vc[3]) {
  double VA[3];
  double VB[3];
  double VC[3];
  int i;
  for (i = 0; i < 3; i++) {
    VA[i] = va[i];
    VB[i] = vb[i];
  }
  sla_dvxv_((double *)VA, (double *)VB, (double *)VC);
  for (i = 0; i < 3; i++)
    vc[i] = VC[i];
}


x86 assembly (clang, -O0):
<slaDvxv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x74(%rbp)
cmpl   $0x3,-0x74(%rbp)
jge    1174 <slaDvxv+0x64>
mov    -0x8(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x74(%rbp),%rax
movsd  %xmm0,-0x30(%rbp,%rax,8)
mov    -0x10(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x74(%rbp),%rax
movsd  %xmm0,-0x50(%rbp,%rax,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    112e <slaDvxv+0x1e>
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x70(%rbp),%rdx
call   1030 <sla_dvxv_@plt>
movl   $0x0,-0x74(%rbp)
cmpl   $0x3,-0x74(%rbp)
jge    11bb <slaDvxv+0xab>
movslq -0x74(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    118c <slaDvxv+0x7c>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaDvxv>:
push   %rbx
sub    $0x60,%rsp
mov    %rdx,%rbx
movups (%rdi),%xmm0
movaps %xmm0,0x40(%rsp)
mov    0x10(%rdi),%rax
mov    %rax,0x50(%rsp)
movups (%rsi),%xmm0
movaps %xmm0,0x20(%rsp)
mov    0x10(%rsi),%rax
mov    %rax,0x30(%rsp)
lea    0x40(%rsp),%rdi
lea    0x20(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <sla_dvxv_@plt>
movaps (%rsp),%xmm0
movups %xmm0,(%rbx)
mov    0x10(%rsp),%rax
mov    %rax,0x10(%rbx)
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @slaDvxv(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca [3 x double]
%8 = alloca [3 x double]
%9 = alloca [3 x double]
%10 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
store i32 0, i32* %10
br label %11
11: ; preds = %31, %3
%12 = load i32, i32* %10
%13 = icmp slt i32 %12, 3
br i1 %13, label %14, label %34
14: ; preds = %11
%15 = load double*, double** %4
%16 = load i32, i32* %10
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds double, double* %15, i64 %17
%19 = load double, double* %18
%20 = load i32, i32* %10
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 %21
store double %19, double* %22
%23 = load double*, double** %5
%24 = load i32, i32* %10
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds double, double* %23, i64 %25
%27 = load double, double* %26
%28 = load i32, i32* %10
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 %29
store double %27, double* %30
br label %31
31: ; preds = %14
%32 = load i32, i32* %10
%33 = add nsw i32 %32, 1
store i32 %33, i32* %10
br label %11
34: ; preds = %11
%35 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%36 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%37 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 0
%38 = call i32 @sla_dvxv_(double* %35, double* %36, double* %37)
store i32 0, i32* %10
br label %39
39: ; preds = %51, %34
%40 = load i32, i32* %10
%41 = icmp slt i32 %40, 3
br i1 %41, label %42, label %54
42: ; preds = %39
%43 = load i32, i32* %10
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %44
%46 = load double, double* %45
%47 = load double*, double** %6
%48 = load i32, i32* %10
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %47, i64 %49
store double %46, double* %50
br label %51
51: ; preds = %42
%52 = load i32, i32* %10
%53 = add nsw i32 %52, 1
store i32 %53, i32* %10
br label %39
54: ; preds = %39
ret void
}

LLVM IR (-O2):
define void @slaDvxv(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = bitcast double* %0 to i8*
%5 = bitcast double* %1 to i8*
%6 = bitcast double* %2 to i8*
%7 = alloca [3 x double]
%8 = bitcast [3 x double]* %7 to i8*
%9 = alloca [3 x double]
%10 = bitcast [3 x double]* %9 to i8*
%11 = alloca [3 x double]
%12 = bitcast [3 x double]* %11 to i8*
%13 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%14 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 0
%15 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0, i64 0
%16 = call i32 @sla_dvxv_(double* %13, double* %14, double* %15)
ret void
}