#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*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(
      stderr,
      "Usage: loopback_test TEST [SIZE] ITERATIONS [SYSPATH] [DBGPATH]\n\n"
      "  Run TEST for a number of ITERATIONS with operation data SIZE bytes\n"
      "  TEST may be \'ping\' \'transfer\' or \'sink\'\n"
      "  SIZE indicates the size of transfer <= greybus max payload bytes\n"
      "  ITERATIONS indicates the number of times to execute TEST at SIZE "
      "bytes\n"
      "             Note if ITERATIONS is set to zero then this utility will\n"
      "             initiate an infinite (non terminating) test and exit\n"
      "             without logging any metrics data\n"
      "  SYSPATH indicates the sysfs path for the loopback greybus entries "
      "e.g.\n"
      "          /sys/bus/greybus/devices\n"
      "  DBGPATH indicates the debugfs path for the loopback greybus entries "
      "e.g.\n"
      "          /sys/kernel/debug/gb_loopback/\n"
      " Mandatory arguments\n"
      "   -t     must be one of the test names - sink, transfer or ping\n"
      "   -i     iteration count - the number of iterations to run the test "
      "over\n"
      " Optional arguments\n"
      "   -S     sysfs location - location for greybus 'endo' entires default "
      "/sys/bus/greybus/devices/\n"
      "   -D     debugfs location - location for loopback debugfs entries "
      "default /sys/kernel/debug/gb_loopback/\n"
      "   -s     size of data packet to send during test - defaults to zero\n"
      "   -m     mask - a bit mask of connections to include example: -m 8 = "
      "4th connection -m 9 = 1st and 4th connection etc\n"
      "                 default is zero which means broadcast to all "
      "connections\n"
      "   -v     verbose output\n"
      "   -d     debug output\n"
      "   -r     raw data output - when specified the full list of latency "
      "values are included in the output CSV\n"
      "   -p     porcelain - when specified printout is in a user-friendly "
      "non-CSV format. This option suppresses writing to CSV file\n"
      "   -a     aggregate - show aggregation of all enabled devices\n"
      "   -l     list found loopback devices and exit\n"
      "   -x     Async - Enable async transfers\n"
      "   -o     Async Timeout - Timeout in uSec for async operations\n"
      "   -O     Poll loop time out in seconds(max time a test is expected to "
      "last, default: 30sec)\n"
      "   -c     Max number of outstanding operations for async operations\n"
      "   -w     Wait in uSec between operations\n"
      "   -z     Enable output to a CSV file (incompatible with -p)\n"
      "   -f     When starting new loopback test, stop currently running tests "
      "on all devices\n"
      "Examples:\n"
      "  Send 10000 transfers with a packet size of 128 bytes to all active "
      "connections\n"
      "  loopback_test -t transfer -s 128 -i 10000 -S "
      "/sys/bus/greybus/devices/ -D /sys/kernel/debug/gb_loopback/\n"
      "  loopback_test -t transfer -s 128 -i 10000 -m 0\n"
      "  Send 10000 transfers with a packet size of 128 bytes to connection 1 "
      "and 4\n"
      "  loopback_test -t transfer -s 128 -i 10000 -m 9\n"
      "  loopback_test -t ping -s 0 128 -i -S /sys/bus/greybus/devices/ -D "
      "/sys/kernel/debug/gb_loopback/\n"
      "  loopback_test -t sink -s 2030 -i 32768 -S /sys/bus/greybus/devices/ "
      "-D /sys/kernel/debug/gb_loopback/\n");
  abort();
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2789 x i8] c"Usage: loopback_test TEST [SIZE] ITERATIONS [SYSPATH] [DBGPATH]\0A\0A Run TEST for a number of ITERATIONS with operation data SIZE bytes\0A TEST may be 'ping' 'transfer' or 'sink'\0A SIZE indicates the size of transfer <= greybus max payload bytes\0A ITERATIONS indicates the number of times to execute TEST at SIZE bytes\0A Note if ITERATIONS is set to zero then this utility will\0A initiate an infinite (non terminating) test and exit\0A without logging any metrics data\0A SYSPATH indicates the sysfs path for the loopback greybus entries e.g.\0A /sys/bus/greybus/devices\0A DBGPATH indicates the debugfs path for the loopback greybus entries e.g.\0A /sys/kernel/debug/gb_loopback/\0A Mandatory arguments\0A -t must be one of the test names - sink, transfer or ping\0A -i iteration count - the number of iterations to run the test over\0A Optional arguments\0A -S sysfs location - location for greybus 'endo' entires default /sys/bus/greybus/devices/\0A -D debugfs location - location for loopback debugfs entries default /sys/kernel/debug/gb_loopback/\0A -s size of data packet to send during test - defaults to zero\0A -m mask - a bit mask of connections to include example: -m 8 = 4th connection -m 9 = 1st and 4th connection etc\0A default is zero which means broadcast to all connections\0A -v verbose output\0A -d debug output\0A -r raw data output - when specified the full list of latency values are included in the output CSV\0A -p porcelain - when specified printout is in a user-friendly non-CSV format. This option suppresses writing to CSV file\0A -a aggregate - show aggregation of all enabled devices\0A -l list found loopback devices and exit\0A -x Async - Enable async transfers\0A -o Async Timeout - Timeout in uSec for async operations\0A -O Poll loop time out in seconds(max time a test is expected to last, default: 30sec)\0A -c Max number of outstanding operations for async operations\0A -w Wait in uSec between operations\0A -z Enable output to a CSV file (incompatible with -p)\0A -f When starting new loopback test, stop currently running tests on all devices\0AExamples:\0A Send 10000 transfers with a packet size of 128 bytes to all active connections\0A loopback_test -t transfer -s 128 -i 10000 -S /sys/bus/greybus/devices/ -D /sys/kernel/debug/gb_loopback/\0A loopback_test -t transfer -s 128 -i 10000 -m 0\0A Send 10000 transfers with a packet size of 128 bytes to connection 1 and 4\0A loopback_test -t transfer -s 128 -i 10000 -m 9\0A loopback_test -t ping -s 0 128 -i -S /sys/bus/greybus/devices/ -D /sys/kernel/debug/gb_loopback/\0A loopback_test -t sink -s 2030 -i 32768 -S /sys/bus/greybus/devices/ -D /sys/kernel/debug/gb_loopback/\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([2789 x i8], [2789 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2789 x i8] c"Usage: loopback_test TEST [SIZE] ITERATIONS [SYSPATH] [DBGPATH]\0A\0A Run TEST for a number of ITERATIONS with operation data SIZE bytes\0A TEST may be 'ping' 'transfer' or 'sink'\0A SIZE indicates the size of transfer <= greybus max payload bytes\0A ITERATIONS indicates the number of times to execute TEST at SIZE bytes\0A Note if ITERATIONS is set to zero then this utility will\0A initiate an infinite (non terminating) test and exit\0A without logging any metrics data\0A SYSPATH indicates the sysfs path for the loopback greybus entries e.g.\0A /sys/bus/greybus/devices\0A DBGPATH indicates the debugfs path for the loopback greybus entries e.g.\0A /sys/kernel/debug/gb_loopback/\0A Mandatory arguments\0A -t must be one of the test names - sink, transfer or ping\0A -i iteration count - the number of iterations to run the test over\0A Optional arguments\0A -S sysfs location - location for greybus 'endo' entires default /sys/bus/greybus/devices/\0A -D debugfs location - location for loopback debugfs entries default /sys/kernel/debug/gb_loopback/\0A -s size of data packet to send during test - defaults to zero\0A -m mask - a bit mask of connections to include example: -m 8 = 4th connection -m 9 = 1st and 4th connection etc\0A default is zero which means broadcast to all connections\0A -v verbose output\0A -d debug output\0A -r raw data output - when specified the full list of latency values are included in the output CSV\0A -p porcelain - when specified printout is in a user-friendly non-CSV format. This option suppresses writing to CSV file\0A -a aggregate - show aggregation of all enabled devices\0A -l list found loopback devices and exit\0A -x Async - Enable async transfers\0A -o Async Timeout - Timeout in uSec for async operations\0A -O Poll loop time out in seconds(max time a test is expected to last, default: 30sec)\0A -c Max number of outstanding operations for async operations\0A -w Wait in uSec between operations\0A -z Enable output to a CSV file (incompatible with -p)\0A -f When starting new loopback test, stop currently running tests on all devices\0AExamples:\0A Send 10000 transfers with a packet size of 128 bytes to all active connections\0A loopback_test -t transfer -s 128 -i 10000 -S /sys/bus/greybus/devices/ -D /sys/kernel/debug/gb_loopback/\0A loopback_test -t transfer -s 128 -i 10000 -m 0\0A Send 10000 transfers with a packet size of 128 bytes to connection 1 and 4\0A loopback_test -t transfer -s 128 -i 10000 -m 9\0A loopback_test -t ping -s 0 128 -i -S /sys/bus/greybus/devices/ -D /sys/kernel/debug/gb_loopback/\0A loopback_test -t sink -s 2030 -i 32768 -S /sys/bus/greybus/devices/ -D /sys/kernel/debug/gb_loopback/\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([2789 x i8], [2789 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}