#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int s = 1, h;
  int i, j;
  scanf("%d", &h);
  printf("1\n");
  for (i = 2; i <= h; s = 1, i++) {
    printf("1 ");
    for (j = 1; j <= i - 2; j++)
      printf("%d ", (s = (i - j) * s / j));
    printf("1\n");
  }
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11ef <main+0xbf>
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     11cc <main+0x9c>
mov    -0x10(%rbp),%eax
sub    -0x14(%rbp),%eax
imul   -0x8(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    %eax,%esi
mov    %esi,-0x8(%rbp)
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118c <main+0x5c>
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    116b <main+0x3b>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xeae(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x2,0x4(%rsp)
jge    1187 <main+0x47>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x2,%r13d
mov    $0x1,%r15d
lea    0xe6c(%rip),%rbx
jmp    11be <main+0x7e>
nopl   0x0(%rax)
lea    0xe63(%rip),%rdi
call   1030 <puts@plt>
lea    0x1(%r13),%eax
add    $0x1,%r15d
cmp    0x4(%rsp),%r13d
mov    %eax,%r13d
jge    116f <main+0x2f>
lea    0xe3e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x3,%r13d
jb     11a0 <main+0x60>
mov    $0x1,%r14d
mov    %r15d,%r12d
mov    $0x1,%ebp
imul   %r12d,%ebp
mov    %ebp,%eax
cltd
idiv   %r14d
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r14d
add    $0xffffffff,%r12d
cmp    $0x1,%r12d
jne    11e0 <main+0xa0>
jmp    11a0 <main+0x60>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.2 = [3 x i8] c"1 \00"
@.str.3 = [4 x i8] c"%d \00"
@str.4 = [2 x i8] c"1\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0))
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 2
br i1 %6, label %27, label %7
7: ; preds = %0, %21
%8 = phi i32 [ %26, %21 ], [ 1, %0 ]
%9 = phi i32 [ %23, %21 ], [ 2, %0 ]
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp ult i32 %9, 3
br i1 %11, label %21, label %12
12: ; preds = %7, %12
%13 = phi i32 [ %19, %12 ], [ 1, %7 ]
%14 = phi i32 [ %17, %12 ], [ 1, %7 ]
%15 = sub nsw i32 %9, %13
%16 = mul nsw i32 %15, %14
%17 = sdiv i32 %16, %13
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = add nuw nsw i32 %13, 1
%20 = icmp eq i32 %19, %8
br i1 %20, label %21, label %12
21: ; preds = %12, %7
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0))
%23 = add nuw nsw i32 %9, 1
%24 = load i32, i32* %1
%25 = icmp slt i32 %9, %24
%26 = add nuw nsw i32 %8, 1
br i1 %25, label %7, label %27
27: ; preds = %21, %0
%28 = call i32 (...) @getchar()
ret i32 0
}