// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x10, %rsp
cmpq %rsi, 0x3d0(%rdi)
jbe 0xd0cf
movq %rsi, %rbx
movq %rdi, %r14
callq 0xce32
movl %eax, %ebp
movq 0x3d8(%r14), %rax
decl (%rax,%rbx,4)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xce32
cmpl %eax, %ebp
jne 0xcf73
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd0ee
xorl %r12d, %r12d
movq 0x3c0(%r14), %rax
cmpq (%rax,%rbx,8), %r12
jae 0xcfbc
movq 0x3b8(%r14), %rax
movq (%rax,%rbx,8), %rax
movq (%rax,%r12,8), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xcef4
testl %eax, %eax
je 0xcfb7
movq %r14, %rdi
movq %r15, %rsi
callq 0xd0ee
incq %r12
jmp 0xcf81
movq 0x470(%r14), %rdi
movq 0x478(%r14), %rsi
leaq 0x8(%rsp), %rcx
movq %rbx, %rdx
callq 0xd1df
movl %eax, %ebp
testl %eax, %eax
je 0xcff5
leaq 0x470(%r14), %rdi
leaq 0x478(%r14), %rsi
movq 0x8(%rsp), %rdx
callq 0xd20a
movq %r14, %rdi
movq %rbx, %rsi
callq 0xce7e
testl %eax, %eax
je 0xd016
testl %ebp, %ebp
je 0xd04b
leaq 0x480(%r14), %rdi
movl $0x488, %eax            # imm = 0x488
jmp 0xd026
testl %ebp, %ebp
je 0xd08d
leaq 0x490(%r14), %rdi
movl $0x498, %eax            # imm = 0x498
addq %rax, %r14
leaq 0x50e50(%rip), %rax     # 0x5de80
movq (%rax), %rax
movq (%rax,%rbx,8), %rdx
movq %r14, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xce63
movq 0x480(%r14), %rdi
movq 0x488(%r14), %rsi
leaq 0x8(%rsp), %rcx
movq %rbx, %rdx
callq 0xd1df
testl %eax, %eax
jne 0xcf66
leaq 0x20f0e(%rip), %rdi     # 0x2df83
leaq 0x20e48(%rip), %rsi     # 0x2dec4
leaq 0x20ee2(%rip), %rcx     # 0x2df65
movl $0x2f6, %edx            # imm = 0x2F6
callq 0x4180
movq 0x490(%r14), %rdi
movq 0x498(%r14), %rsi
leaq 0x8(%rsp), %rcx
movq %rbx, %rdx
callq 0xd1df
testl %eax, %eax
jne 0xcf66
leaq 0x20efc(%rip), %rdi     # 0x2dfb3
leaq 0x20e06(%rip), %rsi     # 0x2dec4
leaq 0x20ea0(%rip), %rcx     # 0x2df65
movl $0x2fc, %edx            # imm = 0x2FC
callq 0x4180
leaq 0x20e83(%rip), %rdi     # 0x2df59
leaq 0x20de7(%rip), %rsi     # 0x2dec4
leaq 0x20e81(%rip), %rcx     # 0x2df65
movl $0x2d9, %edx            # imm = 0x2D9
callq 0x4180