#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 scanf(char *, int *, int *);
int main(void) {
  int upper, lower, i, row;
  char ch[] = "******************************";
  printf("Enter Lower and Upper limit:\n");
  while (scanf("%d %d", &lower, &upper) == 2) {
    printf("number    square     cube      \n");
    for (row = lower; row < upper; row++)
      for (i = 1; i <= 3, lower <= upper; i++, lower++)
        printf("|%-10d|%-10d|%-10d\n", lower, lower * lower,
               lower * lower * lower);
    printf("%s", ch);
    printf("\nEnter Lower and Upper limit:\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec2(%rip),%eax
mov    %eax,-0x28(%rbp)
mov    0xebc(%rip),%ax
mov    %ax,-0x24(%rbp)
mov    0xeb4(%rip),%al
mov    %al,-0x22(%rbp)
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9d(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    123d <main+0x11d>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1218 <main+0xf8>
movl   $0x1,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1205 <main+0xe5>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
imul   -0xc(%rbp),%edx
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11bf <main+0x9f>
jmp    120a <main+0xea>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11ac <main+0x8c>
lea    -0x40(%rbp),%rsi
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    117b <main+0x5b>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
movups 0xeca(%rip),%xmm0
movups %xmm0,0x1f(%rsp)
movaps 0xeaf(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb6(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1050 <scanf@plt>
cmp    $0x2,%eax
jne    1239 <main+0x109>
lea    0xe9d(%rip),%rbx
lea    0xecd(%rip),%r13
lea    0xe89(%rip),%rbp
lea    0x8(%rsp),%r14
lea    0xc(%rsp),%r15
jmp    11de <main+0xae>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0xe82(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <scanf@plt>
cmp    $0x2,%eax
jne    1239 <main+0x109>
lea    0xe57(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%eax
cmp    %eax,%esi
jge    11b0 <main+0x80>
mov    %esi,%r12d
jmp    1209 <main+0xd9>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12d
cmp    %eax,%r12d
jge    11b0 <main+0x80>
cmp    %eax,%esi
jg     1200 <main+0xd0>
nopl   (%rax)
mov    %esi,%edx
imul   %esi,%edx
mov    %edx,%ecx
imul   %esi,%ecx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%ecx
lea    0x1(%rcx),%esi
mov    %esi,0x8(%rsp)
mov    0xc(%rsp),%eax
cmp    %eax,%ecx
jl     1210 <main+0xe0>
jmp    1200 <main+0xd0>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.ch = [31 x i8] c"******************************\00"
@.str = [30 x i8] c"Enter Lower and Upper limit:\0A\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [33 x i8] c"number square cube \0A\00"
@.str.3 = [20 x i8] c"|%-10d|%-10d|%-10d\0A\00"
@.str.4 = [3 x i8] c"%s\00"
@.str.5 = [31 x i8] c"\0AEnter Lower and Upper limit:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [31 x i8]
store i32 0, i32* %1
%7 = bitcast [31 x i8]* %6 to i8*
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %47, %0
%10 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %2)
%11 = icmp eq i32 %10, 2
br i1 %11, label %12, label %51
12: ; preds = %9
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%14 = load i32, i32* %3
store i32 %14, i32* %5
br label %15
15: ; preds = %44, %12
%16 = load i32, i32* %5
%17 = load i32, i32* %2
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %47
19: ; preds = %15
store i32 1, i32* %4
br label %20
20: ; preds = %38, %19
%21 = load i32, i32* %4
%22 = icmp sle i32 %21, 3
%23 = zext i1 %22 to i32
%24 = load i32, i32* %3
%25 = load i32, i32* %2
%26 = icmp sle i32 %24, %25
br i1 %26, label %27, label %43
27: ; preds = %20
%28 = load i32, i32* %3
%29 = load i32, i32* %3
%30 = load i32, i32* %3
%31 = mul nsw i32 %29, %30
%32 = load i32, i32* %3
%33 = load i32, i32* %3
%34 = mul nsw i32 %32, %33
%35 = load i32, i32* %3
%36 = mul nsw i32 %34, %35
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %28, i32 %31, i32 %36)
br label %38
38: ; preds = %27
%39 = load i32, i32* %4
%40 = add nsw i32 %39, 1
store i32 %40, i32* %4
%41 = load i32, i32* %3
%42 = add nsw i32 %41, 1
store i32 %42, i32* %3
br label %20
43: ; preds = %20
br label %44
44: ; preds = %43
%45 = load i32, i32* %5
%46 = add nsw i32 %45, 1
store i32 %46, i32* %5
br label %15
47: ; preds = %15
%48 = getelementptr inbounds [31 x i8], [31 x i8]* %6, i64 0, i64 0
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %48)
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
br label %9
51: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@__const.main.ch = [31 x i8] c"******************************\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.3 = [20 x i8] c"|%-10d|%-10d|%-10d\0A\00"
@.str.4 = [3 x i8] c"%s\00"
@str = [29 x i8] c"Enter Lower and Upper limit:\00"
@str.6 = [32 x i8] c"number square cube \00"
@str.7 = [30 x i8] c"\0AEnter Lower and Upper limit:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [31 x i8]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = getelementptr inbounds [31 x i8], [31 x i8]* %3, i64 0, i64 0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %1)
%9 = icmp eq i32 %8, 2
br i1 %9, label %10, label %39
10: ; preds = %0, %34
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.6, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = load i32, i32* %1
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %34
15: ; preds = %10, %29
%16 = phi i32 [ %30, %29 ], [ %13, %10 ]
%17 = phi i32 [ %31, %29 ], [ %12, %10 ]
%18 = phi i32 [ %32, %29 ], [ %12, %10 ]
%19 = icmp sgt i32 %17, %16
br i1 %19, label %29, label %20
20: ; preds = %15, %20
%21 = phi i32 [ %26, %20 ], [ %17, %15 ]
%22 = mul nsw i32 %21, %21
%23 = mul nsw i32 %22, %21
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %21, i32 %22, i32 %23)
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
%27 = load i32, i32* %1
%28 = icmp slt i32 %25, %27
br i1 %28, label %20, label %29
29: ; preds = %20, %15
%30 = phi i32 [ %16, %15 ], [ %27, %20 ]
%31 = phi i32 [ %17, %15 ], [ %26, %20 ]
%32 = add nsw i32 %18, 1
%33 = icmp slt i32 %32, %30
br i1 %33, label %15, label %34
34: ; preds = %29, %10
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %6)
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.7, i64 0, i64 0))
%37 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %1)
%38 = icmp eq i32 %37, 2
br i1 %38, label %10, label %39
39: ; preds = %34, %0
ret i32 0
}