// File: /workspace/github_c_makefile_star2_O1/oridb[P]mc/6/ra.c
// Function: freezemoves
static void
freezemoves(Isel *s, Loc *u)
{
	size_t i;
	Insn **ml;
	Insn *m;
	size_t nml;
	size_t idx;
	Loc *v;

	nml = nodemoves(s, u->reg.id, &ml);
	for (i = 0; i < nml; i++) {
		m = ml[i];
		if (getalias(s, m->args[0]->reg.id) == getalias(s, u->reg.id))
			v = locmap[getalias(s, m->args[1]->reg.id)];
		else
			v = locmap[getalias(s, m->args[0]->reg.id)];

		if (!mldel(&s->mactive, &s->nmactive, s->mactiveset, m))
			mldel(&s->wlmove, &s->nwlmove, s->wlmoveset, m);

		lappend(&s->mfrozen, &s->nmfrozen, m);
		if (!moverelated(s, v->reg.id) && istrivial(s, v->reg.id)) {
			if (!wlfind(s->wlfreeze, s->nwlfreeze, v->reg.id, &idx))
				die("Reg %zd not in freeze wl\n", v->reg.id);
			wldel(s, &s->wlfreeze, &s->nwlfreeze, idx);
			wlput(&s->wlsimp, &s->nwlsimp, v);
		}

	}
	lfree(&ml, &nml);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r14
movq %rsi, 0x50(%rsp)
movq 0x10(%rsi), %rsi
leaq 0x18(%rsp), %rdx
callq 0xe67e
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0xeaa3
leaq 0x448(%r14), %rax
movq %rax, 0x48(%rsp)
leaq 0x450(%r14), %rax
movq %rax, 0x40(%rsp)
leaq 0x460(%r14), %rax
movq %rax, 0x38(%rsp)
leaq 0x468(%r14), %rax
movq %rax, 0x30(%rsp)
leaq 0x430(%r14), %r13
leaq 0x438(%r14), %rbp
leaq 0x480(%r14), %rax
movq %rax, 0x8(%rsp)
leaq 0x488(%r14), %rax
movq %rax, (%rsp)
leaq 0x490(%r14), %rax
movq %rax, 0x28(%rsp)
leaq 0x498(%r14), %rax
movq %rax, 0x20(%rsp)
xorl %ebx, %ebx
movq 0x18(%rsp), %rax
movq (%rax,%rbx,8), %r15
movq 0x10(%r15), %rax
movq 0x10(%rax), %rax
movq 0x3d0(%r14), %rcx
movq 0x3e8(%r14), %rdx
movq %rax, %rsi
cmpq %rax, %rcx
jbe 0xe94c
movq %rax, %rsi
movq (%rdx,%rsi,8), %rdi
testq %rdi, %rdi
je 0xe94c
movq 0x10(%rdi), %rsi
cmpq %rcx, %rsi
jb 0xe93a
movq 0x50(%rsp), %rdi
movq 0x10(%rdi), %rdi
cmpq %rdi, %rcx
jbe 0xe96c
movq (%rdx,%rdi,8), %r8
testq %r8, %r8
je 0xe96c
movq 0x10(%r8), %rdi
cmpq %rcx, %rdi
jb 0xe95a
cmpq %rdi, %rsi
jne 0xe992
movq 0x18(%r15), %rax
movq 0x10(%rax), %rax
cmpq %rax, %rcx
jbe 0xe9a9
movq (%rdx,%rax,8), %rsi
testq %rsi, %rsi
je 0xe9a9
movq 0x10(%rsi), %rax
cmpq %rcx, %rax
jb 0xe97e
jmp 0xe9a9
cmpq %rax, %rcx
jbe 0xe9a9
movq (%rdx,%rax,8), %rsi
testq %rsi, %rsi
je 0xe9a9
movq 0x10(%rsi), %rax
cmpq %rcx, %rax
jb 0xe997
leaq 0x524d0(%rip), %rcx     # 0x60e80
movq (%rcx), %rcx
movq (%rcx,%rax,8), %r12
movq 0x440(%r14), %rdx
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq %r15, %rcx
callq 0xead2
testl %eax, %eax
jne 0xe9ed
movq 0x458(%r14), %rdx
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %r15, %rcx
callq 0xead2
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x2d3ff
movq 0x10(%r12), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xe28d
testl %eax, %eax
jne 0xea95
movq %r14, %rdi
movq %r15, %rsi
callq 0xe24a
testl %eax, %eax
je 0xea95
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq (%rcx), %rsi
movq $-0x1, %rdx
testq %rsi, %rsi
je 0xea56
xorl %edi, %edi
movq (%rax,%rdi,8), %rcx
cmpq %r15, 0x10(%rcx)
setne %cl
je 0xea5a
incq %rdi
cmpq %rdi, %rsi
jne 0xea3f
jmp 0xea5d
movb $0x1, %cl
jmp 0xea5d
movq %rdi, %rdx
testb %cl, %cl
jne 0xeac1
movq (%rax,%rdx,8), %rax
movq $0x0, 0x8(%rax)
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x2d4cc
movq 0x28(%rsp), %r15
movq %r15, %rdi
movq 0x20(%rsp), %rsi
movq %r12, %rdx
callq 0x2d3ff
movq %r15, 0x8(%r12)
incq %rbx
cmpq 0x10(%rsp), %rbx
jb 0xe910
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2d5c5
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x23579(%rip), %rdi     # 0x32041
movq %r15, %rsi
xorl %eax, %eax
callq 0x13a00