#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__ s3d_strcharin(char, char const *);
char *s3d_strskip(char **const s, const char *chars) {
  while (**s != 0 && s3d_strcharin(**s, chars)) {
    ++*s;
  }
  return *s;
}


x86 assembly (clang, -O0):
<s3d_strskip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1157 <s3d_strskip+0x47>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1030 <s3d_strcharin@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1167 <s3d_strskip+0x57>
jmp    117a <s3d_strskip+0x6a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1120 <s3d_strskip+0x10>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s3d_strskip>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%rax
mov    (%rax),%cl
test   %cl,%cl
je     1157 <s3d_strskip+0x47>
mov    %rsi,%r14
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %cl,%edi
mov    %r14,%rsi
call   1030 <s3d_strcharin@plt>
mov    (%rbx),%rcx
test   %rax,%rax
je     1154 <s3d_strskip+0x44>
lea    0x1(%rcx),%rax
mov    %rax,(%rbx)
movzbl 0x1(%rcx),%ecx
test   %cl,%cl
jne    1130 <s3d_strskip+0x20>
jmp    1157 <s3d_strskip+0x47>
mov    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @s3d_strskip(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 = %20, %2
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %5
%12 = load i8**, i8*** %3
%13 = load i8*, i8** %12
%14 = load i8, i8* %13
%15 = load i8*, i8** %4
%16 = call i64 @s3d_strcharin(i8 signext %14, i8* %15)
%17 = icmp ne i64 %16, 0
br label %18
18: ; preds = %11, %5
%19 = phi i1 [ false, %5 ], [ %17, %11 ]
br i1 %19, label %20, label %24
20: ; preds = %18
%21 = load i8**, i8*** %3
%22 = load i8*, i8** %21
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %21
br label %5
24: ; preds = %18
%25 = load i8**, i8*** %3
%26 = load i8*, i8** %25
ret i8* %26
}

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