// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cpp.cpp
// Function: spirv_cross::CompilerCPP::emit_push_constant_block(spirv_cross::SPIRVariable const&)
void CompilerCPP::emit_push_constant_block(const SPIRVariable &var)
{
	add_resource_name(var.self);

	auto &type = get<SPIRType>(var.basetype);
	auto &flags = ir.meta[var.self].decoration.decoration_flags;
	if (flags.get(DecorationBinding) || flags.get(DecorationDescriptorSet))
		SPIRV_CROSS_THROW("Push constant blocks cannot be compiled to GLSL with Binding or Set syntax. "
		                  "Remap to location with reflection API first or disable these decorations.");

	emit_block_struct(type);
	auto buffer_name = to_name(type.self);
	auto instance_name = to_name(var.self);

	statement("internal::PushConstant<", buffer_name, type_to_array_glsl(type), "> ", instance_name, ";");
	statement_no_indent("#define ", instance_name, " __res->", instance_name, ".get()");
	resource_registrations.push_back(join("s.register_push_constant(", instance_name, "__", ");"));
	statement("");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rsi), %esi
callq 0x22d1a
movl 0xc(%r15), %esi
movq %rbx, %rdi
callq 0x90a4
movq %rax, %r14
movl 0x8(%r15), %eax
movq 0x38(%rbx), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
testb $0x6, 0x64(%rcx,%rax)
jne 0x7f91
movq %rbx, %rdi
movq %r14, %rsi
callq 0x783c
movl 0x8(%r14), %edx
movq (%rbx), %rax
leaq 0x48(%rsp), %rdi
pushq $0x1
popq %rbp
movq %rbx, %rsi
movl %ebp, %ecx
callq *0x38(%rax)
movl 0x8(%r15), %edx
movq (%rbx), %rax
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movl %ebp, %ecx
callq *0x38(%rax)
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2547c
leaq 0x91bb5(%rip), %rax     # 0x99a81
movq %rax, (%rsp)
leaq 0x87429(%rip), %rsi     # 0x8f300
leaq 0x872df(%rip), %r8      # 0x8f1bd
leaq 0x48(%rsp), %rdx
leaq 0x8(%rsp), %rcx
leaq 0x28(%rsp), %r9
movq %rbx, %rdi
callq 0x97e0
leaq 0x8(%rsp), %rdi
callq 0x6548
leaq 0x872be(%rip), %rsi     # 0x8f1c4
leaq 0x872c0(%rip), %rcx     # 0x8f1cd
leaq 0x872c4(%rip), %r9      # 0x8f1d8
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movq %rdx, %r8
callq 0x98ea
leaq 0x873ed(%rip), %rsi     # 0x8f318
leaq 0x872c2(%rip), %rcx     # 0x8f1f4
leaq 0x91b47(%rip), %r8      # 0x99a80
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x990f
leaq 0x788(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xcc8c
leaq 0x8(%rsp), %rdi
callq 0x6548
leaq 0x8791d(%rip), %rsi     # 0x8f887
movq %rbx, %rdi
callq 0x928e
leaq 0x28(%rsp), %rdi
callq 0x6548
leaq 0x48(%rsp), %rdi
callq 0x6548
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r14
leaq 0x872c7(%rip), %rsi     # 0x8f26a
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xdedf5(%rip), %rsi     # 0xe6dc0
movq 0xe000e(%rip), %rdx     # 0xe7fe0
movq %r14, %rdi
callq 0x6490
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x7ff1
jmp 0x802c
movq %rax, %rbx
movq %r14, %rdi
callq 0x6200
jmp 0x802c
jmp 0x7fff
jmp 0x8015
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
jmp 0x8018
jmp 0x8015
movq %rax, %rbx
jmp 0x8022
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x6548
leaq 0x48(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0