#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 */
typedef char const uint8_t;

/* Variables and functions */
scalar_t__ seek2marker(char const **, char const *const);
int seek2eos(uint8_t **buffer, register const uint8_t *const limit) {
  while (*buffer < limit) {
    if (seek2marker(buffer, limit) && **buffer == '"')
      return 1;
    (*buffer) += 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<seek2eos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x18(%rbp),%rax
jae    117a <seek2eos+0x6a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <seek2marker@plt>
cmp    $0x0,%rax
je     1167 <seek2eos+0x57>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    1167 <seek2eos+0x57>
movl   $0x1,-0x4(%rbp)
jmp    1181 <seek2eos+0x71>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x2,%rcx
mov    %rcx,(%rax)
jmp    1120 <seek2eos+0x10>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seek2eos>:
push   %rbp
push   %r14
push   %rbx
xor    %r14d,%r14d
cmp    %rsi,(%rdi)
jae    115c <seek2eos+0x4c>
mov    %rsi,%rbx
mov    %rdi,%rbp
jmp    113d <seek2eos+0x2d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x2,%rcx
mov    %rcx,0x0(%rbp)
cmp    %rbx,%rcx
jae    115c <seek2eos+0x4c>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1030 <seek2marker@plt>
mov    0x0(%rbp),%rcx
test   %rax,%rax
je     1130 <seek2eos+0x20>
cmpb   $0x22,(%rcx)
jne    1130 <seek2eos+0x20>
mov    $0x1,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @seek2eos(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 = %23, %2
%7 = load i8**, i8*** %4
%8 = load i8*, i8** %7
%9 = load i8*, i8** %5
%10 = icmp ult i8* %8, %9
br i1 %10, label %11, label %27
11: ; preds = %6
%12 = load i8**, i8*** %4
%13 = load i8*, i8** %5
%14 = call i64 @seek2marker(i8** %12, i8* %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %23
16: ; preds = %11
%17 = load i8**, i8*** %4
%18 = load i8*, i8** %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 34
br i1 %21, label %22, label %23
22: ; preds = %16
store i32 1, i32* %3
br label %28
23: ; preds = %16, %11
%24 = load i8**, i8*** %4
%25 = load i8*, i8** %24
%26 = getelementptr inbounds i8, i8* %25, i64 2
store i8* %26, i8** %24
br label %6
27: ; preds = %6
store i32 0, i32* %3
br label %28
28: ; preds = %27, %22
%29 = load i32, i32* %3
ret i32 %29
}

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