#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 */
scalar_t__ primo(long);
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ scanf(char *, long *, long *);
int main(int argc, char const *argv[]) {
  long a, b, c;
  scanf("%li %li", &a, &b);
  if (a < b) {
    c = a;
    a = b;
    b = c;
  }
  while (a >= b) {
    if (primo(a)) {
      printf("%li\n", a);
    }
    a--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    1180 <main+0x50>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1185 <main+0x55>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jl     11c7 <main+0x97>
mov    -0x18(%rbp),%rdi
call   1050 <primo@plt>
cmp    $0x0,%rax
je     11b6 <main+0x86>
mov    -0x18(%rbp),%rsi
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    1185 <main+0x55>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
mov    %rsp,%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    (%rsp),%rax
mov    0x8(%rsp),%rdi
cmp    %rdi,%rax
jge    116a <main+0x3a>
mov    %rdi,(%rsp)
mov    %rax,0x8(%rsp)
mov    %rax,%rcx
cmp    %rcx,%rdi
jl     1175 <main+0x45>
jmp    117d <main+0x4d>
mov    %rdi,%rcx
mov    %rax,%rdi
cmp    %rcx,%rdi
jge    117d <main+0x4d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret
lea    0xe84(%rip),%rbx
jmp    11a3 <main+0x73>
cs nopw 0x0(%rax,%rax,1)
mov    (%rsp),%rax
lea    -0x1(%rax),%rdi
mov    %rdi,(%rsp)
cmp    0x8(%rsp),%rax
jle    1175 <main+0x45>
call   1050 <primo@plt>
test   %rax,%rax
je     1190 <main+0x60>
mov    (%rsp),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
jmp    1190 <main+0x60>

LLVM IR (-O0):
@.str = [8 x i8] c"%li %li\00"
@.str.1 = [5 x i8] c"%li\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64* %6, i64* %7)
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = icmp slt i64 %10, %11
br i1 %12, label %13, label %17
13: ; preds = %2
%14 = load i64, i64* %6
store i64 %14, i64* %8
%15 = load i64, i64* %7
store i64 %15, i64* %6
%16 = load i64, i64* %8
store i64 %16, i64* %7
br label %17
17: ; preds = %13, %2
br label %18
18: ; preds = %29, %17
%19 = load i64, i64* %6
%20 = load i64, i64* %7
%21 = icmp sge i64 %19, %20
br i1 %21, label %22, label %32
22: ; preds = %18
%23 = load i64, i64* %6
%24 = call i64 @primo(i64 %23)
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %22
%27 = load i64, i64* %6
%28 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %27)
br label %29
29: ; preds = %26, %22
%30 = load i64, i64* %6
%31 = add nsw i64 %30, -1
store i64 %31, i64* %6
br label %18
32: ; preds = %18
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%li %li\00"
@.str.1 = [5 x i8] c"%li\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = alloca i64
%5 = bitcast i64* %3 to i8*
%6 = bitcast i64* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64* %3, i64* %4)
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = icmp slt i64 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %2
store i64 %9, i64* %3
store i64 %8, i64* %4
br label %12
12: ; preds = %11, %2
%13 = phi i64 [ %8, %11 ], [ %9, %2 ]
%14 = phi i64 [ %9, %11 ], [ %8, %2 ]
%15 = icmp slt i64 %14, %13
br i1 %15, label %28, label %16
16: ; preds = %12, %23
%17 = phi i64 [ %25, %23 ], [ %14, %12 ]
%18 = call i64 @primo(i64 %17)
%19 = icmp eq i64 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %16
%21 = load i64, i64* %3
%22 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %21)
br label %23
23: ; preds = %20, %16
%24 = load i64, i64* %3
%25 = add nsw i64 %24, -1
store i64 %25, i64* %3
%26 = load i64, i64* %4
%27 = icmp sgt i64 %24, %26
br i1 %27, label %16, label %28
28: ; preds = %23, %12
ret i32 0
}