#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 br_set_trill_vni(char *const, char *const, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *const, char *);
int br_cmd_delvni(int argc, char *const *argv) {
  int err;
  err = br_set_trill_vni(argv[1], argv[2], 0);
  printf("delting vni from interface %s  %s\n", argv[2],
         err == 0 ? "suceeded"
                  : "failed !!!\n------	       \nvni could be applied only to "
                    "existant guest vif	       \n------\n");
  return err != 0;
}


x86 assembly (clang, -O0):
<br_cmd_delvni>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
xor    %edx,%edx
call   1030 <br_set_trill_vni@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
mov    -0x14(%rbp),%ecx
lea    0xed1(%rip),%rdx
lea    0xec1(%rip),%rax
cmp    $0x0,%ecx
cmove  %rax,%rdx
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<br_cmd_delvni>:
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
xor    %edx,%edx
call   1030 <br_set_trill_vni@plt>
mov    0x10(%rbx),%rsi
xor    %ebx,%ebx
test   %eax,%eax
lea    0xee1(%rip),%rax
lea    0xee3(%rip),%rdx
cmove  %rax,%rdx
lea    0xeac(%rip),%rdi
setne  %bl
call   1040 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"delting vni from interface %s %s\0A\00"
@.str.1 = [9 x i8] c"suceeded\00"
@.str.2 = [90 x i8] c"failed !!!\0A------\09 \0Avni could be applied only to existant guest vif\09 \0A------\0A\00"
define i32 @br_cmd_delvni(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 2
%11 = load i8*, i8** %10
%12 = call i32 @br_set_trill_vni(i8* %8, i8* %11, i32 0)
store i32 %12, i32* %5
%13 = load i8**, i8*** %4
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = load i32, i32* %5
%17 = icmp eq i32 %16, 0
%18 = zext i1 %17 to i64
%19 = select i1 %17, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.2, i64 0, i64 0)
%20 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %15, i8* %19)
%21 = load i32, i32* %5
%22 = icmp ne i32 %21, 0
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
@.str = [35 x i8] c"delting vni from interface %s %s\0A\00"
@.str.1 = [9 x i8] c"suceeded\00"
@.str.2 = [90 x i8] c"failed !!!\0A------\09 \0Avni could be applied only to existant guest vif\09 \0A------\0A\00"
define i32 @br_cmd_delvni(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @br_set_trill_vni(i8* %4, i8* %6, i32 0)
%8 = load i8*, i8** %5
%9 = icmp eq i32 %7, 0
%10 = select i1 %9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.2, i64 0, i64 0)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %10)
%12 = icmp ne i32 %7, 0
%13 = zext i1 %12 to i32
ret i32 %13
}