#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*/ free(char *);
int /*<<< orphan*/ printf(char *, int, int, char *);
void GP_add_edge_s(void *arg, int type, int src, int dst, char *label) {
  if (type == 265) {
    printf("e %d %d %s\n", src, dst, label);
  } else if (type == 266) {
    printf("d %d %d %s\n", src, dst, label);
  } else if (type == 267) {
    printf("u %d %d %s\n", src, dst, label);
  } else {
  }
  free(label);
}


x86 assembly (clang, -O0):
<GP_add_edge_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
cmpl   $0x109,-0xc(%rbp)
jne    1161 <GP_add_edge_s+0x41>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
jmp    11c0 <GP_add_edge_s+0xa0>
cmpl   $0x10a,-0xc(%rbp)
jne    1189 <GP_add_edge_s+0x69>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
jmp    11bb <GP_add_edge_s+0x9b>
cmpl   $0x10b,-0xc(%rbp)
jne    11b1 <GP_add_edge_s+0x91>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
jmp    11b6 <GP_add_edge_s+0x96>
jmp    11b6 <GP_add_edge_s+0x96>
jmp    11bb <GP_add_edge_s+0x9b>
jmp    11c0 <GP_add_edge_s+0xa0>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GP_add_edge_s>:
push   %rbx
mov    %r8,%rbx
add    $0xfffffef7,%esi
cmp    $0x2,%esi
ja     114c <GP_add_edge_s+0x2c>
movslq %esi,%rax
lea    0xeeb(%rip),%rsi
movslq (%rsi,%rax,4),%rdi
add    %rsi,%rdi
mov    %edx,%esi
mov    %ecx,%edx
mov    %rbx,%rcx
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"e %d %d %s\0A\00"
@.str.1 = [12 x i8] c"d %d %d %s\0A\00"
@.str.2 = [12 x i8] c"u %d %d %s\0A\00"
define void @GP_add_edge_s(i8* %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load i32, i32* %7
%12 = icmp eq i32 %11, 265
br i1 %12, label %13, label %18
13: ; preds = %5
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i8*, i8** %10
%17 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15, i8* %16)
br label %37
18: ; preds = %5
%19 = load i32, i32* %7
%20 = icmp eq i32 %19, 266
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = load i32, i32* %8
%23 = load i32, i32* %9
%24 = load i8*, i8** %10
%25 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %23, i8* %24)
br label %36
26: ; preds = %18
%27 = load i32, i32* %7
%28 = icmp eq i32 %27, 267
br i1 %28, label %29, label %34
29: ; preds = %26
%30 = load i32, i32* %8
%31 = load i32, i32* %9
%32 = load i8*, i8** %10
%33 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %30, i32 %31, i8* %32)
br label %35
34: ; preds = %26
br label %35
35: ; preds = %34, %29
br label %36
36: ; preds = %35, %21
br label %37
37: ; preds = %36, %13
%38 = load i8*, i8** %10
%39 = call i32 @free(i8* %38)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"e %d %d %s\0A\00"
@.str.1 = [12 x i8] c"d %d %d %s\0A\00"
@.str.2 = [12 x i8] c"u %d %d %s\0A\00"
@reltable.GP_add_edge_s = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.GP_add_edge_s to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.GP_add_edge_s to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.GP_add_edge_s to i64)) to i32)]
define void @GP_add_edge_s(i8* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = add i32 %1, -265
%7 = icmp ult i32 %6, 3
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = sext i32 %6 to i64
%10 = shl i64 %9, 2
%11 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.GP_add_edge_s to i8*), i64 %10)
%12 = tail call i32 @printf(i8* %11, i32 %2, i32 %3, i8* %4)
br label %13
13: ; preds = %5, %8
%14 = tail call i32 @free(i8* %4)
ret void
}