#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 check_prime(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int n1, n2, a;
  scanf("%d %d", &n1, &n2);
  for (a = n1; a <= n2 && a >= n1; a++) {
    if (a == 1) {
      continue;
    } else if (check_prime(a) == 1) {
      printf("%d ", a);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x11(%rbp)
jg     1176 <main+0x46>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
setge  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1186 <main+0x56>
jmp    11cd <main+0x9d>
cmpl   $0x1,-0x10(%rbp)
jne    1195 <main+0x65>
jmp    11bf <main+0x8f>
mov    -0x10(%rbp),%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    11b5 <main+0x85>
mov    -0x10(%rbp),%esi
lea    0xe56(%rip),%rdi
call   1040 <printf@plt>
jmp    11ba <main+0x8a>
jmp    11bf <main+0x8f>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1159 <main+0x29>
xor    %eax,%eax
add    $0x20,%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
jg     1189 <main+0x59>
lea    0xeae(%rip),%r14
nopl   0x0(%rax,%rax,1)
cmp    $0x1,%ebx
je     117b <main+0x4b>
mov    %ebx,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    117b <main+0x4b>
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
cmp    (%rsp),%ebx
jge    1189 <main+0x59>
add    $0x1,%ebx
cmp    0x4(%rsp),%ebx
jge    1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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 = %30, %0
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i32, i32* %4
%13 = load i32, i32* %2
%14 = icmp sge i32 %12, %13
br label %15
15: ; preds = %11, %7
%16 = phi i1 [ false, %7 ], [ %14, %11 ]
br i1 %16, label %17, label %33
17: ; preds = %15
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 1
br i1 %19, label %20, label %21
20: ; preds = %17
br label %30
21: ; preds = %17
%22 = load i32, i32* %4
%23 = call i32 @check_prime(i32 %22)
%24 = icmp eq i32 %23, 1
br i1 %24, label %25, label %28
25: ; preds = %21
%26 = load i32, i32* %4
%27 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %26)
br label %28
28: ; preds = %25, %21
br label %29
29: ; preds = %28
br label %30
30: ; preds = %29, %20
%31 = load i32, i32* %4
%32 = add nsw i32 %31, 1
store i32 %32, i32* %4
br label %7
33: ; preds = %15
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 %24, label %9
9: ; preds = %0, %17
%10 = phi i32 [ %18, %17 ], [ %6, %0 ]
%11 = icmp eq i32 %10, 1
br i1 %11, label %17, label %12
12: ; preds = %9
%13 = call i32 @check_prime(i32 %10)
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %17
17: ; preds = %15, %12, %9
%18 = add nsw i32 %10, 1
%19 = load i32, i32* %2
%20 = icmp slt i32 %10, %19
%21 = load i32, i32* %1
%22 = icmp sge i32 %18, %21
%23 = select i1 %20, i1 %22, i1 false
br i1 %23, label %9, label %24
24: ; preds = %17, %0
ret i32 0
}