#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, int, char *, char const *);
int /*<<< orphan*/ stderr;
void __assert_func(const char *file, int line, const char *func,
                   const char *failedexpr) {
  fprintf(stderr, "assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
          failedexpr, file, line, func ? ", function: " : "", func ? func : "");
  exit(6);
}


x86 assembly (clang, -O0):
<__assert_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%rdx
lea    0xeca(%rip),%rax
lea    0xec4(%rip),%rcx
cmp    $0x0,%rdx
cmovne %rcx,%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     118f <__assert_func+0x6f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x50(%rbp)
jmp    119f <__assert_func+0x7f>
lea    0xe98(%rip),%rax
mov    %rax,-0x50(%rbp)
jmp    119f <__assert_func+0x7f>
mov    -0x28(%rbp),%r9
mov    -0x2c(%rbp),%r8d
mov    -0x38(%rbp),%rcx
mov    -0x40(%rbp),%rdx
mov    -0x44(%rbp),%edi
mov    -0x50(%rbp),%rax
lea    0xe43(%rip),%rsi
mov    %rax,(%rsp)
call   1030 <fprintf@plt>
mov    $0x6,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<__assert_func>:
push   %rax
mov    %esi,%r8d
mov    %rdi,%rax
mov    0x2eb2(%rip),%rsi
mov    (%rsi),%edi
test   %rdx,%rdx
lea    0xef4(%rip),%rsi
lea    0xeee(%rip),%r9
cmove  %rsi,%r9
cmove  %rsi,%rdx
mov    %rdx,(%rsp)
lea    0xeac(%rip),%rsi
mov    %rcx,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
mov    $0x6,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"assertion \22%s\22 failed: file \22%s\22, line %d%s%s\0A\00"
@.str.1 = [13 x i8] c", function: \00"
@.str.2 = [1 x i8] zeroinitializer
define void @__assert_func(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %8
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = load i8*, i8** %7
%14 = icmp ne i8* %13, null
%15 = zext i1 %14 to i64
%16 = select i1 %14, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%17 = load i8*, i8** %7
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %21
19: ; preds = %4
%20 = load i8*, i8** %7
br label %22
21: ; preds = %4
br label %22
22: ; preds = %21, %19
%23 = phi i8* [ %20, %19 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), %21 ]
%24 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i32 %12, i8* %16, i8* %23)
%25 = call i32 @exit(i32 6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"assertion \22%s\22 failed: file \22%s\22, line %d%s%s\0A\00"
@.str.1 = [13 x i8] c", function: \00"
@.str.2 = [1 x i8] zeroinitializer
define void @__assert_func(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = load i32, i32* @stderr
%6 = icmp eq i8* %2, null
%7 = select i1 %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0)
%8 = select i1 %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* %2
%9 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %0, i32 %1, i8* %7, i8* %8)
%10 = tail call i32 @exit(i32 6)
unreachable
}