// File: /workspace/github_cpp_makefile_star2_O2/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 $0x48, %rsp
movq %rdi, %rbx
leaq 0x40(%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), %r12
movq %r12, 0x8(%rsp)
cmpq %r12, %r14
je 0x71bcf
cmpl $0x1, 0x8(%r14)
jne 0x71bc6
movq %r14, %rdi
callq 0x998c
movq %rax, %r13
movl 0x8(%rax), %esi
movl %esi, 0x4(%rsp)
cmpl $0xc, 0xc(%rax)
sete %bpl
movq 0x28(%rax), %rax
cmpq %rax, 0x20(%r13)
sete %r12b
movq %rbx, %rdi
pushq $0x2
popq %rdx
callq 0x103d2
testb %al, %al
jne 0x71b07
movl 0x8(%r13), %esi
movq %rbx, %rdi
pushq $0x3
popq %rdx
callq 0x103d2
testb %al, %al
je 0x71b17
movq %rbx, %rdi
movq %r13, %rsi
callq 0x10c9e
movl %eax, %r15d
jmp 0x71b1a
xorl %r15d, %r15d
andb %r12b, %bpl
xorb $0x1, %r15b
andb %bpl, %r15b
movl 0x930(%rbx), %esi
testl %esi, %esi
je 0x71b4d
movq %rbx, %rdi
callq 0x9c0e
movq 0x8(%rsp), %r12
movl 0xc(%rax), %eax
cmpl 0x4(%rsp), %eax
setne %al
andb %r15b, %al
movl %eax, %r15d
jmp 0x71b52
movq 0x8(%rsp), %r12
movl 0x92c(%rbx), %esi
testl %esi, %esi
je 0x71b75
movq %rbx, %rdi
callq 0x9c0e
movl 0xc(%rax), %eax
cmpl 0x4(%rsp), %eax
setne %al
testb %r15b, %al
jne 0x71b7a
jmp 0x71bc6
testb %r15b, %r15b
je 0x71bc6
leaq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x1aeea
testq %rax, %rax
jne 0x71bc6
leaq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x1af30
movl 0x4(%rsp), %esi
movq %rbx, %rdi
pushq $0xa
popq %rdx
callq 0x103d2
testb %al, %al
je 0x71bbb
movq %rbx, %rdi
movq %r13, %rsi
callq 0x73a72
movq %rbx, %rdi
movq %r13, %rsi
callq 0x22b86
addq $0x10, %r14
jmp 0x71aab
movq %rbx, %rdi
callq 0x74058
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x180(%rax)
movl 0x930(%rbx), %esi
movq %rbx, %rdi
callq 0x741a6
movl 0x92c(%rbx), %esi
movq %rbx, %rdi
callq 0x741a6
leaq 0x10(%rsp), %rdi
callq 0xb51c
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x71c20
jmp 0x71c20
jmp 0x71c20
jmp 0x71c20
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb51c
movq %rbx, %rdi
callq 0x64b0
nop