// File: /workspace/github_cpp_makefile_star2_O1/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 0xa426
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 0x162fc
movl 0x8(%r14), %esi
cmpl %eax, %esi
je 0x2e4a2
cmpl 0x58(%rsp), %esi
je 0x2e4a2
cmpl 0x50(%rsp), %esi
je 0x2e4a2
cmpl 0x48(%rsp), %esi
je 0x2e4a2
movq %rbx, %rdi
movl $0x1, %edx
callq 0x1299a
testb %al, %al
je 0x2e419
movl 0x8(%r14), %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x14ff6
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 0x2e53a
leaq 0x91700(%rip), %rax     # 0xbfae9
leaq 0x89d9f(%rip), %rsi     # 0xb818f
leaq 0x89dae(%rip), %rcx     # 0xb81a5
leaq 0x91654(%rip), %r9      # 0xbfa52
leaq 0x4(%rsp), %rdx
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
pushq %rax
pushq %r15
callq 0x52cda
addq $0x10, %rsp
jmp 0x2e46c
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 0x2e53a
leaq 0x89d5b(%rip), %rsi     # 0xb81a7
leaq 0x915ff(%rip), %rcx     # 0xbfa52
leaq 0x9168f(%rip), %r9      # 0xbfae9
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %r8
movq %rbx, %rdi
callq 0x52b22
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e487
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e4a2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e4bd
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2e4cc
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e4f1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x2e4f1
jmp 0x2e4ee
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e517
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x2e517
jmp 0x2e514
jmp 0x2e514
jmp 0x2e514
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e532
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0