#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*/ even_even(unsigned char);
int /*<<< orphan*/ init();
int /*<<< orphan*/ odd(int, int /*<<< orphan*/, int /*<<< orphan*/,
                       unsigned char);
int /*<<< orphan*/ odd_even(unsigned char);
int /*<<< orphan*/ print(unsigned char);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, unsigned char *);
int /*<<< orphan*/ verify(unsigned char);
int main() {
  unsigned char number;
  printf("Please input a number:");
  scanf("%d", &number);
  init();
  if (number & 2)
    odd(1, 0, 0, number);
  else if (number % 4)
    odd_even(number);
  else
    even_even(number);
  print(number);
  verify(number);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
lea    0xe75(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1090 <scanf@plt>
mov    $0x0,%al
call   1070 <init@plt>
movzbl -0x5(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     11d9 <main+0x59>
mov    $0x1,%edi
xor    %edx,%edx
mov    %edx,%esi
movzbl -0x5(%rbp),%ecx
call   1060 <odd@plt>
jmp    120a <main+0x8a>
movzbl -0x5(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11fc <main+0x7c>
movzbl -0x5(%rbp),%edi
call   1080 <odd_even@plt>
jmp    1205 <main+0x85>
movzbl -0x5(%rbp),%edi
call   1040 <even_even@plt>
jmp    120a <main+0x8a>
movzbl -0x5(%rbp),%edi
call   1050 <print@plt>
movzbl -0x5(%rbp),%edi
call   10a0 <verify@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
lea    0xe83(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1090 <scanf@plt>
xor    %eax,%eax
call   1070 <init@plt>
movzbl 0x7(%rsp),%ecx
test   $0x2,%cl
jne    11bd <main+0x3d>
mov    %ecx,%edi
test   $0x3,%cl
je     11cd <main+0x4d>
call   1080 <odd_even@plt>
jmp    11d2 <main+0x52>
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1060 <odd@plt>
jmp    11d2 <main+0x52>
call   1040 <even_even@plt>
movzbl 0x7(%rsp),%edi
call   1050 <print@plt>
movzbl 0x7(%rsp),%edi
call   10a0 <verify@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Please input a number:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (...) @init()
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = and i32 %7, 2
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = load i8, i8* %2
%12 = call i32 @odd(i32 1, i32 0, i32 0, i8 zeroext %11)
br label %25
13: ; preds = %0
%14 = load i8, i8* %2
%15 = zext i8 %14 to i32
%16 = srem i32 %15, 4
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %13
%19 = load i8, i8* %2
%20 = call i32 @odd_even(i8 zeroext %19)
br label %24
21: ; preds = %13
%22 = load i8, i8* %2
%23 = call i32 @even_even(i8 zeroext %22)
br label %24
24: ; preds = %21, %18
br label %25
25: ; preds = %24, %10
%26 = load i8, i8* %2
%27 = call i32 @print(i8 zeroext %26)
%28 = load i8, i8* %2
%29 = call i32 @verify(i8 zeroext %28)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Please input a number:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = call i32 (...) @init()
%5 = load i8, i8* %1
%6 = zext i8 %5 to i32
%7 = and i32 %6, 2
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %0
%10 = call i32 @odd(i32 1, i32 0, i32 0, i8 zeroext %5)
br label %18
11: ; preds = %0
%12 = and i32 %6, 3
%13 = icmp eq i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %11
%15 = call i32 @odd_even(i8 zeroext %5)
br label %18
16: ; preds = %11
%17 = call i32 @even_even(i8 zeroext %5)
br label %18
18: ; preds = %14, %16, %9
%19 = load i8, i8* %1
%20 = call i32 @print(i8 zeroext %19)
%21 = load i8, i8* %1
%22 = call i32 @verify(i8 zeroext %21)
ret i32 0
}