// File: /workspace/github_c_makefile_star2_O3/mishun[P]plantri/plantri.c
// Function: find_extensions_min5c4
static void
find_extensions_min5c4(int nbtot, int nbop, EDGE **bang, int nbang,
                       EDGE **on4, int non4, EDGE **ext5_sw, int *next5_sw,
                       EDGE **ext5_51, EDGE **ext5_52, int *next5_5)

/* List the inequivalent extensions for the 4-connected phase on mindeg 5.
   If bang!=NULL, it is a list of all bangles perhaps with some of 
   insufficient degree.  If on4!=NULL, on4[0..non4-1] is a list of all edges
   on nf-4-cycles (min form).  If on4==NULL, there are no nf-4-cycles and
   non4=0.  Exactly one of bang and on4 is NULL.

   As a result, ext5_sw[0..*next5_sw-1] is set to all feasible switching
   operations, and (ext5_51,ext5_52)[0..*next5_5-1] is set to all feasible
   5-expansions as pairs of edges.  Equivalent extensions are removed.
*/

{
    int i,k;
    EDGE *e1,*e2,**nb0,**nblim,**nb1,**nb2;

    k = 0;
    if (bang)
    {
        for (i = 0; i < nbang; ++i) 
	    if (degree[bang[i]->start] >= 6 && degree[bang[i]->end] >= 6)
		ext5_sw[k++] = bang[i];
    }
    else
	make_4bangle_list(ext5_sw,&k,on4,non4);

    if (nbtot > 1 && k > 1) prune_edgelist(ext5_sw,&k,nbtot);

    *next5_sw = k;

    if (nv < maxnv && on4 && non4 >= 6)
    {
	make_5exp_list(ext5_51,ext5_52,next5_5,on4,non4);

	if (nbtot == 1 || *next5_5 <= 1) return;

        nb0 = (EDGE**)numbering[0];
        nblim = (EDGE**)numbering[nbtot];

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

	k = 0;
	for (i = 0; i < *next5_5; ++i)
	{
	    if (ext5_51[i] < ext5_52[i]) { e1 = ext5_51[i]; e2 = ext5_52[i]; }
	    else                         { e1 = ext5_52[i]; e2 = ext5_51[i]; }

	    nb1 = &nb0[e1->index + MAXE];
            nb2 = &nb0[e2->index + MAXE];
            for ( ; nb1 < nblim; nb1 += MAXE, nb2 += MAXE)
                if (*nb1 < *nb2)
                {
                    if (*nb1 < e1 || (*nb1 == e1 && *nb2 < e2)) break;      
                }
                else
                {
                    if (*nb2 < e1 || (*nb2 == e1 && *nb1 < e2)) break;      
                }

            if (nb1 >= nblim)
            {
                ext5_51[k] = e1;
                ext5_52[k] = e2;
                ++k;
            }
	}
	*next5_5 = k;
    }
    else
        *next5_5 = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edi, 0x8(%rsp)
testq %rsi, %rsi
movq %rcx, 0x28(%rsp)
movl %r8d, 0x18(%rsp)
je 0x16529
testl %edx, %edx
jle 0x16811
movl %edx, %eax
xorl %ecx, %ecx
leaq 0x116fa(%rip), %rdx     # 0x27bf0
xorl %r11d, %r11d
movq (%rsi,%rcx,8), %rdi
movslq (%rdi), %r8
cmpl $0x6, (%rdx,%r8,4)
jl 0x1651c
movslq 0x4(%rdi), %r8
cmpl $0x6, (%rdx,%r8,4)
jl 0x1651c
movslq %r11d, %r8
incl %r11d
movq %rdi, (%r9,%r8,8)
incq %rcx
cmpq %rcx, %rax
jne 0x164f9
jmp 0x16814
movl 0xfb5d(%rip), %eax      # 0x2608c
leal 0x2(%rax), %esi
movl %esi, 0xfb54(%rip)      # 0x2608c
cmpl $0x752f, %eax           # imm = 0x752F
jl 0x1656d
movl $0x2, 0xfb43(%rip)      # 0x2608c
movl $0x30, %eax
leaq 0x22e0cb(%rip), %rdx    # 0x244620
movl $0x0, (%rax,%rdx)
addq $0x40, %rax
cmpq $0x46630, %rax          # imm = 0x46630
jne 0x16555
movl $0x2, %esi
testl %r8d, %r8d
jle 0x16589
movl %r8d, %eax
incq %rax
movq -0x10(%rcx,%rax,8), %rdx
movl %esi, 0x30(%rdx)
decq %rax
cmpq $0x1, %rax
ja 0x16578
movslq 0x22e080(%rip), %rax    # 0x244610
movq %rax, 0x38(%rsp)
testq %rax, %rax
jle 0x16811
xorl %ecx, %ecx
movl 0xfaea(%rip), %eax      # 0x26090
leaq 0x11643(%rip), %rdx     # 0x27bf0
leaq 0x27467c(%rip), %r12    # 0x28ac30
xorl %r11d, %r11d
movq %r9, 0x20(%rsp)
movl %esi, 0xc(%rsp)
cmpl $0x6, (%rdx,%rcx,4)
movq %rcx, 0x40(%rsp)
jl 0x167fc
leaq 0x1141a(%rip), %rdi     # 0x279f0
movq (%rdi,%rcx,8), %r15
movq %r15, %r14
cmpq 0x28(%r14), %r14
jne 0x1677f
movslq 0x4(%r14), %rcx
cmpl $0x6, (%rdx,%rcx,4)
jl 0x1677f
cmpl %esi, 0x30(%r14)
je 0x1677f
leal 0x1(%rax), %ecx
movl %ecx, 0xfa88(%rip)      # 0x26090
cmpl $0x7530, %eax           # imm = 0x7530
movl %ecx, %eax
jl 0x1663a
movl $0x1, 0xfa75(%rip)      # 0x26090
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
xorl %esi, %esi
movq %r11, %rbx
callq 0x1030
movq %rbx, %r11
movq 0x20(%rsp), %r9
movl $0x1, %eax
movq 0x18(%r14), %rcx
movq 0x20(%rcx), %rdx
movq 0x10(%rdx), %r13
movq 0x18(%rdx), %rdx
movq 0x18(%rdx), %rbx
movslq 0x4(%rbx), %rdx
movl %eax, (%r12,%rdx,4)
cmpq %r13, %rbx
je 0x1666f
movq %rbx, %rdx
movq 0x18(%rdx), %rdx
movslq 0x4(%rdx), %rsi
movl %eax, (%r12,%rsi,4)
cmpq %r13, %rdx
jne 0x1665e
movq 0x10(%r14), %rdx
movq 0x20(%rdx), %rsi
movq 0x10(%rsi), %rdi
movq 0x18(%rsi), %rbp
movq 0x10(%rdi), %rsi
movq %rsi, 0x10(%rsp)
movq 0x20(%rbp), %rdi
movq 0x18(%rdi), %rsi
movq 0x18(%rsi), %rsi
movslq 0x4(%rsi), %r8
cmpl %eax, (%r12,%r8,4)
je 0x166cb
movq 0x18(%rsi), %rsi
movslq 0x4(%rsi), %r8
cmpl %eax, (%r12,%r8,4)
je 0x166cb
movq 0x10(%rdi), %rdi
movq 0x10(%rdi), %rdi
cmpq %rdi, %rsi
je 0x1678e
movq 0x18(%rsi), %rsi
movslq 0x4(%rsi), %r8
cmpl %eax, (%r12,%r8,4)
jne 0x166b4
movq 0x28(%rcx), %rcx
movl 0xc(%rsp), %esi
cmpl %esi, 0x30(%rcx)
jne 0x1676e
movq 0x28(%rdx), %rcx
cmpl %esi, 0x30(%rcx)
jne 0x1676e
leal 0x1(%rax), %ecx
movl %ecx, 0xf99e(%rip)      # 0x26090
cmpl $0x7530, %eax           # imm = 0x7530
movl %ecx, %eax
jl 0x16732
movl $0x1, 0xf98b(%rip)      # 0x26090
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
xorl %esi, %esi
movq %r11, 0x30(%rsp)
callq 0x1030
movl 0xc(%rsp), %esi
movq 0x30(%rsp), %r11
movq 0x20(%rsp), %r9
movl $0x1, %eax
jmp 0x16732
movq 0x18(%rbx), %rbx
movslq 0x4(%rbx), %rcx
movl %eax, (%r12,%rcx,4)
cmpq %r13, %rbx
jne 0x1672e
movslq 0x4(%rbp), %rcx
cmpl %eax, (%r12,%rcx,4)
je 0x167f3
leaq 0x1149c(%rip), %rdx     # 0x27bf0
movq 0x10(%rsp), %rdi
cmpq %rdi, %rbp
je 0x16775
movq 0x18(%rbp), %rbp
movslq 0x4(%rbp), %rcx
cmpl %eax, (%r12,%rcx,4)
jne 0x16759
jmp 0x1677f
leaq 0x1147b(%rip), %rdx     # 0x27bf0
movslq %r11d, %r11
movq %r14, (%r9,%r11,8)
incl %r11d
movq 0x18(%r14), %r14
cmpq %r15, %r14
jne 0x165dd
jmp 0x167fc
movq %rbp, %rsi
cmpq 0x10(%rsp), %rbp
je 0x167ef
movq 0x18(%rsi), %rsi
movq 0x20(%rsi), %r8
movq 0x18(%r8), %rdi
movq 0x18(%rdi), %rdi
movslq 0x4(%rdi), %r10
cmpl %eax, (%r12,%r10,4)
je 0x166cb
movq 0x18(%rdi), %rdi
movslq 0x4(%rdi), %r10
cmpl %eax, (%r12,%r10,4)
je 0x166cb
movq 0x10(%r8), %r8
movq 0x10(%r8), %r8
cmpq %r8, %rdi
je 0x167e8
movq 0x18(%rdi), %rdi
movslq 0x4(%rdi), %r10
cmpl %eax, (%r12,%r10,4)
jne 0x167d0
jmp 0x166cb
cmpq 0x10(%rsp), %rsi
jne 0x16798
movl 0xc(%rsp), %esi
leaq 0x113f6(%rip), %rdx     # 0x27bf0
jmp 0x1677f
movq 0x40(%rsp), %rcx
incq %rcx
cmpq 0x38(%rsp), %rcx
jne 0x165c0
jmp 0x16814
xorl %r11d, %r11d
movq 0x80(%rsp), %rbx
movl %r11d, 0x1c(%rsp)
cmpl $0x2, 0x8(%rsp)
setge %al
cmpl $0x2, %r11d
setge %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1684f
leaq 0x1c(%rsp), %r12
movq %r9, %rdi
movq %r12, %rsi
movl 0x8(%rsp), %edx
callq 0x1766f
movl (%r12), %r11d
movq 0x98(%rsp), %r12
movl %r11d, (%rbx)
xorl %eax, %eax
movl 0x18(%rsp), %edi
cmpl $0x6, %edi
movq 0x28(%rsp), %r8
jl 0x16b31
testq %r8, %r8
je 0x16b31
movl 0x22dd93(%rip), %edx    # 0x244610
cmpl 0xf9ed(%rip), %edx      # 0x26270
jge 0x16b31
movl 0xf7fd(%rip), %esi      # 0x2608c
leal 0x2(%rsi), %ecx
movl %ecx, 0xf7f4(%rip)      # 0x2608c
cmpl $0x752f, %esi           # imm = 0x752F
jl 0x168cf
movl $0x2, 0xf7e2(%rip)      # 0x2608c
movl $0x30, %ecx
leaq 0x22dd6a(%rip), %rsi    # 0x244620
movl $0x0, (%rcx,%rsi)
addq $0x40, %rcx
cmpq $0x46630, %rcx          # imm = 0x46630
jne 0x168b6
movl $0x2, %ecx
movl %edi, %esi
incq %rsi
movq -0x10(%r8,%rsi,8), %rdi
movl %ecx, 0x30(%rdi)
movq 0x20(%rdi), %rdi
movl %ecx, 0x30(%rdi)
decq %rsi
cmpq $0x1, %rsi
ja 0x168d4
testl %edx, %edx
jle 0x16b31
xorl %r13d, %r13d
leaq 0x112f2(%rip), %rbx     # 0x27bf0
xorl %ebp, %ebp
cmpl $0x6, (%rbx,%r13,4)
jl 0x16a03
leaq 0x110de(%rip), %rax     # 0x279f0
movq (%rax,%r13,8), %r14
jne 0x1699d
movq 0x18(%r14), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %r12
cmpl %ecx, 0x30(%r14)
jne 0x16992
movq 0x18(%r14), %rax
movq 0x18(%rax), %rdx
movq 0x18(%rdx), %r15
cmpl %ecx, 0x30(%r15)
jne 0x16992
cmpl %ecx, 0x30(%rax)
je 0x1694e
movq 0x10(%r15), %rax
cmpl %ecx, 0x30(%rax)
jne 0x16960
movq 0x18(%r15), %rax
cmpl %ecx, 0x30(%rax)
je 0x16992
movq 0x10(%r14), %rax
cmpl %ecx, 0x30(%rax)
je 0x16992
movq %r14, %rdi
movq %r15, %rsi
callq 0x17763
movl 0xf71b(%rip), %ecx      # 0x2608c
testl %eax, %eax
je 0x16992
movslq %ebp, %rbp
movq 0x88(%rsp), %rax
movq %r14, (%rax,%rbp,8)
movq 0x90(%rsp), %rax
movq %r15, (%rax,%rbp,8)
incl %ebp
movq 0x18(%r14), %r14
cmpq %r12, %r14
jne 0x16928
jmp 0x16a03
movq %r14, %r15
cmpl %ecx, 0x30(%r15)
jne 0x169fa
movq 0x18(%r15), %rax
movq 0x18(%rax), %rdx
movq 0x18(%rdx), %r12
cmpl %ecx, 0x30(%r12)
jne 0x169fa
cmpl %ecx, 0x30(%rax)
je 0x169fa
movq 0x10(%r12), %rax
cmpl %ecx, 0x30(%rax)
je 0x169fa
movq %r15, %rdi
movq %r12, %rsi
callq 0x17763
movl 0xf6b3(%rip), %ecx      # 0x2608c
testl %eax, %eax
je 0x169fa
movslq %ebp, %rbp
movq 0x88(%rsp), %rax
movq %r15, (%rax,%rbp,8)
movq 0x90(%rsp), %rax
movq %r12, (%rax,%rbp,8)
incl %ebp
movq 0x18(%r15), %r15
cmpq %r14, %r15
jne 0x169a0
incq %r13
movslq 0x22dc03(%rip), %rax    # 0x244610
cmpq %rax, %r13
jl 0x16900
movq 0x98(%rsp), %r12
movl %ebp, (%r12)
cmpl $0x1, 0x8(%rsp)
sete %al
cmpl $0x2, %ebp
setl %cl
orb %al, %cl
jne 0x16b35
leaq 0x112b1(%rip), %rcx     # 0x27cf0
movslq 0x22dbce(%rip), %rax    # 0x244614
testq %rax, %rax
jle 0x16a6e
xorl %edx, %edx
movq %rcx, %rsi
movq (%rsi), %rdi
movl %edx, 0x34(%rdi)
incq %rdx
addq $0x8, %rsi
cmpq %rdx, %rax
jne 0x16a50
movl (%r12), %ebp
testl %ebp, %ebp
jle 0x16b2f
movslq 0x8(%rsp), %rax
imulq $0xba0, %rax, %rdx      # imm = 0xBA0
addq %rcx, %rdx
movl %ebp, %esi
xorl %edi, %edi
movl $0xba0, %r8d            # imm = 0xBA0
xorl %eax, %eax
movq 0x88(%rsp), %r9
movq (%r9,%rdi,8), %r11
movq 0x90(%rsp), %r9
movq (%r9,%rdi,8), %r9
cmpq %r9, %r11
movq %r11, %r10
cmovbq %r9, %r10
cmovbq %r11, %r9
movslq 0x34(%r9), %r11
leaq (%rcx,%r11,8), %r11
addq $0xba0, %r11            # imm = 0xBA0
cmpq %rdx, %r11
jae 0x16b05
movslq 0x34(%r10), %rbx
leaq (%rcx,%rbx,8), %rbx
addq $0xba0, %rbx            # imm = 0xBA0
movq (%r11), %r15
movq (%rbx), %r14
cmpq %r14, %r15
jae 0x16aeb
cmpq %r9, %r15
jb 0x16b21
jne 0x16afa
cmpq %r10, %r14
jae 0x16afa
jmp 0x16b21
cmpq %r9, %r14
jb 0x16b21
cmpq %r10, %r15
jae 0x16afa
cmpq %r9, %r14
je 0x16b21
addq %r8, %rbx
addq %r8, %r11
cmpq %rdx, %r11
jb 0x16ad2
cltq
movq 0x88(%rsp), %r11
movq %r9, (%r11,%rax,8)
movq 0x90(%rsp), %r9
movq %r10, (%r9,%rax,8)
incl %eax
incq %rdi
cmpq %rsi, %rdi
jne 0x16a89
jmp 0x16b31
xorl %eax, %eax
movl %eax, (%r12)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq