// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::to_qualifiers_glsl[abi:cxx11](unsigned int)
string CompilerGLSL::to_qualifiers_glsl(uint32_t id)
{
	auto flags = ir.meta[id].decoration.decoration_flags;
	string res;

	auto *var = maybe_get<SPIRVariable>(id);

	if (var && var->storage == StorageClassWorkgroup && !backend.shared_is_implied)
		res += "shared ";

	res += to_interpolation_qualifiers(flags);
	if (var)
		res += to_storage_qualifiers_glsl(*var);

	auto &type = expression_type(id);
	if (type.image.dim != DimSubpassData && type.image.sampled == 2)
	{
		if (flags.get(DecorationCoherent))
			res += "coherent ";
		if (flags.get(DecorationRestrict))
			res += "restrict ";
		if (flags.get(DecorationNonWritable))
			res += "readonly ";
		if (flags.get(DecorationNonReadable))
			res += "writeonly ";
	}

	res += to_precision_qualifiers_glsl(id);

	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0xb8(%rbp)
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
addq $0x38, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xead0
movq %rax, %rsi
addq $0x60, %rsi
leaq -0x58(%rbp), %rdi
callq 0xef10
movq -0xb8(%rbp), %rdi
movb $0x0, -0x59(%rbp)
callq 0x7530
movq -0xb0(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x116b0
movq %rax, -0xa8(%rbp)
jmp 0x95b88
movq -0xa8(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x95bdc
movq -0x68(%rbp), %rax
cmpl $0x4, 0x10(%rax)
jne 0x95bdc
movq -0xb0(%rbp), %rax
testb $0x1, 0x621(%rax)
jne 0x95bdc
movq -0xb8(%rbp), %rdi
leaq 0xaeedb(%rip), %rsi     # 0x144a9d
callq 0x7340
jmp 0x95bc9
jmp 0x95bdc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x95e08
movq -0xb0(%rbp), %rsi
movq (%rsi), %rax
movq 0x140(%rax), %rax
leaq -0x98(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq *%rax
jmp 0x95bfc
movq -0xb8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x7470
jmp 0x95c11
leaq -0x98(%rbp), %rdi
callq 0x7708
cmpq $0x0, -0x68(%rbp)
je 0x95c78
movq -0xb0(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq (%rdi), %rax
movq 0x130(%rax), %rax
callq *%rax
movq %rax, -0xc8(%rbp)
jmp 0x95c44
movq -0xc8(%rbp), %rsi
movq -0xb8(%rbp), %rdi
callq 0x7340
jmp 0x95c59
jmp 0x95c78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x7708
jmp 0x95e08
movq -0xb0(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1f760
movq %rax, -0xd0(%rbp)
jmp 0x95c90
movq -0xd0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
cmpl $0x6, 0x84(%rax)
je 0x95dac
movq -0xa0(%rbp), %rax
cmpl $0x2, 0x8c(%rax)
jne 0x95dac
leaq -0x58(%rbp), %rdi
movl $0x17, %esi
callq 0xef50
movb %al, -0xd1(%rbp)
jmp 0x95cdc
movb -0xd1(%rbp), %al
testb $0x1, %al
jne 0x95ce8
jmp 0x95cff
movq -0xb8(%rbp), %rdi
leaq 0xb21de(%rip), %rsi     # 0x147ed4
callq 0x7340
jmp 0x95cfd
jmp 0x95cff
leaq -0x58(%rbp), %rdi
movl $0x13, %esi
callq 0xef50
movb %al, -0xd2(%rbp)
jmp 0x95d15
movb -0xd2(%rbp), %al
testb $0x1, %al
jne 0x95d21
jmp 0x95d38
movq -0xb8(%rbp), %rdi
leaq 0xab7ae(%rip), %rsi     # 0x1414dd
callq 0x7340
jmp 0x95d36
jmp 0x95d38
leaq -0x58(%rbp), %rdi
movl $0x18, %esi
callq 0xef50
movb %al, -0xd3(%rbp)
jmp 0x95d4e
movb -0xd3(%rbp), %al
testb $0x1, %al
jne 0x95d5a
jmp 0x95d71
movq -0xb8(%rbp), %rdi
leaq 0xab78a(%rip), %rsi     # 0x1414f2
callq 0x7340
jmp 0x95d6f
jmp 0x95d71
leaq -0x58(%rbp), %rdi
movl $0x19, %esi
callq 0xef50
movb %al, -0xd4(%rbp)
jmp 0x95d87
movb -0xd4(%rbp), %al
testb $0x1, %al
jne 0x95d93
jmp 0x95daa
movq -0xb8(%rbp), %rdi
leaq 0xab746(%rip), %rsi     # 0x1414e7
callq 0x7340
jmp 0x95da8
jmp 0x95daa
jmp 0x95dac
movq -0xb0(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x95ab0
movq %rax, -0xe0(%rbp)
jmp 0x95dc4
movq -0xe0(%rbp), %rsi
movq -0xb8(%rbp), %rdi
callq 0x7340
jmp 0x95dd9
movb $0x1, -0x59(%rbp)
testb $0x1, -0x59(%rbp)
jne 0x95def
movq -0xb8(%rbp), %rdi
callq 0x7708
leaq -0x58(%rbp), %rdi
callq 0xf250
movq -0xc0(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
movq -0xb8(%rbp), %rdi
callq 0x7708
leaq -0x58(%rbp), %rdi
callq 0xf250
movq -0x70(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)