// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::type_to_array_glsl[abi:cxx11](spirv_cross::SPIRType const&)
string CompilerGLSL::type_to_array_glsl(const SPIRType &type)
{
	if (type.array.empty())
		return "";

	if (options.flatten_multidimensional_arrays)
	{
		string res;
		res += "[";
		for (auto i = uint32_t(type.array.size()); i; i--)
		{
			res += enclose_expression(to_array_size(type, i - 1));
			if (i > 1)
				res += " * ";
		}
		res += "]";
		return res;
	}
	else
	{
		if (type.array.size() > 1)
		{
			if (!options.es && options.version < 430)
				require_extension_internal("GL_ARB_arrays_of_arrays");
			else if (options.es && options.version < 310)
				SPIRV_CROSS_THROW("Arrays of arrays not supported before ESSL version 310. "
				                  "Try using --flatten-multidimensional-arrays or set "
				                  "options.flatten_multidimensional_arrays to true.");
		}

		string res;
		for (auto i = uint32_t(type.array.size()); i; i--)
		{
			res += "[";
			res += to_array_size(type, i - 1);
			res += "]";
		}
		return res;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x100(%rbp)
movq %rdi, %rax
movq %rax, -0xf8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x8690
testb $0x1, %al
jne 0x61386
jmp 0x613da
leaq -0x19(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x7650
movq -0x100(%rbp), %rdi
movq -0x108(%rbp), %rdx
leaq 0xdd4f3(%rip), %rsi     # 0x13e89e
callq 0x7520
jmp 0x613b2
leaq -0x19(%rbp), %rdi
callq 0x73d0
jmp 0x6180e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x19(%rbp), %rdi
callq 0x73d0
jmp 0x6181e
movq -0xf0(%rbp), %rax
testb $0x1, 0x440(%rax)
je 0x6152c
movq -0x100(%rbp), %rdi
movb $0x0, -0x2d(%rbp)
callq 0x7530
movq -0x100(%rbp), %rdi
leaq 0xebf9c(%rip), %rsi     # 0x14d3a8
callq 0x7340
jmp 0x61413
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x8650
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x614eb
movq -0xf0(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x34(%rbp), %ecx
decl %ecx
leaq -0x78(%rbp), %rdi
callq 0x85c10
jmp 0x61448
movq -0xf0(%rbp), %rsi
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rdx
callq 0x6ff50
jmp 0x6145e
movq -0x100(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x7470
jmp 0x61470
leaq -0x58(%rbp), %rdi
callq 0x7708
leaq -0x78(%rbp), %rdi
callq 0x7708
cmpl $0x1, -0x34(%rbp)
jbe 0x614db
movq -0x100(%rbp), %rdi
leaq 0xe2592(%rip), %rsi     # 0x143a28
callq 0x7340
jmp 0x6149d
jmp 0x614db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x6151b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x614d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x7708
leaq -0x78(%rbp), %rdi
callq 0x7708
jmp 0x6151b
jmp 0x614dd
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x61423
movq -0x100(%rbp), %rdi
leaq 0xe6bac(%rip), %rsi     # 0x1480a5
callq 0x7340
jmp 0x61500
movb $0x1, -0x2d(%rbp)
testb $0x1, -0x2d(%rbp)
jne 0x61516
movq -0x100(%rbp), %rdi
callq 0x7708
jmp 0x6180e
movq -0x100(%rbp), %rdi
callq 0x7708
jmp 0x6181e
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x8650
cmpq $0x1, %rax
jbe 0x61705
movq -0xf0(%rbp), %rax
testb $0x1, 0x43c(%rax)
jne 0x61606
movq -0xf0(%rbp), %rax
cmpl $0x1ae, 0x438(%rax)     # imm = 0x1AE
jae 0x61606
leaq -0x99(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x7650
movq -0x110(%rbp), %rdx
leaq 0xe35f9(%rip), %rsi     # 0x144b88
leaq -0x98(%rbp), %rdi
callq 0x7520
jmp 0x6159d
movq -0xf0(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x589d0
jmp 0x615b2
leaq -0x98(%rbp), %rdi
callq 0x7708
leaq -0x99(%rbp), %rdi
callq 0x73d0
jmp 0x61703
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x615f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x7708
leaq -0x99(%rbp), %rdi
callq 0x73d0
jmp 0x6181e
movq -0xf0(%rbp), %rax
testb $0x1, 0x43c(%rax)
je 0x61701
movq -0xf0(%rbp), %rax
cmpl $0x136, 0x438(%rax)     # imm = 0x136
jae 0x61701
movb $0x1, -0xc2(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x120(%rbp)
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x7650
movq -0x118(%rbp), %rdx
leaq 0xe3536(%rip), %rsi     # 0x144ba0
leaq -0xc0(%rbp), %rdi
callq 0x7520
jmp 0x61678
movq -0x120(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x9c50
jmp 0x6168d
movq -0x120(%rbp), %rdi
movb $0x0, -0xc2(%rbp)
leaq 0x14c736(%rip), %rsi    # 0x1addd8
leaq -0x57a19(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0x61827
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x616d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x7708
leaq -0xc1(%rbp), %rdi
callq 0x73d0
testb $0x1, -0xc2(%rbp)
jne 0x616f0
jmp 0x616fc
movq -0x120(%rbp), %rdi
callq 0x72c0
jmp 0x6181e
jmp 0x61703
jmp 0x61705
movq -0x100(%rbp), %rdi
movb $0x0, -0xc3(%rbp)
callq 0x7530
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x8650
movl %eax, -0xc8(%rbp)
cmpl $0x0, -0xc8(%rbp)
je 0x617e2
movq -0x100(%rbp), %rdi
leaq 0xebc62(%rip), %rsi     # 0x14d3a8
callq 0x7340
jmp 0x6174d
movq -0xf0(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0xc8(%rbp), %ecx
decl %ecx
leaq -0xe8(%rbp), %rdi
callq 0x85c10
jmp 0x6176e
movq -0x100(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x7470
jmp 0x61783
leaq -0xe8(%rbp), %rdi
callq 0x7708
movq -0x100(%rbp), %rdi
leaq 0xe6908(%rip), %rsi     # 0x1480a5
callq 0x7340
jmp 0x617a4
jmp 0x617a6
movl -0xc8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc8(%rbp)
jmp 0x6172b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x61800
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x7708
jmp 0x61800
movb $0x1, -0xc3(%rbp)
testb $0x1, -0xc3(%rbp)
jne 0x617fe
movq -0x100(%rbp), %rdi
callq 0x7708
jmp 0x6180e
movq -0x100(%rbp), %rdi
callq 0x7708
jmp 0x6181e
movq -0xf8(%rbp), %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x7640
nopw (%rax,%rax)