#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*/ prettyprint(double);
int /*<<< orphan*/ printPoints();
int /*<<< orphan*/ printf(char *, ...);
void printBigTriangleDown(double **data, int baseSize) {
  int i, j;
  int roundSize = 4;
  prettyprint(data[0][0]);
  prettyprint(data[0][1]);
  for (i = 0; i < roundSize - 1; i++) {
    printPoints();
  }
  prettyprint(data[0][baseSize - 2]);
  prettyprint(data[0][baseSize - 1]);
  printf("\n");
  for (i = 0; i <= roundSize + 1; i++) {
    printPoints();
  }
  printf("\n");
  prettyprint(data[baseSize - (roundSize + 1)][0]);
  for (i = 0; i < roundSize - 1; i++) {
    printPoints();
  }
  printf("%1.3e\n", data[baseSize - (roundSize + 1)][roundSize]);
  for (i = baseSize - roundSize; i < baseSize; i++) {
    for (j = 0; j < baseSize - i; j++) {
      prettyprint(data[i][j]);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<printBigTriangleDown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x4,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
call   1040 <prettyprint@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsd  0x8(%rax),%xmm0
call   1040 <prettyprint@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1194 <printBigTriangleDown+0x64>
mov    $0x0,%al
call   1050 <printPoints@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    116e <printBigTriangleDown+0x3e>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <prettyprint@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <prettyprint@plt>
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jg     1203 <printBigTriangleDown+0xd3>
mov    $0x0,%al
call   1050 <printPoints@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11dd <printBigTriangleDown+0xad>
lea    0xdfb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%edx
add    $0x1,%edx
sub    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movsd  (%rax),%xmm0
call   1040 <prettyprint@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    125d <printBigTriangleDown+0x12d>
mov    $0x0,%al
call   1050 <printPoints@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1237 <printBigTriangleDown+0x107>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%edx
add    $0x1,%edx
sub    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xd7d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12fb <printBigTriangleDown+0x1cb>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    12df <printBigTriangleDown+0x1af>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <prettyprint@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12a6 <printBigTriangleDown+0x176>
lea    0xd1f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1293 <printBigTriangleDown+0x163>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printBigTriangleDown>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
mov    (%rdi),%rax
movsd  (%rax),%xmm0
call   1050 <prettyprint@plt>
mov    (%rbx),%rax
movsd  0x8(%rax),%xmm0
call   1050 <prettyprint@plt>
xor    %eax,%eax
call   1060 <printPoints@plt>
xor    %eax,%eax
call   1060 <printPoints@plt>
xor    %eax,%eax
call   1060 <printPoints@plt>
mov    (%rbx),%rax
movslq %ebp,%r14
movsd  -0x10(%rax,%r14,8),%xmm0
call   1050 <prettyprint@plt>
mov    (%rbx),%rax
movsd  -0x8(%rax,%r14,8),%xmm0
call   1050 <prettyprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1060 <printPoints@plt>
xor    %eax,%eax
call   1060 <printPoints@plt>
xor    %eax,%eax
call   1060 <printPoints@plt>
xor    %eax,%eax
call   1060 <printPoints@plt>
xor    %eax,%eax
call   1060 <printPoints@plt>
xor    %eax,%eax
call   1060 <printPoints@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x28(%rbx,%r14,8),%rax
movsd  (%rax),%xmm0
call   1050 <prettyprint@plt>
xor    %eax,%eax
call   1060 <printPoints@plt>
xor    %eax,%eax
call   1060 <printPoints@plt>
xor    %eax,%eax
call   1060 <printPoints@plt>
mov    -0x28(%rbx,%r14,8),%rax
movsd  0x20(%rax),%xmm0
lea    0xdf6(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    -0x4(%r14),%eax
movslq %eax,%rbp
mov    (%rbx,%rbp,8),%rax
movsd  (%rax),%xmm0
call   1050 <prettyprint@plt>
mov    (%rbx,%rbp,8),%rax
movsd  0x8(%rax),%xmm0
call   1050 <prettyprint@plt>
mov    (%rbx,%rbp,8),%rax
movsd  0x10(%rax),%xmm0
call   1050 <prettyprint@plt>
mov    (%rbx,%rbp,8),%rax
movsd  0x18(%rax),%xmm0
call   1050 <prettyprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbp),%rax
cmp    %r14,%rax
jge    12db <printBigTriangleDown+0x19b>
mov    0x8(%rbx,%rbp,8),%rax
movsd  (%rax),%xmm0
call   1050 <prettyprint@plt>
mov    0x8(%rbx,%rbp,8),%rax
movsd  0x8(%rax),%xmm0
call   1050 <prettyprint@plt>
mov    0x8(%rbx,%rbp,8),%rax
movsd  0x10(%rax),%xmm0
call   1050 <prettyprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x10(%rbx,%rbp,8),%rax
movsd  (%rax),%xmm0
call   1050 <prettyprint@plt>
mov    0x10(%rbx,%rbp,8),%rax
movsd  0x8(%rax),%xmm0
call   1050 <prettyprint@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x18(%rbx,%rbp,8),%rax
movsd  (%rax),%xmm0
call   1050 <prettyprint@plt>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%1.3e\0A\00"
define void @printBigTriangleDown(double** nocapture %0, i32 %1) {
%3 = load double*, double** %0
%4 = load double, double* %3
%5 = tail call i32 @prettyprint(double %4)
%6 = load double*, double** %0
%7 = getelementptr inbounds double, double* %6, i64 1
%8 = load double, double* %7
%9 = tail call i32 @prettyprint(double %8)
%10 = tail call i32 (...) @printPoints()
%11 = tail call i32 (...) @printPoints()
%12 = tail call i32 (...) @printPoints()
%13 = load double*, double** %0
%14 = add nsw i32 %1, -2
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double, double* %13, i64 %15
%17 = load double, double* %16
%18 = tail call i32 @prettyprint(double %17)
%19 = load double*, double** %0
%20 = add nsw i32 %1, -1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds double, double* %19, i64 %21
%23 = load double, double* %22
%24 = tail call i32 @prettyprint(double %23)
%25 = tail call i32 @putchar(i32 10)
%26 = tail call i32 (...) @printPoints()
%27 = tail call i32 (...) @printPoints()
%28 = tail call i32 (...) @printPoints()
%29 = tail call i32 (...) @printPoints()
%30 = tail call i32 (...) @printPoints()
%31 = tail call i32 (...) @printPoints()
%32 = tail call i32 @putchar(i32 10)
%33 = add nsw i32 %1, -5
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds double*, double** %0, i64 %34
%36 = load double*, double** %35
%37 = load double, double* %36
%38 = tail call i32 @prettyprint(double %37)
%39 = tail call i32 (...) @printPoints()
%40 = tail call i32 (...) @printPoints()
%41 = tail call i32 (...) @printPoints()
%42 = load double*, double** %35
%43 = getelementptr inbounds double, double* %42, i64 4
%44 = load double, double* %43
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %44)
%46 = add i32 %1, -4
%47 = sext i32 %46 to i64
%48 = sext i32 %1 to i64
%49 = getelementptr inbounds double*, double** %0, i64 %47
%50 = load double*, double** %49
%51 = load double, double* %50
%52 = tail call i32 @prettyprint(double %51)
%53 = load double*, double** %49
%54 = getelementptr inbounds double, double* %53, i64 1
%55 = load double, double* %54
%56 = tail call i32 @prettyprint(double %55)
%57 = load double*, double** %49
%58 = getelementptr inbounds double, double* %57, i64 2
%59 = load double, double* %58
%60 = tail call i32 @prettyprint(double %59)
%61 = load double*, double** %49
%62 = getelementptr inbounds double, double* %61, i64 3
%63 = load double, double* %62
%64 = tail call i32 @prettyprint(double %63)
%65 = tail call i32 @putchar(i32 10)
%66 = add nsw i64 %47, 1
%67 = icmp slt i64 %66, %48
br i1 %67, label %68, label %98
68: ; preds = %2
%69 = getelementptr inbounds double*, double** %0, i64 %66
%70 = load double*, double** %69
%71 = load double, double* %70
%72 = tail call i32 @prettyprint(double %71)
%73 = load double*, double** %69
%74 = getelementptr inbounds double, double* %73, i64 1
%75 = load double, double* %74
%76 = tail call i32 @prettyprint(double %75)
%77 = load double*, double** %69
%78 = getelementptr inbounds double, double* %77, i64 2
%79 = load double, double* %78
%80 = tail call i32 @prettyprint(double %79)
%81 = tail call i32 @putchar(i32 10)
%82 = add nsw i64 %47, 2
%83 = getelementptr inbounds double*, double** %0, i64 %82
%84 = load double*, double** %83
%85 = load double, double* %84
%86 = tail call i32 @prettyprint(double %85)
%87 = load double*, double** %83
%88 = getelementptr inbounds double, double* %87, i64 1
%89 = load double, double* %88
%90 = tail call i32 @prettyprint(double %89)
%91 = tail call i32 @putchar(i32 10)
%92 = add nsw i64 %47, 3
%93 = getelementptr inbounds double*, double** %0, i64 %92
%94 = load double*, double** %93
%95 = load double, double* %94
%96 = tail call i32 @prettyprint(double %95)
%97 = tail call i32 @putchar(i32 10)
br label %98
98: ; preds = %68, %2
ret void
}