// File: /workspace/github_c_makefile_star2_O1/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)
movl $0x0, 0x4(%rsp)
testq %rsi, %rsi
movq %rcx, 0x28(%rsp)
movl %r8d, 0x1c(%rsp)
je 0x163fb
movl 0x4(%rsp), %r11d
testl %edx, %edx
jle 0x166ed
movl %edx, %eax
xorl %ecx, %ecx
leaq 0x11825(%rip), %rdx     # 0x27bf0
movq (%rsi,%rcx,8), %rdi
movslq (%rdi), %r8
cmpl $0x6, (%rdx,%r8,4)
jl 0x163ee
movslq 0x4(%rdi), %r8
cmpl $0x6, (%rdx,%r8,4)
jl 0x163ee
movslq %r11d, %r8
incl %r11d
movq %rdi, (%r9,%r8,8)
incq %rcx
cmpq %rcx, %rax
jne 0x163cb
jmp 0x166ed
movl 0xfc93(%rip), %eax      # 0x26094
leal 0x2(%rax), %edx
movl %edx, 0xfc8a(%rip)      # 0x26094
cmpl $0x752f, %eax           # imm = 0x752F
jl 0x1643a
movl $0x2, 0xfc79(%rip)      # 0x26094
movl $0x30, %eax
leaq 0x22e1f9(%rip), %rdx    # 0x244620
movl $0x0, (%rax,%rdx)
addq $0x40, %rax
cmpq $0x46630, %rax          # imm = 0x46630
jne 0x16427
testl %r8d, %r8d
jle 0x1645c
movl 0xfc4f(%rip), %eax      # 0x26094
movl %r8d, %esi
incq %rsi
movq -0x10(%rcx,%rsi,8), %rdx
movl %eax, 0x30(%rdx)
decq %rsi
cmpq $0x1, %rsi
jg 0x1644b
movslq 0x22e1ad(%rip), %rax    # 0x244610
movq %rax, 0x38(%rsp)
testq %rax, %rax
jle 0x166ea
movl 0xfc21(%rip), %eax      # 0x26098
xorl %ecx, %ecx
movl 0xfc15(%rip), %esi      # 0x26094
leaq 0x1176a(%rip), %rdx     # 0x27bf0
leaq 0x2747a3(%rip), %r12    # 0x28ac30
xorl %r11d, %r11d
movq %r9, 0x20(%rsp)
movl %esi, 0xc(%rsp)
cmpl $0x6, (%rdx,%rcx,4)
movq %rcx, 0x40(%rsp)
jl 0x166d5
leaq 0x11541(%rip), %rdi     # 0x279f0
movq (%rdi,%rcx,8), %r15
movq %r15, %r14
cmpq 0x28(%r14), %r14
jne 0x16658
movslq 0x4(%r14), %rcx
cmpl $0x6, (%rdx,%rcx,4)
jl 0x16658
cmpl %esi, 0x30(%r14)
je 0x16658
leal 0x1(%rax), %ecx
movl %ecx, 0xfbb7(%rip)      # 0x26098
cmpl $0x7530, %eax           # imm = 0x7530
movl %ecx, %eax
jl 0x16513
movl $0x1, 0xfba4(%rip)      # 0x26098
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), %rbx
movq 0x18(%rdx), %rdx
movq 0x18(%rdx), %r13
movslq 0x4(%r13), %rdx
movl %eax, (%r12,%rdx,4)
cmpq %rbx, %r13
je 0x16548
movq %r13, %rdx
movq 0x18(%rdx), %rdx
movslq 0x4(%rdx), %rsi
movl %eax, (%r12,%rsi,4)
cmpq %rbx, %rdx
jne 0x16537
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 0x165a4
movq 0x18(%rsi), %rsi
movslq 0x4(%rsi), %r8
cmpl %eax, (%r12,%r8,4)
je 0x165a4
movq 0x10(%rdi), %rdi
movq 0x10(%rdi), %rdi
cmpq %rdi, %rsi
je 0x16667
movq 0x18(%rsi), %rsi
movslq 0x4(%rsi), %r8
cmpl %eax, (%r12,%r8,4)
jne 0x1658d
movq 0x28(%rcx), %rcx
movl 0xc(%rsp), %esi
cmpl %esi, 0x30(%rcx)
jne 0x16647
movq 0x28(%rdx), %rcx
cmpl %esi, 0x30(%rcx)
jne 0x16647
leal 0x1(%rax), %ecx
movl %ecx, 0xfacd(%rip)      # 0x26098
cmpl $0x7530, %eax           # imm = 0x7530
movl %ecx, %eax
jl 0x1660b
movl $0x1, 0xfaba(%rip)      # 0x26098
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 0x1660b
movq 0x18(%r13), %r13
movslq 0x4(%r13), %rcx
movl %eax, (%r12,%rcx,4)
cmpq %rbx, %r13
jne 0x16607
movslq 0x4(%rbp), %rcx
cmpl %eax, (%r12,%rcx,4)
je 0x166cc
leaq 0x115c3(%rip), %rdx     # 0x27bf0
movq 0x10(%rsp), %rdi
cmpq %rdi, %rbp
je 0x1664e
movq 0x18(%rbp), %rbp
movslq 0x4(%rbp), %rcx
cmpl %eax, (%r12,%rcx,4)
jne 0x16632
jmp 0x16658
leaq 0x115a2(%rip), %rdx     # 0x27bf0
movslq %r11d, %r11
movq %r14, (%r9,%r11,8)
incl %r11d
movq 0x18(%r14), %r14
cmpq %r15, %r14
jne 0x164b6
jmp 0x166d5
movq %rbp, %rsi
cmpq 0x10(%rsp), %rbp
je 0x166c8
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 0x165a4
movq 0x18(%rdi), %rdi
movslq 0x4(%rdi), %r10
cmpl %eax, (%r12,%r10,4)
je 0x165a4
movq 0x10(%r8), %r8
movq 0x10(%r8), %r8
cmpq %r8, %rdi
je 0x166c1
movq 0x18(%rdi), %rdi
movslq 0x4(%rdi), %r10
cmpl %eax, (%r12,%r10,4)
jne 0x166a9
jmp 0x165a4
cmpq 0x10(%rsp), %rsi
jne 0x16671
movl 0xc(%rsp), %esi
leaq 0x1151d(%rip), %rdx     # 0x27bf0
jmp 0x16658
movq 0x40(%rsp), %rcx
incq %rcx
cmpq 0x38(%rsp), %rcx
jne 0x16499
jmp 0x166ed
xorl %r11d, %r11d
movq 0x80(%rsp), %rbx
movl %r11d, 0x4(%rsp)
cmpl $0x2, 0x8(%rsp)
movq 0x28(%rsp), %r14
jl 0x1671d
cmpl $0x2, %r11d
jl 0x1671d
leaq 0x4(%rsp), %rsi
movq %r9, %rdi
movl 0x8(%rsp), %edx
callq 0x17580
movq 0x98(%rsp), %r13
movl 0x4(%rsp), %eax
movl %eax, (%rbx)
xorl %ecx, %ecx
movl 0x1c(%rsp), %esi
cmpl $0x6, %esi
jl 0x16a15
testq %r14, %r14
je 0x16a15
movl 0x22dec7(%rip), %eax    # 0x244610
cmpl 0xfb21(%rip), %eax      # 0x26270
jge 0x16a15
movl 0xf939(%rip), %ecx      # 0x26094
leal 0x2(%rcx), %edx
movl %edx, 0xf930(%rip)      # 0x26094
cmpl $0x752f, %ecx           # imm = 0x752F
jl 0x16796
movl $0x2, 0xf91e(%rip)      # 0x26094
movl $0x30, %ecx
leaq 0x22de9e(%rip), %rdx    # 0x244620
movl $0x0, (%rcx,%rdx)
addq $0x40, %rcx
cmpq $0x46630, %rcx          # imm = 0x46630
jne 0x16782
movl 0xf8f8(%rip), %ecx      # 0x26094
movl %esi, %edx
incq %rdx
movq -0x10(%r14,%rdx,8), %rsi
movl %ecx, 0x30(%rsi)
movq 0x20(%rsi), %rsi
movl %ecx, 0x30(%rsi)
decq %rdx
cmpq $0x1, %rdx
jg 0x167a1
testl %eax, %eax
jle 0x168e5
xorl %r13d, %r13d
leaq 0x11425(%rip), %rbx     # 0x27bf0
xorl %ebp, %ebp
cmpl $0x6, (%rbx,%r13,4)
jl 0x168d0
leaq 0x11211(%rip), %rax     # 0x279f0
movq (%rax,%r13,8), %r14
jne 0x1686a
movq 0x18(%r14), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %r12
movl 0xf899(%rip), %eax      # 0x26094
cmpl %eax, 0x30(%r14)
jne 0x1685f
movq 0x18(%r14), %rcx
movq 0x18(%rcx), %rdx
movq 0x18(%rdx), %r15
cmpl %eax, 0x30(%r15)
jne 0x1685f
cmpl %eax, 0x30(%rcx)
je 0x16821
movq 0x10(%r15), %rcx
cmpl %eax, 0x30(%rcx)
jne 0x16833
movq 0x18(%r15), %rcx
cmpl %eax, 0x30(%rcx)
je 0x1685f
movq 0x10(%r14), %rcx
cmpl %eax, 0x30(%rcx)
je 0x1685f
movq %r14, %rdi
movq %r15, %rsi
callq 0x17675
testl %eax, %eax
je 0x1685f
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 0x167f5
jmp 0x168d0
movq %r14, %r15
movl 0xf821(%rip), %eax      # 0x26094
cmpl %eax, 0x30(%r15)
jne 0x168c7
movq 0x18(%r15), %rcx
movq 0x18(%rcx), %rdx
movq 0x18(%rdx), %r12
cmpl %eax, 0x30(%r12)
jne 0x168c7
cmpl %eax, 0x30(%rcx)
je 0x168c7
movq 0x10(%r12), %rcx
cmpl %eax, 0x30(%rcx)
je 0x168c7
movq %r15, %rdi
movq %r12, %rsi
callq 0x17675
testl %eax, %eax
je 0x168c7
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 0x1686d
incq %r13
movslq 0x22dd36(%rip), %rax    # 0x244610
cmpq %rax, %r13
jl 0x167cd
jmp 0x168e7
xorl %ebp, %ebp
movq 0x98(%rsp), %r13
movl %ebp, (%r13)
cmpl $0x1, 0x8(%rsp)
sete %al
cmpl $0x2, %ebp
setl %cl
orb %al, %cl
jne 0x16a19
leaq 0x113e0(%rip), %rax     # 0x27cf0
movslq 0x22dcfd(%rip), %rcx    # 0x244614
testq %rcx, %rcx
jle 0x16933
xorl %edx, %edx
movq %rax, %rsi
movq (%rsi), %rdi
movl %edx, 0x34(%rdi)
incq %rdx
addq $0x8, %rsi
cmpq %rdx, %rcx
jne 0x16921
movl $0x0, 0x4(%rsp)
movslq (%r13), %rdx
testq %rdx, %rdx
movq 0x90(%rsp), %rbp
jle 0x16a0f
movslq 0x8(%rsp), %rcx
imulq $0xba0, %rcx, %rsi      # imm = 0xBA0
addq %rax, %rsi
xorl %edi, %edi
movl $0xba0, %r8d            # imm = 0xBA0
xorl %ecx, %ecx
movq 0x88(%rsp), %r9
movq (%r9,%rdi,8), %r11
movq (%rbp,%rdi,8), %r9
cmpq %r9, %r11
movq %r11, %r10
cmovbq %r9, %r10
cmovbq %r11, %r9
movslq 0x34(%r9), %r11
leaq (%rax,%r11,8), %r11
addq $0xba0, %r11            # imm = 0xBA0
cmpq %rsi, %r11
setb %bl
jae 0x169eb
movslq 0x34(%r10), %r14
leaq (%rax,%r14,8), %r14
addq $0xba0, %r14            # imm = 0xBA0
movq (%r11), %r12
movq (%r14), %r15
cmpq %r15, %r12
jae 0x169c7
cmpq %r9, %r12
jb 0x169e6
jne 0x169d6
cmpq %r10, %r15
jae 0x169d6
jmp 0x169e6
cmpq %r9, %r15
jb 0x169e6
cmpq %r10, %r12
jae 0x169d6
cmpq %r9, %r15
je 0x169e6
addq %r8, %r14
addq %r8, %r11
cmpq %rsi, %r11
setb %bl
jb 0x169ae
jmp 0x169eb
testb $0x1, %bl
jne 0x16a01
movslq %ecx, %rcx
movq 0x88(%rsp), %r11
movq %r9, (%r11,%rcx,8)
movq %r10, (%rbp,%rcx,8)
incl %ecx
incq %rdi
cmpq %rdx, %rdi
jne 0x16969
jmp 0x16a11
xorl %ecx, %ecx
movl %ecx, 0x4(%rsp)
movl %ecx, (%r13)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq