// File: /workspace/github_cpp_makefile_star2_O3/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 0x2df4b
movl 0xc(%r15), %esi
movq %r14, %rdi
callq 0xa3ea
leaq 0x10(%rbx), %rcx
movq %rcx, 0x20(%rsp)
movq %rcx, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
cmpb $0x1, 0x624(%r14)
jne 0x2df6e
cmpb $0x1, 0x625(%r14)
jne 0x2df2d
cmpl $0xc, 0xc(%rax)
jne 0x2df2d
movq 0x20(%rax), %rcx
cmpq 0x28(%rax), %rcx
je 0x2e274
leaq 0x8a251(%rip), %rcx     # 0xb8185
movl $0x2, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x63f0
jmp 0x2e075
cmpl $0x1, 0x100(%r15)
jne 0x2dfb5
movq (%r14), %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq *0xb8(%rax)
jmp 0x2e262
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x34a5c
leaq 0x94cec(%rip), %rsi     # 0xc2c71
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 0x2e016
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2e01e
movl 0xc(%r15), %esi
movq %r14, %rdi
callq 0xa3ea
movq (%r14), %r8
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq *0x98(%r8)
leaq 0x94c91(%rip), %rsi     # 0xc2c71
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 0x2e163
movq %rdx, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x2e169
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 0x2e05a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e075
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x110(%r15), %r13
movq 0x118(%r15), %rbp
cmpq %rbp, %r13
je 0x2e13c
movq %rsp, %r12
movl (%r13), %esi
movq %r14, %rdi
callq 0x1c036
cmpb $0x1, 0x108(%rax)
jne 0x2e0d6
cmpb $0x1, 0x43e(%r14)
jne 0x2e0d6
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 0x2e0f5
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2deba
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2e110
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x118(%r15), %rax
addq $-0x4, %rax
cmpq %rax, %r13
je 0x2e12f
movq %rbx, %rdi
leaq 0x8bf81(%rip), %rsi     # 0xba0ab
callq 0x64e0
addq $0x4, %r13
cmpq %rbp, %r13
jne 0x2e08f
leaq 0x8a045(%rip), %rax     # 0xb8188
leaq 0x8c8cb(%rip), %rsi     # 0xbaa15
cmpb $0x0, 0x624(%r14)
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0x64e0
jmp 0x2e262
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 0x2e19b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
cmpl $0x0, 0x100(%r15)
je 0x2e253
xorl %r12d, %r12d
movq %rsp, %r13
cmpb $0x1, 0x43e(%r14)
jne 0x2e1e9
movl 0xf0(%r15,%r12,4), %edx
testl %edx, %edx
je 0x2e1e9
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 0x2e20f
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 0x2e225
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
incq %r12
movl 0x100(%r15), %eax
cmpq %rax, %r12
jae 0x2e24a
movq %rbx, %rdi
leaq 0x8be6d(%rip), %rsi     # 0xba0ab
callq 0x64e0
movl 0x100(%r15), %eax
cmpq %rax, %r12
jb 0x2e1af
leaq 0x8c7bb(%rip), %rsi     # 0xbaa15
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 0x34a5c
leaq 0x89efa(%rip), %rsi     # 0xb8185
leaq 0x28(%rsp), %rdi
callq 0x64e0
jmp 0x2df8f
jmp 0x2e2b8
jmp 0x2e310
jmp 0x2e310
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e32d
movq 0x10(%rsp), %rsi
jmp 0x2e325
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e313
movq 0x38(%rsp), %rsi
jmp 0x2e304
jmp 0x2e310
jmp 0x2e310
jmp 0x2e310
jmp 0x2e2da
jmp 0x2e310
movq %rax, %r14
movq (%rsp), %rdi
cmpq %rbp, %rdi
jne 0x2e2ff
jmp 0x2e313
jmp 0x2e310
jmp 0x2e2ee
jmp 0x2e310
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2e313
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x2e313
jmp 0x2e310
movq %rax, %r14
movq (%rbx), %rdi
cmpq 0x20(%rsp), %rdi
je 0x2e32d
movq 0x20(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
nop