#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 is_any_bit_equals_0(int);
int is_any_bit_equals_1(int);
int is_any_bit_of_first_byte_equals_0(int);
int is_any_bit_of_last_byte_equals_1(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d\n", is_any_bit_equals_1(1));
  printf("%d\n", is_any_bit_equals_1(15));
  printf("%d\n", is_any_bit_equals_1(0));
  printf("%d\n", is_any_bit_equals_0(15));
  printf("%d\n", is_any_bit_equals_0(0));
  printf("%d\n", is_any_bit_equals_0(-1));
  printf("%d\n", is_any_bit_of_last_byte_equals_1(2));
  printf("%d\n", is_any_bit_of_last_byte_equals_1(256));
  printf("%d\n", is_any_bit_of_first_byte_equals_0(3));
  printf("%d\n", is_any_bit_of_first_byte_equals_0(-1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1070 <is_any_bit_equals_1@plt>
mov    %eax,%esi
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
mov    $0xf,%edi
call   1070 <is_any_bit_equals_1@plt>
mov    %eax,%esi
lea    0xe76(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1070 <is_any_bit_equals_1@plt>
mov    %eax,%esi
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
mov    $0xf,%edi
call   1050 <is_any_bit_equals_0@plt>
mov    %eax,%esi
lea    0xe49(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <is_any_bit_equals_0@plt>
mov    %eax,%esi
lea    0xe34(%rip),%rdi
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <is_any_bit_equals_0@plt>
mov    %eax,%esi
lea    0xe1c(%rip),%rdi
call   1040 <printf@plt>
mov    $0x2,%edi
call   1060 <is_any_bit_of_last_byte_equals_1@plt>
mov    %eax,%esi
lea    0xe04(%rip),%rdi
call   1040 <printf@plt>
mov    $0x100,%edi
call   1060 <is_any_bit_of_last_byte_equals_1@plt>
mov    %eax,%esi
lea    0xdec(%rip),%rdi
call   1040 <printf@plt>
mov    $0x3,%edi
call   1030 <is_any_bit_of_first_byte_equals_0@plt>
mov    %eax,%esi
lea    0xdd4(%rip),%rdi
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1030 <is_any_bit_of_first_byte_equals_0@plt>
mov    %eax,%esi
lea    0xdbc(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1070 <is_any_bit_equals_1@plt>
lea    0xe9e(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xf,%edi
call   1070 <is_any_bit_equals_1@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %edi,%edi
call   1070 <is_any_bit_equals_1@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xf,%edi
call   1050 <is_any_bit_equals_0@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <is_any_bit_equals_0@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <is_any_bit_equals_0@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x2,%edi
call   1060 <is_any_bit_of_last_byte_equals_1@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x100,%edi
call   1060 <is_any_bit_of_last_byte_equals_1@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x3,%edi
call   1030 <is_any_bit_of_first_byte_equals_0@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1030 <is_any_bit_of_first_byte_equals_0@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @is_any_bit_equals_1(i32 1)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @is_any_bit_equals_1(i32 15)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @is_any_bit_equals_1(i32 0)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @is_any_bit_equals_0(i32 15)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32 @is_any_bit_equals_0(i32 0)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 @is_any_bit_equals_0(i32 -1)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = call i32 @is_any_bit_of_last_byte_equals_1(i32 2)
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = call i32 @is_any_bit_of_last_byte_equals_1(i32 256)
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = call i32 @is_any_bit_of_first_byte_equals_0(i32 3)
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = call i32 @is_any_bit_of_first_byte_equals_0(i32 -1)
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @is_any_bit_equals_1(i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @is_any_bit_equals_1(i32 15)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @is_any_bit_equals_1(i32 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @is_any_bit_equals_0(i32 15)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 @is_any_bit_equals_0(i32 0)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = tail call i32 @is_any_bit_equals_0(i32 -1)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = tail call i32 @is_any_bit_of_last_byte_equals_1(i32 2)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = tail call i32 @is_any_bit_of_last_byte_equals_1(i32 256)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = tail call i32 @is_any_bit_of_first_byte_equals_0(i32 3)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = tail call i32 @is_any_bit_of_first_byte_equals_0(i32 -1)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %19)
ret i32 0
}