#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*/ fprintf(int /*<<< orphan*/, char *, unsigned char,
                           unsigned char, unsigned char, unsigned char,
                           unsigned char, unsigned char, unsigned char,
                           unsigned char);
int /*<<< orphan*/ stderr;
void each_byte(unsigned char b) {
  unsigned char b0;
  unsigned char b1;
  unsigned char b2;
  unsigned char b3;
  unsigned char b4;
  unsigned char b5;
  unsigned char b6;
  unsigned char b7;
  b0 = b & 0x01;
  b1 = (b >> 1) & 0x01;
  b2 = (b >> 2) & 0x01;
  b3 = (b >> 3) & 0x01;
  b4 = (b >> 4) & 0x01;
  b5 = (b >> 5) & 0x01;
  b6 = (b >> 6) & 0x01;
  b7 = (b >> 7) & 0x01;
  fprintf(stderr, "| %u | %u | %u | %u | %u | %u | %u | %u |\n", b0, b1, b2, b3,
          b4, b5, b6, b7);
}


x86 assembly (clang, -O0):
<each_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x1,%eax
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x1,%eax
and    $0x1,%eax
mov    %al,-0x3(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x2,%eax
and    $0x1,%eax
mov    %al,-0x4(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x3,%eax
and    $0x1,%eax
mov    %al,-0x5(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x4,%eax
and    $0x1,%eax
mov    %al,-0x6(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x5,%eax
and    $0x1,%eax
mov    %al,-0x7(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x6,%eax
and    $0x1,%eax
mov    %al,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x7,%eax
and    $0x1,%eax
mov    %al,-0x9(%rbp)
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
mov    -0x2(%rbp),%dl
mov    -0x3(%rbp),%cl
mov    -0x4(%rbp),%r8b
mov    -0x5(%rbp),%r9b
mov    -0x6(%rbp),%r11b
mov    -0x7(%rbp),%r10b
mov    -0x8(%rbp),%al
lea    0xe54(%rip),%rsi
movzbl %dl,%edx
movzbl %cl,%ecx
movzbl %r8b,%r8d
movzbl %r9b,%r9d
movzbl %r11b,%r11d
mov    %r11d,(%rsp)
movzbl %r10b,%r10d
mov    %r10d,0x8(%rsp)
movzbl %al,%eax
mov    %eax,0x10(%rsp)
movzbl -0x9(%rbp),%eax
mov    %eax,0x18(%rsp)
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<each_byte>:
push   %rbx
mov    %edi,%edx
mov    %edx,%r8d
shr    %r8b
and    $0x1,%r8b
mov    %edx,%esi
shr    $0x2,%sil
and    $0x1,%sil
mov    %edx,%r9d
shr    $0x3,%r9b
and    $0x1,%r9b
mov    %edx,%r10d
shr    $0x4,%r10b
and    $0x1,%r10b
mov    %edx,%eax
shr    $0x5,%al
and    $0x1,%al
mov    %edx,%ecx
shr    $0x6,%cl
and    $0x1,%cl
mov    %edx,%r11d
shr    $0x7,%r11b
mov    0x2e86(%rip),%rdi
mov    (%rdi),%edi
movzbl %r11b,%r11d
movzbl %cl,%ebx
movzbl %al,%eax
movzbl %r10b,%r10d
and    $0x1,%edx
movzbl %r8b,%ecx
movzbl %sil,%r8d
movzbl %r9b,%r9d
lea    0xe80(%rip),%rsi
push   %r11
push   %rbx
push   %rax
push   %r10
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"| %u | %u | %u | %u | %u | %u | %u | %u |\0A\00"
define void @each_byte(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8 %0, i8* %2
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = and i32 %12, 1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %3
%15 = load i8, i8* %2
%16 = zext i8 %15 to i32
%17 = ashr i32 %16, 1
%18 = and i32 %17, 1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %4
%20 = load i8, i8* %2
%21 = zext i8 %20 to i32
%22 = ashr i32 %21, 2
%23 = and i32 %22, 1
%24 = trunc i32 %23 to i8
store i8 %24, i8* %5
%25 = load i8, i8* %2
%26 = zext i8 %25 to i32
%27 = ashr i32 %26, 3
%28 = and i32 %27, 1
%29 = trunc i32 %28 to i8
store i8 %29, i8* %6
%30 = load i8, i8* %2
%31 = zext i8 %30 to i32
%32 = ashr i32 %31, 4
%33 = and i32 %32, 1
%34 = trunc i32 %33 to i8
store i8 %34, i8* %7
%35 = load i8, i8* %2
%36 = zext i8 %35 to i32
%37 = ashr i32 %36, 5
%38 = and i32 %37, 1
%39 = trunc i32 %38 to i8
store i8 %39, i8* %8
%40 = load i8, i8* %2
%41 = zext i8 %40 to i32
%42 = ashr i32 %41, 6
%43 = and i32 %42, 1
%44 = trunc i32 %43 to i8
store i8 %44, i8* %9
%45 = load i8, i8* %2
%46 = zext i8 %45 to i32
%47 = ashr i32 %46, 7
%48 = and i32 %47, 1
%49 = trunc i32 %48 to i8
store i8 %49, i8* %10
%50 = load i32, i32* @stderr
%51 = load i8, i8* %3
%52 = load i8, i8* %4
%53 = load i8, i8* %5
%54 = load i8, i8* %6
%55 = load i8, i8* %7
%56 = load i8, i8* %8
%57 = load i8, i8* %9
%58 = load i8, i8* %10
%59 = call i32 @fprintf(i32 %50, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8 zeroext %51, i8 zeroext %52, i8 zeroext %53, i8 zeroext %54, i8 zeroext %55, i8 zeroext %56, i8 zeroext %57, i8 zeroext %58)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"| %u | %u | %u | %u | %u | %u | %u | %u |\0A\00"
define void @each_byte(i8 zeroext %0) {
%2 = and i8 %0, 1
%3 = lshr i8 %0, 1
%4 = and i8 %3, 1
%5 = lshr i8 %0, 2
%6 = and i8 %5, 1
%7 = lshr i8 %0, 3
%8 = and i8 %7, 1
%9 = lshr i8 %0, 4
%10 = and i8 %9, 1
%11 = lshr i8 %0, 5
%12 = and i8 %11, 1
%13 = lshr i8 %0, 6
%14 = and i8 %13, 1
%15 = lshr i8 %0, 7
%16 = load i32, i32* @stderr
%17 = tail call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8 zeroext %2, i8 zeroext %4, i8 zeroext %6, i8 zeroext %8, i8 zeroext %10, i8 zeroext %12, i8 zeroext %14, i8 zeroext %15)
ret void
}