#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 */
double Accel(double *, double *, double *, double *, int /*<<< orphan*/, int,
             char *);
void TiempoUno(double *masas, double *posX, double *posY, double *posZ,
               double *velX, double *velY, double *velZ, double dt) {
  for (int i = 0; i < 10; i++) {
    posX[i * 10000 + 1] = posX[i * 10000 + 0] + dt * velX[i * 10000 + 0];
    posY[i * 10000 + 1] = posY[i * 10000 + 0] + dt * velY[i * 10000 + 0];
    posZ[i * 10000 + 1] = posZ[i * 10000 + 0] + dt * velZ[i * 10000 + 0];
    velX[i * 10000 + 1] =
        velX[i * 10000 + 0] + dt * Accel(masas, posX, posY, posZ, 0, i, "x");
    velY[i * 10000 + 1] =
        velY[i * 10000 + 0] + dt * Accel(masas, posX, posY, posZ, 0, i, "y");
    velZ[i * 10000 + 1] =
        velZ[i * 10000 + 0] + dt * Accel(masas, posX, posY, posZ, 0, i, "z");
  }
}


x86 assembly (clang, -O0):
<TiempoUno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0xa,-0x3c(%rbp)
jge    13ad <TiempoUno+0x29d>
mov    -0x10(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x38(%rbp),%xmm0
mov    -0x28(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x38(%rbp),%xmm0
mov    -0x30(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x38(%rbp),%xmm0
mov    0x10(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x3c(%rbp),%r9d
xor    %r8d,%r8d
lea    0xd83(%rip),%rax
mov    %rax,(%rsp)
call   1030 <Accel@plt>
movsd  -0x70(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x3c(%rbp),%r9d
xor    %r8d,%r8d
lea    0xd0e(%rip),%rax
mov    %rax,(%rsp)
call   1030 <Accel@plt>
movsd  -0x60(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x3c(%rbp),%r9d
xor    %r8d,%r8d
lea    0xc99(%rip),%rax
mov    %rax,(%rsp)
call   1030 <Accel@plt>
movsd  -0x50(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
imul   $0x2710,-0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1143 <TiempoUno+0x33>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TiempoUno>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movsd  %xmm0,0x10(%rsp)
mov    %r9,0x20(%rsp)
mov    %r8,0x40(%rsp)
mov    %rcx,0x38(%rsp)
mov    %rdx,0x30(%rsp)
mov    %rsi,0x28(%rsp)
mov    %rdi,0x18(%rsp)
xor    %r15d,%r15d
xor    %r14d,%r14d
mov    0x28(%rsp),%rbp
mov    0x30(%rsp),%rbx
mov    0x38(%rsp),%r13
nopw   0x0(%rax,%rax,1)
mov    0x40(%rsp),%r12
movsd  (%r12,%r15,1),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm0
addsd  0x0(%rbp,%r15,1),%xmm0
movsd  %xmm0,0x8(%rbp,%r15,1)
mov    0x20(%rsp),%rax
movsd  (%rax,%r15,1),%xmm0
mulsd  %xmm1,%xmm0
addsd  (%rbx,%r15,1),%xmm0
movsd  %xmm0,0x8(%rbx,%r15,1)
mov    0x80(%rsp),%rax
movsd  (%rax,%r15,1),%xmm0
mulsd  %xmm1,%xmm0
addsd  0x0(%r13,%r15,1),%xmm0
movsd  %xmm0,0x8(%r13,%r15,1)
movsd  (%r12,%r15,1),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0xe2e(%rip),%rax
mov    %rax,(%rsp)
mov    0x18(%rsp),%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r13,%rcx
xor    %r8d,%r8d
mov    %r14d,%r9d
call   1030 <Accel@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%r12,%r15,1)
mov    0x20(%rsp),%r12
movsd  (%r12,%r15,1),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0xde8(%rip),%rax
mov    %rax,(%rsp)
mov    0x18(%rsp),%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r13,%rcx
xor    %r8d,%r8d
mov    %r14d,%r9d
call   1030 <Accel@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%r12,%r15,1)
mov    0x80(%rsp),%r12
movsd  (%r12,%r15,1),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0xd9f(%rip),%rax
mov    %rax,(%rsp)
mov    0x18(%rsp),%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r13,%rcx
xor    %r8d,%r8d
mov    %r14d,%r9d
call   1030 <Accel@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%r12,%r15,1)
add    $0x1,%r14d
add    $0x13880,%r15
cmp    $0xc3500,%r15
jne    1160 <TiempoUno+0x50>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"x\00"
@.str.1 = [2 x i8] c"y\00"
@.str.2 = [2 x i8] c"z\00"
define void @TiempoUno(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double %7) {
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double
%17 = alloca i32
store double* %0, double** %9
store double* %1, double** %10
store double* %2, double** %11
store double* %3, double** %12
store double* %4, double** %13
store double* %5, double** %14
store double* %6, double** %15
store double %7, double* %16
store i32 0, i32* %17
br label %18
18: ; preds = %151, %8
%19 = load i32, i32* %17
%20 = icmp slt i32 %19, 10
br i1 %20, label %21, label %154
21: ; preds = %18
%22 = load double*, double** %10
%23 = load i32, i32* %17
%24 = mul nsw i32 %23, 10000
%25 = add nsw i32 %24, 0
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %22, i64 %26
%28 = load double, double* %27
%29 = load double, double* %16
%30 = load double*, double** %13
%31 = load i32, i32* %17
%32 = mul nsw i32 %31, 10000
%33 = add nsw i32 %32, 0
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds double, double* %30, i64 %34
%36 = load double, double* %35
%37 = call double @llvm.fmuladd.f64(double %29, double %36, double %28)
%38 = load double*, double** %10
%39 = load i32, i32* %17
%40 = mul nsw i32 %39, 10000
%41 = add nsw i32 %40, 1
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %38, i64 %42
store double %37, double* %43
%44 = load double*, double** %11
%45 = load i32, i32* %17
%46 = mul nsw i32 %45, 10000
%47 = add nsw i32 %46, 0
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds double, double* %44, i64 %48
%50 = load double, double* %49
%51 = load double, double* %16
%52 = load double*, double** %14
%53 = load i32, i32* %17
%54 = mul nsw i32 %53, 10000
%55 = add nsw i32 %54, 0
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double, double* %52, i64 %56
%58 = load double, double* %57
%59 = call double @llvm.fmuladd.f64(double %51, double %58, double %50)
%60 = load double*, double** %11
%61 = load i32, i32* %17
%62 = mul nsw i32 %61, 10000
%63 = add nsw i32 %62, 1
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double, double* %60, i64 %64
store double %59, double* %65
%66 = load double*, double** %12
%67 = load i32, i32* %17
%68 = mul nsw i32 %67, 10000
%69 = add nsw i32 %68, 0
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %66, i64 %70
%72 = load double, double* %71
%73 = load double, double* %16
%74 = load double*, double** %15
%75 = load i32, i32* %17
%76 = mul nsw i32 %75, 10000
%77 = add nsw i32 %76, 0
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %74, i64 %78
%80 = load double, double* %79
%81 = call double @llvm.fmuladd.f64(double %73, double %80, double %72)
%82 = load double*, double** %12
%83 = load i32, i32* %17
%84 = mul nsw i32 %83, 10000
%85 = add nsw i32 %84, 1
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds double, double* %82, i64 %86
store double %81, double* %87
%88 = load double*, double** %13
%89 = load i32, i32* %17
%90 = mul nsw i32 %89, 10000
%91 = add nsw i32 %90, 0
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds double, double* %88, i64 %92
%94 = load double, double* %93
%95 = load double, double* %16
%96 = load double*, double** %9
%97 = load double*, double** %10
%98 = load double*, double** %11
%99 = load double*, double** %12
%100 = load i32, i32* %17
%101 = call double @Accel(double* %96, double* %97, double* %98, double* %99, i32 0, i32 %100, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%102 = call double @llvm.fmuladd.f64(double %95, double %101, double %94)
%103 = load double*, double** %13
%104 = load i32, i32* %17
%105 = mul nsw i32 %104, 10000
%106 = add nsw i32 %105, 1
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %103, i64 %107
store double %102, double* %108
%109 = load double*, double** %14
%110 = load i32, i32* %17
%111 = mul nsw i32 %110, 10000
%112 = add nsw i32 %111, 0
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds double, double* %109, i64 %113
%115 = load double, double* %114
%116 = load double, double* %16
%117 = load double*, double** %9
%118 = load double*, double** %10
%119 = load double*, double** %11
%120 = load double*, double** %12
%121 = load i32, i32* %17
%122 = call double @Accel(double* %117, double* %118, double* %119, double* %120, i32 0, i32 %121, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%123 = call double @llvm.fmuladd.f64(double %116, double %122, double %115)
%124 = load double*, double** %14
%125 = load i32, i32* %17
%126 = mul nsw i32 %125, 10000
%127 = add nsw i32 %126, 1
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds double, double* %124, i64 %128
store double %123, double* %129
%130 = load double*, double** %15
%131 = load i32, i32* %17
%132 = mul nsw i32 %131, 10000
%133 = add nsw i32 %132, 0
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds double, double* %130, i64 %134
%136 = load double, double* %135
%137 = load double, double* %16
%138 = load double*, double** %9
%139 = load double*, double** %10
%140 = load double*, double** %11
%141 = load double*, double** %12
%142 = load i32, i32* %17
%143 = call double @Accel(double* %138, double* %139, double* %140, double* %141, i32 0, i32 %142, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%144 = call double @llvm.fmuladd.f64(double %137, double %143, double %136)
%145 = load double*, double** %15
%146 = load i32, i32* %17
%147 = mul nsw i32 %146, 10000
%148 = add nsw i32 %147, 1
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds double, double* %145, i64 %149
store double %144, double* %150
br label %151
151: ; preds = %21
%152 = load i32, i32* %17
%153 = add nsw i32 %152, 1
store i32 %153, i32* %17
br label %18
154: ; preds = %18
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"x\00"
@.str.1 = [2 x i8] c"y\00"
@.str.2 = [2 x i8] c"z\00"
define void @TiempoUno(double* %0, double* %1, double* %2, double* %3, double* nocapture %4, double* nocapture %5, double* nocapture %6, double %7) {
br label %10
9: ; preds = %10
ret void
10: ; preds = %8, %10
%11 = phi i64 [ 0, %8 ], [ %45, %10 ]
%12 = mul nuw nsw i64 %11, 10000
%13 = getelementptr inbounds double, double* %1, i64 %12
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %4, i64 %12
%16 = load double, double* %15
%17 = tail call double @llvm.fmuladd.f64(double %7, double %16, double %14)
%18 = or i64 %12, 1
%19 = getelementptr inbounds double, double* %1, i64 %18
store double %17, double* %19
%20 = getelementptr inbounds double, double* %2, i64 %12
%21 = load double, double* %20
%22 = getelementptr inbounds double, double* %5, i64 %12
%23 = load double, double* %22
%24 = tail call double @llvm.fmuladd.f64(double %7, double %23, double %21)
%25 = getelementptr inbounds double, double* %2, i64 %18
store double %24, double* %25
%26 = getelementptr inbounds double, double* %3, i64 %12
%27 = load double, double* %26
%28 = getelementptr inbounds double, double* %6, i64 %12
%29 = load double, double* %28
%30 = tail call double @llvm.fmuladd.f64(double %7, double %29, double %27)
%31 = getelementptr inbounds double, double* %3, i64 %18
store double %30, double* %31
%32 = load double, double* %15
%33 = trunc i64 %11 to i32
%34 = tail call double @Accel(double* %0, double* %1, double* %2, double* %3, i32 0, i32 %33, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%35 = tail call double @llvm.fmuladd.f64(double %7, double %34, double %32)
%36 = getelementptr inbounds double, double* %4, i64 %18
store double %35, double* %36
%37 = load double, double* %22
%38 = tail call double @Accel(double* %0, double* %1, double* %2, double* %3, i32 0, i32 %33, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%39 = tail call double @llvm.fmuladd.f64(double %7, double %38, double %37)
%40 = getelementptr inbounds double, double* %5, i64 %18
store double %39, double* %40
%41 = load double, double* %28
%42 = tail call double @Accel(double* %0, double* %1, double* %2, double* %3, i32 0, i32 %33, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%43 = tail call double @llvm.fmuladd.f64(double %7, double %42, double %41)
%44 = getelementptr inbounds double, double* %6, i64 %18
store double %43, double* %44
%45 = add nuw nsw i64 %11, 1
%46 = icmp eq i64 %45, 10
br i1 %46, label %9, label %10
}