#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);
void print_t_bin(char content) {
  printf("%d", content & 1);
  printf("%d", (content & 2) >> 1);
  printf("%d", (content & 4) >> 2);
  printf("%d", (content & 8) >> 3);
  printf("%d", (content & 16) >> 4);
  printf("%d", (content & 32) >> 5);
  printf("%d", (content & 64) >> 6);
  printf("%d", (content & 128) >> 7);
}


x86 assembly (clang, -O0):
<print_t_bin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x1,%eax
lea    0xed4(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
movsbl -0x1(%rbp),%eax
and    $0x2,%eax
sar    $0x1,%eax
lea    0xebb(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
movsbl -0x1(%rbp),%eax
and    $0x4,%eax
sar    $0x2,%eax
lea    0xea2(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
movsbl -0x1(%rbp),%eax
and    $0x8,%eax
sar    $0x3,%eax
lea    0xe89(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
movsbl -0x1(%rbp),%eax
and    $0x10,%eax
sar    $0x4,%eax
lea    0xe70(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
movsbl -0x1(%rbp),%eax
and    $0x20,%eax
sar    $0x5,%eax
lea    0xe57(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
movsbl -0x1(%rbp),%eax
and    $0x40,%eax
sar    $0x6,%eax
lea    0xe3e(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
movsbl -0x1(%rbp),%eax
and    $0x80,%eax
sar    $0x7,%eax
lea    0xe23(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_t_bin>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %edi,%esi
and    $0x1,%esi
lea    0xede(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
shr    %al
and    $0x1,%al
movzbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
shr    $0x2,%al
and    $0x1,%al
movzbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
shr    $0x3,%al
and    $0x1,%al
movzbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
shr    $0x4,%al
and    $0x1,%al
movzbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
shr    $0x5,%al
and    $0x1,%al
movzbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
shr    $0x6,%al
and    $0x1,%al
movzbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
shr    $0x7,%bl
movzbl %bl,%esi
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @print_t_bin(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 1
%6 = trunc i32 %5 to i8
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %6)
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = and i32 %9, 2
%11 = ashr i32 %10, 1
%12 = trunc i32 %11 to i8
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %12)
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = and i32 %15, 4
%17 = ashr i32 %16, 2
%18 = trunc i32 %17 to i8
%19 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %18)
%20 = load i8, i8* %2
%21 = sext i8 %20 to i32
%22 = and i32 %21, 8
%23 = ashr i32 %22, 3
%24 = trunc i32 %23 to i8
%25 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %24)
%26 = load i8, i8* %2
%27 = sext i8 %26 to i32
%28 = and i32 %27, 16
%29 = ashr i32 %28, 4
%30 = trunc i32 %29 to i8
%31 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %30)
%32 = load i8, i8* %2
%33 = sext i8 %32 to i32
%34 = and i32 %33, 32
%35 = ashr i32 %34, 5
%36 = trunc i32 %35 to i8
%37 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %36)
%38 = load i8, i8* %2
%39 = sext i8 %38 to i32
%40 = and i32 %39, 64
%41 = ashr i32 %40, 6
%42 = trunc i32 %41 to i8
%43 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %42)
%44 = load i8, i8* %2
%45 = sext i8 %44 to i32
%46 = and i32 %45, 128
%47 = ashr i32 %46, 7
%48 = trunc i32 %47 to i8
%49 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %48)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @print_t_bin(i8 signext %0) {
%2 = and i8 %0, 1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %2)
%4 = lshr i8 %0, 1
%5 = and i8 %4, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %5)
%7 = lshr i8 %0, 2
%8 = and i8 %7, 1
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %8)
%10 = lshr i8 %0, 3
%11 = and i8 %10, 1
%12 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %11)
%13 = lshr i8 %0, 4
%14 = and i8 %13, 1
%15 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %14)
%16 = lshr i8 %0, 5
%17 = and i8 %16, 1
%18 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %17)
%19 = lshr i8 %0, 6
%20 = and i8 %19, 1
%21 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %20)
%22 = lshr i8 %0, 7
%23 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %22)
ret void
}