#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 main(int argc, char **argv) {
  int i, j, k, n;
  printf("water flower number (100<=n<1000) are :\n");
  for (n = 100; n < 1000; ++n) {
    i = n % 10;
    j = (n / 10) % 10;
    k = ((n / 10) / 10) % 10;
    if ((i * i * i) + (j * j * j) + (k * k * k) == n) {
      printf("%d ", n);
    }
  }
  printf("\n");
  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)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x64,-0x20(%rbp)
cmpl   $0x3e8,-0x20(%rbp)
jge    11dc <main+0xcc>
mov    -0x20(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
mov    -0x20(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x20(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x14(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
imul   -0x18(%rbp),%ecx
imul   -0x18(%rbp),%ecx
add    %ecx,%eax
mov    -0x1c(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
add    %ecx,%eax
cmp    -0x20(%rbp),%eax
jne    11c9 <main+0xb9>
mov    -0x20(%rbp),%esi
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ce <main+0xbe>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    113b <main+0x2b>
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x64,%ebx
mov    $0xcccccccd,%r15d
lea    0xead(%rip),%r14
jmp    116f <main+0x3f>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebx
cmp    $0x3e8,%ebx
je     11ff <main+0xcf>
mov    %ebx,%eax
imul   %r15,%rax
shr    $0x23,%rax
add    %eax,%eax
lea    (%rax,%rax,4),%ecx
mov    %ebx,%eax
sub    %ecx,%eax
movzwl %bx,%ecx
imul   $0xcccd,%ecx,%edx
shr    $0x13,%edx
movzbl %dl,%edx
imul   $0xcd,%edx,%esi
shr    $0xa,%esi
and    $0xfffffffe,%esi
lea    (%rsi,%rsi,4),%esi
sub    %sil,%dl
movzbl %dl,%edx
shr    $0x2,%ecx
imul   $0x147b,%ecx,%ecx
shr    $0x11,%ecx
movzbl %cl,%ecx
imul   $0xcd,%ecx,%esi
shr    $0xa,%esi
and    $0xfffffffe,%esi
lea    (%rsi,%rsi,4),%esi
sub    %sil,%cl
movzbl %cl,%ecx
mov    %eax,%esi
imul   %eax,%esi
imul   %eax,%esi
mov    %edx,%eax
imul   %edx,%eax
imul   %edx,%eax
add    %esi,%eax
mov    %ecx,%edx
imul   %ecx,%edx
imul   %ecx,%edx
add    %eax,%edx
cmp    %edx,%ebx
jne    1160 <main+0x30>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1160 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [41 x i8] c"water flower number (100<=n<1000) are :\0A\00"
@.str.1 = [4 x i8] c"%d \00"
@.str.2 = [2 x i8] c"\0A\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
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
store i32 100, i32* %9
br label %11
11: ; preds = %47, %2
%12 = load i32, i32* %9
%13 = icmp slt i32 %12, 1000
br i1 %13, label %14, label %50
14: ; preds = %11
%15 = load i32, i32* %9
%16 = srem i32 %15, 10
store i32 %16, i32* %6
%17 = load i32, i32* %9
%18 = sdiv i32 %17, 10
%19 = srem i32 %18, 10
store i32 %19, i32* %7
%20 = load i32, i32* %9
%21 = sdiv i32 %20, 10
%22 = sdiv i32 %21, 10
%23 = srem i32 %22, 10
store i32 %23, i32* %8
%24 = load i32, i32* %6
%25 = load i32, i32* %6
%26 = mul nsw i32 %24, %25
%27 = load i32, i32* %6
%28 = mul nsw i32 %26, %27
%29 = load i32, i32* %7
%30 = load i32, i32* %7
%31 = mul nsw i32 %29, %30
%32 = load i32, i32* %7
%33 = mul nsw i32 %31, %32
%34 = add nsw i32 %28, %33
%35 = load i32, i32* %8
%36 = load i32, i32* %8
%37 = mul nsw i32 %35, %36
%38 = load i32, i32* %8
%39 = mul nsw i32 %37, %38
%40 = add nsw i32 %34, %39
%41 = load i32, i32* %9
%42 = icmp eq i32 %40, %41
br i1 %42, label %43, label %46
43: ; preds = %14
%44 = load i32, i32* %9
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %44)
br label %46
46: ; preds = %43, %14
br label %47
47: ; preds = %46
%48 = load i32, i32* %9
%49 = add nsw i32 %48, 1
store i32 %49, i32* %9
br label %11
50: ; preds = %11
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d \00"
@str = [40 x i8] c"water flower number (100<=n<1000) are :\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
br label %4
4: ; preds = %2, %28
%5 = phi i32 [ 100, %2 ], [ %29, %28 ]
%6 = trunc i32 %5 to i16
%7 = urem i16 %6, 10
%8 = zext i16 %7 to i32
%9 = udiv i16 %6, 10
%10 = trunc i16 %9 to i8
%11 = urem i8 %10, 10
%12 = zext i8 %11 to i32
%13 = udiv i16 %6, 100
%14 = trunc i16 %13 to i8
%15 = urem i8 %14, 10
%16 = zext i8 %15 to i32
%17 = mul nuw nsw i32 %8, %8
%18 = mul nuw nsw i32 %17, %8
%19 = mul nuw nsw i32 %12, %12
%20 = mul nuw nsw i32 %19, %12
%21 = add nuw nsw i32 %20, %18
%22 = mul nuw nsw i32 %16, %16
%23 = mul nuw nsw i32 %22, %16
%24 = add nuw nsw i32 %21, %23
%25 = icmp eq i32 %24, %5
br i1 %25, label %26, label %28
26: ; preds = %4
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %28
28: ; preds = %4, %26
%29 = add nuw nsw i32 %5, 1
%30 = icmp eq i32 %29, 1000
br i1 %30, label %31, label %4
31: ; preds = %28
%32 = tail call i32 @putchar(i32 10)
ret i32 0
}