#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*/ die(int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
void usage(int status, int errno) {
  fprintf(stdout, "Usage: %s [options]...\n", "kapan");
  fprintf(stdout,
          "-d, --date STRING	Display what's happening on the period "
          "STRING\n-f, --file FILE		Use FILE as database\n-r, "
          "--remove ID		Remove event ID\n-a, --add STRING	Add "
          "event STRING\n-l, --list		List all events\n-e, "
          "--edit		Edit the database in your favorite editor\n-h, "
          "--help		Display this help message\n");
  fprintf(
      stdout,
      "Event STRING should be of the format \"STARTTIME["
      "|"
      "ENDTIME]"
      "|"
      "DESCRIPTION\"\nPeriod STRING should be of the format \"[STARTTIME"
      "|"
      "]ENDTIME\". If no STARTTIME is provided, current time is assumed.\n");
  die(status, 0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
lea    0xed3(%rip),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
lea    0xfcd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    0x2eb4(%rip),%rbx
mov    (%rbx),%edi
lea    0xecb(%rip),%rsi
lea    0xedc(%rip),%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed2(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfe4(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    %ebp,%edi
xor    %esi,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <die@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [24 x i8] c"Usage: %s [options]...\0A\00"
@.str.1 = [6 x i8] c"kapan\00"
@.str.2 = [290 x i8] c"-d, --date STRING\09Display what's happening on the period STRING\0A-f, --file FILE\09\09Use FILE as database\0A-r, --remove ID\09\09Remove event ID\0A-a, --add STRING\09Add event STRING\0A-l, --list\09\09List all events\0A-e, --edit\09\09Edit the database in your favorite editor\0A-h, --help\09\09Display this help message\0A\00"
@.str.3 = [187 x i8] c"Event STRING should be of the format \22STARTTIME[|ENDTIME]|DESCRIPTION\22\0APeriod STRING should be of the format \22[STARTTIME|]ENDTIME\22. If no STARTTIME is provided, current time is assumed.\0A\00"
define void @usage(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdout
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([290 x i8], [290 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* @stdout
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([187 x i8], [187 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32, i32* %3
%12 = call i32 @die(i32 %11, i32 0)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [24 x i8] c"Usage: %s [options]...\0A\00"
@.str.1 = [6 x i8] c"kapan\00"
@.str.2 = [290 x i8] c"-d, --date STRING\09Display what's happening on the period STRING\0A-f, --file FILE\09\09Use FILE as database\0A-r, --remove ID\09\09Remove event ID\0A-a, --add STRING\09Add event STRING\0A-l, --list\09\09List all events\0A-e, --edit\09\09Edit the database in your favorite editor\0A-h, --help\09\09Display this help message\0A\00"
@.str.3 = [187 x i8] c"Event STRING should be of the format \22STARTTIME[|ENDTIME]|DESCRIPTION\22\0APeriod STRING should be of the format \22[STARTTIME|]ENDTIME\22. If no STARTTIME is provided, current time is assumed.\0A\00"
define void @usage(i32 %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([290 x i8], [290 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([187 x i8], [187 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 @die(i32 %0, i32 0)
ret void
}