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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11df <main+0xbf>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1183 <main+0x63>
mov    -0x10(%rbp),%esi
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1158 <main+0x38>
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jl     11c3 <main+0xa3>
mov    -0x14(%rbp),%esi
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    119a <main+0x7a>
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <main+0x26>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xec2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%ebp
test   %ebp,%ebp
jle    11d0 <main+0xa0>
mov    $0x1,%ebx
mov    $0x2,%r14d
lea    0xe9a(%rip),%r15
jmp    117f <main+0x4f>
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebp
cmp    %ebx,%ebp
jg     1170 <main+0x40>
mov    $0x2a,%edi
call   1030 <putchar@plt>
cmp    $0x2,%ebx
jb     11b5 <main+0x85>
mov    %r14d,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x2(%rbp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebp
cmp    $0x2,%ebp
jg     11a0 <main+0x70>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbx),%eax
mov    0x4(%rsp),%ebp
add    $0x1,%r14d
cmp    %ebp,%ebx
mov    %eax,%ebx
jl     117f <main+0x4f>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\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 = load i32, i32* %1
%5 = icmp slt i32 %4, 1
br i1 %5, label %28, label %6
6: ; preds = %0, %23
%7 = phi i32 [ %26, %23 ], [ %4, %0 ]
%8 = phi i32 [ %25, %23 ], [ 1, %0 ]
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %6, %10
%11 = phi i32 [ %13, %10 ], [ %7, %6 ]
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nsw i32 %11, -1
%14 = icmp sgt i32 %13, %8
br i1 %14, label %10, label %15
15: ; preds = %10, %6
%16 = call i32 @putchar(i32 42)
%17 = icmp ugt i32 %8, 1
br i1 %17, label %18, label %23
18: ; preds = %15, %18
%19 = phi i32 [ %20, %18 ], [ %8, %15 ]
%20 = add nsw i32 %19, -1
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = icmp sgt i32 %19, 2
br i1 %22, label %18, label %23
23: ; preds = %18, %15
%24 = call i32 @putchar(i32 10)
%25 = add nuw nsw i32 %8, 1
%26 = load i32, i32* %1
%27 = icmp slt i32 %8, %26
br i1 %27, label %6, label %28
28: ; preds = %23, %0
ret i32 0
}