// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/memops.c
// Function: find_dominating_parents
static int find_dominating_parents(struct instruction *insn,
	struct basic_block *bb, struct pseudo_list **dominators,
	int local)
{
	struct basic_block *parent;

	FOR_EACH_PTR(bb->parents, parent) {
		struct instruction *phisrc;
		struct instruction *one;
		pseudo_t phi;

		FOR_EACH_PTR_REVERSE(parent->insns, one) {
			int dominance;
			if (!one->bb)
				continue;
			if (one == insn)
				goto no_dominance;
			dominance = dominates(insn, one, local);
			if (dominance < 0) {
				if (one->opcode == OP_LOAD)
					continue;
				return 0;
			}
			if (!dominance)
				continue;
			goto found_dominator;
		} END_FOR_EACH_PTR_REVERSE(one);
no_dominance:
		if (parent->generation == bb->generation)
			continue;
		parent->generation = bb->generation;

		if (!find_dominating_parents(insn, parent, dominators, local))
			return 0;
		continue;

found_dominator:
		phisrc = alloc_phisrc(one->target, one->type);
		phisrc->phi_node = insn;
		insert_last_instruction(parent, phisrc);
		phi = phisrc->target;
		phi->ident = phi->ident ? : one->target->ident;
		use_pseudo(insn, phi, add_pseudo(dominators, phi));
	} END_FOR_EACH_PTR(parent);
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, 0x4(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x18(%rsi), %rcx
movl $0x1, %eax
testq %rcx, %rcx
je 0x3edc0
movq %rdi, %r12
movq %rcx, %rbx
movq %rcx, 0x20(%rsp)
movzwl (%rbx), %eax
testb %al, %al
jle 0x3eda5
xorl %r15d, %r15d
movq %rbx, 0x18(%rsp)
movq 0x18(%rbx,%r15,8), %r13
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x3ec33
testq %r13, %r13
je 0x3ed93
movq 0x28(%r13), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x3ecb3
leaq 0x28(%r13), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rsp), %rbx
movq 0x8(%rbx), %rbx
movsbl (%rbx), %eax
testw %ax, %ax
jle 0x3ecac
cwtl
decl %eax
movzwl %ax, %ebp
incq %rbp
movq 0x10(%rbx,%rbp,8), %r14
cmpw $0x100, (%rbx)          # imm = 0x100
jb 0x3ec75
testq %r14, %r14
je 0x3eca7
cmpq $0x0, 0x8(%r14)
je 0x3eca7
cmpq %r12, %r14
je 0x3ecb3
movq %r12, %rdi
movq %r14, %rsi
movl 0x4(%rsp), %edx
callq 0x3b44a
testl %eax, %eax
js 0x3ec98
je 0x3eca7
jmp 0x3ecf0
movl (%r14), %eax
andl $0x7f, %eax
cmpl $0x43, %eax
jne 0x3edbe
decq %rbp
jg 0x3ec64
cmpq 0x8(%rsp), %rbx
jne 0x3ec4f
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
cmpq %rax, 0x8(%r13)
movq 0x18(%rsp), %rbx
je 0x3ed93
movq %rax, 0x8(%r13)
movq %r12, %rdi
movq %r13, %rsi
movq 0x10(%rsp), %rdx
movl 0x4(%rsp), %ecx
callq 0x3ebcf
testl %eax, %eax
jne 0x3ed93
jmp 0x3edbe
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
callq 0x137e4
movq %rax, %rbp
movq %r12, 0x38(%rax)
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x22a6b
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x227b4
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x227b4
movq %r13, 0x8(%rbp)
movq 0x20(%rbp), %r13
movq 0x10(%r13), %rax
testq %rax, %rax
movq 0x18(%rsp), %rbx
jne 0x3ed4c
movq 0x20(%r14), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%r13)
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x227b4
movq %rax, %r14
movq %r13, (%rax)
movl 0x4(%r13), %eax
cmpl $0x6, %eax
ja 0x3ed76
movl $0x43, %ecx
btl %eax, %ecx
jb 0x3ed93
xorl %edi, %edi
callq 0x12264
movq %r14, 0x8(%rax)
movq %r12, (%rax)
addq $0x8, %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x227b4
incq %r15
movl (%rbx), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jl 0x3ec1b
movq 0x10(%rbx), %rbx
movq 0x20(%rsp), %rcx
cmpq %rcx, %rbx
jne 0x3ec08
movl $0x1, %eax
jmp 0x3edc0
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq