#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 main() {
  int var1, var2;
  printf("Type the first number: ");
  scanf("%d", &var1);
  printf("Type the second  number: ");
  scanf("%d", &var2);
  if (var1 % 2 == 0)
    printf("The number %d is even.\n", var1);
  else
    printf("The number %d is odd.\n", var1);
  if (var2 % 2 == 0)
    printf("The number %d is even.\n", var2);
  else
    printf("The number %d is odd.\n", var2);
  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    0xed4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb6(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1195 <main+0x75>
mov    -0x8(%rbp),%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a6 <main+0x86>
mov    -0x8(%rbp),%esi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11d0 <main+0xb0>
mov    -0xc(%rbp),%esi
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e1 <main+0xc1>
mov    -0xc(%rbp),%esi
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedf(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xece(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
test   $0x1,%sil
lea    0xec7(%rip),%r14
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
cmove  %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rsp),%esi
test   $0x1,%sil
cmove  %r14,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Type the first number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"Type the second number: \00"
@.str.3 = [24 x i8] c"The number %d is even.\0A\00"
@.str.4 = [23 x i8] c"The number %d is odd.\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 ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%8 = load i32, i32* %2
%9 = srem i32 %8, 2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %0
%12 = load i32, i32* %2
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %12)
br label %17
14: ; preds = %0
%15 = load i32, i32* %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %14, %11
%18 = load i32, i32* %3
%19 = srem i32 %18, 2
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = load i32, i32* %3
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %22)
br label %27
24: ; preds = %17
%25 = load i32, i32* %3
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %24, %21
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Type the first number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"Type the second number: \00"
@.str.3 = [24 x i8] c"The number %d is even.\0A\00"
@.str.4 = [23 x i8] c"The number %d is odd.\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 ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %1
%10 = and i32 %9, 1
%11 = icmp eq i32 %10, 0
%12 = select i1 %11, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %12, i32 %9)
%14 = load i32, i32* %2
%15 = and i32 %14, 1
%16 = icmp eq i32 %15, 0
%17 = select i1 %16, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %17, i32 %14)
ret i32 0
}