#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 */
scalar_t__ check_prime(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int n1, n2;
  scanf("%d %d", &n1, &n2);
  int n = n1;
  while (n <= n2) {
    if ((check_prime(n)) || (n == 2) || (n == 3)) {
      printf("%d ", n);
    }
    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
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11a8 <main+0x78>
mov    -0x10(%rbp),%edi
call   1030 <check_prime@plt>
cmp    $0x0,%rax
jne    118b <main+0x5b>
cmpl   $0x2,-0x10(%rbp)
je     118b <main+0x5b>
cmpl   $0x3,-0x10(%rbp)
jne    119a <main+0x6a>
mov    -0x10(%rbp),%esi
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1159 <main+0x29>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%ebx
cmp    (%rsp),%ebx
jle    115b <main+0x2b>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xea4(%rip),%r14
jmp    1184 <main+0x54>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
lea    0x1(%rbx),%eax
cmp    (%rsp),%ebx
mov    %eax,%ebx
jge    1151 <main+0x21>
mov    %ebx,%edi
call   1030 <check_prime@plt>
test   %rax,%rax
jne    1170 <main+0x40>
mov    %ebx,%eax
and    $0xfffffffe,%eax
cmp    $0x2,%eax
jne    117a <main+0x4a>
jmp    1170 <main+0x40>

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

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