#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 /*<<< orphan*/ isalpha(char);
char *skip_symbol(char *s) {
  if (s == NULL || *s == '\0')
    return NULL;
  if (!isalpha(*s) && *s != '$' && *s != '_')
    return NULL;
  while (isalnum(*s) || *s == '$' || *s == '_' || *s == '.')
    s++;
  return (s);
}


x86 assembly (clang, -O0):
<skip_symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1147 <skip_symbol+0x27>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1154 <skip_symbol+0x34>
movq   $0x0,-0x8(%rbp)
jmp    121c <skip_symbol+0xfc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%eax
jne    1196 <skip_symbol+0x76>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x24,%eax
je     1196 <skip_symbol+0x76>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
je     1196 <skip_symbol+0x76>
movq   $0x0,-0x8(%rbp)
jmp    121c <skip_symbol+0xfc>
jmp    119b <skip_symbol+0x7b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    11f3 <skip_symbol+0xd3>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x24,%ecx
mov    %al,-0x11(%rbp)
je     11f3 <skip_symbol+0xd3>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x11(%rbp)
je     11f3 <skip_symbol+0xd3>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1203 <skip_symbol+0xe3>
jmp    1214 <skip_symbol+0xf4>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    119b <skip_symbol+0x7b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_symbol>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     117f <skip_symbol+0x5f>
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     117f <skip_symbol+0x5f>
movsbl %al,%edi
call   1040 <isalpha@plt>
test   %eax,%eax
je     1175 <skip_symbol+0x55>
movabs $0x800000000000401,%r14
jmp    1154 <skip_symbol+0x34>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
movsbl (%rbx),%edi
call   1030 <isalnum@plt>
test   %rax,%rax
jne    1150 <skip_symbol+0x30>
movzbl (%rbx),%eax
add    $0xdc,%al
cmp    $0x3b,%al
ja     1181 <skip_symbol+0x61>
movzbl %al,%eax
bt     %rax,%r14
jb     1150 <skip_symbol+0x30>
jmp    1181 <skip_symbol+0x61>
mov    (%rbx),%al
cmp    $0x5f,%al
je     113e <skip_symbol+0x1e>
cmp    $0x24,%al
je     113e <skip_symbol+0x1e>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @skip_symbol(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %6, %1
store i8* null, i8** %2
br label %56
12: ; preds = %6
%13 = load i8*, i8** %3
%14 = load i8, i8* %13
%15 = call i32 @isalpha(i8 signext %14)
%16 = icmp ne i32 %15, 0
br i1 %16, label %28, label %17
17: ; preds = %12
%18 = load i8*, i8** %3
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 36
br i1 %21, label %22, label %28
22: ; preds = %17
%23 = load i8*, i8** %3
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 95
br i1 %26, label %27, label %28
27: ; preds = %22
store i8* null, i8** %2
br label %56
28: ; preds = %22, %17, %12
br label %29
29: ; preds = %51, %28
%30 = load i8*, i8** %3
%31 = load i8, i8* %30
%32 = call i64 @isalnum(i8 signext %31)
%33 = icmp ne i64 %32, 0
br i1 %33, label %49, label %34
34: ; preds = %29
%35 = load i8*, i8** %3
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 36
br i1 %38, label %49, label %39
39: ; preds = %34
%40 = load i8*, i8** %3
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 95
br i1 %43, label %49, label %44
44: ; preds = %39
%45 = load i8*, i8** %3
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = icmp eq i32 %47, 46
br label %49
49: ; preds = %44, %39, %34, %29
%50 = phi i1 [ true, %39 ], [ true, %34 ], [ true, %29 ], [ %48, %44 ]
br i1 %50, label %51, label %54
51: ; preds = %49
%52 = load i8*, i8** %3
%53 = getelementptr inbounds i8, i8* %52, i32 1
store i8* %53, i8** %3
br label %29
54: ; preds = %49
%55 = load i8*, i8** %3
store i8* %55, i8** %2
br label %56
56: ; preds = %54, %27, %11
%57 = load i8*, i8** %2
ret i8* %57
}

LLVM IR (-O2):
define i8* @skip_symbol(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %21, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %21, label %6
6: ; preds = %3
%7 = tail call i32 @isalpha(i8 signext %4)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = load i8, i8* %0
switch i8 %10, label %21 [
i8 36, label %11
i8 95, label %11
]
11: ; preds = %9, %9, %6
br label %12
12: ; preds = %11, %19
%13 = phi i8* [ %20, %19 ], [ %0, %11 ]
%14 = load i8, i8* %13
%15 = tail call i64 @isalnum(i8 signext %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = load i8, i8* %13
switch i8 %18, label %21 [
i8 36, label %19
i8 95, label %19
i8 46, label %19
]
19: ; preds = %17, %17, %17, %12
%20 = getelementptr inbounds i8, i8* %13, i64 1
br label %12
21: ; preds = %17, %9, %1, %3
%22 = phi i8* [ null, %3 ], [ null, %1 ], [ null, %9 ], [ %13, %17 ]
ret i8* %22
}