void aan_ecuacion_ondas_metodo_explicito(float *red_input, float *green_input,
                                         float *blue_input, float *red_output,
                                         float *green_output,
                                         float *blue_output, int width,
                                         int height, float dt, int Niter) {
  int i;
  float *red = (float *)malloc(sizeof(float) * width * height);
  float *green = (float *)malloc(sizeof(float) * width * height);
  float *blue = (float *)malloc(sizeof(float) * width * height);
  float *red_anterior = (float *)malloc(sizeof(float) * width * height);
  float *green_anterior = (float *)malloc(sizeof(float) * width * height);
  float *blue_anterior = (float *)malloc(sizeof(float) * width * height);
  memcpy(red, red_input, sizeof(float) * width * height);
  memcpy(green, green_input, sizeof(float) * width * height);
  memcpy(blue, blue_input, sizeof(float) * width * height);
  memcpy(red_anterior, red_input, sizeof(float) * width * height);
  memcpy(green_anterior, green_input, sizeof(float) * width * height);
  memcpy(blue_anterior, blue_input, sizeof(float) * width * height);
  for (i = 0; i < Niter; i++) {
    unsigned char *ured, *ugreen, *ublue;
    char imagen[100];
    aan_ondas_un_canal(red, red_output, red_anterior, width, height, dt);
    aan_ondas_un_canal(green, green_output, green_anterior, width, height, dt);
    aan_ondas_un_canal(blue, blue_output, blue_anterior, width, height, dt);
    memcpy(red_anterior, red, sizeof(float) * width * height);
    memcpy(green_anterior, green, sizeof(float) * width * height);
    memcpy(blue_anterior, blue, sizeof(float) * width * height);
    sprintf(imagen, "imagen_1%05d.bmp", i);
    ured = float_to_uchar(red_output, width * height);
    ugreen = float_to_uchar(green_output, width * height);
    ublue = float_to_uchar(blue_output, width * height);
    ami_write_bmp(imagen, ured, ugreen, ublue, width, height);
    free(ured);
    free(ugreen);
    free(ublue);
    memcpy(red, red_output, sizeof(float) * width * height);
    memcpy(green, green_output, sizeof(float) * width * height);
    memcpy(blue, blue_output, sizeof(float) * width * height);
  }
  free(red);
  free(green);
  free(blue);
  free(red_anterior);
  free(green_anterior);
  free(blue_anterior);
}


