#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*/ strlen(char const *);
int /*<<< orphan*/ unsafe_write_cstr(char const *, int /*<<< orphan*/);
void private_abort(const char *msg, const char *func) {
  const char *str_txt1 = "\033[1;31mFATAL ERROR\033[0m [\033[1;33m";
  const char *str_txt2 = "\033[0m]: ";
  const char *str_endl = "\n";
  unsafe_write_cstr(str_txt1, strlen(str_txt1));
  unsafe_write_cstr(func, strlen(func));
  unsafe_write_cstr(str_txt2, strlen(str_txt2));
  unsafe_write_cstr(msg, strlen(msg));
  unsafe_write_cstr(str_endl, strlen(str_endl));
  abort();
}


x86 assembly (clang, -O0):
<private_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb9(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xece(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xecb(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x50(%rbp),%rdi
mov    %eax,%esi
call   1040 <unsafe_write_cstr@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x48(%rbp),%rdi
mov    %eax,%esi
call   1040 <unsafe_write_cstr@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%esi
call   1040 <unsafe_write_cstr@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%esi
call   1040 <unsafe_write_cstr@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%esi
call   1040 <unsafe_write_cstr@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<private_abort>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xebe(%rip),%r15
mov    %r15,%rdi
call   1050 <strlen@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1040 <unsafe_write_cstr@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <unsafe_write_cstr@plt>
lea    0xeb3(%rip),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <unsafe_write_cstr@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1040 <unsafe_write_cstr@plt>
lea    0xe90(%rip),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <unsafe_write_cstr@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"\1B[1;31mFATAL ERROR\1B[0m [\1B[1;33m\00"
@.str.1 = [8 x i8] c"\1B[0m]: \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @private_abort(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8** %5
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %7
%8 = load i8*, i8** %5
%9 = load i8*, i8** %5
%10 = call i32 @strlen(i8* %9)
%11 = call i32 @unsafe_write_cstr(i8* %8, i32 %10)
%12 = load i8*, i8** %4
%13 = load i8*, i8** %4
%14 = call i32 @strlen(i8* %13)
%15 = call i32 @unsafe_write_cstr(i8* %12, i32 %14)
%16 = load i8*, i8** %6
%17 = load i8*, i8** %6
%18 = call i32 @strlen(i8* %17)
%19 = call i32 @unsafe_write_cstr(i8* %16, i32 %18)
%20 = load i8*, i8** %3
%21 = load i8*, i8** %3
%22 = call i32 @strlen(i8* %21)
%23 = call i32 @unsafe_write_cstr(i8* %20, i32 %22)
%24 = load i8*, i8** %7
%25 = load i8*, i8** %7
%26 = call i32 @strlen(i8* %25)
%27 = call i32 @unsafe_write_cstr(i8* %24, i32 %26)
%28 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [32 x i8] c"\1B[1;31mFATAL ERROR\1B[0m [\1B[1;33m\00"
@.str.1 = [8 x i8] c"\1B[0m]: \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @private_abort(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @unsafe_write_cstr(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @strlen(i8* %1)
%6 = tail call i32 @unsafe_write_cstr(i8* %1, i32 %5)
%7 = tail call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @unsafe_write_cstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = tail call i32 @strlen(i8* %0)
%10 = tail call i32 @unsafe_write_cstr(i8* %0, i32 %9)
%11 = tail call i32 @strlen(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%12 = tail call i32 @unsafe_write_cstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %11)
%13 = tail call i32 (...) @abort()
unreachable
}