// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_cross_parsed_ir.cpp
// Function: spirv_cross::ParsedIR::get_buffer_block_flags(spirv_cross::SPIRVariable const&) const
Bitset ParsedIR::get_buffer_block_flags(const SPIRVariable &var) const
{
	auto &type = get<SPIRType>(var.basetype);
	assert(type.basetype == SPIRType::Struct);

	// Some flags like non-writable, non-readable are actually found
	// as member decorations. If all members have a decoration set, propagate
	// the decoration up as a regular variable decoration.
	Bitset base_flags = meta[var.self].decoration.decoration_flags;

	if (type.member_types.empty())
		return base_flags;

	Bitset all_members_flags = get_member_decoration_bitset(type.self, 0);
	for (uint32_t i = 1; i < uint32_t(type.member_types.size()); i++)
		all_members_flags.merge_and(get_member_decoration_bitset(type.self, i));

	base_flags.merge_or(all_members_flags);
	return base_flags;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movl 0xc(%rdx), %edi
shlq $0x4, %rdi
addq 0x18(%rsi), %rdi
callq 0x1fff2
cmpl $0xc, 0xc(%rax)
jne 0x24eeb
movq %rax, %r13
movl 0x8(%rbx), %eax
movq 0x30(%r15), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
leaq (%rcx,%rax), %rsi
addq $0x68, %rsi
movq -0x8(%rsi), %rax
movq %rax, (%r12)
leaq 0x8(%r12), %rbx
xorl %eax, %eax
movq %rax, 0x8(%r12)
movq 0x8(%rsi), %rcx
movq %rcx, 0x10(%r12)
movq %rax, 0x18(%r12)
movq 0x18(%rsi), %rcx
movq %rcx, 0x20(%r12)
movups 0x20(%rsi), %xmm0
movups %xmm0, 0x28(%r12)
movq %rax, 0x38(%r12)
leaq 0x68(%rsp), %rdx
movq %rbx, (%rdx)
movq %rbx, %rdi
callq 0xd402
movq 0x68(%r13), %rax
cmpq 0x70(%r13), %rax
je 0x24ed6
movq %r12, 0x10(%rsp)
movq %rbx, 0x8(%rsp)
movl 0x8(%r13), %esi
xorl %ebx, %ebx
movq %r15, %rdi
xorl %edx, %edx
callq 0x24f46
movq (%rax), %rcx
leaq 0x70(%rsp), %rdi
movq %rcx, -0x8(%rdi)
leaq 0x8(%rax), %rsi
movq %rbx, (%rdi)
movq 0x10(%rax), %rcx
movq %rcx, 0x8(%rdi)
movq %rbx, 0x10(%rdi)
movq 0x20(%rax), %rcx
movq %rcx, 0x18(%rdi)
movups 0x28(%rax), %xmm0
movups %xmm0, 0x20(%rdi)
movq %rbx, 0x30(%rdi)
leaq 0x30(%rsp), %rbp
movq %rdi, (%rbp)
movq %rbp, %rdx
callq 0xd402
movq 0x70(%r13), %rax
subq 0x68(%r13), %rax
movabsq $0x3fffffff8, %rcx      # imm = 0x3FFFFFFF8
testq %rcx, %rax
je 0x24e8b
movl $0x1, %r14d
leaq 0x28(%rsp), %r12
movq %r15, 0x20(%rsp)
movq %r13, 0x18(%rsp)
movl 0x8(%r13), %esi
movq %r15, %rdi
movl %r14d, %edx
callq 0x24f46
movq %rax, %r15
movq (%rax), %rax
andq %rax, 0x68(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x30(%rsp)
movq $0x1, 0x38(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, 0x50(%rsp) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq 0x80(%rsp), %r13
testq %r13, %r13
je 0x24e54
addq $0x8, %r15
leaq 0x8(%r13), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1fbce
testq %rax, %rax
je 0x24e4b
movq %rbp, 0x28(%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1fc02
movq (%r13), %r13
testq %r13, %r13
jne 0x24e24
leaq 0x70(%rsp), %rdi
movq %rbp, %rsi
callq 0x6734
movq %rbp, %rdi
callq 0xd5b0
incl %r14d
movq 0x18(%rsp), %r13
movq 0x70(%r13), %rax
subq 0x68(%r13), %rax
shrq $0x2, %rax
cmpl %eax, %r14d
movq 0x20(%rsp), %r15
jb 0x24dd3
movq 0x68(%rsp), %rax
movq 0x10(%rsp), %r12
orq %rax, (%r12)
movq 0x80(%rsp), %rbx
testq %rbx, %rbx
movq 0x8(%rsp), %r15
je 0x24ecc
leaq 0x30(%rsp), %r14
leaq 0x8(%rbx), %rsi
movq %r15, 0x30(%rsp)
movq %r15, %rdi
movq %r14, %rdx
callq 0x1fc02
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x24eb0
leaq 0x70(%rsp), %rdi
callq 0xd5b0
movq %r12, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x916cb(%rip), %rdi     # 0xb65bd
leaq 0x9165e(%rip), %rsi     # 0xb6557
leaq 0x916df(%rip), %rcx     # 0xb65df
movl $0x11a, %edx            # imm = 0x11A
callq 0x61b0
movq %rax, %r14
jmp 0x24f33
movq %rax, %rdi
callq 0xd589
movq %rax, %r14
jmp 0x24f29
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0xd5b0
leaq 0x70(%rsp), %rdi
callq 0xd5b0
movq 0x8(%rsp), %rdi
callq 0xd5b0
movq %r14, %rdi
callq 0x64a0
nop