#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 > 1; a++) {
    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     1185 <main+0x55>
mov    -0x10(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x11(%rbp)
jl     1185 <main+0x55>
cmpl   $0x1,-0x10(%rbp)
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1195 <main+0x65>
jmp    11c8 <main+0x98>
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>
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   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
cmp    0x8(%rsp),%ebx
jg     119a <main+0x6a>
cmp    $0x2,%ebx
jl     119a <main+0x6a>
lea    0xea2(%rip),%r14
mov    %ebx,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    1186 <main+0x56>
mov    %r14,%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
cmp    0x8(%rsp),%ebp
jge    119a <main+0x6a>
cmp    $0x2,%ebx
jl     119a <main+0x6a>
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jge    1170 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
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 = %28, %0
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load i32, i32* %4
%13 = load i32, i32* %2
%14 = icmp sge i32 %12, %13
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i32, i32* %4
%17 = icmp sgt i32 %16, 1
br label %18
18: ; preds = %15, %11, %7
%19 = phi i1 [ false, %11 ], [ false, %7 ], [ %17, %15 ]
br i1 %19, label %20, label %31
20: ; preds = %18
%21 = load i32, i32* %4
%22 = call i32 @check_prime(i32 %21)
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %27
24: ; preds = %20
%25 = load i32, i32* %4
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %24, %20
br label %28
28: ; preds = %27
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %7
31: ; preds = %18
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 %25, label %9
9: ; preds = %0
%10 = icmp sgt i32 %6, 1
br i1 %10, label %11, label %25
11: ; preds = %9, %20
%12 = phi i32 [ %21, %20 ], [ %6, %9 ]
%13 = call i32 @check_prime(i32 %12)
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %17
17: ; preds = %11, %15
%18 = load i32, i32* %2
%19 = icmp slt i32 %12, %18
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = add nuw nsw i32 %12, 1
%22 = load i32, i32* %1
%23 = icmp sge i32 %21, %22
%24 = and i1 %10, %23
br i1 %24, label %11, label %25
25: ; preds = %17, %20, %9, %0
ret i32 0
}