#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, long long *);
int main() {
  long long int s;
  printf("Enter the starting number: ");
  scanf("%lld", &s);
  long long int f;
  printf("Enter the finishing number: ");
  scanf("%lld", &f);
  long long int a, b;
  for (a = s; a <= f; a++) {
    if (a % 2 != 0)
      continue;
    long long int c = 0;
    for (b = 1; b <= (a / 3); b++) {
      if (a % b == 0)
        c = c + b;
    }
    if (a / 2 == c)
      printf("%lld, ", a);
  }
  getchar();
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaa(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jg     125a <main+0x12a>
mov    -0x20(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
je     11ae <main+0x7e>
jmp    1249 <main+0x119>
movq   $0x0,-0x30(%rbp)
movq   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    $0x3,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x38(%rbp),%rax
cmp    %rcx,%rax
jg     121a <main+0xea>
mov    -0x20(%rbp),%rax
cqto
idivq  -0x28(%rbp)
cmp    $0x0,%rdx
jne    1204 <main+0xd4>
mov    -0x30(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    1209 <main+0xd9>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    11be <main+0x8e>
mov    -0x20(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    -0x30(%rbp),%rax
jne    1244 <main+0x114>
mov    -0x20(%rbp),%rsi
lea    0xe01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1249 <main+0x119>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1183 <main+0x53>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeca(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xebb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x8(%rsp),%r13
mov    (%rsp),%r8
cmp    %r8,%r13
jle    11a4 <main+0x74>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
movabs $0xaaaaaaaaaaaaaaab,%r15
aa aa aa
xor    %r12d,%r12d
lea    0xe86(%rip),%r14
jmp    11cc <main+0x9c>
nopw   0x0(%rax,%rax,1)
lea    0x1(%r13),%rax
cmp    %r8,%r13
mov    %rax,%r13
jge    1186 <main+0x56>
mov    %r13,%rax
mul    %r15
test   $0x1,%r13b
jne    11c0 <main+0x90>
cmp    $0x3,%r13
jge    11f0 <main+0xc0>
xor    %edi,%edi
jmp    12d7 <main+0x1a7>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rdx,%r9
shr    %r9
lea    -0x3(%r13),%rax
cmp    $0x3,%rax
jae    1216 <main+0xe6>
mov    $0x1,%ebx
xor    %edi,%edi
test   $0x1,%r9b
jne    12b0 <main+0x180>
jmp    12d7 <main+0x1a7>
mov    %r9,%r10
and    $0xfffffffffffffffe,%r10
mov    $0x1,%eax
xor    %edi,%edi
jmp    123c <main+0x10c>
cs nopw 0x0(%rax,%rax,1)
add    %rax,%rdi
lea    0x1(%rcx),%rax
cmp    %r10,%rcx
je     12a6 <main+0x176>
mov    %rax,%rbx
mov    %r13,%rax
or     %rbx,%rax
shr    $0x20,%rax
je     1260 <main+0x130>
mov    %r13,%rax
cqto
idiv   %rbx
jmp    1267 <main+0x137>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r13d,%eax
xor    %edx,%edx
div    %ebx
mov    %rbx,%rsi
test   %rdx,%rdx
je     1271 <main+0x141>
xor    %esi,%esi
lea    0x1(%rbx),%rcx
mov    %r13,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     1290 <main+0x160>
mov    %r13,%rax
cqto
idiv   %rcx
jmp    1297 <main+0x167>
nopl   0x0(%rax,%rax,1)
mov    %r13d,%eax
xor    %edx,%edx
div    %ecx
add    %rsi,%rdi
mov    %rcx,%rax
test   %rdx,%rdx
je     1230 <main+0x100>
xor    %eax,%eax
jmp    1230 <main+0x100>
add    $0x2,%rbx
test   $0x1,%r9b
je     12d7 <main+0x1a7>
mov    %r13,%rax
or     %rbx,%rax
shr    $0x20,%rax
je     12c6 <main+0x196>
mov    %r13,%rax
cqto
idiv   %rbx
jmp    12cd <main+0x19d>
mov    %r13d,%eax
xor    %edx,%edx
div    %ebx
test   %rdx,%rdx
cmovne %r12,%rbx
add    %rbx,%rdi
mov    %r13,%rax
shr    $0x3f,%rax
add    %r13,%rax
sar    %rax
cmp    %rdi,%rax
jne    11c0 <main+0x90>
mov    %r14,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rsp),%r8
jmp    11c0 <main+0x90>

LLVM IR (-O0):
@.str = [28 x i8] c"Enter the starting number: \00"
@.str.1 = [5 x i8] c"%lld\00"
@.str.2 = [29 x i8] c"Enter the finishing number: \00"
@.str.3 = [7 x i8] c"%lld, \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64* %2)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64* %3)
%11 = load i64, i64* %2
store i64 %11, i64* %4
br label %12
12: ; preds = %49, %0
%13 = load i64, i64* %4
%14 = load i64, i64* %3
%15 = icmp sle i64 %13, %14
br i1 %15, label %16, label %52
16: ; preds = %12
%17 = load i64, i64* %4
%18 = srem i64 %17, 2
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %16
br label %49
21: ; preds = %16
store i64 0, i64* %6
store i64 1, i64* %5
br label %22
22: ; preds = %37, %21
%23 = load i64, i64* %5
%24 = load i64, i64* %4
%25 = sdiv i64 %24, 3
%26 = icmp sle i64 %23, %25
br i1 %26, label %27, label %40
27: ; preds = %22
%28 = load i64, i64* %4
%29 = load i64, i64* %5
%30 = srem i64 %28, %29
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %36
32: ; preds = %27
%33 = load i64, i64* %6
%34 = load i64, i64* %5
%35 = add nsw i64 %33, %34
store i64 %35, i64* %6
br label %36
36: ; preds = %32, %27
br label %37
37: ; preds = %36
%38 = load i64, i64* %5
%39 = add nsw i64 %38, 1
store i64 %39, i64* %5
br label %22
40: ; preds = %22
%41 = load i64, i64* %4
%42 = sdiv i64 %41, 2
%43 = load i64, i64* %6
%44 = icmp eq i64 %42, %43
br i1 %44, label %45, label %48
45: ; preds = %40
%46 = load i64, i64* %4
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i64 %46)
br label %48
48: ; preds = %45, %40
br label %49
49: ; preds = %48, %20
%50 = load i64, i64* %4
%51 = add nsw i64 %50, 1
store i64 %51, i64* %4
br label %12
52: ; preds = %12
%53 = call i32 (...) @getchar()
%54 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Enter the starting number: \00"
@.str.1 = [5 x i8] c"%lld\00"
@.str.2 = [29 x i8] c"Enter the finishing number: \00"
@.str.3 = [7 x i8] c"%lld, \00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%6 = bitcast i64* %2 to i8*
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64* %2)
%9 = load i64, i64* %1
%10 = load i64, i64* %2
%11 = icmp sgt i64 %9, %10
br i1 %11, label %63, label %12
12: ; preds = %0, %59
%13 = phi i64 [ %60, %59 ], [ %10, %0 ]
%14 = phi i64 [ %61, %59 ], [ %9, %0 ]
%15 = udiv i64 %14, 3
%16 = and i64 %14, 1
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %59
18: ; preds = %12
%19 = icmp slt i64 %14, 3
br i1 %19, label %52, label %20
20: ; preds = %18
%21 = and i64 %15, 1
%22 = add i64 %14, -3
%23 = icmp ult i64 %22, 3
br i1 %23, label %42, label %24
24: ; preds = %20
%25 = and i64 %15, 9223372036854775806
br label %26
26: ; preds = %26, %24
%27 = phi i64 [ 0, %24 ], [ %38, %26 ]
%28 = phi i64 [ 1, %24 ], [ %39, %26 ]
%29 = phi i64 [ 0, %24 ], [ %40, %26 ]
%30 = srem i64 %14, %28
%31 = icmp eq i64 %30, 0
%32 = select i1 %31, i64 %28, i64 0
%33 = add nuw nsw i64 %32, %27
%34 = add nuw nsw i64 %28, 1
%35 = srem i64 %14, %34
%36 = icmp eq i64 %35, 0
%37 = select i1 %36, i64 %34, i64 0
%38 = add nuw nsw i64 %37, %33
%39 = add nuw nsw i64 %28, 2
%40 = add i64 %29, 2
%41 = icmp eq i64 %40, %25
br i1 %41, label %42, label %26
42: ; preds = %26, %20
%43 = phi i64 [ undef, %20 ], [ %38, %26 ]
%44 = phi i64 [ 0, %20 ], [ %38, %26 ]
%45 = phi i64 [ 1, %20 ], [ %39, %26 ]
%46 = icmp eq i64 %21, 0
br i1 %46, label %52, label %47
47: ; preds = %42
%48 = srem i64 %14, %45
%49 = icmp eq i64 %48, 0
%50 = select i1 %49, i64 %45, i64 0
%51 = add nuw nsw i64 %50, %44
br label %52
52: ; preds = %47, %42, %18
%53 = phi i64 [ 0, %18 ], [ %43, %42 ], [ %51, %47 ]
%54 = sdiv i64 %14, 2
%55 = icmp eq i64 %54, %53
br i1 %55, label %56, label %59
56: ; preds = %52
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i64 %14)
%58 = load i64, i64* %2
br label %59
59: ; preds = %52, %56, %12
%60 = phi i64 [ %13, %52 ], [ %58, %56 ], [ %13, %12 ]
%61 = add nsw i64 %14, 1
%62 = icmp slt i64 %14, %60
br i1 %62, label %12, label %63
63: ; preds = %59, %0
%64 = call i32 (...) @getchar()
%65 = call i32 (...) @getchar()
ret i32 0
}