#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 /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(int argc, char const *argv[]) {
  int a, b, c = 0;
  scanf("%d %d", &a, &b);
  while (a <= b) {
    if (((a % 4) == 0) && (((a % 100) != 0) || ((a % 400) == 0))) {
      printf("%d\n", a);
      c++;
    }
    a++;
  }
  if (c == 0) {
    printf("-1");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     11c1 <main+0xa1>
mov    -0x14(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b3 <main+0x93>
mov    -0x14(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1199 <main+0x79>
mov    -0x14(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b3 <main+0x93>
mov    -0x14(%rbp),%esi
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1151 <main+0x31>
cmpl   $0x0,-0x1c(%rbp)
jne    11d9 <main+0xb9>
lea    0xe38(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xed6(%rip),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
mov    0x4(%rsp),%eax
cmp    %eax,%esi
jg     11c2 <main+0xa2>
lea    0xeb9(%rip),%rbx
xor    %ebp,%ebp
jmp    117c <main+0x5c>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebp
mov    (%rsp),%esi
mov    0x4(%rsp),%eax
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x1(%rsi),%ecx
mov    %ecx,(%rsp)
cmp    %eax,%esi
mov    %ecx,%esi
jge    11be <main+0x9e>
test   $0x3,%sil
jne    1170 <main+0x50>
imul   $0xc28f5c29,%esi,%ecx
add    $0x51eb850,%ecx
ror    $0x2,%ecx
cmp    $0x28f5c28,%ecx
ja     1151 <main+0x31>
movslq %esi,%rcx
imul   $0x51eb851f,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x27,%rcx
add    %edx,%ecx
imul   $0x190,%ecx,%ecx
mov    %esi,%edx
sub    %ecx,%edx
jne    1170 <main+0x50>
jmp    1151 <main+0x31>
test   %ebp,%ebp
jne    11d0 <main+0xb0>
lea    0xe41(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

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