#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 */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ get_interval(int, char **, int /*<<< orphan*/ *,
                                int /*<<< orphan*/ *);
int /*<<< orphan*/ get_month(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ get_today(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ get_tomorrow(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ get_week(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ get_yesterday(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ strcmp(char *, char *);
void parseCons(int argc, char **argv, time_t *dataInicial, time_t *dataFinal) {
  char *comm = argv[1];
  if (!strcmp(comm, "hoje"))
    get_today(dataInicial, dataFinal);
  else if (!strcmp(comm, "amanha"))
    get_tomorrow(dataInicial, dataFinal);
  else if (!strcmp(comm, "ontem"))
    get_yesterday(dataInicial, dataFinal);
  else if (!strcmp(comm, "semana"))
    get_week(dataInicial, dataFinal);
  else if (!strcmp(comm, "mes"))
    get_month(dataInicial, dataFinal);
  else
    get_interval(argc, argv, dataInicial, dataFinal);
}


x86 assembly (clang, -O0):
<parseCons>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xe62(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    11be <parseCons+0x4e>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <get_today@plt>
jmp    1292 <parseCons+0x122>
mov    -0x28(%rbp),%rdi
lea    0xe3c(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    11e9 <parseCons+0x79>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <get_tomorrow@plt>
jmp    128d <parseCons+0x11d>
mov    -0x28(%rbp),%rdi
lea    0xe18(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    1214 <parseCons+0xa4>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <get_yesterday@plt>
jmp    1288 <parseCons+0x118>
mov    -0x28(%rbp),%rdi
lea    0xdf3(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    123f <parseCons+0xcf>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1060 <get_week@plt>
jmp    1283 <parseCons+0x113>
mov    -0x28(%rbp),%rdi
lea    0xdcf(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    126a <parseCons+0xfa>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1090 <get_month@plt>
jmp    127e <parseCons+0x10e>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1080 <get_interval@plt>
jmp    1283 <parseCons+0x113>
jmp    1288 <parseCons+0x118>
jmp    128d <parseCons+0x11d>
jmp    1292 <parseCons+0x122>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseCons>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %edi,%r12d
mov    0x8(%rsi),%rbp
lea    0xe71(%rip),%rsi
mov    %rbp,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     1200 <parseCons+0x90>
lea    0xe63(%rip),%rsi
mov    %rbp,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     1213 <parseCons+0xa3>
lea    0xe57(%rip),%rsi
mov    %rbp,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     1226 <parseCons+0xb6>
lea    0xe4a(%rip),%rsi
mov    %rbp,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     1239 <parseCons+0xc9>
lea    0xe3e(%rip),%rsi
mov    %rbp,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     124c <parseCons+0xdc>
mov    %r12d,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <get_interval@plt>
mov    %r15,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <get_today@plt>
mov    %r15,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <get_tomorrow@plt>
mov    %r15,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <get_yesterday@plt>
mov    %r15,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <get_week@plt>
mov    %r15,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <get_month@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"hoje\00"
@.str.1 = [7 x i8] c"amanha\00"
@.str.2 = [6 x i8] c"ontem\00"
@.str.3 = [7 x i8] c"semana\00"
@.str.4 = [4 x i8] c"mes\00"
define void @parseCons(i32 %0, i8** %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i8*
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%10 = load i8**, i8*** %6
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
store i8* %12, i8** %9
%13 = load i8*, i8** %9
%14 = call i32 @strcmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%15 = icmp ne i32 %14, 0
br i1 %15, label %20, label %16
16: ; preds = %4
%17 = load i32*, i32** %7
%18 = load i32*, i32** %8
%19 = call i32 @get_today(i32* %17, i32* %18)
br label %62
20: ; preds = %4
%21 = load i8*, i8** %9
%22 = call i32 @strcmp(i8* %21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp ne i32 %22, 0
br i1 %23, label %28, label %24
24: ; preds = %20
%25 = load i32*, i32** %7
%26 = load i32*, i32** %8
%27 = call i32 @get_tomorrow(i32* %25, i32* %26)
br label %61
28: ; preds = %20
%29 = load i8*, i8** %9
%30 = call i32 @strcmp(i8* %29, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%31 = icmp ne i32 %30, 0
br i1 %31, label %36, label %32
32: ; preds = %28
%33 = load i32*, i32** %7
%34 = load i32*, i32** %8
%35 = call i32 @get_yesterday(i32* %33, i32* %34)
br label %60
36: ; preds = %28
%37 = load i8*, i8** %9
%38 = call i32 @strcmp(i8* %37, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%39 = icmp ne i32 %38, 0
br i1 %39, label %44, label %40
40: ; preds = %36
%41 = load i32*, i32** %7
%42 = load i32*, i32** %8
%43 = call i32 @get_week(i32* %41, i32* %42)
br label %59
44: ; preds = %36
%45 = load i8*, i8** %9
%46 = call i32 @strcmp(i8* %45, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%47 = icmp ne i32 %46, 0
br i1 %47, label %52, label %48
48: ; preds = %44
%49 = load i32*, i32** %7
%50 = load i32*, i32** %8
%51 = call i32 @get_month(i32* %49, i32* %50)
br label %58
52: ; preds = %44
%53 = load i32, i32* %5
%54 = load i8**, i8*** %6
%55 = load i32*, i32** %7
%56 = load i32*, i32** %8
%57 = call i32 @get_interval(i32 %53, i8** %54, i32* %55, i32* %56)
br label %58
58: ; preds = %52, %48
br label %59
59: ; preds = %58, %40
br label %60
60: ; preds = %59, %32
br label %61
61: ; preds = %60, %24
br label %62
62: ; preds = %61, %16
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"hoje\00"
@.str.1 = [7 x i8] c"amanha\00"
@.str.2 = [6 x i8] c"ontem\00"
@.str.3 = [7 x i8] c"semana\00"
@.str.4 = [4 x i8] c"mes\00"
define void @parseCons(i32 %0, i8** %1, i32* %2, i32* %3) {
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = tail call i32 @get_today(i32* %2, i32* %3)
br label %33
11: ; preds = %4
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = tail call i32 @get_tomorrow(i32* %2, i32* %3)
br label %33
16: ; preds = %11
%17 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = tail call i32 @get_yesterday(i32* %2, i32* %3)
br label %33
21: ; preds = %16
%22 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = tail call i32 @get_week(i32* %2, i32* %3)
br label %33
26: ; preds = %21
%27 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = tail call i32 @get_month(i32* %2, i32* %3)
br label %33
31: ; preds = %26
%32 = tail call i32 @get_interval(i32 %0, i8** %1, i32* %2, i32* %3)
br label %33
33: ; preds = %14, %24, %31, %29, %19, %9
ret void
}