#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 *, char *, char *, char *);
int /*<<< orphan*/ stderr;
void print_usage(char *prg) {
  fprintf(stderr,
          "Usage: %s [options] <can-interface>\n"
          "\n"
          "Options: -v       (low verbosity)\n"
          "         -vv      (high verbosity)\n"
          "         -g       (generate messages)\n"
          "         -l COUNT (test loop count)\n"
          "\n"
          "With the option '-g' CAN messages are generated and checked\n"
          "on <can-interface>, otherwise all messages received on the\n"
          "<can-interface> are sent back incrementing the CAN id and\n"
          "all data bytes. The program can be aborted with ^C.\n"
          "\n"
          "Example:\n"
          "\ton DUT : %s -v can0\n"
          "\ton Host: %s -g -v can2\n",
          prg, prg, prg);
  exit(1);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%rcx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [466 x i8] c"Usage: %s [options] <can-interface>\0A\0AOptions: -v (low verbosity)\0A -vv (high verbosity)\0A -g (generate messages)\0A -l COUNT (test loop count)\0A\0AWith the option '-g' CAN messages are generated and checked\0Aon <can-interface>, otherwise all messages received on the\0A<can-interface> are sent back incrementing the CAN id and\0Aall data bytes. The program can be aborted with ^C.\0A\0AExample:\0A\09on DUT : %s -v can0\0A\09on Host: %s -g -v can2\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([466 x i8], [466 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5, i8* %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [466 x i8] c"Usage: %s [options] <can-interface>\0A\0AOptions: -v (low verbosity)\0A -vv (high verbosity)\0A -g (generate messages)\0A -l COUNT (test loop count)\0A\0AWith the option '-g' CAN messages are generated and checked\0Aon <can-interface>, otherwise all messages received on the\0A<can-interface> are sent back incrementing the CAN id and\0Aall data bytes. The program can be aborted with ^C.\0A\0AExample:\0A\09on DUT : %s -v can0\0A\09on Host: %s -g -v can2\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([466 x i8], [466 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}