// File: /workspace/github_cpp_makefile_star2_O1/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, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
movl 0x70(%rsp), %r12d
movb 0x78(%rsp), %bpl
movq %rsi, %rdi
movl %r9d, 0x4(%rsp)
movl %r9d, %esi
callq 0x12aba
movq %rax, %r13
movq %r15, %rdi
movl %r12d, %esi
movq %r14, %r12
callq 0x12aba
movl 0xc(%r13), %ecx
cmpl 0xc(%rax), %ecx
setne %al
orb %al, %bpl
jne 0x3679a
cmpl (%r12), %ecx
setne %al
xorl %ecx, %ecx
movl %ecx, 0x8(%rbx)
leaq 0xc6c0a(%rip), %rdx     # 0xfd3b0
addq $0x10, %rdx
movq %rdx, (%rbx)
movaps 0x7f44c(%rip), %xmm0    # 0xb5c00
movups %xmm0, 0xc(%rbx)
movq %rcx, 0x48(%rbx)
movl %ecx, 0x50(%rbx)
movq %rcx, 0x58(%rbx)
movb $0x0, 0x60(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movl %ecx, 0x40(%rbx)
movl $0x8, 0x64(%rbx)
movups %xmm0, 0x68(%rbx)
movq %rcx, 0x78(%rbx)
movq %rcx, 0x98(%rbx)
leaq 0xd0(%rbx), %rcx
movq %rcx, 0xa0(%rbx)
movq $0x1, 0xa8(%rbx)
movups %xmm0, 0xb0(%rbx)
movl $0x3f800000, 0xc0(%rbx) # imm = 0x3F800000
movups %xmm0, 0xc8(%rbx)
movl (%r12), %ecx
movl %ecx, 0xc(%rbx)
movl 0x14(%r13), %ecx
movl %ecx, 0x14(%rbx)
movl 0x18(%r13), %ecx
movl %ecx, 0x18(%rbx)
movl 0x10(%r13), %ecx
movl %ecx, 0x10(%rbx)
testb %al, %al
je 0x368c1
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl 0x4(%rsp), %ecx
callq 0x3696a
leaq 0x8(%rsp), %r14
movq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x18(%rsp), %r12
cmpq %r12, %rdi
je 0x36880
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl 0x70(%rsp), %ecx
callq 0x3696a
leaq 0x8(%rsp), %r14
movq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x3693e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3693e
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl 0x4(%rsp), %edx
callq 0x34e3e
leaq 0x8(%rsp), %r14
movq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x18(%rsp), %rbp
cmpq %rbp, %rdi
je 0x368fe
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl 0x70(%rsp), %edx
callq 0x34e3e
leaq 0x8(%rsp), %r14
movq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
cmpq %rbp, %rdi
je 0x36936
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
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 0x36956
jmp 0x36956
jmp 0x36956
movq %rax, %r14
movq %rbx, %rdi
callq 0x1c438
movq %r14, %rdi
callq 0x64a0
nop