// File: /workspace/github_cpp_makefile_star2_O1/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, %r12
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 0x8d7be
movq %r15, 0x10(%rsp)
cmpl $0x1, 0x8(%r14)
jne 0x8d7b1
movq %r14, %rdi
callq 0xb08e
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 %r12, %rdi
movl $0x2, %edx
callq 0x1299a
testb %al, %al
jne 0x8d6e3
movl 0x8(%rbp), %esi
movq %r12, %rdi
movl $0x3, %edx
callq 0x1299a
testb %al, %al
je 0x8d6f3
movq %r12, %rdi
movq %rbp, %rsi
callq 0x13422
movl %eax, %r13d
jmp 0x8d6f6
xorl %r13d, %r13d
andb %bl, %r15b
xorb $0x1, %r13b
andb %r15b, %r13b
movl 0x930(%r12), %esi
testl %esi, %esi
je 0x8d72b
movq %r12, %rdi
callq 0xb40a
movq 0x10(%rsp), %r15
movl 0xc(%rax), %eax
cmpl 0xc(%rsp), %eax
setne %al
andb %r13b, %al
movl %eax, %r13d
jmp 0x8d730
movq 0x10(%rsp), %r15
movl 0x92c(%r12), %esi
testl %esi, %esi
je 0x8d754
movq %r12, %rdi
callq 0xb40a
movl 0xc(%rax), %eax
cmpl 0xc(%rsp), %eax
setne %al
andb %r13b, %al
movl %eax, %r13d
testb %r13b, %r13b
je 0x8d7b1
leaq 0x20(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x1fbce
testq %rax, %rax
jne 0x8d7b1
leaq 0x20(%rsp), %rdi
movq %rdi, 0x18(%rsp)
leaq 0xc(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq 0x1fc02
movl 0xc(%rsp), %esi
movq %r12, %rdi
movl $0xa, %edx
callq 0x1299a
testb %al, %al
je 0x8d7a6
movq %r12, %rdi
movq %rbp, %rsi
callq 0x8ffce
movq %r12, %rdi
movq %rbp, %rsi
callq 0x285ee
addq $0x10, %r14
cmpq %r15, %r14
jne 0x8d68e
movq %r12, %rdi
callq 0x90682
movq (%r12), %rax
movq %r12, %rdi
callq *0x180(%rax)
movl 0x930(%r12), %esi
movq %r12, %rdi
callq 0x90842
movl 0x92c(%r12), %esi
movq %r12, %rdi
callq 0x90842
leaq 0x20(%rsp), %rdi
callq 0xd5b0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8d814
jmp 0x8d814
jmp 0x8d814
jmp 0x8d814
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xd5b0
movq %rbx, %rdi
callq 0x64a0
nop