// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsp, %rdi
xorl %ecx, %ecx
callq *0x98(%rax)
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2b55a
leaq 0x10(%rsp), %r12
movq -0x10(%r12), %rcx
movq -0x8(%r12), %r8
movq 0x28(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r12, %rcx
je 0x9364a
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x9366d
leaq 0x30(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x93668
movq 0x30(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x93677
movq %rsp, %rdi
callq 0x60b0
jmp 0x93685
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x62c0
leaq 0x50(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x936a9
movq %rsi, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x936af
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x30(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x936e7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x936fd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
cmpb $0x0, 0x5d8(%r14)
je 0x93725
cmpb $0x1, 0x937(%r14)
jne 0x9374f
movq %r14, %rdi
callq 0x15e8a
cmpl $0x0, 0xb8(%rax)
sete %al
jmp 0x93751
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x50(%rsp), %rcx
movq -0x10(%rcx), %rdx
cmpq %rcx, %rdx
je 0x937f0
movq %rdx, (%rbx)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x937f6
xorl %eax, %eax
movl 0x930(%r14), %esi
testl %esi, %esi
sete %cl
orb %al, %cl
jne 0x938ac
movq %r14, %rdi
callq 0xb3ca
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0xa3ea
movq (%r14), %r8
leaq 0x20(%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 0x2b55a
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x68(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r13, %rcx
je 0x937c1
movq 0x30(%rsp), %rdi
movq 0x60(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x937e4
leaq 0x70(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x937df
movq 0x70(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x93804
leaq 0x20(%rsp), %rdi
callq 0x60b0
jmp 0x93812
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rbx)
jmp 0x93a08
leaq 0x60(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x62c0
movq %r12, (%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x93830
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x93838
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x40(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x6310
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x9387a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93895
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x938ac
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r12, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %r14, %rdi
callq 0x15f76
movl 0xb8(%rax), %ecx
leal -0x5(%rcx), %edx
cmpl $0x2, %edx
jb 0x93909
testl %ecx, %ecx
je 0x93918
cmpl $0x4, %ecx
jne 0x93927
testb $0x2, 0x61(%rax)
leaq 0x2f518(%rip), %rax     # 0xc2e00
leaq 0x2f4ed(%rip), %rcx     # 0xc2ddc
cmoveq %rax, %rcx
movq 0x8(%rsp), %rdx
movl $0x8, %eax
movl $0x23, %r8d
cmoveq %rax, %r8
jmp 0x93939
movl $0x6, %r8d
leaq 0x2f4f3(%rip), %rcx     # 0xc2e09
jmp 0x93934
movl $0x6, %r8d
leaq 0x2f933(%rip), %rcx     # 0xc3258
jmp 0x93934
movl $0x7, %r8d
leaq 0x2f4dc(%rip), %rcx     # 0xc2e10
movq 0x8(%rsp), %rdx
movq %rsp, %rdi
xorl %esi, %esi
callq 0x63f0
leaq 0x20(%rsp), %rdi
movq %r13, (%rdi)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
callq 0xe456
leaq 0x20f4b(%rip), %rsi     # 0xb48ae
leaq 0x20(%rsp), %rdi
callq 0x64e0
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x60b0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x939a3
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x939a9
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x939d7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x939ed
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93a08
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93a3f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x93a3f
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x93a94
movq 0x30(%rsp), %rsi
jmp 0x93a8c
jmp 0x93a56
jmp 0x93a56
jmp 0x93a56
movq %rax, %rbx
jmp 0x93a94
jmp 0x93a5d
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x93a7e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x93a7e
jmp 0x93a7b
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x93a94
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93ae7
movq 0x50(%rsp), %rsi
jmp 0x93adf
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93acc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x93acc
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x93ae7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop