#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 EXIT_SUCCESS;
int /*<<< orphan*/ checkIntInput(int *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int n;
  printf("Enter numbers: ");
  checkIntInput(&n);
  int rows, cols;
  for (rows = 0; rows < n; rows++) {
    for (cols = rows + 1; cols <= (rows + n); cols++) {
      printf("%d ", cols);
    }
    printf("\n");
  }
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x8(%rbp),%rdi
call   1030 <checkIntInput@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ae <main+0x8e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     1192 <main+0x72>
mov    -0x10(%rbp),%esi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1162 <main+0x42>
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114d <main+0x2d>
mov    0x2e2b(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x4(%rsp),%rdi
call   1040 <checkIntInput@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    11ab <main+0x7b>
lea    0xeb2(%rip),%r15
xor    %ebx,%ebx
jmp    1186 <main+0x56>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%eax
mov    %r14d,%ebx
cmp    %eax,%r14d
jge    11ab <main+0x7b>
lea    0x1(%rbx),%r14d
test   %eax,%eax
jle    1170 <main+0x40>
mov    %ebx,%ebp
add    $0x1,%ebp
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%rsp),%eax
add    %ebx,%eax
cmp    %eax,%ebp
jl     1190 <main+0x60>
jmp    1170 <main+0x40>
mov    0x2e2e(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"Enter numbers: \00"
@.str.1 = [4 x i8] c"%d \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @checkIntInput(i32* %1)
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %23
7: ; preds = %0, %19
%8 = phi i32 [ %21, %19 ], [ %5, %0 ]
%9 = phi i32 [ %10, %19 ], [ 0, %0 ]
%10 = add nuw nsw i32 %9, 1
%11 = icmp slt i32 %8, 1
br i1 %11, label %19, label %12
12: ; preds = %7, %12
%13 = phi i32 [ %15, %12 ], [ %10, %7 ]
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = add nuw nsw i32 %13, 1
%16 = load i32, i32* %1
%17 = add nsw i32 %16, %9
%18 = icmp slt i32 %13, %17
br i1 %18, label %12, label %19
19: ; preds = %12, %7
%20 = call i32 @putchar(i32 10)
%21 = load i32, i32* %1
%22 = icmp slt i32 %10, %21
br i1 %22, label %7, label %23
23: ; preds = %19, %0
%24 = load i32, i32* @EXIT_SUCCESS
ret i32 %24
}