#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 check_token(char **, char const *);
char *sskip(char *);
int check_token_eq(char **p_, const char *token) {
  char *p = *p_;
  int ret = check_token(&p, token);
  ret = ret && *p == '=';
  if (ret)
    *p_ = sskip(p + 1);
  return ret;
}


x86 assembly (clang, -O0):
<check_token_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdi
call   1030 <check_token@plt>
mov    %eax,-0x1c(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x1c(%rbp)
mov    %al,-0x1d(%rbp)
je     116a <check_token_eq+0x4a>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
sete   %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1196 <check_token_eq+0x76>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1040 <sskip@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_token_eq>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <check_token@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     115d <check_token_eq+0x3d>
mov    0x8(%rsp),%rdi
cmpb   $0x3d,(%rdi)
jne    115d <check_token_eq+0x3d>
add    $0x1,%rdi
call   1040 <sskip@plt>
mov    %rax,(%rbx)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

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