#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 */
void crError(char *, char *, char *, int);
int /*<<< orphan*/ memset(void *, int, unsigned int);
void crMemset(void *ptr, int value, unsigned int bytes) {
  ((ptr) ? (void)0
         : crError("Assertion failed: %s, file %s, line %d", "ptr",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/alown/chromium/refs/"
                   "heads/cmake-fixing/util/mem.c",
                   123));
  memset(ptr, value, bytes);
}


x86 assembly (clang, -O0):
<crMemset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1142 <crMemset+0x22>
jmp    1161 <crMemset+0x41>
lea    0xeb7(%rip),%rdi
lea    0xed7(%rip),%rsi
lea    0xed4(%rip),%rdx
mov    $0x7b,%ecx
call   1030 <crError@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crMemset>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1150 <crMemset+0x30>
lea    0xec8(%rip),%rdi
lea    0xee8(%rip),%rsi
lea    0xee5(%rip),%rdx
mov    $0x7b,%ecx
call   1030 <crError@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <memset@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Assertion failed: %s, file %s, line %d\00"
@.str.1 = [4 x i8] c"ptr\00"
@.str.2 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/alown/chromium/refs/heads/cmake-fixing/util/mem.c\00"
define void @crMemset(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %10
9: ; preds = %3
br label %11
10: ; preds = %3
br label %11
11: ; preds = %10, %9
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @memset(i8* %12, i32 %13, i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Assertion failed: %s, file %s, line %d\00"
@.str.1 = [4 x i8] c"ptr\00"
@.str.2 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/alown/chromium/refs/heads/cmake-fixing/util/mem.c\00"
define void @crMemset(i8* %0, i32 %1, i32 %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %6
5: ; preds = %3
tail call void @crError(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.2, i64 0, i64 0), i32 123)
br label %6
6: ; preds = %3, %5
%7 = tail call i32 @memset(i8* %0, i32 %1, i32 %2)
ret void
}