// File: phillip-h[P]todo/src/args.cpp
// Function: printLists()
void printLists()
{
    auto list = listFiles(TodoList::getSaveDir());

    cout << ANSI_BLUE << "to-do lists:\n" << ANSI_RESET;
    cout << "\n";

    unsigned count = 0;
    const unsigned width = getTermWidth();
    
    for (unsigned i = 0; i < list.size(); i++){
        if (count + list.at(i).length() + 10 >= width){
            count = 0;
            cout << "\n";
        }
        cout << ANSI_GREEN << list.at(i) << "  ";
        count += list.at(i).length() + 2;
    }

    cout << ANSI_RESET << "\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
leaq -0x38(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0xd6c0
movq -0x58(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x8310
jmp 0x7e17
leaq -0x38(%rbp), %rdi
callq 0x4738
movq 0x101a1(%rip), %rdi     # 0x17fc8
leaq 0x106fa(%rip), %rsi     # 0x18528
callq 0x4300
movq %rax, -0x60(%rbp)
jmp 0x7e39
movq -0x60(%rbp), %rdi
leaq 0xa2a7(%rip), %rsi      # 0x120eb
callq 0x4340
movq %rax, -0x68(%rbp)
jmp 0x7e4f
movq -0x68(%rbp), %rdi
leaq 0x1066e(%rip), %rsi     # 0x184c8
callq 0x4300
jmp 0x7e61
movq 0x10160(%rip), %rdi     # 0x17fc8
leaq 0xa27a(%rip), %rsi      # 0x120e9
callq 0x4340
jmp 0x7e76
movl $0x0, -0x48(%rbp)
callq 0x82e0
movl %eax, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq %rax, -0x70(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x8790
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
jae 0x7fdd
movl -0x48(%rbp), %eax
movq %rax, -0x80(%rbp)
movl -0x50(%rbp), %eax
movl %eax, %esi
leaq -0x18(%rbp), %rdi
callq 0x87b0
movq %rax, -0x78(%rbp)
jmp 0x7ec7
movq -0x78(%rbp), %rdi
callq 0x4560
movq %rax, %rcx
movq -0x80(%rbp), %rax
addq %rcx, %rax
addq $0xa, %rax
movl -0x4c(%rbp), %ecx
cmpq %rcx, %rax
jb 0x7f38
movl $0x0, -0x48(%rbp)
movq 0x100d4(%rip), %rdi     # 0x17fc8
leaq 0xa1ee(%rip), %rsi      # 0x120e9
callq 0x4340
jmp 0x7f02
jmp 0x7f38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4738
jmp 0x8020
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x8730
jmp 0x8020
movq 0x10089(%rip), %rdi     # 0x17fc8
leaq 0x105c2(%rip), %rsi     # 0x18508
callq 0x4300
movq %rax, -0x88(%rbp)
jmp 0x7f54
movl -0x50(%rbp), %eax
movl %eax, %esi
leaq -0x18(%rbp), %rdi
callq 0x87b0
movq %rax, -0x90(%rbp)
jmp 0x7f6b
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
callq 0x4300
movq %rax, -0x98(%rbp)
jmp 0x7f87
movq -0x98(%rbp), %rdi
leaq 0xa4fd(%rip), %rsi      # 0x12492
callq 0x4340
jmp 0x7f9c
movl -0x50(%rbp), %eax
movl %eax, %esi
leaq -0x18(%rbp), %rdi
callq 0x87b0
movq %rax, -0xa0(%rbp)
jmp 0x7fb3
movq -0xa0(%rbp), %rdi
callq 0x4560
movq %rax, %rcx
addq $0x2, %rcx
movl -0x48(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x48(%rbp)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x7e8c
movq 0xffe4(%rip), %rdi      # 0x17fc8
leaq 0x104dd(%rip), %rsi     # 0x184c8
callq 0x4300
movq %rax, -0xa8(%rbp)
jmp 0x7ff9
movq -0xa8(%rbp), %rdi
leaq 0xa0e2(%rip), %rsi      # 0x120e9
callq 0x4340
jmp 0x800e
leaq -0x18(%rbp), %rdi
callq 0x8730
addq $0xb0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x4680
nopl (%rax)