// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::binary_op_bitcast_helper(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, spirv_cross::SPIRType::BaseType&, unsigned int, unsigned int, bool)
SPIRType CompilerGLSL::binary_op_bitcast_helper(string &cast_op0, string &cast_op1, SPIRType::BaseType &input_type,
                                                uint32_t op0, uint32_t op1, bool skip_cast_if_equal_type)
{
	auto &type0 = expression_type(op0);
	auto &type1 = expression_type(op1);

	// We have to bitcast if our inputs are of different type, or if our types are not equal to expected inputs.
	// For some functions like OpIEqual and INotEqual, we don't care if inputs are of different types than expected
	// since equality test is exactly the same.
	bool cast = (type0.basetype != type1.basetype) || (!skip_cast_if_equal_type && type0.basetype != input_type);

	// Create a fake type so we can bitcast to it.
	// We only deal with regular arithmetic types here like int, uints and so on.
	SPIRType expected_type;
	expected_type.basetype = input_type;
	expected_type.vecsize = type0.vecsize;
	expected_type.columns = type0.columns;
	expected_type.width = type0.width;

	if (cast)
	{
		cast_op0 = bitcast_glsl(expected_type, op0);
		cast_op1 = bitcast_glsl(expected_type, op1);
	}
	else
	{
		// If we don't cast, our actual input type is that of the first (or second) argument.
		cast_op0 = to_enclosed_unpacked_expression(op0);
		cast_op1 = to_enclosed_unpacked_expression(op1);
		input_type = type0.basetype;
	}

	return expected_type;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r14
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
movl 0x70(%rsp), %ebp
movb 0x78(%rsp), %r12b
movq %rsi, %rdi
movl %r9d, 0x4(%rsp)
movl %r9d, %esi
callq 0x104b0
movq %rax, %r13
movq %r15, %rdi
movl %ebp, %esi
callq 0x104b0
movl 0xc(%r13), %ecx
cmpl 0xc(%rax), %ecx
setne %bpl
orb %bpl, %r12b
movq %r14, %r12
jne 0x2d23a
cmpl (%r12), %ecx
setne %bpl
movq %rbx, %rdi
callq 0x179b2
movl (%r12), %eax
movl %eax, 0xc(%rbx)
movl 0x18(%r13), %eax
movl %eax, 0x18(%rbx)
movq 0x10(%r13), %rax
movq %rax, 0x10(%rbx)
testb %bpl, %bpl
je 0x2d2bb
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl 0x4(%rsp), %ecx
callq 0x2d344
leaq 0x18(%rsp), %r14
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x6320
movq %r14, %rdi
callq 0x6548
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl 0x70(%rsp), %ecx
callq 0x2d344
leaq 0x18(%rsp), %r14
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x6320
movq %r14, %rdi
callq 0x6548
jmp 0x2d319
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movl 0x4(%rsp), %edx
callq 0x2bfb0
leaq 0x18(%rsp), %r14
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x6320
movq %r14, %rdi
callq 0x6548
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movl 0x70(%rsp), %edx
callq 0x2bfb0
leaq 0x18(%rsp), %r14
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x6320
movq %r14, %rdi
callq 0x6548
movl 0xc(%r13), %eax
movl %eax, (%r12)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2d331
jmp 0x2d331
jmp 0x2d331
movq %rax, %r14
movq %rbx, %rdi
callq 0x17a3e
movq %r14, %rdi
callq 0x64b0