// File: /workspace/github_c_makefile_star2_O1/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, 0x28(%rsp)
movq 0x18(%rsi), %rax
testq %rax, %rax
je 0x3fe7a
movq %rdi, %r12
movq %rax, %rdx
movq %rax, 0x20(%rsp)
movzwl (%rdx), %eax
testb %al, %al
jle 0x3fe68
xorl %r14d, %r14d
movq %rdx, 0x30(%rsp)
movq 0x18(%rdx,%r14,8), %rcx
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x3fc72
testq %rcx, %rcx
je 0x3fe56
movq %rcx, 0x18(%rsp)
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x3fd33
movq %rax, %r15
movq %rax, 0x8(%rsp)
movq 0x8(%r15), %r15
movsbl (%r15), %eax
testw %ax, %ax
jle 0x3fd21
movswl %ax, %ebp
decl %ebp
incq %rbp
movq 0x10(%r15,%rbp,8), %r13
cmpw $0x100, (%r15)          # imm = 0x100
jb 0x3fcbc
testq %r13, %r13
jne 0x3fcbc
xorl %r13d, %r13d
jmp 0x3fd1c
cmpq $0x0, 0x8(%r13)
je 0x3fcec
cmpq %r12, %r13
je 0x3fcf5
movq %r12, %rdi
movq %r13, %rsi
movl 0x4(%rsp), %edx
callq 0x3c373
testl %eax, %eax
js 0x3fcfe
sete %al
setne %cl
movzbl %cl, %ecx
leal (%rcx,%rcx,2), %ebx
addl $0xd, %ebx
jmp 0x3fd18
movl $0xd, %ebx
movb $0x1, %al
jmp 0x3fd18
movl $0xf, %ebx
xorl %eax, %eax
jmp 0x3fd18
movl (%r13), %eax
andl $0x7f, %eax
cmpl $0x43, %eax
sete %al
movl $0x1, %ebx
movl $0xd, %ecx
cmovel %ecx, %ebx
testb %al, %al
je 0x3fd38
decq %rbp
jg 0x3fca5
movq 0x8(%rsp), %rax
cmpq %rax, %r15
jne 0x3fc8c
xorl %ebx, %ebx
jmp 0x3fd38
movl $0x9, %ebx
cmpl $0xe, %ebx
jg 0x3fd50
testl %ebx, %ebx
movq 0x18(%rsp), %rbp
je 0x3fd63
cmpl $0x9, %ebx
je 0x3fd63
jmp 0x3fe4c
cmpl $0x10, %ebx
movq 0x18(%rsp), %rbp
je 0x3fda7
cmpl $0xf, %ebx
jne 0x3fe4c
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movl $0x8, %ebx
cmpq %rax, 0x8(%rbp)
je 0x3fe4c
movq %rax, 0x8(%rbp)
movq %r12, %rdi
movq %rbp, %rsi
movq 0x10(%rsp), %rdx
movl 0x4(%rsp), %ecx
callq 0x3fc13
testl %eax, %eax
movl $0x8, %ebx
movl $0x1, %eax
cmovel %eax, %ebx
jmp 0x3fe4c
leaq 0x28(%rbp), %rbx
movq 0x18(%r13), %rsi
movq 0x20(%r13), %rdi
callq 0x13787
movq %rax, %r15
movq %r12, 0x38(%rax)
movq %rbx, %rdi
callq 0x22b10
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2285b
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x2285b
movq %rbp, 0x8(%r15)
movq 0x20(%r15), %rbp
movq 0x10(%rbp), %rax
testq %rax, %rax
jne 0x3fdfd
movq 0x20(%r13), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rbp)
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x2285b
movq %rbp, (%rax)
xorl %ebx, %ebx
testq %rbp, %rbp
je 0x3fe4c
movq %rax, %r15
movl 0x4(%rbp), %eax
cmpl $0x6, %eax
ja 0x3fe2d
movl $0x43, %ecx
btl %eax, %ecx
jb 0x3fe4c
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x12220
movq %r15, 0x8(%rax)
movq %r12, (%rax)
addq $0x8, %rbp
movq %rbp, %rdi
movq %rax, %rsi
callq 0x2285b
testb $0x17, %bl
movq 0x30(%rsp), %rdx
jne 0x3fe81
incq %r14
movl (%rdx), %eax
movsbq %al, %rcx
cmpq %rcx, %r14
jl 0x3fc5a
movq 0x10(%rdx), %rdx
movq 0x20(%rsp), %rax
cmpq %rax, %rdx
jne 0x3fc47
movl $0x1, %eax
jmp 0x3fe89
xorl %eax, %eax
testb $0x1d, %bl
sete %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq