#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void show_usage(int badarg) {
  fprintf(stderr,
          "Usage: 							"
          "			\n"
          " mv_eth_tool -h		       Display this help	"
          "			\n"
          "                                                                    "
          "                   \n"
          " --- Global commands ---					"
          "			\n"
          " mv_eth_tool -txdone <quota>          Set threshold to start "
          "tx_done operations       	\n"
          " mv_eth_tool -reuse   <0|1>           SKB reuse support:   0 - "
          "Disable, 1 - Enable    	\n"
          " mv_eth_tool -recycle <0|1>           SKB recycle support: 0 - "
          "Disable, 1 - Enable     \n"
          " mv_eth_tool -nfp <0|1>               NFP support: 0 - Disable, 1 - "
          "Enable             \n"
          "                                                                    "
          "                   \n"
          " --- Port commands ---                                              "
          "                   \n"
          " mv_eth_tool -rxcoal <port> <usec>    Set RX interrupt coalescing "
          "value               	\n"
          " mv_eth_tool -txcoal <port> <usec>    Set TX interrupt coalescing "
          "value               	\n"
          " mv_eth_tool -txen   <port> <deep>    Set deep of lookup for TX "
          "enable race.          	\n"
          "                                      0 - means disable.            "
          "                  	\n"
          " mv_eth_tool -ejp    <port> <0|1>     Set EJP mode: 0 - Disable, 1 "
          "- Enable           	\n"
          " mv_eth_tool -tx_noq <idx> <0|1>      Set queuing mode: 0 - "
          "Disable, 1 - Enable        \n"
          " mv_eth_tool -lro    <port> <0|1>     Set LRO mode: 0 - Disable, 1 "
          "- Enable           	\n"
          " mv_eth_tool -lro_desc <port> <value> Set LRO max concurrent "
          "sessions			\n"
          "                                                                    "
          "                   \n"
          " --- Port/Queue commands ---                                        "
          "                   \n"
          " mv_eth_tool -tos <port> <rxq> <tos>  Map TOS field to RX queue "
          "number                 \n"
          "                                                                    "
          "                   \n"
          " mv_eth_tool -srq <port> <rxq> <bpdu|arp|tcp|udp>                   "
          "                  	\n"
          "                                      Set RX queue number for "
          "different packet types. 	\n"
          "                                      rxq==8 means no special "
          "treatment.		\n"
          "		                       rxq==8 for Arp packets means "
          "drop.      		\n"
          "                                                                    "
          "                   \n"
          " mv_eth_tool -sq <port> <rxq> <%%2x:%%2x:%%2x:%%2x:%%2x:%%2x> "
          "				\n"
          "                                      Set RX queue number for a "
          "Multicast MAC         	\n"
          "                                      rxq==8 indicates delete "
          "entry.		        \n"
          " mv_eth_tool -srp <port> <WRR|FIXED>  Set the Rx Policy to WRR or "
          "Fixed 		\n"
          "								"
          "			\n"
          " --- NFP commands ---                                               "
          "                   \n"
          " mv_eth_tool -fp_st                   Display NFP Status "
          "(enabled/disabled)            \n"
          " mv_eth_tool -fprs <inp> <outp> <DIP> <SIP> <DA> <SA>	"
          "				\n"
          "                                      Set NFP rule for IPv4 "
          "routing			\n"
          "                                      where DA, SA - MAC addresses "
          "xx:xx:xx:xx:xx:xx   \n"
          " mv_eth_tool -fprd <DIP> <SIP>        Delete NFP Rule for IPv4 "
          "routing			\n"
          " mv_eth_tool -fp_print <DB>           Print NFP Rule Database,      "
          "                  	\n"
          "                                      where DB is "
          "routing,nat,bridge,ppp,sec           \n"
          "								"
          "			\n"
          " mv_eth_tool -St <option> <port>			       	"
          "	                \n"
          "   Display different status information of the port through the "
          "kernel printk.		\n"
          "   OPTIONS:							"
          "			\n"
          "   p                                   Display General port "
          "information.		\n"
          "   mac                                 Display MAC addresses "
          "information               \n"
          "   q   <0..7>                          Display specific q "
          "information.			\n"
          "   rxp                                 Display Rx Policy "
          "information.			\n"
          "   txp                                 Display Tx Policy "
          "information.			\n"
          "   cntrs                               Display the HW MIB "
          "counters			\n"
          "   regs                                Display a dump of the giga "
          "registers		\n"
          "   stats                               Display port statistics "
          "information. 		\n"
          "   netdev                              Display net_device status "
          "information.          \n"
          "   nfp                                 Display port NFP statistics  "
          "                   \n"
          "   tos                                 Display port TOS to RXQ "
          "mapping                 \n"
          "   switch                              Display switch statistics    "
          "             	\n"
          "\n");
  exit(badarg);
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x3eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<show_usage>:
push   %rbx
mov    %edi,%ebx
mov    0x3eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4261 x i8] c"Usage: \09\09\09\09\09\09\09\09\09\09\0A mv_eth_tool -h\09\09 Display this help\09\09\09\09\0A \0A --- Global commands ---\09\09\09\09\09\09\09\09\0A mv_eth_tool -txdone <quota> Set threshold to start tx_done operations \09\0A mv_eth_tool -reuse <0|1> SKB reuse support: 0 - Disable, 1 - Enable \09\0A mv_eth_tool -recycle <0|1> SKB recycle support: 0 - Disable, 1 - Enable \0A mv_eth_tool -nfp <0|1> NFP support: 0 - Disable, 1 - Enable \0A \0A --- Port commands --- \0A mv_eth_tool -rxcoal <port> <usec> Set RX interrupt coalescing value \09\0A mv_eth_tool -txcoal <port> <usec> Set TX interrupt coalescing value \09\0A mv_eth_tool -txen <port> <deep> Set deep of lookup for TX enable race. \09\0A 0 - means disable. \09\0A mv_eth_tool -ejp <port> <0|1> Set EJP mode: 0 - Disable, 1 - Enable \09\0A mv_eth_tool -tx_noq <idx> <0|1> Set queuing mode: 0 - Disable, 1 - Enable \0A mv_eth_tool -lro <port> <0|1> Set LRO mode: 0 - Disable, 1 - Enable \09\0A mv_eth_tool -lro_desc <port> <value> Set LRO max concurrent sessions\09\09\09\0A \0A --- Port/Queue commands --- \0A mv_eth_tool -tos <port> <rxq> <tos> Map TOS field to RX queue number \0A \0A mv_eth_tool -srq <port> <rxq> <bpdu|arp|tcp|udp> \09\0A Set RX queue number for different packet types. \09\0A rxq==8 means no special treatment.\09\09\0A\09\09 rxq==8 for Arp packets means drop. \09\09\0A \0A mv_eth_tool -sq <port> <rxq> <%%2x:%%2x:%%2x:%%2x:%%2x:%%2x> \09\09\09\09\0A Set RX queue number for a Multicast MAC \09\0A rxq==8 indicates delete entry.\09\09 \0A mv_eth_tool -srp <port> <WRR|FIXED> Set the Rx Policy to WRR or Fixed \09\09\0A\09\09\09\09\09\09\09\09\09\09\09\0A --- NFP commands --- \0A mv_eth_tool -fp_st Display NFP Status (enabled/disabled) \0A mv_eth_tool -fprs <inp> <outp> <DIP> <SIP> <DA> <SA>\09\09\09\09\09\0A Set NFP rule for IPv4 routing\09\09\09\0A where DA, SA - MAC addresses xx:xx:xx:xx:xx:xx \0A mv_eth_tool -fprd <DIP> <SIP> Delete NFP Rule for IPv4 routing\09\09\09\0A mv_eth_tool -fp_print <DB> Print NFP Rule Database, \09\0A where DB is routing,nat,bridge,ppp,sec \0A\09\09\09\09\09\09\09\09\09\09\09\0A mv_eth_tool -St <option> <port>\09\09\09 \09\09 \0A Display different status information of the port through the kernel printk.\09\09\0A OPTIONS:\09\09\09\09\09\09\09\09\09\09\0A p Display General port information.\09\09\0A mac Display MAC addresses information \0A q <0..7> Display specific q information.\09\09\09\0A rxp Display Rx Policy information.\09\09\09\0A txp Display Tx Policy information.\09\09\09\0A cntrs Display the HW MIB counters\09\09\09\0A regs Display a dump of the giga registers\09\09\0A stats Display port statistics information. \09\09\0A netdev Display net_device status information. \0A nfp Display port NFP statistics \0A tos Display port TOS to RXQ mapping \0A switch Display switch statistics \09\0A\0A\00"
define void @show_usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4261 x i8], [4261 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4261 x i8] c"Usage: \09\09\09\09\09\09\09\09\09\09\0A mv_eth_tool -h\09\09 Display this help\09\09\09\09\0A \0A --- Global commands ---\09\09\09\09\09\09\09\09\0A mv_eth_tool -txdone <quota> Set threshold to start tx_done operations \09\0A mv_eth_tool -reuse <0|1> SKB reuse support: 0 - Disable, 1 - Enable \09\0A mv_eth_tool -recycle <0|1> SKB recycle support: 0 - Disable, 1 - Enable \0A mv_eth_tool -nfp <0|1> NFP support: 0 - Disable, 1 - Enable \0A \0A --- Port commands --- \0A mv_eth_tool -rxcoal <port> <usec> Set RX interrupt coalescing value \09\0A mv_eth_tool -txcoal <port> <usec> Set TX interrupt coalescing value \09\0A mv_eth_tool -txen <port> <deep> Set deep of lookup for TX enable race. \09\0A 0 - means disable. \09\0A mv_eth_tool -ejp <port> <0|1> Set EJP mode: 0 - Disable, 1 - Enable \09\0A mv_eth_tool -tx_noq <idx> <0|1> Set queuing mode: 0 - Disable, 1 - Enable \0A mv_eth_tool -lro <port> <0|1> Set LRO mode: 0 - Disable, 1 - Enable \09\0A mv_eth_tool -lro_desc <port> <value> Set LRO max concurrent sessions\09\09\09\0A \0A --- Port/Queue commands --- \0A mv_eth_tool -tos <port> <rxq> <tos> Map TOS field to RX queue number \0A \0A mv_eth_tool -srq <port> <rxq> <bpdu|arp|tcp|udp> \09\0A Set RX queue number for different packet types. \09\0A rxq==8 means no special treatment.\09\09\0A\09\09 rxq==8 for Arp packets means drop. \09\09\0A \0A mv_eth_tool -sq <port> <rxq> <%%2x:%%2x:%%2x:%%2x:%%2x:%%2x> \09\09\09\09\0A Set RX queue number for a Multicast MAC \09\0A rxq==8 indicates delete entry.\09\09 \0A mv_eth_tool -srp <port> <WRR|FIXED> Set the Rx Policy to WRR or Fixed \09\09\0A\09\09\09\09\09\09\09\09\09\09\09\0A --- NFP commands --- \0A mv_eth_tool -fp_st Display NFP Status (enabled/disabled) \0A mv_eth_tool -fprs <inp> <outp> <DIP> <SIP> <DA> <SA>\09\09\09\09\09\0A Set NFP rule for IPv4 routing\09\09\09\0A where DA, SA - MAC addresses xx:xx:xx:xx:xx:xx \0A mv_eth_tool -fprd <DIP> <SIP> Delete NFP Rule for IPv4 routing\09\09\09\0A mv_eth_tool -fp_print <DB> Print NFP Rule Database, \09\0A where DB is routing,nat,bridge,ppp,sec \0A\09\09\09\09\09\09\09\09\09\09\09\0A mv_eth_tool -St <option> <port>\09\09\09 \09\09 \0A Display different status information of the port through the kernel printk.\09\09\0A OPTIONS:\09\09\09\09\09\09\09\09\09\09\0A p Display General port information.\09\09\0A mac Display MAC addresses information \0A q <0..7> Display specific q information.\09\09\09\0A rxp Display Rx Policy information.\09\09\09\0A txp Display Tx Policy information.\09\09\09\0A cntrs Display the HW MIB counters\09\09\09\0A regs Display a dump of the giga registers\09\09\0A stats Display port statistics information. \09\09\0A netdev Display net_device status information. \0A nfp Display port NFP statistics \0A tos Display port TOS to RXQ mapping \0A switch Display switch statistics \09\0A\0A\00"
define void @show_usage(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4261 x i8], [4261 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 %0)
unreachable
}