#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 */
scalar_t__ EOF;
int /*<<< orphan*/ mppi(int);
int /*<<< orphan*/ mpsqr2(int);
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, int *);
int main(void) {
  int n;
  for (;;) {
    printf("Input n\n");
    if (scanf("%d", &n) == EOF)
      break;
    mpsqr2(n);
    mppi(n);
  }
  printf("Normal completion\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
lea    0xea7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    0x2e76(%rip),%rcx
cmp    (%rcx),%rax
jne    1180 <main+0x40>
jmp    1195 <main+0x55>
mov    -0x8(%rbp),%edi
call   1030 <mpsqr2@plt>
mov    -0x8(%rbp),%edi
call   1050 <mppi@plt>
jmp    114f <main+0xf>
lea    0xe70(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xea5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x2e7c(%rip),%r12
cmp    (%r12),%rax
je     11bb <main+0x7b>
lea    0xe8a(%rip),%r14
lea    0xe80(%rip),%r15
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x4(%rsp),%edi
call   1040 <mpsqr2@plt>
mov    0x4(%rsp),%edi
call   1050 <mppi@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
cmp    (%r12),%rax
jne    1190 <main+0x50>
lea    0xe49(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Input n\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.2 = [19 x i8] c"Normal completion\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %9, %0
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %3
br label %14
9: ; preds = %3
%10 = load i32, i32* %2
%11 = call i32 @mpsqr2(i32 %10)
%12 = load i32, i32* %2
%13 = call i32 @mppi(i32 %12)
br label %3
14: ; preds = %8
%15 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@EOF = global i64 0
@str = [8 x i8] c"Input n\00"
@str.3 = [18 x i8] c"Normal completion\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%4 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i64, i64* @EOF
%6 = icmp eq i64 %4, %5
br i1 %6, label %16, label %7
7: ; preds = %0, %7
%8 = load i32, i32* %1
%9 = call i32 @mpsqr2(i32 %8)
%10 = load i32, i32* %1
%11 = call i32 @mppi(i32 %10)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%13 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%14 = load i64, i64* @EOF
%15 = icmp eq i64 %13, %14
br i1 %15, label %16, label %7
16: ; preds = %7, %0
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}