#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 *, double const, double const, double const);
int /*<<< orphan*/ putchar(char);
void PrintCoords(const double **coords, const int len) {
  int i;
  for (i = 0; i < len; ++i)
    printf("\n % 8.3f % 8.3f % 8.3f", coords[0][i], coords[1][i], coords[2][i]);
  putchar('\n');
}


x86 assembly (clang, -O0):
<PrintCoords>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    118e <PrintCoords+0x6e>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <PrintCoords+0x16>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintCoords>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    116e <PrintCoords+0x4e>
mov    %rdi,%r12
mov    %esi,%r15d
xor    %ebx,%ebx
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r12),%rax
mov    0x8(%r12),%rcx
movsd  (%rax,%rbx,8),%xmm0
movsd  (%rcx,%rbx,8),%xmm1
mov    0x10(%r12),%rax
movsd  (%rax,%rbx,8),%xmm2
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1140 <PrintCoords+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"\0A % 8.3f % 8.3f % 8.3f\00"
define void @PrintCoords(double** %0, i32 %1) {
%3 = alloca double**
%4 = alloca i32
%5 = alloca i32
store double** %0, double*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %33, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %36
10: ; preds = %6
%11 = load double**, double*** %3
%12 = getelementptr inbounds double*, double** %11, i64 0
%13 = load double*, double** %12
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double, double* %13, i64 %15
%17 = load double, double* %16
%18 = load double**, double*** %3
%19 = getelementptr inbounds double*, double** %18, i64 1
%20 = load double*, double** %19
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %20, i64 %22
%24 = load double, double* %23
%25 = load double**, double*** %3
%26 = getelementptr inbounds double*, double** %25, i64 2
%27 = load double*, double** %26
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds double, double* %27, i64 %29
%31 = load double, double* %30
%32 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double %17, double %24, double %31)
br label %33
33: ; preds = %10
%34 = load i32, i32* %5
%35 = add nsw i32 %34, 1
store i32 %35, i32* %5
br label %6
36: ; preds = %6
%37 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"\0A % 8.3f % 8.3f % 8.3f\00"
define void @PrintCoords(double** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %22
4: ; preds = %2
%5 = getelementptr inbounds double*, double** %0, i64 1
%6 = getelementptr inbounds double*, double** %0, i64 2
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %20, %8 ]
%10 = load double*, double** %0
%11 = getelementptr inbounds double, double* %10, i64 %9
%12 = load double, double* %11
%13 = load double*, double** %5
%14 = getelementptr inbounds double, double* %13, i64 %9
%15 = load double, double* %14
%16 = load double*, double** %6
%17 = getelementptr inbounds double, double* %16, i64 %9
%18 = load double, double* %17
%19 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double %12, double %15, double %18)
%20 = add nuw nsw i64 %9, 1
%21 = icmp eq i64 %20, %7
br i1 %21, label %22, label %8
22: ; preds = %8, %2
%23 = tail call i32 @putchar(i8 signext 10)
ret void
}