#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 isSpecialSubsequent(const char *c, char *value) {
  if (c == NULL)
    return 0;
  switch (*c) {
  case '+':
  case '-':
  case '.':
  case '@':
    if (value != NULL)
      *value = *c;
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<isSpecialSubsequent>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1123 <isSpecialSubsequent+0x23>
movl   $0x0,-0x4(%rbp)
jmp    118a <isSpecialSubsequent+0x8a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x2b,%eax
je     1160 <isSpecialSubsequent+0x60>
jmp    113b <isSpecialSubsequent+0x3b>
mov    -0x1c(%rbp),%eax
add    $0xffffffd3,%eax
sub    $0x2,%eax
jb     1160 <isSpecialSubsequent+0x60>
jmp    114f <isSpecialSubsequent+0x4f>
mov    -0x1c(%rbp),%eax
sub    $0x40,%eax
jne    1183 <isSpecialSubsequent+0x83>
jmp    1160 <isSpecialSubsequent+0x60>
cmpq   $0x0,-0x18(%rbp)
je     1177 <isSpecialSubsequent+0x77>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    118a <isSpecialSubsequent+0x8a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSpecialSubsequent>:
xor    %eax,%eax
test   %rdi,%rdi
je     1128 <isSpecialSubsequent+0x28>
movsbl (%rdi),%ecx
lea    -0x2b(%rcx),%edx
cmp    $0x15,%edx
ja     1128 <isSpecialSubsequent+0x28>
mov    $0x20000d,%edi
bt     %edx,%edi
jae    1128 <isSpecialSubsequent+0x28>
mov    $0x1,%eax
test   %rsi,%rsi
je     1128 <isSpecialSubsequent+0x28>
mov    %cl,(%rsi)
ret

LLVM IR (-O0):
define i32 @isSpecialSubsequent(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %22
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
switch i32 %12, label %21 [
i32 43, label %13
i32 45, label %13
i32 46, label %13
i32 64, label %13
]
13: ; preds = %9, %9, %9, %9
%14 = load i8*, i8** %5
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i8*, i8** %4
%18 = load i8, i8* %17
%19 = load i8*, i8** %5
store i8 %18, i8* %19
br label %20
20: ; preds = %16, %13
store i32 1, i32* %3
br label %22
21: ; preds = %9
store i32 0, i32* %3
br label %22
22: ; preds = %21, %20, %8
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @isSpecialSubsequent(i8* %0, i8* writeonly %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = sext i8 %5 to i32
switch i32 %6, label %10 [
i32 43, label %7
i32 45, label %7
i32 46, label %7
i32 64, label %7
]
7: ; preds = %4, %4, %4, %4
%8 = icmp eq i8* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i8 %5, i8* %1
br label %10
10: ; preds = %4, %7, %9, %2
%11 = phi i32 [ 0, %2 ], [ 1, %9 ], [ 1, %7 ], [ 0, %4 ]
ret i32 %11
}