#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_mappa_(double *, double *, double *);
void slaMappa(double eq, double date, double amprms[21]) {
  double EQ;
  double DATE;
  double AMPRMS[21];
  int i;
  EQ = eq;
  DATE = date;
  sla_mappa_(&EQ, &DATE, (double *)AMPRMS);
  for (i = 0; i < 21; i++)
    amprms[i] = AMPRMS[i];
}


x86 assembly (clang, -O0):
<slaMappa>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    -0xd0(%rbp),%rdx
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <sla_mappa_@plt>
movl   $0x0,-0xd4(%rbp)
cmpl   $0x15,-0xd4(%rbp)
jge    119c <slaMappa+0x8c>
movslq -0xd4(%rbp),%rax
movsd  -0xd0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x18(%rbp),%rax
movslq -0xd4(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    115b <slaMappa+0x4b>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaMappa>:
push   %r14
push   %rbx
sub    $0xb8,%rsp
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
movsd  %xmm1,(%rsp)
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
lea    0x10(%rsp),%r14
mov    %r14,%rdx
call   1040 <sla_mappa_@plt>
mov    $0xa8,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <memcpy@plt>
add    $0xb8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @slaMappa(double %0, double %1, double* %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double*
%7 = alloca double
%8 = alloca double
%9 = alloca [21 x double]
%10 = alloca i32
store double %0, double* %4
store double %1, double* %5
store double* %2, double** %6
%11 = load double, double* %4
store double %11, double* %7
%12 = load double, double* %5
store double %12, double* %8
%13 = getelementptr inbounds [21 x double], [21 x double]* %9, i64 0, i64 0
%14 = call i32 @sla_mappa_(double* %7, double* %8, double* %13)
store i32 0, i32* %10
br label %15
15: ; preds = %27, %3
%16 = load i32, i32* %10
%17 = icmp slt i32 %16, 21
br i1 %17, label %18, label %30
18: ; preds = %15
%19 = load i32, i32* %10
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [21 x double], [21 x double]* %9, i64 0, i64 %20
%22 = load double, double* %21
%23 = load double*, double** %6
%24 = load i32, i32* %10
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds double, double* %23, i64 %25
store double %22, double* %26
br label %27
27: ; preds = %18
%28 = load i32, i32* %10
%29 = add nsw i32 %28, 1
store i32 %29, i32* %10
br label %15
30: ; preds = %15
ret void
}

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