// File: /workspace/github_cpp_makefile_star2_O1/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 0x36738
movq %r14, %rdi
movl %r12d, %esi
callq 0xa426
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 0x3ab50
leaq 0x80f3b(%rip), %rax     # 0xbba25
movq %rax, (%rsp)
leaq 0x891ac(%rip), %rdx     # 0xc3ca1
leaq 0x805bf(%rip), %r8      # 0xbb0bb
leaq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x80(%rsp), %rcx
leaq 0x60(%rsp), %r9
callq 0x547c9
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 0x3ac1b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3ac1b
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 0x3ab9d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rdi
movl $0x28, %esi
callq 0x6230
leaq 0x80e72(%rip), %rax     # 0xbba25
movq %rax, (%rsp)
leaq 0x890e3(%rip), %rdx     # 0xc3ca1
leaq 0x804f6(%rip), %r8      # 0xbb0bb
leaq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x80(%rsp), %rcx
leaq 0x60(%rsp), %r9
callq 0x547c9
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x60b0
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x3ac0c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rdi
movl $0x29, %esi
callq 0x6230
movq %r14, %rdi
movl %r15d, %esi
callq 0x39e96
testb %al, %al
je 0x3ac36
movq %r14, %rdi
movl %ebx, %esi
callq 0x39e96
jmp 0x3ac38
xorl %eax, %eax
movzbl %al, %r8d
leaq 0x38(%rsp), %rcx
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
xorl %r9d, %r9d
callq 0x39bea
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x164e0
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x164e0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x3ac86
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xc2723(%rip), %rax     # 0xfd3b0
addq $0x10, %rax
leaq 0x140(%rsp), %rbx
movq %rax, -0xa0(%rbx)
movq %rbx, %rdi
callq 0xdeb6
movq -0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x3acc1
movq 0x118(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0x3ad06
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 0x3ad23
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3ad3f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3ad64
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 0x3ad98
jmp 0x3adb8
jmp 0x3adb5
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3adb8
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3adb8
jmp 0x3adb5
jmp 0x3adb5
movq %rax, %rbx
jmp 0x3add4
movq %rax, %rbx
jmp 0x3ade1
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x3add4
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xa0(%rsp), %rdi
callq 0x1c438
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3adfd
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3ae22
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0