void inicializaciones(double *h, double *X, double *Y, double *A) {
  int i;
  for (i = 0; i < 5 - 1; i++) {
    h[i] = X[i + 1] - X[i];
    A[i] = (Y[i + 1] - Y[i]) / h[i];
  }
}


x86 assembly (clang, -O0):
<inicializaciones>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x4,-0x24(%rbp)
jge    1198 <inicializaciones+0x98>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    111b <inicializaciones+0x1b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<inicializaciones>:
movsd  0x8(%rsi),%xmm0
subsd  (%rsi),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rdx),%xmm1
subsd  (%rdx),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx)
movsd  0x10(%rsi),%xmm0
subsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x10(%rdx),%xmm1
subsd  0x8(%rdx),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rcx)
movsd  0x18(%rsi),%xmm0
subsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdi)
movsd  0x18(%rdx),%xmm1
subsd  0x10(%rdx),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rcx)
movsd  0x20(%rsi),%xmm0
subsd  0x18(%rsi),%xmm0
movsd  %xmm0,0x18(%rdi)
movsd  0x20(%rdx),%xmm1
subsd  0x18(%rdx),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rcx)
ret

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

LLVM IR (-O2):
define void @inicializaciones(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2, double* nocapture writeonly %3) {
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = load double, double* %1
%8 = fsub double %6, %7
store double %8, double* %0
%9 = getelementptr inbounds double, double* %2, i64 1
%10 = load double, double* %9
%11 = load double, double* %2
%12 = fsub double %10, %11
%13 = fdiv double %12, %8
store double %13, double* %3
%14 = getelementptr inbounds double, double* %1, i64 2
%15 = load double, double* %14
%16 = load double, double* %5
%17 = fsub double %15, %16
%18 = getelementptr inbounds double, double* %0, i64 1
store double %17, double* %18
%19 = getelementptr inbounds double, double* %2, i64 2
%20 = load double, double* %19
%21 = load double, double* %9
%22 = fsub double %20, %21
%23 = fdiv double %22, %17
%24 = getelementptr inbounds double, double* %3, i64 1
store double %23, double* %24
%25 = getelementptr inbounds double, double* %1, i64 3
%26 = load double, double* %25
%27 = load double, double* %14
%28 = fsub double %26, %27
%29 = getelementptr inbounds double, double* %0, i64 2
store double %28, double* %29
%30 = getelementptr inbounds double, double* %2, i64 3
%31 = load double, double* %30
%32 = load double, double* %19
%33 = fsub double %31, %32
%34 = fdiv double %33, %28
%35 = getelementptr inbounds double, double* %3, i64 2
store double %34, double* %35
%36 = getelementptr inbounds double, double* %1, i64 4
%37 = load double, double* %36
%38 = load double, double* %25
%39 = fsub double %37, %38
%40 = getelementptr inbounds double, double* %0, i64 3
store double %39, double* %40
%41 = getelementptr inbounds double, double* %2, i64 4
%42 = load double, double* %41
%43 = load double, double* %30
%44 = fsub double %42, %43
%45 = fdiv double %44, %39
%46 = getelementptr inbounds double, double* %3, i64 3
store double %45, double* %46
ret void
}