#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 *, ...);
int main() {
  int i = 0, j = 0;
  int arr[6][6] = {0};
  for (i = 0; i < 6; i++) {
    arr[i][j] = 1;
  }
  for (j = i; j > 0; j--) {
    arr[i][j] = 1;
    i--;
  }
  for (i = 2; i < 6; i++) {
    for (j = 1; j < 6 - 1; j++) {
      if (i >= j)
        arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
    }
  }
  for (i = 0; i < 6; i++) {
    for (j = 0; j < 6; j++) {
      if (arr[i][j] != 0)
        printf("%4d", arr[i][j]);
      else
        printf("  ");
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x90,%edx
call   1040 <memset@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jge    118f <main+0x6f>
movslq -0x8(%rbp),%rcx
lea    -0xa0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115a <main+0x3a>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    11d3 <main+0xb3>
movslq -0x8(%rbp),%rcx
lea    -0xa0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1195 <main+0x75>
movl   $0x2,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jge    1281 <main+0x161>
movl   $0x1,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    126e <main+0x14e>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     125b <main+0x13b>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0xa0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0xa0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
add    (%rax,%rcx,4),%edx
movslq -0x8(%rbp),%rcx
lea    -0xa0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    1260 <main+0x140>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11eb <main+0xcb>
jmp    1273 <main+0x153>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11da <main+0xba>
movl   $0x0,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jge    132c <main+0x20c>
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    1310 <main+0x1f0>
movslq -0x8(%rbp),%rcx
lea    -0xa0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     12ef <main+0x1cf>
movslq -0x8(%rbp),%rcx
lea    -0xa0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12fd <main+0x1dd>
lea    0xd0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1302 <main+0x1e2>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1299 <main+0x179>
lea    0xcf0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1288 <main+0x168>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x90,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x20(%rsp)
movl   $0x1,(%rsp)
movabs $0x100000001,%rax
mov    %rax,0x18(%rsp)
movl   $0x1,0x30(%rsp)
movl   $0x1,0xa8(%rsp)
movabs $0x100000002,%rax
mov    %rax,0x34(%rsp)
movaps 0xe70(%rip),%xmm0
movups %xmm0,0x48(%rsp)
movaps 0xe74(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movl   $0x1,0x70(%rsp)
movaps 0xe70(%rip),%xmm0
movups %xmm0,0x78(%rsp)
movabs $0x100000005,%rax
mov    %rax,0x88(%rsp)
mov    $0x1,%esi
lea    0xe61(%rip),%r14
lea    0xe56(%rip),%r15
xor    %ebx,%ebx
test   %esi,%esi
je     11f0 <main+0xd0>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11fa <main+0xda>
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp,%rbx,1),%esi
test   %esi,%esi
je     1210 <main+0xf0>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    121a <main+0xfa>
xchg   %ax,%ax
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp,%rbx,1),%esi
test   %esi,%esi
je     1230 <main+0x110>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    123a <main+0x11a>
xchg   %ax,%ax
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp,%rbx,1),%esi
test   %esi,%esi
je     1250 <main+0x130>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    125a <main+0x13a>
xchg   %ax,%ax
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp,%rbx,1),%esi
test   %esi,%esi
je     1270 <main+0x150>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    127a <main+0x15a>
xchg   %ax,%ax
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp,%rbx,1),%esi
test   %esi,%esi
je     1290 <main+0x170>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    129a <main+0x17a>
xchg   %ax,%ax
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    $0x78,%rbx
je     12bf <main+0x19f>
mov    0x18(%rsp,%rbx,1),%esi
add    $0x18,%rbx
test   %esi,%esi
jne    11e0 <main+0xc0>
jmp    11f0 <main+0xd0>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

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