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


x86 assembly (clang, -O0):
<GP_add_edge_i>:
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    %r8d,-0x18(%rbp)
cmpl   $0x109,-0xc(%rbp)
jne    1150 <GP_add_edge_i+0x40>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    11ad <GP_add_edge_i+0x9d>
cmpl   $0x10a,-0xc(%rbp)
jne    1177 <GP_add_edge_i+0x67>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
jmp    11a8 <GP_add_edge_i+0x98>
cmpl   $0x10b,-0xc(%rbp)
jne    119e <GP_add_edge_i+0x8e>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
jmp    11a3 <GP_add_edge_i+0x93>
jmp    11a3 <GP_add_edge_i+0x93>
jmp    11a8 <GP_add_edge_i+0x98>
jmp    11ad <GP_add_edge_i+0x9d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GP_add_edge_i>:
add    $0xfffffef7,%esi
cmp    $0x2,%esi
ja     1138 <GP_add_edge_i+0x28>
movslq %esi,%rax
lea    0xeff(%rip),%rsi
movslq (%rsi,%rax,4),%rdi
add    %rsi,%rdi
mov    %edx,%esi
mov    %ecx,%edx
mov    %r8d,%ecx
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [12 x i8] c"e %d %d %d\0A\00"
@.str.1 = [12 x i8] c"d %d %d %d\0A\00"
@.str.2 = [12 x i8] c"u %d %d %d\0A\00"
define void @GP_add_edge_i(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %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 i32, i32* %10
%17 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15, i32 %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 i32, i32* %10
%25 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %23, i32 %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 i32, i32* %10
%33 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %30, i32 %31, i32 %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
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"e %d %d %d\0A\00"
@.str.1 = [12 x i8] c"d %d %d %d\0A\00"
@.str.2 = [12 x i8] c"u %d %d %d\0A\00"
@reltable.GP_add_edge_i = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.GP_add_edge_i 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_i 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_i to i64)) to i32)]
define void @GP_add_edge_i(i8* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %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_i to i8*), i64 %10)
%12 = tail call i32 @printf(i8* %11, i32 %2, i32 %3, i32 %4)
br label %13
13: ; preds = %5, %8
ret void
}