#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*/ list_all();
int /*<<< orphan*/ print_valid_escapes();
int /*<<< orphan*/ report_error(char *, char);
int process_escape(char c) {
  switch (c) {
  case '.':
    return (-2);
  case '#':
    list_all();
    break;
  case '?':
    print_valid_escapes();
    break;
  default:
    report_error("process_escape(): Unknown escape action for character w/hex "
                 "value 0x%02x. Should not be here.",
                 c);
    return (-1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<process_escape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x23,%eax
je     1181 <process_escape+0x51>
jmp    1153 <process_escape+0x23>
mov    -0xc(%rbp),%eax
sub    $0x2e,%eax
je     1175 <process_escape+0x45>
jmp    1164 <process_escape+0x34>
mov    -0xc(%rbp),%eax
sub    $0x3f,%eax
je     118d <process_escape+0x5d>
jmp    1199 <process_escape+0x69>
movl   $0xfffffffe,-0x4(%rbp)
jmp    11bc <process_escape+0x8c>
mov    $0x0,%al
call   1040 <list_all@plt>
jmp    11b5 <process_escape+0x85>
mov    $0x0,%al
call   1050 <print_valid_escapes@plt>
jmp    11b5 <process_escape+0x85>
lea    0xe60(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <report_error@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11bc <process_escape+0x8c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_escape>:
push   %rbx
cmp    $0x3f,%edi
je     114b <process_escape+0x1b>
cmp    $0x2e,%edi
je     1156 <process_escape+0x26>
cmp    $0x23,%edi
jne    115d <process_escape+0x2d>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <list_all@plt>
jmp    1172 <process_escape+0x42>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <print_valid_escapes@plt>
jmp    1172 <process_escape+0x42>
mov    $0xfffffffe,%ebx
jmp    1172 <process_escape+0x42>
movsbl %dil,%esi
lea    0xe98(%rip),%rdi
call   1030 <report_error@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [94 x i8] c"process_escape(): Unknown escape action for character w/hex value 0x%02x. Should not be here.\00"
define i32 @process_escape(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %11 [
i32 46, label %6
i32 35, label %7
i32 63, label %9
]
6: ; preds = %1
store i32 -2, i32* %2
br label %15
7: ; preds = %1
%8 = call i32 (...) @list_all()
br label %14
9: ; preds = %1
%10 = call i32 (...) @print_valid_escapes()
br label %14
11: ; preds = %1
%12 = load i8, i8* %3
%13 = call i32 @report_error(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0), i8 signext %12)
store i32 -1, i32* %2
br label %15
14: ; preds = %9, %7
store i32 0, i32* %2
br label %15
15: ; preds = %14, %11, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@.str = [94 x i8] c"process_escape(): Unknown escape action for character w/hex value 0x%02x. Should not be here.\00"
define i32 @process_escape(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %7 [
i32 46, label %9
i32 35, label %3
i32 63, label %5
]
3: ; preds = %1
%4 = tail call i32 (...) @list_all()
br label %9
5: ; preds = %1
%6 = tail call i32 (...) @print_valid_escapes()
br label %9
7: ; preds = %1
%8 = tail call i32 @report_error(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0), i8 signext %0)
br label %9
9: ; preds = %3, %5, %1, %7
%10 = phi i32 [ -1, %7 ], [ -2, %1 ], [ 0, %5 ], [ 0, %3 ]
ret i32 %10
}