#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 */
char *_get_color_lassert(int);
int /*<<< orphan*/ printf(char *, char *, int, char *, char *);
void _REQUIRE_CASE_not_null_failed(char *ptr, int line) {
  if (ptr)
    printf("\t%sFailed to allocate a pointer line %d :\n\t\t%s %s\n",
           _get_color_lassert(3), line, ptr, _get_color_lassert(0));
  else
    printf("%sFailed to allocate a pointer line %d :\n\t%sCouldn't read "
           "pointer's name%s\n",
           _get_color_lassert(3), line, _get_color_lassert(1),
           _get_color_lassert(0));
}


x86 assembly (clang, -O0):
<_REQUIRE_CASE_not_null_failed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     117c <_REQUIRE_CASE_not_null_failed+0x5c>
mov    $0x3,%edi
call   1040 <_get_color_lassert@plt>
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %edi,%edi
call   1040 <_get_color_lassert@plt>
mov    -0x28(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    %rax,%r8
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
jmp    11bf <_REQUIRE_CASE_not_null_failed+0x9f>
mov    $0x3,%edi
call   1040 <_get_color_lassert@plt>
mov    %rax,-0x40(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    $0x1,%edi
call   1040 <_get_color_lassert@plt>
mov    %rax,-0x30(%rbp)
xor    %edi,%edi
call   1040 <_get_color_lassert@plt>
mov    -0x40(%rbp),%rsi
mov    -0x34(%rbp),%edx
mov    -0x30(%rbp),%rcx
mov    %rax,%r8
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_REQUIRE_CASE_not_null_failed>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    $0x3,%edi
call   1040 <_get_color_lassert@plt>
mov    %rax,%rbx
test   %rbp,%rbp
je     114c <_REQUIRE_CASE_not_null_failed+0x2c>
xor    %edi,%edi
call   1040 <_get_color_lassert@plt>
lea    0xeb6(%rip),%rdi
jmp    1167 <_REQUIRE_CASE_not_null_failed+0x47>
mov    $0x1,%edi
call   1040 <_get_color_lassert@plt>
mov    %rax,%rbp
xor    %edi,%edi
call   1040 <_get_color_lassert@plt>
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %rbp,%rcx
mov    %rax,%r8
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"\09%sFailed to allocate a pointer line %d :\0A\09\09%s %s\0A\00"
@.str.1 = [76 x i8] c"%sFailed to allocate a pointer line %d :\0A\09%sCouldn't read pointer's name%s\0A\00"
define void @_REQUIRE_CASE_not_null_failed(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = call i8* @_get_color_lassert(i32 3)
%9 = load i32, i32* %4
%10 = load i8*, i8** %3
%11 = call i8* @_get_color_lassert(i32 0)
%12 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9, i8* %10, i8* %11)
br label %19
13: ; preds = %2
%14 = call i8* @_get_color_lassert(i32 3)
%15 = load i32, i32* %4
%16 = call i8* @_get_color_lassert(i32 1)
%17 = call i8* @_get_color_lassert(i32 0)
%18 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i8* %14, i32 %15, i8* %16, i8* %17)
br label %19
19: ; preds = %13, %7
ret void
}

LLVM IR (-O2):
@.str = [51 x i8] c"\09%sFailed to allocate a pointer line %d :\0A\09\09%s %s\0A\00"
@.str.1 = [76 x i8] c"%sFailed to allocate a pointer line %d :\0A\09%sCouldn't read pointer's name%s\0A\00"
define void @_REQUIRE_CASE_not_null_failed(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
%4 = tail call i8* @_get_color_lassert(i32 3)
br i1 %3, label %8, label %5
5: ; preds = %2
%6 = tail call i8* @_get_color_lassert(i32 0)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %1, i8* %0, i8* %6)
br label %12
8: ; preds = %2
%9 = tail call i8* @_get_color_lassert(i32 1)
%10 = tail call i8* @_get_color_lassert(i32 0)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i8* %4, i32 %1, i8* %9, i8* %10)
br label %12
12: ; preds = %8, %5
ret void
}