// File: /workspace/github_c_makefile_star2_O2/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, %ebp
movq %rdx, 0x8(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x18(%rsi), %rcx
pushq $0x1
popq %rax
testq %rcx, %rcx
je 0x37f2d
movq %rdi, %r12
movq %rcx, %rbx
movq %rcx, 0x20(%rsp)
xorl %r15d, %r15d
movq %rbx, 0x10(%rsp)
movl (%rbx), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jge 0x37f14
movq 0x18(%rbx,%r15,8), %r13
cmpw $0x100, %ax             # imm = 0x100
jb 0x37dad
testq %r13, %r13
je 0x37f0c
movq %r15, 0x18(%rsp)
movq 0x28(%r13), %rax
movq %rax, (%rsp)
testq %rax, %rax
je 0x37e28
leaq 0x28(%r13), %rax
movq %rax, 0x28(%rsp)
movq (%rsp), %rbx
movq 0x8(%rbx), %rbx
movsbq (%rbx), %rax
movl %eax, %r15d
testl %r15d, %r15d
jle 0x37e22
movq 0x10(%rbx,%r15,8), %r14
cmpw $0x100, (%rbx)          # imm = 0x100
jb 0x37ded
testq %r14, %r14
je 0x37e1d
cmpq $0x0, 0x8(%r14)
je 0x37e1d
cmpq %r12, %r14
je 0x37e28
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x34adb
testl %eax, %eax
js 0x37e0e
je 0x37e1d
jmp 0x37e68
movl (%r14), %eax
andl $0x7f, %eax
cmpl $0x43, %eax
jne 0x37f2b
decq %r15
jmp 0x37dd7
cmpq (%rsp), %rbx
jne 0x37dcc
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
cmpq %rax, 0x8(%r13)
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r15
je 0x37f0c
movq %rax, 0x8(%r13)
movq %r12, %rdi
movq %r13, %rsi
movq 0x8(%rsp), %rdx
movl %ebp, %ecx
callq 0x37d4d
testl %eax, %eax
jne 0x37f0c
jmp 0x37f2b
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
callq 0x12d3c
movq %rax, %r15
movq %r12, 0x38(%rax)
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x1fd69
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1fae9
movq %rbx, %rdi
movq (%rsp), %rsi
callq 0x1fae9
movq %r13, 0x8(%r15)
movq 0x20(%r15), %r13
movq 0x10(%r13), %rax
testq %rax, %rax
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r15
jne 0x37ec7
movq 0x20(%r14), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%r13)
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x1fae9
movq %rax, %r14
movq %r13, (%rax)
movl 0x4(%r13), %eax
cmpl $0x6, %eax
ja 0x37eef
pushq $0x43
popq %rcx
btl %eax, %ecx
jb 0x37f0c
xorl %edi, %edi
callq 0x119b4
movq %r14, 0x8(%rax)
movq %r12, (%rax)
addq $0x8, %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x1fae9
incq %r15
jmp 0x37d8a
movq 0x10(%rbx), %rbx
movq 0x20(%rsp), %rcx
cmpq %rcx, %rbx
jne 0x37d82
pushq $0x1
popq %rax
jmp 0x37f2d
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq