#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 *, char *, int);
int main(int argc, char *argv[]) {
  char bitmap[8 + 1];
  int i, j;
  bitmap[8] = '\0';
  for (i = 0; i < (1 << 8); i++) {
    for (j = 0; j < 8; j++) {
      bitmap[(8 - 1) - j] = (0 == (i & (1 << j))) ? '0' : '1';
    }
    printf("#define _BINARY_BITMAP_%s 0x%02xU\n", bitmap, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x100,-0x20(%rbp)
jge    11ae <main+0x9e>
movl   $0x0,-0x24(%rbp)
cmpl   $0x8,-0x24(%rbp)
jge    118d <main+0x7d>
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    %eax,%esi
xor    %edx,%edx
mov    $0x31,%eax
mov    $0x30,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
mov    %al,%cl
mov    $0x7,%eax
sub    -0x24(%rbp),%eax
cltq
mov    %cl,-0x19(%rbp,%rax,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1145 <main+0x35>
lea    -0x19(%rbp),%rsi
mov    -0x20(%rbp),%edx
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1131 <main+0x21>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
movb   $0x0,0x17(%rsp)
xor    %ebp,%ebp
lea    0xef8(%rip),%r14
lea    0xf(%rsp),%r15
nopl   (%rax)
movd   %ebp,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqa %xmm0,%xmm1
pand   0xebb(%rip),%xmm1
pand   0xec3(%rip),%xmm0
pxor   %xmm2,%xmm2
pcmpeqd %xmm2,%xmm0
pcmpeqd %xmm2,%xmm1
packssdw %xmm0,%xmm1
packsswb %xmm1,%xmm1
pmovmskb %xmm1,%eax
mov    %eax,%esi
and    $0x2,%sil
shr    %sil
mov    %eax,%edi
and    $0x4,%dil
shr    $0x2,%dil
mov    %eax,%r8d
and    $0x8,%r8b
shr    $0x3,%r8b
mov    %eax,%r9d
and    $0x10,%r9b
shr    $0x4,%r9b
mov    %eax,%edx
and    $0x20,%dl
shr    $0x5,%dl
mov    %eax,%ebx
and    $0x40,%bl
shr    $0x6,%bl
mov    %eax,%ecx
sar    $0x7,%cl
add    $0x31,%cl
mov    %cl,0x16(%rsp)
xor    $0x31,%bl
mov    %bl,0x15(%rsp)
xor    $0x31,%dl
mov    %dl,0x14(%rsp)
xor    $0x31,%r9b
mov    %r9b,0x13(%rsp)
xor    $0x31,%r8b
mov    %r8b,0x12(%rsp)
xor    $0x31,%dil
mov    %dil,0x11(%rsp)
xor    $0x31,%sil
mov    %sil,0x10(%rsp)
and    $0x1,%al
xor    $0x31,%al
mov    %al,0xf(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x100,%ebp
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"#define _BINARY_BITMAP_%s 0x%02xU\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [9 x i8]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = getelementptr inbounds [9 x i8], [9 x i8]* %6, i64 0, i64 8
store i8 0, i8* %9
store i32 0, i32* %7
br label %10
10: ; preds = %37, %2
%11 = load i32, i32* %7
%12 = icmp slt i32 %11, 256
br i1 %12, label %13, label %40
13: ; preds = %10
store i32 0, i32* %8
br label %14
14: ; preds = %30, %13
%15 = load i32, i32* %8
%16 = icmp slt i32 %15, 8
br i1 %16, label %17, label %33
17: ; preds = %14
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = shl i32 1, %19
%21 = and i32 %18, %20
%22 = icmp eq i32 0, %21
%23 = zext i1 %22 to i64
%24 = select i1 %22, i32 48, i32 49
%25 = trunc i32 %24 to i8
%26 = load i32, i32* %8
%27 = sub nsw i32 7, %26
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [9 x i8], [9 x i8]* %6, i64 0, i64 %28
store i8 %25, i8* %29
br label %30
30: ; preds = %17
%31 = load i32, i32* %8
%32 = add nsw i32 %31, 1
store i32 %32, i32* %8
br label %14
33: ; preds = %14
%34 = getelementptr inbounds [9 x i8], [9 x i8]* %6, i64 0, i64 0
%35 = load i32, i32* %7
%36 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %34, i32 %35)
br label %37
37: ; preds = %33
%38 = load i32, i32* %7
%39 = add nsw i32 %38, 1
store i32 %39, i32* %7
br label %10
40: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"#define _BINARY_BITMAP_%s 0x%02xU\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [9 x i8]
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 8
store i8 0, i8* %5
%6 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 7
%7 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 6
%8 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 5
%9 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 4
%10 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 3
%11 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 2
%12 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 1
br label %13
13: ; preds = %2, %13
%14 = phi i32 [ 0, %2 ], [ %36, %13 ]
%15 = insertelement <8 x i32> poison, i32 %14, i64 0
%16 = shufflevector <8 x i32> %15, <8 x i32> poison, <8 x i32> zeroinitializer
%17 = and <8 x i32> %16, <i32 128, i32 64, i32 32, i32 16, i32 8, i32 4, i32 2, i32 1>
%18 = icmp eq <8 x i32> %17, zeroinitializer
%19 = extractelement <8 x i1> %18, i64 7
%20 = select i1 %19, i8 48, i8 49
store i8 %20, i8* %6
%21 = extractelement <8 x i1> %18, i64 6
%22 = select i1 %21, i8 48, i8 49
store i8 %22, i8* %7
%23 = extractelement <8 x i1> %18, i64 5
%24 = select i1 %23, i8 48, i8 49
store i8 %24, i8* %8
%25 = extractelement <8 x i1> %18, i64 4
%26 = select i1 %25, i8 48, i8 49
store i8 %26, i8* %9
%27 = extractelement <8 x i1> %18, i64 3
%28 = select i1 %27, i8 48, i8 49
store i8 %28, i8* %10
%29 = extractelement <8 x i1> %18, i64 2
%30 = select i1 %29, i8 48, i8 49
store i8 %30, i8* %11
%31 = extractelement <8 x i1> %18, i64 1
%32 = select i1 %31, i8 48, i8 49
store i8 %32, i8* %12
%33 = extractelement <8 x i1> %18, i64 0
%34 = select i1 %33, i8 48, i8 49
store i8 %34, i8* %4
%35 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %14)
%36 = add nuw nsw i32 %14, 1
%37 = icmp eq i32 %36, 256
br i1 %37, label %38, label %13
38: ; preds = %13
ret i32 0
}