#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 */
char getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int n, i;
  char ch;
  printf("enter the number: ");
  scanf("%d", &n);
  ch = getchar();
  for (i = 1; i <= n; i++) {
    printf("%10d%20d\n", i, i * i);
    if ((i % 24) == 0) {
      printf("press enter to continue...");
      ch = getchar();
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0xd(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11d1 <main+0xa1>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
imul   -0xc(%rbp),%edx
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    $0x18,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11be <main+0x8e>
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0xd(%rbp)
jmp    11c3 <main+0x93>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116e <main+0x3e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmpl   $0x0,0x4(%rsp)
jle    11d2 <main+0xa2>
mov    $0x1,%ebx
mov    $0xaaaaaaab,%r12d
lea    0xe9c(%rip),%r15
xor    %ebp,%ebp
jmp    1189 <main+0x59>
xchg   %ax,%ax
add    $0x1,%ebx
cmp    0x4(%rsp),%ebp
jge    11d2 <main+0xa2>
mov    %ebp,%r13d
lea    0x1(%r13),%ebp
mov    %ebx,%eax
imul   %r12,%rax
shr    $0x24,%rax
lea    (%rax,%rax,2),%eax
lea    -0x1(,%rax,8),%r14d
ff
mov    %ebp,%edx
imul   %ebp,%edx
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    %r13d,%r14d
jne    1180 <main+0x50>
lea    0xe5e(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
jmp    1180 <main+0x50>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"enter the number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [10 x i8] c"%10d%20d\0A\00"
@.str.3 = [27 x i8] c"press enter to continue...\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = call signext i8 (...) @getchar()
store i8 %7, i8* %4
store i32 1, i32* %3
br label %8
8: ; preds = %25, %0
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %28
12: ; preds = %8
%13 = load i32, i32* %3
%14 = load i32, i32* %3
%15 = load i32, i32* %3
%16 = mul nsw i32 %14, %15
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %13, i32 %16)
%18 = load i32, i32* %3
%19 = srem i32 %18, 24
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %12
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%23 = call signext i8 (...) @getchar()
store i8 %23, i8* %4
br label %24
24: ; preds = %21, %12
br label %25
25: ; preds = %24
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %8
28: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"enter the number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [10 x i8] c"%10d%20d\0A\00"
@.str.3 = [27 x i8] c"press enter to continue...\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call signext i8 (...) @getchar()
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 1
br i1 %7, label %21, label %8
8: ; preds = %0, %17
%9 = phi i32 [ %18, %17 ], [ 1, %0 ]
%10 = mul nsw i32 %9, %9
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %10)
%12 = urem i32 %9, 24
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %8
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%16 = call signext i8 (...) @getchar()
br label %17
17: ; preds = %8, %14
%18 = add nuw nsw i32 %9, 1
%19 = load i32, i32* %1
%20 = icmp slt i32 %9, %19
br i1 %20, label %8, label %21
21: ; preds = %17, %0
ret i32 0
}