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


x86 assembly (clang, -O0):
<df_md_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    -0x4(%rbp),%rdi
call   1040 <bmp_iter_set@plt>
cmp    $0x0,%rax
je     1197 <df_md_alloc+0x57>
cmpl   $0x0,-0xc(%rbp)
je     117d <df_md_alloc+0x3d>
mov    $0x0,%al
call   1030 <bitmap_clear@plt>
jmp    1184 <df_md_alloc+0x44>
mov    $0x0,%al
call   1050 <bitmap_initialize_stat@plt>
jmp    1189 <df_md_alloc+0x49>
lea    -0x4(%rbp),%rdi
call   1060 <bmp_iter_next@plt>
jmp    1151 <df_md_alloc+0x11>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<df_md_alloc>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1040 <bmp_iter_set@plt>
test   %rax,%rax
je     119a <df_md_alloc+0x5a>
lea    0xc(%rsp),%rbx
jmp    118c <df_md_alloc+0x4c>
nopw   0x0(%rax,%rax,1)
call   1050 <bitmap_initialize_stat@plt>
mov    %rbx,%rdi
call   1060 <bmp_iter_next@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <bmp_iter_set@plt>
test   %rax,%rax
je     119a <df_md_alloc+0x5a>
xor    %eax,%eax
test   %r14d,%r14d
je     1170 <df_md_alloc+0x30>
call   1030 <bitmap_clear@plt>
jmp    1175 <df_md_alloc+0x35>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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