#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 *, int, int);
void printTheDebugOutput(unsigned char *bit_array) {
  int i, j;
  for (i = 0; i < 2; i++) {
    for (j = 1; j <= 8; j++) {
      if (bit_array[i] & (1 << (j - 1))) {
        printf("In BIT_MAP[%d] the position of Bit SET : %d\n", i, j);
      }
    }
  }
}


x86 assembly (clang, -O0):
<printTheDebugOutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    119c <printTheDebugOutput+0x8c>
movl   $0x1,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jg     1189 <printTheDebugOutput+0x79>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1176 <printTheDebugOutput+0x66>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
jmp    117b <printTheDebugOutput+0x6b>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <printTheDebugOutput+0x24>
jmp    118e <printTheDebugOutput+0x7e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <printTheDebugOutput+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTheDebugOutput>:
push   %rbx
mov    %rdi,%rbx
movzbl (%rdi),%eax
test   $0x1,%al
jne    11ac <printTheDebugOutput+0x9c>
test   $0x2,%al
jne    11ca <printTheDebugOutput+0xba>
test   $0x4,%al
jne    11e8 <printTheDebugOutput+0xd8>
test   $0x8,%al
jne    1206 <printTheDebugOutput+0xf6>
test   $0x10,%al
jne    1224 <printTheDebugOutput+0x114>
test   $0x20,%al
jne    1242 <printTheDebugOutput+0x132>
test   $0x40,%al
jne    1260 <printTheDebugOutput+0x150>
test   $0x80,%al
je     1166 <printTheDebugOutput+0x56>
lea    0xea6(%rip),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
movzbl 0x1(%rbx),%eax
test   $0x1,%al
jne    1283 <printTheDebugOutput+0x173>
test   $0x2,%al
jne    12a5 <printTheDebugOutput+0x195>
test   $0x4,%al
jne    12c7 <printTheDebugOutput+0x1b7>
test   $0x8,%al
jne    12e9 <printTheDebugOutput+0x1d9>
test   $0x10,%al
jne    130b <printTheDebugOutput+0x1fb>
test   $0x20,%al
jne    132d <printTheDebugOutput+0x21d>
test   $0x40,%al
jne    134f <printTheDebugOutput+0x23f>
test   $0x80,%al
jne    1371 <printTheDebugOutput+0x261>
pop    %rbx
ret
lea    0xe4d(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
movzbl (%rbx),%eax
test   $0x2,%al
je     1127 <printTheDebugOutput+0x17>
lea    0xe2f(%rip),%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
movzbl (%rbx),%eax
test   $0x4,%al
je     112f <printTheDebugOutput+0x1f>
lea    0xe11(%rip),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
movzbl (%rbx),%eax
test   $0x8,%al
je     1137 <printTheDebugOutput+0x27>
lea    0xdf3(%rip),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <printf@plt>
movzbl (%rbx),%eax
test   $0x10,%al
je     113f <printTheDebugOutput+0x2f>
lea    0xdd5(%rip),%rdi
xor    %esi,%esi
mov    $0x5,%edx
call   1030 <printf@plt>
movzbl (%rbx),%eax
test   $0x20,%al
je     1147 <printTheDebugOutput+0x37>
lea    0xdb7(%rip),%rdi
xor    %esi,%esi
mov    $0x6,%edx
call   1030 <printf@plt>
movzbl (%rbx),%eax
test   $0x40,%al
je     114f <printTheDebugOutput+0x3f>
lea    0xd99(%rip),%rdi
xor    %esi,%esi
mov    $0x7,%edx
call   1030 <printf@plt>
movzbl (%rbx),%eax
test   $0x80,%al
jne    1153 <printTheDebugOutput+0x43>
jmp    1166 <printTheDebugOutput+0x56>
lea    0xd76(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
movzbl 0x1(%rbx),%eax
test   $0x2,%al
je     117a <printTheDebugOutput+0x6a>
lea    0xd54(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
movzbl 0x1(%rbx),%eax
test   $0x4,%al
je     1182 <printTheDebugOutput+0x72>
lea    0xd32(%rip),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
movzbl 0x1(%rbx),%eax
test   $0x8,%al
je     118a <printTheDebugOutput+0x7a>
lea    0xd10(%rip),%rdi
mov    $0x1,%esi
mov    $0x4,%edx
call   1030 <printf@plt>
movzbl 0x1(%rbx),%eax
test   $0x10,%al
je     1192 <printTheDebugOutput+0x82>
lea    0xcee(%rip),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1030 <printf@plt>
movzbl 0x1(%rbx),%eax
test   $0x20,%al
je     119a <printTheDebugOutput+0x8a>
lea    0xccc(%rip),%rdi
mov    $0x1,%esi
mov    $0x6,%edx
call   1030 <printf@plt>
movzbl 0x1(%rbx),%eax
test   $0x40,%al
je     11a2 <printTheDebugOutput+0x92>
lea    0xcaa(%rip),%rdi
mov    $0x1,%esi
mov    $0x7,%edx
call   1030 <printf@plt>
movzbl 0x1(%rbx),%eax
test   $0x80,%al
je     11aa <printTheDebugOutput+0x9a>
lea    0xc88(%rip),%rdi
mov    $0x1,%esi
mov    $0x8,%edx
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"In BIT_MAP[%d] the position of Bit SET : %d\0A\00"
define void @printTheDebugOutput(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %5
5: ; preds = %33, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %36
8: ; preds = %5
store i32 1, i32* %4
br label %9
9: ; preds = %29, %8
%10 = load i32, i32* %4
%11 = icmp sle i32 %10, 8
br i1 %11, label %12, label %32
12: ; preds = %9
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = load i32, i32* %4
%20 = sub nsw i32 %19, 1
%21 = shl i32 1, %20
%22 = and i32 %18, %21
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %12
%25 = load i32, i32* %3
%26 = load i32, i32* %4
%27 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %25, i32 %26)
br label %28
28: ; preds = %24, %12
br label %29
29: ; preds = %28
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %9
32: ; preds = %9
br label %33
33: ; preds = %32
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
store i32 %35, i32* %3
br label %5
36: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"In BIT_MAP[%d] the position of Bit SET : %d\0A\00"
define void @printTheDebugOutput(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 0, i32 1)
%8 = load i8, i8* %0
%9 = zext i8 %8 to i32
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %3, %1 ], [ %9, %6 ]
%12 = and i32 %11, 2
%13 = icmp eq i32 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 0, i32 2)
%16 = load i8, i8* %0
%17 = zext i8 %16 to i32
br label %18
18: ; preds = %14, %10
%19 = phi i32 [ %17, %14 ], [ %11, %10 ]
%20 = and i32 %19, 4
%21 = icmp eq i32 %20, 0
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 0, i32 3)
%24 = load i8, i8* %0
%25 = zext i8 %24 to i32
br label %26
26: ; preds = %22, %18
%27 = phi i32 [ %25, %22 ], [ %19, %18 ]
%28 = and i32 %27, 8
%29 = icmp eq i32 %28, 0
br i1 %29, label %34, label %30
30: ; preds = %26
%31 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 0, i32 4)
%32 = load i8, i8* %0
%33 = zext i8 %32 to i32
br label %34
34: ; preds = %30, %26
%35 = phi i32 [ %33, %30 ], [ %27, %26 ]
%36 = and i32 %35, 16
%37 = icmp eq i32 %36, 0
br i1 %37, label %42, label %38
38: ; preds = %34
%39 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 0, i32 5)
%40 = load i8, i8* %0
%41 = zext i8 %40 to i32
br label %42
42: ; preds = %38, %34
%43 = phi i32 [ %41, %38 ], [ %35, %34 ]
%44 = and i32 %43, 32
%45 = icmp eq i32 %44, 0
br i1 %45, label %50, label %46
46: ; preds = %42
%47 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 0, i32 6)
%48 = load i8, i8* %0
%49 = zext i8 %48 to i32
br label %50
50: ; preds = %46, %42
%51 = phi i32 [ %49, %46 ], [ %43, %42 ]
%52 = and i32 %51, 64
%53 = icmp eq i32 %52, 0
br i1 %53, label %58, label %54
54: ; preds = %50
%55 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 0, i32 7)
%56 = load i8, i8* %0
%57 = zext i8 %56 to i32
br label %58
58: ; preds = %54, %50
%59 = phi i32 [ %57, %54 ], [ %51, %50 ]
%60 = and i32 %59, 128
%61 = icmp eq i32 %60, 0
br i1 %61, label %64, label %62
62: ; preds = %58
%63 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 0, i32 8)
br label %64
64: ; preds = %62, %58
%65 = getelementptr inbounds i8, i8* %0, i64 1
%66 = load i8, i8* %65
%67 = zext i8 %66 to i32
%68 = and i32 %67, 1
%69 = icmp eq i32 %68, 0
br i1 %69, label %74, label %70
70: ; preds = %64
%71 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 1, i32 1)
%72 = load i8, i8* %65
%73 = zext i8 %72 to i32
br label %74
74: ; preds = %70, %64
%75 = phi i32 [ %67, %64 ], [ %73, %70 ]
%76 = and i32 %75, 2
%77 = icmp eq i32 %76, 0
br i1 %77, label %82, label %78
78: ; preds = %74
%79 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
%80 = load i8, i8* %65
%81 = zext i8 %80 to i32
br label %82
82: ; preds = %78, %74
%83 = phi i32 [ %81, %78 ], [ %75, %74 ]
%84 = and i32 %83, 4
%85 = icmp eq i32 %84, 0
br i1 %85, label %90, label %86
86: ; preds = %82
%87 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 1, i32 3)
%88 = load i8, i8* %65
%89 = zext i8 %88 to i32
br label %90
90: ; preds = %86, %82
%91 = phi i32 [ %89, %86 ], [ %83, %82 ]
%92 = and i32 %91, 8
%93 = icmp eq i32 %92, 0
br i1 %93, label %98, label %94
94: ; preds = %90
%95 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 1, i32 4)
%96 = load i8, i8* %65
%97 = zext i8 %96 to i32
br label %98
98: ; preds = %94, %90
%99 = phi i32 [ %97, %94 ], [ %91, %90 ]
%100 = and i32 %99, 16
%101 = icmp eq i32 %100, 0
br i1 %101, label %106, label %102
102: ; preds = %98
%103 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 1, i32 5)
%104 = load i8, i8* %65
%105 = zext i8 %104 to i32
br label %106
106: ; preds = %102, %98
%107 = phi i32 [ %105, %102 ], [ %99, %98 ]
%108 = and i32 %107, 32
%109 = icmp eq i32 %108, 0
br i1 %109, label %114, label %110
110: ; preds = %106
%111 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 1, i32 6)
%112 = load i8, i8* %65
%113 = zext i8 %112 to i32
br label %114
114: ; preds = %110, %106
%115 = phi i32 [ %113, %110 ], [ %107, %106 ]
%116 = and i32 %115, 64
%117 = icmp eq i32 %116, 0
br i1 %117, label %122, label %118
118: ; preds = %114
%119 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 1, i32 7)
%120 = load i8, i8* %65
%121 = zext i8 %120 to i32
br label %122
122: ; preds = %118, %114
%123 = phi i32 [ %121, %118 ], [ %115, %114 ]
%124 = and i32 %123, 128
%125 = icmp eq i32 %124, 0
br i1 %125, label %128, label %126
126: ; preds = %122
%127 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 1, i32 8)
br label %128
128: ; preds = %126, %122
ret void
}