#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*/ outnum(int, int);
int /*<<< orphan*/ printf(char *, ...);
void byte(int val, int 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    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x62,-0x8(%rbp)
jne    1158 <byte+0x38>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x7,%esi
call   1030 <outnum@plt>
jmp    1269 <byte+0x149>
cmpl   $0x0,-0x4(%rbp)
jne    1175 <byte+0x55>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1269 <byte+0x149>
cmpl   $0x8,-0x4(%rbp)
jne    1192 <byte+0x72>
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1264 <byte+0x144>
cmpl   $0xc,-0x4(%rbp)
jne    11af <byte+0x8f>
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    125f <byte+0x13f>
cmpl   $0xa,-0x4(%rbp)
jne    11cc <byte+0xac>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    125a <byte+0x13a>
cmpl   $0xd,-0x4(%rbp)
jne    11e9 <byte+0xc9>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1255 <byte+0x135>
cmpl   $0x9,-0x4(%rbp)
jne    1206 <byte+0xe6>
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1250 <byte+0x130>
cmpl   $0x20,-0x4(%rbp)
jl     1230 <byte+0x110>
cmpl   $0x7f,-0x4(%rbp)
jge    1230 <byte+0x110>
mov    -0x4(%rbp),%esi
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    124b <byte+0x12b>
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x7,%esi
call   1030 <outnum@plt>
jmp    1250 <byte+0x130>
jmp    1255 <byte+0x135>
jmp    125a <byte+0x13a>
jmp    125f <byte+0x13f>
jmp    1264 <byte+0x144>
jmp    1269 <byte+0x149>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<byte>:
push   %rbx
mov    %edi,%ebx
cmp    $0x62,%esi
jne    114f <byte+0x1f>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
mov    $0x7,%esi
pop    %rbx
jmp    1040 <outnum@plt>
cmp    $0xd,%ebx
ja     116f <byte+0x3f>
mov    %ebx,%eax
lea    0xea3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xecb(%rip),%rdi
jmp    11b3 <byte+0x83>
lea    -0x20(%rbx),%eax
cmp    $0x5e,%eax
ja     1138 <byte+0x8>
lea    0xed8(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1050 <printf@plt>
lea    0xec2(%rip),%rdi
jmp    11b3 <byte+0x83>
lea    0xeb4(%rip),%rdi
jmp    11b3 <byte+0x83>
lea    0xe9c(%rip),%rdi
jmp    11b3 <byte+0x83>
lea    0xe9d(%rip),%rdi
jmp    11b3 <byte+0x83>
lea    0xe8f(%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 i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 98
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %3
%10 = call i32 @outnum(i32 %9, i32 7)
br label %60
11: ; preds = %2
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %60
16: ; preds = %11
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 8
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %59
21: ; preds = %16
%22 = load i32, i32* %3
%23 = icmp eq i32 %22, 12
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %58
26: ; preds = %21
%27 = load i32, i32* %3
%28 = icmp eq i32 %27, 10
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %57
31: ; preds = %26
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 13
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %56
36: ; preds = %31
%37 = load i32, i32* %3
%38 = icmp eq i32 %37, 9
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %55
41: ; preds = %36
%42 = load i32, i32* %3
%43 = icmp sge i32 %42, 32
br i1 %43, label %44, label %50
44: ; preds = %41
%45 = load i32, i32* %3
%46 = icmp slt i32 %45, 127
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = load i32, i32* %3
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 %48)
br label %54
50: ; preds = %44, %41
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%52 = load i32, i32* %3
%53 = call i32 @outnum(i32 %52, i32 7)
br label %54
54: ; preds = %50, %47
br label %55
55: ; preds = %54, %39
br label %56
56: ; preds = %55, %34
br label %57
57: ; preds = %56, %29
br label %58
58: ; preds = %57, %24
br label %59
59: ; preds = %58, %19
br label %60
60: ; preds = %7, %59, %14
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 = icmp eq i32 %1, 98
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @putchar(i32 32)
%6 = tail call i32 @outnum(i32 %0, i32 7)
br label %28
7: ; preds = %2
switch i32 %0, label %20 [
i32 0, label %8
i32 8, label %10
i32 12, label %12
i32 10, label %14
i32 13, label %16
i32 9, label %18
]
8: ; preds = %7
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %28
10: ; preds = %7
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %28
12: ; preds = %7
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %28
14: ; preds = %7
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %28
16: ; preds = %7
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %28
18: ; preds = %7
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %28
20: ; preds = %7
%21 = add i32 %0, -32
%22 = icmp ult i32 %21, 95
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = 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 %28
25: ; preds = %20
%26 = tail call i32 @putchar(i32 32)
%27 = tail call i32 @outnum(i32 %0, i32 7)
br label %28
28: ; preds = %10, %14, %18, %25, %23, %16, %12, %4, %8
ret void
}