// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::flatten_buffer_block(unsigned int)
void CompilerGLSL::flatten_buffer_block(uint32_t id)
{
	auto &var = get<SPIRVariable>(id);
	auto &type = get<SPIRType>(var.basetype);
	auto name = to_name(type.self, false);
	auto flags = ir.meta.at(type.self).decoration.decoration_flags;

	if (!type.array.empty())
		SPIRV_CROSS_THROW(name + " is an array of UBOs.");
	if (type.basetype != SPIRType::Struct)
		SPIRV_CROSS_THROW(name + " is not a struct.");
	if (!flags.get(DecorationBlock))
		SPIRV_CROSS_THROW(name + " is not a block.");
	if (type.member_types.empty())
		SPIRV_CROSS_THROW(name + " is an empty struct.");

	flattened_buffer_blocks.insert(id);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
callq 0x9c0e
movl 0xc(%rax), %esi
movq %rbx, %rdi
callq 0x90a4
movq %rax, %r14
movl 0x8(%rax), %edx
movq (%rbx), %rax
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq *0x38(%rax)
leaq 0x38(%rbx), %rdi
movl 0x8(%r14), %esi
callq 0x1738e
addq $0x60, %rax
leaq 0x50(%rsp), %rdi
movq %rax, %rsi
callq 0x934a
movq 0x20(%r14), %rax
cmpq 0x28(%r14), %rax
jne 0x3e4e6
cmpl $0xc, 0xc(%r14)
jne 0x3e534
testb $0x4, 0x50(%rsp)
je 0x3e582
movq 0x68(%r14), %rax
cmpq 0x70(%r14), %rax
je 0x3e5cd
addq $0x678, %rbx            # imm = 0x678
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x1af30
leaq 0x58(%rsp), %rdi
callq 0xb51c
leaq 0x30(%rsp), %rdi
callq 0x6548
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r14
leaq 0x573d4(%rip), %rdx     # 0x958cc
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x174a5
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xa88a0(%rip), %rsi     # 0xe6dc0
movq 0xa9ab9(%rip), %rdx     # 0xe7fe0
movq %r14, %rdi
callq 0x6490
jmp 0x3e616
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r14
leaq 0x516e5(%rip), %rdx     # 0x8fc2b
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x174a5
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xa8852(%rip), %rsi     # 0xe6dc0
movq 0xa9a6b(%rip), %rdx     # 0xe7fe0
movq %r14, %rdi
callq 0x6490
jmp 0x3e616
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r14
leaq 0x516ad(%rip), %rdx     # 0x8fc41
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x174a5
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xa8804(%rip), %rsi     # 0xe6dc0
movq 0xa9a1d(%rip), %rdx     # 0xe7fe0
movq %r14, %rdi
callq 0x6490
jmp 0x3e616
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %r14
leaq 0x57303(%rip), %rdx     # 0x958e2
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x174a5
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xa87b9(%rip), %rsi     # 0xe6dc0
movq 0xa99d2(%rip), %rdx     # 0xe7fe0
movq %r14, %rdi
callq 0x6490
jmp 0x3e622
jmp 0x3e636
jmp 0x3e622
jmp 0x3e636
jmp 0x3e622
jmp 0x3e636
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x3e639
jmp 0x3e646
movq %rax, %rbx
movq %r14, %rdi
callq 0x6200
jmp 0x3e646
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xb51c
jmp 0x3e655
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
nop