#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*/ putchar(int);
int explicit_escape_sequence(int c) {
  if (c == '\t') {
    putchar('\\');
    putchar('t');
  } else if (c == '\b') {
    putchar('\\');
    putchar('b');
  } else if (c == '\\') {
    putchar('\\');
    putchar('\\');
  } else {
    putchar(c);
  }
}


x86 assembly (clang, -O0):
<explicit_escape_sequence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jne    113e <explicit_escape_sequence+0x2e>
mov    $0x5c,%edi
call   1030 <putchar@plt>
mov    $0x74,%edi
call   1030 <putchar@plt>
jmp    1196 <explicit_escape_sequence+0x86>
cmpl   $0x8,-0x8(%rbp)
jne    1161 <explicit_escape_sequence+0x51>
mov    $0x5c,%edi
call   1030 <putchar@plt>
mov    $0x62,%edi
call   1030 <putchar@plt>
jmp    1191 <explicit_escape_sequence+0x81>
cmpl   $0x5c,-0x8(%rbp)
jne    1184 <explicit_escape_sequence+0x74>
mov    $0x5c,%edi
call   1030 <putchar@plt>
mov    $0x5c,%edi
call   1030 <putchar@plt>
jmp    118c <explicit_escape_sequence+0x7c>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    1191 <explicit_escape_sequence+0x81>
jmp    1196 <explicit_escape_sequence+0x86>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<explicit_escape_sequence>:
push   %rbx
cmp    $0x5c,%edi
je     1129 <explicit_escape_sequence+0x19>
mov    %edi,%ebx
cmp    $0x9,%edi
je     1130 <explicit_escape_sequence+0x20>
cmp    $0x8,%ebx
jne    113f <explicit_escape_sequence+0x2f>
mov    $0x62,%ebx
jmp    1135 <explicit_escape_sequence+0x25>
mov    $0x5c,%ebx
jmp    1135 <explicit_escape_sequence+0x25>
mov    $0x74,%ebx
mov    $0x5c,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define i32 @explicit_escape_sequence(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 9
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @putchar(i32 92)
%8 = call i32 @putchar(i32 116)
br label %26
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 8
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = call i32 @putchar(i32 92)
%14 = call i32 @putchar(i32 98)
br label %25
15: ; preds = %9
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 92
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = call i32 @putchar(i32 92)
%20 = call i32 @putchar(i32 92)
br label %24
21: ; preds = %15
%22 = load i32, i32* %3
%23 = call i32 @putchar(i32 %22)
br label %24
24: ; preds = %21, %18
br label %25
25: ; preds = %24, %12
br label %26
26: ; preds = %25, %6
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @explicit_escape_sequence(i32 %0) {
switch i32 %0, label %7 [
i32 9, label %4
i32 8, label %2
i32 92, label %3
]
2: ; preds = %1
br label %4
3: ; preds = %1
br label %4
4: ; preds = %1, %3, %2
%5 = phi i32 [ 92, %3 ], [ 98, %2 ], [ 116, %1 ]
%6 = tail call i32 @putchar(i32 92)
br label %7
7: ; preds = %4, %1
%8 = phi i32 [ %0, %1 ], [ %5, %4 ]
%9 = tail call i32 @putchar(i32 %8)
ret i32 undef
}