#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*/ skip_comment(char const **);
int /*<<< orphan*/ skip_tag(char const **);
void skip_enumlist(const char **document) {
  if (**document == '<')
    (*document)++;
  while (**document && **document != '>') {
    if (**document == '%')
      skip_tag(document);
    else if (**document == '#')
      skip_comment(document);
    else
      (*document)++;
  }
  if (**document == '>')
    (*document)++;
}


x86 assembly (clang, -O0):
<skip_enumlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x3c,%eax
jne    114d <skip_enumlist+0x2d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1152 <skip_enumlist+0x32>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     117d <skip_enumlist+0x5d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x3e,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    118d <skip_enumlist+0x6d>
jmp    11e7 <skip_enumlist+0xc7>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    11ae <skip_enumlist+0x8e>
mov    -0x8(%rbp),%rdi
call   1030 <skip_tag@plt>
jmp    11e2 <skip_enumlist+0xc2>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    11cf <skip_enumlist+0xaf>
mov    -0x8(%rbp),%rdi
call   1040 <skip_comment@plt>
jmp    11dd <skip_enumlist+0xbd>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    11e2 <skip_enumlist+0xc2>
jmp    1152 <skip_enumlist+0x32>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x3e,%eax
jne    1208 <skip_enumlist+0xe8>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_enumlist>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
cmpb   $0x3c,(%rax)
jne    1150 <skip_enumlist+0x30>
add    $0x1,%rax
mov    %rax,(%rbx)
jmp    1150 <skip_enumlist+0x30>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    $0x25,%cl
jne    116a <skip_enumlist+0x4a>
mov    %rbx,%rdi
call   1030 <skip_tag@plt>
mov    (%rbx),%rax
movzbl (%rax),%ecx
cmp    $0x24,%cl
jg     1140 <skip_enumlist+0x20>
cmp    $0x23,%cl
jne    1171 <skip_enumlist+0x51>
mov    %rbx,%rdi
call   1040 <skip_comment@plt>
mov    (%rbx),%rax
jmp    1150 <skip_enumlist+0x30>
cmp    $0x3e,%cl
jne    1175 <skip_enumlist+0x55>
jmp    1181 <skip_enumlist+0x61>
test   %cl,%cl
je     1188 <skip_enumlist+0x68>
add    $0x1,%rax
mov    %rax,(%rbx)
mov    (%rbx),%rax
jmp    1150 <skip_enumlist+0x30>
add    $0x1,%rax
mov    %rax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @skip_enumlist(i8** %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 60
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %2, i64 1
store i8* %6, i8** %0
br label %7
7: ; preds = %5, %1
%8 = phi i8* [ %2, %1 ], [ %6, %5 ]
br label %9
9: ; preds = %7, %18
%10 = phi i8* [ %19, %18 ], [ %8, %7 ]
%11 = load i8, i8* %10
switch i8 %11, label %16 [
i8 35, label %14
i8 37, label %12
i8 62, label %20
i8 0, label %22
]
12: ; preds = %9
%13 = tail call i32 @skip_tag(i8** %0)
br label %18
14: ; preds = %9
%15 = tail call i32 @skip_comment(i8** %0)
br label %18
16: ; preds = %9
%17 = getelementptr inbounds i8, i8* %10, i64 1
store i8* %17, i8** %0
br label %18
18: ; preds = %14, %16, %12
%19 = load i8*, i8** %0
br label %9
20: ; preds = %9
%21 = getelementptr inbounds i8, i8* %10, i64 1
store i8* %21, i8** %0
br label %22
22: ; preds = %9, %20
ret void
}