// File: /workspace/github_c_makefile_star2_O2/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
movq %r9, 0x10(%rsp)
movl %edi, %ebp
movl %r8d, %r11d
testq %rsi, %rsi
je 0x14f6a
xorl %r10d, %r10d
testl %edx, %edx
cmovlel %r10d, %edx
leaq 0x10cad(%rip), %rdi     # 0x25be0
xorl %eax, %eax
movq 0x10(%rsp), %r14
cmpq %r10, %rdx
je 0x15238
movq (%rsi,%r10,8), %rbx
movslq (%rbx), %r9
cmpl $0x6, (%rdi,%r9,4)
jl 0x14f65
movslq 0x4(%rbx), %r9
cmpl $0x6, (%rdi,%r9,4)
jl 0x14f65
movslq %eax, %r9
incl %eax
movq %rbx, (%r14,%r9,8)
incq %r10
jmp 0x14f3a
movl 0xf10c(%rip), %eax      # 0x2407c
leal 0x2(%rax), %edi
movl %edi, 0xf103(%rip)      # 0x2407c
cmpl $0x752f, %eax           # imm = 0x752F
jl 0x14fa9
movl $0x2, 0xf0f2(%rip)      # 0x2407c
pushq $0x30
popq %rax
pushq $0x2
popq %rdi
leaq 0x22d679(%rip), %rdx    # 0x242610
cmpq $0x46630, %rax          # imm = 0x46630
je 0x14fa9
andl $0x0, (%rax,%rdx)
addq $0x40, %rax
jmp 0x14f97
movq %r11, %rax
testl %eax, %eax
jle 0x14fbd
movq -0x8(%rcx,%rax,8), %rdx
decq %rax
movl %edi, 0x30(%rdx)
jmp 0x14fac
movl %r8d, 0x20(%rsp)
movq %r11, 0x28(%rsp)
movq %rcx, 0x30(%rsp)
movl 0x22d62e(%rip), %eax    # 0x242600
movl 0xf0a7(%rip), %r15d     # 0x24080
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movq %rax, 0x38(%rsp)
leaq 0x10bf4(%rip), %rsi     # 0x25be0
leaq 0x273c2d(%rip), %r11    # 0x288c20
movq $0x0, 0x18(%rsp)
movl %ebp, 0xc(%rsp)
cmpq 0x38(%rsp), %rcx
je 0x15224
cmpl $0x6, (%rsi,%rcx,4)
movq %rcx, 0x40(%rsp)
jl 0x15213
leaq 0x109bf(%rip), %rax     # 0x259e0
movq (%rax,%rcx,8), %rbx
movq %rbx, %r13
cmpq 0x28(%r13), %r13
jne 0x151ba
movslq 0x4(%r13), %rdx
cmpl $0x6, (%rsi,%rdx,4)
jl 0x151ba
cmpl %edi, 0x30(%r13)
je 0x151ba
leal 0x1(%r15), %edx
movl %edx, 0xf02c(%rip)      # 0x24080
cmpl $0x7530, %r15d          # imm = 0x7530
movl %edx, %r15d
jl 0x15086
movl $0x1, 0xf016(%rip)      # 0x24080
xorl %edx, %edx
cmpq $0x100, %rdx            # imm = 0x100
je 0x15080
andl $0x0, (%rdx,%r11)
addq $0x4, %rdx
jmp 0x1506c
pushq $0x1
popq %rax
movl %eax, %r15d
movl %edi, %eax
movq 0x18(%r13), %r14
movq 0x20(%r14), %rdx
movq 0x10(%rdx), %rbp
movq 0x18(%rdx), %r10
movq %r10, %rdx
movq 0x18(%rdx), %rdx
movslq 0x4(%rdx), %rsi
movl %r15d, (%r11,%rsi,4)
cmpq %rbp, %rdx
jne 0x1509b
movq 0x10(%r13), %r12
movq 0x20(%r12), %rdx
movq 0x10(%rdx), %rsi
movq 0x18(%rdx), %r8
movq 0x10(%rsi), %rdx
movq 0x20(%r8), %r9
movq 0x18(%r9), %rsi
movq 0x18(%rsi), %rsi
movslq 0x4(%rsi), %rdi
cmpl %r15d, (%r11,%rdi,4)
je 0x15151
movq 0x18(%rsi), %rdi
movslq 0x4(%rdi), %rsi
cmpl %r15d, (%r11,%rsi,4)
je 0x15151
movq 0x10(%r9), %rsi
movq 0x10(%rsi), %rsi
cmpq %rsi, %rdi
je 0x15102
movq 0x18(%rdi), %rdi
movslq 0x4(%rdi), %r9
cmpl %r15d, (%r11,%r9,4)
jne 0x150ed
jmp 0x15151
movq %r8, %rdi
cmpq %rdx, %rdi
je 0x1520f
movq 0x18(%rdi), %rdi
movq 0x20(%rdi), %rsi
movq 0x18(%rsi), %r9
movq 0x18(%r9), %r9
movslq 0x4(%r9), %rcx
cmpl %r15d, (%r11,%rcx,4)
je 0x15151
movq 0x18(%r9), %r9
movslq 0x4(%r9), %rcx
cmpl %r15d, (%r11,%rcx,4)
je 0x15151
movq 0x10(%rsi), %rcx
movq 0x10(%rcx), %rsi
cmpq %rsi, %r9
je 0x15105
movq 0x18(%r9), %r9
movslq 0x4(%r9), %rcx
cmpl %r15d, (%r11,%rcx,4)
jne 0x1513e
movq 0x28(%r14), %rcx
movl %eax, %edi
cmpl %eax, 0x30(%rcx)
jne 0x1519c
movq 0x28(%r12), %rcx
cmpl %edi, 0x30(%rcx)
jne 0x1519c
leal 0x1(%r15), %ecx
movl %ecx, 0xef10(%rip)      # 0x24080
cmpl $0x7530, %r15d          # imm = 0x7530
movl %ecx, %r15d
jl 0x151cf
movl $0x1, 0xeefa(%rip)      # 0x24080
xorl %esi, %esi
cmpq $0x100, %rsi            # imm = 0x100
je 0x151c9
andl $0x0, (%rsi,%r11)
addq $0x4, %rsi
jmp 0x15188
leaq 0x10a3d(%rip), %rsi     # 0x25be0
movq 0x18(%rsp), %rax
cltq
movq 0x10(%rsp), %rcx
movq %r13, (%rcx,%rax,8)
incl %eax
movq %rax, 0x18(%rsp)
movq 0x18(%r13), %r13
cmpq %rbx, %r13
jne 0x15028
jmp 0x15213
pushq $0x1
popq %rax
movl %eax, %r15d
movq 0x18(%r10), %r10
movslq 0x4(%r10), %rcx
movl %r15d, (%r11,%rcx,4)
cmpq %rbp, %r10
jne 0x151cf
movslq 0x4(%r8), %rcx
cmpl %r15d, (%r11,%rcx,4)
jne 0x151f3
leaq 0x109ef(%rip), %rsi     # 0x25be0
jmp 0x151ba
leaq 0x109e6(%rip), %rsi     # 0x25be0
cmpq %rdx, %r8
je 0x151a3
movq 0x18(%r8), %r8
movslq 0x4(%r8), %rcx
cmpl %r15d, (%r11,%rcx,4)
jne 0x151fa
jmp 0x151ba
movl %eax, %edi
jmp 0x151ea
movq 0x40(%rsp), %rcx
incq %rcx
movl 0xc(%rsp), %ebp
jmp 0x15000
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %r11
movl 0x20(%rsp), %r8d
movq 0x18(%rsp), %rax
movq 0x80(%rsp), %rbx
movl %eax, 0x24(%rsp)
cmpl $0x2, %ebp
jl 0x15277
cmpl $0x2, %eax
jl 0x15277
movl %r8d, %r13d
leaq 0x24(%rsp), %r15
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %rcx, %r14
movq %r11, %r12
callq 0x16054
movq %r12, %r11
movq %r14, %rcx
movl (%r15), %eax
movl %r13d, %r8d
movq 0x98(%rsp), %r12
movl %eax, (%rbx)
xorl %eax, %eax
cmpl $0x6, %r8d
jl 0x1554e
testq %rcx, %rcx
je 0x1554e
movl 0x22d364(%rip), %edx    # 0x242600
cmpl 0xefbe(%rip), %edx      # 0x24260
jge 0x1554e
movl 0xedce(%rip), %eax      # 0x2407c
leal 0x2(%rax), %edi
movl %edi, 0xedc5(%rip)      # 0x2407c
cmpl $0x752f, %eax           # imm = 0x752F
jl 0x152f9
pushq $0x30
popq %rax
pushq $0x2
popq %rdi
movl $0x2, 0xedae(%rip)      # 0x2407c
leaq 0x22d33b(%rip), %rsi    # 0x242610
cmpq $0x46630, %rax          # imm = 0x46630
je 0x152f9
andl $0x0, (%rax,%rsi)
addq $0x40, %rax
jmp 0x152d5
movq -0x8(%rcx,%r11,8), %rax
decq %r11
movl %edi, 0x30(%rax)
movq 0x20(%rax), %rax
movl %edi, 0x30(%rax)
testl %r11d, %r11d
jg 0x152e7
movl %ebp, 0xc(%rsp)
xorl %ebx, %ebx
leaq 0x108d5(%rip), %rbp     # 0x25be0
xorl %r13d, %r13d
movslq %edx, %rax
cmpq %rax, %rbx
jge 0x1542d
cmpl $0x6, (%rbp,%rbx,4)
jl 0x1541f
leaq 0x106b4(%rip), %rax     # 0x259e0
movq (%rax,%rbx,8), %r14
jne 0x153b8
movq 0x18(%r14), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %r12
cmpl %edi, 0x30(%r14)
jne 0x153ad
movq 0x18(%r14), %rax
movq 0x18(%rax), %rdx
movq 0x18(%rdx), %r15
cmpl %edi, 0x30(%r15)
jne 0x153ad
cmpl %edi, 0x30(%rax)
je 0x15368
movq 0x10(%r15), %rax
cmpl %edi, 0x30(%rax)
jne 0x1537a
movq 0x18(%r15), %rax
cmpl %edi, 0x30(%rax)
je 0x153ad
movq 0x10(%r14), %rax
cmpl %edi, 0x30(%rax)
je 0x153ad
movq %r14, %rdi
movq %r15, %rsi
callq 0x1613a
movl 0xecf1(%rip), %edi      # 0x2407c
testl %eax, %eax
je 0x153ad
movslq %r13d, %r13
movq 0x88(%rsp), %rax
movq %r14, (%rax,%r13,8)
movq 0x90(%rsp), %rax
movq %r15, (%rax,%r13,8)
incl %r13d
movq 0x18(%r14), %r14
cmpq %r12, %r14
jne 0x15342
jmp 0x1541f
movq %r14, %r15
cmpl %edi, 0x30(%r15)
jne 0x15416
movq 0x18(%r15), %rax
movq 0x18(%rax), %rdx
movq 0x18(%rdx), %r12
cmpl %edi, 0x30(%r12)
jne 0x15416
cmpl %edi, 0x30(%rax)
je 0x15416
movq 0x10(%r12), %rax
cmpl %edi, 0x30(%rax)
je 0x15416
movq %r15, %rdi
movq %r12, %rsi
callq 0x1613a
movl 0xec88(%rip), %edi      # 0x2407c
testl %eax, %eax
je 0x15416
movslq %r13d, %r13
movq 0x88(%rsp), %rax
movq %r15, (%rax,%r13,8)
movq 0x90(%rsp), %rax
movq %r12, (%rax,%r13,8)
incl %r13d
movq 0x18(%r15), %r15
cmpq %r14, %r15
jne 0x153bb
incq %rbx
movl 0x22d1d8(%rip), %edx    # 0x242600
jmp 0x1530e
movq 0x98(%rsp), %rax
movl %r13d, (%rax)
movl 0xc(%rsp), %edx
cmpl $0x1, %edx
sete %al
cmpl $0x2, %r13d
setl %cl
orb %al, %cl
jne 0x15552
movslq %edx, %rax
movl 0x22d1aa(%rip), %ecx    # 0x242604
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
leaq 0x10878(%rip), %rsi     # 0x25ce0
movq 0x98(%rsp), %r12
cmpq %rdx, %rcx
je 0x15484
movq (%rsi), %rdi
movl %edx, 0x34(%rdi)
incq %rdx
addq $0x8, %rsi
jmp 0x15470
imulq $0xba0, %rax, %rcx      # imm = 0xBA0
leaq 0x1084e(%rip), %rdx     # 0x25ce0
addq %rdx, %rcx
movl (%r12), %esi
xorl %edi, %edi
testl %esi, %esi
cmovlel %edi, %esi
movl $0xba0, %r8d            # imm = 0xBA0
xorl %eax, %eax
cmpq %rsi, %rdi
je 0x1554e
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
movslq 0x34(%r10), %rbx
leaq (%rdx,%r11,8), %r11
addq $0xba0, %r11            # imm = 0xBA0
leaq (%rdx,%rbx,8), %rbx
addq $0xba0, %rbx            # imm = 0xBA0
cmpq %rcx, %r11
jae 0x1552a
movq (%r11), %r15
movq (%rbx), %r14
cmpq %r14, %r15
jae 0x15513
cmpq %r9, %r15
jb 0x15546
jne 0x15522
cmpq %r10, %r14
jae 0x15522
jmp 0x15546
cmpq %r9, %r14
jb 0x15546
cmpq %r10, %r15
jae 0x15522
cmpq %r9, %r14
je 0x15546
addq %r8, %r11
addq %r8, %rbx
jmp 0x154f5
cltq
movq 0x88(%rsp), %r11
movq %r9, (%r11,%rax,8)
movq 0x90(%rsp), %r9
movq %r10, (%r9,%rax,8)
incl %eax
incq %rdi
jmp 0x154a8
movl %eax, (%r12)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq