// File: /workspace/github_cpp_makefile_star2_O2/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 $0x78, %rsp
cmpl $0x2, %edi
jge 0x40f6
xorl %eax, %eax
jmp 0x452a
movq %rsi, %rbx
movl %edi, %eax
decq %rax
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
leaq 0x38(%rsp), %r13
leaq 0x58(%rsp), %rbp
movq %rax, 0x30(%rsp)
cmpq %r15, %rax
je 0x40ef
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
leaq 0xd(%rsp), %rdx
callq 0x50f0
movq %r14, %rdi
leaq 0x5f07(%rip), %rsi      # 0xa03d
callq 0x512b
testb %al, %al
jne 0x44c4
movq 0x8(%rbx,%r15,8), %rsi
movq %r13, %rdi
leaq 0xf(%rsp), %rdx
callq 0x50f0
movq %r13, %rdi
leaq 0x5ee2(%rip), %rsi      # 0xa041
callq 0x512b
testb %al, %al
jne 0x44ba
movq 0x8(%rbx,%r15,8), %rsi
movq %rbp, %rdi
leaq 0xe(%rsp), %rdx
callq 0x50f0
movq %rbp, %rdi
leaq 0x5eb8(%rip), %rsi      # 0xa040
callq 0x512b
movl %eax, %r12d
movq %rbp, %rdi
callq 0x35a8
movq %r13, %rdi
callq 0x35a8
movq %r14, %rdi
callq 0x35a8
testb %r12b, %r12b
jne 0x44ce
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x50f0
movq %r14, %rdi
leaq 0x5e7d(%rip), %rsi      # 0xa048
callq 0x512b
testb %al, %al
jne 0x44d5
movq 0x8(%rbx,%r15,8), %rsi
movq %r13, %rdi
leaq 0xd(%rsp), %rdx
callq 0x50f0
movq %r13, %rdi
leaq 0x5e53(%rip), %rsi      # 0xa047
callq 0x512b
movl %eax, %r12d
movq %r13, %rdi
callq 0x35a8
movq %r14, %rdi
callq 0x35a8
testb %r12b, %r12b
jne 0x44df
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x50f0
movq %r14, %rdi
leaq 0x5e22(%rip), %rsi      # 0xa051
callq 0x512b
testb %al, %al
jne 0x44e6
movq 0x8(%rbx,%r15,8), %rsi
movq %r13, %rdi
leaq 0xd(%rsp), %rdx
callq 0x50f0
movq %r13, %rdi
leaq 0x5dfc(%rip), %rsi      # 0xa054
callq 0x512b
movl %eax, %r12d
movq %r13, %rdi
callq 0x35a8
movq %r14, %rdi
callq 0x35a8
testb %r12b, %r12b
jne 0x44f0
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x50f0
movq %r14, %rdi
leaq 0x5dca(%rip), %rsi      # 0xa05d
callq 0x512b
testb %al, %al
jne 0x44f7
movq 0x8(%rbx,%r15,8), %rsi
movq %r13, %rdi
leaq 0xd(%rsp), %rdx
callq 0x50f0
movq %r13, %rdi
leaq 0x5da4(%rip), %rsi      # 0xa060
callq 0x512b
movl %eax, %r12d
movq %r13, %rdi
callq 0x35a8
movq %r14, %rdi
callq 0x35a8
testb %r12b, %r12b
jne 0x4501
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x50f0
movq %r14, %rdi
leaq 0x5d72(%rip), %rsi      # 0xa069
callq 0x512b
testb %al, %al
jne 0x4508
movq 0x8(%rbx,%r15,8), %rsi
movq %r13, %rdi
leaq 0xd(%rsp), %rdx
callq 0x50f0
movq %r13, %rdi
leaq 0x5d4c(%rip), %rsi      # 0xa06c
callq 0x512b
movl %eax, %r12d
movq %r13, %rdi
callq 0x35a8
movq %r14, %rdi
callq 0x35a8
testb %r12b, %r12b
jne 0x4512
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x50f0
movq %r14, %rdi
leaq 0x5d18(%rip), %rsi      # 0xa073
callq 0x512b
testb %al, %al
jne 0x4519
movq 0x8(%rbx,%r15,8), %rsi
movq %r13, %rdi
leaq 0xd(%rsp), %rdx
callq 0x50f0
movq %r13, %rdi
leaq 0x5cf2(%rip), %rsi      # 0xa076
callq 0x512b
movl %eax, %r12d
movq %r13, %rdi
callq 0x35a8
movq %r14, %rdi
callq 0x35a8
testb %r12b, %r12b
jne 0x4523
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x50f0
movq %r14, %rdi
leaq 0x5cbf(%rip), %rsi      # 0xa07e
callq 0x512b
movq %rbp, %r13
testb %al, %al
je 0x43d5
movq %r14, %rdi
callq 0x35a8
jmp 0x4413
movq 0x8(%rbx,%r15,8), %rsi
leaq 0x38(%rsp), %rbp
movq %rbp, %rdi
leaq 0xd(%rsp), %rdx
callq 0x50f0
movq %rbp, %rdi
leaq 0x5c8c(%rip), %rsi      # 0xa082
callq 0x512b
movl %eax, %r12d
movq %rbp, %rdi
callq 0x35a8
movq %r14, %rdi
callq 0x35a8
testb %r12b, %r12b
je 0x4474
leaq 0xafe6(%rip), %rdi      # 0xf400
leaq 0x6075(%rip), %rsi      # 0xa496
callq 0x3560
leaq 0xaff3(%rip), %r12      # 0xf420
movq %r12, %rdi
movq %rax, %rsi
callq 0x31b0
leaq 0xb001(%rip), %rbp      # 0xf440
movq %rbp, %rdi
movq %r12, %rsi
callq 0x31b0
leaq 0xb00f(%rip), %r12      # 0xf460
movq %r12, %rdi
movq %rbp, %rsi
callq 0x31b0
leaq 0xb01d(%rip), %rdi      # 0xf480
movq %r12, %rsi
callq 0x31b0
movb $0x0, 0xae6e(%rip)      # 0xf2e0
jmp 0x44a5
testq %r15, %r15
jne 0x4539
movq 0x8(%rbx), %rsi
movq %r14, %rdi
leaq 0x38(%rsp), %rdx
callq 0x50f0
leaq 0xaf4b(%rip), %rdi      # 0xf3e0
movq %r14, %rsi
callq 0x3360
movq %r14, %rdi
callq 0x35a8
incq %r15
movq 0x30(%rsp), %rax
movq %r13, %rbp
leaq 0x38(%rsp), %r13
jmp 0x4115
leaq 0x38(%rsp), %rdi
callq 0x35a8
leaq 0x10(%rsp), %rdi
callq 0x35a8
callq 0x4619
jmp 0x4528
leaq 0x10(%rsp), %rdi
callq 0x35a8
callq 0x47ec
jmp 0x4528
leaq 0x10(%rsp), %rdi
callq 0x35a8
callq 0x488a
jmp 0x4528
leaq 0x10(%rsp), %rdi
callq 0x35a8
callq 0x4aa1
jmp 0x4528
leaq 0x10(%rsp), %rdi
callq 0x35a8
callq 0x4c1b
jmp 0x4528
leaq 0x10(%rsp), %rdi
callq 0x35a8
callq 0x4da0
movb $0x1, %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xaa90(%rip), %r14      # 0xefd0
leaq 0xaed9(%rip), %rsi      # 0xf420
movq %r14, %rdi
callq 0x3270
leaq 0x5b37(%rip), %rsi      # 0xa08d
movq %r14, %rdi
callq 0x3290
movq 0x8(%rbx,%r15,8), %rsi
movq %rax, %rdi
callq 0x3290
leaq 0x5b2e(%rip), %rsi      # 0xa0a0
movq %rax, %rdi
callq 0x3290
leaq 0xae7f(%rip), %rbx      # 0xf400
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3270
leaq 0x5b10(%rip), %rsi      # 0xa0a3
movq %r14, %rdi
callq 0x3290
leaq 0xaebe(%rip), %rsi      # 0xf460
movq %r14, %rdi
callq 0x3270
leaq 0x5af7(%rip), %rsi      # 0xa0a8
movq %r14, %rdi
callq 0x3290
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3270
leaq 0x5aea(%rip), %rsi      # 0xa0b5
movq %r14, %rdi
callq 0x3290
jmp 0x4528
jmp 0x45ff
jmp 0x460e
jmp 0x45ff
jmp 0x460e
jmp 0x45ff
jmp 0x460e
jmp 0x45ff
jmp 0x460e
jmp 0x45ff
jmp 0x460e
jmp 0x45ff
jmp 0x460e
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x35a8
jmp 0x4602
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x35a8
jmp 0x4611
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3510