#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 /*<<< orphan*/ assert(int);
int /*<<< orphan*/ clear_bit(int, int *);
int /*<<< orphan*/ printf(char *);
void clear_bit_test() {
  printf("Testing clear_bit_test...");
  int a[3] = {0x1f3, 0xc0000000, 0xf1ff1111};
  clear_bit(1, (int *)&a);
  assert(a[0] == 0x1f1);
  clear_bit(88, (int *)&a);
  assert(a[2] == 0xf0ff1111);
  printf("[OK]\n");
}


x86 assembly (clang, -O0):
<clear_bit_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    0xed5(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xed3(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0xc(%rbp),%rsi
mov    $0x1,%edi
call   1040 <clear_bit@plt>
cmpl   $0x1f1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0xc(%rbp),%rsi
mov    $0x58,%edi
call   1040 <clear_bit@plt>
cmpl   $0xf0ff1111,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_bit_test>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
mov    0xed1(%rip),%eax
mov    %eax,0x8(%rsp)
mov    0xebe(%rip),%rax
mov    %rax,(%rsp)
mov    %rsp,%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
call   1050 <clear_bit@plt>
xor    %edi,%edi
cmpl   $0x1f1,(%rsp)
sete   %dil
call   1060 <assert@plt>
mov    $0x58,%edi
mov    %rbx,%rsi
call   1050 <clear_bit@plt>
xor    %edi,%edi
cmpl   $0xf0ff1111,0x8(%rsp)
f0
sete   %dil
call   1060 <assert@plt>
lea    0xe6b(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Testing clear_bit_test...\00"
@__const.clear_bit_test.a = [3 x i32] [i32 499, i32 -1073741824, i32 -234942191]
@.str.1 = [6 x i8] c"[OK]\0A\00"
define void @clear_bit_test() {
%1 = alloca [3 x i32]
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = bitcast [3 x i32]* %1 to i8*
%4 = bitcast [3 x i32]* %1 to i32*
%5 = call i32 @clear_bit(i32 1, i32* %4)
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 497
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = bitcast [3 x i32]* %1 to i32*
%12 = call i32 @clear_bit(i32 88, i32* %11)
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%14 = load i32, i32* %13
%15 = icmp eq i32 %14, -251719407
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Testing clear_bit_test...\00"
@__const.clear_bit_test.a = [3 x i32] [i32 499, i32 -1073741824, i32 -234942191]
@str = [5 x i8] c"[OK]\00"
define void @clear_bit_test() {
%1 = alloca [3 x i32]
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = bitcast [3 x i32]* %1 to i8*
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%5 = call i32 @clear_bit(i32 1, i32* %4)
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 497
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = call i32 @clear_bit(i32 88, i32* %4)
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, -251719407
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}