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

	auto &type = get<SPIRType>(var.basetype);
	auto instance_name = to_name(var.self);

	uint32_t descriptor_set = ir.meta[var.self].decoration.set;
	uint32_t binding = ir.meta[var.self].decoration.binding;

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

	statement("internal::Resource<", 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_resource(", instance_name, "__", ", ", descriptor_set, ", ", binding, ");"));
	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), %edx
movq (%rbx), %rax
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
movl 0x8(%r15), %eax
movq 0x38(%rbx), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
movl 0xac(%rcx,%rax), %edx
movl %edx, 0x4(%rsp)
movl 0xb0(%rcx,%rax), %eax
movl %eax, (%rsp)
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 0x48(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2b55a
subq $0x8, %rsp
leaq 0xabf07(%rip), %rax     # 0xb41e8
leaq 0xabee9(%rip), %rsi     # 0xb41d1
leaq 0xabef6(%rip), %r8      # 0xb41e5
leaq 0x50(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0x30(%rsp), %r9
movq %rbx, %rdi
pushq %rax
callq 0xa41e
addq $0x10, %rsp
leaq 0x18(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x8326
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x638(%rbx), %ebp
movl $0x0, 0x638(%rbx)
leaq 0xabeaf(%rip), %rsi     # 0xb41ec
leaq 0xabeb1(%rip), %rcx     # 0xb41f5
leaq 0xabeb3(%rip), %r9      # 0xb41fe
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movq %rdx, %r8
callq 0xe6d6
movl %ebp, 0x638(%rbx)
subq $0x8, %rsp
leaq 0xb6784(%rip), %rax     # 0xbeaf0
leaq 0x8(%rsp), %r10
leaq 0xb1d33(%rip), %r8      # 0xba0ab
leaq 0xabe88(%rip), %rsi     # 0xb4207
leaq 0xabe96(%rip), %rcx     # 0xb421c
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
leaq 0xc(%rsp), %r9
pushq %rax
pushq %r10
pushq %r8
callq 0xa5f6
addq $0x20, %rsp
leaq 0x788(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xebc2
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x83cb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xac4dd(%rip), %rsi     # 0xb48af
movq %rbx, %rdi
callq 0xa6c4
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x83f5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8410
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
jne 0x843d
jmp 0x8453
jmp 0x8450
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8453
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x8453
jmp 0x8450
jmp 0x8470
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8473
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x8473
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x848e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0