// File: /workspace/github_cpp_makefile_star2_O1/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 0xb40a
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0xa426
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 0x4d416
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 0xd402
movq 0x20(%r15), %rax
cmpq 0x28(%r15), %rax
jne 0x4d424
cmpl $0xc, 0xc(%r15)
jne 0x4d47e
testb $0x4, 0x48(%rsp)
je 0x4d4d8
movq 0x68(%r15), %rax
cmpq 0x70(%r15), %rax
je 0x4d52f
addq $0x678, %r14            # imm = 0x678
movq %rsp, %rdx
movq %r14, (%rdx)
leaq 0x24(%rsp), %rsi
movq %r14, %rdi
callq 0x1fc02
movq %rbx, %rdi
callq 0xd5b0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d408
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x67cfc(%rip), %rdi     # 0xb5119
xorl %eax, %eax
callq 0x63d0
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x6e4c4(%rip), %rdx     # 0xbb8fc
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x53902
movb $0x1, %bpl
movq %rsp, %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xaf93e(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xaf916(%rip), %rsi     # 0xfcd80
movq 0xb0b67(%rip), %rdx     # 0xfdfd8
movq %r15, %rdi
callq 0x6470
jmp 0x4d584
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x687c9(%rip), %rdx     # 0xb5c5b
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x53902
movb $0x1, %bpl
movq %rsp, %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xaf8e4(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xaf8bc(%rip), %rsi     # 0xfcd80
movq 0xb0b0d(%rip), %rdx     # 0xfdfd8
movq %r15, %rdi
callq 0x6470
jmp 0x4d584
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x68785(%rip), %rdx     # 0xb5c71
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x53902
movb $0x1, %bpl
movq %rsp, %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xaf88a(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xaf862(%rip), %rsi     # 0xfcd80
movq 0xb0ab3(%rip), %rdx     # 0xfdfd8
movq %r15, %rdi
callq 0x6470
jmp 0x4d584
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x6e3cf(%rip), %rdx     # 0xbb912
movq %rsp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x53902
movb $0x1, %bpl
movq %rsp, %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xaf833(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xaf80b(%rip), %rsi     # 0xfcd80
movq 0xb0a5c(%rip), %rdx     # 0xfdfd8
movq %r15, %rdi
callq 0x6470
jmp 0x4d590
jmp 0x4d5b0
jmp 0x4d590
jmp 0x4d5b0
jmp 0x4d590
jmp 0x4d5b0
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d5b6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4d5b6
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x4d5c8
movq %r15, %rdi
callq 0x6200
jmp 0x4d5c8
movq %rax, %r14
movq %rbx, %rdi
callq 0xd5b0
jmp 0x4d5d5
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d5f0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0