#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 *);
int main() {
  int min, max, divisor;
  scanf("%d %d %d", &min, &max, &divisor);
  if (min < 0) {
    min -= min % divisor;
  } else if (min % divisor != 0) {
    min += divisor - min % divisor;
  }
  for (int i = min; i <= max; i += divisor) {
    printf("%d\n", i);
  }
  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
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jge    1165 <main+0x45>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    %edx,%eax
mov    %eax,-0x8(%rbp)
jmp    1192 <main+0x72>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
je     118d <main+0x6d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    -0x18(%rbp),%eax
sub    %edx,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1192 <main+0x72>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11c1 <main+0xa1>
mov    -0x14(%rbp),%esi
lea    0xe5b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1198 <main+0x78>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xed2(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1040 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    0x10(%rsp),%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
test   %ebx,%ebx
js     1169 <main+0x49>
test   %edx,%edx
je     1161 <main+0x41>
add    %ebx,%ecx
sub    %edx,%ecx
mov    %ecx,0xc(%rsp)
mov    %ecx,%ebx
cmp    0x14(%rsp),%ebx
jle    1175 <main+0x55>
jmp    1194 <main+0x74>
sub    %edx,%ebx
mov    %ebx,0xc(%rsp)
cmp    0x14(%rsp),%ebx
jg     1194 <main+0x74>
lea    0xe8d(%rip),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    0x10(%rsp),%ebx
cmp    0x14(%rsp),%ebx
jle    1180 <main+0x60>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

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

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