// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_cpp.cpp
// Function: spirv_cross::CompilerCPP::variable_decl(spirv_cross::SPIRType const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int)
string CompilerCPP::variable_decl(const SPIRType &type, const string &name, uint32_t /* id */)
{
	string base = type_to_glsl(type);
	remap_variable_type_name(type, name, base);
	bool runtime = false;

	for (uint32_t i = 0; i < type.array.size(); i++)
	{
		auto &array = type.array[i];
		if (!array && type.array_size_literal[i])
		{
			// Avoid using runtime arrays with std::array since this is undefined.
			// Runtime arrays cannot be passed around as values, so this is fine.
			runtime = true;
		}
		else
			base = join("std::array<", base, ", ", to_array_size(type, i), ">");
	}
	base += ' ';
	return base + name + (runtime ? "[1]" : "");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
leaq 0x30(%rsp), %rdi
xorl %ecx, %ecx
callq *0x98(%rax)
cmpq $0x0, 0x218(%rbx)
je 0x9df1
leaq 0x208(%rbx), %rdi
leaq 0x30(%rsp), %rcx
movq %r15, %rsi
movq %r13, %rdx
callq *0x220(%rbx)
movq 0x20(%r15), %rax
cmpq %rax, 0x28(%r15)
je 0x9f20
movq %rbx, 0x60(%rsp)
movq %r13, 0x50(%rsp)
movq %r14, 0x58(%rsp)
xorl %r13d, %r13d
leaq 0x68(%rsp), %r14
leaq 0x10(%rsp), %rbx
movq $0x0, 0x8(%rsp)
cmpl $0x0, (%rax,%r13,4)
je 0x9ec2
movq %r14, %r12
movq %r14, %rdi
movq 0x60(%rsp), %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x420ce
movq %rbx, %rdi
leaq 0xab770(%rip), %rsi     # 0xb55bf
leaq 0x30(%rsp), %rbp
movq %rbp, %rdx
leaq 0xb125d(%rip), %rcx     # 0xbb0bb
movq %r12, %r14
movq %r12, %r8
leaq 0xab391(%rip), %r9      # 0xb51fc
callq 0xc82e
movq %rbp, %rdi
movq %rbx, %r12
movq %rbx, %rsi
callq 0x6310
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x9e9a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x9eb6
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x8(%rsp), %rax
movl %eax, %ecx
movq %r12, %rbx
jmp 0x9edd
movq 0x38(%r15), %rax
movq %r13, %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rax
movb $0x1, %cl
btq %r13, %rax
jae 0x9e2f
incl %r13d
movq 0x20(%r15), %rax
movq 0x28(%r15), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movl %ecx, %esi
movq %rsi, 0x8(%rsp)
cmpq %r13, %rdx
ja 0x9e24
leaq 0xab6c5(%rip), %rax     # 0xb55cb
leaq 0xab9a2(%rip), %rbx     # 0xb58af
testb $0x1, %cl
cmovneq %rax, %rbx
movq 0x58(%rsp), %r14
movq 0x50(%rsp), %r13
jmp 0x9f27
leaq 0xab988(%rip), %rbx     # 0xb58af
leaq 0x30(%rsp), %rdi
movl $0x20, %esi
callq 0x6230
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movq %r13, %rdx
callq 0xc980
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x64e0
leaq 0x10(%r14), %rdx
movq %rdx, (%r14)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x9f77
movq %rsi, (%r14)
movq (%rcx), %rdx
movq %rdx, 0x10(%r14)
jmp 0x9f7d
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9faf
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9fca
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa01e
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa021
movq 0x20(%rsp), %rsi
jmp 0xa014
jmp 0xa01e
jmp 0xa01e
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xa021
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0xa021
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa03c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0