void byte(val, c) int val;
char c;
{
  if (c == 'b') {
    printf(" ");
    outnum(val, 7);
    return;
  }
  if (val == 0)
    printf("  \\0");
  else if (val == '\b')
    printf("  \\b");
  else if (val == '\f')
    printf("  \\f");
  else if (val == '\n')
    printf("  \\n");
  else if (val == '\r')
    printf("  \\r");
  else if (val == '\t')
    printf("  \\t");
  else if (val >= ' ' && val < 0177)
    printf("   %c", val);
  else {
    printf(" ");
    outnum(val, 7);
  }
}


x86 assembly (clang, -O0):
<byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x62,%eax
jne    1160 <byte+0x40>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x7,%esi
mov    $0x0,%al
call   1030 <outnum@plt>
jmp    1273 <byte+0x153>
cmpl   $0x0,-0x4(%rbp)
jne    117d <byte+0x5d>
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1273 <byte+0x153>
cmpl   $0x8,-0x4(%rbp)
jne    119a <byte+0x7a>
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    126e <byte+0x14e>
cmpl   $0xc,-0x4(%rbp)
jne    11b7 <byte+0x97>
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1269 <byte+0x149>
cmpl   $0xa,-0x4(%rbp)
jne    11d4 <byte+0xb4>
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1264 <byte+0x144>
cmpl   $0xd,-0x4(%rbp)
jne    11f1 <byte+0xd1>
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    125f <byte+0x13f>
cmpl   $0x9,-0x4(%rbp)
jne    120e <byte+0xee>
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    125a <byte+0x13a>
cmpl   $0x20,-0x4(%rbp)
jl     1238 <byte+0x118>
cmpl   $0x7f,-0x4(%rbp)
jge    1238 <byte+0x118>
mov    -0x4(%rbp),%esi
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1255 <byte+0x135>
lea    0xdc1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x7,%esi
mov    $0x0,%al
call   1030 <outnum@plt>
jmp    125a <byte+0x13a>
jmp    125f <byte+0x13f>
jmp    1264 <byte+0x144>
jmp    1269 <byte+0x149>
jmp    126e <byte+0x14e>
jmp    1273 <byte+0x153>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<byte>:
push   %rbx
mov    %edi,%ebx
cmp    $0x62,%sil
jne    1152 <byte+0x22>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
mov    $0x7,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <outnum@plt>
cmp    $0xd,%ebx
ja     1172 <byte+0x42>
mov    %ebx,%eax
lea    0xea0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xec8(%rip),%rdi
jmp    11b6 <byte+0x86>
lea    -0x20(%rbx),%eax
cmp    $0x5e,%eax
ja     1139 <byte+0x9>
lea    0xed5(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1050 <printf@plt>
lea    0xebf(%rip),%rdi
jmp    11b6 <byte+0x86>
lea    0xeb1(%rip),%rdi
jmp    11b6 <byte+0x86>
lea    0xe99(%rip),%rdi
jmp    11b6 <byte+0x86>
lea    0xe9a(%rip),%rdi
jmp    11b6 <byte+0x86>
lea    0xe8c(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [5 x i8] c" \\0\00"
@.str.2 = [5 x i8] c" \\b\00"
@.str.3 = [5 x i8] c" \\f\00"
@.str.4 = [5 x i8] c" \\n\00"
@.str.5 = [5 x i8] c" \\r\00"
@.str.6 = [5 x i8] c" \\t\00"
@.str.7 = [6 x i8] c" %c\00"
define void @byte(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8
%5 = trunc i32 %1 to i8
store i32 %0, i32* %3
store i8 %5, i8* %4
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 98
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* %3
%12 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outnum to i32 (i32, i32, ...)*)(i32 %11, i32 7)
br label %62
13: ; preds = %2
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %62
18: ; preds = %13
%19 = load i32, i32* %3
%20 = icmp eq i32 %19, 8
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %61
23: ; preds = %18
%24 = load i32, i32* %3
%25 = icmp eq i32 %24, 12
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %60
28: ; preds = %23
%29 = load i32, i32* %3
%30 = icmp eq i32 %29, 10
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %59
33: ; preds = %28
%34 = load i32, i32* %3
%35 = icmp eq i32 %34, 13
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %58
38: ; preds = %33
%39 = load i32, i32* %3
%40 = icmp eq i32 %39, 9
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %57
43: ; preds = %38
%44 = load i32, i32* %3
%45 = icmp sge i32 %44, 32
br i1 %45, label %46, label %52
46: ; preds = %43
%47 = load i32, i32* %3
%48 = icmp slt i32 %47, 127
br i1 %48, label %49, label %52
49: ; preds = %46
%50 = load i32, i32* %3
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 %50)
br label %56
52: ; preds = %46, %43
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%54 = load i32, i32* %3
%55 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outnum to i32 (i32, i32, ...)*)(i32 %54, i32 7)
br label %56
56: ; preds = %52, %49
br label %57
57: ; preds = %56, %41
br label %58
58: ; preds = %57, %36
br label %59
59: ; preds = %58, %31
br label %60
60: ; preds = %59, %26
br label %61
61: ; preds = %60, %21
br label %62
62: ; preds = %9, %61, %16
ret void
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c" \\0\00"
@.str.2 = [5 x i8] c" \\b\00"
@.str.3 = [5 x i8] c" \\f\00"
@.str.4 = [5 x i8] c" \\n\00"
@.str.5 = [5 x i8] c" \\r\00"
@.str.6 = [5 x i8] c" \\t\00"
@.str.7 = [6 x i8] c" %c\00"
define void @byte(i32 %0, i32 %1) {
%3 = and i32 %1, 255
%4 = icmp eq i32 %3, 98
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @putchar(i32 32)
%7 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outnum to i32 (i32, i32, ...)*)(i32 %0, i32 7)
br label %29
8: ; preds = %2
switch i32 %0, label %21 [
i32 0, label %9
i32 8, label %11
i32 12, label %13
i32 10, label %15
i32 13, label %17
i32 9, label %19
]
9: ; preds = %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %29
11: ; preds = %8
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %29
13: ; preds = %8
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %29
15: ; preds = %8
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %29
17: ; preds = %8
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %29
19: ; preds = %8
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %29
21: ; preds = %8
%22 = add i32 %0, -32
%23 = icmp ult i32 %22, 95
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 %0)
br label %29
26: ; preds = %21
%27 = tail call i32 @putchar(i32 32)
%28 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outnum to i32 (i32, i32, ...)*)(i32 %0, i32 7)
br label %29
29: ; preds = %11, %15, %19, %26, %24, %17, %13, %5, %9
ret void
}