#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*/ AssertionFailure(char *, char *, char *, int);
int /*<<< orphan*/ free(void *);
void ExamplePayloadFree(void *payload) {
  if (payload != NULL)
    ;
  else
    AssertionFailure(
        "payload != NULL",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/jiwpark90/cse333project1/refs/heads/master/"
        "hw1/example_program_ll.c",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/jiwpark90/cse333project1/refs/heads/master/"
        "hw1/example_program_ll.c",
        99);
  free(payload);
}


x86 assembly (clang, -O0):
<ExamplePayloadFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <ExamplePayloadFree+0x1c>
jmp    1157 <ExamplePayloadFree+0x37>
lea    0xebd(%rip),%rdi
lea    0xec6(%rip),%rdx
mov    $0x63,%ecx
mov    %rdx,%rsi
call   1040 <AssertionFailure@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExamplePayloadFree>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1144 <ExamplePayloadFree+0x24>
lea    0xed0(%rip),%rdi
lea    0xed9(%rip),%rdx
mov    %rdx,%rsi
mov    $0x63,%ecx
call   1040 <AssertionFailure@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"payload != NULL\00"
@.str.1 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jiwpark90/cse333project1/refs/heads/master/hw1/example_program_ll.c\00"
define void @ExamplePayloadFree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %8
6: ; preds = %1
%7 = call i32 @AssertionFailure(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.1, i64 0, i64 0), i32 99)
br label %8
8: ; preds = %6, %5
%9 = load i8*, i8** %2
%10 = call i32 @free(i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"payload != NULL\00"
@.str.1 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jiwpark90/cse333project1/refs/heads/master/hw1/example_program_ll.c\00"
define void @ExamplePayloadFree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @AssertionFailure(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.1, i64 0, i64 0), i32 99)
br label %5
5: ; preds = %1, %3
%6 = tail call i32 @free(i8* %0)
ret void
}