// File: /workspace/github_cpp_makefile_star2_O3/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 0x4252(%rip), %rsi      # 0xc531
leaq 0x829a(%rip), %rdx      # 0x10580
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x69ab
leaq 0x3d10(%rip), %rsi      # 0xc00a
movq %r15, %rdi
callq 0x3560
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
movq (%rax), %rcx
movq %rax, %rdx
addq $0x10, %rdx
cmpq %rdx, %rcx
je 0x8324
movq %rcx, (%rbx)
movq (%rdx), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x832b
movups (%rdx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq %rdx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x8362
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x8(%rbx), %rcx
movq 0x7c37(%rip), %r13      # 0xffa0
movslq (%r13), %rax
subq 0x10(%r14), %rax
movabsq $0x1fffffffe, %rbp      # imm = 0x1FFFFFFFE
addq %rax, %rbp
shrq %rbp
subl %ecx, %ebp
jbe 0x839f
movq 0x8274(%rip), %rsi      # 0x10600
movq 0x8275(%rip), %rdx      # 0x10608
movq %rbx, %rdi
callq 0x3100
decl %ebp
jne 0x8385
leaq 0x40d6(%rip), %rsi      # 0xc47c
movq %rbx, %rdi
callq 0x3560
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x3100
leaq 0x3c45(%rip), %rsi      # 0xc00a
movq %rbx, %rdi
callq 0x3560
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x989e
leaq 0x409b(%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 0x841c
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x8423
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 0x3bc4(%rip), %rsi      # 0xc00a
callq 0x3560
movq %r12, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x846e
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x8476
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 0x84a5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32b0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x84c0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x10(%rsp), %rdx
movl 0x8(%rbx), %ebp
addl %edx, %ebp
cmpl %ebp, (%r13)
jbe 0x84f3
movq 0x8129(%rip), %rsi      # 0x10600
movq 0x812a(%rip), %rdx      # 0x10608
movq %rbx, %rdi
callq 0x3100
incl %ebp
cmpl (%r13), %ebp
jb 0x84d0
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3100
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8517
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 0x857b
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x854a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x854a
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x859a
movq 0x58(%rsp), %rsi
jmp 0x858d
jmp 0x8597
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x85ad
movq 0x18(%rsp), %rsi
jmp 0x85a5
jmp 0x8597
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x859a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x859a
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x85ad
movq (%r15), %rsi
incq %rsi
callq 0x32b0
movq %r14, %rdi
callq 0x3500