#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 NumberOfSetBits(unsigned int);
int bitcount1(unsigned int);
int bitcount2(unsigned int);
int bitcount3(unsigned int);
int bitcount4(unsigned int);
int bitcount5(unsigned int);
int bitcount6(unsigned int);
int /*<<< orphan*/ initialize_count_bits();
int pop(unsigned int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  unsigned val = 0xDEADBEEF;
  printf("%d\n", NumberOfSetBits(val));
  printf("%d\n", pop(val));
  printf("%d\n", bitcount1(val));
  printf("%d\n", bitcount2(val));
  initialize_count_bits();
  printf("%d\n", bitcount3(val));
  printf("%d\n", bitcount4(val));
  printf("%d\n", bitcount5(val));
  printf("%d\n", bitcount6(val));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xdeadbeef,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1090 <NumberOfSetBits@plt>
mov    %eax,%esi
lea    0xe39(%rip),%rdi
call   1070 <printf@plt>
mov    -0x8(%rbp),%edi
call   1080 <pop@plt>
mov    %eax,%esi
lea    0xe23(%rip),%rdi
call   1070 <printf@plt>
mov    -0x8(%rbp),%edi
call   1030 <bitcount1@plt>
mov    %eax,%esi
lea    0xe0d(%rip),%rdi
call   1070 <printf@plt>
mov    -0x8(%rbp),%edi
call   10a0 <bitcount2@plt>
mov    %eax,%esi
lea    0xdf7(%rip),%rdi
call   1070 <printf@plt>
mov    $0x0,%al
call   1060 <initialize_count_bits@plt>
mov    -0x8(%rbp),%edi
call   1050 <bitcount3@plt>
mov    %eax,%esi
lea    0xdda(%rip),%rdi
call   1070 <printf@plt>
mov    -0x8(%rbp),%edi
call   10b0 <bitcount4@plt>
mov    %eax,%esi
lea    0xdc4(%rip),%rdi
call   1070 <printf@plt>
mov    -0x8(%rbp),%edi
call   1040 <bitcount5@plt>
mov    %eax,%esi
lea    0xdae(%rip),%rdi
call   1070 <printf@plt>
mov    -0x8(%rbp),%edi
call   10c0 <bitcount6@plt>
mov    %eax,%esi
lea    0xd98(%rip),%rdi
call   1070 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xdeadbeef,%edi
call   1090 <NumberOfSetBits@plt>
lea    0xe4e(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1070 <printf@plt>
mov    $0xdeadbeef,%edi
call   1080 <pop@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1070 <printf@plt>
mov    $0xdeadbeef,%edi
call   1030 <bitcount1@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1070 <printf@plt>
mov    $0xdeadbeef,%edi
call   10a0 <bitcount2@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1070 <printf@plt>
xor    %eax,%eax
call   1060 <initialize_count_bits@plt>
mov    $0xdeadbeef,%edi
call   1050 <bitcount3@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1070 <printf@plt>
mov    $0xdeadbeef,%edi
call   10b0 <bitcount4@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1070 <printf@plt>
mov    $0xdeadbeef,%edi
call   1040 <bitcount5@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1070 <printf@plt>
mov    $0xdeadbeef,%edi
call   10c0 <bitcount6@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1070 <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
%2 = alloca i32
store i32 0, i32* %1
store i32 -559038737, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @NumberOfSetBits(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @pop(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @bitcount1(i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %2
%13 = call i32 @bitcount2(i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = call i32 (...) @initialize_count_bits()
%16 = load i32, i32* %2
%17 = call i32 @bitcount3(i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %2
%20 = call i32 @bitcount4(i32 %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %2
%23 = call i32 @bitcount5(i32 %22)
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %2
%26 = call i32 @bitcount6(i32 %25)
%27 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %26)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @NumberOfSetBits(i32 -559038737)
%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 @pop(i32 -559038737)
%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 @bitcount1(i32 -559038737)
%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 @bitcount2(i32 -559038737)
%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 (...) @initialize_count_bits()
%10 = tail call i32 @bitcount3(i32 -559038737)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = tail call i32 @bitcount4(i32 -559038737)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = tail call i32 @bitcount5(i32 -559038737)
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = tail call i32 @bitcount6(i32 -559038737)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
ret i32 0
}