#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*/ Dbg(int, int, char *, ...);
scalar_t__ StringIn(char, char *);
char *StringSkipToNons(char *in, char *seps) {
  while (*in && StringIn(*in, seps)) {
    if (*in == 92) {
      in++;
      if (*in == '\0') {
        Dbg(0x80, 1, "StringSkipNons");
        return (in);
      }
    }
    if (*in == '\0') {
      Dbg(0x80, 1, "StringSkipNons: hit end skipping to <%s>", seps);
      return (in);
    }
    in++;
  }
  return (in);
}


x86 assembly (clang, -O0):
<StringSkipToNons>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     1161 <StringSkipToNons+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x18(%rbp),%rsi
movsbl %al,%edi
call   1040 <StringIn@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1171 <StringSkipToNons+0x51>
jmp    1211 <StringSkipToNons+0xf1>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    11c7 <StringSkipToNons+0xa7>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    11c2 <StringSkipToNons+0xa2>
mov    $0x80,%edi
mov    $0x1,%esi
lea    0xe52(%rip),%rdx
mov    $0x0,%al
call   1030 <Dbg@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1219 <StringSkipToNons+0xf9>
jmp    11c7 <StringSkipToNons+0xa7>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1200 <StringSkipToNons+0xe0>
mov    -0x18(%rbp),%rcx
mov    $0x80,%edi
mov    $0x1,%esi
lea    0xe23(%rip),%rdx
mov    $0x0,%al
call   1030 <Dbg@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1219 <StringSkipToNons+0xf9>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1130 <StringSkipToNons+0x10>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringSkipToNons>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     11ae <StringSkipToNons+0x8e>
mov    %rsi,%r14
jmp    1150 <StringSkipToNons+0x30>
nopw   0x0(%rax,%rax,1)
test   %al,%al
je     1176 <StringSkipToNons+0x56>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     11ae <StringSkipToNons+0x8e>
movsbl %al,%edi
mov    %r14,%rsi
call   1040 <StringIn@plt>
test   %rax,%rax
je     11ae <StringSkipToNons+0x8e>
movzbl (%rbx),%eax
cmp    $0x5c,%al
jne    1140 <StringSkipToNons+0x20>
lea    0x1(%rbx),%r15
cmpb   $0x0,0x1(%rbx)
je     1193 <StringSkipToNons+0x73>
mov    %r15,%rbx
jmp    1144 <StringSkipToNons+0x24>
lea    0xe92(%rip),%rdx
mov    $0x80,%edi
mov    $0x1,%esi
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <Dbg@plt>
jmp    11ae <StringSkipToNons+0x8e>
lea    0xe66(%rip),%rdx
mov    $0x80,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <Dbg@plt>
mov    %r15,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"StringSkipNons\00"
@.str.1 = [41 x i8] c"StringSkipNons: hit end skipping to <%s>\00"
define i8* @StringSkipToNons(i8* %0, i8* %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %25, label %5
5: ; preds = %2, %20
%6 = phi i8 [ %23, %20 ], [ %3, %2 ]
%7 = phi i8* [ %22, %20 ], [ %0, %2 ]
%8 = tail call i64 @StringIn(i8 signext %6, i8* %1)
%9 = icmp eq i64 %8, 0
br i1 %9, label %25, label %10
10: ; preds = %5
%11 = load i8, i8* %7
switch i8 %11, label %20 [
i8 92, label %12
i8 0, label %18
]
12: ; preds = %10
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %12
%17 = tail call i32 (i32, i32, i8*, ...) @Dbg(i32 128, i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %25
18: ; preds = %10
%19 = tail call i32 (i32, i32, i8*, ...) @Dbg(i32 128, i32 1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %25
20: ; preds = %10, %12
%21 = phi i8* [ %13, %12 ], [ %7, %10 ]
%22 = getelementptr inbounds i8, i8* %21, i64 1
%23 = load i8, i8* %22
%24 = icmp eq i8 %23, 0
br i1 %24, label %25, label %5
25: ; preds = %20, %5, %2, %18, %16
%26 = phi i8* [ %13, %16 ], [ %7, %18 ], [ %0, %2 ], [ %22, %20 ], [ %7, %5 ]
ret i8* %26
}