#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*/ isalpha(unsigned char);
int /*<<< orphan*/ isdigit(unsigned char);
const char *skipsym(const char *cp) {
  while (!(!isalpha((unsigned char)*cp) && !isdigit((unsigned char)*cp) &&
           *cp != '_'))
    ++cp;
  return (cp);
}


x86 assembly (clang, -O0):
<skipsym>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1040 <isalpha@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    1174 <skipsym+0x54>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    1174 <skipsym+0x54>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
xor    $0xff,%al
test   $0x1,%al
jne    1186 <skipsym+0x66>
jmp    1197 <skipsym+0x77>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <skipsym+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipsym>:
push   %rbx
mov    %rdi,%rbx
jmp    1134 <skipsym+0x14>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbx
movzbl (%rbx),%edi
call   1040 <isalpha@plt>
test   %eax,%eax
jne    1130 <skipsym+0x10>
movzbl (%rbx),%edi
call   1030 <isdigit@plt>
test   %eax,%eax
jne    1130 <skipsym+0x10>
cmpb   $0x5f,(%rbx)
je     1130 <skipsym+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skipsym(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %21, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i32 @isalpha(i8 zeroext %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %18, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @isdigit(i8 zeroext %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %18, label %13
13: ; preds = %8
%14 = load i8*, i8** %2
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 95
br label %18
18: ; preds = %13, %8, %3
%19 = phi i1 [ false, %8 ], [ false, %3 ], [ %17, %13 ]
%20 = xor i1 %19, true
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i8*, i8** %2
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %2
br label %3
24: ; preds = %18
%25 = load i8*, i8** %2
ret i8* %25
}

LLVM IR (-O2):
define i8* @skipsym(i8* %0) {
br label %2
2: ; preds = %14, %1
%3 = phi i8* [ %0, %1 ], [ %15, %14 ]
%4 = load i8, i8* %3
%5 = tail call i32 @isalpha(i8 zeroext %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i8, i8* %3
%9 = tail call i32 @isdigit(i8 zeroext %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i8, i8* %3
%13 = icmp eq i8 %12, 95
br i1 %13, label %14, label %16
14: ; preds = %2, %7, %11
%15 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
16: ; preds = %11
ret i8* %3
}