#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*/ printf(char *, ...);
void usage(char *progname) {
  printf("Usage: %s [options]\n", progname);
  printf(" -f, --file\t\tOpen watchdog device file\n");
  printf("\t\t\tDefault is /dev/watchdog\n");
  printf(" -i, --info\t\tShow watchdog_info\n");
  printf(" -b, --bootstatus\tGet last boot status (Watchdog/POR)\n");
  printf(" -d, --disable\t\tTurn off the watchdog timer\n");
  printf(" -e, --enable\t\tTurn on the watchdog timer\n");
  printf(" -h, --help\t\tPrint the help message\n");
  printf(" -p, --pingrate=P\tSet ping rate to P seconds (default %d)\n", 1);
  printf(" -t, --timeout=T\tSet timeout to T seconds\n");
  printf(" -T, --gettimeout\tGet the timeout\n");
  printf(" -n, --pretimeout=T\tSet the pretimeout to T seconds\n");
  printf(" -N, --getpretimeout\tGet the pretimeout\n");
  printf(" -L, --gettimeleft\tGet the time left until timer expires\n");
  printf("\n");
  printf("Parameters are parsed left-to-right in real-time.\n");
  printf("Example: %s -d -t 10 -p 5 -e\n", progname);
  printf("Example: %s -t 12 -T -n 7 -N\n", progname);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf64(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf98(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfdd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1019(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1034(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1052(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x1073(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x107f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf40(%rip),%rdi
call   1040 <puts@plt>
lea    0xf5b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf6b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7f(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa9(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc9(%rip),%rdi
call   1040 <puts@plt>
lea    0xfe7(%rip),%rdi
call   1040 <puts@plt>
lea    0xe75(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xfec(%rip),%rdi
call   1040 <puts@plt>
lea    0x100a(%rip),%rdi
call   1040 <puts@plt>
lea    0x1020(%rip),%rdi
call   1040 <puts@plt>
lea    0x1048(%rip),%rdi
call   1040 <puts@plt>
lea    0x1064(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1087(%rip),%rdi
call   1040 <puts@plt>
lea    0xe4b(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe58(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.1 = [40 x i8] c" -f, --file\09\09Open watchdog device file\0A\00"
@.str.2 = [29 x i8] c"\09\09\09Default is /dev/watchdog\0A\00"
@.str.3 = [33 x i8] c" -i, --info\09\09Show watchdog_info\0A\00"
@.str.4 = [55 x i8] c" -b, --bootstatus\09Get last boot status (Watchdog/POR)\0A\00"
@.str.5 = [45 x i8] c" -d, --disable\09\09Turn off the watchdog timer\0A\00"
@.str.6 = [43 x i8] c" -e, --enable\09\09Turn on the watchdog timer\0A\00"
@.str.7 = [37 x i8] c" -h, --help\09\09Print the help message\0A\00"
@.str.8 = [59 x i8] c" -p, --pingrate=P\09Set ping rate to P seconds (default %d)\0A\00"
@.str.9 = [43 x i8] c" -t, --timeout=T\09Set timeout to T seconds\0A\00"
@.str.10 = [35 x i8] c" -T, --gettimeout\09Get the timeout\0A\00"
@.str.11 = [53 x i8] c" -n, --pretimeout=T\09Set the pretimeout to T seconds\0A\00"
@.str.12 = [41 x i8] c" -N, --getpretimeout\09Get the pretimeout\0A\00"
@.str.13 = [58 x i8] c" -L, --gettimeleft\09Get the time left until timer expires\0A\00"
@.str.14 = [2 x i8] c"\0A\00"
@.str.15 = [51 x i8] c"Parameters are parsed left-to-right in real-time.\0A\00"
@.str.16 = [30 x i8] c"Example: %s -d -t 10 -p 5 -e\0A\00"
@.str.17 = [30 x i8] c"Example: %s -t 12 -T -n 7 -N\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.8, i64 0, i64 0), i32 1)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.15, i64 0, i64 0))
%20 = load i8*, i8** %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0), i8* %20)
%22 = load i8*, i8** %2
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0), i8* %22)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.8 = [59 x i8] c" -p, --pingrate=P\09Set ping rate to P seconds (default %d)\0A\00"
@.str.16 = [30 x i8] c"Example: %s -d -t 10 -p 5 -e\0A\00"
@.str.17 = [30 x i8] c"Example: %s -t 12 -T -n 7 -N\0A\00"
@str = [39 x i8] c" -f, --file\09\09Open watchdog device file\00"
@str.18 = [28 x i8] c"\09\09\09Default is /dev/watchdog\00"
@str.19 = [32 x i8] c" -i, --info\09\09Show watchdog_info\00"
@str.20 = [54 x i8] c" -b, --bootstatus\09Get last boot status (Watchdog/POR)\00"
@str.21 = [44 x i8] c" -d, --disable\09\09Turn off the watchdog timer\00"
@str.22 = [42 x i8] c" -e, --enable\09\09Turn on the watchdog timer\00"
@str.23 = [36 x i8] c" -h, --help\09\09Print the help message\00"
@str.24 = [42 x i8] c" -t, --timeout=T\09Set timeout to T seconds\00"
@str.25 = [34 x i8] c" -T, --gettimeout\09Get the timeout\00"
@str.26 = [52 x i8] c" -n, --pretimeout=T\09Set the pretimeout to T seconds\00"
@str.27 = [40 x i8] c" -N, --getpretimeout\09Get the pretimeout\00"
@str.28 = [57 x i8] c" -L, --gettimeleft\09Get the time left until timer expires\00"
@str.29 = [50 x i8] c"Parameters are parsed left-to-right in real-time.\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.18, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.19, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.20, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.21, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.22, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.23, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.8, i64 0, i64 0), i32 1)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.24, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.25, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.26, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.27, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.28, i64 0, i64 0))
%16 = tail call i32 @putchar(i32 10)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.29, i64 0, i64 0))
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0), i8* %0)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0), i8* %0)
ret void
}