#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_FAILURE;
int /*<<< orphan*/ debug_printf(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void report_gettest(char *a, char *i) {
  if (a == i) {
    debug_printf("Success\n");
  } else if (a == NULL) {
    debug_printf("Failure (not found)\n");
    exit(EXIT_FAILURE);
  } else {
    debug_printf("Failure (incorrect match)\n");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<report_gettest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    114f <report_gettest+0x2f>
lea    0xebb(%rip),%rdi
call   1030 <debug_printf@plt>
jmp    118e <report_gettest+0x6e>
cmpq   $0x0,-0x8(%rbp)
jne    1174 <report_gettest+0x54>
lea    0xea8(%rip),%rdi
call   1030 <debug_printf@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
lea    0xea3(%rip),%rdi
call   1030 <debug_printf@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report_gettest>:
push   %rax
cmp    %rsi,%rdi
jne    1133 <report_gettest+0x13>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <debug_printf@plt>
test   %rdi,%rdi
jne    1141 <report_gettest+0x21>
lea    0xeca(%rip),%rdi
jmp    1148 <report_gettest+0x28>
lea    0xed6(%rip),%rdi
call   1030 <debug_printf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"Success\0A\00"
@.str.1 = [21 x i8] c"Failure (not found)\0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [27 x i8] c"Failure (incorrect match)\0A\00"
define void @report_gettest(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp eq i8* %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @debug_printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %21
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = call i32 @debug_printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32, i32* @EXIT_FAILURE
%16 = call i32 @exit(i32 %15)
unreachable
17: ; preds = %10
%18 = call i32 @debug_printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%19 = load i32, i32* @EXIT_FAILURE
%20 = call i32 @exit(i32 %19)
unreachable
21: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"Success\0A\00"
@.str.1 = [21 x i8] c"Failure (not found)\0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [27 x i8] c"Failure (incorrect match)\0A\00"
define void @report_gettest(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @debug_printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
6: ; preds = %2
%7 = icmp eq i8* %0, null
br i1 %7, label %8, label %12
8: ; preds = %6
%9 = tail call i32 @debug_printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
%11 = tail call i32 @exit(i32 %10)
unreachable
12: ; preds = %6
%13 = tail call i32 @debug_printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%14 = load i32, i32* @EXIT_FAILURE
%15 = tail call i32 @exit(i32 %14)
unreachable
}