#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*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, ...);
int /*<<< orphan*/ stderr;
void _internal_print_assert(const char *expr, const char *file, int line,
                            const char *msg) {
  if (msg) {
    fprintf(stderr,
            "\n-------------------\nASSERT(%s) -- "
            "%s\n%s:%d\n--------------------\n",
            expr, msg, file, line);
  } else {
    fprintf(stderr,
            "\n-------------------\nASSERT(%s)\n%s:%d\n--------------------\n",
            expr, file, line);
  }
}


x86 assembly (clang, -O0):
<_internal_print_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115e <_internal_print_assert+0x4e>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x14(%rbp),%r9d
lea    0xeae(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1181 <_internal_print_assert+0x71>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0xec8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_internal_print_assert>:
mov    %edx,%r9d
mov    %rsi,%r8
mov    %rdi,%rdx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
test   %rcx,%rcx
je     1135 <_internal_print_assert+0x25>
lea    0xed2(%rip),%rsi
xor    %eax,%eax
jmp    1030 <fprintf@plt>
lea    0xf06(%rip),%rsi
mov    %r8,%rcx
mov    %r9d,%r8d
xor    %eax,%eax
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [66 x i8] c"\0A-------------------\0AASSERT(%s) -- %s\0A%s:%d\0A--------------------\0A\00"
@.str.1 = [60 x i8] c"\0A-------------------\0AASSERT(%s)\0A%s:%d\0A--------------------\0A\00"
define void @_internal_print_assert(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %18
11: ; preds = %4
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %5
%14 = load i8*, i8** %8
%15 = load i8*, i8** %6
%16 = load i32, i32* %7
%17 = call i32 (i32, i8*, i8*, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14, i8* %15, i32 %16)
br label %24
18: ; preds = %4
%19 = load i32, i32* @stderr
%20 = load i8*, i8** %5
%21 = load i8*, i8** %6
%22 = load i32, i32* %7
%23 = call i32 (i32, i8*, i8*, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0), i8* %20, i8* %21, i32 %22)
br label %24
24: ; preds = %18, %11
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [66 x i8] c"\0A-------------------\0AASSERT(%s) -- %s\0A%s:%d\0A--------------------\0A\00"
@.str.1 = [60 x i8] c"\0A-------------------\0AASSERT(%s)\0A%s:%d\0A--------------------\0A\00"
define void @_internal_print_assert(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = icmp eq i8* %3, null
%6 = load i32, i32* @stderr
br i1 %5, label %9, label %7
7: ; preds = %4
%8 = tail call i32 (i32, i8*, i8*, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3, i8* %1, i32 %2)
br label %11
9: ; preds = %4
%10 = tail call i32 (i32, i8*, i8*, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
br label %11
11: ; preds = %9, %7
ret void
}