// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x9170
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x5a2a
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x551d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0xaf2c(%rip), %rsi      # 0x10450
movq 0xaf2d(%rip), %rdx      # 0x10458
movq 0xaa9e(%rip), %rdi      # 0xffd0
callq 0x3310
movq %rax, %rbx
leaq 0x6ba3(%rip), %rsi      # 0xc0e4
movl $0xd, %edx
movq %rax, %rdi
callq 0x3310
movq 0xae9b(%rip), %rsi      # 0x103f0
movq 0xae9c(%rip), %rdx      # 0x103f8
movq %rbx, %rdi
callq 0x3310
movq 0xaa65(%rip), %rdi      # 0xffd0
leaq 0x6b70(%rip), %rsi      # 0xc0e2
movl $0x1, %edx
callq 0x3310
xorl %r13d, %r13d
leaq 0x20(%rsp), %rdx
movl $0x5413, %esi           # imm = 0x5413
xorl %edi, %edi
xorl %eax, %eax
callq 0x33a0
movq 0x8(%rsp), %rax
cmpq %rax, 0x10(%rsp)
je 0x5680
movzwl 0x22(%rsp), %ebp
movl $0x1, %r15d
movq 0xaa1c(%rip), %rbx      # 0xffd0
xorl %r14d, %r14d
movl %r13d, %ecx
movq %r14, %r12
shlq $0x5, %r12
movq 0x8(%rax,%r12), %rax
addq %rcx, %rax
addq $0xa, %rax
cmpq %rbp, %rax
jb 0x55e9
xorl %r13d, %r13d
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x6afe(%rip), %rsi      # 0xc0e2
callq 0x3310
movq 0xae40(%rip), %rsi      # 0x10430
movq 0xae41(%rip), %rdx      # 0x10438
movq %rbx, %rdi
callq 0x3310
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdx
subq %rcx, %rdx
sarq $0x5, %rdx
cmpq %r14, %rdx
jbe 0x56c7
movq (%rcx,%r12), %rsi
movq 0x8(%rcx,%r12), %rdx
movq %rax, %rdi
callq 0x3310
movl $0x2, %edx
movq %rax, %rdi
leaq 0x6e9f(%rip), %rsi      # 0xc4d8
callq 0x3310
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %r14, %rdx
jbe 0x56c7
movl 0x8(%rax,%r12), %eax
addl %eax, %r13d
addl $0x2, %r13d
movl %r15d, %r14d
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incl %r15d
cmpq %r14, %rcx
ja 0x55b7
movq 0xad69(%rip), %rsi      # 0x103f0
movq 0xad6a(%rip), %rdx      # 0x103f8
movq 0xa93b(%rip), %rdi      # 0xffd0
callq 0x3310
leaq 0x6a41(%rip), %rsi      # 0xc0e2
movl $0x1, %edx
movq %rax, %rdi
callq 0x3310
leaq 0x8(%rsp), %rdi
callq 0x5c56
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6d1a(%rip), %rdi      # 0xc3e8
movq %r14, %rsi
xorl %eax, %eax
callq 0x3410
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x570b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x570b
jmp 0x56fe
jmp 0x56fe
jmp 0x56fe
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5c56
movq %rbx, %rdi
callq 0x3500