#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*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           unsigned int, char const *, ...);
int /*<<< orphan*/ stderr;
void __assert_fail(const char *assertion, const char *file, unsigned int line,
                   const char *function) {
  if (function)
    fprintf(stderr, "ASSERT : %s:%u:%s:%s\n", file, line, function, assertion);
  else
    fprintf(stderr, "ASSERT : %s:%u:<UNKNOWN>:%s\n", file, line, assertion);
  abort();
}


x86 assembly (clang, -O0):
<__assert_fail>:
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     116d <__assert_fail+0x4d>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x8(%rbp),%r9
lea    0xe9f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    118f <__assert_fail+0x6f>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%r8
lea    0xe8e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<__assert_fail>:
push   %rax
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%r9
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
test   %r8,%r8
jne    1152 <__assert_fail+0x32>
lea    0xed5(%rip),%rsi
mov    %r9,%r8
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>
lea    0xea7(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"ASSERT : %s:%u:%s:%s\0A\00"
@.str.1 = [29 x i8] c"ASSERT : %s:%u:<UNKNOWN>:%s\0A\00"
define void @__assert_fail(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** %6
%14 = load i32, i32* %7
%15 = load i8*, i8** %8
%16 = load i8*, i8** %5
%17 = call i32 (i32, i8*, i8*, i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %13, i32 %14, i8* %15, i8* %16)
br label %24
18: ; preds = %4
%19 = load i32, i32* @stderr
%20 = load i8*, i8** %6
%21 = load i32, i32* %7
%22 = load i8*, i8** %5
%23 = call i32 (i32, i8*, i8*, i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %20, i32 %21, i8* %22)
br label %24
24: ; preds = %18, %11
%25 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"ASSERT : %s:%u:%s:%s\0A\00"
@.str.1 = [29 x i8] c"ASSERT : %s:%u:<UNKNOWN>:%s\0A\00"
define void @__assert_fail(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*, i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i8* %3, i8* %0)
br label %11
9: ; preds = %4
%10 = tail call i32 (i32, i8*, i8*, i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %1, i32 %2, i8* %0)
br label %11
11: ; preds = %9, %7
%12 = tail call i32 (...) @abort()
unreachable
}