#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  printf("Introduzca dos numeros separados por un espacio:");
  scanf("%i %i", &a, &b);
  if (a % 2 == 0 && b % 2 == 0) {
    printf("%i y %i son pares\n", a, b);
  } else if (a % 2 != 0 && b % 2 != 0) {
    printf("%i y %i son impares\n", a, b);
  } else if (a % 2 == 0 || b % 2 != 0) {
    printf("%i es par y %i es impar\n", a, b);
  } else if (a % 2 != 0 || b % 2 == 0) {
    printf("%i es impar y %i es par\n", a, b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1192 <main+0x72>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1192 <main+0x72>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125f <main+0x13f>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11d3 <main+0xb3>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11d3 <main+0xb3>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125a <main+0x13a>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11fb <main+0xdb>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1214 <main+0xf4>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1255 <main+0x135>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    123c <main+0x11c>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1250 <main+0x130>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1255 <main+0x135>
jmp    125a <main+0x13a>
jmp    125f <main+0x13f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%edx
test   $0x1,%dl
lea    0xee7(%rip),%rax
lea    0xf08(%rip),%rcx
cmove  %rax,%rcx
lea    0xf16(%rip),%rax
lea    0xee1(%rip),%rdi
cmove  %rax,%rdi
mov    0x4(%rsp),%esi
test   $0x1,%sil
cmove  %rcx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"Introduzca dos numeros separados por un espacio:\00"
@.str.1 = [6 x i8] c"%i %i\00"
@.str.2 = [19 x i8] c"%i y %i son pares\0A\00"
@.str.3 = [21 x i8] c"%i y %i son impares\0A\00"
@.str.4 = [25 x i8] c"%i es par y %i es impar\0A\00"
@.str.5 = [25 x i8] c"%i es impar y %i es par\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = srem i32 %6, 2
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %0
%10 = load i32, i32* %3
%11 = srem i32 %10, 2
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %14, i32 %15)
br label %56
17: ; preds = %9, %0
%18 = load i32, i32* %2
%19 = srem i32 %18, 2
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %29
21: ; preds = %17
%22 = load i32, i32* %3
%23 = srem i32 %22, 2
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = load i32, i32* %2
%27 = load i32, i32* %3
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %26, i32 %27)
br label %55
29: ; preds = %21, %17
%30 = load i32, i32* %2
%31 = srem i32 %30, 2
%32 = icmp eq i32 %31, 0
br i1 %32, label %37, label %33
33: ; preds = %29
%34 = load i32, i32* %3
%35 = srem i32 %34, 2
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %41
37: ; preds = %33, %29
%38 = load i32, i32* %2
%39 = load i32, i32* %3
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %38, i32 %39)
br label %54
41: ; preds = %33
%42 = load i32, i32* %2
%43 = srem i32 %42, 2
%44 = icmp ne i32 %43, 0
br i1 %44, label %49, label %45
45: ; preds = %41
%46 = load i32, i32* %3
%47 = srem i32 %46, 2
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %53
49: ; preds = %45, %41
%50 = load i32, i32* %2
%51 = load i32, i32* %3
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %50, i32 %51)
br label %53
53: ; preds = %49, %45
br label %54
54: ; preds = %53, %37
br label %55
55: ; preds = %54, %25
br label %56
56: ; preds = %55, %13
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"Introduzca dos numeros separados por un espacio:\00"
@.str.1 = [6 x i8] c"%i %i\00"
@.str.2 = [19 x i8] c"%i y %i son pares\0A\00"
@.str.3 = [21 x i8] c"%i y %i son impares\0A\00"
@.str.4 = [25 x i8] c"%i es par y %i es impar\0A\00"
@.str.5 = [25 x i8] c"%i es impar y %i es par\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = and i32 %7, 1
%9 = icmp eq i32 %8, 0
%10 = load i32, i32* %2
%11 = and i32 %10, 1
%12 = icmp eq i32 %11, 0
%13 = select i1 %12, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0)
%14 = select i1 %12, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0)
%15 = select i1 %9, i8* %13, i8* %14
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %15, i32 %7, i32 %10)
ret i32 0
}