LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: create_sampler_address[abi:cxx11](char const*, spirv_cross::MSLSamplerAddress)
static string create_sampler_address(const char *prefix, MSLSamplerAddress addr)
{
	switch (addr)
	{
	case MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE:
		return join(prefix, "address::clamp_to_edge");
	case MSL_SAMPLER_ADDRESS_CLAMP_TO_ZERO:
		return join(prefix, "address::clamp_to_zero");
	case MSL_SAMPLER_ADDRESS_CLAMP_TO_BORDER:
		return join(prefix, "address::clamp_to_border");
	case MSL_SAMPLER_ADDRESS_REPEAT:
		return join(prefix, "address::repeat");
	case MSL_SAMPLER_ADDRESS_MIRRORED_REPEAT:
		return join(prefix, "address::mirrored_repeat");
	default:
		SPIRV_CROSS_THROW("Invalid sampler addressing mode.");
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, 0x8(%rsp)
cmpl $0x4, %edx
ja 0x6f335
movq %rdi, %rbx
movl %edx, %eax
leaq 0x2b532(%rip), %rcx     # 0x9a800
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2f1c9(%rip), %rdx     # 0x9e4a7
jmp 0x6f31c
leaq 0x2f200(%rip), %rdx     # 0x9e4e7
jmp 0x6f2f0
leaq 0x2f1ce(%rip), %rdx     # 0x9e4be
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x827e3
jmp 0x6f329
leaq 0x2f1d1(%rip), %rdx     # 0x9e4d7
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8284d
jmp 0x6f329
leaq 0x2f174(%rip), %rdx     # 0x9e490
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x82779
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x2f1b9(%rip), %rsi     # 0x9e500
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x77a51(%rip), %rsi     # 0xe6dc0
movq 0x78c6a(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x6f395
jmp 0x6f39d
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::to_sampler_expression[abi:cxx11](unsigned int)
string CompilerMSL::to_sampler_expression(uint32_t id)
{
	auto *combined = maybe_get<SPIRCombinedImageSampler>(id);
	auto expr = to_expression(combined ? combined->image : id);
	auto index = expr.find_first_of('[');

	uint32_t samp_id = 0;
	if (combined)
		samp_id = combined->sampler;

	if (index == string::npos)
		return samp_id ? to_expression(samp_id) : expr + sampler_name_suffix;
	else
	{
		auto image_expr = expr.substr(0, index);
		auto array_expr = expr.substr(index);
		return samp_id ? to_expression(samp_id) : (image_expr + sampler_name_suffix + array_expr);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x625ca
movq %rax, %r13
testq %rax, %rax
je 0x6f3d5
movl 0x10(%r13), %ebp
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2b9f0
xorl %r15d, %r15d
pushq $0x5b
popq %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x6370
movq %rax, %r12
testq %r13, %r13
je 0x6f425
movl 0x14(%r13), %r15d
cmpq $-0x1, %r12
jne 0x6f42f
testl %r15d, %r15d
je 0x6f4b8
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x2b9f0
jmp 0x6f4cf
cmpq $-0x1, %r12
je 0x6f4b8
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x62b0
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $-0x1
popq %rcx
movq %r12, %rdx
callq 0x62b0
testl %r15d, %r15d
je 0x6f46d
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x2b9f0
jmp 0x6f4a2
addq $0x9a0, %r14            # imm = 0x9A0
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movq %r14, %rdx
callq 0xab5e
leaq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdx
movq %rbx, %rdi
callq 0x42dd2
leaq 0x28(%rsp), %rdi
callq 0x6548
leaq 0x48(%rsp), %rdi
callq 0x6548
leaq 0x68(%rsp), %rdi
callq 0x6548
jmp 0x6f4cf
addq $0x9a0, %r14            # imm = 0x9A0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0xab5e
leaq 0x8(%rsp), %rdi
callq 0x6548
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x6548
jmp 0x6f504
jmp 0x6f501
jmp 0x6f51f
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x6548
jmp 0x6f513
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x6548
jmp 0x6f522
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::get_argument_address_space[abi:cxx11](spirv_cross::SPIRVariable const&)
string CompilerMSL::get_argument_address_space(const SPIRVariable &argument)
{
	const auto &type = get<SPIRType>(argument.basetype);

	switch (type.storage)
	{
	case StorageClassWorkgroup:
		return "threadgroup";

	case StorageClassStorageBuffer:
	{
		bool readonly = ir.get_buffer_block_flags(argument).get(DecorationNonWritable);
		return readonly ? "const device" : "device";
	}

	case StorageClassUniform:
	case StorageClassUniformConstant:
	case StorageClassPushConstant:
		if (type.basetype == SPIRType::Struct)
		{
			bool ssbo = has_decoration(type.self, DecorationBufferBlock);
			if (ssbo)
			{
				bool readonly = ir.get_buffer_block_flags(argument).get(DecorationNonWritable);
				return readonly ? "const device" : "device";
			}
			else
				return "constant";
		}
		break;

	case StorageClassFunction:
	case StorageClassGeneric:
		// No address space for plain values.
		return type.pointer ? "thread" : "";

	default:
		break;
	}

	return "thread";
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0xc(%rdx), %esi
movq %r15, %rdi
callq 0x90a4
movl 0x64(%rax), %ecx
cmpq $0xc, %rcx
ja 0x6f5ca
leaq 0x2b2b1(%rip), %rdx     # 0x9a814
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0xc, 0xc(%rax)
jne 0x6f5ca
movl 0x8(%rax), %esi
pushq $0x3
popq %rdx
movq %r15, %rdi
callq 0x103d2
testb %al, %al
je 0x6f5f4
addq $0x8, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1fb0a
btl $0x18, (%r12)
leaq 0x10(%rsp), %rdi
leaq 0x2e829(%rip), %rax     # 0x9ddd6
leaq 0x2e81c(%rip), %r14     # 0x9ddd0
cmovaeq %rax, %r14
callq 0xb51c
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x6f603
leaq 0x2e80c(%rip), %rsi     # 0x9dddd
jmp 0x6f5fb
leaq 0x2e803(%rip), %rcx     # 0x9dddd
leaq 0x202a6(%rip), %rsi     # 0x8f887
cmpb $0x0, 0x60(%rax)
cmovneq %rcx, %rsi
jmp 0x6f5fb
leaq 0x2df57(%rip), %rsi     # 0x9d549
jmp 0x6f5fb
leaq 0x227c6(%rip), %rsi     # 0x91dc1
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x6100
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::preprocess_op_codes()
void CompilerMSL::preprocess_op_codes()
{
	OpCodePreprocessor preproc(*this);
	traverse_all_reachable_opcodes(get<SPIRFunction>(ir.default_entry_point), preproc);

	if (preproc.suppress_missing_prototypes)
		add_pragma_line("#pragma clang diagnostic ignored \"-Wmissing-prototypes\"");

	if (preproc.uses_atomics)
	{
		add_header_line("#include <metal_atomic>");
		add_pragma_line("#pragma clang diagnostic ignored \"-Wunused-variable\"");
	}

	// Metal vertex functions that write to resources must disable rasterization and return void.
	if (preproc.uses_resource_write)
		is_rasterization_disabled = true;
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq 0x78108(%rip), %rax     # 0xe7b28
addq $0x10, %rax
leaq 0x70(%rsp), %rcx
movq %rax, -0x40(%rcx)
movq %rdi, -0x38(%rcx)
movq %rcx, -0x30(%rcx)
movq $0x1, -0x28(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rcx)
movl $0x3f800000, -0x10(%rcx) # imm = 0x3F800000
movups %xmm0, -0x8(%rcx)
andl $0x0, 0x7(%rcx)
movl 0x108(%rdi), %esi
callq 0xa048
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1157c
cmpb $0x1, 0x78(%rsp)
jne 0x6faa2
leaq 0x2b89f(%rip), %rsi     # 0x9b31b
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x72fec
leaq 0x10(%rsp), %rdi
callq 0x6548
cmpb $0x1, 0x79(%rsp)
jne 0x6fb03
leaq 0x2b8a3(%rip), %rsi     # 0x9b353
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3e3ee
leaq 0x10(%rsp), %rdi
callq 0x6548
leaq 0x2b88e(%rip), %rsi     # 0x9b36b
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x72fec
leaq 0x10(%rsp), %rdi
callq 0x6548
cmpb $0x1, 0x7a(%rsp)
jne 0x6fb11
movb $0x1, 0x937(%rbx)
leaq 0x30(%rsp), %rdi
callq 0x7fb4c
addq $0x80, %rsp
popq %rbx
retq
jmp 0x6fb2c
jmp 0x6fb3d
jmp 0x6fb2c
jmp 0x6fb3d
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6548
jmp 0x6fb40
jmp 0x6fb3d
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x7fb4c
movq %rbx, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::localize_global_variables()
void CompilerMSL::localize_global_variables()
{
	auto &entry_func = get<SPIRFunction>(ir.default_entry_point);
	auto iter = global_variables.begin();
	while (iter != global_variables.end())
	{
		uint32_t v_id = *iter;
		auto &var = get<SPIRVariable>(v_id);
		if (var.storage == StorageClassPrivate || var.storage == StorageClassWorkgroup)
		{
			entry_func.add_local_variable(v_id);
			iter = global_variables.erase(iter);
		}
		else
			iter++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x108(%rdi), %esi
callq 0xa048
movq %rax, %r14
leaq 0x118(%rbx), %r15
movq 0x118(%rbx), %r12
cmpq 0x120(%rbx), %r12
je 0x7140f
movl (%r12), %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9c0e
movl 0x10(%rax), %eax
orl $0x2, %eax
cmpl $0x6, %eax
jne 0x71409
movq %r14, %rdi
movl %ebp, %esi
callq 0x7fb64
movq %r15, %rdi
movq %r12, %rsi
callq 0x7fb7a
movq %rax, %r12
jmp 0x713cd
addq $0x4, %r12
jmp 0x713cd
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::extract_global_variables_from_functions()
void CompilerMSL::extract_global_variables_from_functions()
{
	// Uniforms
	unordered_set<uint32_t> global_var_ids;
	for (auto &id : ir.ids)
	{
		if (id.get_type() == TypeVariable)
		{
			auto &var = id.get<SPIRVariable>();
			if (var.storage == StorageClassInput || var.storage == StorageClassOutput ||
			    var.storage == StorageClassUniform || var.storage == StorageClassUniformConstant ||
			    var.storage == StorageClassPushConstant || var.storage == StorageClassStorageBuffer)
			{
				global_var_ids.insert(var.self);
			}
		}
	}

	// Local vars that are declared in the main function and accessed directly by a function
	auto &entry_func = get<SPIRFunction>(ir.default_entry_point);
	for (auto &var : entry_func.local_variables)
		if (get<SPIRVariable>(var).storage != StorageClassFunction)
			global_var_ids.insert(var);

	std::set<uint32_t> added_arg_ids;
	unordered_set<uint32_t> processed_func_ids;
	extract_global_variables_from_function(ir.default_entry_point, added_arg_ids, global_var_ids, processed_func_ids);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x30(%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
movl $0x120f, %ebp           # imm = 0x120F
movq %rsp, %r15
cmpq %r12, %r14
je 0x71493
cmpl $0x2, 0x8(%r14)
jne 0x7148d
movq %r14, %rdi
callq 0x9b30
movl 0x10(%rax), %ecx
cmpl $0xc, %ecx
ja 0x7148d
btl %ecx, %ebp
jae 0x7148d
addq $0x8, %rax
movq %r15, %rdi
movq %rax, %rsi
callq 0x1af30
addq $0x10, %r14
jmp 0x7145d
movl 0x108(%rbx), %esi
movq %rbx, %rdi
callq 0xa048
movq 0x48(%rax), %r14
movq 0x50(%rax), %r12
movq %rsp, %r15
cmpq %r12, %r14
je 0x714d3
movl (%r14), %esi
movq %rbx, %rdi
callq 0x9c0e
cmpl $0x7, 0x10(%rax)
je 0x714cd
movq %r15, %rdi
movq %r14, %rsi
callq 0x1af30
addq $0x4, %r14
jmp 0x714ac
leaq 0x40(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x98(%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)
movl 0x108(%rbx), %esi
leaq 0x38(%rsp), %rdx
movq %rsp, %rcx
leaq 0x68(%rsp), %r8
movq %rbx, %rdi
callq 0x7300a
leaq 0x68(%rsp), %rdi
callq 0xb51c
leaq 0x38(%rsp), %rdi
callq 0x82924
movq %rsp, %rdi
callq 0xb51c
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xb51c
leaq 0x38(%rsp), %rdi
callq 0x82924
jmp 0x7157a
jmp 0x71577
jmp 0x71577
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb51c
movq %rbx, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::mark_packable_structs()
void CompilerMSL::mark_packable_structs()
{
	for (auto &id : ir.ids)
	{
		if (id.get_type() == TypeVariable)
		{
			auto &var = id.get<SPIRVariable>();
			if (var.storage != StorageClassFunction && !is_hidden_variable(var))
			{
				auto &type = get<SPIRType>(var.basetype);
				if (type.pointer &&
				    (type.storage == StorageClassUniform || type.storage == StorageClassUniformConstant ||
				     type.storage == StorageClassPushConstant || type.storage == StorageClassStorageBuffer) &&
				    (has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock)))
					mark_as_packable(type);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %r14
movq 0x28(%rdi), %r13
movl $0x1205, %r15d          # imm = 0x1205
pushq $0x2
popq %rbp
cmpq %r13, %r14
je 0x7163a
cmpl $0x2, 0x8(%r14)
jne 0x71631
movq %r14, %rdi
callq 0x9b30
cmpl $0x7, 0x10(%rax)
je 0x71631
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x10b56
testb %al, %al
jne 0x71631
movl 0xc(%r12), %esi
movq %rbx, %rdi
callq 0x90a4
cmpb $0x1, 0x60(%rax)
jne 0x71631
movq %rax, %r12
movl 0x64(%rax), %eax
cmpl $0xc, %eax
ja 0x71631
btl %eax, %r15d
jae 0x71631
movl 0x8(%r12), %esi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x103d2
testb %al, %al
jne 0x71626
movl 0x8(%r12), %esi
movq %rbx, %rdi
pushq $0x3
popq %rdx
callq 0x103d2
testb %al, %al
je 0x71631
movq %rbx, %rdi
movq %r12, %rsi
callq 0x735fc
addq $0x10, %r14
jmp 0x715a9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::compile[abi:cxx11](std::vector<spirv_cross::MSLVertexAttr, std::allocator<spirv_cross::MSLVertexAttr>>*, std::vector<spirv_cross::MSLResourceBinding, std::allocator<spirv_cross::MSLResourceBinding>>*)
string CompilerMSL::compile(vector<MSLVertexAttr> *p_vtx_attrs, vector<MSLResourceBinding> *p_res_bindings)
{
	if (p_vtx_attrs)
	{
		vtx_attrs_by_location.clear();
		for (auto &va : *p_vtx_attrs)
			vtx_attrs_by_location[va.location] = &va;
	}

	if (p_res_bindings)
	{
		resource_bindings.clear();
		for (auto &rb : *p_res_bindings)
			resource_bindings.push_back(&rb);
	}

	return compile();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %rbx
testq %rdx, %rdx
je 0x72f5e
movq %rdx, %rbp
leaq 0x810(%r14), %r12
movq %r12, %rdi
callq 0x82564
movq (%rbp), %r13
movq 0x8(%rbp), %rbp
cmpq %rbp, %r13
je 0x72f5e
movq %r12, %rdi
movq %r13, %rsi
callq 0x82c92
movq %r13, (%rax)
addq $0x14, %r13
jmp 0x72f45
testq %r15, %r15
je 0x72fa5
movq 0x8f8(%r14), %rax
cmpq %rax, 0x900(%r14)
je 0x72f7a
movq %rax, 0x900(%r14)
leaq 0x8f8(%r14), %r12
movq (%r15), %r13
movq 0x8(%r15), %rbp
movq %rsp, %r15
cmpq %rbp, %r13
je 0x72fa5
movq %r13, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x82fd6
addq $0x1c, %r13
jmp 0x72f8b
movq (%r14), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::mark_as_packable(spirv_cross::SPIRType&)
void CompilerMSL::mark_as_packable(SPIRType &type)
{
	// If this is not the base type (eg. it's a pointer or array), tunnel down
	if (type.parent_type)
	{
		mark_as_packable(get<SPIRType>(type.parent_type));
		return;
	}

	if (type.basetype == SPIRType::Struct)
	{
		set_decoration(type.self, DecorationCPacked);

		// Recurse
		size_t mbr_cnt = type.member_types.size();
		for (uint32_t mbr_idx = 0; mbr_idx < mbr_cnt; mbr_idx++)
		{
			uint32_t mbr_type_id = type.member_types[mbr_idx];
			auto &mbr_type = get<SPIRType>(mbr_type_id);
			mark_as_packable(mbr_type);
			if (mbr_type.type_alias)
			{
				auto &mbr_type_alias = get<SPIRType>(mbr_type.type_alias);
				mark_as_packable(mbr_type_alias);
			}
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x9c(%r14), %esi
testl %esi, %esi
je 0x73623
movq %rbx, %rdi
callq 0x90a4
movq %rax, %r14
jmp 0x7360b
cmpl $0xc, 0xc(%r14)
jne 0x73693
movl 0x8(%r14), %esi
pushq $0xa
popq %rdx
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x1206e
movq 0x70(%r14), %r13
subq 0x68(%r14), %r13
sarq $0x2, %r13
movl %r12d, %r12d
cmpq %r12, %r13
jbe 0x73693
movq 0x68(%r14), %rax
movl (%rax,%r12,4), %esi
movq %rbx, %rdi
callq 0x90a4
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x735fc
movl 0x98(%r15), %esi
testl %esi, %esi
je 0x7368e
movq %rbx, %rdi
callq 0x90a4
movq %rbx, %rdi
movq %rax, %rsi
callq 0x735fc
incl %r12d
jmp 0x7364a
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::mark_location_as_used_by_shader(unsigned int, spv::StorageClass)
void CompilerMSL::mark_location_as_used_by_shader(uint32_t location, StorageClass storage)
{
	MSLVertexAttr *p_va;
	if ((get_entry_point().model == ExecutionModelVertex) && (storage == StorageClassInput) &&
	    (p_va = vtx_attrs_by_location[location]))
		p_va->used_by_shader = true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
callq 0x12fa4
cmpl $0x1, %ebp
jne 0x736dd
cmpl $0x0, 0xb8(%rax)
jne 0x736dd
addq $0x810, %rbx            # imm = 0x810
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x82c92
movq (%rax), %rax
testq %rax, %rax
je 0x736dd
movb $0x1, 0x11(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::ensure_correct_builtin_type(unsigned int, spv::BuiltIn)
uint32_t CompilerMSL::ensure_correct_builtin_type(uint32_t type_id, BuiltIn builtin)
{
	auto &type = get<SPIRType>(type_id);

	if ((builtin == BuiltInSampleMask && is_array(type)) ||
	    ((builtin == BuiltInLayer || builtin == BuiltInViewportIndex) && type.basetype != SPIRType::UInt))
	{
		uint32_t next_id = ir.increase_bound_by(type.pointer ? 2 : 1);
		uint32_t base_type_id = next_id++;
		auto &base_type = set<SPIRType>(base_type_id);
		base_type.basetype = SPIRType::UInt;
		base_type.width = 32;

		if (!type.pointer)
			return base_type_id;

		uint32_t ptr_type_id = next_id++;
		auto &ptr_type = set<SPIRType>(ptr_type_id);
		ptr_type = base_type;
		ptr_type.pointer = true;
		ptr_type.storage = type.storage;
		ptr_type.parent_type = base_type_id;
		return ptr_type_id;
	}

	return type_id;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r15
callq 0x90a4
movq %rax, %r14
cmpl $0x14, %ebp
jne 0x7370f
movq %r15, %rdi
movq %r14, %rsi
callq 0x10d6c
testb %al, %al
jne 0x7371e
addl $-0xb, %ebp
cmpl $-0x2, %ebp
jb 0x73785
cmpl $0x5, 0xc(%r14)
je 0x73785
leaq 0x8(%r15), %rdi
movzbl 0x60(%r14), %esi
incl %esi
callq 0x202bc
movl %eax, %ebx
movq %r15, %rdi
movl %eax, %esi
callq 0x17718
movq %rax, %r12
movabsq $0x2000000005, %rax     # imm = 0x2000000005
movq %rax, 0xc(%r12)
cmpb $0x1, 0x60(%r14)
jne 0x73785
movl %ebx, %ebp
incl %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x17718
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x173b0
movb $0x1, 0x60(%r15)
movl 0x64(%r14), %eax
movl %eax, 0x64(%r15)
movl %ebx, 0x9c(%r15)
movl %ebp, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::to_qualified_member_name[abi:cxx11](spirv_cross::SPIRType const&, unsigned int)
string CompilerMSL::to_qualified_member_name(const SPIRType &type, uint32_t index)
{
	// Don't qualify Builtin names because they are unique and are treated as such when building expressions
	BuiltIn builtin;
	if (is_member_builtin(type, index, &builtin))
		return builtin_to_glsl(builtin, type.storage);

	// Strip any underscore prefix from member name
	string mbr_name = to_member_name(type, index);
	size_t startPos = mbr_name.find_first_not_of("_");
	mbr_name = (startPos != string::npos) ? mbr_name.substr(startPos) : "";
	return join(to_name(type.self), "_", mbr_name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4(%rsp), %rcx
movq %rsi, %rdi
movq %rdx, %rsi
movl %ebp, %edx
callq 0x10cdc
testb %al, %al
je 0x737db
movl 0x4(%rsp), %edx
movl 0x64(%r15), %ecx
movq (%r14), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0xa0(%rax)
jmp 0x73897
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x25cca
leaq 0x25750(%rip), %rsi     # 0x98f47
movq %r12, %rdi
xorl %edx, %edx
callq 0x6190
movq %rax, %r12
cmpq $-0x1, %rax
je 0x73821
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $-0x1
popq %rcx
movq %r12, %rdx
callq 0x62b0
jmp 0x73837
leaq 0x1c05f(%rip), %rsi     # 0x8f887
leaq 0x8(%rsp), %rdi
leaq 0x3(%rsp), %rdx
callq 0x6100
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
callq 0x6320
movq %r13, %rdi
callq 0x6548
cmpq $-0x1, %r12
movl 0x8(%r15), %edx
movq (%r14), %rax
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq *0x38(%rax)
leaq 0x256d6(%rip), %rdx     # 0x98f47
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rcx
movq %rbx, %rdi
callq 0x42137
leaq 0x8(%rsp), %rdi
callq 0x6548
leaq 0x28(%rsp), %rdi
callq 0x6548
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x738bc
jmp 0x738bc
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
jmp 0x738bf
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::MemberSorter::sort()
void CompilerMSL::MemberSorter::sort()
{
	// Create a temporary array of consecutive member indices and sort it based on how
	// the members should be reordered, based on builtin and sorting aspect meta info.
	size_t mbr_cnt = type.member_types.size();
	vector<uint32_t> mbr_idxs(mbr_cnt);
	iota(mbr_idxs.begin(), mbr_idxs.end(), 0); // Fill with consecutive indices
	std::sort(mbr_idxs.begin(), mbr_idxs.end(), *this); // Sort member indices based on sorting aspect

	// Move type and meta member info to the order defined by the sorted member indices.
	// This is done by creating temporary copies of both member types and meta, and then
	// copying back to the original content at the sorted indices.
	auto mbr_types_cpy = type.member_types;
	auto mbr_meta_cpy = meta.members;
	for (uint32_t mbr_idx = 0; mbr_idx < mbr_cnt; mbr_idx++)
	{
		type.member_types[mbr_idx] = mbr_types_cpy[mbr_idxs[mbr_idx]];
		meta.members[mbr_idx] = mbr_meta_cpy[mbr_idxs[mbr_idx]];
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x70(%rax), %r14
subq 0x68(%rax), %r14
sarq $0x2, %r14
leaq 0x48(%rsp), %r15
leaq 0x18(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x17d5e
movq (%r15), %rdi
movq 0x8(%r15), %rsi
xorl %eax, %eax
movq %rdi, %rcx
cmpq %rsi, %rcx
je 0x73989
movl %eax, (%rcx)
incl %eax
addq $0x4, %rcx
jmp 0x7397a
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rsp)
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
callq 0x89141
movq (%rbx), %rsi
addq $0x68, %rsi
leaq 0x18(%rsp), %rdi
callq 0x19f0e
movl $0xd0, %esi
addq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %rdi
callq 0x18c34
xorl %r15d, %r15d
movl %r15d, %r15d
cmpq %r15, %r14
jbe 0x73a15
movq 0x48(%rsp), %rax
movl (%rax,%r15,4), %ecx
movq 0x18(%rsp), %rdx
movl (%rdx,%rcx,4), %ecx
movq (%rbx), %rdx
movq 0x68(%rdx), %rdx
movl %ecx, (%rdx,%r15,4)
movl (%rax,%r15,4), %eax
imulq $0xd0, %rax, %rsi
addq 0x30(%rsp), %rsi
movq 0x8(%rbx), %rax
imulq $0xd0, %r15, %rdi
addq 0xd0(%rax), %rdi
callq 0x18ff8
incl %r15d
jmp 0x739c5
leaq 0x30(%rsp), %rdi
callq 0xc2de
leaq 0x18(%rsp), %rdi
callq 0x6cf8
leaq 0x48(%rsp), %rdi
callq 0x6cf8
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x73a56
jmp 0x73a44
movq %rax, %rbx
jmp 0x73a60
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xc2de
leaq 0x18(%rsp), %rdi
callq 0x6cf8
leaq 0x48(%rsp), %rdi
callq 0x6cf8
movq %rbx, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::get_declared_struct_member_alignment(spirv_cross::SPIRType const&, unsigned int) const
size_t CompilerMSL::get_declared_struct_member_alignment(const SPIRType &struct_type, uint32_t index) const
{
	auto &type = get<SPIRType>(struct_type.member_types[index]);

	switch (type.basetype)
	{
	case SPIRType::Unknown:
	case SPIRType::Void:
	case SPIRType::AtomicCounter:
	case SPIRType::Image:
	case SPIRType::SampledImage:
	case SPIRType::Sampler:
		SPIRV_CROSS_THROW("Querying alignment of opaque object.");

	case SPIRType::Struct:
		return 16; // Per Vulkan spec section 14.5.4

	default:
	{
		// Alignment of packed type is the same as the underlying component or column size.
		// Alignment of unpacked type is the same as the vector size.
		// Alignment of 3-elements vector is the same as 4-elements (including packed using column).
		if (member_is_packed_type(struct_type, index))
			return (type.width / 8) * (type.columns == 3 ? 4 : type.columns);
		else
			return (type.width / 8) * (type.vecsize == 3 ? 4 : type.vecsize);
	}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %eax
movq 0x68(%rsi), %rcx
movl (%rcx,%rax,4), %esi
callq 0x16fc8
movq %rax, %rbx
movl 0xc(%rax), %eax
cmpl $0xf, %eax
ja 0x73d1d
cmpl $0xc, %eax
jne 0x73d13
pushq $0x10
popq %rax
jmp 0x73d48
movl $0xe103, %ecx           # imm = 0xE103
btl %eax, %ecx
jb 0x73d55
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x3573a
movl 0x10(%rbx), %ecx
shrl $0x3, %ecx
testb %al, %al
je 0x73d39
movl 0x18(%rbx), %edx
jmp 0x73d3c
movl 0x14(%rbx), %edx
cmpl $0x3, %edx
pushq $0x4
popq %rax
cmovnel %edx, %eax
imull %ecx, %eax
movl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x2a678(%rip), %rsi     # 0x9e3df
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x73031(%rip), %rsi     # 0xe6dc0
movq 0x7424a(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x73db5
jmp 0x73dbd
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::emit_header()
void CompilerMSL::emit_header()
{
	for (auto &pragma : pragma_lines)
		statement(pragma);

	if (!pragma_lines.empty())
		statement("");

	statement("#include <metal_stdlib>");
	statement("#include <simd/simd.h>");

	for (auto &header : header_lines)
		statement(header);

	statement("");
	statement("using namespace metal;");
	statement("");

	for (auto &td : typedef_lines)
		statement(td);

	if (!typedef_lines.empty())
		statement("");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x898(%rdi), %r14
leaq 0x888(%rdi), %r15
cmpq %r15, %r14
je 0x73e6c
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x7fcf6
movq %r14, %rdi
callq 0x62f0
movq %rax, %r14
jmp 0x73e4e
cmpq $0x0, 0x8a8(%rbx)
je 0x73e85
leaq 0x1ba0a(%rip), %rsi     # 0x8f887
movq %rbx, %rdi
callq 0x928e
leaq 0x2767c(%rip), %rsi     # 0x9b508
movq %rbx, %rdi
callq 0x7fdb2
leaq 0x27685(%rip), %rsi     # 0x9b520
movq %rbx, %rdi
callq 0xa61a
movq 0x738(%rbx), %r14
movq 0x740(%rbx), %r15
cmpq %r15, %r14
je 0x73ec7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9da6
addq $0x20, %r14
jmp 0x73eb1
leaq 0x1b9b9(%rip), %r14     # 0x8f887
movq %rbx, %rdi
movq %r14, %rsi
callq 0x928e
leaq 0x27657(%rip), %rsi     # 0x9b537
movq %rbx, %rdi
callq 0xa61a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x928e
movq 0x8c8(%rbx), %r14
leaq 0x8b8(%rbx), %r15
cmpq %r15, %r14
je 0x73f1f
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x7fcf6
movq %r14, %rdi
callq 0x62f0
movq %rax, %r14
jmp 0x73f01
cmpq $0x0, 0x8d8(%rbx)
je 0x73f3d
leaq 0x1b957(%rip), %rsi     # 0x8f887
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x928e
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::declare_undefined_values()
void CompilerMSL::declare_undefined_values()
{
	bool emitted = false;
	for (auto &id : ir.ids)
	{
		if (id.get_type() == TypeUndef)
		{
			auto &undef = id.get<SPIRUndef>();
			auto &type = get<SPIRType>(undef.basetype);
			statement("constant ", variable_decl(type, to_name(undef.self), undef.self), " = {};");
			emitted = true;
		}
	}

	if (emitted)
		statement("");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %r14
movq 0x28(%rdi), %r15
xorl %eax, %eax
cmpq %r15, %r14
je 0x74012
cmpl $0xd, 0x8(%r14)
jne 0x74009
movq %r14, %rdi
callq 0x429e0
movq %rax, %r13
movl 0xc(%rax), %esi
movq %rbx, %rdi
callq 0x90a4
movq %rax, %rbp
movl 0x8(%r13), %edx
movq (%rbx), %rax
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
pushq $0x1
popq %rcx
callq *0x38(%rax)
movl 0x8(%r13), %r8d
leaq 0x28(%rsp), %r13
movq (%rbx), %rax
movq %r13, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r12, %rcx
callq *0xc8(%rax)
movq %rbx, %rdi
leaq 0x291ff(%rip), %rsi     # 0x9d1e5
movq %r13, %rdx
leaq 0x291ff(%rip), %rcx     # 0x9d1ef
callq 0x80e98
movq %r13, %rdi
callq 0x6548
leaq 0x8(%rsp), %rdi
callq 0x6548
movb $0x1, %al
addq $0x10, %r14
jmp 0x73f7d
testb $0x1, %al
je 0x74025
leaq 0x1b86a(%rip), %rsi     # 0x8f887
movq %rbx, %rdi
callq 0x928e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x74046
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x6548
leaq 0x8(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::declare_constant_arrays()
void CompilerMSL::declare_constant_arrays()
{
	// MSL cannot declare arrays inline (except when declaring a variable), so we must move them out to
	// global constants directly, so we are able to use constants as variable expressions.
	bool emitted = false;

	for (auto &id : ir.ids)
	{
		if (id.get_type() == TypeConstant)
		{
			auto &c = id.get<SPIRConstant>();
			if (c.specialization)
				continue;

			auto &type = get<SPIRType>(c.constant_type);
			if (!type.array.empty())
			{
				auto name = to_name(c.self);
				statement("constant ", variable_decl(type, name), " = ", constant_expression(c), ";");
				emitted = true;
			}
		}
	}

	if (emitted)
		statement("");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %r14
movq 0x28(%rdi), %r12
xorl %r13d, %r13d
cmpq %r12, %r14
je 0x7414e
cmpl $0x3, 0x8(%r14)
jne 0x74145
movq %r14, %rdi
callq 0x172b0
cmpb $0x0, 0x108(%rax)
jne 0x74145
movq %rax, %rbp
movl 0xc(%rax), %esi
movq %rbx, %rdi
callq 0x90a4
movq %rax, %r15
movq 0x20(%rax), %rax
cmpq 0x28(%r15), %rax
je 0x74145
movl 0x8(%rbp), %edx
movq (%rbx), %rax
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
pushq $0x1
popq %rcx
callq *0x38(%rax)
movq (%rbx), %rax
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq *0xc8(%rax)
leaq 0x48(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x271d4
movq %rbx, %rdi
leaq 0x290db(%rip), %rsi     # 0x9d1e5
leaq 0x8(%rsp), %r15
movq %r15, %rdx
leaq 0x258d1(%rip), %rcx     # 0x999ea
movq %r13, %r8
leaq 0x2595e(%rip), %r9      # 0x99a81
callq 0x80f72
movq %r13, %rdi
callq 0x6548
movq %r15, %rdi
callq 0x6548
leaq 0x28(%rsp), %rdi
callq 0x6548
movb $0x1, %r13b
addq $0x10, %r14
jmp 0x74074
testb $0x1, %r13b
je 0x74163
leaq 0x1b72c(%rip), %rsi     # 0x8f887
movq %rbx, %rdi
callq 0x928e
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x6548
jmp 0x74184
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
jmp 0x74193
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::emit_interface_block(unsigned int)
void CompilerMSL::emit_interface_block(uint32_t ib_var_id)
{
	if (ib_var_id)
	{
		auto &ib_var = get<SPIRVariable>(ib_var_id);
		auto &ib_type = get<SPIRType>(ib_var.basetype);
		assert(ib_type.basetype == SPIRType::Struct && !ib_type.member_types.empty());
		emit_struct(ib_type);
	}
}

// Assembly:
pushq %rbx
testl %esi, %esi
je 0x741da
movq %rdi, %rbx
callq 0x9c0e
movl 0xc(%rax), %esi
movq %rbx, %rdi
callq 0x90a4
cmpl $0xc, 0xc(%rax)
jne 0x741dc
movq 0x68(%rax), %rcx
cmpq 0x70(%rax), %rcx
je 0x741dc
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x22b86
popq %rbx
retq
leaq 0x29701(%rip), %rdi     # 0x9d8e4
leaq 0x271d1(%rip), %rsi     # 0x9b3bb
leaq 0x29739(%rip), %rcx     # 0x9d92a
movl $0xb16, %edx            # imm = 0xB16
callq 0x61c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::emit_binary_unord_op(unsigned int, unsigned int, unsigned int, unsigned int, char const*)
void CompilerMSL::emit_binary_unord_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1,
                                       const char *op)
{
	bool forward = should_forward(op0) && should_forward(op1);
	emit_op(result_type, result_id,
	        join("(isunordered(", to_enclosed_unpacked_expression(op0), ", ", to_enclosed_unpacked_expression(op1),
	             ") || ", to_enclosed_unpacked_expression(op0), " ", op, " ", to_enclosed_unpacked_expression(op1),
	             ")"),
	        forward);

	inherit_expression_dependencies(result_id, op0);
	inherit_expression_dependencies(result_id, op1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %r8d, %ebx
movl %ecx, %r15d
movl %edx, %ebp
movl %esi, 0xc(%rsp)
movq %rdi, %r14
movq %r9, 0x10(%rsp)
movl %ecx, %esi
callq 0x2f360
testb %al, %al
je 0x7423c
movq %r14, %rdi
movl %ebx, %esi
callq 0x2f360
movl %eax, 0x8(%rsp)
jmp 0x74244
movl $0x0, 0x8(%rsp)
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x2bfb0
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x2bfb0
leaq 0x98(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x2bfb0
leaq 0x78(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x2bfb0
leaq 0x21763(%rip), %rax     # 0x959f5
leaq 0x1b5ed(%rip), %r10     # 0x8f886
leaq 0x10(%rsp), %r11
leaq 0x28fa7(%rip), %rsi     # 0x9d24c
leaq 0x20ddf(%rip), %rcx     # 0x9508b
leaq 0x28fa7(%rip), %r9      # 0x9d25a
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rdx
leaq 0x18(%rsp), %r8
pushq %rax
pushq %r13
pushq %r10
pushq %r11
pushq %r10
pushq %r12
callq 0x8150b
addq $0x30, %rsp
movzbl 0x8(%rsp), %r8d
leaq 0x58(%rsp), %rcx
movq %r14, %rdi
movl 0xc(%rsp), %esi
movl %ebp, %edx
xorl %r9d, %r9d
callq 0x2f196
leaq 0x58(%rsp), %rdi
callq 0x6548
leaq 0x78(%rsp), %rdi
callq 0x6548
leaq 0x98(%rsp), %rdi
callq 0x6548
leaq 0x18(%rsp), %rdi
callq 0x6548
leaq 0x38(%rsp), %rdi
callq 0x6548
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x13128
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x13128
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x6548
jmp 0x74364
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x6548
jmp 0x74373
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x6548
jmp 0x74385
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x6548
jmp 0x74394
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::maybe_emit_array_assignment(unsigned int, unsigned int)
bool CompilerMSL::maybe_emit_array_assignment(uint32_t id_lhs, uint32_t id_rhs)
{
	// We only care about assignments of an entire array
	auto &type = expression_type(id_rhs);
	if (type.array.size() == 0)
		return false;

	auto *var = maybe_get<SPIRVariable>(id_lhs);

	// Is this a remapped, static constant? Don't do anything.
	if (var && var->remapped_variable && var->statically_assigned)
		return true;

	if (ir.ids[id_rhs].get_type() == TypeConstant && var && var->deferred_declaration)
	{
		// Special case, if we end up declaring a variable when assigning the constant array,
		// we can avoid the copy by directly assigning the constant expression.
		// This is likely necessary to be able to use a variable as a true look-up table, as it is unlikely
		// the compiler will be able to optimize the spvArrayCopy() into a constant LUT.
		// After a variable has been declared, we can no longer assign constant arrays in MSL unfortunately.
		statement(to_expression(id_lhs), " = ", constant_expression(get<SPIRConstant>(id_rhs)), ";");
		return true;
	}

	// Ensure the LHS variable has been declared
	auto *p_v_lhs = maybe_get_backing_variable(id_lhs);
	if (p_v_lhs)
		flush_variable_declaration(p_v_lhs->self);

	emit_array_copy(to_expression(id_lhs), id_rhs);
	register_write(id_lhs);

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
movl %edx, %esi
callq 0x104b0
movq 0x20(%rax), %r12
movq 0x28(%rax), %r13
cmpq %r12, %r13
je 0x75f7a
movq %rbx, %rdi
movl %ebp, %esi
callq 0xa9e4
testq %rax, %rax
je 0x75eab
cmpb $0x1, 0x5b(%rax)
jne 0x75eab
cmpb $0x0, 0x39(%rax)
jne 0x75f7a
testq %rax, %rax
je 0x75f28
movl %r14d, %ecx
shlq $0x4, %rcx
movq 0x20(%rbx), %rdx
cmpl $0x3, 0x8(%rdx,%rcx)
jne 0x75f28
cmpb $0x1, 0x59(%rax)
jne 0x75f28
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2b9f0
movq %rbx, %rdi
movl %r14d, %esi
callq 0x17bce
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x271d4
leaq 0x23af1(%rip), %rdx     # 0x999ea
leaq 0x23b81(%rip), %r8      # 0x99a81
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rcx
movq %rbx, %rdi
callq 0x451e4
leaq 0x28(%rsp), %rdi
callq 0x6548
leaq 0x8(%rsp), %rdi
callq 0x6548
jmp 0x75f7a
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1067e
testq %rax, %rax
je 0x75f42
movl 0x8(%rax), %esi
movq %rbx, %rdi
callq 0x36e4a
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2b9f0
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq *0x150(%rax)
leaq 0x8(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
movl %ebp, %esi
callq 0x107cc
cmpq %r12, %r13
setne %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x6548
jmp 0x75fa3
jmp 0x75fa0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::emit_array_copy(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int)
void CompilerMSL::emit_array_copy(const string &lhs, uint32_t rhs_id)
{
	// Assignment from an array initializer is fine.
	auto &type = expression_type(rhs_id);
	auto *var = maybe_get_backing_variable(rhs_id);

	// Unfortunately, we cannot template on address space in MSL,
	// so explicit address space redirection it is ...
	bool is_constant = false;
	if (ir.ids[rhs_id].get_type() == TypeConstant)
	{
		is_constant = true;
	}
	else if (var && var->remapped_variable && var->statically_assigned &&
	         ir.ids[var->static_expression].get_type() == TypeConstant)
	{
		is_constant = true;
	}

	const char *tag = is_constant ? "FromConstant" : "FromStack";
	statement("spvArrayCopy", tag, type.array.size(), "(", lhs, ", ", to_expression(rhs_id), ");");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %esi
callq 0x104b0
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
callq 0x1067e
movl %ebp, %ecx
movq 0x20(%r14), %rdx
shlq $0x4, %rcx
cmpl $0x3, 0x8(%rdx,%rcx)
jne 0x761a4
leaq 0x257f8(%rip), %rcx     # 0x9b99a
jmp 0x761da
leaq 0x257e5(%rip), %rcx     # 0x9b990
testq %rax, %rax
je 0x761da
cmpb $0x1, 0x5b(%rax)
jne 0x761da
cmpb $0x1, 0x39(%rax)
jne 0x761da
movl 0x3c(%rax), %eax
shlq $0x4, %rax
cmpl $0x3, 0x8(%rdx,%rax)
leaq 0x257cb(%rip), %rax     # 0x9b99a
leaq 0x257ba(%rip), %rcx     # 0x9b990
cmoveq %rax, %rcx
leaq 0x10(%rsp), %r12
movq %rcx, (%r12)
movq 0x28(%r15), %rax
subq 0x20(%r15), %rax
sarq $0x2, %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2b9f0
subq $0x8, %rsp
leaq 0x2386c(%rip), %rax     # 0x99a80
leaq 0x1ee70(%rip), %r10     # 0x9508b
leaq 0x257b3(%rip), %rsi     # 0x9b9d5
leaq 0x27a00(%rip), %r8      # 0x9dc29
movq %r14, %rdi
movq %r12, %rdx
movq %r15, %rcx
movq %rbx, %r9
pushq %rax
pushq %r13
pushq %r10
callq 0x81754
addq $0x20, %rsp
leaq 0x18(%rsp), %rdi
callq 0x6548
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::to_func_call_arg[abi:cxx11](unsigned int)
string CompilerMSL::to_func_call_arg(uint32_t id)
{
	string arg_str = CompilerGLSL::to_func_call_arg(id);

	// Manufacture automatic sampler arg if the arg is a SampledImage texture.
	auto &type = expression_type(id);
	if (type.basetype == SPIRType::SampledImage && type.image.dim != DimBuffer)
		arg_str += ", " + to_sampler_expression(id);

	return arg_str;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2b9b8
movq %r14, %rdi
movl %ebp, %esi
callq 0x104b0
cmpl $0xe, 0xc(%rax)
jne 0x7a3cc
cmpl $0x5, 0x84(%rax)
je 0x7a3cc
movq %rsp, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x6f3a6
leaq 0x1aceb(%rip), %rsi     # 0x9508b
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x463dd
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x64f0
leaq 0x20(%rsp), %rdi
callq 0x6548
movq %rsp, %rdi
callq 0x6548
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x6548
jmp 0x7a3ea
movq %rax, %r14
movq %rsp, %rdi
callq 0x6548
jmp 0x7a3f9
jmp 0x7a3f6
movq %rax, %r14
movq %rbx, %rdi
callq 0x6548
movq %r14, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::is_non_native_row_major_matrix(unsigned int)
bool CompilerMSL::is_non_native_row_major_matrix(uint32_t id)
{
	// Natively supported row-major matrices do not need to be converted.
	if (backend.native_row_major_matrix)
		return false;

	// Non-matrix or column-major matrix types do not need to be converted.
	if (!ir.meta[id].decoration.decoration_flags.get(DecorationRowMajor))
		return false;

	// Generate a function that will swap matrix elements from row-major to column-major.
	// Packed row-matrix should just use transpose() function.
	if (!has_decoration(id, DecorationCPacked))
	{
		const auto type = expression_type(id);
		add_convert_row_major_matrix_function(type.columns, type.vecsize);
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
cmpb $0x0, 0x628(%rdi)
jne 0x7a439
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %eax
movq 0x38(%rdi), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
testb $0x10, 0x60(%rcx,%rax)
jne 0x7a44b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0xa
popq %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x103d2
movb $0x1, %bl
testb %al, %al
jne 0x7a43b
movq %r14, %rdi
movl %ebp, %esi
callq 0x104b0
movq %rsp, %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x1a29c
movl 0x14(%r15), %edx
movl 0x18(%r15), %esi
movq %r14, %rdi
callq 0x7a4a4
movq %rsp, %rdi
callq 0x17a3e
jmp 0x7a43b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x17a3e
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::add_convert_row_major_matrix_function(unsigned int, unsigned int)
void CompilerMSL::add_convert_row_major_matrix_function(uint32_t cols, uint32_t rows)
{
	SPVFuncImpl spv_func;
	if (cols == rows) // Square matrix...just use transpose() function
		return;
	else if (cols == 2 && rows == 3)
		spv_func = SPVFuncImplRowMajor2x3;
	else if (cols == 2 && rows == 4)
		spv_func = SPVFuncImplRowMajor2x4;
	else if (cols == 3 && rows == 2)
		spv_func = SPVFuncImplRowMajor3x2;
	else if (cols == 3 && rows == 4)
		spv_func = SPVFuncImplRowMajor3x4;
	else if (cols == 4 && rows == 2)
		spv_func = SPVFuncImplRowMajor4x2;
	else if (cols == 4 && rows == 3)
		spv_func = SPVFuncImplRowMajor4x3;
	else
		SPIRV_CROSS_THROW("Could not convert row-major matrix.");

	auto rslt = spv_function_implementations.insert(spv_func);
	if (rslt.second)
	{
		add_pragma_line("#pragma clang diagnostic ignored \"-Wmissing-prototypes\"");
		force_recompile = true;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
cmpl %edx, %esi
je 0x7a57b
movq %rdi, %rbx
movl %esi, %ecx
xorl $0x2, %ecx
movl %edx, %eax
xorl $0x3, %eax
orl %ecx, %eax
jne 0x7a4cf
movl $0x12, 0xc(%rsp)
jmp 0x7a531
movl %edx, %eax
xorl $0x4, %eax
orl %eax, %ecx
jne 0x7a4e2
movl $0x13, 0xc(%rsp)
jmp 0x7a531
movl %esi, %edi
xorl $0x3, %edi
movl %edx, %ecx
xorl $0x2, %ecx
movl %edi, %r8d
orl %ecx, %r8d
jne 0x7a4fe
movl $0x14, 0xc(%rsp)
jmp 0x7a531
orl %eax, %edi
jne 0x7a50c
movl $0x15, 0xc(%rsp)
jmp 0x7a531
movl %esi, %eax
xorl $0x4, %eax
orl %ecx, %eax
jne 0x7a51f
movl $0x16, 0xc(%rsp)
jmp 0x7a531
cmpl $0x4, %esi
jne 0x7a584
cmpl $0x3, %edx
jne 0x7a584
movl $0x17, 0xc(%rsp)
leaq 0x7e0(%rbx), %rdi
leaq 0xc(%rsp), %rsi
callq 0x8815a
testb $0x1, %dl
je 0x7a57b
leaq 0x20dcd(%rip), %rsi     # 0x9b31b
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x6100
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x72fec
leaq 0x10(%rsp), %rdi
callq 0x6548
movb $0x1, 0x1d0(%rbx)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x23653(%rip), %rsi     # 0x9dbe9
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x6c802(%rip), %rsi     # 0xe6dc0
movq 0x6da1b(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x7a5e4
jmp 0x7a600
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
jmp 0x7a600
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
jmp 0x7a600
movq %rax, %r14
movq %r14, %rdi
callq 0x64b0