// File: /workspace/github_c_makefile_star2_O1/mishun[P]plantri/plantri.c
// Function: scandouble
static void
scandouble(int nbtot, int nbop, int numdoubles,
          EDGE *oldflip[], EDGE *oldmate[], int oldnflip, EDGE *lastflip)

/* The main node of the recursion for creating double edges. 
   As this procedure is entered, nv,ne,degree etc are set for some graph,
   and nbtot/nbop are the values returned by canon() for that graph.
   numdoubles is the number of undirected edges with a parallel mate.
   oldflip and oldnflip are the flips for the parent graph, and lastflip
   is what was flipped to make this graph.  The initial call is
   distinguished by oldnflip==0.  There are no loops yet. */
{
    register int i,j;
    int xnbtot,xnbop,nflips,xnumdoubles,ngood;
    EDGE *flip[MAXE/2],*mate[MAXE/2],*good[MAXE];
    int feasible[MAXE/2];
    int a,b,c,d;
    long ama,amb,amc,amd;

    if (minconnec == 2) got_one(nbtot,nbop,2+(numdoubles==0));

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

    if (oldnflip == 0)
    {
        make_am();
        find_double_makers(flip,&nflips,mate);
    }
    else 
        update_double_makers(flip,&nflips,mate,
                                        oldflip,oldnflip,oldmate,lastflip);

    find_feasible_flips(flip,mate,nflips,feasible,nbtot);
    
    if (minconnec == 1) scanordloops(nbtot,nbop,numdoubles);

    for (i = 0; i < nflips; ++i)
    {
        if (!feasible[i]) continue;

        a = flip[i]->start;     ama = am[a];
        b = flip[i]->end;       amb = am[b];
        c = flip[i]->prev->end; amc = am[c];
        d = flip[i]->next->end; amd = am[d];
        am[a] = ama & ~BIT(b);
        am[b] = amb & ~BIT(a);
        am[c] = amc | BIT(d);
        am[d] = amd | BIT(c);
        switch_edge(flip[i]);

        doubles[numdoubles] = flip[i];
        for (j = 0; j < numdoubles; ++j) if (doubles[j] == mate[i]) break;
        if (j == numdoubles)
        {
            doubles[numdoubles+1] = mate[i];
            xnumdoubles = numdoubles + 2;
        }
        else
            xnumdoubles = numdoubles + 1;

        make_edge_colours(flip[i],doubles,xnumdoubles,good,&ngood);

        if (ngood > 0
	    && canon_edge(good,ngood,degree,numbering,&xnbtot,&xnbop))
                scandouble(xnbtot,xnbop,xnumdoubles,flip,mate,nflips,flip[i]);

        am[a] = ama;
        am[b] = amb;
        am[c] = amc;
        am[d] = amd;
        switch_edge_back(flip[i]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1ab8, %rsp           # imm = 0x1AB8
movl %r9d, %r14d
movq %r8, %r12
movq %rcx, %r13
movq %rdx, 0x10(%rsp)
movl %esi, 0x18(%rsp)
movl %edi, %ebx
cmpl $0x2, 0xba40(%rip)      # 0x260b0
jne 0x1a687
xorl %edx, %edx
cmpl $0x1, 0x10(%rsp)
adcl $0x2, %edx
movl %ebx, %edi
movl 0x18(%rsp), %esi
callq 0x76f0
testl %r14d, %r14d
movl %ebx, 0x28(%rsp)
je 0x1a76c
movq 0x1af0(%rsp), %rbx
xorl %ebp, %ebp
cmpl $0x3, 0xbb13(%rip)      # 0x261b8
sete %bpl
movl 0xb9e9(%rip), %eax      # 0x26098
leal 0x1(%rax), %ecx
movl %ecx, 0xb9e0(%rip)      # 0x26098
cmpl $0x7530, %eax           # imm = 0x7530
jl 0x1a6dc
movl $0x1, 0xb9cf(%rip)      # 0x26098
leaq 0x270560(%rip), %rdi    # 0x28ac30
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x1030
addl $0x3, %ebp
movslq (%rbx), %r10
movl 0xb9b0(%rip), %eax      # 0x26098
leaq 0x270541(%rip), %rcx    # 0x28ac30
movl %eax, (%rcx,%r10,4)
movslq 0x4(%rbx), %r8
movl %eax, (%rcx,%r8,4)
movq 0x10(%rbx), %rdx
movslq 0x4(%rdx), %rdi
movl %eax, (%rcx,%rdi,4)
movq 0x18(%rbx), %rdx
movslq 0x4(%rdx), %rdx
movq %rdx, 0x20(%rsp)
movl %eax, (%rcx,%rdx,4)
testl %r14d, %r14d
jle 0x1a85d
movl %r14d, %edx
xorl %r9d, %r9d
xorl %r15d, %r15d
movq (%r13,%r9,8), %r11
movslq (%r11), %r14
cmpl %eax, (%rcx,%r14,4)
je 0x1a75f
movslq 0x4(%r11), %r14
cmpl %eax, (%rcx,%r14,4)
je 0x1a75f
movq (%r12,%r9,8), %r14
cmpq %rbx, %r14
je 0x1a75f
movslq %r15d, %r15
movq %r11, 0x940(%rsp,%r15,8)
movq %r14, 0x370(%rsp,%r15,8)
incl %r15d
incq %r9
cmpq %r9, %rdx
jne 0x1a728
jmp 0x1a860
movslq 0x229e9d(%rip), %rax    # 0x244610
testq %rax, %rax
jle 0x1a7af
xorl %ecx, %ecx
leaq 0xd26f(%rip), %rdx      # 0x279f0
leaq 0x4964e8(%rip), %rsi    # 0x4b0c70
movq (%rdx,%rcx,8), %rdi
movq %rdi, %r9
xorl %r8d, %r8d
movb 0x4(%r9), %r10b
btsq %r10, %r8
movq 0x18(%r9), %r9
cmpq %rdi, %r9
jne 0x1a792
movq %r8, (%rsi,%rcx,8)
incq %rcx
cmpq %rax, %rcx
jne 0x1a788
xorl %ecx, %ecx
cmpl $0x3, 0xba00(%rip)      # 0x261b8
sete %dl
testl %eax, %eax
jle 0x1aa9a
movb %dl, %cl
addl $0x3, %ecx
xorl %edx, %edx
leaq 0xd41f(%rip), %rsi      # 0x27bf0
leaq 0xd218(%rip), %rdi      # 0x279f0
leaq 0x496491(%rip), %r8     # 0x4b0c70
xorl %r13d, %r13d
movl (%rsi,%rdx,4), %r9d
cmpl %ecx, %r9d
jl 0x1a850
leaq (%rdi,%rdx,8), %r10
movq (%r10), %r10
cmpq 0x28(%r10), %r10
jne 0x1a847
movslq 0x4(%r10), %r11
cmpl %ecx, (%rsi,%r11,4)
jl 0x1a847
movq 0x10(%r10), %r11
movq 0x18(%r10), %rbx
movslq 0x4(%rbx), %rbx
movq (%r8,%rbx,8), %r14
movl 0x4(%r11), %r11d
btq %r11, %r14
jae 0x1a847
leaq (%rdi,%rbx,8), %r14
movq (%r14), %rbx
leaq 0x18(%rbx), %r14
cmpl %r11d, 0x4(%rbx)
jne 0x1a820
movslq %r13d, %r13
movq %r10, 0x940(%rsp,%r13,8)
movq 0x28(%rbx), %r11
movq %r11, 0x370(%rsp,%r13,8)
incl %r13d
addq $0x18, %r10
decl %r9d
jne 0x1a7ef
incq %rdx
cmpq %rax, %rdx
jne 0x1a7e2
jmp 0x1aa9d
xorl %r15d, %r15d
leaq 0xd389(%rip), %rdx      # 0x27bf0
movl (%rdx,%r10,4), %r9d
cmpl %ebp, %r9d
jge 0x1a878
movq %r15, %r13
jmp 0x1a903
leaq 0xd171(%rip), %r11      # 0x279f0
leaq (%r11,%r10,8), %r10
leaq 0x4963e6(%rip), %rbx    # 0x4b0c70
movq %r15, %r13
movq (%r10), %r10
movslq 0x4(%r10), %r12
cmpl %ebp, (%rdx,%r12,4)
jl 0x1a8fa
movq 0x28(%r10), %r14
cmpq %r14, %r10
je 0x1a8a9
cmpl %eax, (%rcx,%r12,4)
je 0x1a8fa
movq %r13, %rsi
movq 0x10(%r10), %r12
movq 0x18(%r10), %r15
movslq 0x4(%r15), %r15
movq (%rbx,%r15,8), %r13
movl 0x4(%r12), %r12d
btq %r12, %r13
jae 0x1a8f7
leaq (%r11,%r15,8), %r15
movq (%r15), %r13
leaq 0x18(%r13), %r15
cmpl %r12d, 0x4(%r13)
jne 0x1a8cb
movslq %esi, %rsi
movq %r14, 0x940(%rsp,%rsi,8)
movq 0x28(%r13), %r14
movq %rsi, %r13
movq %r14, 0x370(%rsp,%rsi,8)
incl %r13d
jmp 0x1a8fa
movq %rsi, %r13
addq $0x18, %r10
decl %r9d
jne 0x1a88d
movl (%rdx,%r8,4), %r9d
cmpl %ebp, %r9d
jl 0x1a98b
leaq 0xd0dd(%rip), %r10      # 0x279f0
leaq (%r10,%r8,8), %r8
leaq 0x496352(%rip), %r11    # 0x4b0c70
movq (%r8), %r8
movslq 0x4(%r8), %r14
cmpl %ebp, (%rdx,%r14,4)
jl 0x1a982
movq 0x28(%r8), %rbx
cmpq %rbx, %r8
je 0x1a93a
cmpl %eax, (%rcx,%r14,4)
je 0x1a982
movq 0x10(%r8), %r14
movq 0x18(%r8), %r15
movslq 0x4(%r15), %r15
movq (%r11,%r15,8), %r12
movl 0x4(%r14), %r14d
btq %r14, %r12
jae 0x1a982
leaq (%r10,%r15,8), %r15
movq (%r15), %r12
leaq 0x18(%r12), %r15
cmpl %r14d, 0x4(%r12)
jne 0x1a958
movslq %r13d, %r13
movq %rbx, 0x940(%rsp,%r13,8)
movq 0x28(%r12), %rbx
movq %rbx, 0x370(%rsp,%r13,8)
incl %r13d
addq $0x18, %r8
decl %r9d
jne 0x1a91e
movl (%rdx,%rdi,4), %r8d
cmpl %ebp, %r8d
jl 0x1aa0d
leaq 0xd055(%rip), %r9       # 0x279f0
leaq (%r9,%rdi,8), %rdi
leaq 0x4962ca(%rip), %r10    # 0x4b0c70
movq (%rdi), %rdi
movslq 0x4(%rdi), %rbx
cmpl %ebp, (%rdx,%rbx,4)
jl 0x1aa04
movq 0x28(%rdi), %r11
cmpq %r11, %rdi
je 0x1a9c0
cmpl %eax, (%rcx,%rbx,4)
je 0x1aa04
movq 0x10(%rdi), %rbx
movq 0x18(%rdi), %r14
movslq 0x4(%r14), %r14
movq (%r10,%r14,8), %r15
movl 0x4(%rbx), %ebx
btq %rbx, %r15
jae 0x1aa04
leaq (%r9,%r14,8), %r15
movq (%r15), %r14
leaq 0x18(%r14), %r15
cmpl %ebx, 0x4(%r14)
jne 0x1a9dd
movslq %r13d, %r13
movq %r11, 0x940(%rsp,%r13,8)
movq 0x28(%r14), %r11
movq %r11, 0x370(%rsp,%r13,8)
incl %r13d
addq $0x18, %rdi
decl %r8d
jne 0x1a9a6
movq 0x20(%rsp), %rsi
movl (%rdx,%rsi,4), %edi
cmpl %ebp, %edi
jl 0x1aa9d
leaq 0xcfcc(%rip), %r8       # 0x279f0
leaq (%r8,%rsi,8), %rsi
leaq 0x496241(%rip), %r9     # 0x4b0c70
movq (%rsi), %rsi
movslq 0x4(%rsi), %r11
cmpl %ebp, (%rdx,%r11,4)
jl 0x1aa90
movq 0x28(%rsi), %r10
cmpq %r10, %rsi
je 0x1aa4b
cmpl %eax, (%rcx,%r11,4)
je 0x1aa90
movq 0x10(%rsi), %r11
movq 0x18(%rsi), %rbx
movslq 0x4(%rbx), %rbx
movq (%r9,%rbx,8), %r14
movl 0x4(%r11), %r11d
btq %r11, %r14
jae 0x1aa90
leaq (%r8,%rbx,8), %r14
movq (%r14), %rbx
leaq 0x18(%rbx), %r14
cmpl %r11d, 0x4(%rbx)
jne 0x1aa69
movslq %r13d, %r13
movq %r10, 0x940(%rsp,%r13,8)
movq 0x28(%rbx), %r10
movq %r10, 0x370(%rsp,%r13,8)
incl %r13d
addq $0x18, %rsi
decl %edi
jne 0x1aa2f
jmp 0x1aa9d
xorl %r13d, %r13d
movl 0x28(%rsp), %edi
cmpl $0x1, %edi
jne 0x1aacc
testl %r13d, %r13d
jle 0x1abb7
movl %r13d, %eax
xorl %ecx, %ecx
movl $0x1, 0x80(%rsp,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x1aab4
jmp 0x1abb7
leaq 0xd21d(%rip), %rax      # 0x27cf0
movslq 0x229b3a(%rip), %rcx    # 0x244614
testq %rcx, %rcx
jle 0x1aaf7
xorl %edx, %edx
movq %rax, %rsi
movq (%rsi), %r8
movl %edx, 0x34(%r8)
incq %rdx
addq $0x8, %rsi
cmpq %rdx, %rcx
jne 0x1aae4
movl 0xb597(%rip), %ecx      # 0x26094
leal 0x2(%rcx), %edx
movl %edx, 0xb58e(%rip)      # 0x26094
cmpl $0x752f, %ecx           # imm = 0x752F
jl 0x1ab38
movl $0x2, 0xb57c(%rip)      # 0x26094
movl $0x30, %ecx
leaq 0x229afc(%rip), %rdx    # 0x244620
movl $0x0, (%rcx,%rdx)
addq $0x40, %rcx
cmpq $0x46630, %rcx          # imm = 0x46630
jne 0x1ab24
testl %r13d, %r13d
jle 0x1abb7
movslq %edi, %rcx
imulq $0xba0, %rcx, %rcx      # imm = 0xBA0
leaq (%rax,%rcx), %rdx
movl 0xb543(%rip), %esi      # 0x26094
movl %r13d, %r11d
xorl %r8d, %r8d
movq 0x940(%rsp,%r8,8), %r9
movslq 0x34(%r9), %r9
movq (%rax,%r9,8), %r10
cmpl %esi, 0x30(%r10)
jne 0x1ab7b
movl $0x0, 0x80(%rsp,%r8,4)
jmp 0x1abaf
leaq (,%r9,8), %r10
movl $0x1, 0x80(%rsp,%r8,4)
cmpq %rcx, %r10
jge 0x1abaf
leaq (%rax,%r9,8), %r9
movq (%r9), %r10
movq 0x28(%r10), %r10
movl %esi, 0x30(%r10)
addq $0xba0, %r9             # imm = 0xBA0
cmpq %rdx, %r9
jb 0x1ab98
incq %r8
cmpq %r11, %r8
jne 0x1ab57
testl %r13d, %r13d
jle 0x1ac67
movl %r13d, %eax
xorl %ecx, %ecx
leaq 0xd024(%rip), %rdx      # 0x27bf0
cmpl $0x0, 0x80(%rsp,%rcx,4)
je 0x1ac5b
movq 0x370(%rsp,%rcx,8), %rsi
movq 0x10(%rsi), %r8
movq 0x18(%rsi), %rsi
movslq 0x4(%rsi), %r11
movslq 0x4(%r8), %r14
movq 0x940(%rsp,%rcx,8), %rsi
movslq (%rsi), %r10
movslq 0x4(%rsi), %r9
movl (%rdx,%r10,4), %esi
movl (%rdx,%r9,4), %r8d
addl %r8d, %esi
addl $-0x2, %esi
movl (%rdx,%r14,4), %r8d
addl (%rdx,%r11,4), %r8d
cmpl %esi, %r8d
jl 0x1ac50
cmpl %r10d, %r11d
sete %bl
cmpl %r9d, %r11d
sete %r11b
orb %bl, %r11b
movzbl %r11b, %r11d
cmpl %r10d, %r14d
sete %r10b
cmpl %r9d, %r14d
sete %r9b
orb %r10b, %r9b
movzbl %r9b, %r9d
addl %r11d, %r9d
subl %r9d, %r8d
cmpl %esi, %r8d
jge 0x1ac5b
movl $0x0, 0x80(%rsp,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x1abcc
cmpl $0x1, 0xb442(%rip)      # 0x260b0
jne 0x1ac7e
movl 0x18(%rsp), %esi
movq 0x10(%rsp), %rdx
callq 0x1b102
movq %r13, 0x40(%rsp)
testl %r13d, %r13d
jle 0x1af89
movq 0x10(%rsp), %rax
movl %eax, %r12d
movslq %eax, %rcx
movq %rcx, 0x50(%rsp)
leal 0x1(%rax), %ecx
movl %ecx, 0x34(%rsp)
movslq %ecx, %rcx
movq %rcx, 0x48(%rsp)
addl $0x2, %eax
movl %eax, 0x30(%rsp)
movl 0x40(%rsp), %eax
movq %rax, 0x58(%rsp)
xorl %ebx, %ebx
leaq 0x495fac(%rip), %r13    # 0x4b0c70
cmpl $0x0, 0x80(%rsp,%rbx,4)
je 0x1af5e
movq 0x940(%rsp,%rbx,8), %rbp
movslq (%rbp), %rdx
movq (%r13,%rdx,8), %rsi
movslq 0x4(%rbp), %rdi
movq (%r13,%rdi,8), %r8
movq 0x10(%rbp), %rax
movq 0x18(%rbp), %rcx
movslq 0x4(%rax), %r10
movq (%r13,%r10,8), %r9
movslq 0x4(%rcx), %r15
movq (%r13,%r15,8), %rcx
movq %rsi, 0x28(%rsp)
movq %rsi, %rax
btrq %rdi, %rax
movq %rax, (%r13,%rdx,8)
movq %r8, 0x78(%rsp)
movq %r8, %rax
movq %rdx, 0x18(%rsp)
btrq %rdx, %rax
movq %rdi, 0x20(%rsp)
movq %rax, (%r13,%rdi,8)
movq %r9, 0x70(%rsp)
movq %r9, %rax
btsq %r15, %rax
movq %rax, (%r13,%r10,8)
movq %rcx, 0x68(%rsp)
movq %rcx, %rax
movq %r10, 0x60(%rsp)
btsq %r10, %rax
movq %rax, (%r13,%r15,8)
movq %rbp, %rdi
callq 0x16a28
leaq 0x496108(%rip), %r8     # 0x4b0e70
movq 0x50(%rsp), %rax
movq %rbp, (%r8,%rax,8)
cmpl $0x0, 0x10(%rsp)
jle 0x1ad9b
movq 0x370(%rsp,%rbx,8), %rcx
movq %r8, %rdx
xorl %eax, %eax
cmpq %rcx, (%rdx)
je 0x1ad9d
incq %rax
addq $0x8, %rdx
cmpq %rax, %r12
jne 0x1ad85
movl %r12d, %eax
jmp 0x1ad9d
xorl %eax, %eax
movl 0x34(%rsp), %r14d
cmpl 0x10(%rsp), %eax
jne 0x1adbe
movq 0x370(%rsp,%rbx,8), %rax
movq 0x48(%rsp), %rcx
movq %rax, (%r8,%rcx,8)
movl 0x30(%rsp), %r14d
movq 0x10(%rbp), %rax
movq 0x18(%rbp), %rcx
movslq 0x4(%rax), %rax
leaq 0xce1f(%rip), %rsi      # 0x27bf0
movslq (%rsi,%rax,4), %rdx
movslq 0x4(%rcx), %rax
movslq (%rsi,%rax,4), %rax
addq %rdx, %rax
shlq $0x14, %rax
movslq (%rbp), %rcx
movslq (%rsi,%rcx,4), %rdx
movslq 0x4(%rbp), %rcx
movslq (%rsi,%rcx,4), %rcx
movq %rcx, %rsi
shlq $0xa, %rsi
addq %rdx, %rsi
leaq (%rsi,%rax), %rdi
shlq $0xa, %rdx
addq %rcx, %rdx
addq %rdx, %rax
cmpq %rax, %rdi
cmovlq %rdi, %rax
xorl %ecx, %ecx
cmpq %rdx, %rsi
jg 0x1ae27
movq %rbp, 0xf10(%rsp)
movl $0x1, %ecx
cmpq %rsi, %rdx
jle 0x1af6e
movl %r14d, %edx
movl %edx, %esi
leaq (%r8,%rsi,8), %rsi
addq $-0x8, %rsi
testl %edx, %edx
jle 0x1aed5
movq (%rsi), %rdi
decl %edx
addq $-0x8, %rsi
cmpq %rbp, %rdi
je 0x1ae3d
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %r8
movslq 0x4(%rsi), %rsi
leaq 0xcd8a(%rip), %r10      # 0x27bf0
movslq (%r10,%rsi,4), %rsi
movslq 0x4(%r8), %r8
movslq (%r10,%r8,4), %r9
addq %rsi, %r9
shlq $0x14, %r9
movslq (%rdi), %rsi
movslq (%r10,%rsi,4), %r8
movslq 0x4(%rdi), %rsi
movslq (%r10,%rsi,4), %r11
movq %r11, %r10
shlq $0xa, %r10
addq %r8, %r10
addq %r9, %r10
xorl %esi, %esi
cmpq %rax, %r10
jl 0x1aed7
shlq $0xa, %r8
addq %r11, %r8
addq %r9, %r8
cmpq %rax, %r8
jl 0x1aed7
cmpq %rax, %r10
jne 0x1aebd
movslq %ecx, %rsi
incl %ecx
movq %rdi, 0xf10(%rsp,%rsi,8)
cmpq %rax, %r8
leaq 0x495fa9(%rip), %r8     # 0x4b0e70
jne 0x1ae33
movslq %ecx, %rsi
jmp 0x1af76
movl %ecx, %esi
testl %esi, %esi
jle 0x1af1f
leaq 0xf10(%rsp), %rdi
leaq 0x3c(%rsp), %rdx
leaq 0x38(%rsp), %rcx
callq 0x16e7b
testl %eax, %eax
je 0x1af1f
movl 0x3c(%rsp), %edi
movl 0x38(%rsp), %esi
movq %rbp, (%rsp)
movl %r14d, %edx
leaq 0x940(%rsp), %rcx
leaq 0x370(%rsp), %r8
movq 0x40(%rsp), %r9
callq 0x1a644
movq 0x18(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, (%r13,%rax,8)
movq 0x20(%rsp), %rax
movq 0x78(%rsp), %rcx
movq %rcx, (%r13,%rax,8)
movq 0x70(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rax, (%r13,%rcx,8)
movq 0x68(%rsp), %rax
movq %rax, (%r13,%r15,8)
movq %rbp, %rdi
callq 0x174cd
incq %rbx
cmpq 0x58(%rsp), %rbx
jne 0x1acc4
jmp 0x1af89
movl %ecx, %esi
movq %rbp, %rdi
movl %r14d, %edx
incl %ecx
movq 0x20(%rdi), %rdi
movq %rdi, 0xf10(%rsp,%rsi,8)
jmp 0x1ae33
addq $0x1ab8, %rsp           # imm = 0x1AB8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq