#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 *, ...);
void uc_inspect_character(char c) {
  switch (c) {
  case '\n':
    printf("\\n");
    return;
  case '\t':
    printf("\\t");
    return;
  case '\r':
    printf("\\r");
    return;
  default:
    printf("%c", c);
    return;
  }
}


x86 assembly (clang, -O0):
<uc_inspect_character>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x9,%eax
je     1168 <uc_inspect_character+0x58>
jmp    1133 <uc_inspect_character+0x23>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
je     1155 <uc_inspect_character+0x45>
jmp    1144 <uc_inspect_character+0x34>
mov    -0x8(%rbp),%eax
sub    $0xd,%eax
je     117b <uc_inspect_character+0x6b>
jmp    118e <uc_inspect_character+0x7e>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a0 <uc_inspect_character+0x90>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a0 <uc_inspect_character+0x90>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a0 <uc_inspect_character+0x90>
movsbl -0x1(%rbp),%esi
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uc_inspect_character>:
cmp    $0x9,%edi
je     113d <uc_inspect_character+0x1d>
cmp    $0xd,%edi
je     114b <uc_inspect_character+0x2b>
cmp    $0xa,%edi
jne    1159 <uc_inspect_character+0x39>
lea    0xeca(%rip),%rdi
xor    %eax,%eax
jmp    1040 <printf@plt>
lea    0xebf(%rip),%rdi
xor    %eax,%eax
jmp    1040 <printf@plt>
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
jmp    1040 <printf@plt>
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\\n\00"
@.str.1 = [3 x i8] c"\\t\00"
@.str.2 = [3 x i8] c"\\r\00"
@.str.3 = [3 x i8] c"%c\00"
define void @uc_inspect_character(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %11 [
i32 10, label %5
i32 9, label %7
i32 13, label %9
]
5: ; preds = %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %15
7: ; preds = %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %15
9: ; preds = %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %15
11: ; preds = %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %11, %9, %7, %5
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\\n\00"
@.str.1 = [3 x i8] c"\\t\00"
@.str.2 = [3 x i8] c"\\r\00"
define void @uc_inspect_character(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %9 [
i32 10, label %3
i32 9, label %5
i32 13, label %7
]
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %11
5: ; preds = %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %11
7: ; preds = %1
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %11
9: ; preds = %1
%10 = tail call i32 @putchar(i32 %2)
br label %11
11: ; preds = %9, %7, %5, %3
ret void
}