#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 *, ...);
int /*<<< orphan*/ print_version();
int /*<<< orphan*/ stderr;
void help(void) {
  print_version();
  fprintf(stderr, "\nUsage: %s [options]\n\n", "tasknc");
  fprintf(stderr,
          "  Options:\n"
          "    -l, --loglevel [value]   set log level\n"
          "    -d, --debug              debug mode\n"
          "    -f, --filter             set the initial filter\n"
          "    -h, --help               print this help message and exit\n"
          "    -v, --version            print the version and exit\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <print_version@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
lea    0xed5(%rip),%rdx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rbx
xor    %eax,%eax
call   1030 <print_version@plt>
mov    0x2eb1(%rip),%rbx
mov    (%rbx),%edi
lea    0xec8(%rip),%rsi
lea    0xed8(%rip),%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"\0AUsage: %s [options]\0A\0A\00"
@.str.1 = [7 x i8] c"tasknc\00"
@.str.2 = [265 x i8] c" Options:\0A -l, --loglevel [value] set log level\0A -d, --debug debug mode\0A -f, --filter set the initial filter\0A -h, --help print this help message and exit\0A -v, --version print the version and exit\0A\00"
define void @help() {
%1 = call i32 (...) @print_version()
%2 = load i32, i32* @stderr
%3 = call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([265 x i8], [265 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"\0AUsage: %s [options]\0A\0A\00"
@.str.1 = [7 x i8] c"tasknc\00"
@.str.2 = [265 x i8] c" Options:\0A -l, --loglevel [value] set log level\0A -d, --debug debug mode\0A -f, --filter set the initial filter\0A -h, --help print this help message and exit\0A -v, --version print the version and exit\0A\00"
define void @help() {
%1 = tail call i32 (...) @print_version()
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([265 x i8], [265 x i8]* @.str.2, i64 0, i64 0))
ret void
}