#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*/ printf(char *, ...);
void print_debug_mask(int mask) {
  if (mask & (1 << 0)) {
    mask &= ~(1 << 0);
    printf("IVTV_DBGFLG_WARN%s", (mask ? " | " : ""));
  }
  if (mask & (1 << 1)) {
    mask &= ~(1 << 1);
    printf("IVTV_DBGFLG_INFO%s", (mask ? " | " : ""));
  }
  if (mask & (1 << 2)) {
    mask &= ~(1 << 2);
    printf("IVTV_DBGFLG_MB%s", (mask ? " | " : ""));
  }
  if (mask & (1 << 5)) {
    mask &= ~(1 << 5);
    printf("IVTV_DBGFLG_DMA%s", (mask ? " | " : ""));
  }
  if (mask & (1 << 3)) {
    mask &= ~(1 << 3);
    printf("IVTV_DBGFLG_IOCTL%s", (mask ? " | " : ""));
  }
  if (mask & (1 << 4)) {
    mask &= ~(1 << 4);
    printf("IVTV_DBGFLG_FILE%s", (mask ? " | " : ""));
  }
  if (mask & (1 << 9)) {
    mask &= ~(1 << 9);
    printf("IVTV_DBGFLG_I2C%s", (mask ? " | " : ""));
  }
  if (mask & (1 << 6)) {
    mask &= ~(1 << 6);
    printf("IVTV_DBGFLG_IRQ%s", (mask ? " | " : ""));
  }
  if (mask & (1 << 7)) {
    mask &= ~(1 << 7);
    printf("IVTV_DBGFLG_DEC%s", (mask ? " | " : ""));
  }
  if (mask & (1 << 8)) {
    mask &= ~(1 << 8);
    printf("IVTV_DBGFLG_YUV%s", (mask ? " | " : ""));
  }
  if (mask & (1 << 10)) {
    mask &= ~(1 << 10);
    printf("IVTV_DBGFLG_HIGHVOL%s", (mask ? " | " : ""));
  }
  if (mask)
    printf("0x%08x", mask);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_debug_mask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1159 <print_debug_mask+0x49>
mov    -0x4(%rbp),%eax
and    $0xfffffffe,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xf9d(%rip),%rsi
lea    0xecf(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1197 <print_debug_mask+0x87>
mov    -0x4(%rbp),%eax
and    $0xfffffffd,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xf5f(%rip),%rsi
lea    0xe91(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     11d5 <print_debug_mask+0xc5>
mov    -0x4(%rbp),%eax
and    $0xfffffffb,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xf21(%rip),%rsi
lea    0xe53(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     1213 <print_debug_mask+0x103>
mov    -0x4(%rbp),%eax
and    $0xffffffdf,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xee3(%rip),%rsi
lea    0xe15(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1251 <print_debug_mask+0x141>
mov    -0x4(%rbp),%eax
and    $0xfffffff7,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xea5(%rip),%rsi
lea    0xdd7(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xe03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     128f <print_debug_mask+0x17f>
mov    -0x4(%rbp),%eax
and    $0xffffffef,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xe67(%rip),%rsi
lea    0xd99(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x200,%eax
cmp    $0x0,%eax
je     12d1 <print_debug_mask+0x1c1>
mov    -0x4(%rbp),%eax
and    $0xfffffdff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xe25(%rip),%rsi
lea    0xd57(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xdaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     130f <print_debug_mask+0x1ff>
mov    -0x4(%rbp),%eax
and    $0xffffffbf,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xde7(%rip),%rsi
lea    0xd19(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xd7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     1351 <print_debug_mask+0x241>
mov    -0x4(%rbp),%eax
and    $0xffffff7f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xda5(%rip),%rsi
lea    0xcd7(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xd4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x100,%eax
cmp    $0x0,%eax
je     1393 <print_debug_mask+0x283>
mov    -0x4(%rbp),%eax
and    $0xfffffeff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xd63(%rip),%rsi
lea    0xc95(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xd1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x400,%eax
cmp    $0x0,%eax
je     13d5 <print_debug_mask+0x2c5>
mov    -0x4(%rbp),%eax
and    $0xfffffbff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xd21(%rip),%rsi
lea    0xc53(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xcee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
je     13f0 <print_debug_mask+0x2e0>
mov    -0x4(%rbp),%esi
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_debug_mask>:
push   %rbx
mov    %edi,%ebx
test   $0x1,%bl
jne    11ae <print_debug_mask+0x8e>
test   $0x2,%bl
jne    11da <print_debug_mask+0xba>
test   $0x4,%bl
jne    1206 <print_debug_mask+0xe6>
test   $0x20,%bl
jne    1232 <print_debug_mask+0x112>
test   $0x8,%bl
jne    125e <print_debug_mask+0x13e>
test   $0x10,%bl
jne    128a <print_debug_mask+0x16a>
test   $0x200,%ebx
jne    12b9 <print_debug_mask+0x199>
test   $0x40,%bl
jne    12e8 <print_debug_mask+0x1c8>
test   $0x80,%bl
jne    1314 <print_debug_mask+0x1f4>
test   $0x100,%ebx
jne    1346 <print_debug_mask+0x226>
test   $0x400,%ebx
jne    1378 <print_debug_mask+0x258>
test   %ebx,%ebx
je     11a3 <print_debug_mask+0x83>
lea    0xf38(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>
and    $0xfffffffe,%ebx
lea    0xe5e(%rip),%rax
lea    0xe54(%rip),%rsi
cmove  %rax,%rsi
lea    0xe36(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   $0x2,%bl
je     1135 <print_debug_mask+0x15>
and    $0xfffffffd,%ebx
lea    0xe32(%rip),%rax
lea    0xe28(%rip),%rsi
cmove  %rax,%rsi
lea    0xe21(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   $0x4,%bl
je     113e <print_debug_mask+0x1e>
and    $0xfffffffb,%ebx
lea    0xe06(%rip),%rax
lea    0xdfc(%rip),%rsi
cmove  %rax,%rsi
lea    0xe08(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   $0x20,%bl
je     1147 <print_debug_mask+0x27>
and    $0xffffffdf,%ebx
lea    0xdda(%rip),%rax
lea    0xdd0(%rip),%rsi
cmove  %rax,%rsi
lea    0xded(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   $0x8,%bl
je     1150 <print_debug_mask+0x30>
and    $0xfffffff7,%ebx
lea    0xdae(%rip),%rax
lea    0xda4(%rip),%rsi
cmove  %rax,%rsi
lea    0xdd3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   $0x10,%bl
je     1159 <print_debug_mask+0x39>
and    $0xffffffef,%ebx
lea    0xd82(%rip),%rax
lea    0xd78(%rip),%rsi
cmove  %rax,%rsi
lea    0xdbb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   $0x200,%ebx
je     1165 <print_debug_mask+0x45>
and    $0xfffffdff,%ebx
lea    0xd50(%rip),%rax
lea    0xd46(%rip),%rsi
cmove  %rax,%rsi
lea    0xd9c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   $0x40,%bl
je     116e <print_debug_mask+0x4e>
and    $0xffffffbf,%ebx
lea    0xd24(%rip),%rax
lea    0xd1a(%rip),%rsi
cmove  %rax,%rsi
lea    0xd82(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   $0x80,%bl
je     1177 <print_debug_mask+0x57>
and    $0xffffff7f,%ebx
lea    0xcf5(%rip),%rax
lea    0xceb(%rip),%rsi
cmove  %rax,%rsi
lea    0xd65(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   $0x100,%ebx
je     1183 <print_debug_mask+0x63>
and    $0xfffffeff,%ebx
lea    0xcc3(%rip),%rax
lea    0xcb9(%rip),%rsi
cmove  %rax,%rsi
lea    0xd45(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   $0x400,%ebx
je     118f <print_debug_mask+0x6f>
and    $0xfffffbff,%ebx
lea    0xc91(%rip),%rax
lea    0xc87(%rip),%rsi
cmove  %rax,%rsi
lea    0xd25(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
jne    1193 <print_debug_mask+0x73>
jmp    11a3 <print_debug_mask+0x83>

LLVM IR (-O0):
@.str = [19 x i8] c"IVTV_DBGFLG_WARN%s\00"
@.str.1 = [4 x i8] c" | \00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [19 x i8] c"IVTV_DBGFLG_INFO%s\00"
@.str.4 = [17 x i8] c"IVTV_DBGFLG_MB%s\00"
@.str.5 = [18 x i8] c"IVTV_DBGFLG_DMA%s\00"
@.str.6 = [20 x i8] c"IVTV_DBGFLG_IOCTL%s\00"
@.str.7 = [19 x i8] c"IVTV_DBGFLG_FILE%s\00"
@.str.8 = [18 x i8] c"IVTV_DBGFLG_I2C%s\00"
@.str.9 = [18 x i8] c"IVTV_DBGFLG_IRQ%s\00"
@.str.10 = [18 x i8] c"IVTV_DBGFLG_DEC%s\00"
@.str.11 = [18 x i8] c"IVTV_DBGFLG_YUV%s\00"
@.str.12 = [22 x i8] c"IVTV_DBGFLG_HIGHVOL%s\00"
@.str.13 = [7 x i8] c"0x%08x\00"
@.str.14 = [2 x i8] c"\0A\00"
define void @print_debug_mask(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i32, i32* %2
%8 = and i32 %7, -2
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %6, %1
%15 = load i32, i32* %2
%16 = and i32 %15, 2
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %26
18: ; preds = %14
%19 = load i32, i32* %2
%20 = and i32 %19, -3
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = icmp ne i32 %21, 0
%23 = zext i1 %22 to i64
%24 = select i1 %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %24)
br label %26
26: ; preds = %18, %14
%27 = load i32, i32* %2
%28 = and i32 %27, 4
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %38
30: ; preds = %26
%31 = load i32, i32* %2
%32 = and i32 %31, -5
store i32 %32, i32* %2
%33 = load i32, i32* %2
%34 = icmp ne i32 %33, 0
%35 = zext i1 %34 to i64
%36 = select i1 %34, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* %36)
br label %38
38: ; preds = %30, %26
%39 = load i32, i32* %2
%40 = and i32 %39, 32
%41 = icmp ne i32 %40, 0
br i1 %41, label %42, label %50
42: ; preds = %38
%43 = load i32, i32* %2
%44 = and i32 %43, -33
store i32 %44, i32* %2
%45 = load i32, i32* %2
%46 = icmp ne i32 %45, 0
%47 = zext i1 %46 to i64
%48 = select i1 %46, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* %48)
br label %50
50: ; preds = %42, %38
%51 = load i32, i32* %2
%52 = and i32 %51, 8
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %62
54: ; preds = %50
%55 = load i32, i32* %2
%56 = and i32 %55, -9
store i32 %56, i32* %2
%57 = load i32, i32* %2
%58 = icmp ne i32 %57, 0
%59 = zext i1 %58 to i64
%60 = select i1 %58, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i8* %60)
br label %62
62: ; preds = %54, %50
%63 = load i32, i32* %2
%64 = and i32 %63, 16
%65 = icmp ne i32 %64, 0
br i1 %65, label %66, label %74
66: ; preds = %62
%67 = load i32, i32* %2
%68 = and i32 %67, -17
store i32 %68, i32* %2
%69 = load i32, i32* %2
%70 = icmp ne i32 %69, 0
%71 = zext i1 %70 to i64
%72 = select i1 %70, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i8* %72)
br label %74
74: ; preds = %66, %62
%75 = load i32, i32* %2
%76 = and i32 %75, 512
%77 = icmp ne i32 %76, 0
br i1 %77, label %78, label %86
78: ; preds = %74
%79 = load i32, i32* %2
%80 = and i32 %79, -513
store i32 %80, i32* %2
%81 = load i32, i32* %2
%82 = icmp ne i32 %81, 0
%83 = zext i1 %82 to i64
%84 = select i1 %82, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i8* %84)
br label %86
86: ; preds = %78, %74
%87 = load i32, i32* %2
%88 = and i32 %87, 64
%89 = icmp ne i32 %88, 0
br i1 %89, label %90, label %98
90: ; preds = %86
%91 = load i32, i32* %2
%92 = and i32 %91, -65
store i32 %92, i32* %2
%93 = load i32, i32* %2
%94 = icmp ne i32 %93, 0
%95 = zext i1 %94 to i64
%96 = select i1 %94, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i8* %96)
br label %98
98: ; preds = %90, %86
%99 = load i32, i32* %2
%100 = and i32 %99, 128
%101 = icmp ne i32 %100, 0
br i1 %101, label %102, label %110
102: ; preds = %98
%103 = load i32, i32* %2
%104 = and i32 %103, -129
store i32 %104, i32* %2
%105 = load i32, i32* %2
%106 = icmp ne i32 %105, 0
%107 = zext i1 %106 to i64
%108 = select i1 %106, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8* %108)
br label %110
110: ; preds = %102, %98
%111 = load i32, i32* %2
%112 = and i32 %111, 256
%113 = icmp ne i32 %112, 0
br i1 %113, label %114, label %122
114: ; preds = %110
%115 = load i32, i32* %2
%116 = and i32 %115, -257
store i32 %116, i32* %2
%117 = load i32, i32* %2
%118 = icmp ne i32 %117, 0
%119 = zext i1 %118 to i64
%120 = select i1 %118, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i8* %120)
br label %122
122: ; preds = %114, %110
%123 = load i32, i32* %2
%124 = and i32 %123, 1024
%125 = icmp ne i32 %124, 0
br i1 %125, label %126, label %134
126: ; preds = %122
%127 = load i32, i32* %2
%128 = and i32 %127, -1025
store i32 %128, i32* %2
%129 = load i32, i32* %2
%130 = icmp ne i32 %129, 0
%131 = zext i1 %130 to i64
%132 = select i1 %130, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0), i8* %132)
br label %134
134: ; preds = %126, %122
%135 = load i32, i32* %2
%136 = icmp ne i32 %135, 0
br i1 %136, label %137, label %140
137: ; preds = %134
%138 = load i32, i32* %2
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i32 %138)
br label %140
140: ; preds = %137, %134
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"IVTV_DBGFLG_WARN%s\00"
@.str.1 = [4 x i8] c" | \00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [19 x i8] c"IVTV_DBGFLG_INFO%s\00"
@.str.4 = [17 x i8] c"IVTV_DBGFLG_MB%s\00"
@.str.5 = [18 x i8] c"IVTV_DBGFLG_DMA%s\00"
@.str.6 = [20 x i8] c"IVTV_DBGFLG_IOCTL%s\00"
@.str.7 = [19 x i8] c"IVTV_DBGFLG_FILE%s\00"
@.str.8 = [18 x i8] c"IVTV_DBGFLG_I2C%s\00"
@.str.9 = [18 x i8] c"IVTV_DBGFLG_IRQ%s\00"
@.str.10 = [18 x i8] c"IVTV_DBGFLG_DEC%s\00"
@.str.11 = [18 x i8] c"IVTV_DBGFLG_YUV%s\00"
@.str.12 = [22 x i8] c"IVTV_DBGFLG_HIGHVOL%s\00"
@.str.13 = [7 x i8] c"0x%08x\00"
define void @print_debug_mask(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = and i32 %0, -2
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ %5, %4 ], [ %0, %1 ]
%11 = and i32 %10, 2
%12 = icmp eq i32 %11, 0
br i1 %12, label %18, label %13
13: ; preds = %9
%14 = and i32 %10, -3
%15 = icmp eq i32 %14, 0
%16 = select i1 %15, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %13, %9
%19 = phi i32 [ %14, %13 ], [ %10, %9 ]
%20 = and i32 %19, 4
%21 = icmp eq i32 %20, 0
br i1 %21, label %27, label %22
22: ; preds = %18
%23 = and i32 %19, -5
%24 = icmp eq i32 %23, 0
%25 = select i1 %24, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* %25)
br label %27
27: ; preds = %22, %18
%28 = phi i32 [ %23, %22 ], [ %19, %18 ]
%29 = and i32 %28, 32
%30 = icmp eq i32 %29, 0
br i1 %30, label %36, label %31
31: ; preds = %27
%32 = and i32 %28, -33
%33 = icmp eq i32 %32, 0
%34 = select i1 %33, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* %34)
br label %36
36: ; preds = %31, %27
%37 = phi i32 [ %32, %31 ], [ %28, %27 ]
%38 = and i32 %37, 8
%39 = icmp eq i32 %38, 0
br i1 %39, label %45, label %40
40: ; preds = %36
%41 = and i32 %37, -9
%42 = icmp eq i32 %41, 0
%43 = select i1 %42, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i8* %43)
br label %45
45: ; preds = %40, %36
%46 = phi i32 [ %41, %40 ], [ %37, %36 ]
%47 = and i32 %46, 16
%48 = icmp eq i32 %47, 0
br i1 %48, label %54, label %49
49: ; preds = %45
%50 = and i32 %46, -17
%51 = icmp eq i32 %50, 0
%52 = select i1 %51, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i8* %52)
br label %54
54: ; preds = %49, %45
%55 = phi i32 [ %50, %49 ], [ %46, %45 ]
%56 = and i32 %55, 512
%57 = icmp eq i32 %56, 0
br i1 %57, label %63, label %58
58: ; preds = %54
%59 = and i32 %55, -513
%60 = icmp eq i32 %59, 0
%61 = select i1 %60, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i8* %61)
br label %63
63: ; preds = %58, %54
%64 = phi i32 [ %59, %58 ], [ %55, %54 ]
%65 = and i32 %64, 64
%66 = icmp eq i32 %65, 0
br i1 %66, label %72, label %67
67: ; preds = %63
%68 = and i32 %64, -65
%69 = icmp eq i32 %68, 0
%70 = select i1 %69, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i8* %70)
br label %72
72: ; preds = %67, %63
%73 = phi i32 [ %68, %67 ], [ %64, %63 ]
%74 = and i32 %73, 128
%75 = icmp eq i32 %74, 0
br i1 %75, label %81, label %76
76: ; preds = %72
%77 = and i32 %73, -129
%78 = icmp eq i32 %77, 0
%79 = select i1 %78, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i8* %79)
br label %81
81: ; preds = %76, %72
%82 = phi i32 [ %77, %76 ], [ %73, %72 ]
%83 = and i32 %82, 256
%84 = icmp eq i32 %83, 0
br i1 %84, label %90, label %85
85: ; preds = %81
%86 = and i32 %82, -257
%87 = icmp eq i32 %86, 0
%88 = select i1 %87, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i8* %88)
br label %90
90: ; preds = %85, %81
%91 = phi i32 [ %86, %85 ], [ %82, %81 ]
%92 = and i32 %91, 1024
%93 = icmp eq i32 %92, 0
br i1 %93, label %99, label %94
94: ; preds = %90
%95 = and i32 %91, -1025
%96 = icmp eq i32 %95, 0
%97 = select i1 %96, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%98 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0), i8* %97)
br label %99
99: ; preds = %94, %90
%100 = phi i32 [ %95, %94 ], [ %91, %90 ]
%101 = icmp eq i32 %100, 0
br i1 %101, label %104, label %102
102: ; preds = %99
%103 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i32 %100)
br label %104
104: ; preds = %102, %99
%105 = tail call i32 @putchar(i32 10)
ret void
}