#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*/ printf(char *);
void usage(int ret) {
  printf("Usage: smd_pkt_loopback_test [OPTIONS] [PARAMS] [TEST_TYPE]...\n"
         "Runs the loopback test with parameters specified\n"
         "over a SMD PKT device.  /dev/smd_pkt_loopback will be"
         "used if a device is not specified\n"
         "\n"
         "OPTIONS can be:\n"
         "  -v, --verbose         run with debug messages on (NOTE:\n"
         "                           currently has no effect).\n"
         "  -h, --help            print this help message and exit\n"
         "  -c, --nocheck         donot check the integrity of data\n"
         "  -w, --blocking_write use blocking writes\n"
         "\nPARAMS can be:\n"
         "  -b, --bytes           write/read buffer size (default 2 bytes)\n"
         "  -i, --iterations      number of test iterations (default 1)\n"
         "  -p, --pattern         pattern to be written (default 0xfa)\n"
         "  -d, --delay TIME      delay after iterations/2 by TIME seconds\n"
         "  -f, --file            The character device to use (default\n"
         "                           /dev/smd_pkt_loopback)\n"
         "\n"
         "TEST_TYPE can be:\n"
         "  -n, --nominal         run standard functionality tests\n"
         "  -a, --adversarial     run tests that try to break the\n"
         "                          driver, not supported currently\n"
         "  -s, --stress          run tests that try to maximize the\n"
         "                          capacity of the driver,\n"
         "                          not supported currently\n"
         "  -r, --repeatability   run 10 iterations of both the\n"
         "                          nominal and adversarial tests,\n"
         "                          not supported currently\n");
  exit(ret);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [1376 x i8] c"Usage: smd_pkt_loopback_test [OPTIONS] [PARAMS] [TEST_TYPE]...\0ARuns the loopback test with parameters specified\0Aover a SMD PKT device. /dev/smd_pkt_loopback will beused if a device is not specified\0A\0AOPTIONS can be:\0A -v, --verbose run with debug messages on (NOTE:\0A currently has no effect).\0A -h, --help print this help message and exit\0A -c, --nocheck donot check the integrity of data\0A -w, --blocking_write use blocking writes\0A\0APARAMS can be:\0A -b, --bytes write/read buffer size (default 2 bytes)\0A -i, --iterations number of test iterations (default 1)\0A -p, --pattern pattern to be written (default 0xfa)\0A -d, --delay TIME delay after iterations/2 by TIME seconds\0A -f, --file The character device to use (default\0A /dev/smd_pkt_loopback)\0A\0ATEST_TYPE can be:\0A -n, --nominal run standard functionality tests\0A -a, --adversarial run tests that try to break the\0A driver, not supported currently\0A -s, --stress run tests that try to maximize the\0A capacity of the driver,\0A not supported currently\0A -r, --repeatability run 10 iterations of both the\0A nominal and adversarial tests,\0A not supported currently\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([1376 x i8], [1376 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@str = [1375 x i8] c"Usage: smd_pkt_loopback_test [OPTIONS] [PARAMS] [TEST_TYPE]...\0ARuns the loopback test with parameters specified\0Aover a SMD PKT device. /dev/smd_pkt_loopback will beused if a device is not specified\0A\0AOPTIONS can be:\0A -v, --verbose run with debug messages on (NOTE:\0A currently has no effect).\0A -h, --help print this help message and exit\0A -c, --nocheck donot check the integrity of data\0A -w, --blocking_write use blocking writes\0A\0APARAMS can be:\0A -b, --bytes write/read buffer size (default 2 bytes)\0A -i, --iterations number of test iterations (default 1)\0A -p, --pattern pattern to be written (default 0xfa)\0A -d, --delay TIME delay after iterations/2 by TIME seconds\0A -f, --file The character device to use (default\0A /dev/smd_pkt_loopback)\0A\0ATEST_TYPE can be:\0A -n, --nominal run standard functionality tests\0A -a, --adversarial run tests that try to break the\0A driver, not supported currently\0A -s, --stress run tests that try to maximize the\0A capacity of the driver,\0A not supported currently\0A -r, --repeatability run 10 iterations of both the\0A nominal and adversarial tests,\0A not supported currently\00"
define void @usage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([1375 x i8], [1375 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 %0)
unreachable
}