#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*/ each_byte(unsigned char);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_byte(unsigned char *c) {
  fprintf(stderr, "+---+---+---+  Bit  +---+---+---+\n");
  fprintf(stderr, "| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |\n");
  fprintf(stderr, "+---+---+---+ Value +---+---+---+\n");
  each_byte(c[0]);
  each_byte(c[1]);
  fprintf(stderr, "+---+---+---+---+---+---+---+---+\n\n");
}


x86 assembly (clang, -O0):
<print_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1040 <each_byte@plt>
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%edi
call   1040 <each_byte@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_byte>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xef0(%rip),%rsi
call   1030 <fprintf@plt>
movzbl (%rbx),%edi
call   1040 <each_byte@plt>
movzbl 0x1(%rbx),%edi
call   1040 <each_byte@plt>
mov    (%r14),%edi
lea    0xef3(%rip),%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"+---+---+---+ Bit +---+---+---+\0A\00"
@.str.1 = [35 x i8] c"| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |\0A\00"
@.str.2 = [35 x i8] c"+---+---+---+ Value +---+---+---+\0A\00"
@.str.3 = [36 x i8] c"+---+---+---+---+---+---+---+---+\0A\0A\00"
define void @print_byte(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = call i32 @each_byte(i8 zeroext %11)
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = load i8, i8* %14
%16 = call i32 @each_byte(i8 zeroext %15)
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
ret void
}

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