#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*/ get_reminders(char **, char **, int *);
int /*<<< orphan*/ print_reminders(char **, char **, int *);
int /*<<< orphan*/ sort_reminders(char **, char **, int *);
int main(void) {
  char date_str[365][12];
  char msg_str[365][69];
  int reminders = 0;
  get_reminders(date_str, msg_str, &reminders);
  sort_reminders(date_str, msg_str, &reminders);
  print_reminders(date_str, msg_str, &reminders);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x73a0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x7394(%rbp)
lea    -0x1120(%rbp),%rdi
lea    -0x7390(%rbp),%rsi
lea    -0x7394(%rbp),%rdx
call   1030 <get_reminders@plt>
lea    -0x1120(%rbp),%rdi
lea    -0x7390(%rbp),%rsi
lea    -0x7394(%rbp),%rdx
call   1040 <sort_reminders@plt>
lea    -0x1120(%rbp),%rdi
lea    -0x7390(%rbp),%rsi
lea    -0x7394(%rbp),%rdx
call   1050 <print_reminders@plt>
xor    %eax,%eax
add    $0x73a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x73a0,%rsp
movl   $0x0,0xc(%rsp)
lea    0x10(%rsp),%rbx
lea    0x1130(%rsp),%r14
lea    0xc(%rsp),%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <get_reminders@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <sort_reminders@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <print_reminders@plt>
xor    %eax,%eax
add    $0x73a0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [365 x [12 x i8]]
%3 = alloca [365 x [69 x i8]]
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
%5 = getelementptr inbounds [365 x [12 x i8]], [365 x [12 x i8]]* %2, i64 0, i64 0
%6 = bitcast [12 x i8]* %5 to i8**
%7 = getelementptr inbounds [365 x [69 x i8]], [365 x [69 x i8]]* %3, i64 0, i64 0
%8 = bitcast [69 x i8]* %7 to i8**
%9 = call i32 @get_reminders(i8** %6, i8** %8, i32* %4)
%10 = getelementptr inbounds [365 x [12 x i8]], [365 x [12 x i8]]* %2, i64 0, i64 0
%11 = bitcast [12 x i8]* %10 to i8**
%12 = getelementptr inbounds [365 x [69 x i8]], [365 x [69 x i8]]* %3, i64 0, i64 0
%13 = bitcast [69 x i8]* %12 to i8**
%14 = call i32 @sort_reminders(i8** %11, i8** %13, i32* %4)
%15 = getelementptr inbounds [365 x [12 x i8]], [365 x [12 x i8]]* %2, i64 0, i64 0
%16 = bitcast [12 x i8]* %15 to i8**
%17 = getelementptr inbounds [365 x [69 x i8]], [365 x [69 x i8]]* %3, i64 0, i64 0
%18 = bitcast [69 x i8]* %17 to i8**
%19 = call i32 @print_reminders(i8** %16, i8** %18, i32* %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [365 x [12 x i8]]
%2 = alloca [365 x [69 x i8]]
%3 = alloca i32
%4 = getelementptr inbounds [365 x [12 x i8]], [365 x [12 x i8]]* %1, i64 0, i64 0, i64 0
%5 = getelementptr inbounds [365 x [69 x i8]], [365 x [69 x i8]]* %2, i64 0, i64 0, i64 0
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%7 = bitcast [365 x [12 x i8]]* %1 to i8**
%8 = bitcast [365 x [69 x i8]]* %2 to i8**
%9 = call i32 @get_reminders(i8** %7, i8** %8, i32* %3)
%10 = call i32 @sort_reminders(i8** %7, i8** %8, i32* %3)
%11 = call i32 @print_reminders(i8** %7, i8** %8, i32* %3)
ret i32 0
}