#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("Enter two integers: ");
  scanf("%d %d", &a, &b);
  if (a > b) {
    printf("%d is greater than %d\n", a, b);
  } else if (b > a) {
    printf("%d is smaller than %d\n", a, b);
  } else {
    printf("%d is equal to %d\n", a, b);
  }
  if (a % 2 == 0) {
    printf("%d is an even number.\n", a);
  } else {
    printf("%d is an odd number.\n", b);
  }
  if (b % 2 == 0) {
    printf("%d is an even number.\n", a);
  } else {
    printf("%d is an odd number.\n", 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    0xed1(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1176 <main+0x56>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b4 <main+0x94>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    119b <main+0x7b>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11af <main+0x8f>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b4 <main+0x94>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11de <main+0xbe>
mov    -0x8(%rbp),%esi
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ef <main+0xcf>
mov    -0xc(%rbp),%esi
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1219 <main+0xf9>
mov    -0x8(%rbp),%esi
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    122a <main+0x10a>
mov    -0xc(%rbp),%esi
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
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    0xedf(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
cmp    %esi,%edx
lea    0xedf(%rip),%rax
lea    0xeef(%rip),%rcx
cmovg  %rax,%rcx
lea    0xeb6(%rip),%rdi
cmovge %rcx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
test   $0x1,%sil
jne    1183 <main+0x63>
lea    0xedb(%rip),%rdi
jmp    118d <main+0x6d>
mov    (%rsp),%esi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rsp),%esi
test   $0x1,%sil
jne    11aa <main+0x8a>
mov    0x4(%rsp),%esi
lea    0xeb4(%rip),%rdi
jmp    11b1 <main+0x91>
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Enter two integers: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [23 x i8] c"%d is greater than %d\0A\00"
@.str.3 = [23 x i8] c"%d is smaller than %d\0A\00"
@.str.4 = [19 x i8] c"%d is equal to %d\0A\00"
@.str.5 = [23 x i8] c"%d is an even number.\0A\00"
@.str.6 = [22 x i8] c"%d is an odd number.\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 ([21 x i8], [21 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 = load i32, i32* %3
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %0
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %11)
br label %26
13: ; preds = %0
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %13
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %18, i32 %19)
br label %25
21: ; preds = %13
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i32 %22, i32 %23)
br label %25
25: ; preds = %21, %17
br label %26
26: ; preds = %25, %9
%27 = load i32, i32* %2
%28 = srem i32 %27, 2
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %33
30: ; preds = %26
%31 = load i32, i32* %2
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %31)
br label %36
33: ; preds = %26
%34 = load i32, i32* %3
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %34)
br label %36
36: ; preds = %33, %30
%37 = load i32, i32* %3
%38 = srem i32 %37, 2
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %43
40: ; preds = %36
%41 = load i32, i32* %2
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %41)
br label %46
43: ; preds = %36
%44 = load i32, i32* %3
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %44)
br label %46
46: ; preds = %43, %40
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Enter two integers: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [23 x i8] c"%d is greater than %d\0A\00"
@.str.3 = [23 x i8] c"%d is smaller than %d\0A\00"
@.str.4 = [19 x i8] c"%d is equal to %d\0A\00"
@.str.5 = [23 x i8] c"%d is an even number.\0A\00"
@.str.6 = [22 x i8] c"%d is an odd number.\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 ([21 x i8], [21 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 = load i32, i32* %2
%9 = icmp sgt i32 %7, %8
%10 = icmp sgt i32 %8, %7
%11 = select i1 %10, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0)
%12 = select i1 %9, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %11
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %12, i32 %7, i32 %8)
%14 = load i32, i32* %1
%15 = and i32 %14, 1
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %0
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %14)
br label %22
19: ; preds = %0
%20 = load i32, i32* %2
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %19, %17
%23 = load i32, i32* %2
%24 = and i32 %23, 1
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %22
%27 = load i32, i32* %1
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %27)
br label %31
29: ; preds = %22
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %23)
br label %31
31: ; preds = %29, %26
ret i32 0
}