// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r14
movl %esi, 0x24(%rsp)
callq 0xb3ca
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0xa3ea
movq %rax, %r15
movl 0x8(%rax), %edx
movq (%r14), %rax
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq *0x38(%rax)
movl 0x8(%r15), %esi
movq 0x38(%r14), %rax
movq 0x40(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x7063e7063e7063e7, %rdx # imm = 0x8F9C18F9C18F9C19
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0x4cc7a
imulq $0x148, %rsi, %rcx      # imm = 0x148
leaq (%rax,%rcx), %rsi
addq $0x68, %rsi
movq -0x8(%rsi), %rax
leaq 0x50(%rsp), %rbx
movq %rax, -0x8(%rbx)
xorl %eax, %eax
movq %rax, (%rbx)
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq 0x18(%rsi), %rcx
movq %rcx, 0x18(%rbx)
movups 0x20(%rsi), %xmm0
movups %xmm0, 0x20(%rbx)
movq %rax, 0x30(%rbx)
movq %rsp, %rdx
movq %rbx, (%rdx)
movq %rbx, %rdi
callq 0xd3c2
movq 0x20(%r15), %rax
cmpq 0x28(%r15), %rax
jne 0x4cc88
cmpl $0xc, 0xc(%r15)
jne 0x4cce2
testb $0x4, 0x48(%rsp)
je 0x4cd3c
movq 0x68(%r15), %rax
cmpq 0x70(%r15), %rax
je 0x4cd93
addq $0x678, %r14            # imm = 0x678
movq %rsp, %rdx
movq %r14, (%rdx)
leaq 0x24(%rsp), %rsi
movq %r14, %rdi
callq 0x1f510
movq %rbx, %rdi
callq 0xd570
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4cc6c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x67498(%rip), %rdi     # 0xb4119
xorl %eax, %eax
callq 0x63d0
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x6dc50(%rip), %rdx     # 0xba8ec
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x53108
movb $0x1, %bpl
movq %rsp, %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xaf10a(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xaf0e2(%rip), %rsi     # 0xfbdb0
movq 0xb0303(%rip), %rdx     # 0xfcfd8
movq %r15, %rdi
callq 0x6470
jmp 0x4cde8
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x67f62(%rip), %rdx     # 0xb4c58
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x53108
movb $0x1, %bpl
movq %rsp, %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xaf0b0(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xaf088(%rip), %rsi     # 0xfbdb0
movq 0xb02a9(%rip), %rdx     # 0xfcfd8
movq %r15, %rdi
callq 0x6470
jmp 0x4cde8
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x67f1e(%rip), %rdx     # 0xb4c6e
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x53108
movb $0x1, %bpl
movq %rsp, %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xaf056(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xaf02e(%rip), %rsi     # 0xfbdb0
movq 0xb024f(%rip), %rdx     # 0xfcfd8
movq %r15, %rdi
callq 0x6470
jmp 0x4cde8
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x6db5b(%rip), %rdx     # 0xba902
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x53108
movb $0x1, %bpl
movq %rsp, %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xaefff(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xaefd7(%rip), %rsi     # 0xfbdb0
movq 0xb01f8(%rip), %rdx     # 0xfcfd8
movq %r15, %rdi
callq 0x6470
jmp 0x4cdf4
jmp 0x4ce19
jmp 0x4cdf4
jmp 0x4ce19
jmp 0x4cdf4
jmp 0x4ce19
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4ce12
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x4ce1c
jmp 0x4ce29
movq %rax, %r14
movq %r15, %rdi
callq 0x6200
jmp 0x4ce29
movq %rax, %r14
movq %rbx, %rdi
callq 0xd570
jmp 0x4ce36
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4ce51
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
nop