#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 *);
main() {
  int n1, n2, temp, num, i, rem = 0;
  printf("Enter two intervals:");
  scanf("%d%d", &n1, &n2);
  for (i = n1 + 1; i < n2; i++) {
    temp = i;
    num = 0;
    while (temp != 0) {
      rem = temp % 10;
      num = num + (rem * rem * rem);
      temp = temp / 10;
    }
    if (i == num) {
      printf("%d", i);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11e8 <main+0xc8>
mov    -0x18(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     11b8 <main+0x98>
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x1c(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
jmp    117a <main+0x5a>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    11d5 <main+0xb5>
mov    -0x18(%rbp),%esi
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11da <main+0xba>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1161 <main+0x41>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebx
add    $0x1,%ebx
mov    (%rsp),%r8d
cmp    %r8d,%ebx
jge    11c9 <main+0xa9>
lea    0xeba(%rip),%r14
jmp    1168 <main+0x48>
nop
add    $0x1,%ebx
cmp    %r8d,%ebx
jge    11c9 <main+0xa9>
mov    $0x0,%ecx
test   %ebx,%ebx
je     11b3 <main+0x93>
xor    %ecx,%ecx
mov    %ebx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movslq %edx,%rsi
imul   $0x66666667,%rsi,%rdx
mov    %rdx,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rdx
add    %edi,%edx
lea    (%rdx,%rdx,1),%edi
lea    (%rdi,%rdi,4),%edi
mov    %esi,%eax
sub    %edi,%eax
mov    %eax,%edi
imul   %eax,%edi
imul   %eax,%edi
add    %edi,%ecx
add    $0x9,%esi
cmp    $0x12,%esi
ja     1180 <main+0x60>
cmp    %ecx,%ebx
jne    1160 <main+0x40>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rsp),%r8d
jmp    1160 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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