// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::emit_modern_uniform(spirv_cross::SPIRVariable const&)
void CompilerHLSL::emit_modern_uniform(const SPIRVariable &var)
{
	auto &type = get<SPIRType>(var.basetype);
	switch (type.basetype)
	{
	case SPIRType::SampledImage:
	case SPIRType::Image:
	{
		bool is_coherent = false;
		if (type.basetype == SPIRType::Image && type.image.sampled == 2)
			is_coherent = has_decoration(var.self, DecorationCoherent);

		statement(is_coherent ? "globallycoherent " : "", image_type_hlsl_modern(type, var.self), " ",
		          to_name(var.self), type_to_array_glsl(type), to_resource_binding(var), ";");

		if (type.basetype == SPIRType::SampledImage && type.image.dim != DimBuffer)
		{
			// For combined image samplers, also emit a combined image sampler.
			if (image_is_comparison(type, var.self))
				statement("SamplerComparisonState ", to_sampler_expression(var.self), type_to_array_glsl(type),
				          to_resource_binding_sampler(var), ";");
			else
				statement("SamplerState ", to_sampler_expression(var.self), type_to_array_glsl(type),
				          to_resource_binding_sampler(var), ";");
		}
		break;
	}

	case SPIRType::Sampler:
		if (comparison_ids.count(var.self))
			statement("SamplerComparisonState ", to_name(var.self), type_to_array_glsl(type), to_resource_binding(var),
			          ";");
		else
			statement("SamplerState ", to_name(var.self), type_to_array_glsl(type), to_resource_binding(var), ";");
		break;

	default:
		statement(variable_decl(var), to_resource_binding(var), ";");
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rsi), %esi
callq 0xa3ea
movq %rax, %r15
movl 0xc(%rax), %eax
leal -0xd(%rax), %ecx
cmpl $0x2, %ecx
jae 0x6c5f0
leaq 0x48463(%rip), %rcx     # 0xb48af
cmpl $0xd, %eax
jne 0x6c480
cmpl $0x2, 0x8c(%r15)
jne 0x6c480
movl 0x8(%r14), %esi
movq %rbx, %rdi
movl $0x17, %edx
callq 0x12974
leaq 0x514f2(%rip), %rdx     # 0xbd965
leaq 0x48435(%rip), %rcx     # 0xb48af
testb %al, %al
cmovneq %rdx, %rcx
movq %rcx, 0x60(%rsp)
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x62308
movl 0x8(%r14), %edx
movq (%rbx), %rax
movq %rsp, %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2b55a
leaq 0x68(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x684ce
leaq 0x5261d(%rip), %rax     # 0xbeaf1
leaq 0x483d3(%rip), %rcx     # 0xb48ae
leaq 0x60(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rsp, %r8
leaq 0x40(%rsp), %r9
movq %rbx, %rdi
pushq %rax
pushq %r12
callq 0x7a7a8
addq $0x10, %rsp
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c517
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x50(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x6c532
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x10(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x6c54d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x30(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x6c569
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
cmpl $0xe, 0xc(%r15)
jne 0x6c7e3
cmpl $0x5, 0x84(%r15)
je 0x6c7e3
movl 0x8(%r14), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b12c
testb %al, %al
je 0x6c6a8
movl 0x8(%r14), %edx
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x68c70
movq %rsp, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2b55a
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6c38e
leaq 0x5151d(%rip), %rsi     # 0xbdaec
leaq 0x5251b(%rip), %r9      # 0xbeaf1
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
leaq 0x40(%rsp), %r8
movq %rbx, %rdi
callq 0x7a8e4
jmp 0x6c6fa
cmpl $0xf, %eax
jne 0x6c66e
leaq 0x360(%rbx), %rdi
leaq 0x8(%r14), %r12
movq %r12, %rsi
callq 0x1f4b4
testq %rax, %rax
je 0x6c73a
movl (%r12), %edx
movq (%rbx), %rax
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2b55a
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x684ce
leaq 0x5149f(%rip), %rsi     # 0xbdaec
leaq 0x5249d(%rip), %r9      # 0xbeaf1
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
leaq 0x40(%rsp), %r8
movq %rbx, %rdi
callq 0x7a8e4
jmp 0x6c792
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2c7ac
movq %rsp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x684ce
leaq 0x5245e(%rip), %rcx     # 0xbeaf1
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x521d0
jmp 0x6c7ad
movl 0x8(%r14), %edx
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x68c70
movq %rsp, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2b55a
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6c38e
leaq 0x51426(%rip), %rsi     # 0xbdb04
leaq 0x5240c(%rip), %r9      # 0xbeaf1
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
leaq 0x40(%rsp), %r8
movq %rbx, %rdi
callq 0x7aa94
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6c711
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6c727
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
jne 0x6c7d6
jmp 0x6c7e3
movl (%r12), %edx
movq (%rbx), %rax
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
movq %rsp, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2b55a
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x684ce
leaq 0x5138e(%rip), %rsi     # 0xbdb04
leaq 0x52374(%rip), %r9      # 0xbeaf1
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
leaq 0x40(%rsp), %r8
movq %rbx, %rdi
callq 0x7aa94
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c7ad
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c7c8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c7e3
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6c881
jmp 0x6c8a1
jmp 0x6c8c1
jmp 0x6c806
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6c827
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x6c827
jmp 0x6c824
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6c844
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x6c844
jmp 0x6c841
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
jne 0x6c8d2
jmp 0x6c8df
jmp 0x6c881
jmp 0x6c8a1
jmp 0x6c8c1
jmp 0x6c8a1
jmp 0x6c8c1
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c884
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x6c884
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c8a4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x6c8a4
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c8c4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x6c8c4
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c8df
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop