#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 print_usage(char *prg) {
  fprintf(stderr, "\n%s: generate CAN frames\n\n", prg);
  fprintf(stderr, "Usage: %s [options] <CAN interface>\n", prg);
  fprintf(stderr,
          "Options: -g <ms>       (gap in milli seconds "
          "- default: %d ms)\n",
          200);
  fprintf(stderr, "         -e            (generate extended frame mode "
                  "(EFF) CAN frames)\n");
  fprintf(stderr, "         -f            (generate CAN FD CAN frames)\n");
  fprintf(stderr, "         -b            (generate CAN FD CAN frames"
                  " with bitrate switch (BRS))\n");
  fprintf(stderr, "         -R            (send RTR frame)\n");
  fprintf(stderr, "         -m            (mix -e -f -b -R frames)\n");
  fprintf(stderr, "         -I <mode>     (CAN ID"
                  " generation mode - see below)\n");
  fprintf(stderr, "         -L <mode>     (CAN data length code (dlc)"
                  " generation mode - see below)\n");
  fprintf(stderr, "         -D <mode>     (CAN data (payload)"
                  " generation mode - see below)\n");
  fprintf(stderr, "         -p <timeout>  (poll on -ENOBUFS to write frames"
                  " with <timeout> ms)\n");
  fprintf(stderr, "         -n <count>    (terminate after <count> CAN frames "
                  "- default infinite)\n");
  fprintf(stderr, "         -i            (ignore -ENOBUFS return values on"
                  " write() syscalls)\n");
  fprintf(stderr, "         -x            (disable local loopback of "
                  "generated CAN frames)\n");
  fprintf(stderr, "         -v            (increment verbose level for "
                  "printing sent CAN frames)\n\n");
  fprintf(stderr, "Generation modes:\n");
  fprintf(stderr, "'r'        => random values (default)\n");
  fprintf(stderr, "'i'        => increment values\n");
  fprintf(stderr, "<hexvalue> => fix value using <hexvalue>\n\n");
  fprintf(stderr, "When incrementing the CAN data the data length code "
                  "minimum is set to 1.\n");
  fprintf(stderr, "CAN IDs and data content are given and expected in "
                  "hexadecimal values.\n\n");
  fprintf(stderr, "Examples:\n");
  fprintf(stderr, "%s vcan0 -g 4 -I 42A -L 1 -D i -v -v   ", prg);
  fprintf(stderr, "(fixed CAN ID and length, inc. data)\n");
  fprintf(stderr, "%s vcan0 -e -L i -v -v -v              ", prg);
  fprintf(stderr, "(generate EFF frames, incr. length)\n");
  fprintf(stderr, "%s vcan0 -D 11223344DEADBEEF -L 8      ", prg);
  fprintf(stderr, "(fixed CAN data payload and length)\n");
  fprintf(stderr, "%s vcan0 -g 0 -i -x                    ", prg);
  fprintf(stderr, "(full load test ignoring -ENOBUFS)\n");
  fprintf(stderr, "%s vcan0 -g 0 -p 10 -x                 ", prg);
  fprintf(stderr, "(full load test with polling, 10ms timeout)\n");
  fprintf(stderr, "%s vcan0                               ", prg);
  fprintf(stderr, "(my favourite default :)\n\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
mov    $0xc8,%edx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
lea    0xf02(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
lea    0xf33(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e3d(%rip),%rax
mov    (%rax),%edi
lea    0xf51(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e26(%rip),%rax
mov    (%rax),%edi
lea    0xf89(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e0f(%rip),%rax
mov    (%rax),%edi
lea    0xf9b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2df8(%rip),%rax
mov    (%rax),%edi
lea    0xfb5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2de1(%rip),%rax
mov    (%rax),%edi
lea    0xfdb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dca(%rip),%rax
mov    (%rax),%edi
lea    0x1015(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2db3(%rip),%rax
mov    (%rax),%edi
lea    0x1047(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d9c(%rip),%rax
mov    (%rax),%edi
lea    0x107d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d85(%rip),%rax
mov    (%rax),%edi
lea    0x10b6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d6e(%rip),%rax
mov    (%rax),%edi
lea    0x10eb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d57(%rip),%rax
mov    (%rax),%edi
lea    0x111d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d40(%rip),%rax
mov    (%rax),%edi
lea    0x1156(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d29(%rip),%rax
mov    (%rax),%edi
lea    0x1152(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d12(%rip),%rax
mov    (%rax),%edi
lea    0x1162(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2cfb(%rip),%rax
mov    (%rax),%edi
lea    0x116b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ce4(%rip),%rax
mov    (%rax),%edi
lea    0x117f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ccd(%rip),%rax
mov    (%rax),%edi
lea    0x11b2(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2cb6(%rip),%rax
mov    (%rax),%edi
lea    0x11e4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c9f(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x11d4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c84(%rip),%rax
mov    (%rax),%edi
lea    0x11e5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c6d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x11f0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c52(%rip),%rax
mov    (%rax),%edi
lea    0x1201(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c3b(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x120b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c20(%rip),%rax
mov    (%rax),%edi
lea    0x121c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2c09(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x1226(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2bee(%rip),%rax
mov    (%rax),%edi
lea    0x1237(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2bd7(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x1240(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2bbc(%rip),%rax
mov    (%rax),%edi
lea    0x1251(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ba5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x1263(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2b8a(%rip),%rax
mov    (%rax),%edi
lea    0x1274(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    0x2ec2(%rip),%rbx
mov    (%rbx),%edi
lea    0xed9(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xee1(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef3(%rip),%rsi
mov    $0xc8,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf1e(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf56(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf7b(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfba(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfd3(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xff4(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1021(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1062(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x109b(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10d8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1118(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1154(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x118d(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x11cd(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x11d0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x11e7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x11f7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1212(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x124c(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1285(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1280(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1295(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x12ab(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x12c0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x12d5(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x12ea(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x12ff(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1314(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1328(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x133d(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x135a(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x136f(%rip),%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"\0A%s: generate CAN frames\0A\0A\00"
@.str.1 = [37 x i8] c"Usage: %s [options] <CAN interface>\0A\00"
@.str.2 = [64 x i8] c"Options: -g <ms> (gap in milli seconds - default: %d ms)\0A\00"
@.str.3 = [72 x i8] c" -e (generate extended frame mode (EFF) CAN frames)\0A\00"
@.str.4 = [53 x i8] c" -f (generate CAN FD CAN frames)\0A\00"
@.str.5 = [79 x i8] c" -b (generate CAN FD CAN frames with bitrate switch (BRS))\0A\00"
@.str.6 = [41 x i8] c" -R (send RTR frame)\0A\00"
@.str.7 = [49 x i8] c" -m (mix -e -f -b -R frames)\0A\00"
@.str.8 = [61 x i8] c" -I <mode> (CAN ID generation mode - see below)\0A\00"
@.str.9 = [81 x i8] c" -L <mode> (CAN data length code (dlc) generation mode - see below)\0A\00"
@.str.10 = [73 x i8] c" -D <mode> (CAN data (payload) generation mode - see below)\0A\00"
@.str.11 = [77 x i8] c" -p <timeout> (poll on -ENOBUFS to write frames with <timeout> ms)\0A\00"
@.str.12 = [80 x i8] c" -n <count> (terminate after <count> CAN frames - default infinite)\0A\00"
@.str.13 = [76 x i8] c" -i (ignore -ENOBUFS return values on write() syscalls)\0A\00"
@.str.14 = [73 x i8] c" -x (disable local loopback of generated CAN frames)\0A\00"
@.str.15 = [80 x i8] c" -v (increment verbose level for printing sent CAN frames)\0A\0A\00"
@.str.16 = [19 x i8] c"Generation modes:\0A\00"
@.str.17 = [39 x i8] c"'r' => random values (default)\0A\00"
@.str.18 = [32 x i8] c"'i' => increment values\0A\00"
@.str.19 = [43 x i8] c"<hexvalue> => fix value using <hexvalue>\0A\0A\00"
@.str.20 = [74 x i8] c"When incrementing the CAN data the data length code minimum is set to 1.\0A\00"
@.str.21 = [73 x i8] c"CAN IDs and data content are given and expected in hexadecimal values.\0A\0A\00"
@.str.22 = [11 x i8] c"Examples:\0A\00"
@.str.23 = [40 x i8] c"%s vcan0 -g 4 -I 42A -L 1 -D i -v -v \00"
@.str.24 = [38 x i8] c"(fixed CAN ID and length, inc. data)\0A\00"
@.str.25 = [40 x i8] c"%s vcan0 -e -L i -v -v -v \00"
@.str.26 = [37 x i8] c"(generate EFF frames, incr. length)\0A\00"
@.str.27 = [40 x i8] c"%s vcan0 -D 11223344DEADBEEF -L 8 \00"
@.str.28 = [37 x i8] c"(fixed CAN data payload and length)\0A\00"
@.str.29 = [40 x i8] c"%s vcan0 -g 0 -i -x \00"
@.str.30 = [36 x i8] c"(full load test ignoring -ENOBUFS)\0A\00"
@.str.31 = [40 x i8] c"%s vcan0 -g 0 -p 10 -x \00"
@.str.32 = [45 x i8] c"(full load test with polling, 10ms timeout)\0A\00"
@.str.33 = [40 x i8] c"%s vcan0 \00"
@.str.34 = [27 x i8] c"(my favourite default :)\0A\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 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @stderr
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0), i32 200)
%11 = load i32, i32* @stderr
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.3, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.4, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.5, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.7, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.8, i64 0, i64 0))
%23 = load i32, i32* @stderr
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.9, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.10, i64 0, i64 0))
%27 = load i32, i32* @stderr
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.11, i64 0, i64 0))
%29 = load i32, i32* @stderr
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.12, i64 0, i64 0))
%31 = load i32, i32* @stderr
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.13, i64 0, i64 0))
%33 = load i32, i32* @stderr
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.14, i64 0, i64 0))
%35 = load i32, i32* @stderr
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.15, i64 0, i64 0))
%37 = load i32, i32* @stderr
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0))
%39 = load i32, i32* @stderr
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.17, i64 0, i64 0))
%41 = load i32, i32* @stderr
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.18, i64 0, i64 0))
%43 = load i32, i32* @stderr
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.19, i64 0, i64 0))
%45 = load i32, i32* @stderr
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.20, i64 0, i64 0))
%47 = load i32, i32* @stderr
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.21, i64 0, i64 0))
%49 = load i32, i32* @stderr
%50 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.22, i64 0, i64 0))
%51 = load i32, i32* @stderr
%52 = load i8*, i8** %2
%53 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0), i8* %52)
%54 = load i32, i32* @stderr
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.24, i64 0, i64 0))
%56 = load i32, i32* @stderr
%57 = load i8*, i8** %2
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.25, i64 0, i64 0), i8* %57)
%59 = load i32, i32* @stderr
%60 = call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.26, i64 0, i64 0))
%61 = load i32, i32* @stderr
%62 = load i8*, i8** %2
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.27, i64 0, i64 0), i8* %62)
%64 = load i32, i32* @stderr
%65 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.28, i64 0, i64 0))
%66 = load i32, i32* @stderr
%67 = load i8*, i8** %2
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.29, i64 0, i64 0), i8* %67)
%69 = load i32, i32* @stderr
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.30, i64 0, i64 0))
%71 = load i32, i32* @stderr
%72 = load i8*, i8** %2
%73 = call i32 (i32, i8*, ...) @fprintf(i32 %71, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.31, i64 0, i64 0), i8* %72)
%74 = load i32, i32* @stderr
%75 = call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.32, i64 0, i64 0))
%76 = load i32, i32* @stderr
%77 = load i8*, i8** %2
%78 = call i32 (i32, i8*, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.33, i64 0, i64 0), i8* %77)
%79 = load i32, i32* @stderr
%80 = call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.34, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"\0A%s: generate CAN frames\0A\0A\00"
@.str.1 = [37 x i8] c"Usage: %s [options] <CAN interface>\0A\00"
@.str.2 = [64 x i8] c"Options: -g <ms> (gap in milli seconds - default: %d ms)\0A\00"
@.str.3 = [72 x i8] c" -e (generate extended frame mode (EFF) CAN frames)\0A\00"
@.str.4 = [53 x i8] c" -f (generate CAN FD CAN frames)\0A\00"
@.str.5 = [79 x i8] c" -b (generate CAN FD CAN frames with bitrate switch (BRS))\0A\00"
@.str.6 = [41 x i8] c" -R (send RTR frame)\0A\00"
@.str.7 = [49 x i8] c" -m (mix -e -f -b -R frames)\0A\00"
@.str.8 = [61 x i8] c" -I <mode> (CAN ID generation mode - see below)\0A\00"
@.str.9 = [81 x i8] c" -L <mode> (CAN data length code (dlc) generation mode - see below)\0A\00"
@.str.10 = [73 x i8] c" -D <mode> (CAN data (payload) generation mode - see below)\0A\00"
@.str.11 = [77 x i8] c" -p <timeout> (poll on -ENOBUFS to write frames with <timeout> ms)\0A\00"
@.str.12 = [80 x i8] c" -n <count> (terminate after <count> CAN frames - default infinite)\0A\00"
@.str.13 = [76 x i8] c" -i (ignore -ENOBUFS return values on write() syscalls)\0A\00"
@.str.14 = [73 x i8] c" -x (disable local loopback of generated CAN frames)\0A\00"
@.str.15 = [80 x i8] c" -v (increment verbose level for printing sent CAN frames)\0A\0A\00"
@.str.16 = [19 x i8] c"Generation modes:\0A\00"
@.str.17 = [39 x i8] c"'r' => random values (default)\0A\00"
@.str.18 = [32 x i8] c"'i' => increment values\0A\00"
@.str.19 = [43 x i8] c"<hexvalue> => fix value using <hexvalue>\0A\0A\00"
@.str.20 = [74 x i8] c"When incrementing the CAN data the data length code minimum is set to 1.\0A\00"
@.str.21 = [73 x i8] c"CAN IDs and data content are given and expected in hexadecimal values.\0A\0A\00"
@.str.22 = [11 x i8] c"Examples:\0A\00"
@.str.23 = [40 x i8] c"%s vcan0 -g 4 -I 42A -L 1 -D i -v -v \00"
@.str.24 = [38 x i8] c"(fixed CAN ID and length, inc. data)\0A\00"
@.str.25 = [40 x i8] c"%s vcan0 -e -L i -v -v -v \00"
@.str.26 = [37 x i8] c"(generate EFF frames, incr. length)\0A\00"
@.str.27 = [40 x i8] c"%s vcan0 -D 11223344DEADBEEF -L 8 \00"
@.str.28 = [37 x i8] c"(fixed CAN data payload and length)\0A\00"
@.str.29 = [40 x i8] c"%s vcan0 -g 0 -i -x \00"
@.str.30 = [36 x i8] c"(full load test ignoring -ENOBUFS)\0A\00"
@.str.31 = [40 x i8] c"%s vcan0 -g 0 -p 10 -x \00"
@.str.32 = [45 x i8] c"(full load test with polling, 10ms timeout)\0A\00"
@.str.33 = [40 x i8] c"%s vcan0 \00"
@.str.34 = [27 x i8] c"(my favourite default :)\0A\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0), i32 200)
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.3, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.4, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.5, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.7, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.8, i64 0, i64 0))
%20 = load i32, i32* @stderr
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.9, i64 0, i64 0))
%22 = load i32, i32* @stderr
%23 = tail call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.10, i64 0, i64 0))
%24 = load i32, i32* @stderr
%25 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.11, i64 0, i64 0))
%26 = load i32, i32* @stderr
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.12, i64 0, i64 0))
%28 = load i32, i32* @stderr
%29 = tail call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.13, i64 0, i64 0))
%30 = load i32, i32* @stderr
%31 = tail call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.14, i64 0, i64 0))
%32 = load i32, i32* @stderr
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.15, i64 0, i64 0))
%34 = load i32, i32* @stderr
%35 = tail call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0))
%36 = load i32, i32* @stderr
%37 = tail call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.17, i64 0, i64 0))
%38 = load i32, i32* @stderr
%39 = tail call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.18, i64 0, i64 0))
%40 = load i32, i32* @stderr
%41 = tail call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.19, i64 0, i64 0))
%42 = load i32, i32* @stderr
%43 = tail call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.20, i64 0, i64 0))
%44 = load i32, i32* @stderr
%45 = tail call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.21, i64 0, i64 0))
%46 = load i32, i32* @stderr
%47 = tail call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.22, i64 0, i64 0))
%48 = load i32, i32* @stderr
%49 = tail call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.23, i64 0, i64 0), i8* %0)
%50 = load i32, i32* @stderr
%51 = tail call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.24, i64 0, i64 0))
%52 = load i32, i32* @stderr
%53 = tail call i32 (i32, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.25, i64 0, i64 0), i8* %0)
%54 = load i32, i32* @stderr
%55 = tail call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.26, i64 0, i64 0))
%56 = load i32, i32* @stderr
%57 = tail call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.27, i64 0, i64 0), i8* %0)
%58 = load i32, i32* @stderr
%59 = tail call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.28, i64 0, i64 0))
%60 = load i32, i32* @stderr
%61 = tail call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.29, i64 0, i64 0), i8* %0)
%62 = load i32, i32* @stderr
%63 = tail call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.30, i64 0, i64 0))
%64 = load i32, i32* @stderr
%65 = tail call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.31, i64 0, i64 0), i8* %0)
%66 = load i32, i32* @stderr
%67 = tail call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.32, i64 0, i64 0))
%68 = load i32, i32* @stderr
%69 = tail call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.33, i64 0, i64 0), i8* %0)
%70 = load i32, i32* @stderr
%71 = tail call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.34, i64 0, i64 0))
ret void
}