#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(" -b, --bootstatus    Get last boot status (Watchdog/POR)\n");
  printf(" -d, --disable       Turn off the watchdog timer\n");
  printf(" -e, --enable        Turn on the watchdog timer\n");
  printf(" -h, --help          Print the help message\n");
  printf(" -p, --pingrate=P    Set ping rate to P seconds (default %d)\n", 1);
  printf(" -t, --timeout=T     Set timeout to T seconds\n");
  printf(" -T, --gettimeout    Get the timeout\n");
  printf(" -n, --pretimeout=T  Set the pretimeout to T seconds\n");
  printf(" -N, --getpretimeout Get the pretimeout\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    0xf0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf72(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfbe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xffe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x100b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x102c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0x1038(%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    0xf43(%rip),%rdi
call   1040 <puts@plt>
lea    0xf70(%rip),%rdi
call   1040 <puts@plt>
lea    0xf95(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb9(%rip),%rdi
call   1040 <puts@plt>
lea    0xe99(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xfc6(%rip),%rdi
call   1040 <puts@plt>
lea    0xfe8(%rip),%rdi
call   1040 <puts@plt>
lea    0x1001(%rip),%rdi
call   1040 <puts@plt>
lea    0x102a(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x103c(%rip),%rdi
call   1040 <puts@plt>
lea    0xe7e(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe8b(%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 = [58 x i8] c" -b, --bootstatus Get last boot status (Watchdog/POR)\0A\00"
@.str.2 = [50 x i8] c" -d, --disable Turn off the watchdog timer\0A\00"
@.str.3 = [49 x i8] c" -e, --enable Turn on the watchdog timer\0A\00"
@.str.4 = [45 x i8] c" -h, --help Print the help message\0A\00"
@.str.5 = [62 x i8] c" -p, --pingrate=P Set ping rate to P seconds (default %d)\0A\00"
@.str.6 = [47 x i8] c" -t, --timeout=T Set timeout to T seconds\0A\00"
@.str.7 = [38 x i8] c" -T, --gettimeout Get the timeout\0A\00"
@.str.8 = [54 x i8] c" -n, --pretimeout=T Set the pretimeout to T seconds\0A\00"
@.str.9 = [41 x i8] c" -N, --getpretimeout Get the pretimeout\0A\00"
@.str.10 = [2 x i8] c"\0A\00"
@.str.11 = [51 x i8] c"Parameters are parsed left-to-right in real-time.\0A\00"
@.str.12 = [30 x i8] c"Example: %s -d -t 10 -p 5 -e\0A\00"
@.str.13 = [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 ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0), i32 1)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.11, i64 0, i64 0))
%16 = load i8*, i8** %2
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i8* %16)
%18 = load i8*, i8** %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0), i8* %18)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.5 = [62 x i8] c" -p, --pingrate=P Set ping rate to P seconds (default %d)\0A\00"
@.str.12 = [30 x i8] c"Example: %s -d -t 10 -p 5 -e\0A\00"
@.str.13 = [30 x i8] c"Example: %s -t 12 -T -n 7 -N\0A\00"
@str = [57 x i8] c" -b, --bootstatus Get last boot status (Watchdog/POR)\00"
@str.14 = [49 x i8] c" -d, --disable Turn off the watchdog timer\00"
@str.15 = [48 x i8] c" -e, --enable Turn on the watchdog timer\00"
@str.16 = [44 x i8] c" -h, --help Print the help message\00"
@str.17 = [46 x i8] c" -t, --timeout=T Set timeout to T seconds\00"
@str.18 = [37 x i8] c" -T, --gettimeout Get the timeout\00"
@str.19 = [53 x i8] c" -n, --pretimeout=T Set the pretimeout to T seconds\00"
@str.20 = [40 x i8] c" -N, --getpretimeout Get the pretimeout\00"
@str.21 = [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 ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.14, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.15, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.16, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0), i32 1)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.17, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.18, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.19, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.20, i64 0, i64 0))
%12 = tail call i32 @putchar(i32 10)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.21, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i8* %0)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0), i8* %0)
ret void
}