// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_uniform(spirv_cross::SPIRVariable const&)
void CompilerGLSL::emit_uniform(const SPIRVariable &var)
{
	auto &type = get<SPIRType>(var.basetype);
	if (type.basetype == SPIRType::Image && type.image.sampled == 2)
	{
		if (!options.es && options.version < 420)
			require_extension_internal("GL_ARB_shader_image_load_store");
		else if (options.es && options.version < 310)
			SPIRV_CROSS_THROW("At least ESSL 3.10 required for shader image load store.");
	}

	add_resource_name(var.self);
	statement(layout_for_variable(var), variable_decl(var), ";");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %esi
callq 0xea90
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0xd, 0xc(%rax)
jne 0x63302
movq -0x18(%rbp), %rax
cmpl $0x2, 0x8c(%rax)
jne 0x63302
movq -0xc0(%rbp), %rax
testb $0x1, 0x43c(%rax)
jne 0x6321b
movq -0xc0(%rbp), %rax
cmpl $0x1a4, 0x438(%rax)     # imm = 0x1A4
jae 0x6321b
leaq -0x39(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x7650
movq -0xc8(%rbp), %rdx
leaq 0xdda8d(%rip), %rsi     # 0x140c43
leaq -0x38(%rbp), %rdi
callq 0x7520
jmp 0x631c1
movq -0xc0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x589d0
jmp 0x631d3
leaq -0x38(%rbp), %rdi
callq 0x7708
leaq -0x39(%rbp), %rdi
callq 0x73d0
jmp 0x63300
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x6320d
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
jmp 0x633bb
movq -0xc0(%rbp), %rax
testb $0x1, 0x43c(%rax)
je 0x632fe
movq -0xc0(%rbp), %rax
cmpl $0x136, 0x438(%rax)     # imm = 0x136
jae 0x632fe
movb $0x1, -0x72(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0xd8(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x7650
movq -0xd0(%rbp), %rdx
leaq 0xde3b1(%rip), %rsi     # 0x14162a
leaq -0x70(%rbp), %rdi
callq 0x7520
jmp 0x63284
movq -0xd8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x9c50
jmp 0x63296
movq -0xd8(%rbp), %rdi
movb $0x0, -0x72(%rbp)
leaq 0x14ab30(%rip), %rsi    # 0x1addd8
leaq -0x5961f(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0x633c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x632dc
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 0x632ed
jmp 0x632f9
movq -0xd8(%rbp), %rdi
callq 0x72c0
jmp 0x633bb
jmp 0x63300
jmp 0x63302
movq -0xc0(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x5c1d0
movq -0xc0(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x98(%rbp), %rdi
callq 0x5e4c0
movq -0xc0(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0xb8(%rbp), %rdi
callq 0x62d60
jmp 0x63345
movq -0xc0(%rbp), %rdi
leaq 0xe5d53(%rip), %rcx     # 0x1490a6
leaq -0x98(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
callq 0xa01d0
jmp 0x63368
leaq -0xb8(%rbp), %rdi
callq 0x7708
leaq -0x98(%rbp), %rdi
callq 0x7708
addq $0xe0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x633af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x7708
leaq -0x98(%rbp), %rdi
callq 0x7708
movq -0x48(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)