#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, i, d;
  scanf("%d", &n);
  if (n < 10000) {
    for (i = 1; i < 10000; i++) {
      if (i % n == 2) {
        printf("%d\n", i);
      }
    }
  }
  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   $0x2710,-0x8(%rbp)
jge    1197 <main+0x77>
movl   $0x1,-0xc(%rbp)
cmpl   $0x2710,-0xc(%rbp)
jge    1192 <main+0x72>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x2,%edx
jne    117f <main+0x5f>
mov    -0xc(%rbp),%esi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
jmp    1184 <main+0x64>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1153 <main+0x33>
jmp    1197 <main+0x77>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ecx
cmp    $0x270f,%ecx
jg     1175 <main+0x55>
mov    $0x1,%ebx
lea    0xeb6(%rip),%r14
nopl   (%rax)
mov    %ebx,%eax
cltd
idiv   %ecx
cmp    $0x2,%edx
jne    1164 <main+0x44>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    $0x270f,%ebx
je     1175 <main+0x55>
mov    0x4(%rsp),%ecx
add    $0x1,%ebx
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%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 = icmp slt i32 %4, 10000
br i1 %5, label %6, label %18
6: ; preds = %0, %16
%7 = phi i32 [ %17, %16 ], [ %4, %0 ]
%8 = phi i32 [ %14, %16 ], [ 1, %0 ]
%9 = srem i32 %8, %7
%10 = icmp eq i32 %9, 2
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %13
13: ; preds = %6, %11
%14 = add nuw nsw i32 %8, 1
%15 = icmp eq i32 %14, 10000
br i1 %15, label %18, label %16
16: ; preds = %13
%17 = load i32, i32* %1
br label %6
18: ; preds = %13, %0
ret i32 0
}