void test_bits() {
  {
    seatest_simple_test_result(((1 << 0) & 0x01), " Expected bit to be set",
                               __FUNCTION__, 24);
  }
  while (0)
    ;
  {
    seatest_simple_test_result(((1 << 2) & 0x04), " Expected bit to be set",
                               __FUNCTION__, 25);
  }
  while (0)
    ;
  {
    seatest_simple_test_result(
        !((1 << 3) & 0x02), " Expected bit not to to be set", __FUNCTION__, 26);
  }
  while (0)
    ;
}


x86 assembly (clang, -O0):
<test_bits>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
lea    0xef1(%rip),%rdx
mov    $0x18,%ecx
mov    $0x0,%al
call   1030 <seatest_simple_test_result@plt>
xor    %eax,%eax
test   $0x1,%al
jne    1142 <test_bits+0x32>
jmp    1147 <test_bits+0x37>
jmp    1133 <test_bits+0x23>
mov    $0x4,%edi
lea    0xead(%rip),%rsi
lea    0xebe(%rip),%rdx
mov    $0x19,%ecx
mov    $0x0,%al
call   1030 <seatest_simple_test_result@plt>
xor    %eax,%eax
test   $0x1,%al
jne    1175 <test_bits+0x65>
jmp    117a <test_bits+0x6a>
jmp    1166 <test_bits+0x56>
mov    $0x1,%edi
lea    0xe9c(%rip),%rsi
lea    0xe8b(%rip),%rdx
mov    $0x1a,%ecx
mov    $0x0,%al
call   1030 <seatest_simple_test_result@plt>
xor    %eax,%eax
test   $0x1,%al
jne    11a8 <test_bits+0x98>
jmp    11ad <test_bits+0x9d>
jmp    1199 <test_bits+0x89>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bits>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%r14
lea    0xef6(%rip),%rbx
mov    $0x1,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    $0x18,%ecx
xor    %eax,%eax
call   1030 <seatest_simple_test_result@plt>
mov    $0x4,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    $0x19,%ecx
xor    %eax,%eax
call   1030 <seatest_simple_test_result@plt>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
mov    $0x1a,%ecx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <seatest_simple_test_result@plt>

LLVM IR (-O0):
@.str = [24 x i8] c" Expected bit to be set\00"
@__FUNCTION__.test_bits = [10 x i8] c"test_bits\00"
@.str.1 = [31 x i8] c" Expected bit not to to be set\00"
define void @test_bits() {
%1 = call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_simple_test_result to i32 (i32, i8*, i8*, i32, ...)*)(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.test_bits, i64 0, i64 0), i32 24)
br label %2
2: ; preds = %3, %0
br i1 false, label %3, label %4
3: ; preds = %2
br label %2
4: ; preds = %2
%5 = call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_simple_test_result to i32 (i32, i8*, i8*, i32, ...)*)(i32 4, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.test_bits, i64 0, i64 0), i32 25)
br label %6
6: ; preds = %7, %4
br i1 false, label %7, label %8
7: ; preds = %6
br label %6
8: ; preds = %6
%9 = call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_simple_test_result to i32 (i32, i8*, i8*, i32, ...)*)(i32 1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.test_bits, i64 0, i64 0), i32 26)
br label %10
10: ; preds = %11, %8
br i1 false, label %11, label %12
11: ; preds = %10
br label %10
12: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c" Expected bit to be set\00"
@__FUNCTION__.test_bits = [10 x i8] c"test_bits\00"
@.str.1 = [31 x i8] c" Expected bit not to to be set\00"
define void @test_bits() {
%1 = tail call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_simple_test_result to i32 (i32, i8*, i8*, i32, ...)*)(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.test_bits, i64 0, i64 0), i32 24)
%2 = tail call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_simple_test_result to i32 (i32, i8*, i8*, i32, ...)*)(i32 4, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.test_bits, i64 0, i64 0), i32 25)
%3 = tail call i32 (i32, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_simple_test_result to i32 (i32, i8*, i8*, i32, ...)*)(i32 1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__FUNCTION__.test_bits, i64 0, i64 0), i32 26)
ret void
}