#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__ islower(char);
scalar_t__ strchr(char *, char);
int LispCheckAtomString(char *string) {
  char *ptr;
  if (*string == '\0')
    return (0);
  for (ptr = string; *ptr; ptr++) {
    if (islower(*ptr) || strchr("\"\\;#()`'|:", *ptr) ||
        ((ptr == string || ptr[1] == '\0') && strchr(".,@", *ptr)))
      return (0);
  }
  return (1);
}


x86 assembly (clang, -O0):
<LispCheckAtomString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1148 <LispCheckAtomString+0x28>
movl   $0x0,-0x4(%rbp)
jmp    11f5 <LispCheckAtomString+0xd5>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     11ee <LispCheckAtomString+0xce>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
jne    11cc <LispCheckAtomString+0xac>
mov    -0x18(%rbp),%rax
lea    0xe82(%rip),%rdi
movsbl (%rax),%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
jne    11cc <LispCheckAtomString+0xac>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     11af <LispCheckAtomString+0x8f>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    11d8 <LispCheckAtomString+0xb8>
mov    -0x18(%rbp),%rax
lea    0xe51(%rip),%rdi
movsbl (%rax),%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     11d8 <LispCheckAtomString+0xb8>
movl   $0x0,-0x4(%rbp)
jmp    11f5 <LispCheckAtomString+0xd5>
jmp    11dd <LispCheckAtomString+0xbd>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1150 <LispCheckAtomString+0x30>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LispCheckAtomString>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     11a2 <LispCheckAtomString+0x82>
mov    %rdi,%r13
xor    %r14d,%r14d
lea    0xec4(%rip),%r15
lea    0xec8(%rip),%r12
xor    %ebx,%ebx
jmp    1158 <LispCheckAtomString+0x38>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
test   %al,%al
je     11a7 <LispCheckAtomString+0x87>
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
jne    11ad <LispCheckAtomString+0x8d>
movsbl 0x0(%r13,%rbx,1),%esi
mov    %r15,%rdi
call   1040 <strchr@plt>
test   %rax,%rax
jne    11ad <LispCheckAtomString+0x8d>
test   %rbx,%rbx
je     1187 <LispCheckAtomString+0x67>
movzbl 0x1(%r13,%rbx,1),%eax
test   %al,%al
jne    1150 <LispCheckAtomString+0x30>
movsbl 0x0(%r13,%rbx,1),%esi
mov    %r12,%rdi
call   1040 <strchr@plt>
test   %rax,%rax
jne    11ad <LispCheckAtomString+0x8d>
movzbl 0x1(%r13,%rbx,1),%eax
jmp    1150 <LispCheckAtomString+0x30>
xor    %r14d,%r14d
jmp    11ad <LispCheckAtomString+0x8d>
mov    $0x1,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"\22\\;#()`'|:\00"
@.str.1 = [4 x i8] c".,@\00"
define i32 @LispCheckAtomString(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %47
10: ; preds = %1
%11 = load i8*, i8** %3
store i8* %11, i8** %4
br label %12
12: ; preds = %43, %10
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = icmp ne i8 %14, 0
br i1 %15, label %16, label %46
16: ; preds = %12
%17 = load i8*, i8** %4
%18 = load i8, i8* %17
%19 = call i64 @islower(i8 signext %18)
%20 = icmp ne i64 %19, 0
br i1 %20, label %41, label %21
21: ; preds = %16
%22 = load i8*, i8** %4
%23 = load i8, i8* %22
%24 = call i64 @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8 signext %23)
%25 = icmp ne i64 %24, 0
br i1 %25, label %41, label %26
26: ; preds = %21
%27 = load i8*, i8** %4
%28 = load i8*, i8** %3
%29 = icmp eq i8* %27, %28
br i1 %29, label %36, label %30
30: ; preds = %26
%31 = load i8*, i8** %4
%32 = getelementptr inbounds i8, i8* %31, i64 1
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %42
36: ; preds = %30, %26
%37 = load i8*, i8** %4
%38 = load i8, i8* %37
%39 = call i64 @strchr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %38)
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %42
41: ; preds = %36, %21, %16
store i32 0, i32* %2
br label %47
42: ; preds = %36, %30
br label %43
43: ; preds = %42
%44 = load i8*, i8** %4
%45 = getelementptr inbounds i8, i8* %44, i32 1
store i8* %45, i8** %4
br label %12
46: ; preds = %12
store i32 1, i32* %2
br label %47
47: ; preds = %46, %41, %9
%48 = load i32, i32* %2
ret i32 %48
}

LLVM IR (-O2):
@.str = [11 x i8] c"\22\\;#()`'|:\00"
@.str.1 = [4 x i8] c".,@\00"
define i32 @LispCheckAtomString(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %30, label %4
4: ; preds = %1, %26
%5 = phi i8* [ %28, %26 ], [ %0, %1 ]
%6 = phi i8 [ %27, %26 ], [ %2, %1 ]
%7 = tail call i64 @islower(i8 signext %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %30
9: ; preds = %4
%10 = load i8, i8* %5
%11 = tail call i64 @strchr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8 signext %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %30
13: ; preds = %9
%14 = icmp eq i8* %5, %0
br i1 %14, label %19, label %15
15: ; preds = %13
%16 = getelementptr inbounds i8, i8* %5, i64 1
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %26
19: ; preds = %15, %13
%20 = load i8, i8* %5
%21 = tail call i64 @strchr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %20)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %30
23: ; preds = %19
%24 = getelementptr inbounds i8, i8* %5, i64 1
%25 = load i8, i8* %24
br label %26
26: ; preds = %23, %15
%27 = phi i8 [ %25, %23 ], [ %17, %15 ]
%28 = getelementptr inbounds i8, i8* %5, i64 1
%29 = icmp eq i8 %27, 0
br i1 %29, label %30, label %4
30: ; preds = %19, %9, %4, %26, %1
%31 = phi i32 [ 0, %1 ], [ 0, %19 ], [ 0, %9 ], [ 0, %4 ], [ 1, %26 ]
ret i32 %31
}