// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]todo/src/todolist.cpp
// Function: TodoList::load()
void TodoList::load()
{
    if (!exists()){
        return;
    }

    std::ifstream file(getPath());
    if (!file.good()){
        std::cout << "failed to write to-do list!\n";
        return;
    }

    unsigned pos = 0;
    for (string line = ""; getline(file, line); pos++){
        add(Task(line).parse(), pos);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rdi, %rbx
callq 0x98fa
testb %al, %al
je 0x981e
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x92c6
leaq 0x90(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x34a0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x96ac
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x90(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0xb0(%rsp,%rax)
je 0x96df
movq 0x6907(%rip), %rdi      # 0xffd0
leaq 0x2f84(%rip), %rsi      # 0xc654
movl $0x1c, %edx
callq 0x3310
jmp 0x9811
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2da1(%rip), %rdx      # 0xc490
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x5d4c
xorl %r15d, %r15d
leaq 0x48(%rsp), %r12
leaq 0x20(%rsp), %r13
leaq 0x68(%rsp), %rbp
movq 0x90(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %edx
movq %r14, %rdi
movq %rsp, %rsi
callq 0x3530
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x97f6
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5cbc
movq %r13, %rdi
movq %r12, %rsi
callq 0x88dc
movq %rbp, %rdi
movq %r13, %rsi
callq 0x8afc
movq (%rbx), %rdi
movl %r15d, %eax
leaq (%rax,%rax,4), %rsi
shlq $0x3, %rsi
addq (%rdi), %rsi
movq %rbp, %rdx
callq 0xa27c
movq %rbx, %rdi
callq 0x8f8a
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x97b6
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x97d2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x97ee
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x32b0
incl %r15d
jmp 0x970c
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9811
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32b0
leaq 0x90(%rsp), %rdi
callq 0x30d0
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9832
movq %rax, %rbx
jmp 0x98e4
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98f1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x98f1
movq %rax, %rbx
jmp 0x98a8
movq %rax, %rbx
jmp 0x988c
jmp 0x98c6
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x988c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x98a8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x98c9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x98c9
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x98e4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32b0
leaq 0x90(%rsp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x3500
nop