#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(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ stdout;
void usage(const char *execname, const char *msg) {
  if (msg)
    do {
      fprintf(stdout,
              "[logtop]"
              " "
              "%s",
              msg);
      fputc('\n', stdout);
    } while (0);
  printf("Usage: %s <config> [-d secs] [-h]\n"
         "    -h:      Display this help screen\n"
         "    -d secs: Auto-update display every 'secs' seconds\n",
         execname);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1191 <usage+0x51>
jmp    1160 <usage+0x20>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe8c(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
jmp    1191 <usage+0x51>
mov    -0x8(%rbp),%rsi
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %rsi,%rsi
je     1172 <usage+0x32>
mov    %rsi,%rdx
mov    0x2e8a(%rip),%r14
mov    (%r14),%edi
lea    0xea0(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%r14),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
lea    0xe93(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [12 x i8] c"[logtop] %s\00"
@.str.1 = [127 x i8] c"Usage: %s <config> [-d secs] [-h]\0A -h: Display this help screen\0A -d secs: Auto-update display every 'secs' seconds\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %15
7: ; preds = %2
br label %8
8: ; preds = %7
%9 = load i32, i32* @stdout
%10 = load i8*, i8** %4
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i32, i32* @stdout
%13 = call i32 @fputc(i8 signext 10, i32 %12)
br label %14
14: ; preds = %8
br label %15
15: ; preds = %14, %2
%16 = load i8*, i8** %3
%17 = call i32 @printf(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [12 x i8] c"[logtop] %s\00"
@.str.1 = [127 x i8] c"Usage: %s <config> [-d secs] [-h]\0A -h: Display this help screen\0A -d secs: Auto-update display every 'secs' seconds\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = load i32, i32* @stdout
%8 = tail call i32 @fputc(i8 signext 10, i32 %7)
br label %9
9: ; preds = %4, %2
%10 = tail call i32 @printf(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%11 = tail call i32 @exit(i32 0)
unreachable
}