// File: /workspace/github_cpp_makefile_star2_O3/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 0x15fe4
movq 0x20(%rbx), %r14
movq 0x28(%rbx), %r12
cmpq %r12, %r14
je 0x656e9
movl %eax, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movl 0x8(%r14), %eax
cmpl $0xa, %eax
je 0x655f3
cmpl $0x3, %eax
jne 0x656cb
movq %r14, %rdi
callq 0x1b808
cmpb $0x1, 0x108(%rax)
jne 0x656cb
movq %rax, %rbp
movl 0xc(%rsp), %eax
cmpl %eax, 0x8(%rbp)
je 0x656cb
movl 0xc(%rbp), %esi
movq %rbx, %rdi
callq 0xa3ea
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 0x2deba
movq %rbx, %rdi
leaq 0x565ee(%rip), %rsi     # 0xbbb67
leaq 0x30(%rsp), %rdx
leaq 0x594d5(%rip), %rcx     # 0xbea5a
movq %r15, %r8
leaq 0x59562(%rip), %r9      # 0xbeaf1
callq 0x75d6c
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x655b0
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x655cc
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x655e8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
movb $0x1, %al
movl %eax, 0x8(%rsp)
jmp 0x656cb
movq %r14, %rdi
callq 0x2584c
movq %rax, %rbp
movl 0x28(%rax), %esi
movq %rbx, %rdi
callq 0xa3ea
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 0x2cd88
movq %rbx, %rdi
leaq 0x5650b(%rip), %rsi     # 0xbbb67
leaq 0x30(%rsp), %rdx
leaq 0x593f2(%rip), %rcx     # 0xbea5a
movq %r15, %r8
leaq 0x5947f(%rip), %r9      # 0xbeaf1
callq 0x75d6c
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x65693
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x656af
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x656cb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x10, %r14
cmpq %r12, %r14
jne 0x654e0
movl 0xc(%rsp), %eax
testl %eax, %eax
jne 0x656ed
testb $0x1, 0x8(%rsp)
jne 0x6573e
jmp 0x6574d
testl %eax, %eax
je 0x6574d
movq %rbx, %rdi
movl %eax, %esi
callq 0x1c036
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2deba
leaq 0x56464(%rip), %rsi     # 0xbbb75
leaq 0x593d9(%rip), %rcx     # 0xbeaf1
movq %rbx, %rdi
movq %r14, %rdx
callq 0x75f24
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6573e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x4f16a(%rip), %rsi     # 0xb48af
movq %rbx, %rdi
callq 0xa6c4
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 0x657c2
jmp 0x65778
jmp 0x65799
jmp 0x65773
movq %rax, %rbx
jmp 0x657b8
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x6579c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x6579c
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x657b8
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x657d4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0