#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 main() {
  int n, i;
  scanf("%d", &n);
  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    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x2,-0x8(%rbp)
jle    1193 <main+0x73>
cmpl   $0x3e8,-0x8(%rbp)
jge    1193 <main+0x73>
movl   $0x1,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jg     118e <main+0x6e>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
imul   -0x8(%rbp),%ecx
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115d <main+0x3d>
jmp    1193 <main+0x73>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

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