#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*/ IsRuleSymb(char *);
int PassComment(char *data) {
  char *mass = data;
  int len = -1;
  if (*mass != '\\') {
    if (*mass != ';')
      return len;
    mass++;
  } else {
    mass++;
    if (*mass != '\\')
      return len;
    mass++;
  }
  len = 0;
  while (*mass && !IsRuleSymb(mass)) {
    mass++;
    len++;
  }
  return len;
}


x86 assembly (clang, -O0):
<PassComment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     1167 <PassComment+0x57>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
je     1156 <PassComment+0x46>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11fa <PassComment+0xea>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    119a <PassComment+0x8a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     118e <PassComment+0x7e>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11fa <PassComment+0xea>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1d(%rbp)
je     11ca <PassComment+0xba>
mov    -0x18(%rbp),%rdi
call   1030 <IsRuleSymb@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
test   $0x1,%al
jne    11da <PassComment+0xca>
jmp    11f4 <PassComment+0xe4>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a1 <PassComment+0x91>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PassComment>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%cl
cmp    $0x3b,%cl
je     115e <PassComment+0x4e>
mov    $0xffffffff,%eax
cmp    $0x5c,%cl
jne    1170 <PassComment+0x60>
mov    $0x2,%ecx
cmpb   $0x5c,0x1(%r14)
jne    1170 <PassComment+0x60>
cmpb   $0x0,(%r14,%rcx,1)
je     116a <PassComment+0x5a>
add    %rcx,%r14
xor    %ebx,%ebx
lea    (%r14,%rbx,1),%rdi
call   1030 <IsRuleSymb@plt>
test   %eax,%eax
jne    116e <PassComment+0x5e>
lea    0x1(%rbx),%rax
cmpb   $0x0,0x1(%r14,%rbx,1)
mov    %rax,%rbx
jne    1140 <PassComment+0x30>
jmp    1170 <PassComment+0x60>
mov    $0x1,%ecx
cmpb   $0x0,(%r14,%rcx,1)
jne    113b <PassComment+0x2b>
xor    %eax,%eax
jmp    1170 <PassComment+0x60>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @PassComment(i8* %0) {
%2 = load i8, i8* %0
switch i8 %2, label %22 [
i8 92, label %3
i8 59, label %7
]
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 92
br i1 %6, label %7, label %22
7: ; preds = %3, %1
%8 = phi i64 [ 1, %1 ], [ 2, %3 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %22, label %12
12: ; preds = %7, %17
%13 = phi i32 [ %19, %17 ], [ 0, %7 ]
%14 = phi i8* [ %18, %17 ], [ %9, %7 ]
%15 = tail call i32 @IsRuleSymb(i8* %14)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %22
17: ; preds = %12
%18 = getelementptr inbounds i8, i8* %14, i64 1
%19 = add nuw nsw i32 %13, 1
%20 = load i8, i8* %18
%21 = icmp eq i8 %20, 0
br i1 %21, label %22, label %12
22: ; preds = %17, %12, %7, %3, %1
%23 = phi i32 [ -1, %1 ], [ -1, %3 ], [ 0, %7 ], [ %19, %17 ], [ %13, %12 ]
ret i32 %23
}