#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);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int min, max;
  int multiple;
  scanf("%d %d", &min, &max);
  multiple = min - min % 3;
  if (multiple < min) {
    multiple += 3;
  }
  for (; multiple <= max; multiple += 3) {
    printf("%d\n", multiple);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x14(%rbp),%eax
sub    %edx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1171 <main+0x51>
mov    -0x10(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x10(%rbp)
jmp    1176 <main+0x56>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     119f <main+0x7f>
mov    -0x10(%rbp),%esi
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x10(%rbp)
jmp    1176 <main+0x56>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%edx
sub    %edx,%eax
test   %eax,%eax
lea    0x3(%rcx,%rcx,2),%ebx
cmovle %edx,%ebx
cmp    (%rsp),%ebx
jg     1182 <main+0x62>
lea    0xe9b(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x3,%ebx
cmp    (%rsp),%ebx
jle    1170 <main+0x50>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\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 = load i32, i32* %2
%8 = srem i32 %7, 3
%9 = sub nsw i32 %6, %8
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %16
13: ; preds = %0
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 3
store i32 %15, i32* %4
br label %16
16: ; preds = %13, %0
br label %17
17: ; preds = %24, %16
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %27
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
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 3
store i32 %26, i32* %4
br label %17
27: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = srem i32 %6, 3
%8 = sub nsw i32 %6, %7
%9 = icmp sgt i32 %7, 0
%10 = add nsw i32 %8, 3
%11 = select i1 %9, i32 %10, i32 %8
%12 = load i32, i32* %2
%13 = icmp sgt i32 %11, %12
br i1 %13, label %20, label %14
14: ; preds = %0, %14
%15 = phi i32 [ %17, %14 ], [ %11, %0 ]
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = add nsw i32 %15, 3
%18 = load i32, i32* %2
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %14
20: ; preds = %14, %0
ret i32 0
}