#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*/ write(int, char *, int);
void draw_symb(char symb, int l_s) {
  if (symb > 31) {
    write(1, " ", 1);
    write(1, &symb, 1);
  } else {
    if (symb == '\010')
      write(1, "\\b", 2);
    else if (symb == '\014')
      write(1, "\\f", 2);
    else if (symb == '\012')
      write(1, "\\n", 2);
    else if (symb == '\015')
      write(1, "\\r", 2);
    else if (symb == '\011')
      write(1, "\\t", 2);
    else if (symb == '\040')
      write(1, "\\s", 2);
    else
      write(1, " ", 1);
  }
  if (l_s)
    write(1, " ", 1);
}


x86 assembly (clang, -O0):
<draw_symb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x1f,%eax
jle    1156 <draw_symb+0x46>
mov    $0x1,%edx
lea    0xec6(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    $0x1,%edx
lea    -0x1(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
jmp    1277 <draw_symb+0x167>
movsbl -0x1(%rbp),%eax
cmp    $0x8,%eax
jne    117e <draw_symb+0x6e>
mov    $0x1,%edi
lea    0xe93(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
jmp    1272 <draw_symb+0x162>
movsbl -0x1(%rbp),%eax
cmp    $0xc,%eax
jne    11a6 <draw_symb+0x96>
mov    $0x1,%edi
lea    0xe6e(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
jmp    126d <draw_symb+0x15d>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    11ce <draw_symb+0xbe>
mov    $0x1,%edi
lea    0xe49(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
jmp    1268 <draw_symb+0x158>
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
jne    11f6 <draw_symb+0xe6>
mov    $0x1,%edi
lea    0xe24(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
jmp    1263 <draw_symb+0x153>
movsbl -0x1(%rbp),%eax
cmp    $0x9,%eax
jne    121e <draw_symb+0x10e>
mov    $0x1,%edi
lea    0xdff(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
jmp    125e <draw_symb+0x14e>
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
jne    1246 <draw_symb+0x136>
mov    $0x1,%edi
lea    0xdda(%rip),%rsi
mov    $0x2,%edx
call   1030 <write@plt>
jmp    1259 <draw_symb+0x149>
mov    $0x1,%edx
lea    0xdae(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
jmp    125e <draw_symb+0x14e>
jmp    1263 <draw_symb+0x153>
jmp    1268 <draw_symb+0x158>
jmp    126d <draw_symb+0x15d>
jmp    1272 <draw_symb+0x162>
jmp    1277 <draw_symb+0x167>
cmpl   $0x0,-0x8(%rbp)
je     1294 <draw_symb+0x184>
mov    $0x1,%edx
lea    0xd73(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_symb>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %dil,0xf(%rsp)
cmp    $0x20,%dil
jl     1149 <draw_symb+0x39>
lea    0xeef(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
lea    0xf(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
jmp    11a5 <draw_symb+0x95>
add    $0xf8,%dil
cmp    $0x5,%dil
ja     1182 <draw_symb+0x72>
movzbl %dil,%eax
lea    0xea2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeac(%rip),%rsi
jmp    119b <draw_symb+0x8b>
lea    0xeaf(%rip),%rsi
jmp    119b <draw_symb+0x8b>
lea    0xea0(%rip),%rsi
jmp    119b <draw_symb+0x8b>
lea    0xe8f(%rip),%rsi
jmp    113d <draw_symb+0x2d>
lea    0xe8b(%rip),%rsi
jmp    119b <draw_symb+0x8b>
lea    0xe88(%rip),%rsi
mov    $0x1,%edi
mov    $0x2,%edx
call   1030 <write@plt>
test   %ebx,%ebx
je     11c9 <draw_symb+0xb9>
lea    0xe63(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
add    $0x10,%rsp
pop    %rbx
jmp    1030 <write@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [3 x i8] c"\\b\00"
@.str.2 = [3 x i8] c"\\f\00"
@.str.3 = [3 x i8] c"\\n\00"
@.str.4 = [3 x i8] c"\\r\00"
@.str.5 = [3 x i8] c"\\t\00"
define void @draw_symb(i8 signext %0, i32 %1) {
%3 = alloca i8
store i8 %0, i8* %3
%4 = icmp sgt i8 %0, 31
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%7 = call i32 @write(i32 1, i8* %3, i32 1)
br label %21
8: ; preds = %2
switch i8 %0, label %19 [
i8 8, label %9
i8 12, label %11
i8 10, label %13
i8 13, label %15
i8 9, label %17
]
9: ; preds = %8
%10 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
br label %21
11: ; preds = %8
%12 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2)
br label %21
13: ; preds = %8
%14 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 2)
br label %21
15: ; preds = %8
%16 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 2)
br label %21
17: ; preds = %8
%18 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 2)
br label %21
19: ; preds = %8
%20 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
br label %21
21: ; preds = %9, %13, %17, %19, %15, %11, %5
%22 = icmp eq i32 %1, 0
br i1 %22, label %25, label %23
23: ; preds = %21
%24 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
br label %25
25: ; preds = %23, %21
ret void
}