#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage:  biosdevname [options] [args]...\n");
  fprintf(stderr, " Options:\n");
  fprintf(
      stderr,
      "   -i        or --interface           treat [args] as ethernet devs\n");
  fprintf(stderr, "   --pci-spec                         treat [args] as PCI "
                  "specification\n");
  fprintf(stderr, "   -d        or --debug               enable debugging\n");
  fprintf(stderr, "   --policy [physical | all_ethN ]\n");
  fprintf(stderr, "   --prefix [string]                  string use for "
                  "embedded NICs (default='em')\n");
  fprintf(stderr, "   --smbios [x.y]		       Require SMBIOS x.y or "
                  "greater\n");
  fprintf(stderr, "   --invm                             Still run in VM\n");
  fprintf(stderr, "   --nopirq			       Don't use $PIR table "
                  "for slot numbers\n");
  fprintf(stderr, " Example:  biosdevname -i eth0\n");
  fprintf(stderr, "  returns: em1\n");
  fprintf(stderr,
          "  when eth0 is an embedded NIC with label '1' on the chassis.\n");
  fprintf(stderr,
          " You must be root to run this, as it must read from /dev/mem.\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xef0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xee6(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xf16(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
lea    0xf4a(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
lea    0xf6d(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
lea    0xf7c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
lea    0xfba(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
lea    0xfde(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
lea    0x1000(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2df3(%rip),%rax
mov    (%rax),%edi
lea    0x1027(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2dde(%rip),%rax
mov    (%rax),%edi
lea    0x1032(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2dc9(%rip),%rax
mov    (%rax),%edi
lea    0x102d(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
lea    0x1057(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xefa(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef7(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf2e(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf69(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf93(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfa9(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfee(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1019(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1042(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1070(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1082(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1084(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10b5(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"Usage: biosdevname [options] [args]...\0A\00"
@.str.1 = [11 x i8] c" Options:\0A\00"
@.str.2 = [69 x i8] c" -i or --interface treat [args] as ethernet devs\0A\00"
@.str.3 = [73 x i8] c" --pci-spec treat [args] as PCI specification\0A\00"
@.str.4 = [56 x i8] c" -d or --debug enable debugging\0A\00"
@.str.5 = [36 x i8] c" --policy [physical | all_ethN ]\0A\00"
@.str.6 = [83 x i8] c" --prefix [string] string use for embedded NICs (default='em')\0A\00"
@.str.7 = [57 x i8] c" --smbios [x.y]\09\09 Require SMBIOS x.y or greater\0A\00"
@.str.8 = [55 x i8] c" --invm Still run in VM\0A\00"
@.str.9 = [60 x i8] c" --nopirq\09\09\09 Don't use $PIR table for slot numbers\0A\00"
@.str.10 = [32 x i8] c" Example: biosdevname -i eth0\0A\00"
@.str.11 = [16 x i8] c" returns: em1\0A\00"
@.str.12 = [63 x i8] c" when eth0 is an embedded NIC with label '1' on the chassis.\0A\00"
@.str.13 = [63 x i8] c" You must be root to run this, as it must read from /dev/mem.\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.7, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.8, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0))
%23 = load i32, i32* @stderr
%24 = call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.12, i64 0, i64 0))
%27 = load i32, i32* @stderr
%28 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"Usage: biosdevname [options] [args]...\0A\00"
@.str.1 = [11 x i8] c" Options:\0A\00"
@.str.2 = [69 x i8] c" -i or --interface treat [args] as ethernet devs\0A\00"
@.str.3 = [73 x i8] c" --pci-spec treat [args] as PCI specification\0A\00"
@.str.4 = [56 x i8] c" -d or --debug enable debugging\0A\00"
@.str.5 = [36 x i8] c" --policy [physical | all_ethN ]\0A\00"
@.str.6 = [83 x i8] c" --prefix [string] string use for embedded NICs (default='em')\0A\00"
@.str.7 = [57 x i8] c" --smbios [x.y]\09\09 Require SMBIOS x.y or greater\0A\00"
@.str.8 = [55 x i8] c" --invm Still run in VM\0A\00"
@.str.9 = [60 x i8] c" --nopirq\09\09\09 Don't use $PIR table for slot numbers\0A\00"
@.str.10 = [32 x i8] c" Example: biosdevname -i eth0\0A\00"
@.str.11 = [16 x i8] c" returns: em1\0A\00"
@.str.12 = [63 x i8] c" when eth0 is an embedded NIC with label '1' on the chassis.\0A\00"
@.str.13 = [63 x i8] c" You must be root to run this, as it must read from /dev/mem.\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.7, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.8, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = tail call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0))
%23 = load i32, i32* @stderr
%24 = tail call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = tail call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.12, i64 0, i64 0))
%27 = load i32, i32* @stderr
%28 = tail call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.13, i64 0, i64 0))
ret void
}