// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::func_type_decl[abi:cxx11](spirv_cross::SPIRType&)
string CompilerMSL::func_type_decl(SPIRType &type)
{
	// The regular function return type. If not processing the entry point function, that's all we need
	string return_type = type_to_glsl(type) + type_to_array_glsl(type);
	if (!processing_entry_point)
		return return_type;

	// If an outgoing interface block has been defined, and it should be returned, override the entry point return type
	bool ep_should_return_output = !get_is_rasterization_disabled();
	if (stage_out_var_id && ep_should_return_output)
	{
		auto &so_var = get<SPIRVariable>(stage_out_var_id);
		auto &so_type = get<SPIRType>(so_var.basetype);
		return_type = type_to_glsl(so_type) + type_to_array_glsl(type);
	}

	// Prepend a entry type, based on the execution model
	string entry_type;
	auto &execution = get_entry_point();
	switch (execution.model)
	{
	case ExecutionModelVertex:
		entry_type = "vertex";
		break;
	case ExecutionModelFragment:
		entry_type =
		    execution.flags.get(ExecutionModeEarlyFragmentTests) ? "fragment [[ early_fragment_tests ]]" : "fragment";
		break;
	case ExecutionModelGLCompute:
	case ExecutionModelKernel:
		entry_type = "kernel";
		break;
	default:
		entry_type = "unknown";
		break;
	}

	return entry_type + " " + return_type;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
leaq 0x20(%rsp), %rdi
xorl %ecx, %ecx
callq *0x98(%rax)
movq %rsp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2547c
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x1743e
movq %rsp, %rdi
callq 0x6548
leaq 0x20(%rsp), %rdi
callq 0x6548
cmpb $0x0, 0x5d8(%r14)
je 0x76c31
movq %r14, %rdi
callq 0x7fc5a
movl 0x930(%r14), %esi
testl %esi, %esi
sete %cl
orb %cl, %al
jne 0x76be9
movq %r14, %rdi
callq 0x9c0e
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0x90a4
movq (%r14), %r8
movq %rsp, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq *0x98(%r8)
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2547c
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
leaq 0x60(%rsp), %rdx
callq 0x1743e
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x6320
movq %r15, %rdi
callq 0x6548
leaq 0x60(%rsp), %rdi
callq 0x6548
movq %rsp, %rdi
callq 0x6548
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %r14, %rdi
callq 0x12fa4
movl 0xb8(%rax), %ecx
leal -0x5(%rcx), %edx
cmpl $0x2, %edx
jb 0x76c54
testl %ecx, %ecx
je 0x76c7e
cmpl $0x4, %ecx
jne 0x76c87
testb $0x2, 0x61(%rax)
leaq 0x27194(%rip), %rax     # 0x9ddb8
leaq 0x27169(%rip), %rsi     # 0x9dd94
cmoveq %rax, %rsi
jmp 0x76c8e
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x76c5d
movq %rdx, (%rbx)
movq 0x50(%rsp), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x76c63
leaq 0x27166(%rip), %rsi     # 0x9ddc1
jmp 0x76c8e
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x48(%rsp), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x40(%rsp)
andq $0x0, 0x48(%rsp)
movb $0x0, 0x50(%rsp)
jmp 0x76cce
leaq 0x2758b(%rip), %rsi     # 0x9e210
jmp 0x76c8e
leaq 0x2713a(%rip), %rsi     # 0x9ddc8
leaq 0x20(%rsp), %rdi
callq 0x64e0
leaq 0x18be7(%rip), %rdx     # 0x8f886
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x174a5
movq %rsp, %rsi
leaq 0x40(%rsp), %rdx
movq %rbx, %rdi
callq 0x42dd2
movq %rsp, %rdi
callq 0x6548
leaq 0x20(%rsp), %rdi
callq 0x6548
leaq 0x40(%rsp), %rdi
callq 0x6548
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x6548
jmp 0x76cfa
movq %rax, %rbx
movq %rsp, %rdi
jmp 0x76d21
jmp 0x76d14
jmp 0x76d14
jmp 0x76d14
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6548
jmp 0x76d1c
jmp 0x76d19
movq %rax, %rbx
jmp 0x76d26
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6548
leaq 0x40(%rsp), %rdi
jmp 0x76d42
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6548
jmp 0x76d3d
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
nop