#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 phi(long);
int /*<<< orphan*/ printf(char *, int);
scalar_t__ scanf(char *, long *);
int main() {
  long int n, i, j, count = 0;
  while (scanf("%ld", &n) != EOF) {
    printf("%ld\n", phi(n) / 2);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x28(%rbp)
lea    0xeb2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    0x2e8a(%rip),%rcx
cmp    (%rcx),%rax
je     118b <main+0x5b>
mov    -0x10(%rbp),%rdi
call   1040 <phi@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
jmp    1147 <main+0x17>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec1(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    0x2e9a(%rip),%r12
cmp    (%r12),%rax
je     119b <main+0x6b>
lea    0xea9(%rip),%r14
lea    0xe9e(%rip),%r15
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rsp),%rdi
call   1040 <phi@plt>
mov    %eax,%esi
shr    $0x1f,%esi
add    %eax,%esi
sar    %esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
cmp    (%r12),%rax
jne    1170 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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