// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_op(unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
SPIRExpression &CompilerGLSL::emit_op(uint32_t result_type, uint32_t result_id, const string &rhs, bool forwarding,
                                      bool suppress_usage_tracking)
{
	if (forwarding && (forced_temporaries.find(result_id) == end(forced_temporaries)))
	{
		// Just forward it without temporary.
		// If the forward is trivial, we do not force flushing to temporary for this expression.
		if (!suppress_usage_tracking)
			forwarded_temporaries.insert(result_id);

		return set<SPIRExpression>(result_id, rhs, result_type, true);
	}
	else
	{
		// If expression isn't immutable, bind it to a temporary and make the new temporary immutable (they always are).
		statement(declare_temporary(result_type, result_id), rhs, ";");
		return set<SPIRExpression>(result_id, to_name(result_id), result_type, true);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movl %r8d, -0xc4(%rbp)
movq %rcx, %rax
movl -0xc4(%rbp), %ecx
movq %rax, -0xc0(%rbp)
movl %edx, %eax
movq -0xc0(%rbp), %rdx
movl %eax, -0xb8(%rbp)
movl %esi, %eax
movl -0xb8(%rbp), %esi
movl %eax, -0xb4(%rbp)
movq %rdi, %r8
movl -0xb4(%rbp), %edi
movb %r9b, %al
movq %r8, -0x10(%rbp)
movl %edi, -0x14(%rbp)
movl %esi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
andb $0x1, %cl
movb %cl, -0x21(%rbp)
andb $0x1, %al
movb %al, -0x22(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
xorl %eax, %eax
testb $0x1, -0x21(%rbp)
movb %al, -0xa2(%rbp)
je 0x785b2
movq -0xb0(%rbp), %rdi
addq $0x228, %rdi            # imm = 0x228
leaq -0x18(%rbp), %rsi
callq 0x2ff00
movq -0xb0(%rbp), %rdi
movq %rax, -0x30(%rbp)
addq $0x228, %rdi            # imm = 0x228
callq 0x2ff30
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2eb30
movb %al, -0xa2(%rbp)
movb -0xa2(%rbp), %al
testb $0x1, %al
jne 0x785be
jmp 0x7860a
testb $0x1, -0x22(%rbp)
jne 0x785e2
movq -0xb0(%rbp), %rdi
addq $0x260, %rdi            # imm = 0x260
leaq -0x18(%rbp), %rsi
callq 0x2e890
movq %rax, -0x48(%rbp)
movb %dl, -0x40(%rbp)
movq -0xb0(%rbp), %rdi
movl -0x18(%rbp), %esi
movq -0x20(%rbp), %rdx
movb $0x1, -0x49(%rbp)
leaq -0x14(%rbp), %rcx
leaq -0x49(%rbp), %r8
callq 0xa25f0
movq %rax, -0x8(%rbp)
jmp 0x786fa
movq -0xb0(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq -0x70(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x77f90
movq -0xb0(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq 0xd0a66(%rip), %rcx     # 0x1490a6
callq 0xa2650
jmp 0x78647
leaq -0x70(%rbp), %rdi
callq 0x7708
movq -0xb0(%rbp), %rsi
movl -0x18(%rbp), %edx
movl %edx, -0xe4(%rbp)
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq -0xa0(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
movl $0x1, %ecx
callq *%rax
movq -0xb0(%rbp), %rdi
movl -0xe4(%rbp), %esi
movq -0xe0(%rbp), %rdx
movb $0x1, -0xa1(%rbp)
leaq -0x14(%rbp), %rcx
leaq -0xa1(%rbp), %r8
callq 0xa2780
movq %rax, -0xd8(%rbp)
jmp 0x786b0
movq -0xd8(%rbp), %rax
movq %rax, -0x8(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x7708
jmp 0x786fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x7708
jmp 0x78707
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x7708
jmp 0x78707
movq -0x8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x7640