#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*/ ft_putstr_fd(char *, int);
int ft_strlen(char *);
int /*<<< orphan*/ write(int, char *, int);
void exit_error(char *error) {
  ft_putstr_fd(("\x1b[31m"), 2);
  ft_putstr_fd("error: ", 2);
  ft_putstr_fd(("\x1b[0m"), 2);
  write(2, error, ft_strlen(error));
  write(2, "\n", 1);
  exit(-42);
}


x86 assembly (clang, -O0):
<exit_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
mov    $0x2,%esi
call   1050 <ft_putstr_fd@plt>
lea    0xea2(%rip),%rdi
mov    $0x2,%esi
call   1050 <ft_putstr_fd@plt>
lea    0xe99(%rip),%rdi
mov    $0x2,%esi
call   1050 <ft_putstr_fd@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    $0x2,%edi
lea    0xe67(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0xffffffd6,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<exit_error>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
mov    $0x2,%esi
call   1050 <ft_putstr_fd@plt>
lea    0xeaa(%rip),%rdi
mov    $0x2,%esi
call   1050 <ft_putstr_fd@plt>
lea    0xea1(%rip),%rdi
mov    $0x2,%esi
call   1050 <ft_putstr_fd@plt>
mov    %rbx,%rdi
call   1040 <ft_strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xe7e(%rip),%rsi
mov    $0x2,%edi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0xffffffd6,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[31m\00"
@.str.1 = [8 x i8] c"error: \00"
@.str.2 = [5 x i8] c"\1B[0m\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @exit_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @ft_putstr_fd(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = call i32 @ft_putstr_fd(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 2)
%5 = call i32 @ft_putstr_fd(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 2)
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @ft_strlen(i8* %7)
%9 = call i32 @write(i32 2, i8* %6, i32 %8)
%10 = call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 1)
%11 = call i32 @exit(i32 -42)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[31m\00"
@.str.1 = [8 x i8] c"error: \00"
@.str.2 = [5 x i8] c"\1B[0m\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @exit_error(i8* %0) {
%2 = tail call i32 @ft_putstr_fd(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = tail call i32 @ft_putstr_fd(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 2)
%4 = tail call i32 @ft_putstr_fd(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 2)
%5 = tail call i32 @ft_strlen(i8* %0)
%6 = tail call i32 @write(i32 2, i8* %0, i32 %5)
%7 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 1)
%8 = tail call i32 @exit(i32 -42)
unreachable
}