#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*/ BitsFromByte(unsigned char, unsigned char *, int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  unsigned char byte[8] = {0x0C, 0x1E, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x00};
  unsigned char bits[64];
  int i;
  int k;
  for (i = 0; i < 8; i++) {
    k = i * 8;
    BitsFromByte(byte[i], bits, k);
  }
  for (i = 0; i < 64; i++) {
    printf("%d ", bits[i]);
    if (i == 7 || i == 15 || i == 23 || i == 31 || i == 39 || i == 47 ||
        i == 55 || i == 63) {
      printf("\n");
    }
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x64(%rbp)
cmpl   $0x8,-0x64(%rbp)
jge    1180 <main+0x60>
mov    -0x64(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x68(%rbp)
movslq -0x64(%rbp),%rax
mov    -0x18(%rbp,%rax,1),%al
lea    -0x60(%rbp),%rsi
mov    -0x68(%rbp),%edx
movzbl %al,%edi
call   1040 <BitsFromByte@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1148 <main+0x28>
movl   $0x0,-0x64(%rbp)
cmpl   $0x40,-0x64(%rbp)
jge    1219 <main+0xf9>
movslq -0x64(%rbp),%rax
movzbl -0x60(%rbp,%rax,1),%esi
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x7,-0x64(%rbp)
je     11f8 <main+0xd8>
cmpl   $0xf,-0x64(%rbp)
je     11f8 <main+0xd8>
cmpl   $0x17,-0x64(%rbp)
je     11f8 <main+0xd8>
cmpl   $0x1f,-0x64(%rbp)
je     11f8 <main+0xd8>
cmpl   $0x27,-0x64(%rbp)
je     11f8 <main+0xd8>
cmpl   $0x2f,-0x64(%rbp)
je     11f8 <main+0xd8>
cmpl   $0x37,-0x64(%rbp)
je     11f8 <main+0xd8>
cmpl   $0x3f,-0x64(%rbp)
jne    1206 <main+0xe6>
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    120b <main+0xeb>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1187 <main+0x67>
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rsp,%rbx
mov    $0xc,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1050 <BitsFromByte@plt>
mov    $0x1e,%edi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1050 <BitsFromByte@plt>
mov    $0x33,%edi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1050 <BitsFromByte@plt>
mov    $0x33,%edi
mov    %rbx,%rsi
mov    $0x18,%edx
call   1050 <BitsFromByte@plt>
mov    $0x3f,%edi
mov    %rbx,%rsi
mov    $0x20,%edx
call   1050 <BitsFromByte@plt>
mov    $0x33,%edi
mov    %rbx,%rsi
mov    $0x28,%edx
call   1050 <BitsFromByte@plt>
mov    $0x33,%edi
mov    %rbx,%rsi
mov    $0x30,%edx
call   1050 <BitsFromByte@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x38,%edx
call   1050 <BitsFromByte@plt>
lea    0xe35(%rip),%r14
xor    %ebx,%ebx
jmp    11e4 <main+0xb4>
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x40,%rbx
je     1218 <main+0xe8>
movzbl (%rsp,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
and    $0x7ffffff7,%eax
cmp    $0x27,%eax
je     11d0 <main+0xa0>
mov    %ebx,%eax
and    $0x7fffffe7,%eax
cmp    $0x7,%eax
je     11d0 <main+0xa0>
cmp    $0x37,%rbx
je     11d0 <main+0xa0>
cmp    $0x3f,%rbx
jne    11da <main+0xaa>
jmp    11d0 <main+0xa0>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.byte = [8 x i8] c"\0C\1E33?33\00"
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [8 x i8]
%7 = alloca [64 x i8]
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [8 x i8]* %6 to i8*
store i32 0, i32* %8
br label %11
11: ; preds = %24, %2
%12 = load i32, i32* %8
%13 = icmp slt i32 %12, 8
br i1 %13, label %14, label %27
14: ; preds = %11
%15 = load i32, i32* %8
%16 = mul nsw i32 %15, 8
store i32 %16, i32* %9
%17 = load i32, i32* %8
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%22 = load i32, i32* %9
%23 = call i32 @BitsFromByte(i8 zeroext %20, i8* %21, i32 %22)
br label %24
24: ; preds = %14
%25 = load i32, i32* %8
%26 = add nsw i32 %25, 1
store i32 %26, i32* %8
br label %11
27: ; preds = %11
store i32 0, i32* %8
br label %28
28: ; preds = %64, %27
%29 = load i32, i32* %8
%30 = icmp slt i32 %29, 64
br i1 %30, label %31, label %67
31: ; preds = %28
%32 = load i32, i32* %8
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 %33
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %36)
%38 = load i32, i32* %8
%39 = icmp eq i32 %38, 7
br i1 %39, label %61, label %40
40: ; preds = %31
%41 = load i32, i32* %8
%42 = icmp eq i32 %41, 15
br i1 %42, label %61, label %43
43: ; preds = %40
%44 = load i32, i32* %8
%45 = icmp eq i32 %44, 23
br i1 %45, label %61, label %46
46: ; preds = %43
%47 = load i32, i32* %8
%48 = icmp eq i32 %47, 31
br i1 %48, label %61, label %49
49: ; preds = %46
%50 = load i32, i32* %8
%51 = icmp eq i32 %50, 39
br i1 %51, label %61, label %52
52: ; preds = %49
%53 = load i32, i32* %8
%54 = icmp eq i32 %53, 47
br i1 %54, label %61, label %55
55: ; preds = %52
%56 = load i32, i32* %8
%57 = icmp eq i32 %56, 55
br i1 %57, label %61, label %58
58: ; preds = %55
%59 = load i32, i32* %8
%60 = icmp eq i32 %59, 63
br i1 %60, label %61, label %63
61: ; preds = %58, %55, %52, %49, %46, %43, %40, %31
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %63
63: ; preds = %61, %58
br label %64
64: ; preds = %63
%65 = load i32, i32* %8
%66 = add nsw i32 %65, 1
store i32 %66, i32* %8
br label %28
67: ; preds = %28
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%69 = load i32, i32* %3
ret i32 %69
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = call i32 @BitsFromByte(i8 zeroext 12, i8* %4, i32 0)
%6 = call i32 @BitsFromByte(i8 zeroext 30, i8* %4, i32 8)
%7 = call i32 @BitsFromByte(i8 zeroext 51, i8* %4, i32 16)
%8 = call i32 @BitsFromByte(i8 zeroext 51, i8* %4, i32 24)
%9 = call i32 @BitsFromByte(i8 zeroext 63, i8* %4, i32 32)
%10 = call i32 @BitsFromByte(i8 zeroext 51, i8* %4, i32 40)
%11 = call i32 @BitsFromByte(i8 zeroext 51, i8* %4, i32 48)
%12 = call i32 @BitsFromByte(i8 zeroext 0, i8* %4, i32 56)
br label %13
13: ; preds = %2, %31
%14 = phi i64 [ 0, %2 ], [ %32, %31 ]
%15 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = trunc i64 %14 to i32
%20 = and i32 %19, 2147483623
%21 = icmp eq i32 %20, 7
%22 = and i32 %19, 2147483639
%23 = icmp eq i32 %22, 39
%24 = or i1 %23, %21
%25 = icmp eq i64 %14, 55
%26 = select i1 %24, i1 true, i1 %25
%27 = icmp eq i64 %14, 63
%28 = select i1 %26, i1 true, i1 %27
br i1 %28, label %29, label %31
29: ; preds = %13
%30 = call i32 @putchar(i32 10)
br label %31
31: ; preds = %29, %13
%32 = add nuw nsw i64 %14, 1
%33 = icmp eq i64 %32, 64
br i1 %33, label %34, label %13
34: ; preds = %31
%35 = call i32 @putchar(i32 10)
ret i32 0
}