// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x3d0(%rcx), %rax
jae 0x14743
jmp 0x14762
leaq 0x3957c(%rip), %rdi     # 0x4dcc6
leaq 0x394e0(%rip), %rsi     # 0x4dc31
movl $0x2d9, %edx            # imm = 0x2D9
leaq 0x39575(%rip), %rcx     # 0x4dcd2
callq 0x6160
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x14530
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x3d8(%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x14530
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
je 0x1498c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x149a0
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x3c0(%rcx), %rcx
movq -0x10(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
jae 0x14822
movq -0x8(%rbp), %rax
movq 0x3b8(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x146a0
cmpl $0x0, %eax
je 0x14812
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x149a0
jmp 0x14814
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x147bb
movq -0x8(%rbp), %rax
movq 0x470(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x478(%rax), %rsi
movq -0x10(%rbp), %rdx
leaq -0x28(%rbp), %rcx
callq 0x14b00
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x14871
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x470, %rsi            # imm = 0x470
movq -0x8(%rbp), %rdx
addq $0x478, %rdx            # imm = 0x478
movq -0x28(%rbp), %rcx
callq 0x14b80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x145d0
cmpl $0x0, %eax
je 0x1490a
cmpl $0x0, -0x1c(%rbp)
jne 0x148d8
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x488(%rax), %rsi
movq -0x10(%rbp), %rdx
leaq -0x28(%rbp), %rcx
callq 0x14b00
cmpl $0x0, %eax
je 0x148b7
jmp 0x148d6
leaq 0x39432(%rip), %rdi     # 0x4dcf0
leaq 0x3936c(%rip), %rsi     # 0x4dc31
movl $0x2f6, %edx            # imm = 0x2F6
leaq 0x39401(%rip), %rcx     # 0x4dcd2
callq 0x6160
jmp 0x14905
movq -0x8(%rbp), %rdi
addq $0x480, %rdi            # imm = 0x480
movq -0x8(%rbp), %rsi
addq $0x488, %rsi            # imm = 0x488
leaq 0x680ab(%rip), %rax     # 0x7c9a0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x14590
jmp 0x1498a
cmpl $0x0, -0x1c(%rbp)
jne 0x1495b
movq -0x8(%rbp), %rax
movq 0x490(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x498(%rax), %rsi
movq -0x10(%rbp), %rdx
leaq -0x28(%rbp), %rcx
callq 0x14b00
cmpl $0x0, %eax
je 0x1493a
jmp 0x14959
leaq 0x393df(%rip), %rdi     # 0x4dd20
leaq 0x392e9(%rip), %rsi     # 0x4dc31
movl $0x2fc, %edx            # imm = 0x2FC
leaq 0x3937e(%rip), %rcx     # 0x4dcd2
callq 0x6160
jmp 0x14988
movq -0x8(%rbp), %rdi
addq $0x490, %rdi            # imm = 0x490
movq -0x8(%rbp), %rsi
addq $0x498, %rsi            # imm = 0x498
leaq 0x68028(%rip), %rax     # 0x7c9a0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x14590
jmp 0x1498a
jmp 0x1498c
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)