// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_binary_func_op_cast(unsigned int, unsigned int, unsigned int, unsigned int, char const*, spirv_cross::SPIRType::BaseType, bool)
void CompilerGLSL::emit_binary_func_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1,
                                            const char *op, SPIRType::BaseType input_type, bool skip_cast_if_equal_type)
{
	string cast_op0, cast_op1;
	auto expected_type = binary_op_bitcast_helper(cast_op0, cast_op1, input_type, op0, op1, skip_cast_if_equal_type);
	auto &out_type = get<SPIRType>(result_type);

	// Special case boolean outputs since relational opcodes output booleans instead of int/uint.
	string expr;
	if (out_type.basetype != input_type && out_type.basetype != SPIRType::Boolean)
	{
		expected_type.basetype = input_type;
		expr = bitcast_glsl_op(out_type, expected_type);
		expr += '(';
		expr += join(op, "(", cast_op0, ", ", cast_op1, ")");
		expr += ')';
	}
	else
	{
		expr += join(op, "(", cast_op0, ", ", cast_op1, ")");
	}

	emit_op(result_type, result_id, expr, should_forward(op0) && should_forward(op1));
	inherit_expression_dependencies(result_id, op0);
	inherit_expression_dependencies(result_id, op1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movl %r8d, %ebx
movl %ecx, %r15d
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r14
movb 0x1b8(%rsp), %al
movq %r9, 0x58(%rsp)
leaq 0x90(%rsp), %rdx
movq %rdx, -0x10(%rdx)
xorl %ecx, %ecx
movq %rcx, -0x8(%rdx)
movb %cl, (%rdx)
leaq 0x70(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq %rcx, -0x8(%rdx)
movb %cl, (%rdx)
movzbl %al, %eax
movl %eax, 0x8(%rsp)
movl %r8d, (%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rdx
leaq 0x60(%rsp), %rcx
leaq 0x1b0(%rsp), %r8
movq %r14, %rsi
movl %r15d, %r9d
callq 0x35fe4
movq %r14, %rdi
movl %r12d, %esi
callq 0xa3ea
leaq 0x48(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
movl 0xc(%rax), %ecx
movl 0x1b0(%rsp), %edx
cmpl %edx, %ecx
sete %sil
cmpl $0x2, %ecx
sete %cl
orb %sil, %cl
je 0x3a346
leaq 0x80735(%rip), %rax     # 0xbaa15
movq %rax, (%rsp)
leaq 0x88986(%rip), %rdx     # 0xc2c71
leaq 0x7fdb9(%rip), %r8      # 0xba0ab
leaq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x80(%rsp), %rcx
leaq 0x60(%rsp), %r9
callq 0x53fcf
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x60b0
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a411
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3a411
leaq 0xa0(%rsp), %rcx
movl %edx, 0xc(%rcx)
movq (%r14), %r8
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq *0x168(%r8)
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %r13
movq %r13, %rsi
callq 0x6310
movq (%r13), %rdi
leaq 0x28(%rsp), %r13
cmpq %r13, %rdi
je 0x3a393
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rdi
movl $0x28, %esi
callq 0x6230
leaq 0x8066c(%rip), %rax     # 0xbaa15
movq %rax, (%rsp)
leaq 0x888bd(%rip), %rdx     # 0xc2c71
leaq 0x7fcf0(%rip), %r8      # 0xba0ab
leaq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x80(%rsp), %rcx
leaq 0x60(%rsp), %r9
callq 0x53fcf
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x60b0
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x3a402
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rdi
movl $0x29, %esi
callq 0x6230
movq %r14, %rdi
movl %r15d, %esi
callq 0x39684
testb %al, %al
je 0x3a42c
movq %r14, %rdi
movl %ebx, %esi
callq 0x39684
jmp 0x3a42e
xorl %eax, %eax
movzbl %al, %r8d
leaq 0x38(%rsp), %rcx
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
xorl %r9d, %r9d
callq 0x3942c
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x1616c
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1616c
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x3a47c
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xc1f5d(%rip), %rax     # 0xfc3e0
addq $0x10, %rax
leaq 0x140(%rsp), %rbx
movq %rax, -0xa0(%rbx)
movq %rbx, %rdi
callq 0xde80
movq -0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x3a4b7
movq 0x118(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a4fc
movq 0xf8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0xd8(%rsp)
movl %eax, 0xe0(%rsp)
movq %rax, 0xe8(%rsp)
movl %eax, 0xf0(%rsp)
movq %rax, 0xf8(%rsp)
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x3a519
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3a535
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3a55a
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
jne 0x3a58e
jmp 0x3a5ae
jmp 0x3a5ab
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a5ae
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3a5ae
jmp 0x3a5ab
jmp 0x3a5ab
movq %rax, %rbx
jmp 0x3a5ca
movq %rax, %rbx
jmp 0x3a5d7
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x3a5ca
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xa0(%rsp), %rdi
callq 0x1be02
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3a5f3
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3a618
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0