// File: /workspace/github_cpp_makefile_star2_O1/phillip-h[P]todo/src/draw.cpp
// Function: buildTitle[abi:cxx11](TodoList*)
std::string buildTitle(TodoList *list)
{
    std::string title = "[todo version "+vn+"]";

    unsigned cent = (COLS - list->name.size() - 2) / 2;

    for (unsigned i = title.size(); i < cent; i++){
        title += division;
    }

    title += "[";
    title += list->name;
    title += "]";

    std::string stats = "[" + list->completedStr() + "]";

    for (unsigned i = title.size() + stats.size(); i < (unsigned)COLS; i++){
        title += division;
    }

    title += stats;
    return title;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x412d(%rip), %rsi      # 0xc531
leaq 0x8175(%rip), %rdx      # 0x10580
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x6aa0
leaq 0x3beb(%rip), %rsi      # 0xc00a
movq %r15, %rdi
callq 0x3560
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8449
movq %rdx, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x8450
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x8483
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x7b16(%rip), %r13      # 0xffa0
movslq (%r13), %rax
subq 0x10(%r14), %rax
movabsq $0x1fffffffe, %rbp      # imm = 0x1FFFFFFFE
addq %rax, %rbp
shrq %rbp
subl 0x8(%rbx), %ebp
jbe 0x84c1
movq 0x8152(%rip), %rsi      # 0x10600
movq 0x8153(%rip), %rdx      # 0x10608
movq %rbx, %rdi
callq 0x3100
decl %ebp
jne 0x84a7
leaq 0x3fb4(%rip), %rsi      # 0xc47c
movq %rbx, %rdi
callq 0x3560
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x3100
leaq 0x3b23(%rip), %rsi      # 0xc00a
movq %rbx, %rdi
callq 0x3560
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x99de
leaq 0x3f79(%rip), %rcx      # 0xc47c
leaq 0x48(%rsp), %rdi
movl $0x1, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x32f0
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x853e
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x8545
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3aa2(%rip), %rsi      # 0xc00a
callq 0x3560
movq %r12, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8590
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x8598
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x85c7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32b0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x85e2
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x32b0
movl 0x10(%rsp), %ebp
addl 0x8(%rbx), %ebp
cmpl %ebp, (%r13)
jbe 0x860d
movq 0x800a(%rip), %rsi      # 0x10600
movq 0x800b(%rip), %rdx      # 0x10608
movq %rbx, %rdi
callq 0x3100
incl %ebp
cmpl (%r13), %ebp
jb 0x85ef
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x3100
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8636
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32b0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x869a
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8669
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x8669
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x86b9
movq 0x58(%rsp), %rsi
jmp 0x86ac
jmp 0x86b6
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x86cc
movq 0x18(%rsp), %rsi
jmp 0x86c4
jmp 0x86b6
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x86b9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x86b9
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x86cc
movq (%r15), %rsi
incq %rsi
callq 0x32b0
movq %r14, %rdi
callq 0x3500