#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 ENOTSUP;
int /*<<< orphan*/ print_on_level(int, char *, int);
scalar_t__ strcmp(char *, char *);
int cr_plugin_dump_ext_link(int index, int type, char *kind) {
  if (strcmp(kind, "macvlan"))
    return -ENOTSUP;
  else {
    print_on_level((3), "Dump %d macvlan\n", index);
    return 0;
  }
}


x86 assembly (clang, -O0):
<cr_plugin_dump_ext_link>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xec3(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     115f <cr_plugin_dump_ext_link+0x3f>
xor    %eax,%eax
mov    0x2e93(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    117a <cr_plugin_dump_ext_link+0x5a>
mov    -0x8(%rbp),%edx
mov    $0x3,%edi
lea    0xe9a(%rip),%rsi
call   1040 <print_on_level@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cr_plugin_dump_ext_link>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rsi
mov    %rdx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1144 <cr_plugin_dump_ext_link+0x24>
mov    0x2eaa(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
pop    %rbx
ret
lea    0xebd(%rip),%rsi
mov    $0x3,%edi
mov    %ebx,%edx
call   1040 <print_on_level@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"macvlan\00"
@ENOTSUP = global i32 0
@.str.1 = [17 x i8] c"Dump %d macvlan\0A\00"
define i32 @cr_plugin_dump_ext_link(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%8 = load i8*, i8** %7
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load i32, i32* @ENOTSUP
%13 = sub nsw i32 0, %12
store i32 %13, i32* %4
br label %17
14: ; preds = %3
%15 = load i32, i32* %5
%16 = call i32 @print_on_level(i32 3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %15)
store i32 0, i32* %4
br label %17
17: ; preds = %14, %11
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
@.str = [8 x i8] c"macvlan\00"
@ENOTSUP = global i32 0
@.str.1 = [17 x i8] c"Dump %d macvlan\0A\00"
define i32 @cr_plugin_dump_ext_link(i32 %0, i32 %1, i8* %2) {
%4 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = load i32, i32* @ENOTSUP
%8 = sub nsw i32 0, %7
br label %11
9: ; preds = %3
%10 = tail call i32 @print_on_level(i32 3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %0)
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ 0, %9 ]
ret i32 %12
}