// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::emit_resources()
void CompilerMSL::emit_resources()
{
	// Output non-builtin interface structs. These include local function structs
	// and structs nested within uniform and read-write buffers.
	unordered_set<uint32_t> declared_structs;
	for (auto &id : ir.ids)
	{
		if (id.get_type() == TypeType)
		{
			auto &type = id.get<SPIRType>();
			uint32_t type_id = type.self;

			bool is_struct = (type.basetype == SPIRType::Struct) && type.array.empty();
			bool is_block =
			    has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock);

			bool is_builtin_block = is_block && is_builtin_type(type);
			bool is_declarable_struct = is_struct && !is_builtin_block;

			// We'll declare this later.
			if (stage_out_var_id && get<SPIRVariable>(stage_out_var_id).basetype == type_id)
				is_declarable_struct = false;
			if (stage_in_var_id && get<SPIRVariable>(stage_in_var_id).basetype == type_id)
				is_declarable_struct = false;

			// Align and emit declarable structs...but avoid declaring each more than once.
			if (is_declarable_struct && declared_structs.count(type_id) == 0)
			{
				declared_structs.insert(type_id);

				if (has_decoration(type_id, DecorationCPacked))
					align_struct(type);

				emit_struct(type);
			}
		}
	}

	declare_constant_arrays();
	declare_undefined_values();

	// Emit the special [[stage_in]] and [[stage_out]] interface blocks which we created.
	emit_interface_block(stage_out_var_id);
	emit_interface_block(stage_in_var_id);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r13
leaq 0x50(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq 0x20(%rdi), %r14
movq 0x28(%rdi), %r15
cmpq %r15, %r14
je 0x8cbab
movq %r15, 0x10(%rsp)
cmpl $0x1, 0x8(%r14)
jne 0x8cb9e
movq %r14, %rdi
callq 0xb052
movq %rax, %rbp
movl 0x8(%rax), %esi
movl %esi, 0xc(%rsp)
cmpl $0xc, 0xc(%rax)
sete %r15b
movq 0x28(%rax), %rax
cmpq %rax, 0x20(%rbp)
sete %bl
movq %r13, %rdi
movl $0x2, %edx
callq 0x12974
testb %al, %al
jne 0x8ca95
movl 0x8(%rbp), %esi
movq %r13, %rdi
movl $0x3, %edx
callq 0x12974
testb %al, %al
je 0x8caa5
movq %r13, %rdi
movq %rbp, %rsi
callq 0x133a6
movl %eax, %r12d
jmp 0x8caa8
xorl %r12d, %r12d
andb %bl, %r15b
xorb $0x1, %r12b
andb %r15b, %r12b
movl 0x930(%r13), %esi
testl %esi, %esi
je 0x8cadc
movq %r13, %rdi
callq 0xb3ca
movq 0x10(%rsp), %r15
movl 0xc(%rax), %eax
cmpl 0xc(%rsp), %eax
setne %al
andb %r12b, %al
movl %eax, %r12d
jmp 0x8cae1
movq 0x10(%rsp), %r15
movl 0x92c(%r13), %esi
testl %esi, %esi
je 0x8cb08
movq %r13, %rdi
callq 0xb3ca
movl 0xc(%rsp), %edi
cmpl %edi, 0xc(%rax)
setne %al
testb %r12b, %al
jne 0x8cb15
jmp 0x8cb9e
testb %r12b, %r12b
je 0x8cb9e
movl 0xc(%rsp), %edi
movl %edi, %eax
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %r8
xorl %edx, %edx
divq %r8
movq (%rsi,%rdx,8), %rax
testq %rax, %rax
je 0x8cb5a
movq %rdx, %rcx
movq (%rax), %r9
cmpl 0x8(%r9), %edi
je 0x8cb9e
movq (%r9), %r9
testq %r9, %r9
je 0x8cb5a
movl 0x8(%r9), %esi
movq %rsi, %rax
xorl %edx, %edx
divq %r8
cmpq %rcx, %rdx
jne 0x8cb5a
cmpl %esi, %edi
jne 0x8cb3b
jmp 0x8cb9e
leaq 0x20(%rsp), %rdi
movq %rdi, 0x18(%rsp)
leaq 0xc(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq 0x1f510
movl 0xc(%rsp), %esi
movq %r13, %rdi
movl $0xa, %edx
callq 0x12974
testb %al, %al
je 0x8cb93
movq %r13, %rdi
movq %rbp, %rsi
callq 0x8f384
movq %r13, %rdi
movq %rbp, %rsi
callq 0x27fa4
addq $0x10, %r14
cmpq %r15, %r14
jne 0x8ca40
movq %r13, %rdi
callq 0x8fa44
movq (%r13), %rax
movq %r13, %rdi
callq *0x180(%rax)
movl 0x930(%r13), %esi
movq %r13, %rdi
callq 0x8fc0c
movl 0x92c(%r13), %esi
movq %r13, %rdi
callq 0x8fc0c
leaq 0x20(%rsp), %rdi
callq 0xd570
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8cbff
jmp 0x8cbff
jmp 0x8cbff
jmp 0x8cbff
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xd570
movq %rbx, %rdi
callq 0x64a0