#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*/ strncasecmp(char const *, char const *, int);
int IsMarker(const char *marker, const char *name) {
  return !strncasecmp(name, marker, 8) ||
         (*name == *marker && !strncasecmp(name + 1, marker, 7));
}


x86 assembly (clang, -O0):
<IsMarker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <strncasecmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1184 <IsMarker+0x74>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x12(%rbp)
jne    117e <IsMarker+0x6e>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x8(%rbp),%rsi
mov    $0x7,%edx
call   1030 <strncasecmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsMarker>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <strncasecmp@plt>
test   %eax,%eax
je     1156 <IsMarker+0x46>
mov    (%rbx),%cl
xor    %eax,%eax
cmp    (%r14),%cl
jne    115b <IsMarker+0x4b>
add    $0x1,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x7,%edx
call   1030 <strncasecmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
jmp    115b <IsMarker+0x4b>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @IsMarker(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @strncasecmp(i8* %5, i8* %6, i32 8)
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %26
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = load i8*, i8** %3
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %12, %15
br i1 %16, label %17, label %24
17: ; preds = %9
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = load i8*, i8** %3
%21 = call i32 @strncasecmp(i8* %19, i8* %20, i32 7)
%22 = icmp ne i32 %21, 0
%23 = xor i1 %22, true
br label %24
24: ; preds = %17, %9
%25 = phi i1 [ false, %9 ], [ %23, %17 ]
br label %26
26: ; preds = %24, %2
%27 = phi i1 [ true, %2 ], [ %25, %24 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

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