// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::emit_specialization_constants()
void CompilerHLSL::emit_specialization_constants()
{
	bool emitted = false;
	SpecializationConstant wg_x, wg_y, wg_z;
	uint32_t workgroup_size_id = get_work_group_size_specialization_constants(wg_x, wg_y, wg_z);

	for (auto &id : ir.ids)
	{
		if (id.get_type() == TypeConstant)
		{
			auto &c = id.get<SPIRConstant>();
			if (!c.specialization)
				continue;
			if (c.self == workgroup_size_id)
				continue;

			auto &type = get<SPIRType>(c.constant_type);
			auto name = to_name(c.self);

			statement("static const ", variable_decl(type, name), " = ", constant_expression(c), ";");
			emitted = true;
		}
		else if (id.get_type() == TypeConstantOp)
		{
			auto &c = id.get<SPIRConstantOp>();
			auto &type = get<SPIRType>(c.basetype);
			auto name = to_name(c.self);
			statement("static const ", variable_decl(type, name), " = ", constant_op_expression(c), ";");
		}
	}

	if (workgroup_size_id)
	{
		statement("static const uint3 gl_WorkGroupSize = ", constant_expression(get<SPIRConstant>(workgroup_size_id)),
		          ";");
		emitted = true;
	}

	if (emitted)
		statement("");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x80(%rsp), %rsi
leaq 0x78(%rsp), %rdx
leaq 0x70(%rsp), %rcx
callq 0x162fc
movl %eax, 0xc(%rsp)
movq 0x20(%rbx), %r14
movq 0x28(%rbx), %r12
cmpq %r12, %r14
je 0x65fb0
movl $0x0, 0x8(%rsp)
movl 0x8(%r14), %eax
cmpl $0xa, %eax
je 0x65ec9
cmpl $0x3, %eax
jne 0x65fa1
movq %r14, %rdi
callq 0x1be66
cmpb $0x1, 0x108(%rax)
jne 0x65fa1
movq %rax, %rbp
movl 0xc(%rsp), %eax
cmpl %eax, 0x8(%rbp)
je 0x65fa1
movl 0xc(%rbp), %esi
movq %rbx, %rdi
callq 0xa426
movq %rax, %r15
movl 0x8(%rbp), %edx
movq (%rbx), %rax
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
movq (%rbx), %rax
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq *0xc8(%rax)
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x2e53a
movq %rbx, %rdi
leaq 0x56d10(%rip), %rsi     # 0xbcb5f
leaq 0x30(%rsp), %rdx
leaq 0x59bf7(%rip), %rcx     # 0xbfa52
movq %r15, %r8
leaq 0x59c84(%rip), %r9      # 0xbfae9
callq 0x76878
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x65e86
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x65ea2
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x65ebe
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
movb $0x1, %al
movl %eax, 0x8(%rsp)
jmp 0x65fa1
movq %r14, %rdi
callq 0x25f0e
movq %rax, %rbp
movl 0x28(%rax), %esi
movq %rbx, %rdi
callq 0xa426
movq %rax, %r15
movl 0x8(%rbp), %edx
movq (%rbx), %rax
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
movq (%rbx), %rax
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq *0xc8(%rax)
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x2d3f6
movq %rbx, %rdi
leaq 0x56c2d(%rip), %rsi     # 0xbcb5f
leaq 0x30(%rsp), %rdx
leaq 0x59b14(%rip), %rcx     # 0xbfa52
movq %r15, %r8
leaq 0x59ba1(%rip), %r9      # 0xbfae9
callq 0x76878
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x65f69
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x65f85
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x65fa1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x10, %r14
cmpq %r12, %r14
jne 0x65db6
jmp 0x65fb8
movl $0x0, 0x8(%rsp)
movl 0xc(%rsp), %esi
testl %esi, %esi
movl 0x8(%rsp), %eax
je 0x66015
movq %rbx, %rdi
callq 0x1c66e
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2e53a
leaq 0x56b87(%rip), %rsi     # 0xbcb6d
leaq 0x59afc(%rip), %rcx     # 0xbfae9
movq %rbx, %rdi
movq %r14, %rdx
callq 0x76a30
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x66013
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
movb $0x1, %al
testb $0x1, %al
je 0x66028
leaq 0x4f88f(%rip), %rsi     # 0xb58af
movq %rbx, %rdi
callq 0xa700
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x6609d
jmp 0x66053
jmp 0x66074
jmp 0x6604e
movq %rax, %rbx
jmp 0x66093
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x66077
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x66077
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x66093
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x660af
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop