#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*/ fputs_unlocked(char *, int /*<<< orphan*/);
int /*<<< orphan*/ putchar_unlocked(int);
int /*<<< orphan*/ stdout;
void put_string_char(int c) {
  switch (c) {
  case '\b':
    fputs_unlocked("\\b", stdout);
    break;
  case '\f':
    fputs_unlocked("\\f", stdout);
    break;
  case '\n':
    fputs_unlocked("\\n", stdout);
    break;
  case '\r':
    fputs_unlocked("\\r", stdout);
    break;
  case '\t':
    fputs_unlocked("\\t", stdout);
    break;
  case '"':
  case '\\':
    putchar_unlocked('\\');
  default:
    putchar_unlocked(c);
  }
}


x86 assembly (clang, -O0):
<put_string_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x8,%eax
je     11a5 <put_string_char+0x85>
jmp    113f <put_string_char+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x9,%eax
je     120d <put_string_char+0xed>
jmp    1150 <put_string_char+0x30>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
je     11d9 <put_string_char+0xb9>
jmp    1161 <put_string_char+0x41>
mov    -0x8(%rbp),%eax
sub    $0xc,%eax
je     11bf <put_string_char+0x9f>
jmp    1172 <put_string_char+0x52>
mov    -0x8(%rbp),%eax
sub    $0xd,%eax
je     11f3 <put_string_char+0xd3>
jmp    1183 <put_string_char+0x63>
mov    -0x8(%rbp),%eax
sub    $0x22,%eax
je     1227 <put_string_char+0x107>
jmp    1194 <put_string_char+0x74>
mov    -0x8(%rbp),%eax
sub    $0x5c,%eax
je     1227 <put_string_char+0x107>
jmp    1231 <put_string_char+0x111>
mov    0x2e34(%rip),%rax
mov    (%rax),%esi
lea    0xe4b(%rip),%rdi
call   1030 <fputs_unlocked@plt>
jmp    1239 <put_string_char+0x119>
mov    0x2e1a(%rip),%rax
mov    (%rax),%esi
lea    0xe34(%rip),%rdi
call   1030 <fputs_unlocked@plt>
jmp    1239 <put_string_char+0x119>
mov    0x2e00(%rip),%rax
mov    (%rax),%esi
lea    0xe1d(%rip),%rdi
call   1030 <fputs_unlocked@plt>
jmp    1239 <put_string_char+0x119>
mov    0x2de6(%rip),%rax
mov    (%rax),%esi
lea    0xe06(%rip),%rdi
call   1030 <fputs_unlocked@plt>
jmp    1239 <put_string_char+0x119>
mov    0x2dcc(%rip),%rax
mov    (%rax),%esi
lea    0xdef(%rip),%rdi
call   1030 <fputs_unlocked@plt>
jmp    1239 <put_string_char+0x119>
mov    $0x5c,%edi
call   1040 <putchar_unlocked@plt>
mov    -0x4(%rbp),%edi
call   1040 <putchar_unlocked@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_string_char>:
push   %rbx
mov    %edi,%ebx
lea    -0x8(%rbx),%eax
cmp    $0x1a,%eax
ja     1151 <put_string_char+0x31>
lea    0xece(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
lea    0xf21(%rip),%rdi
pop    %rbx
jmp    1030 <fputs_unlocked@plt>
cmp    $0x5c,%ebx
jne    1160 <put_string_char+0x40>
mov    $0x5c,%edi
call   1040 <putchar_unlocked@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <putchar_unlocked@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%esi
lea    0xf00(%rip),%rdi
pop    %rbx
jmp    1030 <fputs_unlocked@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%esi
lea    0xee4(%rip),%rdi
pop    %rbx
jmp    1030 <fputs_unlocked@plt>
mov    0x2e45(%rip),%rax
mov    (%rax),%esi
lea    0xecb(%rip),%rdi
pop    %rbx
jmp    1030 <fputs_unlocked@plt>
mov    0x2e2f(%rip),%rax
mov    (%rax),%esi
lea    0xebb(%rip),%rdi
pop    %rbx
jmp    1030 <fputs_unlocked@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\\b\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"\\f\00"
@.str.2 = [3 x i8] c"\\n\00"
@.str.3 = [3 x i8] c"\\r\00"
@.str.4 = [3 x i8] c"\\t\00"
define void @put_string_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %21 [
i32 8, label %4
i32 12, label %7
i32 10, label %10
i32 13, label %13
i32 9, label %16
i32 34, label %19
i32 92, label %19
]
4: ; preds = %1
%5 = load i32, i32* @stdout
%6 = call i32 @fputs_unlocked(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %24
7: ; preds = %1
%8 = load i32, i32* @stdout
%9 = call i32 @fputs_unlocked(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %24
10: ; preds = %1
%11 = load i32, i32* @stdout
%12 = call i32 @fputs_unlocked(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %11)
br label %24
13: ; preds = %1
%14 = load i32, i32* @stdout
%15 = call i32 @fputs_unlocked(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %14)
br label %24
16: ; preds = %1
%17 = load i32, i32* @stdout
%18 = call i32 @fputs_unlocked(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %17)
br label %24
19: ; preds = %1, %1
%20 = call i32 @putchar_unlocked(i32 92)
br label %21
21: ; preds = %1, %19
%22 = load i32, i32* %2
%23 = call i32 @putchar_unlocked(i32 %22)
br label %24
24: ; preds = %21, %16, %13, %10, %7, %4
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\\b\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"\\f\00"
@.str.2 = [3 x i8] c"\\n\00"
@.str.3 = [3 x i8] c"\\r\00"
@.str.4 = [3 x i8] c"\\t\00"
define void @put_string_char(i32 %0) {
switch i32 %0, label %19 [
i32 8, label %2
i32 12, label %5
i32 10, label %8
i32 13, label %11
i32 9, label %14
i32 34, label %17
i32 92, label %17
]
2: ; preds = %1
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs_unlocked(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %21
5: ; preds = %1
%6 = load i32, i32* @stdout
%7 = tail call i32 @fputs_unlocked(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %21
8: ; preds = %1
%9 = load i32, i32* @stdout
%10 = tail call i32 @fputs_unlocked(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %9)
br label %21
11: ; preds = %1
%12 = load i32, i32* @stdout
%13 = tail call i32 @fputs_unlocked(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %12)
br label %21
14: ; preds = %1
%15 = load i32, i32* @stdout
%16 = tail call i32 @fputs_unlocked(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %15)
br label %21
17: ; preds = %1, %1
%18 = tail call i32 @putchar_unlocked(i32 92)
br label %19
19: ; preds = %1, %17
%20 = tail call i32 @putchar_unlocked(i32 %0)
br label %21
21: ; preds = %19, %14, %11, %8, %5, %2
ret void
}