// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movl %esi, %ecx
movq 0x260(%rdi), %r8
movq 0x268(%rdi), %r9
xorl %r11d, %r11d
movq %rcx, %rax
xorl %edx, %edx
divq %r9
movq (%r8,%rdx,8), %rax
testq %rax, %rax
je 0x16556
movq (%rax), %r10
movq %rax, %r11
cmpl %esi, 0x8(%r10)
je 0x16556
movq %rdx, %rdi
movq %r10, %r14
movq (%r10), %r10
testq %r10, %r10
je 0x16553
movl 0x8(%r10), %r8d
movq %r8, %rax
xorl %edx, %edx
divq %r9
movl $0x0, %r11d
cmpq %rdi, %rdx
jne 0x16556
movq %r14, %r11
cmpl %esi, %r8d
jne 0x16527
jmp 0x16556
xorl %r11d, %r11d
testq %r11, %r11
je 0x166e4
cmpq $0x0, (%r11)
je 0x166e4
movq 0x228(%rbx), %rdi
movq 0x230(%rbx), %r8
xorl %r10d, %r10d
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x165c8
movq (%rax), %r9
movq %rax, %r10
cmpl %esi, 0x8(%r9)
je 0x165c8
movq %rdx, %rcx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0x165c5
movl 0x8(%r9), %edi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rcx, %rdx
jne 0x165c8
movq %r11, %r10
cmpl %esi, %edi
jne 0x1659a
jmp 0x165c8
xorl %r10d, %r10d
testq %r10, %r10
je 0x165d7
cmpq $0x0, (%r10)
jne 0x166e4
movq %rbx, %rdi
callq 0x1ba86
movq %rax, %r14
movl 0x8(%rsp), %esi
movq %rbx, %rdi
callq 0xc7f4
testq %rax, %rax
je 0x16624
cmpb $0x1, 0x5a(%rax)
jne 0x16624
movq 0x48(%rax), %rsi
cmpq 0x50(%rax), %rsi
je 0x16613
movl 0xc(%rsp), %ecx
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%rax)
jmp 0x16624
addq $0x40, %rax
leaq 0xc(%rsp), %rdx
movq %rax, %rdi
callq 0x7a00
movl 0x8(%rsp), %esi
movq %rbx, %rdi
callq 0x1ba12
testq %rax, %rax
je 0x166e4
movq %rax, %rbx
movq %r14, %r15
addq $0x40, %r15
movq 0x48(%r14), %rsi
cmpq 0x50(%r14), %rsi
je 0x1665d
movl 0x8(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x48(%r14)
jmp 0x1666a
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0x7a00
movq 0x48(%r14), %rsi
movq 0x40(%rbx), %rdx
movq 0x48(%rbx), %rcx
movq %r15, %rdi
callq 0x21960
movq 0x40(%r14), %rbx
movq 0x48(%r14), %r15
cmpq %r15, %rbx
je 0x166b8
movq %r15, %rax
subq %rbx, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21b53
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21c36
movq 0x40(%r14), %rdi
movq 0x48(%r14), %rsi
callq 0x21ea6
movq 0x48(%r14), %rcx
cmpq %rcx, %rax
je 0x166e4
movq 0x48(%r14), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
addq %rsi, %rax
cmpq %rax, %rdx
je 0x166e4
movq %rax, 0x48(%r14)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq