// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]todo/src/args.cpp
// Function: parseArgs(int, char**)
bool parseArgs(int argv, char **argc)
{
    if (argv <= 1){
        return false;
    }

    for (int i = 1; i < argv; i++){
        if (string(argc[i]) == "-h" || 
            string(argc[i]) == "-help" || 
            string(argc[i]) == "--help"){           
            
            printUsage();
            return true;
        } 
        
        else if (string(argc[i]) == "-version" ||
                 string(argc[i]) == "--version"){
            
            printVersion();
            return true;
        }

        else if (string(argc[i]) == "-r" ||
                 string(argc[i]) == "--rename"){
            
            renameList();
            return true;
        }

        else if (string(argc[i]) == "-d" ||
                 string(argc[i]) == "--delete"){
            
            removeList();
            return true;
        }

        else if (string(argc[i]) == "-l" ||
                 string(argc[i]) == "--list"){
            
            printLists();
            return true;
        }

        else if (string(argc[i]) == "-p" ||
                 string(argc[i]) == "--print"){
            
            printTodo();
            return true;
        }

        else if(string(argc[i]) == "-nc" ||
                string(argc[i]) == "--no-color"){
            ANSI_WHITE = ANSI_BLUE = ANSI_GREEN 
            = ANSI_RED = ANSI_RESET = "";
            colors_ = false;
        }

        else if (i != 1){
            cout << ANSI_RED;
            cout << "unknown argument \"" << argc[i] << "\"\n";
            cout << ANSI_RESET;
            cout << "run ";
            cout << ANSI_BLUE;
            cout << "todo --help "; 
            cout << ANSI_RESET; 
            cout << "for more information\n";
            return true;
        } else {        
            todoName = string(argc[1]);
        }
    }
    
    return false; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
cmpl $0x2, %edi
jge 0x4479
xorl %ecx, %ecx
jmp 0x4bab
movq %rsi, %r14
movl %edi, %eax
movl $0x1, %ecx
movq %rax, 0x40(%rsp)
subq %rax, %rcx
movq %rcx, 0x38(%rsp)
movb $0x1, %cl
movl $0x2, %ebp
leaq 0x10(%rsp), %r15
movl %ecx, 0xc(%rsp)
movq -0x8(%r14,%rbp,8), %rsi
movq %r15, %rdi
leaq 0xb(%rsp), %rdx
callq 0x5bda
movq %r15, %rdi
leaq 0x7b7a(%rip), %rsi      # 0xc036
callq 0x30f0
movl %eax, %r13d
movb $0x1, %r12b
testl %eax, %eax
je 0x4528
movq -0x8(%r14,%rbp,8), %rsi
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
leaq 0x37(%rsp), %rdx
callq 0x5bda
movq %rbx, %rdi
leaq 0x7b4e(%rip), %rsi      # 0xc03a
callq 0x30f0
testl %eax, %eax
je 0x4528
movq -0x8(%r14,%rbp,8), %rsi
leaq 0x128(%rsp), %rbx
movq %rbx, %rdi
leaq 0x36(%rsp), %rdx
callq 0x5bda
movq %rbx, %rdi
leaq 0x7b20(%rip), %rsi      # 0xc039
callq 0x30f0
testl %eax, %eax
sete %r12b
movb $0x1, %al
jmp 0x452a
xorl %eax, %eax
testb %al, %al
je 0x4553
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x4553
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x32b0
testl %r13d, %r13d
je 0x4574
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x4574
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4590
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
testb %r12b, %r12b
jne 0x4a63
movq -0x8(%r14,%rbp,8), %rsi
movq %r15, %rdi
leaq 0xb(%rsp), %rdx
callq 0x5bda
movq %r15, %rdi
leaq 0x7a8c(%rip), %rsi      # 0xc041
callq 0x30f0
movl %eax, %r13d
testl %eax, %eax
leaq 0x108(%rsp), %r12
je 0x45f2
movq -0x8(%r14,%rbp,8), %rsi
movq %r12, %rdi
leaq 0x35(%rsp), %rdx
callq 0x5bda
movq %r12, %rdi
leaq 0x7a5b(%rip), %rsi      # 0xc040
callq 0x30f0
testl %eax, %eax
sete %r12b
jmp 0x45f5
movb $0x1, %r12b
testl %r13d, %r13d
je 0x461f
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x461f
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x463b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
testb %r12b, %r12b
jne 0x4a6d
movq -0x8(%r14,%rbp,8), %rsi
movq %r15, %rdi
leaq 0xb(%rsp), %rdx
callq 0x5bda
movq %r15, %rdi
leaq 0x79ea(%rip), %rsi      # 0xc04a
callq 0x30f0
movl %eax, %r13d
testl %eax, %eax
leaq 0xe8(%rsp), %r12
je 0x469d
movq -0x8(%r14,%rbp,8), %rsi
movq %r12, %rdi
leaq 0x34(%rsp), %rdx
callq 0x5bda
movq %r12, %rdi
leaq 0x79bd(%rip), %rsi      # 0xc04d
callq 0x30f0
testl %eax, %eax
sete %r12b
jmp 0x46a0
movb $0x1, %r12b
testl %r13d, %r13d
je 0x46ca
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x46ca
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x46e6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
testb %r12b, %r12b
jne 0x4a77
movq -0x8(%r14,%rbp,8), %rsi
movq %r15, %rdi
leaq 0xb(%rsp), %rdx
callq 0x5bda
movq %r15, %rdi
leaq 0x794b(%rip), %rsi      # 0xc056
callq 0x30f0
movl %eax, %r13d
testl %eax, %eax
leaq 0xc8(%rsp), %r12
je 0x4748
movq -0x8(%r14,%rbp,8), %rsi
movq %r12, %rdi
leaq 0x33(%rsp), %rdx
callq 0x5bda
movq %r12, %rdi
leaq 0x791e(%rip), %rsi      # 0xc059
callq 0x30f0
testl %eax, %eax
sete %r12b
jmp 0x474b
movb $0x1, %r12b
testl %r13d, %r13d
je 0x4775
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x4775
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4791
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
testb %r12b, %r12b
jne 0x4a81
movq -0x8(%r14,%rbp,8), %rsi
movq %r15, %rdi
leaq 0xb(%rsp), %rdx
callq 0x5bda
movq %r15, %rdi
leaq 0x78ac(%rip), %rsi      # 0xc062
callq 0x30f0
movl %eax, %r13d
testl %eax, %eax
leaq 0xa8(%rsp), %r12
je 0x47f3
movq -0x8(%r14,%rbp,8), %rsi
movq %r12, %rdi
leaq 0x32(%rsp), %rdx
callq 0x5bda
movq %r12, %rdi
leaq 0x787f(%rip), %rsi      # 0xc065
callq 0x30f0
testl %eax, %eax
sete %r12b
jmp 0x47f6
movb $0x1, %r12b
testl %r13d, %r13d
je 0x4820
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x4820
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x483c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
testb %r12b, %r12b
jne 0x4a8b
movq -0x8(%r14,%rbp,8), %rsi
movq %r15, %rdi
leaq 0xb(%rsp), %rdx
callq 0x5bda
movq %r15, %rdi
leaq 0x780b(%rip), %rsi      # 0xc06c
callq 0x30f0
movl %eax, %r13d
testl %eax, %eax
leaq 0x88(%rsp), %r12
je 0x489e
movq -0x8(%r14,%rbp,8), %rsi
movq %r12, %rdi
leaq 0x31(%rsp), %rdx
callq 0x5bda
movq %r12, %rdi
leaq 0x77de(%rip), %rsi      # 0xc06f
callq 0x30f0
testl %eax, %eax
sete %r12b
jmp 0x48a1
movb $0x1, %r12b
testl %r13d, %r13d
je 0x48cb
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x48cb
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x48e7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
testb %r12b, %r12b
jne 0x4a95
movq -0x8(%r14,%rbp,8), %rsi
movq %r15, %rdi
leaq 0xb(%rsp), %rdx
callq 0x5bda
movq %r15, %rdi
leaq 0x776b(%rip), %rsi      # 0xc077
callq 0x30f0
movl %eax, %r13d
testl %eax, %eax
leaq 0x68(%rsp), %r12
je 0x4946
movq -0x8(%r14,%rbp,8), %rsi
movq %r12, %rdi
leaq 0x30(%rsp), %rdx
callq 0x5bda
movq %r12, %rdi
leaq 0x7742(%rip), %rsi      # 0xc07b
callq 0x30f0
testl %eax, %eax
sete %r12b
jmp 0x4949
movb $0x1, %r12b
testl %r13d, %r13d
je 0x496a
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x496a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4986
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
testb %r12b, %r12b
je 0x49f8
movq 0xba66(%rip), %rdx      # 0x103f8
leaq 0xba57(%rip), %rdi      # 0x103f0
xorl %esi, %esi
leaq 0x7aee(%rip), %rcx      # 0xc490
xorl %r8d, %r8d
callq 0x3440
leaq 0xba5f(%rip), %rbx      # 0x10410
movq %rbx, %rdi
movq %rax, %rsi
callq 0x31b0
leaq 0xba6d(%rip), %r12      # 0x10430
movq %r12, %rdi
movq %rbx, %rsi
callq 0x31b0
leaq 0xba7b(%rip), %rbx      # 0x10450
movq %rbx, %rdi
movq %r12, %rsi
callq 0x31b0
leaq 0xba89(%rip), %rdi      # 0x10470
movq %rbx, %rsi
callq 0x31b0
movb $0x0, 0xb8da(%rip)      # 0x102d0
jmp 0x4a3e
cmpq $0x2, %rbp
jne 0x4a9f
movq 0x8(%r14), %rsi
movq %r15, %rdi
leaq 0xb(%rsp), %rdx
callq 0x5bda
leaq 0xb9b6(%rip), %rdi      # 0x103d0
movq %r15, %rsi
callq 0x3360
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4a3e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
cmpq 0x40(%rsp), %rbp
setb %cl
movq 0x38(%rsp), %rax
addq %rbp, %rax
incq %rax
incq %rbp
cmpq $0x2, %rax
jne 0x449c
jmp 0x4bab
callq 0x4c27
jmp 0x4ba7
callq 0x4ebc
jmp 0x4ba7
callq 0x4f91
jmp 0x4ba7
callq 0x52b8
jmp 0x4ba7
callq 0x54da
jmp 0x4ba7
callq 0x5713
jmp 0x4ba7
movq 0xb96a(%rip), %rsi      # 0x10410
movq 0xb96b(%rip), %rdx      # 0x10418
movq 0xb51c(%rip), %r15      # 0xffd0
movq %r15, %rdi
callq 0x3310
leaq 0x75c3(%rip), %rsi      # 0xc086
movl $0x12, %edx
movq %r15, %rdi
callq 0x3310
movq -0x8(%r14,%rbp,8), %r14
testq %r14, %r14
je 0x4af6
movq %r14, %rdi
callq 0x3170
movq 0xb4e7(%rip), %rdi      # 0xffd0
movq %r14, %rsi
movq %rax, %rdx
callq 0x3310
jmp 0x4b0e
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x34d0
movq 0xb4bb(%rip), %r14      # 0xffd0
leaq 0x757d(%rip), %rsi      # 0xc099
movl $0x2, %edx
movq %r14, %rdi
callq 0x3310
movq 0xb8c0(%rip), %rsi      # 0x103f0
movq 0xb8c1(%rip), %rdx      # 0x103f8
movq %r14, %rdi
callq 0x3310
leaq 0x7556(%rip), %rsi      # 0xc09c
movl $0x4, %edx
movq %r14, %rdi
callq 0x3310
movq 0xb8f6(%rip), %rsi      # 0x10450
movq 0xb8f7(%rip), %rdx      # 0x10458
movq %r14, %rdi
callq 0x3310
leaq 0x7531(%rip), %rsi      # 0xc0a1
movl $0xc, %edx
movq %r14, %rdi
callq 0x3310
movq 0xb86c(%rip), %rsi      # 0x103f0
movq 0xb86d(%rip), %rdx      # 0x103f8
movq %r14, %rdi
callq 0x3310
leaq 0x7514(%rip), %rsi      # 0xc0ae
movl $0x15, %edx
movq %r14, %rdi
callq 0x3310
movl 0xc(%rsp), %ecx
andb $0x1, %cl
movl %ecx, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x4bf2
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x4bf2
jmp 0x4bef
jmp 0x4bef
jmp 0x4bef
jmp 0x4bef
jmp 0x4bef
jmp 0x4bef
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4c1f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x4c1f
jmp 0x4c1c
jmp 0x4c1c
jmp 0x4c1c
jmp 0x4c1c
jmp 0x4c1c
jmp 0x4c1c
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3500