// File: /workspace/github_cpp_makefile_star2_O3/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 0x281be
movl 0xc(%r15), %esi
movq %rbx, %rdi
callq 0xa3ea
movq %rax, %r14
movl 0x8(%r15), %eax
movq 0x38(%rbx), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
testb $0x6, 0x64(%rcx,%rax)
jne 0x8e68
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0xa3ea
movl $0x0, 0x98(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x27fa4
movl 0x8(%r14), %edx
movq (%rbx), %rax
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
movl 0x8(%r15), %edx
movq (%rbx), %rax
leaq 0x48(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2b55a
leaq 0xb5da4(%rip), %rax     # 0xbeaf1
movq %rax, (%rsp)
leaq 0xab5d0(%rip), %rsi     # 0xb4328
leaq 0xab486(%rip), %r8      # 0xb41e5
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %rcx
leaq 0x48(%rsp), %r9
movq %rbx, %rdi
callq 0xaddc
leaq 0x18(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x8d91
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x638(%rbx), %ebp
movl $0x0, 0x638(%rbx)
leaq 0xab444(%rip), %rsi     # 0xb41ec
leaq 0xab446(%rip), %rcx     # 0xb41f5
leaq 0xab44a(%rip), %r9      # 0xb4200
leaq 0x48(%rsp), %rdx
movq %rbx, %rdi
movq %rdx, %r8
callq 0xfa7c
movl %ebp, 0x638(%rbx)
leaq 0xab56d(%rip), %rsi     # 0xb4340
leaq 0xab442(%rip), %rcx     # 0xb421c
leaq 0xb5d0f(%rip), %r8      # 0xbeaf0
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0xafb4
leaq 0x788(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xebc2
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x8e18
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xaba90(%rip), %rsi     # 0xb48af
movq %rbx, %rdi
callq 0xa6c4
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8e42
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8e5d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xab40d(%rip), %rsi     # 0xb4292
leaq 0xab49b(%rip), %rdx     # 0xb4327
leaq 0x28(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x6320
leaq 0xf2f1b(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0xf2ef3(%rip), %rsi     # 0xfbdb0
movq 0xf4114(%rip), %rdx     # 0xfcfd8
movq %r14, %rdi
callq 0x6470
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x8ee6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x8ef0
jmp 0x8f6b
movq %rax, %rbx
movq %r14, %rdi
callq 0x6200
jmp 0x8f6b
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
jne 0x8f1c
jmp 0x8f35
jmp 0x8f32
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8f35
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x8f35
jmp 0x8f32
movq %rax, %rbx
jmp 0x8f50
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8f50
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8f6b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop