// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::constant_expression[abi:cxx11](spirv_cross::SPIRConstant const&)
string CompilerGLSL::constant_expression(const SPIRConstant &c)
{
	if (!c.subconstants.empty())
	{
		auto &type = get<SPIRType>(c.constant_type);

		// Handles Arrays and structures.
		string res;
		if (backend.use_initializer_list && backend.use_typed_initializer_list && type.basetype == SPIRType::Struct &&
		    type.array.empty())
		{
			res = type_to_glsl_constructor(type) + "{ ";
		}
		else if (backend.use_initializer_list)
		{
			res = "{ ";
		}
		else
		{
			res = type_to_glsl_constructor(type) + "(";
		}

		for (auto &elem : c.subconstants)
		{
			auto &subc = get<SPIRConstant>(elem);
			if (subc.specialization && options.vulkan_semantics)
				res += to_name(elem);
			else
				res += constant_expression(subc);

			if (&elem != &c.subconstants.back())
				res += ", ";
		}

		res += backend.use_initializer_list ? " }" : ")";
		return res;
	}
	else if (c.columns() == 1)
	{
		return constant_expression_vector(c, 0);
	}
	else
	{
		string res = type_to_glsl(get<SPIRType>(c.constant_type)) + "(";
		for (uint32_t col = 0; col < c.columns(); col++)
		{
			if (options.vulkan_semantics && c.specialization_constant_id(col) != 0)
				res += to_name(c.specialization_constant_id(col));
			else
				res += constant_expression_vector(c, col);

			if (col + 1 < c.columns())
				res += ", ";
		}
		res += ")";
		return res;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x110(%rdx), %rax
cmpq 0x118(%rdx), %rax
je 0x2e623
movl 0xc(%r15), %esi
movq %r14, %rdi
callq 0xa426
leaq 0x10(%rbx), %rcx
movq %rcx, 0x20(%rsp)
movq %rcx, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movb 0x624(%r14), %cl
cmpb $0x1, %cl
jne 0x2e5d5
cmpb $0x1, 0x625(%r14)
jne 0x2e5b3
cmpl $0xc, 0xc(%rax)
jne 0x2e5b3
movq 0x20(%rax), %rdx
cmpq 0x28(%rax), %rdx
je 0x2e905
testb %cl, %cl
je 0x2e5d5
leaq 0x8abd7(%rip), %rcx     # 0xb9195
movl $0x2, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x63f0
jmp 0x2e706
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x35152
leaq 0x956b5(%rip), %rsi     # 0xc3ca1
leaq 0x28(%rsp), %rdi
callq 0x64e0
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2e6a7
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2e6af
cmpl $0x1, 0x100(%r15)
jne 0x2e646
movq (%r14), %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq *0xb8(%rax)
jmp 0x2e8f3
movl 0xc(%r15), %esi
movq %r14, %rdi
callq 0xa426
movq (%r14), %r8
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq *0x98(%r8)
leaq 0x95630(%rip), %rsi     # 0xc3ca1
movq %r12, %rdi
callq 0x64e0
leaq 0x10(%rbx), %rsi
movq %rsi, (%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %rsi, 0x20(%rsp)
je 0x2e7f4
movq %rdx, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x2e7fa
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rsp, %r12
movq %rdx, 0x8(%r12)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6310
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x2e6eb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e706
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x110(%r15), %r13
movq 0x118(%r15), %rbp
cmpq %rbp, %r13
je 0x2e7cd
movq %rsp, %r12
movl (%r13), %esi
movq %r14, %rdi
callq 0x1c66e
cmpb $0x1, 0x108(%rax)
jne 0x2e767
cmpb $0x1, 0x43e(%r14)
jne 0x2e767
movl (%r13), %edx
movq (%r14), %rax
movq %r12, %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
jmp 0x2e786
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2e53a
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2e7a1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x118(%r15), %rax
addq $-0x4, %rax
cmpq %rax, %r13
je 0x2e7c0
movq %rbx, %rdi
leaq 0x8c900(%rip), %rsi     # 0xbb0bb
callq 0x64e0
addq $0x4, %r13
cmpq %rbp, %r13
jne 0x2e720
leaq 0x8a9c4(%rip), %rax     # 0xb9198
leaq 0x8d24a(%rip), %rsi     # 0xbba25
cmpb $0x0, 0x624(%r14)
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0x64e0
jmp 0x2e8f3
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x10(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x2e82c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
cmpl $0x0, 0x100(%r15)
je 0x2e8e4
xorl %r12d, %r12d
movq %rsp, %r13
cmpb $0x1, 0x43e(%r14)
jne 0x2e87a
movl 0xf0(%r15,%r12,4), %edx
testl %edx, %edx
je 0x2e87a
movq (%r14), %rax
movq %r13, %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
jmp 0x2e8a0
movq (%r14), %rax
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %r12d, %ecx
callq *0xb8(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x2e8b6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
incq %r12
movl 0x100(%r15), %eax
cmpq %rax, %r12
jae 0x2e8d4
movq %rbx, %rdi
leaq 0x8c7ec(%rip), %rsi     # 0xbb0bb
callq 0x64e0
movl 0x100(%r15), %eax
cmpq %rax, %r12
jb 0x2e840
leaq 0x8d13a(%rip), %rsi     # 0xbba25
movq %rbx, %rdi
callq 0x64e0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x35152
leaq 0x8a879(%rip), %rsi     # 0xb9195
leaq 0x28(%rsp), %rdi
callq 0x64e0
jmp 0x2e5f6
jmp 0x2e949
jmp 0x2e9a1
jmp 0x2e9a1
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e9be
movq 0x10(%rsp), %rsi
jmp 0x2e9b6
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e9a4
movq 0x38(%rsp), %rsi
jmp 0x2e995
jmp 0x2e9a1
jmp 0x2e9a1
jmp 0x2e9a1
jmp 0x2e96b
jmp 0x2e9a1
movq %rax, %r14
movq (%rsp), %rdi
cmpq %rbp, %rdi
jne 0x2e990
jmp 0x2e9a4
jmp 0x2e9a1
jmp 0x2e97f
jmp 0x2e9a1
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2e9a4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x2e9a4
jmp 0x2e9a1
movq %rax, %r14
movq (%rbx), %rdi
cmpq 0x20(%rsp), %rdi
je 0x2e9be
movq 0x20(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0