#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, j;
  scanf("%d %d", &n1, &n2);
  if (n1 == 1)
    n1++;
  for (j = n1; j <= n2; j = j + 1) {
    if (check_prime(j) == 1)
      printf("%d ", j);
  }
  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>
cmpl   $0x1,-0x8(%rbp)
jne    1166 <main+0x36>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11ab <main+0x7b>
mov    -0x10(%rbp),%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    1198 <main+0x68>
mov    -0x10(%rbp),%esi
lea    0xe73(%rip),%rdi
call   1040 <printf@plt>
jmp    119d <main+0x6d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    116c <main+0x3c>
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    $0x1,%ebx
jne    115e <main+0x2e>
movl   $0x2,0x4(%rsp)
mov    $0x2,%ebx
cmp    (%rsp),%ebx
jle    116d <main+0x3d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe92(%rip),%r14
jmp    118a <main+0x5a>
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%rbx),%eax
cmp    (%rsp),%ebx
mov    %eax,%ebx
jge    1163 <main+0x33>
mov    %ebx,%edi
call   1030 <check_prime@plt>
cmp    $0x1,%eax
jne    1180 <main+0x50>
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
jmp    1180 <main+0x50>

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