// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::bitcast_glsl_op[abi:cxx11](spirv_cross::SPIRType const&, spirv_cross::SPIRType const&)
string CompilerHLSL::bitcast_glsl_op(const SPIRType &out_type, const SPIRType &in_type)
{
	if (out_type.basetype == SPIRType::UInt && in_type.basetype == SPIRType::Int)
		return type_to_glsl(out_type);
	else if (out_type.basetype == SPIRType::UInt64 && in_type.basetype == SPIRType::Int64)
		return type_to_glsl(out_type);
	else if (out_type.basetype == SPIRType::UInt && in_type.basetype == SPIRType::Float)
		return "asuint";
	else if (out_type.basetype == SPIRType::Int && in_type.basetype == SPIRType::UInt)
		return type_to_glsl(out_type);
	else if (out_type.basetype == SPIRType::Int64 && in_type.basetype == SPIRType::UInt64)
		return type_to_glsl(out_type);
	else if (out_type.basetype == SPIRType::Int && in_type.basetype == SPIRType::Float)
		return "asint";
	else if (out_type.basetype == SPIRType::Float && in_type.basetype == SPIRType::UInt)
		return "asfloat";
	else if (out_type.basetype == SPIRType::Float && in_type.basetype == SPIRType::Int)
		return "asfloat";
	else if (out_type.basetype == SPIRType::Int64 && in_type.basetype == SPIRType::Double)
		SPIRV_CROSS_THROW("Double to Int64 is not supported in HLSL.");
	else if (out_type.basetype == SPIRType::UInt64 && in_type.basetype == SPIRType::Double)
		SPIRV_CROSS_THROW("Double to UInt64 is not supported in HLSL.");
	else if (out_type.basetype == SPIRType::Double && in_type.basetype == SPIRType::Int64)
		return "asdouble";
	else if (out_type.basetype == SPIRType::Double && in_type.basetype == SPIRType::UInt64)
		return "asdouble";
	else if (out_type.basetype == SPIRType::Half && in_type.basetype == SPIRType::UInt && in_type.vecsize == 1)
	{
		if (!requires_explicit_fp16_packing)
		{
			requires_explicit_fp16_packing = true;
			force_recompile = true;
		}
		return "SPIRV_Cross_unpackFloat2x16";
	}
	else if (out_type.basetype == SPIRType::UInt && in_type.basetype == SPIRType::Half && in_type.vecsize == 2)
	{
		if (!requires_explicit_fp16_packing)
		{
			requires_explicit_fp16_packing = true;
			force_recompile = true;
		}
		return "SPIRV_Cross_packFloat2x16";
	}
	else
		return "";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0xc(%rdx), %r8d
movl %r8d, %eax
xorl $0x5, %eax
movl 0xc(%rcx), %edi
movl %edi, %ebp
xorl $0x4, %ebp
movl %eax, %r9d
orl %ebp, %r9d
je 0x6ca8f
movl %r8d, %r11d
xorl $0x7, %r11d
movl %edi, %r9d
xorl $0x6, %r9d
movl %r11d, %r10d
orl %r9d, %r10d
jne 0x6caaf
movq (%rsi), %rax
movq %rbx, %rdi
xorl %ecx, %ecx
callq *0x98(%rax)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edi, %r12d
xorl $0xa, %r12d
movl %eax, %r10d
orl %r12d, %r10d
jne 0x6cadd
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x51542(%rip), %rsi     # 0xbe00e
leaq 0x51541(%rip), %rdx     # 0xbe014
movq %rbx, %rdi
callq 0x7be0
jmp 0x6ca9d
movl %r8d, %r13d
xorl $0x4, %r13d
movl %edi, %r10d
xorl $0x5, %r10d
movl %r13d, %r14d
orl %r10d, %r14d
je 0x6ca8f
movl %r8d, %r15d
xorl $0x6, %r15d
movl %edi, %r14d
xorl $0x7, %r14d
movl %r15d, 0x4(%rsp)
movl %r14d, (%rsp)
orl %r14d, %r15d
je 0x6ca8f
orl %r12d, %r13d
jne 0x6cb2b
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x514f3(%rip), %rsi     # 0xbe015
leaq 0x514f1(%rip), %rdx     # 0xbe01a
jmp 0x6cad3
movl %r8d, %edx
xorl $0xa, %edx
movl %edx, %r15d
orl %r10d, %r15d
je 0x6cb3d
orl %ebp, %edx
jne 0x6cb57
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x514d0(%rip), %rsi     # 0xbe01b
leaq 0x514d0(%rip), %rdx     # 0xbe022
jmp 0x6cad3
movl %edi, %edx
xorl $0xb, %edx
orl %edx, 0x4(%rsp)
je 0x6cc34
orl %edx, %r11d
je 0x6cc9a
movl %r8d, %edx
xorl $0xb, %edx
orl %edx, %r9d
je 0x6cb7f
orl (%rsp), %edx
jne 0x6cb99
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x514eb(%rip), %rsi     # 0xbe078
leaq 0x514ec(%rip), %rdx     # 0xbe080
jmp 0x6cad3
xorl $0x9, %r8d
orl %r10d, %r8d
movl 0x14(%rcx), %ecx
movl %ecx, %edx
xorl $0x1, %edx
orl %r8d, %edx
jne 0x6cbde
cmpb $0x0, 0x793(%rsi)
jne 0x6cbc4
movb $0x1, %al
movb %al, 0x793(%rsi)
movb %al, 0x1d0(%rsi)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x514af(%rip), %rsi     # 0xbe081
leaq 0x514c3(%rip), %rdx     # 0xbe09c
jmp 0x6cad3
xorl $0x9, %edi
orl %edi, %eax
xorl $0x2, %ecx
orl %eax, %ecx
jne 0x6cc1b
cmpb $0x0, 0x793(%rsi)
jne 0x6cc01
movb $0x1, %al
movb %al, 0x793(%rsi)
movb %al, 0x1d0(%rsi)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x5148e(%rip), %rsi     # 0xbe09d
leaq 0x514a0(%rip), %rdx     # 0xbe0b6
jmp 0x6cad3
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x47c86(%rip), %rdx     # 0xb48af
movq %rbx, %rdi
movq %rdx, %rsi
jmp 0x6cad6
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x513d2(%rip), %rsi     # 0xbe023
leaq 0x513f4(%rip), %rdx     # 0xbe04c
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0x8f14f(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x8f127(%rip), %rsi     # 0xfbdb0
movq 0x90348(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
jmp 0x6ccfe
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x51396(%rip), %rsi     # 0xbe04d
leaq 0x513b9(%rip), %rdx     # 0xbe077
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0x8f0e9(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x8f0c1(%rip), %rsi     # 0xfbdb0
movq 0x902e2(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
jmp 0x6cd02
jmp 0x6cd23
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6cd1c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x6cd26
jmp 0x6cd2e
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64a0