#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*/ assert(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           unsigned int, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strspn(char *, char *);
char *app_expect_equal(const char *fn, char *line, unsigned ln, char *cf) {
  assert(fn != NULL);
  assert(line != NULL);
  assert(ln > 0);
  assert(cf != NULL);
  line += strspn(line, " \t");
  if (*line != '=') {
    fprintf(stderr,
            "%s: expecting `=' after identifier on line %d in file %s\n", fn,
            ln, cf);
    return NULL;
  } else
    line++;
  line += strspn(line, " \t");
  return line;
}


x86 assembly (clang, -O0):
<app_expect_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpl   $0x0,-0x1c(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpq   $0x0,-0x28(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x18(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strspn@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     11eb <app_expect_equal+0xbb>
mov    0x2e1b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
lea    0xe2a(%rip),%rsi
call   1050 <fprintf@plt>
movq   $0x0,-0x8(%rbp)
jmp    121f <app_expect_equal+0xef>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xdfe(%rip),%rsi
call   1030 <strspn@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<app_expect_equal>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %edx,%r15d
mov    %rsi,%rbx
mov    %rdi,%rbp
xor    %edi,%edi
test   %rbp,%rbp
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
test   %r15d,%r15d
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1040 <assert@plt>
lea    0xe7e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strspn@plt>
cltq
cmpb   $0x3d,(%rbx,%rax,1)
jne    11b0 <app_expect_equal+0x80>
add    %rax,%rbx
lea    0x1(%rbx),%rdi
lea    0xe60(%rip),%rsi
call   1030 <strspn@plt>
cltq
add    %rbx,%rax
add    $0x1,%rax
jmp    11d0 <app_expect_equal+0xa0>
mov    0x2e29(%rip),%rax
mov    (%rax),%edi
lea    0xe43(%rip),%rsi
mov    %rbp,%rdx
mov    %r15d,%ecx
mov    %r14,%r8
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c" \09\00"
@stderr = global i32 0
@.str.1 = [58 x i8] c"%s: expecting `=' after identifier on line %d in file %s\0A\00"
define i8* @app_expect_equal(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i8*, i8** %7
%15 = icmp ne i8* %14, null
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load i32, i32* %8
%19 = icmp ugt i32 %18, 0
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = load i8*, i8** %9
%23 = icmp ne i8* %22, null
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = load i8*, i8** %7
%27 = call i32 @strspn(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%28 = load i8*, i8** %7
%29 = sext i32 %27 to i64
%30 = getelementptr inbounds i8, i8* %28, i64 %29
store i8* %30, i8** %7
%31 = load i8*, i8** %7
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp ne i32 %33, 61
br i1 %34, label %35, label %41
35: ; preds = %4
%36 = load i32, i32* @stderr
%37 = load i8*, i8** %6
%38 = load i32, i32* %8
%39 = load i8*, i8** %9
%40 = call i32 @fprintf(i32 %36, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i8* %37, i32 %38, i8* %39)
store i8* null, i8** %5
br label %51
41: ; preds = %4
%42 = load i8*, i8** %7
%43 = getelementptr inbounds i8, i8* %42, i32 1
store i8* %43, i8** %7
br label %44
44: ; preds = %41
%45 = load i8*, i8** %7
%46 = call i32 @strspn(i8* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%47 = load i8*, i8** %7
%48 = sext i32 %46 to i64
%49 = getelementptr inbounds i8, i8* %47, i64 %48
store i8* %49, i8** %7
%50 = load i8*, i8** %7
store i8* %50, i8** %5
br label %51
51: ; preds = %44, %35
%52 = load i8*, i8** %5
ret i8* %52
}

LLVM IR (-O2):
@.str = [3 x i8] c" \09\00"
@stderr = global i32 0
@.str.1 = [58 x i8] c"%s: expecting `=' after identifier on line %d in file %s\0A\00"
define i8* @app_expect_equal(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = icmp ne i8* %0, null
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = icmp ne i8* %1, null
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = icmp ne i32 %2, 0
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
%14 = icmp ne i8* %3, null
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = tail call i32 @strspn(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %1, i64 %18
%20 = load i8, i8* %19
%21 = icmp eq i8 %20, 61
br i1 %21, label %25, label %22
22: ; preds = %4
%23 = load i32, i32* @stderr
%24 = tail call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32 %2, i8* %3)
br label %30
25: ; preds = %4
%26 = getelementptr inbounds i8, i8* %19, i64 1
%27 = tail call i32 @strspn(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %26, i64 %28
br label %30
30: ; preds = %25, %22
%31 = phi i8* [ null, %22 ], [ %29, %25 ]
ret i8* %31
}