#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 */
typedef int /*<<< orphan*/ p;
typedef int /*<<< orphan*/ bytes;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int test_mem_eq(char *, int, char *, char *, char **, int, char *, int);
int test_sanity_null_zero(void) {
  char *p;
  char bytes[sizeof(p)];
  p = NULL;
  memset(bytes, 0, sizeof(bytes));
  return test_mem_eq(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/"
      "Src/OSF/OpenSSL-111/test/sanitytest.c",
      21, "&p", "bytes", &p, sizeof(p), bytes, sizeof(bytes));
}


x86 assembly (clang, -O0):
<test_sanity_null_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
lea    -0x10(%rbp),%rax
lea    0xeb5(%rip),%rdi
mov    $0x15,%esi
lea    0xf57(%rip),%rdx
lea    0xf53(%rip),%rcx
lea    -0x8(%rbp),%r8
mov    $0x8,%r9d
mov    %rax,(%rsp)
movl   $0x8,0x8(%rsp)
call   1040 <test_mem_eq@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sanity_null_zero>:
push   %rbx
sub    $0x10,%rsp
movq   $0x0,(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
lea    0xeb8(%rip),%rdi
lea    0xf5f(%rip),%rdx
lea    0xf5b(%rip),%rcx
mov    %rsp,%r8
mov    $0x15,%esi
mov    $0x8,%r9d
push   $0x8
push   %rbx
call   1040 <test_mem_eq@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [174 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/sanitytest.c\00"
@.str.1 = [3 x i8] c"&p\00"
@.str.2 = [6 x i8] c"bytes\00"
define i32 @test_sanity_null_zero() {
%1 = alloca i8*
%2 = alloca [8 x i8]
store i8* null, i8** %1
%3 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i32 0, i32 8)
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%6 = call i32 @test_mem_eq(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %1, i32 8, i8* %5, i32 8)
ret i32 %6
}

LLVM IR (-O2):
@.str = [174 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/sanitytest.c\00"
@.str.1 = [3 x i8] c"&p\00"
@.str.2 = [6 x i8] c"bytes\00"
define i32 @test_sanity_null_zero() {
%1 = alloca i8*
%2 = alloca [8 x i8]
%3 = bitcast i8** %1 to i8*
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
store i8* null, i8** %1
%5 = call i32 @memset(i8* %4, i32 0, i32 8)
%6 = call i32 @test_mem_eq(i8* getelementptr inbounds ([174 x i8], [174 x i8]* @.str, i64 0, i64 0), i32 21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %1, i32 8, i8* %4, i32 8)
ret i32 %6
}