#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 *, ...);
void main() {
  int i = 0, j = 0, k = 0;
  int water_flower = 0;
  for (water_flower = 100; water_flower <= 999; water_flower++) {
    i = water_flower / 100;
    j = water_flower / 10 % 10;
    k = water_flower % 10;
    if (water_flower == i * i * i + j * j * j + k * k * k)
      printf("%-4d", water_flower);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x64,-0x10(%rbp)
cmpl   $0x3e7,-0x10(%rbp)
jg     11ce <main+0xbe>
mov    -0x10(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x4(%rbp),%ecx
imul   -0x4(%rbp),%ecx
imul   -0x4(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x8(%rbp),%edx
imul   -0x8(%rbp),%edx
add    %edx,%ecx
mov    -0xc(%rbp),%edx
imul   -0xc(%rbp),%edx
imul   -0xc(%rbp),%edx
add    %edx,%ecx
cmp    %ecx,%eax
jne    11bb <main+0xab>
mov    -0x10(%rbp),%esi
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c0 <main+0xb0>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113b <main+0x2b>
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x64,%ebx
mov    $0xcccccccd,%r15d
lea    0xec9(%rip),%r14
jmp    114b <main+0x2b>
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x3e8,%ebx
je     11bc <main+0x9c>
mov    %ebx,%eax
imul   %r15,%rax
shr    $0x23,%rax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
movzwl %bx,%ecx
imul   $0xcccd,%ecx,%edx
shr    $0x2,%ecx
imul   $0x147b,%ecx,%ecx
shr    $0x11,%ecx
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
mov    %ebx,%esi
sub    %eax,%esi
mov    %ecx,%eax
imul   %ecx,%eax
imul   %ecx,%eax
mov    %edx,%ecx
imul   %edx,%ecx
imul   %edx,%ecx
mov    %esi,%edx
imul   %esi,%edx
imul   %esi,%edx
add    %eax,%edx
add    %ecx,%edx
cmp    %edx,%ebx
jne    1140 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1140 <main+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

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