#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*/ fprintf(int /*<<< orphan*/, char *, char *, int);
scalar_t__ isspace(char const);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcspn(char const *, char *);
scalar_t__ strncmp(char const *, char *, int);
char *strstr(char const *, char *);
const char *move_to_next_token(const char *s) {
  if ((s == NULL) || (*s == '\0'))
    return s;
  do {
    while (isspace(*s))
      s++;
    if (strncmp(s, "/*", 2) == 0) {
      s = strstr(s, "*/");
      if (s == NULL) {
        fprintf(stderr,
                "%s:%d - Warning: Unterminated multi-line comment "
                "in string.\n",
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/RecipeML/Recipe/refs/heads/"
                "master/src/grammar.c",
                391);
      } else {
        s += 2;
      }
      continue;
    } else if (*s == '#' || strncmp(s, "//", 2) == 0) {
      s += strcspn(s, "\n");
      continue;
    } else {
      break;
    }
  } while (s && (*s != '\0'));
  return s;
}


x86 assembly (clang, -O0):
<move_to_next_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1177 <move_to_next_token+0x27>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1184 <move_to_next_token+0x34>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    12b6 <move_to_next_token+0x166>
jmp    1189 <move_to_next_token+0x39>
jmp    118e <move_to_next_token+0x3e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     11b5 <move_to_next_token+0x65>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    118e <move_to_next_token+0x3e>
mov    -0x10(%rbp),%rdi
lea    0xe40(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    122a <move_to_next_token+0xda>
mov    -0x10(%rbp),%rdi
lea    0xe24(%rip),%rsi
call   1070 <strstr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1219 <move_to_next_token+0xc9>
mov    0x2de6(%rip),%rax
mov    (%rax),%edi
lea    0xe03(%rip),%rsi
lea    0xe39(%rip),%rdx
mov    $0x187,%ecx
call   1060 <fprintf@plt>
jmp    1225 <move_to_next_token+0xd5>
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
jmp    1283 <move_to_next_token+0x133>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
je     1259 <move_to_next_token+0x109>
mov    -0x10(%rbp),%rdi
lea    0xe88(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    127e <move_to_next_token+0x12e>
mov    -0x10(%rbp),%rdi
lea    0xddd(%rip),%rsi
call   1050 <strcspn@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1283 <move_to_next_token+0x133>
jmp    12ae <move_to_next_token+0x15e>
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     12a3 <move_to_next_token+0x153>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1189 <move_to_next_token+0x39>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move_to_next_token>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %rdi,%rdi
je     124d <move_to_next_token+0xfd>
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     124f <move_to_next_token+0xff>
lea    0xe8a(%rip),%r14
lea    0xe86(%rip),%r15
lea    0xebd(%rip),%r12
lea    0xf42(%rip),%r13
jmp    11aa <move_to_next_token+0x5a>
nopl   (%rax)
mov    %rbx,%rdi
mov    %r12,%rsi
call   1050 <strcspn@plt>
cltq
add    %rax,%rbx
mov    (%rbx),%al
test   %al,%al
je     124f <move_to_next_token+0xff>
movsbl %al,%edi
nopl   (%rax)
call   1040 <isspace@plt>
test   %rax,%rax
je     11d0 <move_to_next_token+0x80>
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    11b0 <move_to_next_token+0x60>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1210 <move_to_next_token+0xc0>
cmpb   $0x23,(%rbx)
je     1190 <move_to_next_token+0x40>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1190 <move_to_next_token+0x40>
jmp    124f <move_to_next_token+0xff>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <strstr@plt>
test   %rax,%rax
je     122c <move_to_next_token+0xdc>
mov    %rax,%rbx
add    $0x2,%rbx
jmp    11a0 <move_to_next_token+0x50>
mov    0x2dad(%rip),%rax
mov    (%rax),%edi
lea    0xdca(%rip),%rsi
lea    0xe00(%rip),%rdx
mov    $0x187,%ecx
call   1060 <fprintf@plt>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"/*\00"
@.str.1 = [3 x i8] c"*/\00"
@stderr = global i32 0
@.str.2 = [61 x i8] c"%s:%d - Warning: Unterminated multi-line comment in string.\0A\00"
@.str.3 = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/RecipeML/Recipe/refs/heads/master/src/grammar.c\00"
@.str.4 = [3 x i8] c"//\00"
@.str.5 = [2 x i8] c"\0A\00"
define i8* @move_to_next_token(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %6, %1
%12 = load i8*, i8** %3
store i8* %12, i8** %2
br label %67
13: ; preds = %6
br label %14
14: ; preds = %63, %13
br label %15
15: ; preds = %20, %14
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = call i64 @isspace(i8 signext %17)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %15
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
br label %15
23: ; preds = %15
%24 = load i8*, i8** %3
%25 = call i64 @strncmp(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %39
27: ; preds = %23
%28 = load i8*, i8** %3
%29 = call i8* @strstr(i8* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i8* %29, i8** %3
%30 = load i8*, i8** %3
%31 = icmp eq i8* %30, null
br i1 %31, label %32, label %35
32: ; preds = %27
%33 = load i32, i32* @stderr
%34 = call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str.3, i64 0, i64 0), i32 391)
br label %38
35: ; preds = %27
%36 = load i8*, i8** %3
%37 = getelementptr inbounds i8, i8* %36, i64 2
store i8* %37, i8** %3
br label %38
38: ; preds = %35, %32
br label %55
39: ; preds = %23
%40 = load i8*, i8** %3
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 35
br i1 %43, label %48, label %44
44: ; preds = %39
%45 = load i8*, i8** %3
%46 = call i64 @strncmp(i8* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 2)
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %54
48: ; preds = %44, %39
%49 = load i8*, i8** %3
%50 = call i32 @strcspn(i8* %49, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%51 = load i8*, i8** %3
%52 = sext i32 %50 to i64
%53 = getelementptr inbounds i8, i8* %51, i64 %52
store i8* %53, i8** %3
br label %55
54: ; preds = %44
br label %65
55: ; preds = %48, %38
%56 = load i8*, i8** %3
%57 = icmp ne i8* %56, null
br i1 %57, label %58, label %63
58: ; preds = %55
%59 = load i8*, i8** %3
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = icmp ne i32 %61, 0
br label %63
63: ; preds = %58, %55
%64 = phi i1 [ false, %55 ], [ %62, %58 ]
br i1 %64, label %14, label %65
65: ; preds = %63, %54
%66 = load i8*, i8** %3
store i8* %66, i8** %2
br label %67
67: ; preds = %65, %11
%68 = load i8*, i8** %2
ret i8* %68
}

LLVM IR (-O2):
@.str = [3 x i8] c"/*\00"
@.str.1 = [3 x i8] c"*/\00"
@stderr = global i32 0
@.str.2 = [61 x i8] c"%s:%d - Warning: Unterminated multi-line comment in string.\0A\00"
@.str.3 = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/RecipeML/Recipe/refs/heads/master/src/grammar.c\00"
@.str.4 = [3 x i8] c"//\00"
@.str.5 = [2 x i8] c"\0A\00"
define i8* @move_to_next_token(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %43, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %43, label %6
6: ; preds = %3, %39
%7 = phi i8 [ %41, %39 ], [ %4, %3 ]
%8 = phi i8* [ %40, %39 ], [ %0, %3 ]
%9 = tail call i64 @isspace(i8 signext %7)
%10 = icmp eq i64 %9, 0
br i1 %10, label %17, label %11
11: ; preds = %6, %11
%12 = phi i8* [ %13, %11 ], [ %8, %6 ]
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = tail call i64 @isspace(i8 signext %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %11
17: ; preds = %11, %6
%18 = phi i8* [ %8, %6 ], [ %13, %11 ]
%19 = tail call i64 @strncmp(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %29
21: ; preds = %17
%22 = tail call i8* @strstr(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i8* %22, null
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = load i32, i32* @stderr
%26 = tail call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str.3, i64 0, i64 0), i32 391)
br label %43
27: ; preds = %21
%28 = getelementptr inbounds i8, i8* %22, i64 2
br label %39
29: ; preds = %17
%30 = load i8, i8* %18
%31 = icmp eq i8 %30, 35
br i1 %31, label %35, label %32
32: ; preds = %29
%33 = tail call i64 @strncmp(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 2)
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %43
35: ; preds = %29, %32
%36 = tail call i32 @strcspn(i8* %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8, i8* %18, i64 %37
br label %39
39: ; preds = %35, %27
%40 = phi i8* [ %28, %27 ], [ %38, %35 ]
%41 = load i8, i8* %40
%42 = icmp eq i8 %41, 0
br i1 %42, label %43, label %6
43: ; preds = %39, %32, %24, %1, %3
%44 = phi i8* [ %0, %3 ], [ null, %1 ], [ null, %24 ], [ %18, %32 ], [ %40, %39 ]
ret i8* %44
}