#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 */
scalar_t__ isalnum(char);
int qEscaped(char c) {
  if (isalnum(c))
    return c == 'Q';
  else
    return c != '_' && c != '-' && c != '/' && c != '.';
}


x86 assembly (clang, -O0):
<qEscaped>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
je     1148 <qEscaped+0x38>
movsbl -0x5(%rbp),%eax
cmp    $0x51,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1196 <qEscaped+0x86>
movsbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0x5f,%ecx
mov    %al,-0x6(%rbp)
je     118b <qEscaped+0x7b>
movsbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x6(%rbp)
je     118b <qEscaped+0x7b>
movsbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0x2f,%ecx
mov    %al,-0x6(%rbp)
je     118b <qEscaped+0x7b>
movsbl -0x5(%rbp),%eax
cmp    $0x2e,%eax
setne  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qEscaped>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
je     1127 <qEscaped+0x17>
xor    %eax,%eax
cmp    $0x51,%bl
sete   %al
pop    %rbx
ret
lea    -0x2d(%rbx),%ecx
cmp    $0x32,%cl
ja     1146 <qEscaped+0x36>
xor    %eax,%eax
movzbl %cl,%ecx
movabs $0x4000000000007,%rdx
bt     %rcx,%rdx
jae    1146 <qEscaped+0x36>
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @qEscaped(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isalnum(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 81
%11 = zext i1 %10 to i32
store i32 %11, i32* %2
br label %31
12: ; preds = %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 95
br i1 %15, label %16, label %28
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 45
br i1 %19, label %20, label %28
20: ; preds = %16
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 47
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %26, 46
br label %28
28: ; preds = %24, %20, %16, %12
%29 = phi i1 [ false, %20 ], [ false, %16 ], [ false, %12 ], [ %27, %24 ]
%30 = zext i1 %29 to i32
store i32 %30, i32* %2
br label %31
31: ; preds = %28, %7
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @qEscaped(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = icmp eq i8 %0, 81
%6 = zext i1 %5 to i32
br label %9
7: ; preds = %1
switch i8 %0, label %8 [
i8 95, label %9
i8 47, label %9
i8 45, label %9
i8 46, label %9
]
8: ; preds = %7
br label %9
9: ; preds = %7, %7, %7, %7, %8, %4
%10 = phi i32 [ %6, %4 ], [ 0, %7 ], [ 1, %8 ], [ 0, %7 ], [ 0, %7 ], [ 0, %7 ]
ret i32 %10
}