// File: rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::require_texture_query_variant(spirv_cross::SPIRType const&)
void CompilerHLSL::require_texture_query_variant(const SPIRType &type)
{
	uint32_t bit = 0;
	switch (type.image.dim)
	{
	case Dim1D:
		bit = type.image.arrayed ? Query1DArray : Query1D;
		break;

	case Dim2D:
		if (type.image.ms)
			bit = type.image.arrayed ? Query2DMSArray : Query2DMS;
		else
			bit = type.image.arrayed ? Query2DArray : Query2D;
		break;

	case Dim3D:
		bit = Query3D;
		break;

	case DimCube:
		bit = type.image.arrayed ? QueryCubeArray : QueryCube;
		break;

	case DimBuffer:
		bit = QueryBuffer;
		break;

	default:
		SPIRV_CROSS_THROW("Unsupported query type.");
	}

	switch (get<SPIRType>(type.image.type).basetype)
	{
	case SPIRType::Float:
		bit += QueryTypeFloat;
		break;

	case SPIRType::Int:
		bit += QueryTypeInt;
		break;

	case SPIRType::UInt:
		bit += QueryTypeUInt;
		break;

	default:
		SPIRV_CROSS_THROW("Unsupported query type.");
	}

	uint64_t mask = 1ull << bit;
	if ((required_textureSizeVariants & mask) == 0)
	{
		force_recompile = true;
		required_textureSizeVariants |= mask;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x84(%rax), %eax
movq %rax, -0x88(%rbp)
subq $0x5, %rax
ja 0xd336e
movq -0x88(%rbp), %rax
leaq 0x72a6a(%rip), %rcx     # 0x145d28
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movb 0x89(%rax), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0xd3426
movq -0x10(%rbp), %rax
testb $0x1, 0x8a(%rax)
je 0xd3312
movq -0x10(%rbp), %rax
movb 0x89(%rax), %dl
movl $0x8, %eax
movl $0x9, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0xd332f
movq -0x10(%rbp), %rax
movb 0x89(%rax), %dl
movl $0x2, %eax
movl $0x3, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0xd3426
movl $0x4, -0x14(%rbp)
jmp 0xd3426
movq -0x10(%rbp), %rax
movb 0x89(%rax), %dl
movl $0x6, %eax
movl $0x7, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0xd3426
movl $0x5, -0x14(%rbp)
jmp 0xd3426
movb $0x1, -0x4d(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0xa0(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x7650
movq -0x98(%rbp), %rdx
leaq 0x75db9(%rip), %rsi     # 0x14915a
leaq -0x38(%rbp), %rdi
callq 0x7520
jmp 0xd33ac
movq -0xa0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x9c50
jmp 0xd33be
movq -0xa0(%rbp), %rdi
movb $0x0, -0x4d(%rbp)
leaq 0xdaa08(%rip), %rsi     # 0x1addd8
leaq -0xc9747(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xd35a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xd3404
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x7708
leaq -0x39(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x4d(%rbp)
jne 0xd3415
jmp 0xd3421
movq -0xa0(%rbp), %rdi
callq 0x72c0
jmp 0xd3598
movq -0x90(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x80(%rax), %esi
callq 0xea90
movl 0xc(%rax), %eax
movl %eax, -0xa4(%rbp)
subl $0x4, %eax
je 0xd3474
jmp 0xd344c
movl -0xa4(%rbp), %eax
subl $0x5, %eax
je 0xd3482
jmp 0xd3459
movl -0xa4(%rbp), %eax
subl $0xa, %eax
jne 0xd3490
jmp 0xd3466
movl -0x14(%rbp), %eax
addl $0x0, %eax
movl %eax, -0x14(%rbp)
jmp 0xd3545
movl -0x14(%rbp), %eax
addl $0x10, %eax
movl %eax, -0x14(%rbp)
jmp 0xd3545
movl -0x14(%rbp), %eax
addl $0x20, %eax
movl %eax, -0x14(%rbp)
jmp 0xd3545
movb $0x1, -0x72(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0xb8(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x7650
movq -0xb0(%rbp), %rdx
leaq 0x75c97(%rip), %rsi     # 0x14915a
leaq -0x70(%rbp), %rdi
callq 0x7520
jmp 0xd34ce
movq -0xb8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x9c50
jmp 0xd34e0
movq -0xb8(%rbp), %rdi
movb $0x0, -0x72(%rbp)
leaq 0xda8e6(%rip), %rsi     # 0x1addd8
leaq -0xc9869(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xd35a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xd3526
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x7708
leaq -0x71(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x72(%rbp)
jne 0xd3537
jmp 0xd3543
movq -0xb8(%rbp), %rdi
callq 0x72c0
jmp 0xd3598
movq -0x90(%rbp), %rax
movl -0x14(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
movq %rcx, -0x80(%rbp)
movq 0x7a0(%rax), %rax
andq -0x80(%rbp), %rax
cmpq $0x0, %rax
jne 0xd358f
movq -0x90(%rbp), %rax
movb $0x1, 0x1d0(%rax)
movq -0x80(%rbp), %rcx
orq 0x7a0(%rax), %rcx
movq %rcx, 0x7a0(%rax)
addq $0xc0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)