#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);
  a = n1;
  while ((a >= n1) && (a <= n2)) {
    int m;
    m = check_prime(a);
    if (m == 1) {
      printf("%d ", a);
    }
    a = a + 1;
  }
  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    -0x8(%rbp),%ecx
mov    %al,-0x15(%rbp)
jl     1176 <main+0x46>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
setle  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1186 <main+0x56>
jmp    11b8 <main+0x88>
mov    -0x10(%rbp),%edi
call   1030 <check_prime@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    11aa <main+0x7a>
mov    -0x10(%rbp),%esi
lea    0xe60(%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    $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     1186 <main+0x56>
lea    0xead(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    1176 <main+0x46>
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
lea    0x1(%rbx),%eax
cmp    0x4(%rsp),%eax
jl     1186 <main+0x56>
cmp    (%rsp),%ebx
mov    %eax,%ebx
jl     1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [5 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 ([5 x i8], [5 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 %22, label %9
9: ; preds = %0, %15
%10 = phi i32 [ %16, %15 ], [ %6, %0 ]
%11 = call i32 @check_prime(i32 %10)
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %15
15: ; preds = %13, %9
%16 = add nsw i32 %10, 1
%17 = load i32, i32* %1
%18 = icmp sge i32 %16, %17
%19 = load i32, i32* %2
%20 = icmp slt i32 %10, %19
%21 = select i1 %18, i1 %20, i1 false
br i1 %21, label %9, label %22
22: ; preds = %15, %0
ret i32 0
}