// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq (%rsi), %rax
leaq 0x30(%rsp), %rdi
xorl %ecx, %ecx
callq *0x98(%rax)
cmpq $0x0, 0x218(%r12)
je 0x9da1
leaq 0x208(%r12), %rdi
leaq 0x30(%rsp), %rcx
movq %rbx, %rsi
movq %r13, %rdx
callq *0x220(%r12)
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %r10
cmpq %rax, %r10
je 0x9ee7
movq %rbx, %rdx
movq %r13, 0x50(%rsp)
movq %r14, 0x58(%rsp)
movl $0x1, %ebx
xorl %esi, %esi
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq $0x0, 0x8(%rsp)
movq %r12, 0x60(%rsp)
leal -0x1(%rbx), %ecx
cmpl $0x0, (%rax,%rsi,4)
je 0x9e8a
movq %r12, %rsi
movq %rdx, %r13
movq %rdi, %rbp
callq 0x418a0
movq %r14, %rdi
leaq 0xaa7bc(%rip), %rsi     # 0xb45bf
leaq 0x30(%rsp), %r15
movq %r15, %rdx
leaq 0xb0299(%rip), %rcx     # 0xba0ab
movq %rbp, %r12
movq %rbp, %r8
leaq 0xaa3dd(%rip), %r9      # 0xb41fc
callq 0xc7ee
movq %r15, %rdi
movq %r14, %rbp
movq %r14, %rsi
callq 0x6310
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x9e4e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x9e6a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r13, %rdx
movq 0x20(%r13), %rax
movq 0x28(%r13), %r10
movq 0x8(%rsp), %rcx
movl %ecx, %r9d
movq %r12, %rdi
movq %rbp, %r14
movq 0x60(%rsp), %r12
jmp 0x9ea6
movq 0x38(%rdx), %r9
movl %ecx, %r8d
shrl $0x6, %r8d
movq (%r9,%r8,8), %r8
movb $0x1, %r9b
btq %rsi, %r8
jae 0x9deb
movl %ebx, %esi
movq %r10, %rcx
subq %rax, %rcx
sarq $0x2, %rcx
incl %ebx
movl %r9d, %r8d
movq %r8, 0x8(%rsp)
cmpq %rsi, %rcx
ja 0x9dde
leaq 0xaa6ff(%rip), %rax     # 0xb45cb
leaq 0xaa9dc(%rip), %rbx     # 0xb48af
testb $0x1, %r9b
cmovneq %rax, %rbx
movq 0x58(%rsp), %r14
movq 0x50(%rsp), %r13
jmp 0x9eee
leaq 0xaa9c1(%rip), %rbx     # 0xb48af
leaq 0x30(%rsp), %rdi
movl $0x20, %esi
callq 0x6230
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movq %r13, %rdx
callq 0xc940
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 0x9f3e
movq %rsi, (%r14)
movq (%rcx), %rdx
movq %rdx, 0x10(%r14)
jmp 0x9f44
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 0x9f76
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9f91
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 0x9fe5
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9fe8
movq 0x20(%rsp), %rsi
jmp 0x9fdb
jmp 0x9fe5
jmp 0x9fe5
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x9fe8
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9fe8
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa003
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop