// File: /workspace/github_cpp_makefile_star2_O1/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 0xa426
movq %rax, %r15
movl 0xc(%rax), %eax
leal -0xd(%rax), %ecx
cmpl $0x2, %ecx
jae 0x6cf06
leaq 0x48b4d(%rip), %rcx     # 0xb58af
cmpl $0xd, %eax
jne 0x6cd96
cmpl $0x2, 0x8c(%r15)
jne 0x6cd96
movl 0x8(%r14), %esi
movq %rbx, %rdi
movl $0x17, %edx
callq 0x1299a
leaq 0x51bd4(%rip), %rdx     # 0xbe95d
leaq 0x48b1f(%rip), %rcx     # 0xb58af
testb %al, %al
cmovneq %rdx, %rcx
movq %rcx, 0x60(%rsp)
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x62bb0
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 0x2bb66
leaq 0x68(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x68da2
leaq 0x52cff(%rip), %rax     # 0xbfae9
leaq 0x48abd(%rip), %rcx     # 0xb58ae
leaq 0x60(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rsp, %r8
leaq 0x40(%rsp), %r9
movq %rbx, %rdi
pushq %rax
pushq %r12
callq 0x7b2b4
addq $0x10, %rsp
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ce2d
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x50(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x6ce48
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x10(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x6ce63
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x30(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x6ce7f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
cmpl $0xe, 0xc(%r15)
jne 0x6d0f9
cmpl $0x5, 0x84(%r15)
je 0x6d0f9
movl 0x8(%r14), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b812
testb %al, %al
je 0x6cfbe
movl 0x8(%r14), %edx
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x69554
movq %rsp, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2bb66
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6cca4
leaq 0x51bff(%rip), %rsi     # 0xbeae4
leaq 0x52bfd(%rip), %r9      # 0xbfae9
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
leaq 0x40(%rsp), %r8
movq %rbx, %rdi
callq 0x7b3f0
jmp 0x6d010
cmpl $0xf, %eax
jne 0x6cf84
leaq 0x360(%rbx), %rdi
leaq 0x8(%r14), %r12
movq %r12, %rsi
callq 0x1fbce
testq %rax, %rax
je 0x6d050
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 0x2bb66
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x68da2
leaq 0x51b81(%rip), %rsi     # 0xbeae4
leaq 0x52b7f(%rip), %r9      # 0xbfae9
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
leaq 0x40(%rsp), %r8
movq %rbx, %rdi
callq 0x7b3f0
jmp 0x6d0a8
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2ce16
movq %rsp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x68da2
leaq 0x52b40(%rip), %rcx     # 0xbfae9
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x529c8
jmp 0x6d0c3
movl 0x8(%r14), %edx
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x69554
movq %rsp, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2bb66
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6cca4
leaq 0x51b08(%rip), %rsi     # 0xbeafc
leaq 0x52aee(%rip), %r9      # 0xbfae9
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
leaq 0x40(%rsp), %r8
movq %rbx, %rdi
callq 0x7b5a0
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6d027
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6d03d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
jne 0x6d0ec
jmp 0x6d0f9
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 0x2bb66
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x68da2
leaq 0x51a70(%rip), %rsi     # 0xbeafc
leaq 0x52a56(%rip), %r9      # 0xbfae9
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
leaq 0x40(%rsp), %r8
movq %rbx, %rdi
callq 0x7b5a0
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d0c3
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d0de
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d0f9
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 0x6d197
jmp 0x6d1b7
jmp 0x6d1d7
jmp 0x6d11c
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6d13d
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x6d13d
jmp 0x6d13a
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6d15a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x6d15a
jmp 0x6d157
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
jne 0x6d1e8
jmp 0x6d1f5
jmp 0x6d197
jmp 0x6d1b7
jmp 0x6d1d7
jmp 0x6d1b7
jmp 0x6d1d7
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d19a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x6d19a
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d1ba
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x6d1ba
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d1da
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x6d1da
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d1f5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop