#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*/ Util_caseInsensitiveCompare(char const, char const);
bool bufferAfterIs(const char *compare, const char *check) {
  for (;; ++check, ++compare) {
    if (!(*compare))
      return !(*check);
    if (!Util_caseInsensitiveCompare(*compare, *check))
      return false;
  }
}


x86 assembly (clang, -O0):
<bufferAfterIs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1146 <bufferAfterIs+0x36>
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1192 <bufferAfterIs+0x82>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
movsbl %cl,%edi
movsbl (%rax),%esi
call   1030 <Util_caseInsensitiveCompare@plt>
cmp    $0x0,%eax
jne    1170 <bufferAfterIs+0x60>
movl   $0x0,-0x4(%rbp)
jmp    1192 <bufferAfterIs+0x82>
jmp    1175 <bufferAfterIs+0x65>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <bufferAfterIs+0x10>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bufferAfterIs>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    (%rdi),%al
test   %al,%al
je     114f <bufferAfterIs+0x3f>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%r14),%esi
movsbl %al,%edi
call   1030 <Util_caseInsensitiveCompare@plt>
test   %eax,%eax
je     115a <bufferAfterIs+0x4a>
add    $0x1,%r14
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <bufferAfterIs+0x20>
xor    %eax,%eax
cmpb   $0x0,(%r14)
sete   %al
jmp    115c <bufferAfterIs+0x4c>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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