#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 */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdin;
void ParOuImpar() {
  int parImpar;
  printf("Entre com um valor para verificar se ele é par ou impar: \n");
  fflush(stdin);
  scanf("%d", &parImpar);
  parImpar % 2 == 0 ? printf("%d é par\n", parImpar)
                    : printf("%d é impar\n", parImpar);
}


x86 assembly (clang, -O0):
<ParOuImpar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    0xee1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    118e <ParOuImpar+0x5e>
mov    -0x4(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119f <ParOuImpar+0x6f>
mov    -0x4(%rbp),%esi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ParOuImpar>:
push   %rax
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
lea    0xe9e(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%esi
test   $0x1,%sil
lea    0xe88(%rip),%rax
lea    0xe8c(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [60 x i8] c"Entre com um valor para verificar se ele \C3\A9 par ou impar: \0A\00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [11 x i8] c"%d \C3\A9 par\0A\00"
@.str.3 = [13 x i8] c"%d \C3\A9 impar\0A\00"
define void @ParOuImpar() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdin
%4 = call i32 @fflush(i32 %3)
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = srem i32 %6, 2
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32, i32* %1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %10)
br label %15
12: ; preds = %0
%13 = load i32, i32* %1
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %12, %9
%16 = phi i32 [ %11, %9 ], [ %14, %12 ]
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [11 x i8] c"%d \C3\A9 par\0A\00"
@.str.3 = [13 x i8] c"%d \C3\A9 impar\0A\00"
@str = [59 x i8] c"Entre com um valor para verificar se ele \C3\A9 par ou impar: \00"
define void @ParOuImpar() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = tail call i32 @fflush(i32 %4)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = and i32 %7, 1
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %10, i32 %7)
ret void
}