#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*/ exit(int);
int /*<<< orphan*/ printf(char *, char *, int, char *, char *);
int /*<<< orphan*/ printfail();
int /*<<< orphan*/ strcmp(char *, char *);
void fexpect_string(char *file, int line, char *a, char *b) {
  if (!strcmp(a, b))
    return;
  printfail();
  printf("%s:%d: \"%s\" expected, but got \"%s\"\n", file, line, a, b);
  exit(1);
}


x86 assembly (clang, -O0):
<fexpect_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1173 <fexpect_string+0x33>
add    $0x20,%rsp
pop    %rbp
ret
mov    $0x0,%al
call   1050 <printfail@plt>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<fexpect_string>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%r15d
mov    %rdi,%rbp
mov    %rdx,%rdi
mov    %rcx,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    116d <fexpect_string+0x2d>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   1050 <printfail@plt>
lea    0xe85(%rip),%rdi
mov    %rbp,%rsi
mov    %r15d,%edx
mov    %rbx,%rcx
mov    %r14,%r8
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"%s:%d: \22%s\22 expected, but got \22%s\22\0A\00"
define void @fexpect_string(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %7
%10 = load i8*, i8** %8
%11 = call i32 @strcmp(i8* %9, i8* %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %4
ret void
14: ; preds = %4
%15 = call i32 (...) @printfail()
%16 = load i8*, i8** %5
%17 = load i32, i32* %6
%18 = load i8*, i8** %7
%19 = load i8*, i8** %8
%20 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %16, i32 %17, i8* %18, i8* %19)
%21 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [36 x i8] c"%s:%d: \22%s\22 expected, but got \22%s\22\0A\00"
define void @fexpect_string(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(1) %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4
ret void
8: ; preds = %4
%9 = tail call i32 (...) @printfail()
%10 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2, i8* %3)
%11 = tail call i32 @exit(i32 1)
unreachable
}