#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 *, ...);
void _REQUIRE_CASE_failed(char *statement, int line) {
  if (statement)
    printf("\t%sFailed statement case line %d :\n\t\t%s %s\n",
           _get_color_lassert(1), line, statement, _get_color_lassert(0));
  else
    printf("%sA test failed line %d but statement could not be read (NULL "
           "PTR)%s\n",
           _get_color_lassert(1), line, _get_color_lassert(0));
}


x86 assembly (clang, -O0):
<_REQUIRE_CASE_failed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     117e <_REQUIRE_CASE_failed+0x5e>
mov    $0x1,%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
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b1 <_REQUIRE_CASE_failed+0x91>
mov    $0x1,%edi
call   1040 <_get_color_lassert@plt>
mov    %rax,-0x38(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
xor    %edi,%edi
call   1040 <_get_color_lassert@plt>
mov    -0x38(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    %rax,%rcx
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_REQUIRE_CASE_failed>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
mov    $0x1,%edi
call   1040 <_get_color_lassert@plt>
mov    %rax,%rbp
xor    %edi,%edi
call   1040 <_get_color_lassert@plt>
test   %rbx,%rbx
je     1161 <_REQUIRE_CASE_failed+0x41>
lea    0xeb6(%rip),%rdi
mov    %rbp,%rsi
mov    %r14d,%edx
mov    %rbx,%rcx
mov    %rax,%r8
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>
lea    0xec4(%rip),%rdi
mov    %rbp,%rsi
mov    %r14d,%edx
mov    %rax,%rcx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"\09%sFailed statement case line %d :\0A\09\09%s %s\0A\00"
@.str.1 = [70 x i8] c"%sA test failed line %d but statement could not be read (NULL PTR)%s\0A\00"
define void @_REQUIRE_CASE_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 1)
%9 = load i32, i32* %4
%10 = load i8*, i8** %3
%11 = call i8* @_get_color_lassert(i32 0)
%12 = call i32 (i8*, i8*, i32, i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9, i8* %10, i8* %11)
br label %18
13: ; preds = %2
%14 = call i8* @_get_color_lassert(i32 1)
%15 = load i32, i32* %4
%16 = call i8* @_get_color_lassert(i32 0)
%17 = call i32 (i8*, i8*, i32, i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.1, i64 0, i64 0), i8* %14, i32 %15, i8* %16)
br label %18
18: ; preds = %13, %7
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"\09%sFailed statement case line %d :\0A\09\09%s %s\0A\00"
@.str.1 = [70 x i8] c"%sA test failed line %d but statement could not be read (NULL PTR)%s\0A\00"
define void @_REQUIRE_CASE_failed(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
%4 = tail call i8* @_get_color_lassert(i32 1)
%5 = tail call i8* @_get_color_lassert(i32 0)
br i1 %3, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (i8*, i8*, i32, i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %1, i8* %0, i8* %5)
br label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i8*, i32, i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.1, i64 0, i64 0), i8* %4, i32 %1, i8* %5)
br label %10
10: ; preds = %8, %6
ret void
}