// File: /workspace/github_cpp_makefile_star2_O2/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 0x27250
movl 0xc(%r15), %esi
movq %r14, %rdi
callq 0x90a4
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
cmpb $0x1, 0x624(%r14)
jne 0x27277
cmpb $0x1, 0x625(%r14)
jne 0x2723f
cmpl $0xc, 0xc(%rax)
jne 0x2723f
movq 0x20(%rax), %rcx
cmpq 0x28(%rax), %rcx
je 0x2747d
leaq 0x6bf1f(%rip), %rsi     # 0x93165
movq %rbx, %rdi
callq 0x64e0
jmp 0x272bf
cmpl $0x1, 0x100(%r15)
jne 0x27388
movq (%r14), %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq *0xb8(%rax)
jmp 0x2746b
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2c226
leaq 0x7699b(%rip), %rdx     # 0x9dc29
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xab3f
leaq 0x8(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6320
movq %r12, %rdi
callq 0x6548
leaq 0x28(%rsp), %rdi
callq 0x6548
movq 0x110(%r15), %rbp
movq 0x118(%r15), %r13
leaq 0x8(%rsp), %r12
cmpq %r13, %rbp
je 0x27361
movl (%rbp), %esi
movq %r14, %rdi
callq 0x17bce
cmpb $0x1, 0x108(%rax)
jne 0x27318
cmpb $0x1, 0x43e(%r14)
jne 0x27318
movl (%rbp), %edx
movq (%r14), %rax
movq %r12, %rdi
movq %r14, %rsi
pushq $0x1
popq %rcx
callq *0x38(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x64f0
jmp 0x27331
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x271d4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x64f0
movq %r12, %rdi
callq 0x6548
movq 0x118(%r15), %rax
addq $-0x4, %rax
cmpq %rax, %rbp
je 0x27358
movq %rbx, %rdi
leaq 0x6dd38(%rip), %rsi     # 0x9508b
callq 0x64d0
addq $0x4, %rbp
jmp 0x272d2
leaq 0x6be00(%rip), %rax     # 0x93168
leaq 0x6e686(%rip), %rsi     # 0x959f5
cmpb $0x0, 0x624(%r14)
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0x64d0
jmp 0x2746b
movl 0xc(%r15), %esi
movq %r14, %rdi
callq 0x90a4
movq (%r14), %r8
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq *0x98(%r8)
leaq 0x76874(%rip), %rdx     # 0x9dc29
movq %rbx, %rdi
movq %r12, %rsi
callq 0xab3f
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x6548
xorl %r13d, %r13d
leaq 0x6dcb4(%rip), %rbp     # 0x9508b
movl 0x100(%r15), %eax
cmpq %rax, %r13
jae 0x2745c
cmpb $0x1, 0x43e(%r14)
jne 0x27415
movl 0xf0(%r15,%r13,4), %edx
testl %edx, %edx
je 0x27415
movq (%r14), %rax
movq %r12, %rdi
movq %r14, %rsi
pushq $0x1
popq %rcx
callq *0x38(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x64f0
jmp 0x27435
movq (%r14), %rax
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq *0xb8(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x64f0
movq %r12, %rdi
callq 0x6548
incq %r13
movl 0x100(%r15), %eax
cmpq %rax, %r13
jae 0x273d7
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x64d0
jmp 0x273d7
leaq 0x6e592(%rip), %rsi     # 0x959f5
movq %rbx, %rdi
callq 0x64d0
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 0x2c226
leaq 0x6bcd1(%rip), %rdx     # 0x93165
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xab3f
jmp 0x2729d
jmp 0x274b8
jmp 0x274e5
jmp 0x274e5
movq %rax, %r14
leaq 0x8(%rsp), %rdi
jmp 0x274eb
movq %rax, %r14
leaq 0x28(%rsp), %rdi
jmp 0x274dc
jmp 0x274e5
jmp 0x274e5
jmp 0x274d4
jmp 0x274e5
jmp 0x274e5
jmp 0x274d4
jmp 0x274e5
jmp 0x274d4
jmp 0x274e5
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x6548
jmp 0x274e8
jmp 0x274e5
movq %rax, %r14
movq %rbx, %rdi
callq 0x6548
movq %r14, %rdi
callq 0x64b0