#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 ends_in_3(int);
int isPrime(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int x, y;
  scanf("%d", &x);
  scanf("%d", &y);
  while (x <= y) {
    if (isPrime(x) + ends_in_3(x) == 2)
      printf("%d\n", x);
    x++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xe9a(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11bb <main+0x7b>
mov    -0x8(%rbp),%edi
call   1040 <isPrime@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1060 <ends_in_3@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
cmp    $0x2,%eax
jne    11ad <main+0x6d>
mov    -0x8(%rbp),%esi
lea    0xe5b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116f <main+0x2f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xeb6(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    (%rsp),%edi
cmp    0x4(%rsp),%edi
jle    1174 <main+0x34>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe88(%rip),%rbx
jmp    118f <main+0x4f>
nopl   (%rax)
mov    (%rsp),%eax
lea    0x1(%rax),%edi
mov    %edi,(%rsp)
cmp    0x4(%rsp),%eax
jge    116b <main+0x2b>
call   1040 <isPrime@plt>
mov    %eax,%ebp
mov    (%rsp),%edi
call   1060 <ends_in_3@plt>
add    %ebp,%eax
cmp    $0x2,%eax
jne    1180 <main+0x40>
mov    (%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
jmp    1180 <main+0x40>

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

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