// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/plantri.c
// Function: find_extensions_min4
static void
find_extensions_min4(int nbtot, int nbop, EDGE *ext4[], int *next4,
   EDGE *ext5[], int *next5, EDGE *extS[], int *nextS, EDGE *known)

/* Determine the inequivalent places to make extensions, for the
   ordinary triangulations of minimum degree 4.  The results are
   put in the arrays ext4[0..*next4-1], etc..
   nbtot and nbop are the usual group parameters.

   If known!=NULL, it is the reference edge of a known four-reduction.
*/
{
    register int i,k;
    register EDGE *e,*e1,*elast;
    EDGE **nb,**nb0,**nblim,**nboplim;
    int manycentres;

    find_extensions_min4_four(nbtot,ext4,next4,known);

    manycentres = has_3_four_centres();

    if (nbtot == 1)
    {
      /* five-extensions, trivial group */

	if (manycentres)
	    *next5 = 0;
	else if (known)
	{
	    k = 0;
	    for (i = 0, e = known; i < 4; ++i, e = e->next)
	    if (degree[e->end] >= 6)
	    {
		ext5[k++] = e->invers->prev->invers;
		ext5[k++] = e->invers->next->next->invers;
	    }
	    *next5 = k;
	}
	else
	{
	    k = 0;
	    for (i = 0; i < nv; ++i)
	    if (degree[i] >= 6)
	    {
	        e = elast = firstedge[i];
                do
                {
                    ext5[k++] = e->invers;
                    e = e->next;
                } while (e != elast);
            }
            *next5 = k;
	}

      /* S-extensions, trivial group */

        k = 0;
	if (nv <= maxnv-3)
	{
            for (i = 0; i < nv; ++i)
            {
                e = elast = firstedge[i];
                do
                {
                    e1 = e->invers->prev;
                    if (e1 > e)
                    {
                        e1 = e1->invers->prev;
                        if (e1 > e) extS[k++] = e;
                    }
                    e = e->next;
                } while (e != elast);
            }
	}
	*nextS = k;
    }
    else    
    {
      /* five-extensions, non-trivial group */
    
	if (manycentres)
	    *next5 = 0;
	else
	{
            nboplim = (EDGE**)numbering[nbop==0?nbtot:nbop];
            nblim = (EDGE**)numbering[nbtot];

            RESETMARKS;
	    k = 0;
            nb0 = (EDGE**)numbering[0];
            for (i = 0; i < ne; ++i, ++nb0)
            {
                e = *nb0;
                if (!ISMARKEDLO(e) && degree[e->start] >= 6)
                {
                    ext5[k++] = e->next->invers;
    
                    nb = nb0 + MAXE;
                    for (; nb < nboplim; nb += MAXE) MARKLO(*nb);
                    for (; nb < nblim; nb += MAXE) MARKLO((*nb)->prev);
                }
            }
	    *next5 = k;
	}

      /* S-extensions, non-trivial group */

        k = 0;
	if (nv <= maxnv-3)
        {
	    nb0 = (EDGE**)numbering[0];
            nboplim = (EDGE**)numbering[nbop==0?nbtot:nbop];
            nblim = (EDGE**)numbering[nbtot];
	    RESETMARKS;

	    for (i = 0; i < ne; ++i) nb0[i]->index = i;

            for (i = 0; i < ne; ++i)
            {
                e = nb0[i];
                if (ISMARKEDLO(e)) continue;
                extS[k++] = e;
            
                for (nb = nb0 + i; nb < nboplim; nb += MAXE) MARKLO(*nb);

                for (; nb < nblim; nb += MAXE) MARKLO((*nb)->invers);

                e1 = e->invers->prev;
                for (nb = nb0 + e1->index; nb < nboplim; nb += MAXE)
                    MARKLO(*nb);
    
                for (; nb < nblim; nb += MAXE) MARKLO((*nb)->invers);
        
                e1 = e1->invers->prev;
                for (nb = nb0 + e1->index; nb < nboplim; nb += MAXE)
                    MARKLO(*nb);
    
                for (; nb < nblim; nb += MAXE) MARKLO((*nb)->invers);
            }
	}
	*nextS = k;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, 0x38(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, %r8
movq %rdx, %r13
movl %esi, 0xc(%rsp)
movl %edi, 0x4(%rsp)
movl 0xca90(%rip), %eax      # 0x2407c
leal 0x2(%rax), %r12d
movl %r12d, 0xca85(%rip)     # 0x2407c
leaq 0x22b012(%rip), %rcx    # 0x242610
cmpl $0x752f, %eax           # imm = 0x752F
jl 0x17628
movl $0x2, 0xca6d(%rip)      # 0x2407c
pushq $0x30
popq %rax
pushq $0x2
popq %r12
cmpq $0x46630, %rax          # imm = 0x46630
je 0x17628
andl $0x0, (%rax,%rcx)
addq $0x40, %rax
jmp 0x17616
xorl %r15d, %r15d
movq 0x90(%rsp), %rcx
testq %rcx, %rcx
movq %r8, 0x40(%rsp)
je 0x17741
movslq 0x4(%rcx), %rax
leaq 0xe594(%rip), %rdi      # 0x25be0
movl (%rdi,%rax,4), %edx
movq 0x18(%rcx), %rax
movq 0x18(%rax), %rsi
movslq 0x4(%rsi), %rax
movl (%rdi,%rax,4), %eax
movl %edx, 0x2c(%rsp)
movl %eax, 0x28(%rsp)
cmpl %eax, %edx
cmovgeq %rcx, %rsi
movq %rsi, 0x30(%rsp)
movq 0x20(%rsi), %rax
movq 0x10(%rax), %r14
movq 0x18(%rax), %rbp
movl $0x0, 0x8(%rsp)
movq %rbp, 0x10(%rsp)
movq 0x18(%rbp), %rbp
cmpq %r14, %rbp
je 0x176d6
movq 0x20(%rbp), %rbx
movq %rbx, %rdi
callq 0x18e2c
testl %eax, %eax
je 0x1768a
movq 0x18(%rbx), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rax
leaq 0xe52a(%rip), %rcx      # 0x25be0
movl (%rcx,%rax,4), %eax
movl 0x8(%rsp), %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movl %ecx, 0x8(%rsp)
movq 0x18(%rsp), %rax
cmovgq %rbp, %rax
movq %rax, 0x18(%rsp)
jmp 0x1768a
movl 0x2c(%rsp), %ebx
movl 0x28(%rsp), %ebp
cmpl %ebp, %ebx
movl %ebp, %r10d
cmovll %ebx, %r10d
movl %ebp, %r11d
cmovgl %ebx, %r11d
movl 0x8(%rsp), %r14d
testl %r14d, %r14d
je 0x1779a
movq 0x30(%rsp), %rdi
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rcx
movslq 0x4(%rax), %rax
leaq 0xe4cc(%rip), %rdx      # 0x25be0
movl (%rdx,%rax,4), %eax
movslq 0x4(%rcx), %rcx
movl (%rdx,%rcx,4), %ecx
cmpl %r14d, %eax
jge 0x1774c
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
cmpq %rdx, 0x18(%rsi)
je 0x1774c
movq 0x10(%rsp), %rdx
movq 0x20(%rdx), %rdx
xorl %r9d, %r9d
jmp 0x17765
xorl %r9d, %r9d
xorl %r11d, %r11d
jmp 0x17957
movq 0x10(%rsp), %rdx
movq %rdx, (%r13)
movl %r12d, 0x30(%rdx)
movq 0x20(%rdx), %rdx
movl %r12d, 0x30(%rdx)
pushq $0x1
popq %r9
movq 0x18(%rdx), %rdx
movq 0x18(%rdx), %rdx
cmpl %ebx, %ebp
jne 0x17843
cmpl %r14d, %eax
jl 0x17843
movl %r9d, %esi
incl %r9d
movq %rdx, (%r13,%rsi,8)
movl %r12d, 0x30(%rdx)
movq 0x20(%rdx), %rdx
movl %r12d, 0x30(%rdx)
jmp 0x17847
movq 0x10(%rsp), %rax
movq %rax, (%r13)
movl %r12d, 0x30(%rax)
movq 0x20(%rax), %rax
movl %r12d, 0x30(%rax)
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%r13)
movl %r12d, 0x30(%rax)
movq 0x20(%rax), %rax
movl %r12d, 0x30(%rax)
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%r13)
movl %r12d, 0x30(%rax)
movq 0x20(%rax), %rax
movl %r12d, 0x30(%rax)
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x18(%r13)
movl %r12d, 0x30(%rax)
movq 0x20(%rax), %rax
movl %r12d, 0x30(%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x20(%r13)
movl %r12d, 0x30(%rcx)
movq 0x20(%rcx), %rax
movl %r12d, 0x30(%rax)
movq 0x18(%rcx), %rax
movq %rax, 0x28(%r13)
movl %r12d, 0x30(%rax)
movq 0x20(%rax), %rcx
movl %r12d, 0x30(%rcx)
movq 0x18(%rax), %rcx
cmpl %ebp, %ebx
jne 0x17938
movq %rcx, 0x30(%r13)
movl %r12d, 0x30(%rcx)
movq 0x20(%rcx), %rax
movl %r12d, 0x30(%rax)
pushq $0x7
jmp 0x1793a
movq 0x20(%rdx), %rdx
movq 0x18(%rdx), %rdx
movq 0x18(%rdx), %rdx
cmpl %ebx, %ebp
jne 0x17871
cmpl %r14d, %ecx
jl 0x17871
movl %r9d, %esi
incl %r9d
movq %rdx, (%r13,%rsi,8)
movl %r12d, 0x30(%rdx)
movq 0x20(%rdx), %rdx
movl %r12d, 0x30(%rdx)
jmp 0x17875
movq 0x20(%rdx), %rdx
movq 0x18(%rdx), %rdx
movq 0x18(%rdx), %rdx
cmpl %r14d, %ecx
jge 0x17891
movq 0x20(%rdx), %rsi
movq 0x18(%rsp), %r8
cmpq %r8, 0x10(%rsi)
jne 0x178a8
movl %r9d, %esi
incl %r9d
movq %rdx, (%r13,%rsi,8)
movl %r12d, 0x30(%rdx)
movq 0x20(%rdx), %rdx
movl %r12d, 0x30(%rdx)
cmpl $0x4, %r14d
jne 0x178c5
movl %r9d, %edx
incl %r9d
movq %rdi, (%r13,%rdx,8)
movl %r12d, 0x30(%rdi)
movq 0x20(%rdi), %rdx
movl %r12d, 0x30(%rdx)
movl %r14d, %edx
xorl $0x4, %edx
movq 0x18(%rdi), %rdi
leal 0x1(%r11), %esi
movl %ecx, %r8d
xorl %esi, %r8d
orl %edx, %r8d
sete %r8b
cmpl %esi, %ecx
jg 0x178e9
testb %r8b, %r8b
je 0x17900
movl %r9d, %ecx
incl %r9d
movq %rdi, (%r13,%rcx,8)
movl %r12d, 0x30(%rdi)
movq 0x20(%rdi), %rcx
movl %r12d, 0x30(%rcx)
movq 0x18(%rdi), %rcx
cmpl %ebx, %ebp
jne 0x17925
cmpl $0x4, %r14d
jne 0x17925
movl %r9d, %edi
incl %r9d
movq %rcx, (%r13,%rdi,8)
movl %r12d, 0x30(%rcx)
movq 0x20(%rcx), %rdi
movl %r12d, 0x30(%rdi)
movl %eax, %edi
xorl %esi, %edi
orl %edi, %edx
sete %dl
cmpl %esi, %eax
jg 0x1793c
testb %dl, %dl
je 0x17957
jmp 0x1793c
pushq $0x6
popq %r9
movq 0x18(%rcx), %rax
movl %r9d, %ecx
incl %r9d
movq %rax, (%r13,%rcx,8)
movl %r12d, 0x30(%rax)
movq 0x20(%rax), %rax
movl %r12d, 0x30(%rax)
movq 0x80(%rsp), %rcx
pushq $0x30
popq %rax
movl 0x22ac98(%rip), %edx    # 0x242600
testl %edx, %edx
movl $0x0, %edi
cmovgl %edx, %edi
leaq 0xe267(%rip), %rsi      # 0x25be0
leaq 0xe060(%rip), %r8       # 0x259e0
cmpq %rdi, %r15
je 0x179f8
cmpl %r11d, (%rsi,%r15,4)
jle 0x179ba
movq (%r8,%r15,8), %r14
movq %r14, %rbp
cmpl %r12d, 0x30(%rbp)
je 0x179af
movslq %r9d, %rbx
incl %r9d
movq %rbp, (%r13,%rbx,8)
movl %r12d, 0x30(%rbp)
movq 0x20(%rbp), %rbx
movl %r12d, 0x30(%rbx)
movq 0x18(%rbp), %rbp
cmpq %r14, %rbp
jne 0x17992
jmp 0x179f3
jne 0x179f3
movq (%r8,%r15,8), %r14
movq %r14, %rbp
cmpl %r12d, 0x30(%rbp)
je 0x179ea
movslq 0x4(%rbp), %rbx
cmpl %r10d, (%rsi,%rbx,4)
jl 0x179ea
movslq %r9d, %rbx
incl %r9d
movq %rbp, (%r13,%rbx,8)
movl %r12d, 0x30(%rbp)
movq 0x20(%rbp), %rbx
movl %r12d, 0x30(%rbx)
movq 0x18(%rbp), %rbp
cmpq %r14, %rbp
jne 0x179c3
incq %r15
jmp 0x17980
cmpl $0x2, 0x4(%rsp)
jl 0x17aec
movl 0x22abfa(%rip), %r10d   # 0x242604
xorl %r11d, %r11d
testl %r10d, %r10d
cmovlel %r11d, %r10d
leaq 0xe2c5(%rip), %r14      # 0x25ce0
cmpq %r11, %r10
je 0x17a30
movq (%r14), %rbx
movl %r11d, 0x34(%rbx)
incq %r11
addq $0x8, %r14
jmp 0x17a1b
movl 0x4(%rsp), %r10d
imulq $0xba0, %r10, %r10      # imm = 0xBA0
leaq 0xe29d(%rip), %r11      # 0x25ce0
leal 0x2(%r12), %ebx
movl %ebx, 0xc62e(%rip)      # 0x2407c
cmpl $0x752f, %r12d          # imm = 0x752F
movl %ebx, %r12d
jl 0x17a87
movl $0x2, 0xc618(%rip)      # 0x2407c
pushq $0x30
popq %r14
pushq $0x2
popq %r12
leaq 0x22ab9d(%rip), %rbx    # 0x242610
cmpq $0x46630, %r14          # imm = 0x46630
je 0x17a87
andl $0x0, (%r14,%rbx)
addq $0x40, %r14
jmp 0x17a73
addq %r11, %r10
xorl %r14d, %r14d
testl %r9d, %r9d
movl %r9d, %r15d
cmovlel %r14d, %r15d
xorl %r9d, %r9d
cmpq %r15, %r14
je 0x17aec
movq (%r13,%r14,8), %rbp
cmpl %r12d, 0x30(%rbp)
je 0x17ae7
movslq %r9d, %rbx
movq %rbp, (%r13,%rbx,8)
movq (%r13,%r14,8), %rbx
movslq 0x34(%rbx), %rbx
leaq (%r11,%rbx,8), %rbp
addq $0xba0, %rbp            # imm = 0xBA0
cmpq %r10, %rbp
jae 0x17ae4
movq (%rbp), %rbx
movl %r12d, 0x30(%rbx)
movq 0x20(%rbx), %rbx
movl %r12d, 0x30(%rbx)
addq $0xba0, %rbp            # imm = 0xBA0
jmp 0x17ac6
incl %r9d
incq %r14
jmp 0x17a9a
movq 0x40(%rsp), %r10
movl %r9d, (%r10)
xorl %r11d, %r11d
movq %rdx, %r10
movl 0x4(%rsp), %ebp
movl %r10d, %r14d
decq %r10
movslq %ebp, %r9
testl %r14d, %r14d
jle 0x17b6e
cmpl $0x4, (%rsi,%r10,4)
jne 0x17b4f
movq (%r8,%r10,8), %r15
movq 0x10(%r15), %rbx
movslq 0x4(%rbx), %rbx
cmpl $0x5, (%rsi,%rbx,4)
jl 0x17b33
movq 0x18(%r15), %rbx
movslq 0x4(%rbx), %rbx
cmpl $0x4, (%rsi,%rbx,4)
jg 0x17b54
movslq 0x4(%r15), %rbx
cmpl $0x5, (%rsi,%rbx,4)
jl 0x17b4f
movq 0x18(%r15), %rbx
movq 0x18(%rbx), %rbx
movslq 0x4(%rbx), %rbx
cmpl $0x4, (%rsi,%rbx,4)
jg 0x17b54
decl %r14d
jmp 0x17b01
incl %r11d
cmpl $0x3, %r11d
jne 0x17afe
xorl %r10d, %r10d
cmpl $0x1, %ebp
je 0x17eb0
jmp 0x17cde
xorl %r10d, %r10d
cmpl $0x1, %ebp
jne 0x17be2
cmpl $0x2, %r11d
ja 0x17eb0
movq 0x90(%rsp), %r14
testq %r14, %r14
je 0x17e71
xorl %r10d, %r10d
pushq $0x4
popq %rax
movq 0x20(%rsp), %rbx
subl $0x1, %eax
jb 0x17eb0
movslq 0x4(%r14), %r9
cmpl $0x6, (%rsi,%r9,4)
jl 0x17bdc
movq 0x20(%r14), %r9
movq 0x10(%r9), %r9
movq 0x20(%r9), %r9
movslq %r10d, %r11
movq %r9, (%rbx,%r11,8)
movq 0x20(%r14), %r9
movq 0x18(%r9), %r9
movq 0x18(%r9), %r9
movq 0x20(%r9), %r9
leal 0x2(%r11), %r10d
movq %r9, 0x8(%rbx,%r11,8)
movq 0x18(%r14), %r14
jmp 0x17b9c
cmpl $0x2, %r11d
ja 0x17cde
movl 0xc(%rsp), %edi
testl %edi, %edi
cmovel %ebp, %edi
movslq %edi, %rdi
imulq $0xba0, %rdi, %rdi      # imm = 0xBA0
leaq 0xe0da(%rip), %r8       # 0x25ce0
imulq $0xba0, %r9, %r11       # imm = 0xBA0
leal 0x2(%r12), %r10d
movl %r10d, 0xc463(%rip)     # 0x2407c
cmpl $0x752f, %r12d          # imm = 0x752F
movl %r10d, %r12d
jl 0x17c4f
movl $0x2, 0xc44d(%rip)      # 0x2407c
leaq 0x22a9da(%rip), %r10    # 0x242610
cmpq $0x46630, %rax          # imm = 0x46630
je 0x17c49
andl $0x0, (%rax,%r10)
addq $0x40, %rax
jmp 0x17c36
pushq $0x2
popq %rax
movl %eax, %r12d
addq %r8, %rdi
addq %r8, %r11
movl 0x22a9a9(%rip), %eax    # 0x242604
xorl %r10d, %r10d
testl %eax, %eax
cmovlel %r10d, %eax
leaq 0xec15(%rip), %rbx      # 0x26880
xorl %r14d, %r14d
cmpl %eax, %r14d
je 0x17cde
movq (%r8), %r15
cmpl %r12d, 0x30(%r15)
je 0x17cd1
movslq (%r15), %r13
cmpl $0x6, (%rsi,%r13,4)
jl 0x17ccd
movq 0x18(%r15), %r15
movq 0x20(%r15), %r15
movslq %r10d, %r13
movq 0x20(%rsp), %rbp
movq %r15, (%rbp,%r13,8)
movq %rbx, %r15
cmpq %rdi, %r15
jae 0x17cc5
movq (%r15), %r13
movl %r12d, 0x30(%r13)
addq $0xba0, %r15            # imm = 0xBA0
jmp 0x17c9e
movq (%r15), %r13
movq 0x10(%r13), %r13
movl %r12d, 0x30(%r13)
addq $0xba0, %r15            # imm = 0xBA0
cmpq %r11, %r15
jb 0x17cb3
incl %r10d
movl 0x4(%rsp), %ebp
incl %r14d
addq $0x8, %r8
addq $0x8, %rbx
jmp 0x17c6e
movq 0x38(%rsp), %rax
movl %r10d, (%rax)
movl 0xc574(%rip), %eax      # 0x24260
addl $-0x3, %eax
cmpl %eax, %edx
jle 0x17d02
xorl %esi, %esi
movq 0x88(%rsp), %r15
jmp 0x17ecf
movl 0xc(%rsp), %eax
testl %eax, %eax
cmovnel %eax, %ebp
movslq %ebp, %rax
imulq $0xba0, %rax, %rax      # imm = 0xBA0
leaq 0xdfc4(%rip), %rsi      # 0x25ce0
imulq $0xba0, %r9, %rdx       # imm = 0xBA0
leal 0x2(%r12), %edi
movl %edi, 0xc34e(%rip)      # 0x2407c
cmpl $0x752f, %r12d          # imm = 0x752F
jl 0x17d63
movl $0x2, 0xc33b(%rip)      # 0x2407c
pushq $0x30
popq %r8
pushq $0x2
popq %rdi
leaq 0x22a8c1(%rip), %r9     # 0x242610
cmpq $0x46630, %r8           # imm = 0x46630
je 0x17d63
andl $0x0, (%r8,%r9)
addq $0x40, %r8
jmp 0x17d4f
addq %rsi, %rax
addq %rsi, %rdx
movl 0x22a894(%rip), %r8d    # 0x242604
xorl %r9d, %r9d
testl %r8d, %r8d
cmovlel %r9d, %r8d
movq 0x88(%rsp), %r15
cmpq %r9, %r8
je 0x17d97
movq (%rsi), %r10
movl %r9d, 0x34(%r10)
incq %r9
addq $0x8, %rsi
jmp 0x17d82
xorl %r9d, %r9d
leaq 0xdf3f(%rip), %r10      # 0x25ce0
xorl %esi, %esi
cmpq %r8, %r9
je 0x17ecf
movq (%r10,%r9,8), %r11
cmpl %edi, 0x30(%r11)
je 0x17e69
leaq (%r10,%r9,8), %rbx
movslq %esi, %r14
movq %r11, (%rcx,%r14,8)
cmpq %rax, %rbx
jae 0x17dec
movq (%rbx), %r14
movl %edi, 0x30(%r14)
addq $0xba0, %rbx            # imm = 0xBA0
jmp 0x17dc5
movq (%rbx), %r14
movq 0x20(%r14), %r14
movl %edi, 0x30(%r14)
addq $0xba0, %rbx            # imm = 0xBA0
cmpq %rdx, %rbx
jb 0x17dda
movq 0x20(%r11), %r11
movq 0x10(%r11), %r11
movslq 0x34(%r11), %rbx
leaq (%r10,%rbx,8), %rbx
cmpq %rax, %rbx
jae 0x17e28
movq (%rbx), %r14
movl %edi, 0x30(%r14)
addq $0xba0, %rbx            # imm = 0xBA0
jmp 0x17e01
movq (%rbx), %r14
movq 0x20(%r14), %r14
movl %edi, 0x30(%r14)
addq $0xba0, %rbx            # imm = 0xBA0
cmpq %rdx, %rbx
jb 0x17e16
movq 0x20(%r11), %r11
movq 0x10(%r11), %r11
movslq 0x34(%r11), %r11
leaq (%r10,%r11,8), %r11
cmpq %rax, %r11
jae 0x17e62
movq (%r11), %rbx
movl %edi, 0x30(%rbx)
addq $0xba0, %r11            # imm = 0xBA0
jmp 0x17e3d
movq (%r11), %rbx
movq 0x20(%rbx), %rbx
movl %edi, 0x30(%rbx)
addq $0xba0, %r11            # imm = 0xBA0
cmpq %rdx, %r11
jb 0x17e51
incl %esi
incq %r9
jmp 0x17da3
xorl %eax, %eax
xorl %r10d, %r10d
movq 0x20(%rsp), %r15
cmpq %rdi, %rax
je 0x17eb0
cmpl $0x6, (%rsi,%rax,4)
jl 0x17eab
movq (%r8,%rax,8), %r9
movslq %r10d, %r11
leaq (%r15,%r11,8), %r11
movq %r9, %rbx
movq 0x20(%rbx), %r14
movq %r14, (%r11)
movq 0x18(%rbx), %rbx
addq $0x8, %r11
incl %r10d
cmpq %r9, %rbx
jne 0x17e94
incq %rax
jmp 0x17e7b
movq 0x38(%rsp), %rax
movl %r10d, (%rax)
movl 0xc3a2(%rip), %eax      # 0x24260
addl $-0x3, %eax
cmpl %eax, %edx
movq 0x88(%rsp), %r15
jle 0x17ee1
xorl %esi, %esi
movl %esi, (%r15)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
xorl %esi, %esi
cmpq %rdi, %rax
je 0x17ecf
movq (%r8,%rax,8), %rdx
movq %rdx, %r9
movq 0x20(%r9), %r10
movq 0x10(%r10), %r10
cmpq %r9, %r10
jbe 0x17f11
movq 0x20(%r10), %r10
cmpq %r9, 0x10(%r10)
jbe 0x17f11
movslq %esi, %r10
incl %esi
movq %r9, (%rcx,%r10,8)
movq 0x18(%r9), %r9
cmpq %rdx, %r9
jne 0x17ef1
incq %rax
jmp 0x17ee5