// File: phillip-h[P]todo/src/args.cpp
// Function: printTodo()
void printTodo()
{
    TodoList* list = Core::list(name());
    if (!list->exists()){
        cout << ANSI_RED << "To-do list '" << list->name;
        cout << "' does not exist!\n" << ANSI_RESET;
        return;
    }

    auto tasks = list->tasks();

    cout << ANSI_BLUE << "to-do -- " << list->name;
    cout << ANSI_RESET << "\n";
    for (unsigned i = 0; i < tasks->size(); i++){
        string taskStr = tasks->at(i).save();
        taskStr = taskStr.substr(0, taskStr.size() - 2);
        cout << i << ". " << taskStr<< "\n";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
leaq -0x28(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x82a0
movq -0x98(%rbp), %rdi
callq 0x9820
movq %rax, -0x90(%rbp)
jmp 0x8060
leaq -0x28(%rbp), %rdi
callq 0x4738
movq -0x90(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xdd20
testb $0x1, %al
jne 0x80f4
movq 0xff40(%rip), %rdi      # 0x17fc8
leaq 0x10459(%rip), %rsi     # 0x184e8
callq 0x4300
movq %rax, %rdi
leaq 0xa05b(%rip), %rsi      # 0x120f9
callq 0x4340
movq %rax, %rdi
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
callq 0x4300
movq 0xff0e(%rip), %rdi      # 0x17fc8
leaq 0xa045(%rip), %rsi      # 0x12106
callq 0x4340
movq %rax, %rdi
leaq 0x103f8(%rip), %rsi     # 0x184c8
callq 0x4300
jmp 0x8282
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4738
jmp 0x828b
movq -0x8(%rbp), %rdi
callq 0xde10
movq %rax, -0x40(%rbp)
movq 0xfec0(%rip), %rdi      # 0x17fc8
leaq 0x10419(%rip), %rsi     # 0x18528
callq 0x4300
movq %rax, %rdi
leaq 0x9ffb(%rip), %rsi      # 0x12119
callq 0x4340
movq %rax, %rdi
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
callq 0x4300
movq 0xfe8e(%rip), %rdi      # 0x17fc8
leaq 0x10387(%rip), %rsi     # 0x184c8
callq 0x4300
movq %rax, %rdi
leaq 0x9f99(%rip), %rsi      # 0x120e9
callq 0x4340
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq %rax, -0xa0(%rbp)
movq -0x40(%rbp), %rdi
callq 0x87f0
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jae 0x8282
movq -0x40(%rbp), %rdi
movl -0x44(%rbp), %eax
movl %eax, %esi
callq 0x8820
movq %rax, %rsi
leaq -0x68(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0xcc40
movq -0xa8(%rbp), %rdi
callq 0x4270
movq -0xa8(%rbp), %rsi
movq %rax, %rcx
addq $-0x2, %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x88(%rbp), %rdi
callq 0x4370
jmp 0x81cf
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq %rsi, -0xb8(%rbp)
callq 0x4470
movq -0xb8(%rbp), %rdi
callq 0x4738
movl -0x44(%rbp), %esi
movq 0xfdcc(%rip), %rdi      # 0x17fc8
callq 0x44e0
movq %rax, -0xb0(%rbp)
jmp 0x820a
movq -0xb0(%rbp), %rdi
leaq 0x9f0b(%rip), %rsi      # 0x12123
callq 0x4340
movq %rax, -0xc0(%rbp)
jmp 0x8226
movq -0xc0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x4300
movq %rax, -0xc8(%rbp)
jmp 0x823f
movq -0xc8(%rbp), %rdi
leaq 0x9e9c(%rip), %rsi      # 0x120e9
callq 0x4340
jmp 0x8254
leaq -0x68(%rbp), %rdi
callq 0x4738
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x815c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x4738
jmp 0x828b
addq $0xd0, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x4680
nopw %cs:(%rax,%rax)