// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/views/list/expand.cpp
// Function: views::expand::render(mg_connection*, int, bool)
void render(mg_connection* conn, int id, bool reverse){
            ConfigManager configs;
            // int id = cc_extract_uri_num(conn);

            int limit, count;
            auto r = unq_read_thread_sp(pDb, 0); // get the root thread
            count = r.get()->childCount;
            limit = count - configs.global().get<int>("user::viewable_threads");
            // delete r;

            if (id < 0 || (id < limit && limit != 0) || id > count){
                views::info::render(conn, templates.invoke("misc").toggle("invalid_thread_no").build_destory().c_str());
                return;
            }

            r = unq_read_thread_sp(pDb, id); // get the root thread
            int pid = unq_thread_parent(pDb, r.get());
            
            if ((pid == -1) && !is_admin(conn)){
                views::info::render(conn, templates.invoke("misc").toggle("invalid_thread_no").build_destory().c_str());
                // delete r;
                return;
            }
            
            templates.invoke("site_header").toggle("thread_page").toggle("is_admin", is_admin(conn)) \
                .var("THREAD_NO", id).var("THREAD_TITLE", r.get()->author).pipe_to(conn).destory();

            templates.invoke("single_thread_header").toggle("homepage", !pid).var("THREAD_NO", id) \
                .var("PARENT_NO", pid).toggle("thread", strstr(conn->uri, "/thread/")).pipe_to(conn).destory();
            
            clock_t startc = clock();

            // bool reverse = strstr(conn->uri, "/daerht/");
            bool admin_view = is_admin(conn);
            string username = cck_verify_ssid(conn);

            views::each_thread(conn, r.get(), 0, admin_view);
            mg_printf_data(conn, "<hr>");

            char iid[10];
            strcpy(iid, r.get()->ssid);

            if(!configs.global().get<bool>("archive"))
                templates.invoke("post_form") \
                    .var("THREAD_NO", to_string(id)).toggle("reply_to_thread"). \
                    toggle("is_admin", admin_view || !is_assist(conn).empty()).pipe_to(conn).destory();
                
            if (r.get()->childThread) {
                // int r_childThread = r->childThread;
                // delete r;

                int limit = configs.global().get<int>("user::collapse_image");

                r = unq_read_thread_sp(pDb, r.get()->childThread); // beginning of the circle
                int rid = r.get()->threadID; //the ID
                bool too_many_replies = (r.get()->childCount > limit);

                int di = 1;

                if(reverse)
                {
                    int n_rid = r.get()->prevThread;
                    // delete r;
                    r = unq_read_thread_sp(pDb, r.get()->prevThread);

                    views::each_thread(conn, r.get(), SEND_IS_REPLY + SEND_SHOW_REPLY_LINK, admin_view, iid, username.c_str());

                    while (r.get()->prevThread != n_rid){
                        di++;
                        // int r_prevThread = r->prevThread;

                        // delete r;
                        r = unq_read_thread_sp(pDb, r.get()->prevThread);

                        if(too_many_replies && (di > limit))
                            views::each_thread(conn, r.get(), SEND_IS_REPLY + SEND_SHOW_REPLY_LINK + SEND_CUT_IMAGE, admin_view, iid, username.c_str());
                        else
                            views::each_thread(conn, r.get(), SEND_IS_REPLY + SEND_SHOW_REPLY_LINK, admin_view, iid, username.c_str());
                    }
                }
                else
                {
                    views::each_thread(conn, r.get(), SEND_IS_REPLY + SEND_SHOW_REPLY_LINK, admin_view, iid, username.c_str());

                    while (r.get()->nextThread != rid){
                        // int r_nextThread = r->nextThread;
                        // delete r;

                        r = unq_read_thread_sp(pDb, r.get()->nextThread);
                        di++;

                        //views::each_thread(conn, r, true, true, false, too_many_replies && (di > 20), admin_view, iid);
                        if(too_many_replies && (di > limit))
                            views::each_thread(conn, r.get(), SEND_IS_REPLY + SEND_SHOW_REPLY_LINK + SEND_CUT_IMAGE, admin_view, iid, username.c_str());
                        else
                            views::each_thread(conn, r.get(), SEND_IS_REPLY + SEND_SHOW_REPLY_LINK, admin_view, iid, username.c_str());
                    }

                    // if(r) delete r;
                } 
            }

            clock_t endc = clock();

            // site_footer(conn, (float)(endc-startc)/CLOCKS_PER_SEC);
            templates.invoke("site_footer").var("TIME", (int)((endc-startc) * 1000 / CLOCKS_PER_SEC)).pipe_to(conn).destory();
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movl %edx, 0xc8(%rsp)
movl %esi, %r14d
movq %rdi, 0x30(%rsp)
leaq 0x150(%rsp), %rax
movq %rax, -0x30(%rax)
movl $0x1, %ecx
movq %rcx, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x188(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x1c0(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x71cd3(%rip), %rax     # 0x96bf8
movq (%rax), %rsi
leaq 0x20(%rsp), %rdi
xorl %edx, %edx
callq 0xece8
movq 0x20(%rsp), %rax
movl 0xcc(%rax), %ebx
leaq 0x120(%rsp), %rdi
callq 0x11bfe
movq %rax, %r15
leaq 0x70(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x4f0fc(%rip), %rsi     # 0x7405b
leaq 0x4f10b(%rip), %rdx     # 0x74071
leaq 0x60(%rsp), %rdi
callq 0xedfa
addq $0x38, %r15
leaq 0x60(%rsp), %rsi
movq %r15, %rdi
callq 0x12426
movl (%rax), %ebp
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x24f92
callq 0xc640
testl %r14d, %r14d
js 0x25553
cmpl %r14d, %ebx
jl 0x25553
subl %ebp, %ebx
cmpl %r14d, %ebx
jg 0x25553
leaq 0x71c42(%rip), %rax     # 0x96bf8
movq (%rax), %rsi
leaq 0x60(%rsp), %rdi
movl %r14d, %edx
callq 0xece8
movaps 0x60(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x60(%rsp)
movq 0x28(%rsp), %rdi
movaps %xmm0, 0x20(%rsp)
testq %rdi, %rdi
je 0x24fe7
callq 0xed80
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x24ff6
callq 0xed80
leaq 0x71bfb(%rip), %rax     # 0x96bf8
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0xe129
movl %eax, %r15d
cmpl $-0x1, %eax
jne 0x25024
movq 0x30(%rsp), %rdi
callq 0xef24
testb %al, %al
je 0x25650
leaq 0x60(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x4e96a(%rip), %rsi     # 0x7399d
leaq 0x4e96e(%rip), %rdx     # 0x739a8
callq 0xedfa
leaq 0x71ce2(%rip), %rdi     # 0x96d28
leaq 0x60(%rsp), %rsi
callq 0x1852c
movq %rax, %r12
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4f021(%rip), %rsi     # 0x74084
leaq 0x4f025(%rip), %rdx     # 0x7408f
movq %rsp, %rdi
callq 0xedfa
leaq 0x1c8(%r12), %r13
movq %rsp, %rsi
movq %r13, %rdi
callq 0x1c82a
movb $0x1, (%rax)
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4ee1c(%rip), %rsi     # 0x73eb4
leaq 0x4ee1d(%rip), %rdx     # 0x73ebc
leaq 0x40(%rsp), %rdi
callq 0xedfa
movq 0x30(%rsp), %rdi
callq 0xef24
movl %eax, %ebp
leaq 0x40(%rsp), %rsi
movq %r13, %rdi
callq 0x1c82a
movb %bpl, (%rax)
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4eca4(%rip), %rsi     # 0x73d7c
leaq 0x4eca6(%rip), %rdx     # 0x73d85
leaq 0x88(%rsp), %rdi
callq 0xedfa
leaq 0x88(%rsp), %rsi
movq %r12, %rdi
movl %r14d, %edx
callq 0x186f6
movq %rax, %r12
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4ee95(%rip), %rsi     # 0x73faa
leaq 0x4ee9a(%rip), %rdx     # 0x73fb6
leaq 0xa8(%rsp), %rdi
callq 0xedfa
movq 0x20(%rsp), %rbx
leaq 0x11(%rbx), %r13
leaq 0xe8(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r13, %rdi
callq 0xc460
leaq (%rbx,%rax), %rdx
addq $0x11, %rdx
leaq 0xd8(%rsp), %rdi
movq %r13, %rsi
callq 0xedfa
leaq 0x198(%r12), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x70(%rsp), %rbx
callq 0x183b2
movq 0x30(%rsp), %r13
leaq 0xd8(%rsp), %rsi
movq %rax, %rdi
callq 0xcc40
movq %r12, %rdi
movq %r13, %rsi
callq 0x18672
movq %rax, %r12
movq %rax, %rdi
callq 0x1a17a
movq %r12, %rdi
callq 0xc640
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x251c5
callq 0xc640
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x251df
callq 0xc640
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x251f9
callq 0xc640
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x2520d
callq 0xc640
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x25220
callq 0xc640
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2522f
callq 0xc640
leaq 0x60(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0x4e8a1(%rip), %rsi     # 0x73adf
leaq 0x4e8ae(%rip), %rdx     # 0x73af3
callq 0xedfa
leaq 0x71ad7(%rip), %rdi     # 0x96d28
leaq 0x60(%rsp), %rsi
callq 0x1852c
movq %rax, %r12
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x4ee20(%rip), %rsi     # 0x74090
leaq 0x4ee21(%rip), %rdx     # 0x74098
callq 0xedfa
leaq 0x1c8(%r12), %rdi
movq %rsp, %rsi
callq 0x1c82a
testl %r15d, %r15d
sete (%rax)
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
movq %rax, (%rdi)
leaq 0x4ead6(%rip), %rsi     # 0x73d7c
leaq 0x4ead8(%rip), %rdx     # 0x73d85
callq 0xedfa
leaq 0x40(%rsp), %rsi
movq %r12, %rdi
movl %r14d, %edx
callq 0x186f6
movq %rax, %r12
leaq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
movq %rax, (%rdi)
leaq 0x4edba(%rip), %rsi     # 0x74099
leaq 0x4edbc(%rip), %rdx     # 0x740a2
callq 0xedfa
leaq 0x88(%rsp), %rsi
movq %r12, %rdi
movl %r15d, %edx
callq 0x186f6
movq %rax, %r15
leaq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
movq %rax, (%rdi)
leaq 0x4e58d(%rip), %rsi     # 0x738a8
leaq 0x4e58c(%rip), %rdx     # 0x738ae
callq 0xedfa
movq 0x8(%r13), %rdi
leaq 0x4ed71(%rip), %rsi     # 0x740a3
callq 0xc570
movq %rax, %r12
leaq 0x1c8(%r15), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x1c82a
testq %r12, %r12
setne (%rax)
movq %r15, %rdi
movq %r13, %rsi
callq 0x18672
movq %rax, %r15
movq %rax, %rdi
callq 0x1a17a
movq %r15, %rdi
callq 0xc640
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x2538c
callq 0xc640
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x253a6
callq 0xc640
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x253ba
callq 0xc640
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x253cd
callq 0xc640
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0x253dc
callq 0xc640
callq 0xc050
movq %rax, %r15
movq %r13, %rdi
callq 0xef24
movq %r13, %rbx
movl %eax, %r13d
leaq 0x60(%rsp), %rdi
movq %rbx, %rsi
callq 0xf5d8
movq %r15, 0xf8(%rsp)
movq 0x20(%rsp), %rsi
movzbl %r13b, %ecx
leaq 0x54250(%rip), %r8      # 0x79667
movq %rbx, %rdi
xorl %edx, %edx
movl %ecx, 0x3c(%rsp)
movq %r8, %r9
callq 0x2331c
leaq 0x4ec7d(%rip), %rsi     # 0x740ac
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a0f7
movl $0x91, %esi
addq 0x20(%rsp), %rsi
leaq 0xce(%rsp), %rdi
callq 0xc490
leaq 0x120(%rsp), %rdi
callq 0x11bfe
movq %rax, %r15
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x5420b(%rip), %rsi     # 0x7967d
leaq 0x5420b(%rip), %rdx     # 0x79684
callq 0xedfa
movq %rsp, %rsi
movq %r15, %rdi
callq 0x18460
movl %eax, %ebp
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2549e
callq 0xc640
testb %bpl, %bpl
jne 0x25885
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x4e662(%rip), %rsi     # 0x73b1b
leaq 0x4e664(%rip), %rdx     # 0x73b24
callq 0xedfa
leaq 0x7185c(%rip), %rdi     # 0x96d28
movq %rsp, %rsi
callq 0x1852c
movq %rax, %r15
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
movq %rax, (%rdi)
leaq 0x4e891(%rip), %rsi     # 0x73d7c
leaq 0x4e893(%rip), %rdx     # 0x73d85
callq 0xedfa
movl $0x1, %ebp
cmpl $0xa, %r14d
jb 0x256df
movl $0x4, %ebp
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x256d8
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x256dd
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x256df
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %ebp
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x25513
addl $-0x3, %ebp
jmp 0x256df
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x5034f(%rip), %rsi     # 0x758b2
leaq 0x5034c(%rip), %rdx     # 0x758b6
movq %rsp, %rdi
callq 0xedfa
leaq 0x717af(%rip), %rdi     # 0x96d28
movq %rsp, %rsi
callq 0x1852c
movq %rax, %r14
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4eadd(%rip), %rsi     # 0x74072
leaq 0x4eae7(%rip), %rdx     # 0x74083
leaq 0x40(%rsp), %rdi
callq 0xedfa
leaq 0x1c8(%r14), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1c82a
movb $0x1, (%rax)
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
callq 0x18576
movq 0x60(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0x2307c
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x255e5
callq 0xc640
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x255f4
callq 0xc640
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x25602
callq 0xc640
leaq 0x158(%rsp), %rbx
leaq 0x190(%rsp), %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x25621
callq 0xed80
movq %r14, %rdi
callq 0x11d00
movq %rbx, %rdi
callq 0x11d96
leaq 0x120(%rsp), %rdi
callq 0x11e2c
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x50252(%rip), %rsi     # 0x758b2
leaq 0x5024f(%rip), %rdx     # 0x758b6
movq %rsp, %rdi
callq 0xedfa
leaq 0x716b2(%rip), %rdi     # 0x96d28
movq %rsp, %rsi
callq 0x1852c
movq %rax, %r14
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4e9e0(%rip), %rsi     # 0x74072
leaq 0x4e9ea(%rip), %rdx     # 0x74083
leaq 0x40(%rsp), %rdi
callq 0xedfa
leaq 0x1c8(%r14), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1c82a
movb $0x1, (%rax)
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
callq 0x18576
movq 0x60(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0x2307c
jmp 0x255d6
addl $-0x2, %ebp
jmp 0x256df
decl %ebp
movl %ebp, %esi
leaq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
movq %rax, (%rdi)
movl $0x2d, %edx
callq 0xc6d0
movq 0x88(%rsp), %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x12329
leaq 0x198(%r15), %rdi
leaq 0x40(%rsp), %rsi
callq 0x183b2
leaq 0x88(%rsp), %rsi
movq %rax, %rdi
callq 0xcc40
leaq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
movq %rax, (%rdi)
leaq 0x4e966(%rip), %rsi     # 0x740b1
leaq 0x4e96e(%rip), %rdx     # 0x740c0
callq 0xedfa
leaq 0x1c8(%r15), %r14
leaq 0xa8(%rsp), %rsi
movq %r14, %rdi
callq 0x1c82a
movb $0x1, (%rax)
leaq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
movq %rax, (%rdi)
leaq 0x4e729(%rip), %rsi     # 0x73eb4
leaq 0x4e72a(%rip), %rdx     # 0x73ebc
callq 0xedfa
movb $0x1, %bl
testb %r13b, %r13b
jne 0x257bc
leaq 0x100(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0xefe6
cmpq $0x0, 0x108(%rsp)
setne %bl
movl %r13d, %ebp
xorb $0x1, %bpl
leaq 0xd8(%rsp), %rsi
movq %r14, %rdi
callq 0x1c82a
movb %bl, (%rax)
movq %r15, %rdi
movq 0x30(%rsp), %rsi
callq 0x18672
movq %rax, %r14
movq %rax, %rdi
callq 0x1a17a
movq %r14, %rdi
callq 0xc640
testb %r13b, %r13b
jne 0x25810
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25810
callq 0xc640
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x2582a
callq 0xc640
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x25844
callq 0xc640
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x2585e
callq 0xc640
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x25872
callq 0xc640
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x25885
callq 0xc640
movq 0x20(%rsp), %rax
cmpl $0x0, 0xc4(%rax)
je 0x25b40
leaq 0x120(%rsp), %rdi
callq 0x11bfe
movq %rax, %r14
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x4e808(%rip), %rsi     # 0x740c1
leaq 0x4e815(%rip), %rdx     # 0x740d5
callq 0xedfa
addq $0x38, %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x12426
movl (%rax), %r13d
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x258ea
callq 0xc640
leaq 0x71307(%rip), %rax     # 0x96bf8
movq (%rax), %rsi
movq 0x20(%rsp), %rax
movl 0xc4(%rax), %edx
movq %rsp, %rdi
callq 0xece8
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x28(%rsp), %rdi
movaps %xmm0, 0x20(%rsp)
testq %rdi, %rdi
je 0x25926
callq 0xed80
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x25935
callq 0xed80
movq 0x20(%rsp), %rsi
movl 0xcc(%rsi), %ebx
cmpb $0x0, 0xc8(%rsp)
je 0x25a6d
movl 0xc0(%rsi), %ebp
leaq 0x7129d(%rip), %rax     # 0x96bf8
movq (%rax), %rsi
movq %rsp, %rdi
movl %ebp, %edx
callq 0xece8
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x28(%rsp), %rdi
movaps %xmm0, 0x20(%rsp)
testq %rdi, %rdi
je 0x25987
callq 0xed80
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x25996
callq 0xed80
movq 0x20(%rsp), %rsi
movq 0x60(%rsp), %r9
leaq 0xce(%rsp), %r8
movq 0x30(%rsp), %rdi
movl $0x3, %edx
movl 0x3c(%rsp), %ecx
callq 0x2331c
movq 0x20(%rsp), %rax
movl 0xc0(%rax), %edx
cmpl %ebp, %edx
je 0x25b40
movl $0x1, %r12d
movq %rsp, %r14
leaq 0xce(%rsp), %r15
leaq 0x71212(%rip), %rax     # 0x96bf8
movq (%rax), %rsi
movq %r14, %rdi
callq 0xece8
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x28(%rsp), %rdi
movaps %xmm0, 0x20(%rsp)
testq %rdi, %rdi
je 0x25a10
callq 0xed80
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x25a1f
callq 0xed80
cmpl %r13d, %ebx
setg %al
cmpl %r13d, %r12d
setge %cl
movq 0x20(%rsp), %rsi
movq 0x60(%rsp), %r9
andb %al, %cl
movzbl %cl, %eax
leal 0x3(,%rax,8), %edx
movq 0x30(%rsp), %rdi
movl 0x3c(%rsp), %ecx
movq %r15, %r8
callq 0x2331c
movq 0x20(%rsp), %rax
movl 0xc0(%rax), %edx
incl %r12d
cmpl %ebp, %edx
jne 0x259df
jmp 0x25b40
movl 0xb8(%rsi), %ebp
movq 0x60(%rsp), %r9
leaq 0xce(%rsp), %r8
movq 0x30(%rsp), %rdi
movl $0x3, %edx
movl 0x3c(%rsp), %ecx
callq 0x2331c
movq 0x20(%rsp), %rax
movl 0xbc(%rax), %edx
cmpl %ebp, %edx
je 0x25b40
movl $0x1, %r12d
movq %rsp, %r14
leaq 0xce(%rsp), %r15
leaq 0x7113a(%rip), %rax     # 0x96bf8
movq (%rax), %rsi
movq %r14, %rdi
callq 0xece8
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x28(%rsp), %rdi
movaps %xmm0, 0x20(%rsp)
testq %rdi, %rdi
je 0x25ae8
callq 0xed80
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x25af7
callq 0xed80
cmpl %r13d, %ebx
setg %al
cmpl %r13d, %r12d
setge %cl
movq 0x20(%rsp), %rsi
movq 0x60(%rsp), %r9
andb %al, %cl
movzbl %cl, %eax
leal 0x3(,%rax,8), %edx
movq 0x30(%rsp), %rdi
movl 0x3c(%rsp), %ecx
movq %r15, %r8
callq 0x2331c
incl %r12d
movq 0x20(%rsp), %rax
movl 0xbc(%rax), %edx
cmpl %ebp, %edx
jne 0x25ab7
callq 0xc050
movq %rax, %r14
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x4dec3(%rip), %rsi     # 0x73a1d
leaq 0x4dec7(%rip), %rdx     # 0x73a28
callq 0xedfa
leaq 0x711bb(%rip), %rdi     # 0x96d28
movq %rsp, %rsi
leaq 0x70(%rsp), %r12
callq 0x1852c
movq 0x30(%rsp), %rbx
movq %rax, %r15
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
movq %rax, (%rdi)
leaq 0x4de4e(%rip), %rsi     # 0x739e4
leaq 0x4de4b(%rip), %rdx     # 0x739e8
callq 0xedfa
subq 0xf8(%rsp), %r14
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
movq %r14, %rax
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x7, %rdx
addl %eax, %edx
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
callq 0x186f6
movq %rax, %rdi
movq %rbx, %rsi
callq 0x18672
movq %rax, %rbx
movq %rax, %rdi
callq 0x1a17a
movq %rbx, %rdi
callq 0xc640
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x25c06
callq 0xc640
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x25c19
callq 0xc640
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
jne 0x255fd
jmp 0x25602
jmp 0x25d06
jmp 0x25d1c
jmp 0x25d1c
jmp 0x25d75
movq %rax, %rbx
movb $0x1, %bpl
jmp 0x25cac
jmp 0x25e05
jmp 0x25e05
jmp 0x25e05
jmp 0x25d3b
jmp 0x25d2e
jmp 0x25d2e
jmp 0x25ce6
jmp 0x25d33
jmp 0x25cf2
jmp 0x25cf2
jmp 0x25e05
jmp 0x25e05
jmp 0x25cf2
jmp 0x25e05
jmp 0x25cf2
jmp 0x25cf2
jmp 0x25e05
movq %rax, %rbx
testb %r13b, %r13b
jne 0x25cac
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25cac
callq 0xc640
testb %bpl, %bpl
jmp 0x25d88
jmp 0x25ce6
jmp 0x25cf2
jmp 0x25e05
jmp 0x25d75
jmp 0x25d75
jmp 0x25ce6
jmp 0x25ce6
jmp 0x25d33
jmp 0x25d33
jmp 0x25cf2
jmp 0x25cf2
jmp 0x25e05
jmp 0x25e05
jmp 0x25d75
jmp 0x25d2e
jmp 0x25ce6
movq %rax, %rbx
jmp 0x25dbc
jmp 0x25d33
jmp 0x25cf2
movq %rax, %rbx
jmp 0x25dea
jmp 0x25e05
jmp 0x25e05
jmp 0x25d75
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x25d3e
callq 0xc640
jmp 0x25d3e
jmp 0x25d1c
movq %rax, %rbx
jmp 0x25d4d
jmp 0x25d75
jmp 0x25d75
jmp 0x25d75
jmp 0x25d33
jmp 0x25e05
movq %rax, %rbx
jmp 0x25da2
movq %rax, %rbx
jmp 0x25dd6
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x25d4d
callq 0xc640
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0x25e17
jmp 0x25e1c
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
jne 0x25e17
jmp 0x25e1c
movq %rax, %rbx
jmp 0x25e1c
movq %rax, %rbx
jmp 0x25e2b
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x25da2
callq 0xc640
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x25dbc
callq 0xc640
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x25dd6
callq 0xc640
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x25dea
callq 0xc640
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x25e08
callq 0xc640
jmp 0x25e08
jmp 0x25e05
jmp 0x25e05
jmp 0x25e05
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x25e1c
callq 0xc640
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x25e2b
callq 0xed80
leaq 0x120(%rsp), %rdi
callq 0x11c1c
movq %rbx, %rdi
callq 0xc760