// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: image_format_to_type[abi:cxx11](spv::ImageFormat, spirv_cross::SPIRType::BaseType)
static string image_format_to_type(ImageFormat fmt, SPIRType::BaseType basetype)
{
	switch (fmt)
	{
	case ImageFormatR8:
	case ImageFormatR16:
		if (basetype != SPIRType::Float)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "unorm float";
	case ImageFormatRg8:
	case ImageFormatRg16:
		if (basetype != SPIRType::Float)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "unorm float2";
	case ImageFormatRgba8:
	case ImageFormatRgba16:
		if (basetype != SPIRType::Float)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "unorm float4";
	case ImageFormatRgb10A2:
		if (basetype != SPIRType::Float)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "unorm float4";

	case ImageFormatR8Snorm:
	case ImageFormatR16Snorm:
		if (basetype != SPIRType::Float)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "snorm float";
	case ImageFormatRg8Snorm:
	case ImageFormatRg16Snorm:
		if (basetype != SPIRType::Float)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "snorm float2";
	case ImageFormatRgba8Snorm:
	case ImageFormatRgba16Snorm:
		if (basetype != SPIRType::Float)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "snorm float4";

	case ImageFormatR16f:
	case ImageFormatR32f:
		if (basetype != SPIRType::Float)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "float";
	case ImageFormatRg16f:
	case ImageFormatRg32f:
		if (basetype != SPIRType::Float)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "float2";
	case ImageFormatRgba16f:
	case ImageFormatRgba32f:
		if (basetype != SPIRType::Float)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "float4";

	case ImageFormatR11fG11fB10f:
		if (basetype != SPIRType::Float)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "float3";

	case ImageFormatR8i:
	case ImageFormatR16i:
	case ImageFormatR32i:
		if (basetype != SPIRType::Int)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "int";
	case ImageFormatRg8i:
	case ImageFormatRg16i:
	case ImageFormatRg32i:
		if (basetype != SPIRType::Int)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "int2";
	case ImageFormatRgba8i:
	case ImageFormatRgba16i:
	case ImageFormatRgba32i:
		if (basetype != SPIRType::Int)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "int4";

	case ImageFormatR8ui:
	case ImageFormatR16ui:
	case ImageFormatR32ui:
		if (basetype != SPIRType::UInt)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "uint";
	case ImageFormatRg8ui:
	case ImageFormatRg16ui:
	case ImageFormatRg32ui:
		if (basetype != SPIRType::UInt)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "uint2";
	case ImageFormatRgba8ui:
	case ImageFormatRgba16ui:
	case ImageFormatRgba32ui:
		if (basetype != SPIRType::UInt)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "uint4";
	case ImageFormatRgb10a2ui:
		if (basetype != SPIRType::UInt)
			SPIRV_CROSS_THROW("Mismatch in image type and base type of image.");
		return "uint4";

	case ImageFormatUnknown:
		switch (basetype)
		{
		case SPIRType::Float:
			return "float4";
		case SPIRType::Int:
			return "int4";
		case SPIRType::UInt:
			return "uint4";
		default:
			SPIRV_CROSS_THROW("Unsupported base type for image.");
		}

	default:
		SPIRV_CROSS_THROW("Unrecognized typed image format.");
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
cmpl $0x27, %esi
ja 0x50c64
movq %rdi, %rbx
movl %esi, %eax
leaq 0x45a52(%rip), %rcx     # 0x95f5c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x4, %edx
jne 0x50823
leaq 0x468d7(%rip), %rsi     # 0x96dfa
jmp 0x5076e
cmpl $0x4, %edx
jne 0x50787
leaq 0x4d4b5(%rip), %rsi     # 0x9d9ed
jmp 0x5076e
cmpl $0x5, %edx
je 0x50767
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x49632(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x96840(%rip), %rsi     # 0xe6dc0
movq 0x97a59(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
cmpl $0x5, %edx
jne 0x507d5
leaq 0x468d1(%rip), %rsi     # 0x96e75
jmp 0x5076e
cmpl $0x4, %edx
jne 0x50871
leaq 0x41d76(%rip), %rsi     # 0x9232f
jmp 0x5076e
cmpl $0x5, %edx
jne 0x508bf
leaq 0x4d410(%rip), %rsi     # 0x9d9de
jmp 0x5076e
cmpl $0xa, %edx
je 0x506f0
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x4959c(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x967aa(%rip), %rsi     # 0xe6dc0
movq 0x979c3(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
cmpl $0xa, %edx
jne 0x5090d
leaq 0x495c4(%rip), %rsi     # 0x99bfe
jmp 0x5076e
cmpl $0xa, %edx
jne 0x5095b
leaq 0x49576(%rip), %rsi     # 0x99bc5
jmp 0x5076e
cmpl $0xa, %edx
jne 0x509a9
leaq 0x4d381(%rip), %rsi     # 0x9d9e5
jmp 0x5076e
cmpl $0xa, %edx
jne 0x509f7
leaq 0x49540(%rip), %rsi     # 0x99bb9
jmp 0x5076e
cmpl $0xa, %edx
jne 0x50a45
leaq 0x4956a(%rip), %rsi     # 0x99bf8
jmp 0x5076e
cmpl $0xa, %edx
jne 0x50a93
leaq 0x4d332(%rip), %rsi     # 0x9d9d5
jmp 0x5076e
cmpl $0xa, %edx
jne 0x50ae1
leaq 0x49527(%rip), %rsi     # 0x99bdf
jmp 0x5076e
cmpl $0xa, %edx
jne 0x50b2f
leaq 0x4951e(%rip), %rsi     # 0x99beb
jmp 0x5076e
cmpl $0xa, %edx
jne 0x50b7d
leaq 0x4d312(%rip), %rsi     # 0x9d9f4
jmp 0x5076e
cmpl $0xa, %edx
jne 0x50bcb
leaq 0x494db(%rip), %rsi     # 0x99bd2
jmp 0x5076e
cmpl $0x4, %edx
je 0x5051c
cmpl $0x5, %edx
je 0x50767
cmpl $0xa, %edx
je 0x50633
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x494e3(%rip), %rsi     # 0x99c05
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x96676(%rip), %rsi     # 0xe6dc0
movq 0x9788f(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
cmpl $0x5, %edx
jne 0x50c19
leaq 0x4668b(%rip), %rsi     # 0x96df9
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x6100
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x493f1(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x965ff(%rip), %rsi     # 0xe6dc0
movq 0x97818(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x493a3(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x965b1(%rip), %rsi     # 0xe6dc0
movq 0x977ca(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x49355(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x96563(%rip), %rsi     # 0xe6dc0
movq 0x9777c(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x49307(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x96515(%rip), %rsi     # 0xe6dc0
movq 0x9772e(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x492b9(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x964c7(%rip), %rsi     # 0xe6dc0
movq 0x976e0(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x4926b(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x96479(%rip), %rsi     # 0xe6dc0
movq 0x97692(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x4921d(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x9642b(%rip), %rsi     # 0xe6dc0
movq 0x97644(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x491cf(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x963dd(%rip), %rsi     # 0xe6dc0
movq 0x975f6(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x49181(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x9638f(%rip), %rsi     # 0xe6dc0
movq 0x975a8(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x49133(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x96341(%rip), %rsi     # 0xe6dc0
movq 0x9755a(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x490e5(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x962f3(%rip), %rsi     # 0xe6dc0
movq 0x9750c(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x49097(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x962a5(%rip), %rsi     # 0xe6dc0
movq 0x974be(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x49049(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x96257(%rip), %rsi     # 0xe6dc0
movq 0x97470(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x48ffb(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x96209(%rip), %rsi     # 0xe6dc0
movq 0x97422(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x48fad(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x961bb(%rip), %rsi     # 0xe6dc0
movq 0x973d4(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x48f5f(%rip), %rsi     # 0x99b8a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x9616d(%rip), %rsi     # 0xe6dc0
movq 0x97386(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cad
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x48fb0(%rip), %rsi     # 0x99c26
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x96122(%rip), %rsi     # 0xe6dc0
movq 0x9733b(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
jmp 0x50cf9
jmp 0x50d0d
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x50d10
jmp 0x50d18
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64b0