#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ctry_abort();
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *,
                           char const *, int, char const *);
int /*<<< orphan*/ *stderr;
void _ctry_assert_failed(const char *file, int line, const char *func,
                         const char *expr) {
  FILE *out = stderr;
  fflush(out);
  fprintf(out, "\n  ctry_assert(%s) %s:%d %s\n", expr, file, line, func);
  fflush(out);
  ctry_abort();
}


x86 assembly (clang, -O0):
<_ctry_assert_failed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <fflush@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%r8d
mov    -0x18(%rbp),%r9
lea    0xe87(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x28(%rbp),%rdi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1040 <ctry_abort@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ctry_assert_failed>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rcx,%r15
mov    %rdx,%r14
mov    %esi,%r12d
mov    %rdi,%rbx
mov    0x2e95(%rip),%rax
mov    (%rax),%rbp
mov    %rbp,%rdi
call   1050 <fflush@plt>
lea    0xea3(%rip),%rsi
mov    %rbp,%rdi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %r12d,%r8d
mov    %r14,%r9
call   1030 <fprintf@plt>
mov    %rbp,%rdi
call   1050 <fflush@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <ctry_abort@plt>

LLVM IR (-O0):
@stderr = global i32* null
@.str = [29 x i8] c"\0A ctry_assert(%s) %s:%d %s\0A\00"
define void @_ctry_assert_failed(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = load i32*, i32** @stderr
store i32* %10, i32** %9
%11 = load i32*, i32** %9
%12 = call i32 @fflush(i32* %11)
%13 = load i32*, i32** %9
%14 = load i8*, i8** %8
%15 = load i8*, i8** %5
%16 = load i32, i32* %6
%17 = load i8*, i8** %7
%18 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %14, i8* %15, i32 %16, i8* %17)
%19 = load i32*, i32** %9
%20 = call i32 @fflush(i32* %19)
%21 = call i32 (...) @ctry_abort()
ret void
}

LLVM IR (-O2):
@stderr = global i32* null
@.str = [29 x i8] c"\0A ctry_assert(%s) %s:%d %s\0A\00"
define void @_ctry_assert_failed(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = load i32*, i32** @stderr
%6 = tail call i32 @fflush(i32* %5)
%7 = tail call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %0, i32 %1, i8* %2)
%8 = tail call i32 @fflush(i32* %5)
%9 = tail call i32 (...) @ctry_abort()
ret void
}