#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 */
long _convertToDecimal(long);
int /*<<< orphan*/ _wait(long);
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ scanf(char *, long *);
long _main() {
  long EV_number;
  long EV_waitTime;
  scanf("%ld", &EV_number);
  EV_number = _convertToDecimal(EV_number);
  EV_waitTime = (EV_number * EV_number);
  while ((EV_waitTime > 0)) {
    _wait(EV_waitTime);
    EV_waitTime = (EV_waitTime - 1);
  }
  printf("%ld\n", (long)EV_number);
  return 0;
}


x86 assembly (clang, -O0):
<_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <_convertToDecimal@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1197 <_main+0x57>
mov    -0x10(%rbp),%rdi
call   1050 <_wait@plt>
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1172 <_main+0x32>
mov    -0x8(%rbp),%rsi
lea    0xe62(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x8(%rsp),%rdi
call   1030 <_convertToDecimal@plt>
mov    %rax,0x8(%rsp)
mov    %rax,%rbx
imul   %rax,%rbx
test   %rbx,%rbx
je     119a <_main+0x5a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1050 <_wait@plt>
lea    -0x1(%rbx),%rax
cmp    $0x1,%rbx
mov    %rax,%rbx
jg     1180 <_main+0x40>
mov    0x8(%rsp),%rax
lea    0xe63(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i64 @_main() {
%1 = alloca i64
%2 = alloca i64
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = call i64 @_convertToDecimal(i64 %4)
store i64 %5, i64* %1
%6 = load i64, i64* %1
%7 = load i64, i64* %1
%8 = mul nsw i64 %6, %7
store i64 %8, i64* %2
br label %9
9: ; preds = %12, %0
%10 = load i64, i64* %2
%11 = icmp sgt i64 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load i64, i64* %2
%14 = call i32 @_wait(i64 %13)
%15 = load i64, i64* %2
%16 = sub nsw i64 %15, 1
store i64 %16, i64* %2
br label %9
17: ; preds = %9
%18 = load i64, i64* %1
%19 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %18)
ret i64 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i64 @_main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = call i64 @_convertToDecimal(i64 %4)
store i64 %5, i64* %1
%6 = mul nsw i64 %5, %5
%7 = icmp eq i64 %6, 0
br i1 %7, label %15, label %8
8: ; preds = %0, %8
%9 = phi i64 [ %11, %8 ], [ %6, %0 ]
%10 = call i32 @_wait(i64 %9)
%11 = add nsw i64 %9, -1
%12 = icmp sgt i64 %9, 1
br i1 %12, label %8, label %13
13: ; preds = %8
%14 = load i64, i64* %1
br label %15
15: ; preds = %13, %0
%16 = phi i64 [ %14, %13 ], [ %5, %0 ]
%17 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %16)
ret i64 0
}