#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*/ bitmap_clear();
int /*<<< orphan*/ bitmap_initialize_stat(int /*<<< orphan*/);
int /*<<< orphan*/ bmp_iter_next(int *, int *);
scalar_t__ bmp_iter_set(int *, int *);
void df_md_alloc(int bi, int bb_index, void *bb_info) {
  for (; bmp_iter_set(&bi, &bb_index); bmp_iter_next(&bi, &bb_index))
    if (bb_info)
      bitmap_clear();
    else
      bitmap_initialize_stat(0);
}


x86 assembly (clang, -O0):
<df_md_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <bmp_iter_set@plt>
cmp    $0x0,%rax
je     119e <df_md_alloc+0x5e>
cmpq   $0x0,-0x10(%rbp)
je     1180 <df_md_alloc+0x40>
mov    $0x0,%al
call   1030 <bitmap_clear@plt>
jmp    1187 <df_md_alloc+0x47>
xor    %edi,%edi
call   1050 <bitmap_initialize_stat@plt>
jmp    118c <df_md_alloc+0x4c>
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <bmp_iter_next@plt>
jmp    1152 <df_md_alloc+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<df_md_alloc>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %edi,0xc(%rsp)
mov    %esi,0x8(%rsp)
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <bmp_iter_set@plt>
test   %rax,%rax
je     11b0 <df_md_alloc+0x70>
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%rbx
jmp    11a2 <df_md_alloc+0x62>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edi,%edi
call   1050 <bitmap_initialize_stat@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <bmp_iter_next@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <bmp_iter_set@plt>
test   %rax,%rax
je     11b0 <df_md_alloc+0x70>
test   %r14,%r14
je     1180 <df_md_alloc+0x40>
xor    %eax,%eax
call   1030 <bitmap_clear@plt>
jmp    1187 <df_md_alloc+0x47>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @df_md_alloc(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
br label %7
7: ; preds = %18, %3
%8 = call i64 @bmp_iter_set(i32* %4, i32* %5)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %7
%11 = load i8*, i8** %6
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 (...) @bitmap_clear()
br label %17
15: ; preds = %10
%16 = call i32 @bitmap_initialize_stat(i32 0)
br label %17
17: ; preds = %15, %13
br label %18
18: ; preds = %17
%19 = call i32 @bmp_iter_next(i32* %4, i32* %5)
br label %7
20: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @df_md_alloc(i32 %0, i32 %1, i8* readnone %2) {
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i64 @bmp_iter_set(i32* %4, i32* %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %19, label %8
8: ; preds = %3
%9 = icmp eq i8* %2, null
br label %10
10: ; preds = %8, %15
br i1 %9, label %13, label %11
11: ; preds = %10
%12 = call i32 (...) @bitmap_clear()
br label %15
13: ; preds = %10
%14 = call i32 @bitmap_initialize_stat(i32 0)
br label %15
15: ; preds = %11, %13
%16 = call i32 @bmp_iter_next(i32* %4, i32* %5)
%17 = call i64 @bmp_iter_set(i32* %4, i32* %5)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %10
19: ; preds = %15, %3
ret void
}