#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*/ calculate_forces(double **, double *, double **);
void update_pos(double positions[4][2], double velocities[4][2],
                double masses[4]) {
  double forces[4][2], new_forces[4][2];
  double accel[4][2], new_accel[4][2];
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 2; j++) {
      forces[i][j] = 0;
      accel[i][j] = 0;
      new_forces[i][j] = 0;
      new_accel[i][j] = 0;
    }
  }
  calculate_forces(positions, masses, forces);
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 2; j++) {
      accel[i][j] = forces[i][j] / masses[i];
      positions[i][j] +=
          velocities[i][j] * 3.6e3 + .5 * accel[i][j] * 3.6e3 * 3.6e3;
    }
  }
  calculate_forces(positions, masses, new_forces);
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 2; j++) {
      new_accel[i][j] = forces[i][j] / masses[i];
      velocities[i][j] += .5 * (new_accel[i][j] + accel[i][j]) * 3.6e3;
    }
  }
  return;
}


x86 assembly (clang, -O0):
<update_pos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x124(%rbp)
cmpl   $0x4,-0x124(%rbp)
jge    120f <update_pos+0xff>
movl   $0x0,-0x128(%rbp)
cmpl   $0x2,-0x128(%rbp)
jge    11f6 <update_pos+0xe6>
movslq -0x124(%rbp),%rcx
lea    -0x60(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x128(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x124(%rbp),%rcx
lea    -0xe0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x128(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x124(%rbp),%rcx
lea    -0xa0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x128(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x124(%rbp),%rcx
lea    -0x120(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x128(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
jmp    1148 <update_pos+0x38>
jmp    11fb <update_pos+0xeb>
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    1131 <update_pos+0x21>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   1030 <calculate_forces@plt>
movl   $0x0,-0x12c(%rbp)
cmpl   $0x4,-0x12c(%rbp)
jge    135c <update_pos+0x24c>
movl   $0x0,-0x130(%rbp)
cmpl   $0x2,-0x130(%rbp)
jge    1343 <update_pos+0x233>
movslq -0x12c(%rbp),%rcx
lea    -0x60(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x130(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x12c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movslq -0x12c(%rbp),%rcx
lea    -0xe0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x130(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x12c(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x130(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x12c(%rbp),%rcx
lea    -0xe0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x130(%rbp),%rcx
movsd  0xd29(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
movsd  0xd14(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd08(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xcfc(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x12c(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x130(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x130(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x130(%rbp)
jmp    1241 <update_pos+0x131>
jmp    1348 <update_pos+0x238>
mov    -0x12c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x12c(%rbp)
jmp    122a <update_pos+0x11a>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0xa0(%rbp),%rdx
call   1030 <calculate_forces@plt>
movl   $0x0,-0x134(%rbp)
cmpl   $0x4,-0x134(%rbp)
jge    149b <update_pos+0x38b>
movl   $0x0,-0x138(%rbp)
cmpl   $0x2,-0x138(%rbp)
jge    1482 <update_pos+0x372>
movslq -0x134(%rbp),%rcx
lea    -0x60(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x138(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x134(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movslq -0x134(%rbp),%rcx
lea    -0x120(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x138(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x134(%rbp),%rcx
lea    -0x120(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x138(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movslq -0x134(%rbp),%rcx
lea    -0xe0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x138(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0xbd1(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x134(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x138(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xb9f(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x138(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x138(%rbp)
jmp    1391 <update_pos+0x281>
jmp    1487 <update_pos+0x377>
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
jmp    137a <update_pos+0x26a>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_pos>:
push   %r15
push   %r14
push   %rbx
sub    $0xc0,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xorpd  %xmm0,%xmm0
movapd %xmm0,(%rsp)
movapd %xmm0,0x10(%rsp)
movapd %xmm0,0x20(%rsp)
movapd %xmm0,0x30(%rsp)
movapd %xmm0,0x40(%rsp)
movapd %xmm0,0x50(%rsp)
movapd %xmm0,0x60(%rsp)
movapd %xmm0,0x70(%rsp)
movapd %xmm0,0x80(%rsp)
movapd %xmm0,0x90(%rsp)
movapd %xmm0,0xa0(%rsp)
movapd %xmm0,0xb0(%rsp)
mov    %rsp,%rdx
mov    %r14,%rsi
call   1030 <calculate_forces@plt>
xor    %eax,%eax
movsd  0xe6f(%rip),%xmm3
movsd  0xe6f(%rip),%xmm2
nopl   0x0(%rax)
movsd  (%rsp,%rax,2),%xmm0
divsd  (%r14,%rax,1),%xmm0
movsd  %xmm0,0x40(%rsp,%rax,2)
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  (%r15,%rax,2),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
addsd  (%rbx,%rax,2),%xmm1
movsd  %xmm1,(%rbx,%rax,2)
movsd  0x8(%rsp,%rax,2),%xmm0
divsd  (%r14,%rax,1),%xmm0
movsd  %xmm0,0x48(%rsp,%rax,2)
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  0x8(%r15,%rax,2),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
addsd  0x8(%rbx,%rax,2),%xmm1
movsd  %xmm1,0x8(%rbx,%rax,2)
add    $0x8,%rax
cmp    $0x20,%rax
jne    11a0 <update_pos+0x90>
lea    0x80(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <calculate_forces@plt>
movsd  (%rsp),%xmm0
divsd  (%r14),%xmm0
addsd  0x40(%rsp),%xmm0
movsd  0xdbd(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xdb9(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  (%r15),%xmm0
movsd  %xmm0,(%r15)
movsd  0x8(%rsp),%xmm0
divsd  (%r14),%xmm0
addsd  0x48(%rsp),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  0x8(%r15),%xmm0
movsd  %xmm0,0x8(%r15)
movsd  0x10(%rsp),%xmm0
divsd  0x8(%r14),%xmm0
addsd  0x50(%rsp),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  0x10(%r15),%xmm0
movsd  %xmm0,0x10(%r15)
movsd  0x18(%rsp),%xmm0
divsd  0x8(%r14),%xmm0
addsd  0x58(%rsp),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  0x18(%r15),%xmm0
movsd  %xmm0,0x18(%r15)
movsd  0x20(%rsp),%xmm0
divsd  0x10(%r14),%xmm0
addsd  0x60(%rsp),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  0x20(%r15),%xmm0
movsd  %xmm0,0x20(%r15)
movsd  0x28(%rsp),%xmm0
divsd  0x10(%r14),%xmm0
addsd  0x68(%rsp),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  0x28(%r15),%xmm0
movsd  %xmm0,0x28(%r15)
movsd  0x30(%rsp),%xmm0
divsd  0x18(%r14),%xmm0
addsd  0x70(%rsp),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  0x30(%r15),%xmm0
movsd  %xmm0,0x30(%r15)
movsd  0x38(%rsp),%xmm0
divsd  0x18(%r14),%xmm0
addsd  0x78(%rsp),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  0x38(%r15),%xmm0
movsd  %xmm0,0x38(%r15)
add    $0xc0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @update_pos([2 x double]* %0, [2 x double]* %1, double* %2) {
%4 = alloca [2 x double]*
%5 = alloca [2 x double]*
%6 = alloca double*
%7 = alloca [4 x [2 x double]]
%8 = alloca [4 x [2 x double]]
%9 = alloca [4 x [2 x double]]
%10 = alloca [4 x [2 x double]]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store [2 x double]* %0, [2 x double]** %4
store [2 x double]* %1, [2 x double]** %5
store double* %2, double** %6
store i32 0, i32* %11
br label %17
17: ; preds = %53, %3
%18 = load i32, i32* %11
%19 = icmp slt i32 %18, 4
br i1 %19, label %20, label %56
20: ; preds = %17
store i32 0, i32* %12
br label %21
21: ; preds = %49, %20
%22 = load i32, i32* %12
%23 = icmp slt i32 %22, 2
br i1 %23, label %24, label %52
24: ; preds = %21
%25 = load i32, i32* %11
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %7, i64 0, i64 %26
%28 = load i32, i32* %12
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [2 x double], [2 x double]* %27, i64 0, i64 %29
store double 0.000000e+00, double* %30
%31 = load i32, i32* %11
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %9, i64 0, i64 %32
%34 = load i32, i32* %12
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [2 x double], [2 x double]* %33, i64 0, i64 %35
store double 0.000000e+00, double* %36
%37 = load i32, i32* %11
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %8, i64 0, i64 %38
%40 = load i32, i32* %12
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [2 x double], [2 x double]* %39, i64 0, i64 %41
store double 0.000000e+00, double* %42
%43 = load i32, i32* %11
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %10, i64 0, i64 %44
%46 = load i32, i32* %12
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [2 x double], [2 x double]* %45, i64 0, i64 %47
store double 0.000000e+00, double* %48
br label %49
49: ; preds = %24
%50 = load i32, i32* %12
%51 = add nsw i32 %50, 1
store i32 %51, i32* %12
br label %21
52: ; preds = %21
br label %53
53: ; preds = %52
%54 = load i32, i32* %11
%55 = add nsw i32 %54, 1
store i32 %55, i32* %11
br label %17
56: ; preds = %17
%57 = load [2 x double]*, [2 x double]** %4
%58 = bitcast [2 x double]* %57 to double**
%59 = load double*, double** %6
%60 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %7, i64 0, i64 0
%61 = bitcast [2 x double]* %60 to double**
%62 = call i32 @calculate_forces(double** %58, double* %59, double** %61)
store i32 0, i32* %13
br label %63
63: ; preds = %122, %56
%64 = load i32, i32* %13
%65 = icmp slt i32 %64, 4
br i1 %65, label %66, label %125
66: ; preds = %63
store i32 0, i32* %14
br label %67
67: ; preds = %118, %66
%68 = load i32, i32* %14
%69 = icmp slt i32 %68, 2
br i1 %69, label %70, label %121
70: ; preds = %67
%71 = load i32, i32* %13
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %7, i64 0, i64 %72
%74 = load i32, i32* %14
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [2 x double], [2 x double]* %73, i64 0, i64 %75
%77 = load double, double* %76
%78 = load double*, double** %6
%79 = load i32, i32* %13
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %78, i64 %80
%82 = load double, double* %81
%83 = fdiv double %77, %82
%84 = load i32, i32* %13
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %9, i64 0, i64 %85
%87 = load i32, i32* %14
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [2 x double], [2 x double]* %86, i64 0, i64 %88
store double %83, double* %89
%90 = load [2 x double]*, [2 x double]** %5
%91 = load i32, i32* %13
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [2 x double], [2 x double]* %90, i64 %92
%94 = load i32, i32* %14
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [2 x double], [2 x double]* %93, i64 0, i64 %95
%97 = load double, double* %96
%98 = load i32, i32* %13
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %9, i64 0, i64 %99
%101 = load i32, i32* %14
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [2 x double], [2 x double]* %100, i64 0, i64 %102
%104 = load double, double* %103
%105 = fmul double 5.000000e-01, %104
%106 = fmul double %105, 3.600000e+03
%107 = fmul double %106, 3.600000e+03
%108 = call double @llvm.fmuladd.f64(double %97, double 3.600000e+03, double %107)
%109 = load [2 x double]*, [2 x double]** %4
%110 = load i32, i32* %13
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [2 x double], [2 x double]* %109, i64 %111
%113 = load i32, i32* %14
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [2 x double], [2 x double]* %112, i64 0, i64 %114
%116 = load double, double* %115
%117 = fadd double %116, %108
store double %117, double* %115
br label %118
118: ; preds = %70
%119 = load i32, i32* %14
%120 = add nsw i32 %119, 1
store i32 %120, i32* %14
br label %67
121: ; preds = %67
br label %122
122: ; preds = %121
%123 = load i32, i32* %13
%124 = add nsw i32 %123, 1
store i32 %124, i32* %13
br label %63
125: ; preds = %63
%126 = load [2 x double]*, [2 x double]** %4
%127 = bitcast [2 x double]* %126 to double**
%128 = load double*, double** %6
%129 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %8, i64 0, i64 0
%130 = bitcast [2 x double]* %129 to double**
%131 = call i32 @calculate_forces(double** %127, double* %128, double** %130)
store i32 0, i32* %15
br label %132
132: ; preds = %188, %125
%133 = load i32, i32* %15
%134 = icmp slt i32 %133, 4
br i1 %134, label %135, label %191
135: ; preds = %132
store i32 0, i32* %16
br label %136
136: ; preds = %184, %135
%137 = load i32, i32* %16
%138 = icmp slt i32 %137, 2
br i1 %138, label %139, label %187
139: ; preds = %136
%140 = load i32, i32* %15
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %7, i64 0, i64 %141
%143 = load i32, i32* %16
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [2 x double], [2 x double]* %142, i64 0, i64 %144
%146 = load double, double* %145
%147 = load double*, double** %6
%148 = load i32, i32* %15
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds double, double* %147, i64 %149
%151 = load double, double* %150
%152 = fdiv double %146, %151
%153 = load i32, i32* %15
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %10, i64 0, i64 %154
%156 = load i32, i32* %16
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds [2 x double], [2 x double]* %155, i64 0, i64 %157
store double %152, double* %158
%159 = load i32, i32* %15
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %10, i64 0, i64 %160
%162 = load i32, i32* %16
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds [2 x double], [2 x double]* %161, i64 0, i64 %163
%165 = load double, double* %164
%166 = load i32, i32* %15
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %9, i64 0, i64 %167
%169 = load i32, i32* %16
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds [2 x double], [2 x double]* %168, i64 0, i64 %170
%172 = load double, double* %171
%173 = fadd double %165, %172
%174 = fmul double 5.000000e-01, %173
%175 = load [2 x double]*, [2 x double]** %5
%176 = load i32, i32* %15
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds [2 x double], [2 x double]* %175, i64 %177
%179 = load i32, i32* %16
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds [2 x double], [2 x double]* %178, i64 0, i64 %180
%182 = load double, double* %181
%183 = call double @llvm.fmuladd.f64(double %174, double 3.600000e+03, double %182)
store double %183, double* %181
br label %184
184: ; preds = %139
%185 = load i32, i32* %16
%186 = add nsw i32 %185, 1
store i32 %186, i32* %16
br label %136
187: ; preds = %136
br label %188
188: ; preds = %187
%189 = load i32, i32* %15
%190 = add nsw i32 %189, 1
store i32 %190, i32* %15
br label %132
191: ; preds = %132
ret void
}

LLVM IR (-O2):
define void @update_pos([2 x double]* %0, [2 x double]* nocapture %1, double* %2) {
%4 = alloca [4 x [2 x double]]
%5 = bitcast [4 x [2 x double]]* %4 to i8*
%6 = alloca [4 x [2 x double]]
%7 = bitcast [4 x [2 x double]]* %6 to i8*
%8 = alloca [4 x [2 x double]]
%9 = bitcast [4 x [2 x double]]* %8 to i8*
%10 = bitcast [2 x double]* %0 to double**
%11 = bitcast [4 x [2 x double]]* %4 to double**
%12 = call i32 @calculate_forces(double** %10, double* %2, double** %11)
br label %13
13: ; preds = %3, %13
%14 = phi i64 [ 0, %3 ], [ %44, %13 ]
%15 = getelementptr inbounds double, double* %2, i64 %14
%16 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %4, i64 0, i64 %14, i64 0
%17 = load double, double* %16
%18 = load double, double* %15
%19 = fdiv double %17, %18
%20 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %8, i64 0, i64 %14, i64 0
store double %19, double* %20
%21 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 %14, i64 0
%22 = load double, double* %21
%23 = fmul double %19, 5.000000e-01
%24 = fmul double %23, 3.600000e+03
%25 = fmul double %24, 3.600000e+03
%26 = call double @llvm.fmuladd.f64(double %22, double 3.600000e+03, double %25)
%27 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 %14, i64 0
%28 = load double, double* %27
%29 = fadd double %28, %26
store double %29, double* %27
%30 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %4, i64 0, i64 %14, i64 1
%31 = load double, double* %30
%32 = load double, double* %15
%33 = fdiv double %31, %32
%34 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %8, i64 0, i64 %14, i64 1
store double %33, double* %34
%35 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 %14, i64 1
%36 = load double, double* %35
%37 = fmul double %33, 5.000000e-01
%38 = fmul double %37, 3.600000e+03
%39 = fmul double %38, 3.600000e+03
%40 = call double @llvm.fmuladd.f64(double %36, double 3.600000e+03, double %39)
%41 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 %14, i64 1
%42 = load double, double* %41
%43 = fadd double %42, %40
store double %43, double* %41
%44 = add nuw nsw i64 %14, 1
%45 = icmp eq i64 %44, 4
br i1 %45, label %46, label %13
46: ; preds = %13
%47 = bitcast [4 x [2 x double]]* %6 to double**
%48 = call i32 @calculate_forces(double** %10, double* %2, double** %47)
%49 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %4, i64 0, i64 0, i64 0
%50 = load double, double* %49
%51 = load double, double* %2
%52 = fdiv double %50, %51
%53 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %8, i64 0, i64 0, i64 0
%54 = load double, double* %53
%55 = fadd double %52, %54
%56 = fmul double %55, 5.000000e-01
%57 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
%58 = load double, double* %57
%59 = call double @llvm.fmuladd.f64(double %56, double 3.600000e+03, double %58)
store double %59, double* %57
%60 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %4, i64 0, i64 0, i64 1
%61 = load double, double* %60
%62 = load double, double* %2
%63 = fdiv double %61, %62
%64 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %8, i64 0, i64 0, i64 1
%65 = load double, double* %64
%66 = fadd double %63, %65
%67 = fmul double %66, 5.000000e-01
%68 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 1
%69 = load double, double* %68
%70 = call double @llvm.fmuladd.f64(double %67, double 3.600000e+03, double %69)
store double %70, double* %68
%71 = getelementptr inbounds double, double* %2, i64 1
%72 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %4, i64 0, i64 1, i64 0
%73 = load double, double* %72
%74 = load double, double* %71
%75 = fdiv double %73, %74
%76 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %8, i64 0, i64 1, i64 0
%77 = load double, double* %76
%78 = fadd double %75, %77
%79 = fmul double %78, 5.000000e-01
%80 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 1, i64 0
%81 = load double, double* %80
%82 = call double @llvm.fmuladd.f64(double %79, double 3.600000e+03, double %81)
store double %82, double* %80
%83 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %4, i64 0, i64 1, i64 1
%84 = load double, double* %83
%85 = load double, double* %71
%86 = fdiv double %84, %85
%87 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %8, i64 0, i64 1, i64 1
%88 = load double, double* %87
%89 = fadd double %86, %88
%90 = fmul double %89, 5.000000e-01
%91 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 1, i64 1
%92 = load double, double* %91
%93 = call double @llvm.fmuladd.f64(double %90, double 3.600000e+03, double %92)
store double %93, double* %91
%94 = getelementptr inbounds double, double* %2, i64 2
%95 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %4, i64 0, i64 2, i64 0
%96 = load double, double* %95
%97 = load double, double* %94
%98 = fdiv double %96, %97
%99 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %8, i64 0, i64 2, i64 0
%100 = load double, double* %99
%101 = fadd double %98, %100
%102 = fmul double %101, 5.000000e-01
%103 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 2, i64 0
%104 = load double, double* %103
%105 = call double @llvm.fmuladd.f64(double %102, double 3.600000e+03, double %104)
store double %105, double* %103
%106 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %4, i64 0, i64 2, i64 1
%107 = load double, double* %106
%108 = load double, double* %94
%109 = fdiv double %107, %108
%110 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %8, i64 0, i64 2, i64 1
%111 = load double, double* %110
%112 = fadd double %109, %111
%113 = fmul double %112, 5.000000e-01
%114 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 2, i64 1
%115 = load double, double* %114
%116 = call double @llvm.fmuladd.f64(double %113, double 3.600000e+03, double %115)
store double %116, double* %114
%117 = getelementptr inbounds double, double* %2, i64 3
%118 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %4, i64 0, i64 3, i64 0
%119 = load double, double* %118
%120 = load double, double* %117
%121 = fdiv double %119, %120
%122 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %8, i64 0, i64 3, i64 0
%123 = load double, double* %122
%124 = fadd double %121, %123
%125 = fmul double %124, 5.000000e-01
%126 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 3, i64 0
%127 = load double, double* %126
%128 = call double @llvm.fmuladd.f64(double %125, double 3.600000e+03, double %127)
store double %128, double* %126
%129 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %4, i64 0, i64 3, i64 1
%130 = load double, double* %129
%131 = load double, double* %117
%132 = fdiv double %130, %131
%133 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %8, i64 0, i64 3, i64 1
%134 = load double, double* %133
%135 = fadd double %132, %134
%136 = fmul double %135, 5.000000e-01
%137 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 3, i64 1
%138 = load double, double* %137
%139 = call double @llvm.fmuladd.f64(double %136, double 3.600000e+03, double %138)
store double %139, double* %137
ret void
}