#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__ is_from(char const, char const *);
scalar_t__ isalnum(char const);
const char *sp_skip_alnum(const char *line, const char *chars) {
  while (*line && (isalnum(*line) || is_from(*line, chars)))
    line++;
  return line;
}


x86 assembly (clang, -O0):
<sp_skip_alnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1185 <sp_skip_alnum+0x65>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x12(%rbp)
jne    117f <sp_skip_alnum+0x5f>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1030 <is_from@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1195 <sp_skip_alnum+0x75>
jmp    11a6 <sp_skip_alnum+0x86>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1130 <sp_skip_alnum+0x10>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sp_skip_alnum>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1169 <sp_skip_alnum+0x49>
mov    %rsi,%r14
jmp    114c <sp_skip_alnum+0x2c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1169 <sp_skip_alnum+0x49>
movsbl %al,%edi
call   1040 <isalnum@plt>
test   %rax,%rax
jne    1140 <sp_skip_alnum+0x20>
movsbl (%rbx),%edi
mov    %r14,%rsi
call   1030 <is_from@plt>
test   %rax,%rax
jne    1140 <sp_skip_alnum+0x20>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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