#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);
scalar_t__ strcasecmp(char const *, char const *);
int StrEqual(const char *first, const char *second) {
  assert((0 != (first)));
  assert((0 != (second)));
  if ((0 != (first)) && (0 != (second))) {
    return (0 == strcasecmp(first, second));
  }
  return (1 == 0);
}


x86 assembly (clang, -O0):
<StrEqual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
je     1193 <StrEqual+0x73>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
je     1193 <StrEqual+0x73>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    119a <StrEqual+0x7a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrEqual>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1040 <assert@plt>
xor    %eax,%eax
test   %rbx,%rbx
je     1168 <StrEqual+0x48>
test   %r14,%r14
je     1168 <StrEqual+0x48>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcasecmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @StrEqual(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = icmp ne i8* null, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %5
%11 = icmp ne i8* null, %10
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i8*, i8** %4
%15 = icmp ne i8* null, %14
br i1 %15, label %16, label %25
16: ; preds = %2
%17 = load i8*, i8** %5
%18 = icmp ne i8* null, %17
br i1 %18, label %19, label %25
19: ; preds = %16
%20 = load i8*, i8** %4
%21 = load i8*, i8** %5
%22 = call i64 @strcasecmp(i8* %20, i8* %21)
%23 = icmp eq i64 0, %22
%24 = zext i1 %23 to i32
store i32 %24, i32* %3
br label %26
25: ; preds = %16, %2
store i32 0, i32* %3
br label %26
26: ; preds = %25, %19
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @StrEqual(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i8* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = and i1 %3, %6
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = tail call i64 @strcasecmp(i8* %0, i8* %1)
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %2, %10
%15 = phi i32 [ %13, %10 ], [ 0, %2 ]
ret i32 %15
}