// File: /workspace/github_cpp_makefile_star2_O3/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 0x1f90e
cmpl $0xc, 0xc(%rax)
jne 0x24859
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 0xd3c2
movq 0x68(%r13), %rax
cmpq 0x70(%r13), %rax
je 0x24844
movq %r12, 0x10(%rsp)
movq %rbx, 0x8(%rsp)
movl 0x8(%r13), %esi
xorl %ebx, %ebx
movq %r15, %rdi
xorl %edx, %edx
callq 0x248b4
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 0xd3c2
movq 0x70(%r13), %rax
subq 0x68(%r13), %rax
movabsq $0x3fffffff8, %rcx      # imm = 0x3FFFFFFF8
testq %rcx, %rax
je 0x247f9
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 0x248b4
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 0x247c2
addq $0x8, %r15
leaq 0x8(%r13), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1f4b4
testq %rax, %rax
je 0x247b9
movq %rbp, 0x28(%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1f510
movq (%r13), %r13
testq %r13, %r13
jne 0x24792
leaq 0x70(%rsp), %rdi
movq %rbp, %rsi
callq 0x6728
movq %rbp, %rdi
callq 0xd570
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 0x24741
movq 0x68(%rsp), %rax
movq 0x10(%rsp), %r12
orq %rax, (%r12)
movq 0x80(%rsp), %rbx
testq %rbx, %rbx
movq 0x8(%rsp), %r15
je 0x2483a
leaq 0x30(%rsp), %r14
leaq 0x8(%rbx), %rsi
movq %r15, 0x30(%rsp)
movq %r15, %rdi
movq %r14, %rdx
callq 0x1f510
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x2481e
leaq 0x70(%rsp), %rdi
callq 0xd570
movq %r12, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x90d4d(%rip), %rdi     # 0xb55ad
leaq 0x90ce0(%rip), %rsi     # 0xb5547
leaq 0x90d61(%rip), %rcx     # 0xb55cf
movl $0x11a, %edx            # imm = 0x11A
callq 0x61b0
movq %rax, %r14
jmp 0x248a1
movq %rax, %rdi
callq 0xd549
movq %rax, %r14
jmp 0x24897
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0xd570
leaq 0x70(%rsp), %rdi
callq 0xd570
movq 0x8(%rsp), %rdi
callq 0xd570
movq %r14, %rdi
callq 0x64a0
nop