// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::inherit_expression_dependencies(unsigned int, unsigned int)
void Compiler::inherit_expression_dependencies(uint32_t dst, uint32_t source_expression)
{
	// Don't inherit any expression dependencies if the expression in dst
	// is not a forwarded temporary.
	if (forwarded_temporaries.find(dst) == end(forwarded_temporaries) ||
	    forced_temporaries.find(dst) != end(forced_temporaries))
	{
		return;
	}

	auto &e = get<SPIRExpression>(dst);
	auto *phi = maybe_get<SPIRVariable>(source_expression);
	if (phi && phi->phi_variable)
	{
		// We have used a phi variable, which can change at the end of the block,
		// so make sure we take a dependency on this phi variable.
		phi->dependees.push_back(dst);
	}

	auto *s = maybe_get<SPIRExpression>(source_expression);
	if (!s)
		return;

	auto &e_deps = e.expression_dependencies;
	auto &s_deps = s->expression_dependencies;

	// If we depend on a expression, we also depend on all sub-dependencies from source.
	e_deps.push_back(source_expression);
	e_deps.insert(end(e_deps), begin(s_deps), end(s_deps));

	// Eliminate duplicated dependencies.
	sort(begin(e_deps), end(e_deps));
	e_deps.erase(unique(begin(e_deps), end(e_deps)), end(e_deps));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %r14
movq %rsp, %rax
movl %esi, (%rax)
movl %edx, 0x4(%rsp)
addq $0x260, %rdi            # imm = 0x260
movq %rax, %rsi
callq 0x21122
testq %rax, %rax
je 0x161a9
leaq 0x228(%r14), %rdi
movq %rsp, %rsi
callq 0x21122
testq %rax, %rax
je 0x161b4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl (%rsp), %esi
movq %r14, %rdi
callq 0x1b42a
movq %rax, %rbx
movq %r14, %rdi
movl %ebp, %esi
callq 0xc7b4
testq %rax, %rax
je 0x161ff
cmpb $0x1, 0x5a(%rax)
jne 0x161ff
movq 0x48(%rax), %rsi
cmpq 0x50(%rax), %rsi
je 0x161f0
movl (%rsp), %ecx
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rax)
jmp 0x161ff
addq $0x40, %rax
movq %rsp, %rdx
movq %rax, %rdi
callq 0x797e
movq %r14, %rdi
movl %ebp, %esi
callq 0x1b3b6
testq %rax, %rax
je 0x161a9
movq %rax, %r14
movq %rbx, %r15
addq $0x40, %r15
movq 0x48(%rbx), %rsi
cmpq 0x50(%rbx), %rsi
je 0x1622e
movl %ebp, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rbx)
jmp 0x1623f
leaq 0x4(%rsp), %rdx
movq %r15, %rdi
callq 0x797e
movq 0x48(%rbx), %rsi
movq 0x40(%r14), %rdx
movq 0x48(%r14), %rcx
movq %r15, %rdi
callq 0x212f6
movq 0x40(%rbx), %r14
movq 0x48(%rbx), %r15
cmpq %r15, %r14
je 0x161a9
movq %r15, %rax
subq %r14, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x214b1
movq %r14, %rdi
movq %r15, %rsi
callq 0x21594
movq 0x40(%rbx), %rcx
movq 0x48(%rbx), %rax
cmpq %rax, %rcx
je 0x161a9
addq $0x4, %rcx
cmpq %rax, %rcx
je 0x161a9
movl -0x4(%rcx), %edx
leaq 0x4(%rcx), %rsi
cmpl (%rcx), %edx
movq %rsi, %rcx
jne 0x162a2
leaq -0x8(%rsi), %rcx
cmpq %rax, %rsi
je 0x162d7
movl %edx, %edi
movl (%rsi), %edx
cmpl %edx, %edi
je 0x162d1
movl %edx, 0x4(%rcx)
addq $0x4, %rcx
addq $0x4, %rsi
jmp 0x162bd
addq $0x4, %rcx
cmpq %rax, %rcx
je 0x161a9
movq %rcx, 0x48(%rbx)
jmp 0x161a9
nop