#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 *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void print_usage(int after_error, int argc, char **argv) {
  (void)argc;
  fprintf(after_error ? stderr : stdout,
          "Usage: %s [-dh] [-f delay_ms] watchtab\n\n"
          "\t-d, --foreground\n"
          "\t\tDon't fork to background and log to stderr\n"
          "\t-h, --help\n"
          "\t\tDisplay this help text\n"
          "\t-w, --wait delay_ms\n"
          "\t\tWait that number of milliseconds after watchtab\n"
          "\t\tchanges before reloading it\n",
          argv[0]);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113d <print_usage+0x2d>
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1149 <print_usage+0x39>
mov    0x2e94(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xea6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
test   %edi,%edi
jne    111d <print_usage+0xd>
mov    0x2ebd(%rip),%rax
jmp    1124 <print_usage+0x14>
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
mov    (%rdx),%rdx
lea    0xed0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@stdout = global i32 0
@.str = [242 x i8] c"Usage: %s [-dh] [-f delay_ms] watchtab\0A\0A\09-d, --foreground\0A\09\09Don't fork to background and log to stderr\0A\09-h, --help\0A\09\09Display this help text\0A\09-w, --wait delay_ms\0A\09\09Wait that number of milliseconds after watchtab\0A\09\09changes before reloading it\0A\00"
define void @print_usage(i32 %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i32, i32* @stderr
br label %14
12: ; preds = %3
%13 = load i32, i32* @stdout
br label %14
14: ; preds = %12, %10
%15 = phi i32 [ %11, %10 ], [ %13, %12 ]
%16 = load i8**, i8*** %6
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
%19 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([242 x i8], [242 x i8]* @.str, i64 0, i64 0), i8* %18)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@stdout = global i32 0
@.str = [242 x i8] c"Usage: %s [-dh] [-f delay_ms] watchtab\0A\0A\09-d, --foreground\0A\09\09Don't fork to background and log to stderr\0A\09-h, --help\0A\09\09Display this help text\0A\09-w, --wait delay_ms\0A\09\09Wait that number of milliseconds after watchtab\0A\09\09changes before reloading it\0A\00"
define void @print_usage(i32 %0, i32 %1, i8** nocapture %2) {
%4 = icmp eq i32 %0, 0
%5 = load i32, i32* @stderr
%6 = load i32, i32* @stdout
%7 = select i1 %4, i32 %6, i32 %5
%8 = load i8*, i8** %2
%9 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([242 x i8], [242 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}