void test_count_set_bits_with_five(void) {
  unsigned int number = 5;
  unsigned int count = count_set_bits(number);
  ((void)((count == 2)
              ? ((void)0)
              : __test_fail(
                    "count == 2",
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/michaelreneer/"
                    "Algorithms/refs/heads/master/c/test/test_count_set_bits.c",
                    __FUNCTION__, 39)));
}


x86 assembly (clang, -O0):
<test_count_set_bits_with_five>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <count_set_bits@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    114b <test_count_set_bits_with_five+0x2b>
jmp    116c <test_count_set_bits_with_five+0x4c>
lea    0xeae(%rip),%rdi
lea    0xeb2(%rip),%rsi
lea    0xf4d(%rip),%rdx
mov    $0x27,%ecx
mov    $0x0,%al
call   1030 <__test_fail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_count_set_bits_with_five>:
push   %rax
mov    $0x5,%edi
xor    %eax,%eax
call   1040 <count_set_bits@plt>
cmp    $0x2,%eax
jne    1134 <test_count_set_bits_with_five+0x14>
pop    %rax
ret
lea    0xec5(%rip),%rdi
lea    0xec9(%rip),%rsi
lea    0xf64(%rip),%rdx
mov    $0x27,%ecx
xor    %eax,%eax
pop    %r8
jmp    1030 <__test_fail@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"count == 2\00"
@.str.1 = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/michaelreneer/Algorithms/refs/heads/master/c/test/test_count_set_bits.c\00"
@__FUNCTION__.test_count_set_bits_with_five = [30 x i8] c"test_count_set_bits_with_five\00"
define void @test_count_set_bits_with_five() {
%1 = alloca i32
%2 = alloca i32
store i32 5, i32* %1
%3 = load i32, i32* %1
%4 = call i32 (i32, ...) bitcast (i32 (...)* @count_set_bits to i32 (i32, ...)*)(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %8
7: ; preds = %0
br label %10
8: ; preds = %0
%9 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @__test_fail to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @__FUNCTION__.test_count_set_bits_with_five, i64 0, i64 0), i32 39)
br label %10
10: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"count == 2\00"
@.str.1 = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/michaelreneer/Algorithms/refs/heads/master/c/test/test_count_set_bits.c\00"
@__FUNCTION__.test_count_set_bits_with_five = [30 x i8] c"test_count_set_bits_with_five\00"
define void @test_count_set_bits_with_five() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @count_set_bits to i32 (i32, ...)*)(i32 5)
%2 = icmp eq i32 %1, 2
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @__test_fail to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @__FUNCTION__.test_count_set_bits_with_five, i64 0, i64 0), i32 39)
br label %5
5: ; preds = %0, %3
ret void
}