// File: /workspace/github_cpp_makefile_star2_O3/phillip-h[P]todo/src/draw.cpp
// Function: drawTasks(TodoList*, unsigned int)
void drawTasks(TodoList* list, unsigned selected)
{
    auto tasks = list->tasks();
    
    taskWin->clear();    

    if (tasks && tasks->size()){
        xpos = 1;
        ypos = 1;

        unsigned numTasks = height - 2;
        endTask = tasks->size();
        if (endTask > numTasks)
            endTask = numTasks;

        if (numTasks < tasks->size()){
            while (selected > (int) endTask + listOff - 2 && selected != 0)
                listOff++;
            while (selected < (int) startTask + listOff && 
                   selected != list->size() - 1)
                listOff--;
        } else{
            listOff = 0;
        }

        unsigned count = startTask + listOff;

        for (unsigned i = startTask + listOff; i < endTask + listOff &&
                                               i < tasks->size() ; i++){
            Task t = tasks->at(i);
            
            if (showNumbers){
                taskWin->inverse();
                taskWin->color(GUTTER_COLOR_PAIR);
                
                std::string number = std::to_string(count);
                if (!zeroIndexNumbers)
                    number = std::to_string(count + 1);
                while (number.size() < 2)
                    number = "0"+number;
                
                taskWin->print(number + ")", xpos, ypos);
                taskWin->colorOff(GUTTER_COLOR_PAIR);
                taskWin->inverseOff();
                xpos += 5;
            }
           
            if (i == selected){
                std::string tmp = tasks->at(i).task();
                if (tasks->at(i).div()){
                    taskWin->inverse();
                    taskWin->color(SELECT_COLOR_PAIR);
                    drawDivider(tmp.substr(5, tmp.size() - 5), ypos);
                    taskWin->colorOff(SELECT_COLOR_PAIR);
                    taskWin->inverseOff();
                    ypos++;
                    if (showNumbers){
                        xpos -= 5;
                    }
                    continue;
                }

                std::string line = tmp;
                unsigned pad = showNumbers ? 8 : 5;
                if (line.size() >= width - pad) {
                    line = line.substr(0, width - pad - 3) + "...";
                }
                if (highlightWholeLine){
                    for (int k = tmp.size() + xpos; k < width - 2; k++){
                        line += " ";
                    }
                }
                
                std::string mark = line.substr(0, STRING_COMPLETE.size());
                line = line.substr(mark.size());
                
                taskWin->inverse();

                taskWin->color(!t.completed() ? MARK_COLOR_PAIR
                                              : MARK_COLOR_PAIR_DONE); 
                taskWin->print(mark, xpos, ypos);
                taskWin->colorOff(!t.completed() ? MARK_COLOR_PAIR
                                                 : MARK_COLOR_PAIR_DONE);

                taskWin->color(SELECT_COLOR_PAIR);
                taskWin->print(line, xpos + mark.size(), ypos);
                taskWin->colorOff(SELECT_COLOR_PAIR);
                
                taskWin->inverseOff();
            } else{
                std::string tmp = tasks->at(i).task();
                if (tasks->at(i).div()){
                    drawDivider(tmp.substr(5, tmp.size() - 5), ypos);
                    ypos++;
                    if (showNumbers){
                        xpos -= 5;
                    }
                    continue;
                }
                
                std::string text = tmp;
                unsigned pad = showNumbers ? 8 : 5;
                if (text.size() >= width - pad) {
                    text = text.substr(0, width - pad - 3) + "...";
                }

                std::string mark = text.substr(0, STRING_COMPLETE.size());
                text = text.substr(mark.size());

                taskWin->color(!t.completed() ? MARK_COLOR_PAIR
                                              : MARK_COLOR_PAIR_DONE); 
                taskWin->print(mark, xpos, ypos);
                taskWin->colorOff(!t.completed() ? MARK_COLOR_PAIR
                                                 : MARK_COLOR_PAIR_DONE);

                taskWin->print(text, xpos + mark.size(), ypos);
            }
            ypos++;
            if (ypos > numTasks || i >= tasks->size() - 1){
                break;
            }
            if (showNumbers){
                xpos -= 5;
                count++;
            }
        }
    }
    
    taskWin->color(BORDER_COLOR_PAIR, true);
    taskWin->draw();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %esi, 0x54(%rsp)
movq %rdi, %rbx
callq 0x9836
movq %rax, %r14
movq 0x9324(%rip), %rdi      # 0x10668
callq 0xb56e
movq %r14, 0x48(%rsp)
testq %r14, %r14
je 0x7f32
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
je 0x7f32
sarq $0x3, %rcx
movabsq $-0x3333333333333333, %rax # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rcx
movl $0x1, %eax
movl %eax, 0x930a(%rip)      # 0x10690
movl %eax, 0x9308(%rip)      # 0x10694
movl 0x92fa(%rip), %edx      # 0x1068c
addl $-0x2, %edx
cmpl %ecx, %edx
movl %ecx, %eax
cmovbl %edx, %eax
movl %eax, 0x92fa(%rip)      # 0x1069c
movq %rdx, 0x160(%rsp)
cmpq %rdx, %rcx
jbe 0x7410
movl 0x92eb(%rip), %ecx      # 0x106a0
leal (%rax,%rcx), %edx
addl $-0x2, %edx
movl 0x54(%rsp), %esi
cmpl %esi, %edx
jae 0x73d0
movl %esi, %ecx
subl %eax, %ecx
addl $0x2, %ecx
movl %ecx, 0x92d0(%rip)      # 0x106a0
movl 0x92c2(%rip), %edx      # 0x10698
addl %ecx, %edx
cmpl %esi, %edx
jbe 0x741c
movl 0x54(%rsp), %ebp
movq %rbx, %rdi
callq 0x94b2
decl %eax
movl 0x92b0(%rip), %ecx      # 0x106a0
cmpl %ebp, %eax
je 0x7408
decl %ecx
movl %ecx, 0x92a4(%rip)      # 0x106a0
movl 0x9296(%rip), %eax      # 0x10698
addl %ecx, %eax
cmpl %ebp, %eax
ja 0x73e0
movl 0x928e(%rip), %eax      # 0x1069c
jmp 0x741c
movl $0x0, 0x9286(%rip)      # 0x106a0
xorl %ecx, %ecx
movl 0x9276(%rip), %edx      # 0x10698
addl %ecx, %edx
addl %ecx, %eax
movl %edx, 0x4(%rsp)
cmpl %eax, %edx
jae 0x7f32
leaq 0x28(%rsp), %r13
leaq 0x58(%rsp), %rbx
movl 0x4(%rsp), %eax
movl %eax, %r15d
movl %r15d, %r15d
movq 0x48(%rsp), %rax
movq (%rax), %rbp
movq 0x8(%rax), %rax
subq %rbp, %rax
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rax
cmpq %r15, %rax
jbe 0x7f32
leaq (%r15,%r15,4), %r14
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq (%rbp,%r14,8), %rsi
movq 0x8(%rbp,%r14,8), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rdi
callq 0x5bf4
movb 0x20(%rbp,%r14,8), %al
movb %al, 0xd8(%rsp)
movq 0x91b7(%rip), %rdi      # 0x10668
xorl %esi, %esi
callq 0xb6cc
movq 0x91a9(%rip), %rdi      # 0x10668
movl $0x2, %esi
xorl %edx, %edx
callq 0xb71e
movl $0x1, %eax
cmpl $0xa, 0x4(%rsp)
leaq 0x68(%rsp), %rbp
jb 0x7522
movl $0x4, %eax
movl 0x4(%rsp), %ecx
movl $0xd1b71759, %esi       # imm = 0xD1B71759
cmpl $0x63, %ecx
jbe 0x751b
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x7520
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x7522
movl %ecx, %edx
imulq %rsi, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x74ea
addl $-0x3, %eax
jmp 0x7522
addl $-0x2, %eax
jmp 0x7522
decl %eax
movl %eax, %esi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r13, %rdi
xorl %edx, %edx
callq 0x3330
movq 0x28(%rsp), %rdi
movl 0x30(%rsp), %esi
movl 0x4(%rsp), %edx
callq 0x874e
movq 0x30(%rsp), %rdx
cmpq $0x1, %rdx
ja 0x7594
movq %rbx, %rdi
leaq 0x4fcc(%rip), %rsi      # 0xc52b
movq %r13, %rdx
callq 0x69ab
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3360
movq 0x58(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7589
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x30(%rsp), %rdx
cmpq $0x2, %rdx
jb 0x7555
movq 0x90cd(%rip), %rbp      # 0x10668
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x28(%rsp), %rsi
addq %rsi, %rdx
leaq 0x98(%rsp), %rdi
callq 0x5bf4
leaq 0x98(%rsp), %r12
movq %r12, %rdi
leaq 0x4e5e(%rip), %rsi      # 0xc430
callq 0x3560
movl 0x90b3(%rip), %edx      # 0x10690
movl 0x90b1(%rip), %ecx      # 0x10694
movq %rbp, %rdi
movq %r12, %rsi
callq 0xb70c
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x7613
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x904e(%rip), %rdi      # 0x10668
movl $0x2, %esi
xorl %edx, %edx
callq 0xb732
movq 0x903b(%rip), %rdi      # 0x10668
xorl %esi, %esi
callq 0xb6de
addl $0x5, 0x9055(%rip)      # 0x10690
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x7657
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32b0
cmpl 0x54(%rsp), %r15d
leaq 0x68(%rsp), %rbp
jne 0x778c
movq 0x48(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0x7f99
leaq (%rax,%r14,8), %rsi
movq %r13, %rdi
callq 0x880a
movq 0x48(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0x7f77
leaq (%rax,%r14,8), %rdi
callq 0x8b68
testb %al, %al
movb %al, 0x3(%rsp)
je 0x786d
movq 0x8f85(%rip), %rdi      # 0x10668
xorl %esi, %esi
callq 0xb6cc
movq 0x8f77(%rip), %rdi      # 0x10668
movl $0x3, %esi
xorl %edx, %edx
callq 0xb71e
movq 0x30(%rsp), %rcx
addq $-0x5, %rcx
movl $0x5, %edx
leaq 0x188(%rsp), %rdi
movq %r13, %rsi
callq 0x32c0
movl 0x8f73(%rip), %esi      # 0x10694
leaq 0x188(%rsp), %rdi
callq 0x85b5
movq 0x188(%rsp), %rdi
leaq 0x198(%rsp), %rax
cmpq %rax, %rdi
je 0x7753
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x8f0e(%rip), %rdi      # 0x10668
movl $0x3, %esi
xorl %edx, %edx
callq 0xb732
movq 0x8efb(%rip), %rdi      # 0x10668
xorl %esi, %esi
callq 0xb6de
incl 0x8f1a(%rip)            # 0x10694
addl $-0x5, 0x8f0f(%rip)     # 0x10690
movl $0x8, %r14d
jmp 0x7e7b
movq 0x48(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0x7f66
leaq (%rax,%r14,8), %rsi
movq %r13, %rdi
callq 0x880a
movq 0x48(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0x7f88
leaq (%rax,%r14,8), %rdi
callq 0x8b68
movl %eax, %ebp
testb %al, %al
je 0x78b1
movq 0x30(%rsp), %rcx
addq $-0x5, %rcx
movl $0x5, %edx
leaq 0x168(%rsp), %rdi
movq %r13, %rsi
callq 0x32c0
movl 0x8e71(%rip), %esi      # 0x10694
leaq 0x168(%rsp), %rdi
callq 0x85b5
movq 0x168(%rsp), %rdi
leaq 0x178(%rsp), %rax
cmpq %rax, %rdi
je 0x7855
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x32b0
incl 0x8e39(%rip)            # 0x10694
addl $-0x5, 0x8e2e(%rip)     # 0x10690
movl $0x8, %r14d
jmp 0x7ba8
movq %rbp, 0x58(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x5bf4
movl 0x8dfb(%rip), %ecx      # 0x10688
leal -0x8(%rcx), %eax
cmpq %rax, 0x60(%rsp)
leaq 0x18(%rsp), %r14
leaq 0x78(%rsp), %r12
jae 0x7930
leaq 0x4c2d(%rip), %r14      # 0xc4d9
jmp 0x7c44
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x5bf4
movl 0x8db2(%rip), %ecx      # 0x10688
leal -0x8(%rcx), %eax
cmpq %rax, 0x60(%rsp)
jb 0x79de
addl $-0xb, %ecx
leaq 0x78(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x32c0
movq %r14, %rdi
leaq 0x4c2a(%rip), %rsi      # 0xc52d
callq 0x3560
leaq 0x18(%rsp), %r14
movq %r14, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7979
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x7980
addl $-0xb, %ecx
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x32c0
movq %r12, %rdi
leaq 0x4be3(%rip), %rsi      # 0xc52d
callq 0x3560
movq %r14, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7bd2
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x7bd9
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x3360
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x79bc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x79de
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x8c03(%rip), %rcx      # 0x105e8
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x32c0
movq 0x10(%rsp), %rdx
leaq 0x78(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x32c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3360
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x7a3d
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x8c24(%rip), %r14      # 0x10668
leaq 0xb8(%rsp), %rdi
callq 0x8bf2
movzbl %al, %esi
addl $0x5, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0xb71e
movq 0x8c00(%rip), %r14      # 0x10668
leaq 0x110(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x100(%rsp), %rdi
callq 0x5bf4
movl 0x8bf8(%rip), %edx      # 0x10690
movl 0x8bf6(%rip), %ecx      # 0x10694
movq %r14, %rdi
leaq 0x100(%rsp), %rsi
callq 0xb70c
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x7ad3
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x8b8e(%rip), %r14      # 0x10668
leaq 0xb8(%rsp), %rdi
callq 0x8bf2
movzbl %al, %esi
addl $0x5, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0xb732
movq 0x8b6a(%rip), %r14      # 0x10668
leaq 0xf0(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
addq %rsi, %rdx
leaq 0xe0(%rsp), %rdi
callq 0x5bf4
movl 0x8b62(%rip), %edx      # 0x10690
addl 0x10(%rsp), %edx
movl 0x8b5c(%rip), %ecx      # 0x10694
movq %r14, %rdi
leaq 0xe0(%rsp), %rsi
callq 0xb70c
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x7b6d
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7b89
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x7ba5
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x32b0
xorl %r14d, %r14d
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x7bc4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32b0
testb %bpl, %bpl
je 0x7e9e
jmp 0x7eef
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x3360
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x7c15
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
leaq 0x48ad(%rip), %r14      # 0xc4d9
je 0x7c3e
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x32b0
movl 0x8a44(%rip), %ecx      # 0x10688
movl 0x8a46(%rip), %ebp      # 0x10690
addl 0x30(%rsp), %ebp
addl $-0x2, %ecx
cmpl %ecx, %ebp
jge 0x7c6f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3560
incl %ebp
movl 0x8a20(%rip), %eax      # 0x10688
addl $-0x2, %eax
cmpl %eax, %ebp
jl 0x7c55
movq 0x8972(%rip), %rcx      # 0x105e8
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x32c0
movq 0x10(%rsp), %rdx
leaq 0x78(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x32c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3360
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x7cce
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x8993(%rip), %rdi      # 0x10668
xorl %esi, %esi
callq 0xb6cc
movq 0x8985(%rip), %r14      # 0x10668
leaq 0xb8(%rsp), %rdi
callq 0x8bf2
movzbl %al, %esi
addl $0x5, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0xb71e
movq 0x8961(%rip), %r14      # 0x10668
leaq 0x150(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x140(%rsp), %rdi
callq 0x5bf4
movl 0x8959(%rip), %edx      # 0x10690
movl 0x8957(%rip), %ecx      # 0x10694
movq %r14, %rdi
leaq 0x140(%rsp), %rsi
callq 0xb70c
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x7d72
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x88ef(%rip), %r14      # 0x10668
leaq 0xb8(%rsp), %rdi
callq 0x8bf2
movzbl %al, %esi
addl $0x5, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0xb732
movq 0x88cb(%rip), %rdi      # 0x10668
movl $0x3, %esi
xorl %edx, %edx
callq 0xb71e
movq 0x88b8(%rip), %rbp      # 0x10668
leaq 0x130(%rsp), %rax
movq %rax, 0x120(%rsp)
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
addq %rsi, %rdx
leaq 0x120(%rsp), %rdi
callq 0x5bf4
movl 0x88b0(%rip), %edx      # 0x10690
addl 0x10(%rsp), %edx
movl 0x88aa(%rip), %ecx      # 0x10694
movq %rbp, %rdi
leaq 0x120(%rsp), %rsi
callq 0xb70c
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x7e1f
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x8842(%rip), %rdi      # 0x10668
movl $0x3, %esi
xorl %edx, %edx
callq 0xb732
movq 0x882f(%rip), %rdi      # 0x10668
xorl %esi, %esi
callq 0xb6de
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7e5c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x7e78
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x32b0
xorl %r14d, %r14d
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x7e97
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32b0
cmpb $0x0, 0x3(%rsp)
jne 0x7eef
movl 0x87f0(%rip), %eax      # 0x10694
incl %eax
movl %eax, 0x87e8(%rip)      # 0x10694
movl $0x6, %r14d
cmpl 0x160(%rsp), %eax
ja 0x7eef
movq 0x48(%rsp), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rax
decq %rax
cmpq %r15, %rax
jbe 0x7eef
addl $-0x5, 0x87a8(%rip)     # 0x10690
incl 0x4(%rsp)
xorl %r14d, %r14d
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x7f14
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x32b0
testb $0x7, %r14b
jne 0x7f32
incl %r15d
movl 0x877d(%rip), %eax      # 0x106a0
addl 0x8773(%rip), %eax      # 0x1069c
cmpl %eax, %r15d
jb 0x7443
movq 0x872f(%rip), %rdi      # 0x10668
movl $0x4, %esi
movl $0x1, %edx
callq 0xb71e
movq 0x8719(%rip), %rdi      # 0x10668
callq 0xb584
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x447b(%rip), %rdi      # 0xc3e8
movq %r15, %rsi
xorl %eax, %eax
callq 0x3410
leaq 0x446a(%rip), %rdi      # 0xc3e8
movq %r15, %rsi
xorl %eax, %eax
callq 0x3410
leaq 0x4459(%rip), %rdi      # 0xc3e8
movq %r15, %rsi
xorl %eax, %eax
callq 0x3410
leaq 0x4448(%rip), %rdi      # 0xc3e8
movq %r15, %rsi
xorl %eax, %eax
callq 0x3410
jmp 0x7fb1
jmp 0x814b
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x814e
movq 0x88(%rsp), %rsi
jmp 0x813f
jmp 0x814b
movq %rax, %rbx
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x812b
movq 0x110(%rsp), %rsi
jmp 0x80e1
movq %rax, %rbx
movq 0x188(%rsp), %rdi
leaq 0x198(%rsp), %rax
cmpq %rax, %rdi
je 0x816f
movq 0x198(%rsp), %rsi
jmp 0x8162
jmp 0x8128
jmp 0x814b
jmp 0x816c
movq %rax, %rbx
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x812b
movq 0x130(%rsp), %rsi
jmp 0x80e1
movq %rax, %rbx
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x812b
movq 0x150(%rsp), %rsi
jmp 0x80e1
jmp 0x8128
jmp 0x814b
jmp 0x816c
movq %rax, %rbx
movq 0x168(%rsp), %rdi
leaq 0x178(%rsp), %rax
cmpq %rax, %rdi
je 0x816f
movq 0x178(%rsp), %rsi
jmp 0x8162
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x812b
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x812b
jmp 0x8123
jmp 0x8123
jmp 0x816c
jmp 0x8123
jmp 0x816c
jmp 0x8123
jmp 0x816c
jmp 0x8123
jmp 0x80fd
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x816f
movq 0xa8(%rsp), %rsi
jmp 0x8162
jmp 0x8128
jmp 0x816c
movq %rax, %rbx
jmp 0x818b
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x814e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x814e
jmp 0x816c
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x816f
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x32b0
jmp 0x816f
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x818b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32b0
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x81b0
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x32b0
movq %rbx, %rdi
callq 0x3500