#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_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr,
          "Usage:	%s [-c] [-d driver] -g|-r  [-a|   -m M_SLOT -i "
          "I_SLOT|-w W_SLOT] device\n"
          "	%s [-c] [-d driver] -s ARG [-a|-e|-m M_SLOT -i I_SLOT|-w "
          "W_SLOT] device\n"
          "	%s [-c] [-d driver] -f firmware device\n\n"
          "	-c, --caps		print capabilities of controller\n"
          "	-d, --driver		driver to use to communicate to "
          "controller (default: stm32)\n"
          "	-e, --emit		emit once\n"
          "	-f, --flash=FW		flash firmware FW to controller\n"
          "	-g, --get		get property\n"
          "	-s, --set=ARG		set property to ARG\n"
          "	-r, --reset		reset property\n",
          name, name, name);
  fprintf(
      stderr,
      "Properties:\n"
      "	-a, --alarm		number of seconds to wakeup host from now\n"
      "	-i, --ir=I_SLOT		ir-code in I_SLOT of macro M_SLOT\n"
      "	-m, --macro=M_SLOT	select macro M_SLOT\n"
      "	-w, --wakeup=W_SLOT	wakeup ir-code of W_SLOT\n\n");
  fprintf(stderr,
          "Examples (using driver stm32 on /dev/hidraw0):\n"
          "	1. Get wakeup time in seconds from now\n"
          "		%s -dstm32 -a -g /dev/hidraw0\n"
          "	2. Set wakeup time to 1 hour from now\n"
          "		%s -dstm32 -a -s3600 /dev/hidraw0\n"
          "	3. Set first wakeup ir-code to 0x112233445566\n"
          "		%s -dstm32 -w1 -s0x112233445566 /dev/hidraw0\n"
          "	4. Send 0x112233445566 once\n"
          "		%s -dstm32 -e -s0x112233445566 /dev/hidraw0\n",
          name, name, name, name);
  fprintf(stderr,
          "	5. Set third macro to be triggered by 0x112233445566,\n"
          "	   which will when send out two commands (1: 0x778899AABBCC, "
          "2: 0xDDEEFF001122)\n"
          "		%s -dstm32 -m3 -i0 -s0x112233445566 /dev/hidraw0\n"
          "		%s -dstm32 -m3 -i1 -s0x778899AABBCC /dev/hidraw0\n"
          "		%s -dstm32 -m3 -i2 -s0xDDEEFF001122 /dev/hidraw0\n"
          "		%s -dstm32 -m3 -i3 -r /dev/hidraw0\n\n"
          "	These ir-codes can be retrieved from irmplircd and are based "
          "on the IRMP protocol.\n",
          name, name, name, name);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<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
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
lea    0x107e(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    -0x8(%rbp),%r9
lea    0x1127(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e4c(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    -0x8(%rbp),%r9
lea    0x126c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
mov    %rbx,%rdx
mov    %rbx,%rcx
mov    %rbx,%r8
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x108b(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x114a(%rip),%rsi
mov    %rbx,%rdx
mov    %rbx,%rcx
mov    %rbx,%r8
mov    %rbx,%r9
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x1299(%rip),%rsi
mov    %rbx,%rdx
mov    %rbx,%rcx
mov    %rbx,%r8
mov    %rbx,%r9
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [477 x i8] c"Usage:\09%s [-c] [-d driver] -g|-r [-a| -m M_SLOT -i I_SLOT|-w W_SLOT] device\0A\09%s [-c] [-d driver] -s ARG [-a|-e|-m M_SLOT -i I_SLOT|-w W_SLOT] device\0A\09%s [-c] [-d driver] -f firmware device\0A\0A\09-c, --caps\09\09print capabilities of controller\0A\09-d, --driver\09\09driver to use to communicate to controller (default: stm32)\0A\09-e, --emit\09\09emit once\0A\09-f, --flash=FW\09\09flash firmware FW to controller\0A\09-g, --get\09\09get property\0A\09-s, --set=ARG\09\09set property to ARG\0A\09-r, --reset\09\09reset property\0A\00"
@.str.1 = [208 x i8] c"Properties:\0A\09-a, --alarm\09\09number of seconds to wakeup host from now\0A\09-i, --ir=I_SLOT\09\09ir-code in I_SLOT of macro M_SLOT\0A\09-m, --macro=M_SLOT\09select macro M_SLOT\0A\09-w, --wakeup=W_SLOT\09wakeup ir-code of W_SLOT\0A\0A\00"
@.str.2 = [364 x i8] c"Examples (using driver stm32 on /dev/hidraw0):\0A\091. Get wakeup time in seconds from now\0A\09\09%s -dstm32 -a -g /dev/hidraw0\0A\092. Set wakeup time to 1 hour from now\0A\09\09%s -dstm32 -a -s3600 /dev/hidraw0\0A\093. Set first wakeup ir-code to 0x112233445566\0A\09\09%s -dstm32 -w1 -s0x112233445566 /dev/hidraw0\0A\094. Send 0x112233445566 once\0A\09\09%s -dstm32 -e -s0x112233445566 /dev/hidraw0\0A\00"
@.str.3 = [412 x i8] c"\095. Set third macro to be triggered by 0x112233445566,\0A\09 which will when send out two commands (1: 0x778899AABBCC, 2: 0xDDEEFF001122)\0A\09\09%s -dstm32 -m3 -i0 -s0x112233445566 /dev/hidraw0\0A\09\09%s -dstm32 -m3 -i1 -s0x778899AABBCC /dev/hidraw0\0A\09\09%s -dstm32 -m3 -i2 -s0xDDEEFF001122 /dev/hidraw0\0A\09\09%s -dstm32 -m3 -i3 -r /dev/hidraw0\0A\0A\09These ir-codes can be retrieved from irmplircd and are based on the IRMP protocol.\0A\00"
@EXIT_FAILURE = global i32 0
define void @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 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([477 x i8], [477 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5, i8* %6)
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %2
%12 = load i8*, i8** %2
%13 = load i8*, i8** %2
%14 = load i8*, i8** %2
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([364 x i8], [364 x i8]* @.str.2, i64 0, i64 0), i8* %11, i8* %12, i8* %13, i8* %14)
%16 = load i32, i32* @stderr
%17 = load i8*, i8** %2
%18 = load i8*, i8** %2
%19 = load i8*, i8** %2
%20 = load i8*, i8** %2
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([412 x i8], [412 x i8]* @.str.3, i64 0, i64 0), i8* %17, i8* %18, i8* %19, i8* %20)
%22 = load i32, i32* @EXIT_FAILURE
%23 = call i32 @exit(i32 %22)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [477 x i8] c"Usage:\09%s [-c] [-d driver] -g|-r [-a| -m M_SLOT -i I_SLOT|-w W_SLOT] device\0A\09%s [-c] [-d driver] -s ARG [-a|-e|-m M_SLOT -i I_SLOT|-w W_SLOT] device\0A\09%s [-c] [-d driver] -f firmware device\0A\0A\09-c, --caps\09\09print capabilities of controller\0A\09-d, --driver\09\09driver to use to communicate to controller (default: stm32)\0A\09-e, --emit\09\09emit once\0A\09-f, --flash=FW\09\09flash firmware FW to controller\0A\09-g, --get\09\09get property\0A\09-s, --set=ARG\09\09set property to ARG\0A\09-r, --reset\09\09reset property\0A\00"
@.str.1 = [208 x i8] c"Properties:\0A\09-a, --alarm\09\09number of seconds to wakeup host from now\0A\09-i, --ir=I_SLOT\09\09ir-code in I_SLOT of macro M_SLOT\0A\09-m, --macro=M_SLOT\09select macro M_SLOT\0A\09-w, --wakeup=W_SLOT\09wakeup ir-code of W_SLOT\0A\0A\00"
@.str.2 = [364 x i8] c"Examples (using driver stm32 on /dev/hidraw0):\0A\091. Get wakeup time in seconds from now\0A\09\09%s -dstm32 -a -g /dev/hidraw0\0A\092. Set wakeup time to 1 hour from now\0A\09\09%s -dstm32 -a -s3600 /dev/hidraw0\0A\093. Set first wakeup ir-code to 0x112233445566\0A\09\09%s -dstm32 -w1 -s0x112233445566 /dev/hidraw0\0A\094. Send 0x112233445566 once\0A\09\09%s -dstm32 -e -s0x112233445566 /dev/hidraw0\0A\00"
@.str.3 = [412 x i8] c"\095. Set third macro to be triggered by 0x112233445566,\0A\09 which will when send out two commands (1: 0x778899AABBCC, 2: 0xDDEEFF001122)\0A\09\09%s -dstm32 -m3 -i0 -s0x112233445566 /dev/hidraw0\0A\09\09%s -dstm32 -m3 -i1 -s0x778899AABBCC /dev/hidraw0\0A\09\09%s -dstm32 -m3 -i2 -s0xDDEEFF001122 /dev/hidraw0\0A\09\09%s -dstm32 -m3 -i3 -r /dev/hidraw0\0A\0A\09These ir-codes can be retrieved from irmplircd and are based on the IRMP protocol.\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([477 x i8], [477 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([364 x i8], [364 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* %0, i8* %0, i8* %0)
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([412 x i8], [412 x i8]* @.str.3, i64 0, i64 0), i8* %0, i8* %0, i8* %0, i8* %0)
%10 = load i32, i32* @EXIT_FAILURE
%11 = tail call i32 @exit(i32 %10)
unreachable
}