#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*/ printf(char *, ...);
main(int argc, char *argv[]) {
  int i, index;
  double depth;
  double ratio = 1.73;
  int nSegments = 6;
  double grad_vel[][3] = {{0.0, 3.45, 0.7100},  {1.0, 4.16, 0.4000},
                          {3.0, 4.96, 0.1933},  {6.0, 5.54, 0.0538},
                          {14.0, 5.97, 0.0455}, {25.0, 7.98, 0.00}};
  double layer_thickness = 0.5;
  int num_layers = 21;
  printf("* NLAY RATIO\n");
  printf("%d %lf\n", num_layers, ratio);
  printf("* TOP\n");
  for (i = 0; i < num_layers; i++)
    printf("%.1lf ", layer_thickness * (double)i);
  printf("\n* VEL\n");
  index = 0;
  for (i = 0; i < num_layers; i++) {
    depth = layer_thickness * (double)i + 0.000001;
    while (index < nSegments - 1 && depth > grad_vel[index + 1][0])
      index++;
    printf("%.2lf ", grad_vel[index][1] +
                         grad_vel[index][2] * (depth - grad_vel[index][0]));
  }
  printf("\n*\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xec7(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x6,-0x2c(%rbp)
lea    -0xc0(%rbp),%rdi
lea    0xec5(%rip),%rsi
mov    $0x90,%edx
call   1040 <memcpy@plt>
movsd  0xe93(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movl   $0x15,-0xcc(%rbp)
lea    0xf2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xcc(%rbp),%esi
movsd  -0x28(%rbp),%xmm0
lea    0xf1f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xcc(%rbp),%eax
jge    11f7 <main+0xd7>
movsd  -0xc8(%rbp),%xmm0
ff
cvtsi2sdl -0x14(%rbp),%xmm1
mulsd  %xmm1,%xmm0
lea    0xeeb(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11bb <main+0x9b>
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xcc(%rbp),%eax
jge    1314 <main+0x1f4>
movsd  -0xc8(%rbp),%xmm0
ff
cvtsi2sdl -0x14(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdd5(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%ecx
mov    -0x2c(%rbp),%edx
sub    $0x1,%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0xcd(%rbp)
jge    1286 <main+0x166>
movsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rcx
lea    -0xc0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
ucomisd (%rax),%xmm0
seta   %al
mov    %al,-0xcd(%rbp)
mov    -0xcd(%rbp),%al
test   $0x1,%al
jne    1299 <main+0x179>
jmp    12a7 <main+0x187>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1244 <main+0x124>
movslq -0x18(%rbp),%rcx
lea    -0xc0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm1
movslq -0x18(%rbp),%rcx
lea    -0xc0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm0
movsd  -0x20(%rbp),%xmm2
movslq -0x18(%rbp),%rcx
lea    -0xc0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
lea    0xddd(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1213 <main+0xf3>
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0x1028(%rip),%rdi
call   1030 <puts@plt>
lea    0x1006(%rip),%rdi
movsd  0xebe(%rip),%xmm0
mov    $0x15,%esi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0x100e(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe7(%rip),%rbx
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe92(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe88(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe7e(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe74(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe6a(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe60(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe56(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe4c(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe42(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe38(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe2e(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe24(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe1a(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe10(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe06(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xdfc(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xdf2(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xde8(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xdde(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xdd4(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe8c(%rip),%rdi
call   1030 <puts@plt>
xorpd  %xmm0,%xmm0
xor    %ebp,%ebp
lea    0xdc1(%rip),%r15
lea    0xe59(%rip),%r14
xor    %ebx,%ebx
jmp    133c <main+0x21c>
nopw   0x0(%rax,%rax,1)
mov    %ecx,%ebx
movslq %ebx,%rax
lea    (%rax,%rax,2),%rax
subsd  (%r15,%rax,8),%xmm0
mulsd  0x10(%r15,%rax,8),%xmm0
addsd  0x8(%r15,%rax,8),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
addsd  0xcdc(%rip),%xmm0
add    $0x1,%ebp
cmp    $0x15,%ebp
je     138c <main+0x26c>
movsd  %xmm0,(%rsp)
mulsd  0xcbf(%rip),%xmm0
movslq %ebx,%rax
cmp    $0x6,%eax
mov    $0x5,%ecx
cmovge %eax,%ecx
addsd  0xd49(%rip),%xmm0
lea    -0x1(%rax),%ebx
lea    (%rax,%rax,2),%rdx
lea    (%r15,%rdx,8),%rdx
add    $0x18,%rdx
xchg   %ax,%ax
cmp    $0x4,%rax
jg     1300 <main+0x1e0>
add    $0x1,%rax
add    $0x1,%ebx
ucomisd (%rdx),%xmm0
lea    0x18(%rdx),%rdx
ja     1370 <main+0x250>
jmp    1302 <main+0x1e2>
lea    0xddd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.grad_vel = [6 x [3 x double]] [[3 x double] [double 0.000000e+00, double 3.450000e+00, double 7.100000e-01], [3 x double] [double 1.000000e+00, double 4.160000e+00, double 4.000000e-01], [3 x double] [double 3.000000e+00, double 4.960000e+00, double 1.933000e-01], [3 x double] [double 6.000000e+00, double 5.540000e+00, double 5.380000e-02], [3 x double] [double 1.400000e+01, double 5.970000e+00, double 4.550000e-02], [3 x double] [double 2.500000e+01, double 7.980000e+00, double 0.000000e+00]]
@.str = [14 x i8] c"* NLAY RATIO\0A\00"
@.str.1 = [8 x i8] c"%d %lf\0A\00"
@.str.2 = [7 x i8] c"* TOP\0A\00"
@.str.3 = [7 x i8] c"%.1lf \00"
@.str.4 = [8 x i8] c"\0A* VEL\0A\00"
@.str.5 = [7 x i8] c"%.2lf \00"
@.str.6 = [4 x i8] c"\0A*\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca [6 x [3 x double]]
%12 = alloca double
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 1.730000e+00, double* %9
store i32 6, i32* %10
%14 = bitcast [6 x [3 x double]]* %11 to i8*
store double 5.000000e-01, double* %12
store i32 21, i32* %13
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* %13
%17 = load double, double* %9
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %16, double %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %6
br label %20
20: ; preds = %30, %2
%21 = load i32, i32* %6
%22 = load i32, i32* %13
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %33
24: ; preds = %20
%25 = load double, double* %12
%26 = load i32, i32* %6
%27 = sitofp i32 %26 to double
%28 = fmul double %25, %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %28)
br label %30
30: ; preds = %24
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
br label %20
33: ; preds = %20
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %7
store i32 0, i32* %6
br label %35
35: ; preds = %83, %33
%36 = load i32, i32* %6
%37 = load i32, i32* %13
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %86
39: ; preds = %35
%40 = load double, double* %12
%41 = load i32, i32* %6
%42 = sitofp i32 %41 to double
%43 = call double @llvm.fmuladd.f64(double %40, double %42, double 0x3EB0C6F7A0B5ED8D)
store double %43, double* %8
br label %44
44: ; preds = %60, %39
%45 = load i32, i32* %7
%46 = load i32, i32* %10
%47 = sub nsw i32 %46, 1
%48 = icmp slt i32 %45, %47
br i1 %48, label %49, label %58
49: ; preds = %44
%50 = load double, double* %8
%51 = load i32, i32* %7
%52 = add nsw i32 %51, 1
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [6 x [3 x double]], [6 x [3 x double]]* %11, i64 0, i64 %53
%55 = getelementptr inbounds [3 x double], [3 x double]* %54, i64 0, i64 0
%56 = load double, double* %55
%57 = fcmp ogt double %50, %56
br label %58
58: ; preds = %49, %44
%59 = phi i1 [ false, %44 ], [ %57, %49 ]
br i1 %59, label %60, label %63
60: ; preds = %58
%61 = load i32, i32* %7
%62 = add nsw i32 %61, 1
store i32 %62, i32* %7
br label %44
63: ; preds = %58
%64 = load i32, i32* %7
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [6 x [3 x double]], [6 x [3 x double]]* %11, i64 0, i64 %65
%67 = getelementptr inbounds [3 x double], [3 x double]* %66, i64 0, i64 1
%68 = load double, double* %67
%69 = load i32, i32* %7
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [6 x [3 x double]], [6 x [3 x double]]* %11, i64 0, i64 %70
%72 = getelementptr inbounds [3 x double], [3 x double]* %71, i64 0, i64 2
%73 = load double, double* %72
%74 = load double, double* %8
%75 = load i32, i32* %7
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [6 x [3 x double]], [6 x [3 x double]]* %11, i64 0, i64 %76
%78 = getelementptr inbounds [3 x double], [3 x double]* %77, i64 0, i64 0
%79 = load double, double* %78
%80 = fsub double %74, %79
%81 = call double @llvm.fmuladd.f64(double %73, double %80, double %68)
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %81)
br label %83
83: ; preds = %63
%84 = load i32, i32* %6
%85 = add nsw i32 %84, 1
store i32 %85, i32* %6
br label %35
86: ; preds = %35
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%88 = load i32, i32* %3
ret i32 %88
}

LLVM IR (-O2):
@__const.main.grad_vel = [6 x [3 x double]] [[3 x double] [double 0.000000e+00, double 3.450000e+00, double 7.100000e-01], [3 x double] [double 1.000000e+00, double 4.160000e+00, double 4.000000e-01], [3 x double] [double 3.000000e+00, double 4.960000e+00, double 1.933000e-01], [3 x double] [double 6.000000e+00, double 5.540000e+00, double 5.380000e-02], [3 x double] [double 1.400000e+01, double 5.970000e+00, double 4.550000e-02], [3 x double] [double 2.500000e+01, double 7.980000e+00, double 0.000000e+00]]
@.str.1 = [8 x i8] c"%d %lf\0A\00"
@.str.3 = [7 x i8] c"%.1lf \00"
@.str.5 = [7 x i8] c"%.2lf \00"
@str = [13 x i8] c"* NLAY RATIO\00"
@str.7 = [6 x i8] c"* TOP\00"
@str.8 = [7 x i8] c"\0A* VEL\00"
@str.9 = [3 x i8] c"\0A*\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 21, double 1.730000e+00)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.7, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 0.000000e+00)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 5.000000e-01)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 1.000000e+00)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 1.500000e+00)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 2.000000e+00)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 2.500000e+00)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 3.000000e+00)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 3.500000e+00)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 4.000000e+00)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 4.500000e+00)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 5.000000e+00)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 5.500000e+00)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 6.000000e+00)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 6.500000e+00)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 7.000000e+00)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 7.500000e+00)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 8.000000e+00)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 8.500000e+00)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 9.000000e+00)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 9.500000e+00)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double 1.000000e+01)
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.8, i64 0, i64 0))
br label %28
28: ; preds = %2, %45
%29 = phi i32 [ 0, %2 ], [ %57, %45 ]
%30 = phi i32 [ 0, %2 ], [ %46, %45 ]
%31 = sitofp i32 %29 to double
%32 = tail call double @llvm.fmuladd.f64(double %31, double 5.000000e-01, double 0x3EB0C6F7A0B5ED8D)
%33 = sext i32 %30 to i64
%34 = call i32 @llvm.smax.i32(i32 %30, i32 5)
br label %35
35: ; preds = %38, %28
%36 = phi i64 [ %39, %38 ], [ %33, %28 ]
%37 = icmp slt i64 %36, 5
br i1 %37, label %38, label %45
38: ; preds = %35
%39 = add nsw i64 %36, 1
%40 = getelementptr inbounds [6 x [3 x double]], [6 x [3 x double]]* @__const.main.grad_vel, i64 0, i64 %39, i64 0
%41 = load double, double* %40
%42 = fcmp ogt double %32, %41
br i1 %42, label %35, label %43
43: ; preds = %38
%44 = trunc i64 %36 to i32
br label %45
45: ; preds = %35, %43
%46 = phi i32 [ %44, %43 ], [ %34, %35 ]
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [6 x [3 x double]], [6 x [3 x double]]* @__const.main.grad_vel, i64 0, i64 %47, i64 1
%49 = load double, double* %48
%50 = getelementptr inbounds [6 x [3 x double]], [6 x [3 x double]]* @__const.main.grad_vel, i64 0, i64 %47, i64 2
%51 = load double, double* %50
%52 = getelementptr inbounds [6 x [3 x double]], [6 x [3 x double]]* @__const.main.grad_vel, i64 0, i64 %47, i64 0
%53 = load double, double* %52
%54 = fsub double %32, %53
%55 = tail call double @llvm.fmuladd.f64(double %51, double %54, double %49)
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %55)
%57 = add nuw nsw i32 %29, 1
%58 = icmp eq i32 %57, 21
br i1 %58, label %59, label %28
59: ; preds = %45
%60 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.9, i64 0, i64 0))
ret i32 0
}