// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_constant(spirv_cross::SPIRConstant const&)
void CompilerGLSL::emit_constant(const SPIRConstant &constant)
{
	auto &type = get<SPIRType>(constant.constant_type);
	auto name = to_name(constant.self);

	SpecializationConstant wg_x, wg_y, wg_z;
	uint32_t workgroup_size_id = get_work_group_size_specialization_constants(wg_x, wg_y, wg_z);

	if (constant.self == workgroup_size_id || constant.self == wg_x.id || constant.self == wg_y.id ||
	    constant.self == wg_z.id)
	{
		// These specialization constants are implicitly declared by emitting layout() in;
		return;
	}

	// Only scalars have constant IDs.
	if (has_decoration(constant.self, DecorationSpecId))
	{
		statement("layout(constant_id = ", get_decoration(constant.self, DecorationSpecId), ") const ",
		          variable_decl(type, name), " = ", constant_expression(constant), ";");
	}
	else
	{
		statement("const ", variable_decl(type, name), " = ", constant_expression(constant), ";");
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rsi), %esi
callq 0xa3ea
movq %rax, %r15
movl 0x8(%r14), %edx
movq (%rbx), %rax
leaq 0x60(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
leaq 0x58(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x48(%rsp), %rcx
movq %rbx, %rdi
callq 0x15fe4
movl 0x8(%r14), %esi
cmpl %eax, %esi
je 0x2de22
cmpl 0x58(%rsp), %esi
je 0x2de22
cmpl 0x50(%rsp), %esi
je 0x2de22
cmpl 0x48(%rsp), %esi
je 0x2de22
movq %rbx, %rdi
movl $0x1, %edx
callq 0x12974
testb %al, %al
je 0x2dd99
movl 0x8(%r14), %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x14e6e
movl %eax, 0x4(%rsp)
movq (%rbx), %rax
leaq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rcx
movq %rbx, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
callq *0xc8(%rax)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2deba
leaq 0x90d88(%rip), %rax     # 0xbeaf1
leaq 0x8940f(%rip), %rsi     # 0xb717f
leaq 0x8941e(%rip), %rcx     # 0xb7195
leaq 0x90cdc(%rip), %r9      # 0xbea5a
leaq 0x4(%rsp), %rdx
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
pushq %rax
pushq %r15
callq 0x524e2
addq $0x10, %rsp
jmp 0x2ddec
movq (%rbx), %rax
leaq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rcx
movq %rbx, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
callq *0xc8(%rax)
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2deba
leaq 0x893cb(%rip), %rsi     # 0xb7197
leaq 0x90c87(%rip), %rcx     # 0xbea5a
leaq 0x90d17(%rip), %r9      # 0xbeaf1
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %r8
movq %rbx, %rdi
callq 0x5232a
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2de07
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2de22
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2de3d
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2de4c
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2de71
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x2de71
jmp 0x2de6e
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2de97
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x2de97
jmp 0x2de94
jmp 0x2de94
jmp 0x2de94
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2deb2
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0