// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movl $0x0, -0x2c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x239c8
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x239c6
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq (%rax), %rcx
leaq 0x1a28c(%rip), %rax     # 0x3dc00
cmpl $0x6, (%rax,%rcx,4)
jl 0x239b9
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x4(%rax), %rcx
leaq 0x1a26f(%rip), %rax     # 0x3dc00
cmpl $0x6, (%rax,%rcx,4)
jl 0x239b9
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x239bb
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x23956
jmp 0x239dc
movq 0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
leaq -0x2c(%rbp), %rsi
callq 0x24e30
cmpl $0x1, -0x4(%rbp)
jle 0x239f8
cmpl $0x1, -0x2c(%rbp)
jle 0x239f8
movq 0x10(%rbp), %rdi
movl -0x4(%rbp), %edx
leaq -0x2c(%rbp), %rsi
callq 0x24fb0
movl -0x2c(%rbp), %ecx
movq 0x18(%rbp), %rax
movl %ecx, (%rax)
movl 0x236c19(%rip), %eax    # 0x25a620
cmpl 0x18873(%rip), %eax     # 0x3c280
jge 0x23c44
cmpq $0x0, -0x20(%rbp)
je 0x23c44
cmpl $0x6, -0x24(%rbp)
jl 0x23c44
movq 0x20(%rbp), %rdi
movq 0x28(%rbp), %rsi
movq 0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
callq 0x25140
cmpl $0x1, -0x4(%rbp)
je 0x23a50
movq 0x30(%rbp), %rax
cmpl $0x1, (%rax)
jg 0x23a55
jmp 0x23c4e
leaq 0x1a2a4(%rip), %rax     # 0x3dd00
movq %rax, -0x48(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x1a295(%rip), %rax     # 0x3dd00
imulq $0xba0, %rcx, %rcx      # imm = 0xBA0
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl 0x236b9b(%rip), %eax    # 0x25a624
jge 0x23aa8
movl -0x28(%rbp), %ecx
movq -0x48(%rbp), %rax
movslq -0x28(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x34(%rax)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x23a80
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq 0x30(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x23c39
movq 0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x28(%rbp), %rcx
movslq -0x28(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
jae 0x23b01
movq 0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq 0x28(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
jmp 0x23b21
movq 0x28(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq 0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
movq -0x38(%rbp), %rcx
movl 0x34(%rcx), %ecx
addl $0x174, %ecx            # imm = 0x174
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
movl 0x34(%rcx), %ecx
addl $0x174, %ecx            # imm = 0x174
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x50(%rbp), %rax
jae 0x23bf6
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq -0x60(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x23ba8
movq -0x58(%rbp), %rax
movq (%rax), %rax
cmpq -0x38(%rbp), %rax
jb 0x23ba4
movq -0x58(%rbp), %rax
movq (%rax), %rax
cmpq -0x38(%rbp), %rax
jne 0x23ba6
movq -0x60(%rbp), %rax
movq (%rax), %rax
cmpq -0x40(%rbp), %rax
jae 0x23ba6
jmp 0x23bf6
jmp 0x23bd3
movq -0x60(%rbp), %rax
movq (%rax), %rax
cmpq -0x38(%rbp), %rax
jb 0x23bcf
movq -0x60(%rbp), %rax
movq (%rax), %rax
cmpq -0x38(%rbp), %rax
jne 0x23bd1
movq -0x58(%rbp), %rax
movq (%rax), %rax
cmpq -0x40(%rbp), %rax
jae 0x23bd1
jmp 0x23bf6
jmp 0x23bd3
jmp 0x23bd5
movq -0x58(%rbp), %rax
addq $0xba0, %rax            # imm = 0xBA0
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
addq $0xba0, %rax            # imm = 0xBA0
movq %rax, -0x60(%rbp)
jmp 0x23b5f
movq -0x58(%rbp), %rax
cmpq -0x50(%rbp), %rax
jb 0x23c29
movq -0x38(%rbp), %rdx
movq 0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rdx
movq 0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x23c2b
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x23ab6
movl -0x2c(%rbp), %ecx
movq 0x30(%rbp), %rax
movl %ecx, (%rax)
jmp 0x23c4e
movq 0x30(%rbp), %rax
movl $0x0, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)