#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 *, ...);
void printxyztable(int n_rows, double tbl[][10]) {
  int i;
  (void)printf("       JD              X               Y              "
               "Z           VX        VY        VZ\n");
  for (i = 0; i < n_rows; ++i)
    (void)printf("%16.7f %15.1f %15.1f %15.1f %10.5f %10.5f %10.5f\n",
                 tbl[i][0], tbl[i][1], tbl[i][2], tbl[i][3], tbl[i][4],
                 tbl[i][5], tbl[i][6]);
  return;
}


x86 assembly (clang, -O0):
<printxyztable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11e7 <printxyztable+0xd7>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movsd  0x18(%rax),%xmm3
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movsd  0x20(%rax),%xmm4
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movsd  0x28(%rax),%xmm5
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movsd  0x30(%rax),%xmm6
lea    0xe88(%rip),%rdi
mov    $0x7,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1134 <printxyztable+0x24>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printxyztable>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xeff(%rip),%rdi
call   1030 <puts@plt>
test   %ebp,%ebp
jle    118c <printxyztable+0x6c>
mov    %ebp,%eax
shl    $0x4,%rax
lea    (%rax,%rax,4),%r15
xor    %ebp,%ebp
lea    0xeb1(%rip),%r14
nop
movsd  (%rbx,%rbp,1),%xmm0
movsd  0x8(%rbx,%rbp,1),%xmm1
movsd  0x10(%rbx,%rbp,1),%xmm2
movsd  0x18(%rbx,%rbp,1),%xmm3
movsd  0x20(%rbx,%rbp,1),%xmm4
movsd  0x28(%rbx,%rbp,1),%xmm5
movsd  0x30(%rbx,%rbp,1),%xmm6
mov    %r14,%rdi
mov    $0x7,%al
call   1040 <printf@plt>
add    $0x50,%rbp
cmp    %rbp,%r15
jne    1150 <printxyztable+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [90 x i8] c" JD X Y Z VX VY VZ\0A\00"
@.str.1 = [50 x i8] c"%16.7f %15.1f %15.1f %15.1f %10.5f %10.5f %10.5f\0A\00"
define void @printxyztable(i32 %0, [10 x double]* %1) {
%3 = alloca i32
%4 = alloca [10 x double]*
%5 = alloca i32
store i32 %0, i32* %3
store [10 x double]* %1, [10 x double]** %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %5
br label %7
7: ; preds = %55, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %58
11: ; preds = %7
%12 = load [10 x double]*, [10 x double]** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [10 x double], [10 x double]* %12, i64 %14
%16 = getelementptr inbounds [10 x double], [10 x double]* %15, i64 0, i64 0
%17 = load double, double* %16
%18 = load [10 x double]*, [10 x double]** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [10 x double], [10 x double]* %18, i64 %20
%22 = getelementptr inbounds [10 x double], [10 x double]* %21, i64 0, i64 1
%23 = load double, double* %22
%24 = load [10 x double]*, [10 x double]** %4
%25 = load i32, i32* %5
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [10 x double], [10 x double]* %24, i64 %26
%28 = getelementptr inbounds [10 x double], [10 x double]* %27, i64 0, i64 2
%29 = load double, double* %28
%30 = load [10 x double]*, [10 x double]** %4
%31 = load i32, i32* %5
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [10 x double], [10 x double]* %30, i64 %32
%34 = getelementptr inbounds [10 x double], [10 x double]* %33, i64 0, i64 3
%35 = load double, double* %34
%36 = load [10 x double]*, [10 x double]** %4
%37 = load i32, i32* %5
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [10 x double], [10 x double]* %36, i64 %38
%40 = getelementptr inbounds [10 x double], [10 x double]* %39, i64 0, i64 4
%41 = load double, double* %40
%42 = load [10 x double]*, [10 x double]** %4
%43 = load i32, i32* %5
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [10 x double], [10 x double]* %42, i64 %44
%46 = getelementptr inbounds [10 x double], [10 x double]* %45, i64 0, i64 5
%47 = load double, double* %46
%48 = load [10 x double]*, [10 x double]** %4
%49 = load i32, i32* %5
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [10 x double], [10 x double]* %48, i64 %50
%52 = getelementptr inbounds [10 x double], [10 x double]* %51, i64 0, i64 6
%53 = load double, double* %52
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), double %17, double %23, double %29, double %35, double %41, double %47, double %53)
br label %55
55: ; preds = %11
%56 = load i32, i32* %5
%57 = add nsw i32 %56, 1
store i32 %57, i32* %5
br label %7
58: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str.1 = [50 x i8] c"%16.7f %15.1f %15.1f %15.1f %10.5f %10.5f %10.5f\0A\00"
@str = [89 x i8] c" JD X Y Z VX VY VZ\00"
define void @printxyztable(i32 %0, [10 x double]* nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([89 x i8], [89 x i8]* @str, i64 0, i64 0))
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %26
5: ; preds = %2
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %24, %7 ]
%9 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 %8, i64 0
%10 = load double, double* %9
%11 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 %8, i64 1
%12 = load double, double* %11
%13 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 %8, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 %8, i64 3
%16 = load double, double* %15
%17 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 %8, i64 4
%18 = load double, double* %17
%19 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 %8, i64 5
%20 = load double, double* %19
%21 = getelementptr inbounds [10 x double], [10 x double]* %1, i64 %8, i64 6
%22 = load double, double* %21
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), double %10, double %12, double %14, double %16, double %18, double %20, double %22)
%24 = add nuw nsw i64 %8, 1
%25 = icmp eq i64 %24, %6
br i1 %25, label %26, label %7
26: ; preds = %7, %2
ret void
}