// File: /workspace/github_c_makefile_star2_O1/mishun[P]plantri/plantri.c
// Function: scanmin5c4_0
static void
scanmin5c4_0(int nbtot, int nbop, EDGE **bang, int nbang)

/* This is the first procedure that creates nf-4-cycles for mindeg=5
   triangulations.  It is called with a 5-connected triangulation.
   bang[0..nbang-1] are all proper bangles and possibly some improper
   bangles (degree 5 at one or both ends).  For this first step, only
   a switching operation is possible.
*/

{
    EDGE *good[MAXE],*on4[MAXE/2]; 
    EDGE *ext5_sw[MAXE/2],*ext5_51[1],*ext5_52[1]; /* 5-expansion impossible */
    int next5_sw,next5_5;
    int i,xnbtot,xnbop,ngood,non4;
    EDGE *firstedge_save[MAXN];
    
    if (nv < splitlevel && res > 0) return;

    if (splitlevel > 0)
	for (i = 0; i < nv; ++i) firstedge_save[i] = firstedge[i];

#ifdef PRE_FILTER_MIN5c4
    if (!(PRE_FILTER_MIN5c4)) return;
#endif

#ifndef FIND_EXTENSIONS_MIN5c4
#define FIND_EXTENSIONS_MIN5c4 find_extensions_min5c4
#endif

    FIND_EXTENSIONS_MIN5c4(nbtot,nbop,bang,nbang,NULL,0,
			          ext5_sw,&next5_sw,ext5_51,ext5_52,&next5_5);

    for (i = 0; i < next5_sw; ++i)
    {
	switch_edge(ext5_sw[i]);
#ifdef FAST_FILTER_MIN5c4
        if (FAST_FILTER_MIN5c4)
#endif  
        {
	    non4 = 0;
	    add_new_nf4_cycles(ext5_sw[i],on4,&non4);

	    min5c4_sw_legal(ext5_sw[i],on4,non4,good,&ngood);
	    if (ngood > 0
		     && canon_edge(good,ngood,degree,numbering,&xnbtot,&xnbop))
	        scanmin5c4_1(xnbtot,xnbop,on4,non4);
	}
	switch_edge_back(ext5_sw[i]);
    }

    if (splitlevel > 0)
	for (i = 0; i < nv; ++i) firstedge[i] = firstedge_save[i];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1978, %rsp           # imm = 0x1978
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %ebp
movl 0x23203b(%rip), %edx    # 0x244610
movl 0x15409(%rip), %eax     # 0x279e4
cmpl %eax, %edx
jge 0x125ec
cmpl $0x0, 0x13c82(%rip)     # 0x26268
jg 0x12715
testl %eax, %eax
setle %al
testl %edx, %edx
setle %cl
orb %al, %cl
jne 0x1260f
shlq $0x3, %rdx
leaq 0x153eb(%rip), %rsi     # 0x279f0
leaq 0x30(%rsp), %rdi
callq 0x1080
leaq 0x18(%rsp), %rax
leaq 0x20(%rsp), %r10
leaq 0x28(%rsp), %r11
leaq 0x1c(%rsp), %r15
leaq 0x230(%rsp), %r9
movl %ebp, %edi
movq %r14, %rsi
movl %ebx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
pushq %rax
pushq %r10
pushq %r11
pushq %r15
callq 0x1638a
addq $0x20, %rsp
movslq (%r15), %r14
testq %r14, %r14
jle 0x126eb
xorl %r12d, %r12d
leaq 0x800(%rsp), %rbx
leaq 0xdd0(%rsp), %r15
movq 0x230(%rsp,%r12,8), %r13
movq %r13, %rdi
callq 0x16a28
movl $0x0, 0x8(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
leaq 0x8(%rsp), %rdx
callq 0x16adb
movl 0x8(%rsp), %ebp
movq %r13, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movq %r15, %rcx
leaq 0xc(%rsp), %r8
callq 0x16cb3
movl 0xc(%rsp), %esi
testl %esi, %esi
jle 0x126d7
movq %r15, %rdi
leaq 0x14(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x16e7b
testl %eax, %eax
je 0x126d7
movl 0x14(%rsp), %edi
movl 0x10(%rsp), %esi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x17151
movq %r13, %rdi
callq 0x174cd
incq %r12
cmpq %r12, %r14
jne 0x12666
cmpl $0x0, 0x152f2(%rip)     # 0x279e4
jle 0x12715
movslq 0x231f15(%rip), %rdx    # 0x244610
testq %rdx, %rdx
jle 0x12715
shlq $0x3, %rdx
leaq 0x152e5(%rip), %rdi     # 0x279f0
leaq 0x30(%rsp), %rsi
callq 0x1080
addq $0x1978, %rsp           # imm = 0x1978
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq