#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, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
int main() {
  int N, I;
  scanf("%d", &N);
  system("clear");
  if (N > 2 && N < 1000) {
    for (I = 1; I <= 10; I++)
      printf("%d x %d = %d\n", I, N, I * N);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xead(%rip),%rdi
call   1030 <system@plt>
cmpl   $0x2,-0x8(%rbp)
jle    11af <main+0x7f>
cmpl   $0x3e8,-0x8(%rbp)
jge    11af <main+0x7f>
movl   $0x1,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jg     11aa <main+0x7a>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
imul   -0x8(%rbp),%ecx
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1179 <main+0x49>
jmp    11af <main+0x7f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xeb6(%rip),%rdi
call   1030 <system@plt>
mov    0xc(%rsp),%ecx
lea    -0x3(%rcx),%eax
cmp    $0x3e4,%eax
ja     1242 <main+0x112>
lea    0xe9e(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %ecx,%edx
call   1040 <printf@plt>
mov    0xc(%rsp),%edx
lea    (%rdx,%rdx,1),%ecx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1040 <printf@plt>
mov    0xc(%rsp),%edx
lea    (%rdx,%rdx,2),%ecx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    0xc(%rsp),%edx
lea    0x0(,%rdx,4),%ecx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <printf@plt>
mov    0xc(%rsp),%edx
lea    (%rdx,%rdx,4),%ecx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <printf@plt>
mov    0xc(%rsp),%edx
lea    (%rdx,%rdx,1),%eax
lea    (%rax,%rax,2),%ecx
mov    %rbx,%rdi
mov    $0x6,%esi
call   1040 <printf@plt>
mov    0xc(%rsp),%edx
lea    0x0(,%rdx,8),%ecx
sub    %edx,%ecx
mov    %rbx,%rdi
mov    $0x7,%esi
call   1040 <printf@plt>
mov    0xc(%rsp),%edx
lea    0x0(,%rdx,8),%ecx
mov    %rbx,%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
mov    0xc(%rsp),%edx
lea    (%rdx,%rdx,8),%ecx
mov    %rbx,%rdi
mov    $0x9,%esi
call   1040 <printf@plt>
mov    0xc(%rsp),%edx
lea    (%rdx,%rdx,1),%eax
lea    (%rax,%rax,4),%ecx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

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