#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_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void raise_error(int code) {
  const char *error[4];
  error[0] = "Problem (re)allocating memory";
  error[1] = "Vertex ids must be added sequentially from 0";
  error[2] = "One or more vertices are not in the graph";
  error[3] = "The edge being added is already in the graph";
  fprintf(stderr, "%s\n", error[code]);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<raise_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xee1(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xf03(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xf22(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
movslq -0x4(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rdx
lea    0xf32(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<raise_error>:
sub    $0x28,%rsp
lea    0xed5(%rip),%rax
mov    %rax,(%rsp)
lea    0xee8(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0xf09(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xf27(%rip),%rax
mov    %rax,0x18(%rsp)
mov    0x2e86(%rip),%rax
mov    (%rax),%eax
movslq %edi,%rcx
mov    (%rsp,%rcx,8),%rdx
lea    0xf38(%rip),%rsi
mov    %eax,%edi
call   1030 <fprintf@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Problem (re)allocating memory\00"
@.str.1 = [45 x i8] c"Vertex ids must be added sequentially from 0\00"
@.str.2 = [42 x i8] c"One or more vertices are not in the graph\00"
@.str.3 = [45 x i8] c"The edge being added is already in the graph\00"
@stderr = global i32 0
@.str.4 = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @raise_error(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8*]
store i32 %0, i32* %2
%4 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 1
store i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 2
store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 3
store i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i8** %7
%8 = load i32, i32* @stderr
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 %10
%12 = load i8*, i8** %11
%13 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %12)
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
}

LLVM IR (-O2):
@.str = [30 x i8] c"Problem (re)allocating memory\00"
@.str.1 = [45 x i8] c"Vertex ids must be added sequentially from 0\00"
@.str.2 = [42 x i8] c"One or more vertices are not in the graph\00"
@.str.3 = [45 x i8] c"The edge being added is already in the graph\00"
@stderr = global i32 0
@.str.4 = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @raise_error(i32 %0) {
%2 = alloca [4 x i8*]
%3 = bitcast [4 x i8*]* %2 to i8*
%4 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 1
store i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 2
store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 3
store i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i8** %7
%8 = load i32, i32* @stderr
%9 = sext i32 %0 to i64
%10 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 %9
%11 = load i8*, i8** %10
%12 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %11)
%13 = load i32, i32* @EXIT_FAILURE
%14 = tail call i32 @exit(i32 %13)
unreachable
}