#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 */
scalar_t__ either_or_both_is_null(char const *, char const *);
int /*<<< orphan*/ expect_equal_string_failed(char const *, char const *,
                                              char const *, int);
int /*<<< orphan*/ expectation_passed();
int /*<<< orphan*/ is_equal_string(char const *, char const *);
void _expect_equal_string(const char *exp, const char *act, const char *file,
                          int line) {
  if (either_or_both_is_null(exp, act) || !is_equal_string(exp, act))
    expect_equal_string_failed(exp, act, file, line);
  else
    expectation_passed();
}


x86 assembly (clang, -O0):
<_expect_equal_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <either_or_both_is_null@plt>
cmp    $0x0,%rax
jne    1184 <_expect_equal_string+0x44>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <is_equal_string@plt>
cmp    $0x0,%eax
jne    119d <_expect_equal_string+0x5d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1050 <expect_equal_string_failed@plt>
jmp    11a4 <_expect_equal_string+0x64>
mov    $0x0,%al
call   1040 <expectation_passed@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_expect_equal_string>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %rdi,%rbx
call   1060 <either_or_both_is_null@plt>
test   %rax,%rax
je     1178 <_expect_equal_string+0x38>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <expect_equal_string_failed@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1030 <is_equal_string@plt>
test   %eax,%eax
je     115d <_expect_equal_string+0x1d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <expectation_passed@plt>

LLVM IR (-O0):
define void @_expect_equal_string(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i64 @either_or_both_is_null(i8* %9, i8* %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %18, label %13
13: ; preds = %4
%14 = load i8*, i8** %5
%15 = load i8*, i8** %6
%16 = call i32 @is_equal_string(i8* %14, i8* %15)
%17 = icmp ne i32 %16, 0
br i1 %17, label %24, label %18
18: ; preds = %13, %4
%19 = load i8*, i8** %5
%20 = load i8*, i8** %6
%21 = load i8*, i8** %7
%22 = load i32, i32* %8
%23 = call i32 @expect_equal_string_failed(i8* %19, i8* %20, i8* %21, i32 %22)
br label %26
24: ; preds = %13
%25 = call i32 (...) @expectation_passed()
br label %26
26: ; preds = %24, %18
ret void
}

LLVM IR (-O2):
define void @_expect_equal_string(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i64 @either_or_both_is_null(i8* %0, i8* %1)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = tail call i32 @is_equal_string(i8* %0, i8* %1)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7, %4
%11 = tail call i32 @expect_equal_string_failed(i8* %0, i8* %1, i8* %2, i32 %3)
br label %14
12: ; preds = %7
%13 = tail call i32 (...) @expectation_passed()
br label %14
14: ; preds = %12, %10
ret void
}