// File: rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::builtin_type_decl[abi:cxx11](spv::BuiltIn)
string CompilerMSL::builtin_type_decl(BuiltIn builtin)
{
	switch (builtin)
	{
	// Vertex function in
	case BuiltInVertexId:
		return "uint";
	case BuiltInVertexIndex:
		return "uint";
	case BuiltInBaseVertex:
		return "uint";
	case BuiltInInstanceId:
		return "uint";
	case BuiltInInstanceIndex:
		return "uint";
	case BuiltInBaseInstance:
		return "uint";
	case BuiltInDrawIndex:
		SPIRV_CROSS_THROW("DrawIndex is not supported in MSL.");

	// Vertex function out
	case BuiltInClipDistance:
		return "float";
	case BuiltInPointSize:
		return "float";
	case BuiltInPosition:
		return "float4";
	case BuiltInLayer:
		return "uint";
	case BuiltInViewportIndex:
		if (!msl_options.supports_msl_version(2, 0))
			SPIRV_CROSS_THROW("ViewportIndex requires Metal 2.0.");
		return "uint";

	// Fragment function in
	case BuiltInFrontFacing:
		return "bool";
	case BuiltInPointCoord:
		return "float2";
	case BuiltInFragCoord:
		return "float4";
	case BuiltInSampleId:
		return "uint";
	case BuiltInSampleMask:
		return "uint";
	case BuiltInSamplePosition:
		return "float2";

	// Fragment function out
	case BuiltInFragDepth:
		return "float";

	// Compute function in
	case BuiltInGlobalInvocationId:
	case BuiltInLocalInvocationId:
	case BuiltInNumWorkgroups:
	case BuiltInWorkgroupId:
		return "uint3";
	case BuiltInLocalInvocationIndex:
		return "uint";

	default:
		return "unsupported-built-in-type";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0xa8(%rbp)
movq %rdi, %rax
movq %rax, -0xa0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x8c(%rbp)
testl %eax, %eax
je 0x10a86e
jmp 0x10a3a5
movl -0x8c(%rbp), %eax
subl $0x1, %eax
je 0x10a81a
jmp 0x10a3b6
movl -0x8c(%rbp), %eax
subl $0x3, %eax
je 0x10a7c6
jmp 0x10a3c7
movl -0x8c(%rbp), %eax
subl $0x5, %eax
je 0x10a516
jmp 0x10a3d8
movl -0x8c(%rbp), %eax
subl $0x6, %eax
je 0x10a612
jmp 0x10a3e9
movl -0x8c(%rbp), %eax
subl $0x9, %eax
je 0x10a8c2
jmp 0x10a3fa
movl -0x8c(%rbp), %eax
subl $0xa, %eax
je 0x10a916
jmp 0x10a40b
movl -0x8c(%rbp), %eax
subl $0xf, %eax
je 0x10aaee
jmp 0x10a41c
movl -0x8c(%rbp), %eax
subl $0x10, %eax
je 0x10aa9a
jmp 0x10a42d
movl -0x8c(%rbp), %eax
subl $0x11, %eax
je 0x10aa46
jmp 0x10a43e
movl -0x8c(%rbp), %eax
subl $0x12, %eax
je 0x10ab42
jmp 0x10a44f
movl -0x8c(%rbp), %eax
subl $0x13, %eax
je 0x10abea
jmp 0x10a460
movl -0x8c(%rbp), %eax
subl $0x14, %eax
je 0x10ab96
jmp 0x10a471
movl -0x8c(%rbp), %eax
subl $0x16, %eax
je 0x10ac47
jmp 0x10a482
movl -0x8c(%rbp), %eax
subl $0x18, %eax
je 0x10aca4
jmp 0x10a493
movl -0x8c(%rbp), %eax
addl $-0x1a, %eax
subl $0x3, %eax
jb 0x10aca4
jmp 0x10a4a7
movl -0x8c(%rbp), %eax
subl $0x1d, %eax
je 0x10ad01
jmp 0x10a4b8
movl -0x8c(%rbp), %eax
subl $0x2a, %eax
je 0x10a56a
jmp 0x10a4c9
movl -0x8c(%rbp), %eax
subl $0x2b, %eax
je 0x10a666
jmp 0x10a4da
movl -0x8c(%rbp), %eax
subl $0x1148, %eax           # imm = 0x1148
je 0x10a5be
jmp 0x10a4ed
movl -0x8c(%rbp), %eax
subl $0x1149, %eax           # imm = 0x1149
je 0x10a6ba
jmp 0x10a500
movl -0x8c(%rbp), %eax
subl $0x114a, %eax           # imm = 0x114A
je 0x10a70e
jmp 0x10ad58
leaq -0x15(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0xb0(%rbp), %rdx
leaq 0x42ba7(%rip), %rsi     # 0x14d0e2
callq 0x7520
jmp 0x10a542
leaq -0x15(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x15(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x25(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0xb8(%rbp), %rdx
leaq 0x42b53(%rip), %rsi     # 0x14d0e2
callq 0x7520
jmp 0x10a596
leaq -0x25(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x25(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x26(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0xc0(%rbp), %rdx
leaq 0x42aff(%rip), %rsi     # 0x14d0e2
callq 0x7520
jmp 0x10a5ea
leaq -0x26(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x26(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x27(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0xc8(%rbp), %rdx
leaq 0x42aab(%rip), %rsi     # 0x14d0e2
callq 0x7520
jmp 0x10a63e
leaq -0x27(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x27(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x28(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0xd0(%rbp), %rdx
leaq 0x42a57(%rip), %rsi     # 0x14d0e2
callq 0x7520
jmp 0x10a692
leaq -0x28(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x29(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0xd8(%rbp), %rdx
leaq 0x42a03(%rip), %rsi     # 0x14d0e2
callq 0x7520
jmp 0x10a6e6
leaq -0x29(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
movb $0x1, -0x52(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0xe8(%rbp)
leaq -0x51(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x7650
movq -0xe0(%rbp), %rdx
leaq 0x42c69(%rip), %rsi     # 0x14d3aa
leaq -0x50(%rbp), %rdi
callq 0x7520
jmp 0x10a74c
movq -0xe8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9c50
jmp 0x10a75e
movq -0xe8(%rbp), %rdi
movb $0x0, -0x52(%rbp)
leaq 0xa3668(%rip), %rsi     # 0x1addd8
leaq -0x100ae7(%rip), %rdx   # 0x9c90
callq 0x7610
jmp 0x10adc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x10a7a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x7708
leaq -0x51(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x52(%rbp)
jne 0x10a7b5
jmp 0x10a7c1
movq -0xe8(%rbp), %rdi
callq 0x72c0
jmp 0x10adbf
leaq -0x53(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0xf0(%rbp), %rdx
leaq 0x428fe(%rip), %rsi     # 0x14d0e9
callq 0x7520
jmp 0x10a7f2
leaq -0x53(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x53(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x54(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0xf8(%rbp), %rdx
leaq 0x428aa(%rip), %rsi     # 0x14d0e9
callq 0x7520
jmp 0x10a846
leaq -0x54(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x54(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x55(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0x100(%rbp), %rdx
leaq 0x3e990(%rip), %rsi     # 0x149223
callq 0x7520
jmp 0x10a89a
leaq -0x55(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x55(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x56(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0x108(%rbp), %rdx
leaq 0x427fb(%rip), %rsi     # 0x14d0e2
callq 0x7520
jmp 0x10a8ee
leaq -0x56(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x56(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
movq -0x98(%rbp), %rdi
addq $0x7cc, %rdi            # imm = 0x7CC
movl $0x2, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x1160d0
testb $0x1, %al
jne 0x10a9f2
movb $0x1, -0x7a(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x118(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x7650
movq -0x110(%rbp), %rdx
leaq 0x42a72(%rip), %rsi     # 0x14d3df
leaq -0x78(%rbp), %rdi
callq 0x7520
jmp 0x10a978
movq -0x118(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x9c50
jmp 0x10a98a
movq -0x118(%rbp), %rdi
movb $0x0, -0x7a(%rbp)
leaq 0xa343c(%rip), %rsi     # 0x1addd8
leaq -0x100d13(%rip), %rdx   # 0x9c90
callq 0x7610
jmp 0x10adc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x10a9d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x7708
leaq -0x79(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x7a(%rbp)
jne 0x10a9e1
jmp 0x10a9ed
movq -0x118(%rbp), %rdi
callq 0x72c0
jmp 0x10adbf
leaq -0x7b(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0x120(%rbp), %rdx
leaq 0x426cb(%rip), %rsi     # 0x14d0e2
callq 0x7520
jmp 0x10aa1e
leaq -0x7b(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x7b(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x7c(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0x128(%rbp), %rdx
leaq 0x37223(%rip), %rsi     # 0x141c8e
callq 0x7520
jmp 0x10aa72
leaq -0x7c(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x7c(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x7d(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0x130(%rbp), %rdx
leaq 0x4261a(%rip), %rsi     # 0x14d0d9
callq 0x7520
jmp 0x10aac6
leaq -0x7d(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x7d(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x7e(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0x138(%rbp), %rdx
leaq 0x3e710(%rip), %rsi     # 0x149223
callq 0x7520
jmp 0x10ab1a
leaq -0x7e(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x7e(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x7f(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0x140(%rbp), %rdx
leaq 0x4257b(%rip), %rsi     # 0x14d0e2
callq 0x7520
jmp 0x10ab6e
leaq -0x7f(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x7f(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x80(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0x148(%rbp), %rdx
leaq 0x42527(%rip), %rsi     # 0x14d0e2
callq 0x7520
jmp 0x10abc2
leaq -0x80(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x81(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0x150(%rbp), %rdx
leaq 0x424c7(%rip), %rsi     # 0x14d0d9
callq 0x7520
jmp 0x10ac19
leaq -0x81(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x81(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x82(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0x158(%rbp), %rdx
leaq 0x4247a(%rip), %rsi     # 0x14d0e9
callq 0x7520
jmp 0x10ac76
leaq -0x82(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x82(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x83(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0x160(%rbp), %rdx
leaq 0x3b786(%rip), %rsi     # 0x146452
callq 0x7520
jmp 0x10acd3
leaq -0x83(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x83(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x84(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0x168(%rbp), %rdx
leaq 0x423b9(%rip), %rsi     # 0x14d0e2
callq 0x7520
jmp 0x10ad30
leaq -0x84(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x84(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
leaq -0x85(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdi
movq -0x170(%rbp), %rdx
leaq 0x42d29(%rip), %rsi     # 0x14daa9
callq 0x7520
jmp 0x10ad87
leaq -0x85(%rbp), %rdi
callq 0x73d0
jmp 0x10adaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x85(%rbp), %rdi
callq 0x73d0
jmp 0x10adbf
movq -0xa0(%rbp), %rax
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x7640
nopl (%rax,%rax)