// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: prune_oriented_lists
static void
prune_oriented_lists(EDGE *good_or[], int *ngood_or, int *ngood_ref,
                     EDGE *good_mir[], int *ngood_mir, int *ngood_mir_ref)

/* Try to prune the edge lists (of the form required by
   canon_edge_oriented()) by using the degrees of a couple of
   extra vertices.  The result is returned in the same form.
   As always, if *ngood_ref==*ngood_mir_ref==0 on output
   (which must not be true on input), all else is undefined.
*/
{
    int i,k,kref;
    long code_or[MAXE],code_mir[MAXE],maxcode;
#define PRUNE_OR(e) ((degree[(e)->invers->prev->prev->end] << 10) \
		      + degree[(e)->next->invers->prev->end])
#define PRUNE_MIR(e) ((degree[(e)->invers->next->next->end] << 10) \
                      + degree[(e)->prev->invers->next->end])

    maxcode = 0;
    for (i = 0; i < *ngood_or; ++i)
    {
	code_or[i] = PRUNE_OR(good_or[i]);
	if (code_or[i] > maxcode) maxcode = code_or[i];
    }

    for (i = 0; i < *ngood_mir; ++i)
    {
        code_mir[i] = PRUNE_MIR(good_mir[i]);
        if (code_mir[i] > maxcode) maxcode = code_mir[i];
    }

    k = kref = 0;
    for (i = 0; i < *ngood_or; ++i)
        if (code_or[i] == maxcode)
	{
	    if (i < *ngood_ref) ++kref;
	    good_or[k++] = good_or[i];
	}
    *ngood_or = k;
    *ngood_ref = kref;

    k = kref = 0;
    for (i = 0; i < *ngood_mir; ++i)
        if (code_mir[i] == maxcode)
        {
            if (i < *ngood_mir_ref) ++kref;
            good_mir[k++] = good_mir[i];
        }
    *ngood_mir = k;
    *ngood_mir_ref = kref;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1710, %rsp           # imm = 0x1710
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x1788(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x12cba
movq -0x8(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x2afb9(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %eax
shll $0xa, %eax
movq -0x8(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq 0x10(%rcx), %rcx
movslq 0x4(%rcx), %rdx
leaq 0x2af90(%rip), %rcx     # 0x3dc00
addl (%rcx,%rdx,4), %eax
movslq %eax, %rcx
movslq -0x34(%rbp), %rax
movq %rcx, -0xbe0(%rbp,%rax,8)
movslq -0x34(%rbp), %rax
movq -0xbe0(%rbp,%rax,8), %rax
cmpq -0x1788(%rbp), %rax
jle 0x12caa
movslq -0x34(%rbp), %rax
movq -0xbe0(%rbp,%rax,8), %rax
movq %rax, -0x1788(%rbp)
jmp 0x12cac
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x12c15
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x12d66
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x2af0d(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %eax
shll $0xa, %eax
movq -0x20(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x10(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq 0x18(%rcx), %rcx
movslq 0x4(%rcx), %rdx
leaq 0x2aee4(%rip), %rcx     # 0x3dc00
addl (%rcx,%rdx,4), %eax
movslq %eax, %rcx
movslq -0x34(%rbp), %rax
movq %rcx, -0x1780(%rbp,%rax,8)
movslq -0x34(%rbp), %rax
movq -0x1780(%rbp,%rax,8), %rax
cmpq -0x1788(%rbp), %rax
jle 0x12d56
movslq -0x34(%rbp), %rax
movq -0x1780(%rbp,%rax,8), %rax
movq %rax, -0x1788(%rbp)
jmp 0x12d58
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x12cc1
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x12dde
movslq -0x34(%rbp), %rax
movq -0xbe0(%rbp,%rax,8), %rax
cmpq -0x1788(%rbp), %rax
jne 0x12dd1
movl -0x34(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x12daf
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movl -0x38(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x38(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x12dd3
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x12d7b
movl -0x38(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x3c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x12e68
movslq -0x34(%rbp), %rax
movq -0x1780(%rbp,%rax,8), %rax
cmpq -0x1788(%rbp), %rax
jne 0x12e5b
movl -0x34(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x12e39
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x20(%rbp), %rax
movl -0x38(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x38(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x12e5d
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x12e05
movl -0x38(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x3c(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
addq $0x1710, %rsp           # imm = 0x1710
popq %rbp
retq
nopw %cs:(%rax,%rax)