// File: /workspace/github_c_makefile_star2_O3/oridb[P]mc/6/ra.c
// Function: decdegree
static void
decdegree(Isel *s, regid m)
{
	int before, after;
	int found;
	size_t idx, i;
	regid n;

	assert(m < s->nreg);
	before = istrivial(s, m);
	s->degree[m]--;
	after = istrivial(s, m);

	if (before != after) {
		enablemove(s, m);
		for (i = 0; i < s->ngadj[m]; i++) {
			n = s->gadj[m][i];
			if (adjavail(s, n))
				enablemove(s, n);
		}

		/* Subtle:
		 *
		 * If this code is being called from coalesce(),
		 * then the degree could have been bumped up only
		 * temporarily. This means that the node can already
		 * be on wlfreeze or wlsimp.
		 *
		 * Therefore, if we don't find it on wlspill, we assert
		 * that the node is already on the list that we'd be
		 * moving it to.
		 */
		found = wlfind(s->wlspill, s->nwlspill, m, &idx);
		if (found)
			wldel(s, &s->wlspill, &s->nwlspill, idx);
		if (moverelated(s, m)) {
			if (!found) {
				assert(wlfind(s->wlfreeze, s->nwlfreeze, m, &idx) != 0);
			} else {
				wlput(&s->wlfreeze, &s->nwlfreeze, locmap[m]);
			}
		} else {
			if (!found) {
				assert(wlfind(s->wlsimp, s->nwlsimp, m, &idx));
			} else {
				wlput(&s->wlsimp, &s->nwlsimp, locmap[m]);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq %rsi, 0x3d0(%rdi)
jbe 0xe36f
movq %rsi, %rbx
movq %rdi, %r14
movq 0x3d8(%rdi), %r15
movq %r15, %rdi
callq 0xe08c
movl %eax, %ebp
decl (%r15,%rbx,4)
movq %r15, %rdi
movq %rbx, %rsi
callq 0xe08c
cmpl %eax, %ebp
je 0xe31a
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe38e
movq 0x3c0(%r14), %r13
cmpq $0x0, (%r13,%rbx,8)
je 0xe237
xorl %r12d, %r12d
movq 0x3b8(%r14), %rax
movq (%rax,%rbx,8), %rax
movq (%rax,%r12,8), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xe14e
testl %eax, %eax
je 0xe22d
movq %r14, %rdi
movq %r15, %rsi
callq 0xe38e
movq 0x3c0(%r14), %r13
incq %r12
cmpq (%r13,%rbx,8), %r12
jb 0xe1fd
movq 0x478(%r14), %rax
testq %rax, %rax
je 0xe26c
leaq 0x470(%r14), %rdi
movq 0x470(%r14), %rcx
leaq 0x478(%r14), %rsi
xorl %edx, %edx
movq (%rcx,%rdx,8), %r8
cmpq %rbx, 0x10(%r8)
je 0xe2c5
incq %rdx
cmpq %rdx, %rax
jne 0xe25a
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe0c8
testl %eax, %eax
je 0xe329
movq 0x488(%r14), %rax
testq %rax, %rax
je 0xe2a6
movq 0x480(%r14), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
cmpq %rbx, 0x10(%rsi)
je 0xe31a
incq %rdx
cmpq %rdx, %rax
jne 0xe294
leaq 0x23cd6(%rip), %rdi     # 0x31f83
leaq 0x23c10(%rip), %rsi     # 0x31ec4
leaq 0x23caa(%rip), %rcx     # 0x31f65
movl $0x2f6, %edx            # imm = 0x2F6
callq 0x4180
movq $0x0, 0x8(%r8)
callq 0x2cfcc
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe0c8
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
leaq 0x52b95(%rip), %rax     # 0x60e80
movq (%rax), %rax
movq (%rax,%rbx,8), %rbx
shll $0x4, %ecx
leaq (%r14,%rcx), %r15
addq $0x480, %r15            # imm = 0x480
leaq (%r14,%rcx), %rsi
addq $0x488, %rsi            # imm = 0x488
movq %r15, %rdi
movq %rbx, %rdx
callq 0x2ceff
movq %r15, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x498(%r14), %rax
testq %rax, %rax
je 0xe350
movq 0x490(%r14), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
cmpq %rbx, 0x10(%rsi)
je 0xe31a
incq %rdx
cmpq %rdx, %rax
jne 0xe33e
leaq 0x23c5c(%rip), %rdi     # 0x31fb3
leaq 0x23b66(%rip), %rsi     # 0x31ec4
leaq 0x23c00(%rip), %rcx     # 0x31f65
movl $0x2fc, %edx            # imm = 0x2FC
callq 0x4180
leaq 0x23be3(%rip), %rdi     # 0x31f59
leaq 0x23b47(%rip), %rsi     # 0x31ec4
leaq 0x23be1(%rip), %rcx     # 0x31f65
movl $0x2d9, %edx            # imm = 0x2D9
callq 0x4180