#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_dcc2s_(double *, double *, double *);
void slaDcc2s(double v[3], double *a, double *b) {
  double V[3];
  double A;
  double B;
  int i;
  for (i = 0; i < 3; i++)
    V[i] = v[i];
  sla_dcc2s_((double *)V, &A, &B);
  *a = A;
  *b = B;
}


x86 assembly (clang, -O0):
<slaDcc2s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    115a <slaDcc2s+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0x30(%rbp,%rax,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    112b <slaDcc2s+0x1b>
lea    -0x30(%rbp),%rdi
lea    -0x38(%rbp),%rsi
lea    -0x40(%rbp),%rdx
call   1030 <sla_dcc2s_@plt>
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaDcc2s>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
movups (%rdi),%xmm0
movaps %xmm0,0x10(%rsp)
mov    0x10(%rdi),%rax
mov    %rax,0x20(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <sla_dcc2s_@plt>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @slaDcc2s(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca [3 x double]
%8 = alloca double
%9 = alloca 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 = %23, %3
%12 = load i32, i32* %10
%13 = icmp slt i32 %12, 3
br i1 %13, label %14, label %26
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
br label %23
23: ; preds = %14
%24 = load i32, i32* %10
%25 = add nsw i32 %24, 1
store i32 %25, i32* %10
br label %11
26: ; preds = %11
%27 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%28 = call i32 @sla_dcc2s_(double* %27, double* %8, double* %9)
%29 = load double, double* %8
%30 = load double*, double** %5
store double %29, double* %30
%31 = load double, double* %9
%32 = load double*, double** %6
store double %31, double* %32
ret void
}

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