x86 assembly (clang, -O0):
<aan_ecuacion_ondas_metodo_explicito>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movss  %xmm0,-0x34(%rbp)
movslq 0x10(%rbp),%rdi
shl    $0x2,%rdi
movslq 0x18(%rbp),%rax
imul   %rax,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x40(%rbp)
movslq 0x10(%rbp),%rdi
shl    $0x2,%rdi
movslq 0x18(%rbp),%rax
imul   %rax,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x48(%rbp)
movslq 0x10(%rbp),%rdi
shl    $0x2,%rdi
movslq 0x18(%rbp),%rax
imul   %rax,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x50(%rbp)
movslq 0x10(%rbp),%rdi
shl    $0x2,%rdi
movslq 0x18(%rbp),%rax
imul   %rax,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x58(%rbp)
movslq 0x10(%rbp),%rdi
shl    $0x2,%rdi
movslq 0x18(%rbp),%rax
imul   %rax,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x60(%rbp)
movslq 0x10(%rbp),%rdi
shl    $0x2,%rdi
movslq 0x18(%rbp),%rax
imul   %rax,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x68(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq 0x10(%rbp),%rdx
shl    $0x2,%rdx
movslq 0x18(%rbp),%rax
imul   %rax,%rdx
call   1060 <memcpy@plt>
mov    -0x48(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq 0x10(%rbp),%rdx
shl    $0x2,%rdx
movslq 0x18(%rbp),%rax
imul   %rax,%rdx
call   1060 <memcpy@plt>
mov    -0x50(%rbp),%rdi
mov    -0x18(%rbp),%rsi
movslq 0x10(%rbp),%rdx
shl    $0x2,%rdx
movslq 0x18(%rbp),%rax
imul   %rax,%rdx
call   1060 <memcpy@plt>
mov    -0x58(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq 0x10(%rbp),%rdx
shl    $0x2,%rdx
movslq 0x18(%rbp),%rax
imul   %rax,%rdx
call   1060 <memcpy@plt>
mov    -0x60(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq 0x10(%rbp),%rdx
shl    $0x2,%rdx
movslq 0x18(%rbp),%rax
imul   %rax,%rdx
call   1060 <memcpy@plt>
mov    -0x68(%rbp),%rdi
mov    -0x18(%rbp),%rsi
movslq 0x10(%rbp),%rdx
shl    $0x2,%rdx
movslq 0x18(%rbp),%rax
imul   %rax,%rdx
call   1060 <memcpy@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    14ba <aan_ecuacion_ondas_metodo_explicito+0x34a>
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    0x10(%rbp),%ecx
mov    0x18(%rbp),%r8d
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <aan_ondas_un_canal@plt>
mov    -0x48(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x60(%rbp),%rdx
mov    0x10(%rbp),%ecx
mov    0x18(%rbp),%r8d
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <aan_ondas_un_canal@plt>
mov    -0x50(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    0x10(%rbp),%ecx
mov    0x18(%rbp),%r8d
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <aan_ondas_un_canal@plt>
mov    -0x58(%rbp),%rdi
mov    -0x40(%rbp),%rsi
movslq 0x10(%rbp),%rdx
shl    $0x2,%rdx
movslq 0x18(%rbp),%rax
imul   %rax,%rdx
call   1060 <memcpy@plt>
mov    -0x60(%rbp),%rdi
mov    -0x48(%rbp),%rsi
movslq 0x10(%rbp),%rdx
shl    $0x2,%rdx
movslq 0x18(%rbp),%rax
imul   %rax,%rdx
call   1060 <memcpy@plt>
mov    -0x68(%rbp),%rdi
mov    -0x50(%rbp),%rsi
movslq 0x10(%rbp),%rdx
shl    $0x2,%rdx
movslq 0x18(%rbp),%rax
imul   %rax,%rdx
call   1060 <memcpy@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x38(%rbp),%edx
lea    0xc37(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x20(%rbp),%rdi
mov    0x10(%rbp),%esi
imul   0x18(%rbp),%esi
mov    $0x0,%al
call   1050 <float_to_uchar@plt>
cltq
mov    %rax,-0x70(%rbp)
mov    -0x28(%rbp),%rdi
mov    0x10(%rbp),%esi
imul   0x18(%rbp),%esi
mov    $0x0,%al
call   1050 <float_to_uchar@plt>
cltq
mov    %rax,-0x78(%rbp)
mov    -0x30(%rbp),%rdi
mov    0x10(%rbp),%esi
imul   0x18(%rbp),%esi
mov    $0x0,%al
call   1050 <float_to_uchar@plt>
cltq
mov    %rax,-0x80(%rbp)
lea    -0xf0(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0x78(%rbp),%rdx
mov    -0x80(%rbp),%rcx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    $0x0,%al
call   1080 <ami_write_bmp@plt>
mov    -0x70(%rbp),%rdi
call   1040 <free@plt>
mov    -0x78(%rbp),%rdi
call   1040 <free@plt>
mov    -0x80(%rbp),%rdi
call   1040 <free@plt>
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rsi
movslq 0x10(%rbp),%rdx
shl    $0x2,%rdx
movslq 0x18(%rbp),%rax
imul   %rax,%rdx
call   1060 <memcpy@plt>
mov    -0x48(%rbp),%rdi
mov    -0x28(%rbp),%rsi
movslq 0x10(%rbp),%rdx
shl    $0x2,%rdx
movslq 0x18(%rbp),%rax
imul   %rax,%rdx
call   1060 <memcpy@plt>
mov    -0x50(%rbp),%rdi
mov    -0x30(%rbp),%rsi
movslq 0x10(%rbp),%rdx
shl    $0x2,%rdx
movslq 0x18(%rbp),%rax
imul   %rax,%rdx
call   1060 <memcpy@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12ec <aan_ecuacion_ondas_metodo_explicito+0x17c>
mov    -0x40(%rbp),%rdi
call   1040 <free@plt>
mov    -0x48(%rbp),%rdi
call   1040 <free@plt>
mov    -0x50(%rbp),%rdi
call   1040 <free@plt>
mov    -0x58(%rbp),%rdi
call   1040 <free@plt>
mov    -0x60(%rbp),%rdi
call   1040 <free@plt>
mov    -0x68(%rbp),%rdi
call   1040 <free@plt>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aan_ecuacion_ondas_metodo_explicito>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
movss  %xmm0,0x64(%rsp)
mov    %r9,%rbp
mov    %r8,0x78(%rsp)
mov    %rcx,0x58(%rsp)
mov    %rdx,0x8(%rsp)
mov    %rsi,0x10(%rsp)
mov    %rdi,%r13
mov    %rdi,0x38(%rsp)
movslq 0x128(%rsp),%rax
movslq 0x120(%rsp),%r14
mov    0x130(%rsp),%r15d
mov    %r14,0x48(%rsp)
mov    %rax,0x50(%rsp)
imul   %rax,%r14
shl    $0x2,%r14
mov    %r14,%rdi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1070 <malloc@plt>
mov    %rax,%r12
mov    %r14,%rdi
call   1070 <malloc@plt>
mov    %rax,0x28(%rsp)
mov    %r14,%rdi
call   1070 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %r14,%rdi
call   1070 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    %r14,%rdi
call   1070 <malloc@plt>
mov    %rax,0x40(%rsp)
mov    %rbx,0x30(%rsp)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
call   1060 <memcpy@plt>
mov    %r12,%rbx
mov    %r12,%rdi
mov    0x10(%rsp),%r13
mov    %r13,%rsi
mov    %r14,%rdx
call   1060 <memcpy@plt>
mov    0x28(%rsp),%rdi
mov    0x8(%rsp),%r12
mov    %r12,%rsi
mov    %r14,%rdx
call   1060 <memcpy@plt>
mov    0x20(%rsp),%rdi
mov    0x38(%rsp),%rsi
mov    %r14,%rdx
call   1060 <memcpy@plt>
mov    0x18(%rsp),%rdi
mov    %r13,%rsi
mov    %r14,%rdx
call   1060 <memcpy@plt>
mov    0x40(%rsp),%rdi
mov    %r12,%rsi
mov    %r14,%rdx
call   1060 <memcpy@plt>
test   %r15d,%r15d
jle    1460 <aan_ecuacion_ondas_metodo_explicito+0x2f0>
mov    %r14,%r15
movss  0x64(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    0x50(%rsp),%rax
imul   0x48(%rsp),%eax
mov    %eax,0x38(%rsp)
movl   $0x0,0x10(%rsp)
mov    %rbp,0x70(%rsp)
mov    %rbx,0x68(%rsp)
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%r14
mov    %rbp,%r13
mov    0x30(%rsp),%rdi
mov    0x58(%rsp),%rsi
mov    0x20(%rsp),%rdx
mov    0x48(%rsp),%rbx
mov    %ebx,%ecx
mov    0x50(%rsp),%rbp
mov    %ebp,%r8d
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1030 <aan_ondas_un_canal@plt>
mov    %r14,%rdi
mov    0x78(%rsp),%rsi
mov    0x18(%rsp),%rdx
mov    %ebx,%ecx
mov    %ebp,%r8d
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1030 <aan_ondas_un_canal@plt>
mov    0x28(%rsp),%r12
mov    %r12,%rdi
mov    %r13,%rsi
mov    0x40(%rsp),%r13
mov    %r13,%rdx
mov    %ebx,%ecx
mov    %ebp,%r8d
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1030 <aan_ondas_un_canal@plt>
mov    0x20(%rsp),%rdi
mov    0x30(%rsp),%rsi
mov    %r15,%rdx
call   1060 <memcpy@plt>
mov    0x18(%rsp),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1060 <memcpy@plt>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1060 <memcpy@plt>
lea    0x80(%rsp),%rdi
lea    0xc7c(%rip),%rsi
mov    0x10(%rsp),%r12d
mov    %r12d,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
mov    0x58(%rsp),%rdi
mov    0x38(%rsp),%ebx
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <float_to_uchar@plt>
mov    0x78(%rsp),%r14
movslq %eax,%rbp
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <float_to_uchar@plt>
movslq %eax,%r13
mov    0x70(%rsp),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <float_to_uchar@plt>
movslq %eax,%rbx
lea    0x80(%rsp),%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
mov    0x48(%rsp),%r8
mov    0x50(%rsp),%r9
xor    %eax,%eax
call   1080 <ami_write_bmp@plt>
mov    %rbp,%rdi
call   1040 <free@plt>
mov    %r13,%rdi
mov    0x130(%rsp),%r13d
call   1040 <free@plt>
mov    %rbx,%rdi
mov    0x70(%rsp),%rbx
call   1040 <free@plt>
mov    0x30(%rsp),%rdi
mov    0x58(%rsp),%rsi
mov    %r15,%rdx
call   1060 <memcpy@plt>
mov    0x68(%rsp),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1060 <memcpy@plt>
mov    0x28(%rsp),%rdi
mov    %rbx,%rbp
mov    %rbx,%rsi
mov    %r15,%rdx
call   1060 <memcpy@plt>
add    $0x1,%r12d
mov    %r12d,0x10(%rsp)
cmp    %r12d,%r13d
mov    0x68(%rsp),%rbx
jne    12d0 <aan_ecuacion_ondas_metodo_explicito+0x160>
mov    0x30(%rsp),%rdi
call   1040 <free@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
mov    0x28(%rsp),%rdi
call   1040 <free@plt>
mov    0x20(%rsp),%rdi
call   1040 <free@plt>
mov    0x18(%rsp),%rdi
call   1040 <free@plt>
mov    0x40(%rsp),%rdi
call   1040 <free@plt>
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"imagen_1%05d.bmp\00"
define void @aan_ecuacion_ondas_metodo_explicito(float* %0, float* %1, float* %2, float* %3, float* %4, float* %5, i32 %6, i32 %7, float %8, i32 %9) {
%11 = alloca float*
%12 = alloca float*
%13 = alloca float*
%14 = alloca float*
%15 = alloca float*
%16 = alloca float*
%17 = alloca i32
%18 = alloca i32
%19 = alloca float
%20 = alloca i32
%21 = alloca i32
%22 = alloca float*
%23 = alloca float*
%24 = alloca float*
%25 = alloca float*
%26 = alloca float*
%27 = alloca float*
%28 = alloca i8*
%29 = alloca i8*
%30 = alloca i8*
%31 = alloca [100 x i8]
store float* %0, float** %11
store float* %1, float** %12
store float* %2, float** %13
store float* %3, float** %14
store float* %4, float** %15
store float* %5, float** %16
store i32 %6, i32* %17
store i32 %7, i32* %18
store float %8, float* %19
store i32 %9, i32* %20
%32 = load i32, i32* %17
%33 = sext i32 %32 to i64
%34 = mul i64 4, %33
%35 = load i32, i32* %18
%36 = sext i32 %35 to i64
%37 = mul i64 %34, %36
%38 = call i8* @malloc(i64 %37)
%39 = bitcast i8* %38 to float*
store float* %39, float** %22
%40 = load i32, i32* %17
%41 = sext i32 %40 to i64
%42 = mul i64 4, %41
%43 = load i32, i32* %18
%44 = sext i32 %43 to i64
%45 = mul i64 %42, %44
%46 = call i8* @malloc(i64 %45)
%47 = bitcast i8* %46 to float*
store float* %47, float** %23
%48 = load i32, i32* %17
%49 = sext i32 %48 to i64
%50 = mul i64 4, %49
%51 = load i32, i32* %18
%52 = sext i32 %51 to i64
%53 = mul i64 %50, %52
%54 = call i8* @malloc(i64 %53)
%55 = bitcast i8* %54 to float*
store float* %55, float** %24
%56 = load i32, i32* %17
%57 = sext i32 %56 to i64
%58 = mul i64 4, %57
%59 = load i32, i32* %18
%60 = sext i32 %59 to i64
%61 = mul i64 %58, %60
%62 = call i8* @malloc(i64 %61)
%63 = bitcast i8* %62 to float*
store float* %63, float** %25
%64 = load i32, i32* %17
%65 = sext i32 %64 to i64
%66 = mul i64 4, %65
%67 = load i32, i32* %18
%68 = sext i32 %67 to i64
%69 = mul i64 %66, %68
%70 = call i8* @malloc(i64 %69)
%71 = bitcast i8* %70 to float*
store float* %71, float** %26
%72 = load i32, i32* %17
%73 = sext i32 %72 to i64
%74 = mul i64 4, %73
%75 = load i32, i32* %18
%76 = sext i32 %75 to i64
%77 = mul i64 %74, %76
%78 = call i8* @malloc(i64 %77)
%79 = bitcast i8* %78 to float*
store float* %79, float** %27
%80 = load float*, float** %22
%81 = bitcast float* %80 to i8*
%82 = load float*, float** %11
%83 = bitcast float* %82 to i8*
%84 = load i32, i32* %17
%85 = sext i32 %84 to i64
%86 = mul i64 4, %85
%87 = load i32, i32* %18
%88 = sext i32 %87 to i64
%89 = mul i64 %86, %88
%90 = load float*, float** %23
%91 = bitcast float* %90 to i8*
%92 = load float*, float** %12
%93 = bitcast float* %92 to i8*
%94 = load i32, i32* %17
%95 = sext i32 %94 to i64
%96 = mul i64 4, %95
%97 = load i32, i32* %18
%98 = sext i32 %97 to i64
%99 = mul i64 %96, %98
%100 = load float*, float** %24
%101 = bitcast float* %100 to i8*
%102 = load float*, float** %13
%103 = bitcast float* %102 to i8*
%104 = load i32, i32* %17
%105 = sext i32 %104 to i64
%106 = mul i64 4, %105
%107 = load i32, i32* %18
%108 = sext i32 %107 to i64
%109 = mul i64 %106, %108
%110 = load float*, float** %25
%111 = bitcast float* %110 to i8*
%112 = load float*, float** %11
%113 = bitcast float* %112 to i8*
%114 = load i32, i32* %17
%115 = sext i32 %114 to i64
%116 = mul i64 4, %115
%117 = load i32, i32* %18
%118 = sext i32 %117 to i64
%119 = mul i64 %116, %118
%120 = load float*, float** %26
%121 = bitcast float* %120 to i8*
%122 = load float*, float** %12
%123 = bitcast float* %122 to i8*
%124 = load i32, i32* %17
%125 = sext i32 %124 to i64
%126 = mul i64 4, %125
%127 = load i32, i32* %18
%128 = sext i32 %127 to i64
%129 = mul i64 %126, %128
%130 = load float*, float** %27
%131 = bitcast float* %130 to i8*
%132 = load float*, float** %13
%133 = bitcast float* %132 to i8*
%134 = load i32, i32* %17
%135 = sext i32 %134 to i64
%136 = mul i64 4, %135
%137 = load i32, i32* %18
%138 = sext i32 %137 to i64
%139 = mul i64 %136, %138
store i32 0, i32* %21
br label %140
140: ; preds = %263, %10
%141 = load i32, i32* %21
%142 = load i32, i32* %20
%143 = icmp slt i32 %141, %142
br i1 %143, label %144, label %266
144: ; preds = %140
%145 = load float*, float** %22
%146 = load float*, float** %14
%147 = load float*, float** %25
%148 = load i32, i32* %17
%149 = load i32, i32* %18
%150 = load float, float* %19
%151 = fpext float %150 to double
%152 = call i32 (float*, float*, float*, i32, i32, double, ...) bitcast (i32 (...)* @aan_ondas_un_canal to i32 (float*, float*, float*, i32, i32, double, ...)*)(float* %145, float* %146, float* %147, i32 %148, i32 %149, double %151)
%153 = load float*, float** %23
%154 = load float*, float** %15
%155 = load float*, float** %26
%156 = load i32, i32* %17
%157 = load i32, i32* %18
%158 = load float, float* %19
%159 = fpext float %158 to double
%160 = call i32 (float*, float*, float*, i32, i32, double, ...) bitcast (i32 (...)* @aan_ondas_un_canal to i32 (float*, float*, float*, i32, i32, double, ...)*)(float* %153, float* %154, float* %155, i32 %156, i32 %157, double %159)
%161 = load float*, float** %24
%162 = load float*, float** %16
%163 = load float*, float** %27
%164 = load i32, i32* %17
%165 = load i32, i32* %18
%166 = load float, float* %19
%167 = fpext float %166 to double
%168 = call i32 (float*, float*, float*, i32, i32, double, ...) bitcast (i32 (...)* @aan_ondas_un_canal to i32 (float*, float*, float*, i32, i32, double, ...)*)(float* %161, float* %162, float* %163, i32 %164, i32 %165, double %167)
%169 = load float*, float** %25
%170 = bitcast float* %169 to i8*
%171 = load float*, float** %22
%172 = bitcast float* %171 to i8*
%173 = load i32, i32* %17
%174 = sext i32 %173 to i64
%175 = mul i64 4, %174
%176 = load i32, i32* %18
%177 = sext i32 %176 to i64
%178 = mul i64 %175, %177
%179 = load float*, float** %26
%180 = bitcast float* %179 to i8*
%181 = load float*, float** %23
%182 = bitcast float* %181 to i8*
%183 = load i32, i32* %17
%184 = sext i32 %183 to i64
%185 = mul i64 4, %184
%186 = load i32, i32* %18
%187 = sext i32 %186 to i64
%188 = mul i64 %185, %187
%189 = load float*, float** %27
%190 = bitcast float* %189 to i8*
%191 = load float*, float** %24
%192 = bitcast float* %191 to i8*
%193 = load i32, i32* %17
%194 = sext i32 %193 to i64
%195 = mul i64 4, %194
%196 = load i32, i32* %18
%197 = sext i32 %196 to i64
%198 = mul i64 %195, %197
%199 = getelementptr inbounds [100 x i8], [100 x i8]* %31, i64 0, i64 0
%200 = load i32, i32* %21
%201 = call i32 (i8*, i8*, ...) @sprintf(i8* %199, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %200)
%202 = load float*, float** %14
%203 = load i32, i32* %17
%204 = load i32, i32* %18
%205 = mul nsw i32 %203, %204
%206 = call i32 (float*, i32, ...) bitcast (i32 (...)* @float_to_uchar to i32 (float*, i32, ...)*)(float* %202, i32 %205)
%207 = sext i32 %206 to i64
%208 = inttoptr i64 %207 to i8*
store i8* %208, i8** %28
%209 = load float*, float** %15
%210 = load i32, i32* %17
%211 = load i32, i32* %18
%212 = mul nsw i32 %210, %211
%213 = call i32 (float*, i32, ...) bitcast (i32 (...)* @float_to_uchar to i32 (float*, i32, ...)*)(float* %209, i32 %212)
%214 = sext i32 %213 to i64
%215 = inttoptr i64 %214 to i8*
store i8* %215, i8** %29
%216 = load float*, float** %16
%217 = load i32, i32* %17
%218 = load i32, i32* %18
%219 = mul nsw i32 %217, %218
%220 = call i32 (float*, i32, ...) bitcast (i32 (...)* @float_to_uchar to i32 (float*, i32, ...)*)(float* %216, i32 %219)
%221 = sext i32 %220 to i64
%222 = inttoptr i64 %221 to i8*
store i8* %222, i8** %30
%223 = getelementptr inbounds [100 x i8], [100 x i8]* %31, i64 0, i64 0
%224 = load i8*, i8** %28
%225 = load i8*, i8** %29
%226 = load i8*, i8** %30
%227 = load i32, i32* %17
%228 = load i32, i32* %18
%229 = call i32 (i8*, i8*, i8*, i8*, i32, i32, ...) bitcast (i32 (...)* @ami_write_bmp to i32 (i8*, i8*, i8*, i8*, i32, i32, ...)*)(i8* %223, i8* %224, i8* %225, i8* %226, i32 %227, i32 %228)
%230 = load i8*, i8** %28
%231 = load i8*, i8** %29
%232 = load i8*, i8** %30
%233 = load float*, float** %22
%234 = bitcast float* %233 to i8*
%235 = load float*, float** %14
%236 = bitcast float* %235 to i8*
%237 = load i32, i32* %17
%238 = sext i32 %237 to i64
%239 = mul i64 4, %238
%240 = load i32, i32* %18
%241 = sext i32 %240 to i64
%242 = mul i64 %239, %241
%243 = load float*, float** %23
%244 = bitcast float* %243 to i8*
%245 = load float*, float** %15
%246 = bitcast float* %245 to i8*
%247 = load i32, i32* %17
%248 = sext i32 %247 to i64
%249 = mul i64 4, %248
%250 = load i32, i32* %18
%251 = sext i32 %250 to i64
%252 = mul i64 %249, %251
%253 = load float*, float** %24
%254 = bitcast float* %253 to i8*
%255 = load float*, float** %16
%256 = bitcast float* %255 to i8*
%257 = load i32, i32* %17
%258 = sext i32 %257 to i64
%259 = mul i64 4, %258
%260 = load i32, i32* %18
%261 = sext i32 %260 to i64
%262 = mul i64 %259, %261
br label %263
263: ; preds = %144
%264 = load i32, i32* %21
%265 = add nsw i32 %264, 1
store i32 %265, i32* %21
br label %140
266: ; preds = %140
%267 = load float*, float** %22
%268 = bitcast float* %267 to i8*
%269 = load float*, float** %23
%270 = bitcast float* %269 to i8*
%271 = load float*, float** %24
%272 = bitcast float* %271 to i8*
%273 = load float*, float** %25
%274 = bitcast float* %273 to i8*
%275 = load float*, float** %26
%276 = bitcast float* %275 to i8*
%277 = load float*, float** %27
%278 = bitcast float* %277 to i8*
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"imagen_1%05d.bmp\00"
define void @aan_ecuacion_ondas_metodo_explicito(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* %3, float* %4, float* %5, i32 %6, i32 %7, float %8, i32 %9) {
%11 = alloca [100 x i8]
%12 = sext i32 %6 to i64
%13 = shl nsw i64 %12, 2
%14 = sext i32 %7 to i64
%15 = mul i64 %13, %14
%16 = tail call i8* @malloc(i64 %15)
%17 = bitcast i8* %16 to float*
%18 = tail call i8* @malloc(i64 %15)
%19 = bitcast i8* %18 to float*
%20 = tail call i8* @malloc(i64 %15)
%21 = bitcast i8* %20 to float*
%22 = tail call i8* @malloc(i64 %15)
%23 = bitcast i8* %22 to float*
%24 = tail call i8* @malloc(i64 %15)
%25 = bitcast i8* %24 to float*
%26 = tail call i8* @malloc(i64 %15)
%27 = bitcast i8* %26 to float*
%28 = bitcast float* %0 to i8*
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %16, i8* align 4 %28, i64 %15, i1 false)
%29 = bitcast float* %1 to i8*
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %18, i8* align 4 %29, i64 %15, i1 false)
%30 = bitcast float* %2 to i8*
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %20, i8* align 4 %30, i64 %15, i1 false)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %22, i8* align 4 %28, i64 %15, i1 false)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %24, i8* align 4 %29, i64 %15, i1 false)
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %26, i8* align 4 %30, i64 %15, i1 false)
%31 = icmp sgt i32 %9, 0
br i1 %31, label %32, label %57
32: ; preds = %10
%33 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%34 = fpext float %8 to double
%35 = mul nsw i32 %7, %6
%36 = bitcast float* %3 to i8*
%37 = bitcast float* %4 to i8*
%38 = bitcast float* %5 to i8*
br label %39
39: ; preds = %32, %39
%40 = phi i32 [ 0, %32 ], [ %55, %39 ]
%41 = call i32 (float*, float*, float*, i32, i32, double, ...) bitcast (i32 (...)* @aan_ondas_un_canal to i32 (float*, float*, float*, i32, i32, double, ...)*)(float* %17, float* %3, float* %23, i32 %6, i32 %7, double %34)
%42 = call i32 (float*, float*, float*, i32, i32, double, ...) bitcast (i32 (...)* @aan_ondas_un_canal to i32 (float*, float*, float*, i32, i32, double, ...)*)(float* %19, float* %4, float* %25, i32 %6, i32 %7, double %34)
%43 = call i32 (float*, float*, float*, i32, i32, double, ...) bitcast (i32 (...)* @aan_ondas_un_canal to i32 (float*, float*, float*, i32, i32, double, ...)*)(float* %21, float* %5, float* %27, i32 %6, i32 %7, double %34)
%44 = call i32 (i8*, i8*, ...) @sprintf(i8* %33, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %40)
%45 = call i32 (float*, i32, ...) bitcast (i32 (...)* @float_to_uchar to i32 (float*, i32, ...)*)(float* %3, i32 %35)
%46 = sext i32 %45 to i64
%47 = inttoptr i64 %46 to i8*
%48 = call i32 (float*, i32, ...) bitcast (i32 (...)* @float_to_uchar to i32 (float*, i32, ...)*)(float* %4, i32 %35)
%49 = sext i32 %48 to i64
%50 = inttoptr i64 %49 to i8*
%51 = call i32 (float*, i32, ...) bitcast (i32 (...)* @float_to_uchar to i32 (float*, i32, ...)*)(float* %5, i32 %35)
%52 = sext i32 %51 to i64
%53 = inttoptr i64 %52 to i8*
%54 = call i32 (i8*, i8*, i8*, i8*, i32, i32, ...) bitcast (i32 (...)* @ami_write_bmp to i32 (i8*, i8*, i8*, i8*, i32, i32, ...)*)(i8* %33, i8* %47, i8* %50, i8* %53, i32 %6, i32 %7)
%55 = add nuw nsw i32 %40, 1
%56 = icmp eq i32 %55, %9
br i1 %56, label %57, label %39
57: ; preds = %39, %10
ret void
}