#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*/ die();
int /*<<< orphan*/ printf(char *, ...);
void usage(void) {
  printf("\n%s %s\n", "vlink", "0.9");
  printf("Usage: %s <linktype> <cmd> [<args> ...]\n", "vlink");
  printf("Linktypes:\n");
  printf("  ethernet\n");
  printf("Commands:\n");
  printf("  add <name> <rootdev> <port>\n");
  printf("  rm <name>\n");
  printf("  hook <rootdev>\n");
  printf("  unhook <rootdev>\n");
  printf("\n");
  printf("Please report bugs to <dborkma@tik.ee.ethz.ch>\n");
  printf("Copyright (C) 2011 Daniel Borkmann\n");
  printf("License: GNU GPL version 2\n");
  printf(
      "This is free software: you are free to change and redistribute it.\n");
  printf("There is NO WARRANTY, to the extent permitted by law.\n\n");
  die();
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed6(%rip),%rsi
lea    0xed5(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfdc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <die@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xeb9(%rip),%rbx
lea    0xeb8(%rip),%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeab(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec3(%rip),%rdi
call   1040 <puts@plt>
lea    0xec2(%rip),%rdi
call   1040 <puts@plt>
lea    0xec1(%rip),%rdi
call   1040 <puts@plt>
lea    0xebf(%rip),%rdi
call   1040 <puts@plt>
lea    0xed1(%rip),%rdi
call   1040 <puts@plt>
lea    0xed1(%rip),%rdi
call   1040 <puts@plt>
lea    0xed6(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xed3(%rip),%rdi
call   1040 <puts@plt>
lea    0xef6(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0d(%rip),%rdi
call   1040 <puts@plt>
lea    0xf1c(%rip),%rdi
call   1040 <puts@plt>
lea    0xf53(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
jmp    1060 <die@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\0A%s %s\0A\00"
@.str.1 = [6 x i8] c"vlink\00"
@.str.2 = [4 x i8] c"0.9\00"
@.str.3 = [41 x i8] c"Usage: %s <linktype> <cmd> [<args> ...]\0A\00"
@.str.4 = [12 x i8] c"Linktypes:\0A\00"
@.str.5 = [12 x i8] c" ethernet\0A\00"
@.str.6 = [11 x i8] c"Commands:\0A\00"
@.str.7 = [31 x i8] c" add <name> <rootdev> <port>\0A\00"
@.str.8 = [13 x i8] c" rm <name>\0A\00"
@.str.9 = [18 x i8] c" hook <rootdev>\0A\00"
@.str.10 = [20 x i8] c" unhook <rootdev>\0A\00"
@.str.11 = [2 x i8] c"\0A\00"
@.str.12 = [48 x i8] c"Please report bugs to <dborkma@tik.ee.ethz.ch>\0A\00"
@.str.13 = [36 x i8] c"Copyright (C) 2011 Daniel Borkmann\0A\00"
@.str.14 = [28 x i8] c"License: GNU GPL version 2\0A\00"
@.str.15 = [68 x i8] c"This is free software: you are free to change and redistribute it.\0A\00"
@.str.16 = [56 x i8] c"There is NO WARRANTY, to the extent permitted by law.\0A\0A\00"
define void @usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.12, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.15, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.16, i64 0, i64 0))
%16 = call i32 (...) @die()
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\0A%s %s\0A\00"
@.str.1 = [6 x i8] c"vlink\00"
@.str.2 = [4 x i8] c"0.9\00"
@.str.3 = [41 x i8] c"Usage: %s <linktype> <cmd> [<args> ...]\0A\00"
@str = [11 x i8] c"Linktypes:\00"
@str.17 = [11 x i8] c" ethernet\00"
@str.18 = [10 x i8] c"Commands:\00"
@str.19 = [30 x i8] c" add <name> <rootdev> <port>\00"
@str.20 = [12 x i8] c" rm <name>\00"
@str.21 = [17 x i8] c" hook <rootdev>\00"
@str.22 = [19 x i8] c" unhook <rootdev>\00"
@str.23 = [47 x i8] c"Please report bugs to <dborkma@tik.ee.ethz.ch>\00"
@str.24 = [35 x i8] c"Copyright (C) 2011 Daniel Borkmann\00"
@str.25 = [27 x i8] c"License: GNU GPL version 2\00"
@str.26 = [67 x i8] c"This is free software: you are free to change and redistribute it.\00"
@str.27 = [55 x i8] c"There is NO WARRANTY, to the extent permitted by law.\0A\00"
define void @usage() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.17, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.18, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.19, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.20, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.21, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.22, i64 0, i64 0))
%10 = tail call i32 @putchar(i32 10)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.23, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.24, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.25, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.26, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.27, i64 0, i64 0))
%16 = tail call i32 (...) @die()
ret void
}