#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 *, unsigned int);
int /*<<< orphan*/ puts(char *);
unsigned int printTriangle() {
  unsigned int results[33 * 32];
  for (int l = 0; l < 32; ++l) {
    for (int c = 0; c < l + 2; ++c) {
      if (c > l) {
        results[32 * l + c] = 0;
        continue;
      } else if (c == 0) {
        results[32 * l + c] = 1;
      } else {
        results[32 * l + c] =
            results[32 * (l - 1) + c - 1] + results[32 * (l - 1) + c];
      }
      printf("%-9u ", results[32 * l + c]);
    }
    puts("");
  }
  return 0;
}


x86 assembly (clang, -O0):
<printTriangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1090,%rsp
movl   $0x0,-0x1084(%rbp)
cmpl   $0x20,-0x1084(%rbp)
jge    1272 <printTriangle+0x152>
movl   $0x0,-0x1088(%rbp)
mov    -0x1088(%rbp),%eax
mov    -0x1084(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    1252 <printTriangle+0x132>
mov    -0x1088(%rbp),%eax
cmp    -0x1084(%rbp),%eax
jle    1196 <printTriangle+0x76>
mov    -0x1084(%rbp),%eax
shl    $0x5,%eax
add    -0x1088(%rbp),%eax
cltq
movl   $0x0,-0x1080(%rbp,%rax,4)
jmp    123e <printTriangle+0x11e>
cmpl   $0x0,-0x1088(%rbp)
jne    11c4 <printTriangle+0xa4>
mov    -0x1084(%rbp),%eax
shl    $0x5,%eax
add    -0x1088(%rbp),%eax
cltq
movl   $0x1,-0x1080(%rbp,%rax,4)
jmp    1215 <printTriangle+0xf5>
mov    -0x1084(%rbp),%eax
sub    $0x1,%eax
shl    $0x5,%eax
add    -0x1088(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x1080(%rbp,%rax,4),%ecx
mov    -0x1084(%rbp),%eax
sub    $0x1,%eax
shl    $0x5,%eax
add    -0x1088(%rbp),%eax
cltq
add    -0x1080(%rbp,%rax,4),%ecx
mov    -0x1084(%rbp),%eax
shl    $0x5,%eax
add    -0x1088(%rbp),%eax
cltq
mov    %ecx,-0x1080(%rbp,%rax,4)
jmp    121a <printTriangle+0xfa>
mov    -0x1084(%rbp),%eax
shl    $0x5,%eax
add    -0x1088(%rbp),%eax
cltq
mov    -0x1080(%rbp,%rax,4),%esi
lea    0xdc7(%rip),%rdi
call   1040 <printf@plt>
mov    -0x1088(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1088(%rbp)
jmp    114c <printTriangle+0x2c>
lea    0xdac(%rip),%rdi
call   1030 <puts@plt>
mov    -0x1084(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1084(%rbp)
jmp    1135 <printTriangle+0x15>
xor    %eax,%eax
add    $0x1090,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTriangle>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1080,%rsp
mov    %rsp,%r13
mov    $0xffffffffffffffff,%r15
xor    %r12d,%r12d
lea    0xebc(%rip),%r14
jmp    116c <printTriangle+0x4c>
cs nopw 0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r12
sub    $0xffffffffffffff80,%r13
add    $0xffffffffffffffff,%r15
cmp    $0x20,%r12
je     11cc <printTriangle+0xac>
mov    %r12,%rax
shl    $0x7,%rax
movl   $0x1,(%rsp,%rax,1)
mov    %r14,%rdi
mov    $0x1,%esi
call   1040 <printf@plt>
mov    $0x1,%ebx
jmp    11bc <printTriangle+0x9c>
xchg   %ax,%ax
mov    -0x80(%r13,%rbx,4),%esi
add    -0x84(%r13,%rbx,4),%esi
ff
mov    %esi,0x0(%r13,%rbx,4)
mov    %r14,%rdi
call   1040 <printf@plt>
lea    (%r15,%rbx,1),%rax
add    $0x1,%rax
add    $0x1,%rbx
cmp    $0x1,%rax
je     1150 <printTriangle+0x30>
cmp    %r12,%rbx
jbe    1190 <printTriangle+0x70>
movl   $0x0,0x0(%r13,%rbx,4)
jmp    11aa <printTriangle+0x8a>
xor    %eax,%eax
add    $0x1080,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%-9u \00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @printTriangle() {
%1 = alloca [1056 x i32]
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %2
br label %4
4: ; preds = %74, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 32
br i1 %6, label %7, label %77
7: ; preds = %4
store i32 0, i32* %3
br label %8
8: ; preds = %69, %7
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 2
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %72
13: ; preds = %8
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %24
17: ; preds = %13
%18 = load i32, i32* %2
%19 = mul nsw i32 32, %18
%20 = load i32, i32* %3
%21 = add nsw i32 %19, %20
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [1056 x i32], [1056 x i32]* %1, i64 0, i64 %22
store i32 0, i32* %23
br label %69
24: ; preds = %13
%25 = load i32, i32* %3
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %34
27: ; preds = %24
%28 = load i32, i32* %2
%29 = mul nsw i32 32, %28
%30 = load i32, i32* %3
%31 = add nsw i32 %29, %30
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [1056 x i32], [1056 x i32]* %1, i64 0, i64 %32
store i32 1, i32* %33
br label %59
34: ; preds = %24
%35 = load i32, i32* %2
%36 = sub nsw i32 %35, 1
%37 = mul nsw i32 32, %36
%38 = load i32, i32* %3
%39 = add nsw i32 %37, %38
%40 = sub nsw i32 %39, 1
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [1056 x i32], [1056 x i32]* %1, i64 0, i64 %41
%43 = load i32, i32* %42
%44 = load i32, i32* %2
%45 = sub nsw i32 %44, 1
%46 = mul nsw i32 32, %45
%47 = load i32, i32* %3
%48 = add nsw i32 %46, %47
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [1056 x i32], [1056 x i32]* %1, i64 0, i64 %49
%51 = load i32, i32* %50
%52 = add i32 %43, %51
%53 = load i32, i32* %2
%54 = mul nsw i32 32, %53
%55 = load i32, i32* %3
%56 = add nsw i32 %54, %55
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [1056 x i32], [1056 x i32]* %1, i64 0, i64 %57
store i32 %52, i32* %58
br label %59
59: ; preds = %34, %27
br label %60
60: ; preds = %59
%61 = load i32, i32* %2
%62 = mul nsw i32 32, %61
%63 = load i32, i32* %3
%64 = add nsw i32 %62, %63
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [1056 x i32], [1056 x i32]* %1, i64 0, i64 %65
%67 = load i32, i32* %66
%68 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %67)
br label %69
69: ; preds = %60, %17
%70 = load i32, i32* %3
%71 = add nsw i32 %70, 1
store i32 %71, i32* %3
br label %8
72: ; preds = %8
%73 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %74
74: ; preds = %72
%75 = load i32, i32* %2
%76 = add nsw i32 %75, 1
store i32 %76, i32* %2
br label %4
77: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%-9u \00"
define i32 @printTriangle() {
%1 = alloca [1056 x i32]
%2 = bitcast [1056 x i32]* %1 to i8*
br label %3
3: ; preds = %10, %0
%4 = phi i64 [ 0, %0 ], [ %12, %10 ]
%5 = phi i64 [ 2, %0 ], [ %13, %10 ]
%6 = shl i64 %4, 5
%7 = getelementptr inbounds [1056 x i32], [1056 x i32]* %1, i64 0, i64 %6
store i32 1, i32* %7
%8 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
br label %15
9: ; preds = %10
ret i32 0
10: ; preds = %31
%11 = tail call i32 @putchar(i32 10)
%12 = add nuw nsw i64 %4, 1
%13 = add nuw nsw i64 %5, 1
%14 = icmp eq i64 %12, 32
br i1 %14, label %9, label %3
15: ; preds = %3, %31
%16 = phi i64 [ 1, %3 ], [ %32, %31 ]
%17 = icmp ugt i64 %16, %4
%18 = add nuw nsw i64 %16, %6
br i1 %17, label %19, label %21
19: ; preds = %15
%20 = getelementptr inbounds [1056 x i32], [1056 x i32]* %1, i64 0, i64 %18
store i32 0, i32* %20
br label %31
21: ; preds = %15
%22 = add nsw i64 %18, -32
%23 = add nsw i64 %18, -33
%24 = getelementptr inbounds [1056 x i32], [1056 x i32]* %1, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = getelementptr inbounds [1056 x i32], [1056 x i32]* %1, i64 0, i64 %22
%27 = load i32, i32* %26
%28 = add i32 %27, %25
%29 = getelementptr inbounds [1056 x i32], [1056 x i32]* %1, i64 0, i64 %18
store i32 %28, i32* %29
%30 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %28)
br label %31
31: ; preds = %21, %19
%32 = add nuw nsw i64 %16, 1
%33 = icmp eq i64 %32, %5
br i1 %33, label %10, label %15
}