#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*/ put_ch(int);
void putch_ascii(int ch) {
  switch (ch) {
  case ('q' | 0x100):
    ch = '-';
    break;
  case ('x' | 0x100):
    ch = '|';
    break;
  case ('a' | 0x100):
    ch = '#';
    break;
  case ('h' | 0x100):
  case ' ' | 0x100:
    ch = ' ';
    break;
  case ('~' | 0x100):
    ch = '.';
    break;
  case ('-' | 0x100):
    ch = '^';
    break;
  default:
    ch = '+';
  }
  put_ch(ch);
}


x86 assembly (clang, -O0):
<putch_ascii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x120,%eax
je     11c7 <putch_ascii+0xb7>
jmp    1131 <putch_ascii+0x21>
mov    -0x8(%rbp),%eax
sub    $0x12d,%eax
je     11df <putch_ascii+0xcf>
jmp    1144 <putch_ascii+0x34>
mov    -0x8(%rbp),%eax
sub    $0x161,%eax
je     11bb <putch_ascii+0xab>
jmp    1157 <putch_ascii+0x47>
mov    -0x8(%rbp),%eax
sub    $0x168,%eax
je     11c7 <putch_ascii+0xb7>
jmp    116a <putch_ascii+0x5a>
mov    -0x8(%rbp),%eax
sub    $0x171,%eax
je     11a3 <putch_ascii+0x93>
jmp    117d <putch_ascii+0x6d>
mov    -0x8(%rbp),%eax
sub    $0x178,%eax
je     11af <putch_ascii+0x9f>
jmp    1190 <putch_ascii+0x80>
mov    -0x8(%rbp),%eax
sub    $0x17e,%eax
je     11d3 <putch_ascii+0xc3>
jmp    11eb <putch_ascii+0xdb>
movl   $0x2d,-0x4(%rbp)
jmp    11f2 <putch_ascii+0xe2>
movl   $0x7c,-0x4(%rbp)
jmp    11f2 <putch_ascii+0xe2>
movl   $0x23,-0x4(%rbp)
jmp    11f2 <putch_ascii+0xe2>
movl   $0x20,-0x4(%rbp)
jmp    11f2 <putch_ascii+0xe2>
movl   $0x2e,-0x4(%rbp)
jmp    11f2 <putch_ascii+0xe2>
movl   $0x5e,-0x4(%rbp)
jmp    11f2 <putch_ascii+0xe2>
movl   $0x2b,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <put_ch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putch_ascii>:
lea    -0x161(%rdi),%eax
cmp    $0x1d,%eax
ja     113a <putch_ascii+0x2a>
mov    $0x2d,%edi
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x23,%edi
jmp    1030 <put_ch@plt>
cmp    $0x120,%edi
je     1154 <putch_ascii+0x44>
cmp    $0x12d,%edi
jne    115e <putch_ascii+0x4e>
mov    $0x5e,%edi
jmp    1030 <put_ch@plt>
mov    $0x20,%edi
jmp    1030 <put_ch@plt>
mov    $0x2b,%edi
jmp    1030 <put_ch@plt>
mov    $0x7c,%edi
jmp    1030 <put_ch@plt>
mov    $0x2e,%edi
jmp    1030 <put_ch@plt>

LLVM IR (-O0):
define void @putch_ascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %10 [
i32 369, label %4
i32 376, label %5
i32 353, label %6
i32 360, label %7
i32 288, label %7
i32 382, label %8
i32 301, label %9
]
4: ; preds = %1
store i32 45, i32* %2
br label %11
5: ; preds = %1
store i32 124, i32* %2
br label %11
6: ; preds = %1
store i32 35, i32* %2
br label %11
7: ; preds = %1, %1
store i32 32, i32* %2
br label %11
8: ; preds = %1
store i32 46, i32* %2
br label %11
9: ; preds = %1
store i32 94, i32* %2
br label %11
10: ; preds = %1
store i32 43, i32* %2
br label %11
11: ; preds = %10, %9, %8, %7, %6, %5, %4
%12 = load i32, i32* %2
%13 = call i32 @put_ch(i32 %12)
ret void
}

LLVM IR (-O2):
define void @putch_ascii(i32 %0) {
switch i32 %0, label %7 [
i32 369, label %8
i32 376, label %2
i32 353, label %3
i32 360, label %4
i32 288, label %4
i32 382, label %5
i32 301, label %6
]
2: ; preds = %1
br label %8
3: ; preds = %1
br label %8
4: ; preds = %1, %1
br label %8
5: ; preds = %1
br label %8
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %6, %5, %4, %3, %2
%9 = phi i32 [ 43, %7 ], [ 94, %6 ], [ 46, %5 ], [ 32, %4 ], [ 35, %3 ], [ 124, %2 ], [ 45, %1 ]
%10 = tail call i32 @put_ch(i32 %9)
ret void
}