#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 */
typedef int /*<<< orphan*/ num;

/* Variables and functions */
int EXIT_SUCCESS;
scalar_t__ any_odd_is_one(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int num[] = {0xFF, 0xA, 0x14, 0x0100, 0xABC, 0x6600, 0x0200};
  for (int i = 0; i < (sizeof(num) / sizeof(num[0])); i++) {
    if (any_odd_is_one(num[i]))
      printf("Any odd bit of %#4x is one\n", num[i]);
  }
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec2(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x24(%rbp)
movslq -0x24(%rbp),%rax
cmp    $0x7,%rax
jae    11ac <main+0x8c>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edi
call   1040 <any_odd_is_one@plt>
cmp    $0x0,%rax
je     1199 <main+0x79>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
jmp    119e <main+0x7e>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1160 <main+0x40>
mov    0x2e2d(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xff,%edi
call   1040 <any_odd_is_one@plt>
test   %rax,%rax
je     1141 <main+0x21>
lea    0xec9(%rip),%rdi
mov    $0xff,%esi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <any_odd_is_one@plt>
test   %rax,%rax
je     1161 <main+0x41>
lea    0xea9(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
mov    $0x14,%edi
call   1040 <any_odd_is_one@plt>
test   %rax,%rax
je     1181 <main+0x61>
lea    0xe89(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
mov    $0x100,%edi
call   1040 <any_odd_is_one@plt>
test   %rax,%rax
je     11a1 <main+0x81>
lea    0xe69(%rip),%rdi
mov    $0x100,%esi
call   1030 <printf@plt>
mov    $0xabc,%edi
call   1040 <any_odd_is_one@plt>
test   %rax,%rax
je     11c1 <main+0xa1>
lea    0xe49(%rip),%rdi
mov    $0xabc,%esi
call   1030 <printf@plt>
mov    $0x6600,%edi
call   1040 <any_odd_is_one@plt>
test   %rax,%rax
je     11e1 <main+0xc1>
lea    0xe29(%rip),%rdi
mov    $0x6600,%esi
call   1030 <printf@plt>
mov    $0x200,%edi
call   1040 <any_odd_is_one@plt>
test   %rax,%rax
je     1201 <main+0xe1>
lea    0xe09(%rip),%rdi
mov    $0x200,%esi
call   1030 <printf@plt>
mov    0x2dd8(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.num = [7 x i32] [i32 255, i32 10, i32 20, i32 256, i32 2748, i32 26112, i32 512]
@.str = [28 x i8] c"Any odd bit of %x is one\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [7 x i32]* %2 to i8*
store i32 0, i32* %3
br label %5
5: ; preds = %23, %0
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = icmp ult i64 %7, 7
br i1 %8, label %9, label %26
9: ; preds = %5
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %11
%13 = load i32, i32* %12
%14 = call i64 @any_odd_is_one(i32 %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %22
16: ; preds = %9
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %16, %9
br label %23
23: ; preds = %22
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %5
26: ; preds = %5
%27 = load i32, i32* @EXIT_SUCCESS
ret i32 %27
}

LLVM IR (-O2):
@.str = [28 x i8] c"Any odd bit of %x is one\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 @any_odd_is_one(i32 255)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 255)
br label %5
5: ; preds = %0, %3
%6 = tail call i64 @any_odd_is_one(i32 10)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 10)
br label %10
10: ; preds = %8, %5
%11 = tail call i64 @any_odd_is_one(i32 20)
%12 = icmp eq i64 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 20)
br label %15
15: ; preds = %13, %10
%16 = tail call i64 @any_odd_is_one(i32 256)
%17 = icmp eq i64 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 256)
br label %20
20: ; preds = %18, %15
%21 = tail call i64 @any_odd_is_one(i32 2748)
%22 = icmp eq i64 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 2748)
br label %25
25: ; preds = %23, %20
%26 = tail call i64 @any_odd_is_one(i32 26112)
%27 = icmp eq i64 %26, 0
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 26112)
br label %30
30: ; preds = %28, %25
%31 = tail call i64 @any_odd_is_one(i32 512)
%32 = icmp eq i64 %31, 0
br i1 %32, label %35, label %33
33: ; preds = %30
%34 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 512)
br label %35
35: ; preds = %33, %30
%36 = load i32, i32* @EXIT_SUCCESS
ret i32 %36
}