#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*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
usage() {
  fputs("usage: cal [option] [mm yyyy]\n", stdout);
  fputs("-[h][?] - show help\n", stdout);
  fputs("-i      - interactive\n", stdout);
  fputs("print monthly calendar as in: cal 3 2000\n", stdout);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
lea    0xed8(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
lea    0xee2(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%esi
lea    0xee2(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%esi
lea    0xee4(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xef0(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xef7(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf00(%rip),%rdi
pop    %rbx
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"usage: cal [option] [mm yyyy]\0A\00"
@stdout = global i32 0
@.str.1 = [21 x i8] c"-[h][?] - show help\0A\00"
@.str.2 = [23 x i8] c"-i - interactive\0A\00"
@.str.3 = [42 x i8] c"print monthly calendar as in: cal 3 2000\0A\00"
define i32 @usage() {
%1 = alloca i32
%2 = load i32, i32* @stdout
%3 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @stdout
%5 = call i32 @fputs(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @stdout
%7 = call i32 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fputs(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [31 x i8] c"usage: cal [option] [mm yyyy]\0A\00"
@stdout = global i32 0
@.str.1 = [21 x i8] c"-[h][?] - show help\0A\00"
@.str.2 = [23 x i8] c"-i - interactive\0A\00"
@.str.3 = [42 x i8] c"print monthly calendar as in: cal 3 2000\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @stdout
%8 = tail call i32 @fputs(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0), i32 %7)
ret i32 undef
}