// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: scanordloops
static void
scanordloops(int nbtot, int nbop, int numdoubles)

/* The code for adding ordinary loops using a grey code.
   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.
   There are no loops when this is called. */
{
    register int i,j;
    int xnbtot,xnbop,nloopmakers,nloops;
    EDGE *loopmaker[2*MAXN],*loop[2*MAXN],**nb0,**nb1,*e1;
    int isloop[2*MAXN],partner[2*MAXN],numpseudo,pj;
    long x,xlim,w;

/*  Meaning of isloop[i]:
 *  0 = not a loop, possibly available for switching
 *  1 = a pseudo-loop: not a loop but unavailable for switching
 *  2 = a real loop, available for unswitching
 *  numpseudo = number of pseudo-loops at the moment.
 */

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

    // fprintf(stderr,"Check this part of the code -- changed by me:\n");
    if ((numdoubles<2) || 
	((minimumdeg>=3) && (numdoubles<4))) return;

    // was: if (numdoubles < 4) return;

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

    find_loopmakers(doubles,numdoubles,loopmaker,&nloopmakers);
    if (nloopmakers == 0) return;

    for (i = 0; i < nloopmakers; ++i) isloop[i] = 0;
    numpseudo = 0;


    if (nbtot == 1)    /* Case of trivial group */
    {
	for (i = 0; i < nloopmakers; ++i) loopmaker[i]->index = i;
	for (i = 0; i < nloopmakers; ++i)
	{
	    if (degree[loopmaker[i]->start] == 2)
		partner[i] = loopmaker[i]->next->min->index;
	    else if (degree[loopmaker[i]->end] == 2)
                partner[i] = loopmaker[i]->invers->next->min->index;
	    else
		partner[i] = -1;
	}

        xlim = 1 << nloopmakers;
        for (x = 1; x < xlim; ++x)
        {
            for (j = 0, w = x; (w & 1) == 0; ++j, w >>= 1) {}
            // if (isloop[j]) switch_edge_back(loopmaker[j]);
            // else           switch_edge(loopmaker[j]);
            // isloop[j] = !isloop[j];
	    if (isloop[j] == 0)
		if (degree[loopmaker[j]->start] == 1
                              || degree[loopmaker[j]->end] == 1)
		{
		    isloop[j] = 1;
		    ++numpseudo;
		}
		else
		{
		    switch_edge(loopmaker[j]); 
		    isloop[j] = 2;
		}
	    else if (isloop[j] == 1)
	    {
		--numpseudo;
		isloop[j] = 0;
	    }
	    else  /* isloop[j] = 2 */
	    {
		switch_edge_back(loopmaker[j]); 
		isloop[j] = 0;
		pj = partner[j];
		if (pj >= 0 && isloop[pj] == 1)
		{
		    e1 = loopmaker[pj];
		    if (degree[e1->start] > 1 && degree[e1->end] > 1)
		    {
			switch_edge(e1);
			isloop[pj] = 2;
			--numpseudo;
		    }
		}
	    }

	    if (numpseudo > 0) continue;
            for (j = 0; j < nv; ++j) if (degree[j] < minimumdeg) break;
            if (j < nv) continue;
    
            for (i = nloops = 0; i < nloopmakers; ++i)
                if (isloop[i]) loop[nloops++] = loopmaker[i];

	    if (tswitch)
		scanspecialloops(loop,nloops,1,1);	
	    else
	    {
                for (j = 0; j < nloops; ++j)
                {
                   if (loop[j]->next->next->next->invers == loop[j]
                         || loop[j]->prev->prev->prev->invers == loop[j])
                       break;
                }
                if (j == nloops) scanspecialloops(loop,nloops,1,1);
	    }
        }
        if (isloop[nloopmakers-1] == 2)
            switch_edge_back(loopmaker[nloopmakers-1]);
    }
    else   /* Case of non-trivial group */
    {
        nb0 = (EDGE**)numbering[0];
	nb1 = (EDGE**)saved_numbering[0];
	for (i = 0; i < nbtot; ++i, nb0 += MAXE, nb1 += MAXE)
	    for (j = 0; j < ne; ++j) nb1[j] = nb0[j];

        sortedges(loopmaker,nloopmakers);
	for (i = 0; i < nloopmakers; ++i) loopmaker[i]->index = i;
	for (i = 0; i < nloopmakers; ++i)
	{
	    if (degree[loopmaker[i]->start] == 2)
		partner[i] = loopmaker[i]->next->min->index;
	    else if (degree[loopmaker[i]->end] == 2)
                partner[i] = loopmaker[i]->invers->next->min->index;
	    else
		partner[i] = -1;
	}

        xlim = 1 << nloopmakers;
        for (x = 1; x < xlim; ++x)
        {
            for (j = 0, w = x; (w & 1) == 0; ++j, w >>= 1) {}
            // if (isloop[j]) switch_edge_back(loopmaker[j]);
            // else           switch_edge(loopmaker[j]);
            // isloop[j] = !isloop[j];
            if (isloop[j] == 0)
                if (degree[loopmaker[j]->start] == 1                                                     
		       || degree[loopmaker[j]->end] == 1)
                {   
                    isloop[j] = 1;
                    ++numpseudo;
                }
                else
                {   
                    switch_edge(loopmaker[j]);
                    isloop[j] = 2;
                }  
            else if (isloop[j] == 1)
            {   
                --numpseudo;
                isloop[j] = 0;
            }
            else  /* isloop[j] = 2 */
            {   
                switch_edge_back(loopmaker[j]);
                isloop[j] = 0;
		pj = partner[j];
		if (pj >= 0 && isloop[pj] == 1)
		{
		    e1 = loopmaker[pj];
		    if (degree[e1->start] > 1 && degree[e1->end] > 1)
		    {
			switch_edge(e1);
			isloop[pj] = 2;
			--numpseudo;
		    }
		}
            }

	    if (numpseudo > 0) continue;

            for (i = nloops = 0; i < nloopmakers; ++i)
                if (isloop[i] == 2) loop[nloops++] = loopmaker[i];
            if (isminset(loop,nloops,nbtot,nbop,
			 saved_numbering,numbering,&xnbtot,&xnbop))
            {
                for (j = 0; j < nv; ++j) if (degree[j] < minimumdeg) break;
                if (j < nv) continue;

		if (tswitch)
		    scanspecialloops(loop,nloops,xnbtot,xnbop);
		else
		{
                    for (j = 0; j < nloops; ++j)
                    {
                        if (loop[j]->next->next->next->invers == loop[j]
                              || loop[j]->prev->prev->prev->invers == loop[j])
                            break;
                    }
                    if (j == nloops) scanspecialloops(loop,nloops,xnbtot,xnbop);
		}
            }
        }
        if (isloop[nloopmakers-1] == 2) switch_edge_back(loopmaker[nloopmakers-1]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc80, %rsp            # imm = 0xC80
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
cmpl $0x0, -0xc(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %edx
addl $0x2, %edx
callq 0x8080
cmpl $0x2, -0xc(%rbp)
jl 0x2eaa3
cmpl $0x3, 0xd71d(%rip)      # 0x3c1b8
jl 0x2eaa8
cmpl $0x4, -0xc(%rbp)
jge 0x2eaa8
jmp 0x2f4f0
movl -0xc(%rbp), %esi
leaq -0x430(%rbp), %rdx
leaq 0x4983c7(%rip), %rdi    # 0x4c6e80
leaq -0x20(%rbp), %rcx
callq 0x2f760
cmpl $0x0, -0x20(%rbp)
jne 0x2eacd
jmp 0x2f4f0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x2eaf6
movslq -0x10(%rbp), %rax
movl $0x0, -0xa50(%rbp,%rax,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2ead4
movl $0x0, -0xc54(%rbp)
cmpl $0x1, -0x4(%rbp)
jne 0x2ef8b
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x2eb36
movl -0x10(%rbp), %ecx
movslq -0x10(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movl %ecx, 0x34(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2eb11
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x2ebef
movslq -0x10(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movslq (%rax), %rcx
leaq 0xf0a1(%rip), %rax      # 0x3dc00
cmpl $0x2, (%rax,%rcx,4)
jne 0x2eb89
movslq -0x10(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl 0x34(%rax), %ecx
movslq -0x10(%rbp), %rax
movl %ecx, -0xc50(%rbp,%rax,4)
jmp 0x2ebdf
movslq -0x10(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movslq 0x4(%rax), %rcx
leaq 0xf060(%rip), %rax      # 0x3dc00
cmpl $0x2, (%rax,%rcx,4)
jne 0x2ebce
movslq -0x10(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl 0x34(%rax), %ecx
movslq -0x10(%rbp), %rax
movl %ecx, -0xc50(%rbp,%rax,4)
jmp 0x2ebdd
movslq -0x10(%rbp), %rax
movl $0xffffffff, -0xc50(%rbp,%rax,4) # imm = 0xFFFFFFFF
jmp 0x2ebdf
jmp 0x2ebe1
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2eb3d
movl -0x20(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
cltq
movq %rax, -0xc68(%rbp)
movq $0x1, -0xc60(%rbp)
movq -0xc60(%rbp), %rax
cmpq -0xc68(%rbp), %rax
jge 0x2ef5f
movl $0x0, -0x14(%rbp)
movq -0xc60(%rbp), %rax
movq %rax, -0xc70(%rbp)
movq -0xc70(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
jne 0x2ec65
jmp 0x2ec49
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0xc70(%rbp), %rax
sarq %rax
movq %rax, -0xc70(%rbp)
jmp 0x2ec36
movslq -0x14(%rbp), %rax
cmpl $0x0, -0xa50(%rbp,%rax,4)
jne 0x2ecf1
movslq -0x14(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movslq (%rax), %rcx
leaq 0xef77(%rip), %rax      # 0x3dc00
cmpl $0x1, (%rax,%rcx,4)
je 0x2ecac
movslq -0x14(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movslq 0x4(%rax), %rcx
leaq 0xef5a(%rip), %rax      # 0x3dc00
cmpl $0x1, (%rax,%rcx,4)
jne 0x2eccc
movslq -0x14(%rbp), %rax
movl $0x1, -0xa50(%rbp,%rax,4)
movl -0xc54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc54(%rbp)
jmp 0x2ecec
movslq -0x14(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rdi
callq 0x23c60
movslq -0x14(%rbp), %rax
movl $0x2, -0xa50(%rbp,%rax,4)
jmp 0x2ede9
movslq -0x14(%rbp), %rax
cmpl $0x1, -0xa50(%rbp,%rax,4)
jne 0x2ed22
movl -0xc54(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc54(%rbp)
movslq -0x14(%rbp), %rax
movl $0x0, -0xa50(%rbp,%rax,4)
jmp 0x2ede7
movslq -0x14(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rdi
callq 0x24c40
movslq -0x14(%rbp), %rax
movl $0x0, -0xa50(%rbp,%rax,4)
movslq -0x14(%rbp), %rax
movl -0xc50(%rbp,%rax,4), %eax
movl %eax, -0xc58(%rbp)
cmpl $0x0, -0xc58(%rbp)
jl 0x2ede5
movslq -0xc58(%rbp), %rax
cmpl $0x1, -0xa50(%rbp,%rax,4)
jne 0x2ede5
movslq -0xc58(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movq %rax, -0x848(%rbp)
movq -0x848(%rbp), %rax
movslq (%rax), %rcx
leaq 0xee68(%rip), %rax      # 0x3dc00
cmpl $0x1, (%rax,%rcx,4)
jle 0x2ede3
movq -0x848(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0xee50(%rip), %rax      # 0x3dc00
cmpl $0x1, (%rax,%rcx,4)
jle 0x2ede3
movq -0x848(%rbp), %rdi
callq 0x23c60
movslq -0xc58(%rbp), %rax
movl $0x2, -0xa50(%rbp,%rax,4)
movl -0xc54(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc54(%rbp)
jmp 0x2ede5
jmp 0x2ede7
jmp 0x2ede9
cmpl $0x0, -0xc54(%rbp)
jle 0x2edf7
jmp 0x2ef48
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x22b819(%rip), %eax    # 0x25a620
jge 0x2ee2e
movslq -0x14(%rbp), %rcx
leaq 0xedec(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
cmpl 0xd39b(%rip), %eax      # 0x3c1b8
jge 0x2ee21
jmp 0x2ee2e
jmp 0x2ee23
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2edfe
movl -0x14(%rbp), %eax
cmpl 0x22b7e9(%rip), %eax    # 0x25a620
jge 0x2ee3e
jmp 0x2ef48
movl $0x0, -0x24(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x2ee90
movslq -0x10(%rbp), %rax
cmpl $0x0, -0xa50(%rbp,%rax,4)
je 0x2ee83
movslq -0x10(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rcx
movl -0x24(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x24(%rbp)
cltq
movq %rcx, -0x830(%rbp,%rax,8)
jmp 0x2ee85
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2ee4c
cmpl $0x0, 0xd21d(%rip)      # 0x3c0b4
je 0x2eeb4
leaq -0x830(%rbp), %rdi
movl -0x24(%rbp), %esi
movl $0x1, %ecx
movl %ecx, %edx
callq 0x2fa60
jmp 0x2ef46
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x2ef26
movslq -0x14(%rbp), %rax
movq -0x830(%rbp,%rax,8), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpq -0x830(%rbp,%rcx,8), %rax
je 0x2ef17
movslq -0x14(%rbp), %rax
movq -0x830(%rbp,%rax,8), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpq -0x830(%rbp,%rcx,8), %rax
jne 0x2ef19
jmp 0x2ef26
jmp 0x2ef1b
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2eebb
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0x2ef44
leaq -0x830(%rbp), %rdi
movl -0x24(%rbp), %esi
movl $0x1, %ecx
movl %ecx, %edx
callq 0x2fa60
jmp 0x2ef46
jmp 0x2ef48
movq -0xc60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc60(%rbp)
jmp 0x2ec0d
movl -0x20(%rbp), %eax
subl $0x1, %eax
cltq
cmpl $0x2, -0xa50(%rbp,%rax,4)
jne 0x2ef86
movl -0x20(%rbp), %eax
subl $0x1, %eax
cltq
movq -0x430(%rbp,%rax,8), %rdi
callq 0x24c40
jmp 0x2f4f0
leaq 0xed6e(%rip), %rax      # 0x3dd00
movq %rax, -0x838(%rbp)
leaq 0x27b2e0(%rip), %rax    # 0x2aa280
movq %rax, -0x840(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x2f026
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x22b65e(%rip), %eax    # 0x25a624
jge 0x2eff1
movq -0x838(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x840(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2efbd
jmp 0x2eff3
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x838(%rbp), %rax
addq $0xba0, %rax            # imm = 0xBA0
movq %rax, -0x838(%rbp)
movq -0x840(%rbp), %rax
addq $0xba0, %rax            # imm = 0xBA0
movq %rax, -0x840(%rbp)
jmp 0x2efae
leaq -0x430(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x2fbc0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x2f061
movl -0x10(%rbp), %ecx
movslq -0x10(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movl %ecx, 0x34(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2f03c
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x2f11a
movslq -0x10(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movslq (%rax), %rcx
leaq 0xeb76(%rip), %rax      # 0x3dc00
cmpl $0x2, (%rax,%rcx,4)
jne 0x2f0b4
movslq -0x10(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl 0x34(%rax), %ecx
movslq -0x10(%rbp), %rax
movl %ecx, -0xc50(%rbp,%rax,4)
jmp 0x2f10a
movslq -0x10(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movslq 0x4(%rax), %rcx
leaq 0xeb35(%rip), %rax      # 0x3dc00
cmpl $0x2, (%rax,%rcx,4)
jne 0x2f0f9
movslq -0x10(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl 0x34(%rax), %ecx
movslq -0x10(%rbp), %rax
movl %ecx, -0xc50(%rbp,%rax,4)
jmp 0x2f108
movslq -0x10(%rbp), %rax
movl $0xffffffff, -0xc50(%rbp,%rax,4) # imm = 0xFFFFFFFF
jmp 0x2f10a
jmp 0x2f10c
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2f068
movl -0x20(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
cltq
movq %rax, -0xc68(%rbp)
movq $0x1, -0xc60(%rbp)
movq -0xc60(%rbp), %rax
cmpq -0xc68(%rbp), %rax
jge 0x2f4c7
movl $0x0, -0x14(%rbp)
movq -0xc60(%rbp), %rax
movq %rax, -0xc70(%rbp)
movq -0xc70(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
jne 0x2f190
jmp 0x2f174
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0xc70(%rbp), %rax
sarq %rax
movq %rax, -0xc70(%rbp)
jmp 0x2f161
movslq -0x14(%rbp), %rax
cmpl $0x0, -0xa50(%rbp,%rax,4)
jne 0x2f21c
movslq -0x14(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movslq (%rax), %rcx
leaq 0xea4c(%rip), %rax      # 0x3dc00
cmpl $0x1, (%rax,%rcx,4)
je 0x2f1d7
movslq -0x14(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movslq 0x4(%rax), %rcx
leaq 0xea2f(%rip), %rax      # 0x3dc00
cmpl $0x1, (%rax,%rcx,4)
jne 0x2f1f7
movslq -0x14(%rbp), %rax
movl $0x1, -0xa50(%rbp,%rax,4)
movl -0xc54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc54(%rbp)
jmp 0x2f217
movslq -0x14(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rdi
callq 0x23c60
movslq -0x14(%rbp), %rax
movl $0x2, -0xa50(%rbp,%rax,4)
jmp 0x2f314
movslq -0x14(%rbp), %rax
cmpl $0x1, -0xa50(%rbp,%rax,4)
jne 0x2f24d
movl -0xc54(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc54(%rbp)
movslq -0x14(%rbp), %rax
movl $0x0, -0xa50(%rbp,%rax,4)
jmp 0x2f312
movslq -0x14(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rdi
callq 0x24c40
movslq -0x14(%rbp), %rax
movl $0x0, -0xa50(%rbp,%rax,4)
movslq -0x14(%rbp), %rax
movl -0xc50(%rbp,%rax,4), %eax
movl %eax, -0xc58(%rbp)
cmpl $0x0, -0xc58(%rbp)
jl 0x2f310
movslq -0xc58(%rbp), %rax
cmpl $0x1, -0xa50(%rbp,%rax,4)
jne 0x2f310
movslq -0xc58(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rax
movq %rax, -0x848(%rbp)
movq -0x848(%rbp), %rax
movslq (%rax), %rcx
leaq 0xe93d(%rip), %rax      # 0x3dc00
cmpl $0x1, (%rax,%rcx,4)
jle 0x2f30e
movq -0x848(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0xe925(%rip), %rax      # 0x3dc00
cmpl $0x1, (%rax,%rcx,4)
jle 0x2f30e
movq -0x848(%rbp), %rdi
callq 0x23c60
movslq -0xc58(%rbp), %rax
movl $0x2, -0xa50(%rbp,%rax,4)
movl -0xc54(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc54(%rbp)
jmp 0x2f310
jmp 0x2f312
jmp 0x2f314
cmpl $0x0, -0xc54(%rbp)
jle 0x2f322
jmp 0x2f4b0
movl $0x0, -0x24(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x2f374
movslq -0x10(%rbp), %rax
cmpl $0x2, -0xa50(%rbp,%rax,4)
jne 0x2f367
movslq -0x10(%rbp), %rax
movq -0x430(%rbp,%rax,8), %rcx
movl -0x24(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x24(%rbp)
cltq
movq %rcx, -0x830(%rbp,%rax,8)
jmp 0x2f369
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2f330
leaq -0x830(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x4(%rbp), %edx
movl -0x8(%rbp), %ecx
leaq 0x27aef5(%rip), %r8     # 0x2aa280
leaq 0xe96e(%rip), %r9       # 0x3dd00
leaq -0x18(%rbp), %r10
leaq -0x1c(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2fc60
cmpl $0x0, %eax
je 0x2f4ae
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x22b25f(%rip), %eax    # 0x25a620
jge 0x2f3e8
movslq -0x14(%rbp), %rcx
leaq 0xe832(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
cmpl 0xcde1(%rip), %eax      # 0x3c1b8
jge 0x2f3db
jmp 0x2f3e8
jmp 0x2f3dd
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2f3b8
movl -0x14(%rbp), %eax
cmpl 0x22b22f(%rip), %eax    # 0x25a620
jge 0x2f3f8
jmp 0x2f4b0
cmpl $0x0, 0xccb5(%rip)      # 0x3c0b4
je 0x2f41b
leaq -0x830(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
callq 0x2fa60
jmp 0x2f4ac
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x2f48d
movslq -0x14(%rbp), %rax
movq -0x830(%rbp,%rax,8), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpq -0x830(%rbp,%rcx,8), %rax
je 0x2f47e
movslq -0x14(%rbp), %rax
movq -0x830(%rbp,%rax,8), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpq -0x830(%rbp,%rcx,8), %rax
jne 0x2f480
jmp 0x2f48d
jmp 0x2f482
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2f422
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0x2f4aa
leaq -0x830(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
callq 0x2fa60
jmp 0x2f4ac
jmp 0x2f4ae
jmp 0x2f4b0
movq -0xc60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc60(%rbp)
jmp 0x2f138
movl -0x20(%rbp), %eax
subl $0x1, %eax
cltq
cmpl $0x2, -0xa50(%rbp,%rax,4)
jne 0x2f4ee
movl -0x20(%rbp), %eax
subl $0x1, %eax
cltq
movq -0x430(%rbp,%rax,8), %rdi
callq 0x24c40
jmp 0x2f4f0
addq $0xc80, %rsp            # imm = 0xC80
popq %rbp
retq
nopl (%rax)