// File: /workspace/github_cpp_makefile_star2_O3/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 $0x88, %rsp
cmpl $0x2, %edi
jge 0x4479
xorl %eax, %eax
jmp 0x4aef
movq %rsi, %rbx
movl %edi, %eax
decq %rax
movq %rax, 0x60(%rsp)
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
leaq 0x68(%rsp), %r13
leaq 0x38(%rsp), %rbp
movq %rsi, 0x58(%rsp)
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
leaq 0xf(%rsp), %rdx
callq 0x5b0e
movq %r14, %rdi
leaq 0x7b7d(%rip), %rsi      # 0xc036
callq 0x30f0
testl %eax, %eax
je 0x452c
movq 0x8(%rbx,%r15,8), %rsi
movq %rbp, %rdi
leaq 0x37(%rsp), %rdx
callq 0x5b0e
movq %rbp, %rdi
leaq 0x7b5c(%rip), %rsi      # 0xc03a
callq 0x30f0
testl %eax, %eax
je 0x4531
movq 0x8(%rbx,%r15,8), %rsi
movq %r13, %rdi
leaq 0x36(%rsp), %rdx
callq 0x5b0e
movq %r13, %rdi
leaq 0x7b36(%rip), %rsi      # 0xc039
callq 0x30f0
testl %eax, %eax
sete %r12b
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x4534
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x4534
movb $0x1, %r12b
jmp 0x4550
movb $0x1, %r12b
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4550
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x456c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
testb %r12b, %r12b
jne 0x49a4
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x5b0e
movq %r14, %rdi
leaq 0x7ab2(%rip), %rsi      # 0xc041
callq 0x30f0
testl %eax, %eax
je 0x45dd
movq 0x8(%rbx,%r15,8), %rsi
movq %rbp, %rdi
leaq 0xf(%rsp), %rdx
callq 0x5b0e
movq %rbp, %rdi
leaq 0x7a8c(%rip), %rsi      # 0xc040
callq 0x30f0
testl %eax, %eax
sete %r12b
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x45e0
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x45e0
movb $0x1, %r12b
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x45fc
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
testb %r12b, %r12b
jne 0x49ae
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x5b0e
movq %r14, %rdi
leaq 0x7a2b(%rip), %rsi      # 0xc04a
callq 0x30f0
testl %eax, %eax
je 0x466d
movq 0x8(%rbx,%r15,8), %rsi
movq %rbp, %rdi
leaq 0xf(%rsp), %rdx
callq 0x5b0e
movq %rbp, %rdi
leaq 0x7a09(%rip), %rsi      # 0xc04d
callq 0x30f0
testl %eax, %eax
sete %r12b
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4670
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x4670
movb $0x1, %r12b
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x468c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
testb %r12b, %r12b
jne 0x49b8
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x5b0e
movq %r14, %rdi
leaq 0x79a7(%rip), %rsi      # 0xc056
callq 0x30f0
testl %eax, %eax
je 0x46fd
movq 0x8(%rbx,%r15,8), %rsi
movq %rbp, %rdi
leaq 0xf(%rsp), %rdx
callq 0x5b0e
movq %rbp, %rdi
leaq 0x7985(%rip), %rsi      # 0xc059
callq 0x30f0
testl %eax, %eax
sete %r12b
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4700
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x4700
movb $0x1, %r12b
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x471c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
testb %r12b, %r12b
jne 0x49c2
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x5b0e
movq %r14, %rdi
leaq 0x7923(%rip), %rsi      # 0xc062
callq 0x30f0
testl %eax, %eax
je 0x478d
movq 0x8(%rbx,%r15,8), %rsi
movq %rbp, %rdi
leaq 0xf(%rsp), %rdx
callq 0x5b0e
movq %rbp, %rdi
leaq 0x7901(%rip), %rsi      # 0xc065
callq 0x30f0
testl %eax, %eax
sete %r12b
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4790
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x4790
movb $0x1, %r12b
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x47ac
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
testb %r12b, %r12b
jne 0x49cc
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x5b0e
movq %r14, %rdi
leaq 0x789d(%rip), %rsi      # 0xc06c
callq 0x30f0
testl %eax, %eax
je 0x481d
movq 0x8(%rbx,%r15,8), %rsi
movq %rbp, %rdi
leaq 0xf(%rsp), %rdx
callq 0x5b0e
movq %rbp, %rdi
leaq 0x787b(%rip), %rsi      # 0xc06f
callq 0x30f0
testl %eax, %eax
sete %r12b
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4820
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x4820
movb $0x1, %r12b
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 0x49d6
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x5b0e
movq %r14, %rdi
leaq 0x7818(%rip), %rsi      # 0xc077
callq 0x30f0
testl %eax, %eax
je 0x48ad
movq 0x8(%rbx,%r15,8), %rsi
movq %rbp, %rdi
leaq 0xf(%rsp), %rdx
callq 0x5b0e
movq %rbp, %rdi
leaq 0x77f7(%rip), %rsi      # 0xc07b
callq 0x30f0
testl %eax, %eax
sete %r12b
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x48b0
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x48b0
movb $0x1, %r12b
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x48cc
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
movq %r13, %rbx
testb %r12b, %r12b
je 0x4941
movq 0xbb1d(%rip), %rdx      # 0x103f8
leaq 0xbb0e(%rip), %rdi      # 0x103f0
xorl %esi, %esi
leaq 0x7ba5(%rip), %rcx      # 0xc490
xorl %r8d, %r8d
callq 0x3440
leaq 0xbb16(%rip), %r12      # 0x10410
movq %r12, %rdi
movq %rax, %rsi
callq 0x31b0
leaq 0xbb24(%rip), %r13      # 0x10430
movq %r13, %rdi
movq %r12, %rsi
callq 0x31b0
leaq 0xbb32(%rip), %r12      # 0x10450
movq %r12, %rdi
movq %r13, %rsi
callq 0x31b0
leaq 0xbb40(%rip), %rdi      # 0x10470
movq %r12, %rsi
callq 0x31b0
movb $0x0, 0xb991(%rip)      # 0x102d0
jmp 0x4989
testq %r15, %r15
jne 0x49e0
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x5b0e
leaq 0xba6b(%rip), %rdi      # 0x103d0
movq %r14, %rsi
callq 0x3360
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4989
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
movq %rbx, %r13
incq %r15
cmpq %r15, 0x60(%rsp)
movq 0x58(%rsp), %rbx
jne 0x449d
jmp 0x4472
callq 0x4b66
jmp 0x4aed
callq 0x4dfb
jmp 0x4aed
callq 0x4ed0
jmp 0x4aed
callq 0x51f7
jmp 0x4aed
callq 0x5419
jmp 0x4aed
callq 0x5641
jmp 0x4aed
movq 0xba29(%rip), %rsi      # 0x10410
movq 0xba2a(%rip), %rdx      # 0x10418
movq 0xb5db(%rip), %r14      # 0xffd0
movq %r14, %rdi
callq 0x3310
leaq 0x7682(%rip), %rsi      # 0xc086
movl $0x12, %edx
movq %r14, %rdi
callq 0x3310
movq 0x58(%rsp), %rax
movq 0x8(%rax,%r15,8), %rbx
testq %rbx, %rbx
je 0x4a3c
movq %rbx, %rdi
callq 0x3170
movq 0xb5a1(%rip), %rdi      # 0xffd0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3310
jmp 0x4a54
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x34d0
movq 0xb575(%rip), %rbx      # 0xffd0
leaq 0x7637(%rip), %rsi      # 0xc099
movl $0x2, %edx
movq %rbx, %rdi
callq 0x3310
movq 0xb97a(%rip), %rsi      # 0x103f0
movq 0xb97b(%rip), %rdx      # 0x103f8
movq %rbx, %rdi
callq 0x3310
leaq 0x7610(%rip), %rsi      # 0xc09c
movl $0x4, %edx
movq %rbx, %rdi
callq 0x3310
movq 0xb9b0(%rip), %rsi      # 0x10450
movq 0xb9b1(%rip), %rdx      # 0x10458
movq %rbx, %rdi
callq 0x3310
leaq 0x75eb(%rip), %rsi      # 0xc0a1
movl $0xc, %edx
movq %rbx, %rdi
callq 0x3310
movq 0xb926(%rip), %rsi      # 0x103f0
movq 0xb927(%rip), %rdx      # 0x103f8
movq %rbx, %rdi
callq 0x3310
leaq 0x75ce(%rip), %rsi      # 0xc0ae
movl $0x15, %edx
movq %rbx, %rdi
callq 0x3310
movb $0x1, %al
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x4b31
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x4b31
jmp 0x4b2e
jmp 0x4b2e
jmp 0x4b2e
jmp 0x4b2e
jmp 0x4b2e
jmp 0x4b2e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4b5e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x4b5e
jmp 0x4b5b
jmp 0x4b5b
jmp 0x4b5b
jmp 0x4b5b
jmp 0x4b5b
jmp 0x4b5b
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3500