#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*/ printf(char *, ...);
scalar_t__ scanf(char *, int *);
int main(int argc, char *argv[]) {
  int n;
  while (scanf("%d", &n) != EOF) {
    printf("%6d", n);
    if (argc > 1 && argv[1][0] == '-' && argv[1][1] == 'l')
      printf((n % 2) ? " es impar" : " es par");
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2e9b(%rip),%rcx
cmp    (%rcx),%rax
je     11d4 <main+0xb4>
mov    -0x14(%rbp),%esi
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
jle    11c1 <main+0xa1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    11c1 <main+0xa1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x6c,%eax
jne    11c1 <main+0xa1>
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
lea    0xe65(%rip),%rdi
lea    0xe54(%rip),%rax
cmp    $0x0,%edx
cmovne %rax,%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebp
lea    0xeb9(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x2e90(%rip),%r13
cmp    0x0(%r13),%rax
jne    116f <main+0x3f>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe8d(%rip),%r15
lea    0xe83(%rip),%r12
lea    0x4(%rsp),%rbx
jmp    11ab <main+0x7b>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
cmp    0x0(%r13),%rax
je     115e <main+0x2e>
mov    0x4(%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x2,%ebp
jl     1190 <main+0x60>
mov    0x8(%r14),%rax
cmpb   $0x2d,(%rax)
jne    1190 <main+0x60>
cmpb   $0x6c,0x1(%rax)
jne    1190 <main+0x60>
testb  $0x1,0x4(%rsp)
lea    0xe2e(%rip),%rdi
lea    0xe31(%rip),%rax
cmove  %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1190 <main+0x60>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.1 = [4 x i8] c"%6d\00"
@.str.2 = [10 x i8] c" es impar\00"
@.str.3 = [8 x i8] c" es par\00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %39, %2
%8 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%9 = load i64, i64* @EOF
%10 = icmp ne i64 %8, %9
br i1 %10, label %11, label %41
11: ; preds = %7
%12 = load i32, i32* %6
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 1
br i1 %15, label %16, label %39
16: ; preds = %11
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i64 0
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 45
br i1 %23, label %24, label %39
24: ; preds = %16
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = getelementptr inbounds i8, i8* %27, i64 1
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 108
br i1 %31, label %32, label %39
32: ; preds = %24
%33 = load i32, i32* %6
%34 = srem i32 %33, 2
%35 = icmp ne i32 %34, 0
%36 = zext i1 %35 to i64
%37 = select i1 %35, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0)
%38 = call i32 (i8*, ...) @printf(i8* %37)
br label %39
39: ; preds = %32, %24, %16, %11
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %7
41: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.1 = [4 x i8] c"%6d\00"
@.str.2 = [10 x i8] c" es impar\00"
@.str.3 = [8 x i8] c" es par\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %33, label %8
8: ; preds = %2
%9 = icmp sgt i32 %0, 1
%10 = getelementptr inbounds i8*, i8** %1, i64 1
br label %11
11: ; preds = %8, %28
%12 = load i32, i32* %3
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br i1 %9, label %14, label %28
14: ; preds = %11
%15 = load i8*, i8** %10
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 45
br i1 %17, label %18, label %28
18: ; preds = %14
%19 = getelementptr inbounds i8, i8* %15, i64 1
%20 = load i8, i8* %19
%21 = icmp eq i8 %20, 108
br i1 %21, label %22, label %28
22: ; preds = %18
%23 = load i32, i32* %3
%24 = and i32 %23, 1
%25 = icmp eq i32 %24, 0
%26 = select i1 %25, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %26)
br label %28
28: ; preds = %22, %18, %14, %11
%29 = call i32 @putchar(i32 10)
%30 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%31 = load i64, i64* @EOF
%32 = icmp eq i64 %30, %31
br i1 %32, label %33, label %11
33: ; preds = %28, %2
ret i32 0
}