void Evol(double *u_regalo, double *u_historia, double r) {
  for (int i = 0; i < 100; i++) {
    u_regalo[i] =
        u_historia[i] - r / 2.0 * (u_historia[i + 1] - u_historia[i - 1]);
  }
}


x86 assembly (clang, -O0):
<Evol>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x64,-0x1c(%rbp)
jge    119e <Evol+0x9e>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xec4(%rip),%xmm2
divsd  %xmm2,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1118 <Evol+0x18>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Evol>:
mulsd  0xef8(%rip),%xmm0
lea    0x328(%rsi),%rax
cmp    %rdi,%rax
jbe    1173 <Evol+0x73>
lea    0x320(%rdi),%rax
lea    -0x8(%rsi),%rcx
cmp    %rax,%rcx
jae    1173 <Evol+0x73>
mov    $0xffffffffffffffff,%rax
nopl   0x0(%rax,%rax,1)
movsd  0x10(%rsi,%rax,8),%xmm1
subsd  (%rsi,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x8(%rsi,%rax,8),%xmm1
movsd  %xmm1,0x8(%rdi,%rax,8)
movsd  0x18(%rsi,%rax,8),%xmm1
subsd  0x8(%rsi,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x10(%rsi,%rax,8),%xmm1
movsd  %xmm1,0x10(%rdi,%rax,8)
add    $0x2,%rax
cmp    $0x63,%rax
jne    1130 <Evol+0x30>
jmp    11d0 <Evol+0xd0>
unpcklpd %xmm0,%xmm0
xor    %eax,%eax
nopl   0x0(%rax)
movupd -0x8(%rsi,%rax,8),%xmm1
movupd (%rsi,%rax,8),%xmm2
movupd 0x8(%rsi,%rax,8),%xmm3
subpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm3
addpd  %xmm2,%xmm3
movupd %xmm3,(%rdi,%rax,8)
movupd 0x8(%rsi,%rax,8),%xmm1
movupd 0x10(%rsi,%rax,8),%xmm2
movupd 0x18(%rsi,%rax,8),%xmm3
subpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm3
addpd  %xmm2,%xmm3
movupd %xmm3,0x10(%rdi,%rax,8)
add    $0x4,%rax
cmp    $0x64,%rax
jne    1180 <Evol+0x80>
ret

LLVM IR (-O0):
define void @Evol(double* %0, double* %1, double %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
%7 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store double %2, double* %6
store i32 0, i32* %7
br label %8
8: ; preds = %38, %3
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 100
br i1 %10, label %11, label %41
11: ; preds = %8
%12 = load double*, double** %5
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %12, i64 %14
%16 = load double, double* %15
%17 = load double, double* %6
%18 = fdiv double %17, 2.000000e+00
%19 = load double*, double** %5
%20 = load i32, i32* %7
%21 = add nsw i32 %20, 1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %19, i64 %22
%24 = load double, double* %23
%25 = load double*, double** %5
%26 = load i32, i32* %7
%27 = sub nsw i32 %26, 1
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds double, double* %25, i64 %28
%30 = load double, double* %29
%31 = fsub double %24, %30
%32 = fneg double %18
%33 = call double @llvm.fmuladd.f64(double %32, double %31, double %16)
%34 = load double*, double** %4
%35 = load i32, i32* %7
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double, double* %34, i64 %36
store double %33, double* %37
br label %38
38: ; preds = %11
%39 = load i32, i32* %7
%40 = add nsw i32 %39, 1
store i32 %40, i32* %7
br label %8
41: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @Evol(double* nocapture writeonly %0, double* nocapture %1, double %2) {
%4 = fmul double %2, -5.000000e-01
%5 = getelementptr double, double* %0, i64 100
%6 = getelementptr double, double* %1, i64 -1
%7 = getelementptr double, double* %1, i64 101
%8 = icmp ugt double* %7, %0
%9 = icmp ult double* %6, %5
%10 = and i1 %8, %9
br i1 %10, label %50, label %11
11: ; preds = %3
%12 = insertelement <2 x double> poison, double %4, i64 0
%13 = shufflevector <2 x double> %12, <2 x double> poison, <2 x i32> zeroinitializer
br label %14
14: ; preds = %14, %11
%15 = phi i64 [ 0, %11 ], [ %47, %14 ]
%16 = getelementptr inbounds double, double* %1, i64 %15
%17 = bitcast double* %16 to <2 x double>*
%18 = load <2 x double>, <2 x double>* %17
%19 = or i64 %15, 1
%20 = getelementptr inbounds double, double* %1, i64 %19
%21 = bitcast double* %20 to <2 x double>*
%22 = load <2 x double>, <2 x double>* %21
%23 = add nsw i64 %15, -1
%24 = getelementptr inbounds double, double* %1, i64 %23
%25 = bitcast double* %24 to <2 x double>*
%26 = load <2 x double>, <2 x double>* %25
%27 = fsub <2 x double> %22, %26
%28 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %13, <2 x double> %27, <2 x double> %18)
%29 = getelementptr inbounds double, double* %0, i64 %15
%30 = bitcast double* %29 to <2 x double>*
store <2 x double> %28, <2 x double>* %30
%31 = or i64 %15, 2
%32 = getelementptr inbounds double, double* %1, i64 %31
%33 = bitcast double* %32 to <2 x double>*
%34 = load <2 x double>, <2 x double>* %33
%35 = or i64 %15, 3
%36 = getelementptr inbounds double, double* %1, i64 %35
%37 = bitcast double* %36 to <2 x double>*
%38 = load <2 x double>, <2 x double>* %37
%39 = or i64 %15, 1
%40 = getelementptr inbounds double, double* %1, i64 %39
%41 = bitcast double* %40 to <2 x double>*
%42 = load <2 x double>, <2 x double>* %41
%43 = fsub <2 x double> %38, %42
%44 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %13, <2 x double> %43, <2 x double> %34)
%45 = getelementptr inbounds double, double* %0, i64 %31
%46 = bitcast double* %45 to <2 x double>*
store <2 x double> %44, <2 x double>* %46
%47 = add nuw nsw i64 %15, 4
%48 = icmp eq i64 %47, 100
br i1 %48, label %49, label %14
49: ; preds = %14, %50
ret void
50: ; preds = %3, %50
%51 = phi i64 [ %65, %50 ], [ 0, %3 ]
%52 = getelementptr inbounds double, double* %1, i64 %51
%53 = load double, double* %52
%54 = or i64 %51, 1
%55 = getelementptr inbounds double, double* %1, i64 %54
%56 = load double, double* %55
%57 = add nsw i64 %51, -1
%58 = getelementptr inbounds double, double* %1, i64 %57
%59 = load double, double* %58
%60 = fsub double %56, %59
%61 = tail call double @llvm.fmuladd.f64(double %4, double %60, double %53)
%62 = getelementptr inbounds double, double* %0, i64 %51
store double %61, double* %62
%63 = getelementptr inbounds double, double* %1, i64 %54
%64 = load double, double* %63
%65 = add nuw nsw i64 %51, 2
%66 = getelementptr inbounds double, double* %1, i64 %65
%67 = load double, double* %66
%68 = getelementptr inbounds double, double* %1, i64 %51
%69 = load double, double* %68
%70 = fsub double %67, %69
%71 = tail call double @llvm.fmuladd.f64(double %4, double %70, double %64)
%72 = getelementptr inbounds double, double* %0, i64 %54
store double %71, double* %72
%73 = icmp eq i64 %65, 100
br i1 %73, label %49, label %50
}