// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::builtin_qualifier[abi:cxx11](spv::BuiltIn)
string CompilerMSL::builtin_qualifier(BuiltIn builtin)
{
	auto &execution = get_entry_point();

	switch (builtin)
	{
	// Vertex function in
	case BuiltInVertexId:
		return "vertex_id";
	case BuiltInVertexIndex:
		return "vertex_id";
	case BuiltInBaseVertex:
		return "base_vertex";
	case BuiltInInstanceId:
		return "instance_id";
	case BuiltInInstanceIndex:
		return "instance_id";
	case BuiltInBaseInstance:
		return "base_instance";
	case BuiltInDrawIndex:
		SPIRV_CROSS_THROW("DrawIndex is not supported in MSL.");

	// Vertex function out
	case BuiltInClipDistance:
		return "clip_distance";
	case BuiltInPointSize:
		return "point_size";
	case BuiltInPosition:
		return "position";
	case BuiltInLayer:
		return "render_target_array_index";
	case BuiltInViewportIndex:
		if (!msl_options.supports_msl_version(2, 0))
			SPIRV_CROSS_THROW("ViewportIndex requires Metal 2.0.");
		return "viewport_array_index";

	// Fragment function in
	case BuiltInFrontFacing:
		return "front_facing";
	case BuiltInPointCoord:
		return "point_coord";
	case BuiltInFragCoord:
		return "position";
	case BuiltInSampleId:
		return "sample_id";
	case BuiltInSampleMask:
		return "sample_mask";
	case BuiltInSamplePosition:
		// Shouldn't be reached.
		SPIRV_CROSS_THROW("Sample position is retrieved by a function in MSL.");

	// Fragment function out
	case BuiltInFragDepth:
		if (execution.flags.get(ExecutionModeDepthGreater))
			return "depth(greater)";
		else if (execution.flags.get(ExecutionModeDepthLess))
			return "depth(less)";
		else
			return "depth(any)";

	// Compute function in
	case BuiltInGlobalInvocationId:
		return "thread_position_in_grid";

	case BuiltInWorkgroupId:
		return "threadgroup_position_in_grid";

	case BuiltInNumWorkgroups:
		return "threadgroups_per_grid";

	case BuiltInLocalInvocationId:
		return "thread_position_in_threadgroup";

	case BuiltInLocalInvocationIndex:
		return "thread_index_in_threadgroup";

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x16254
cmpl $0x1147, %ebp           # imm = 0x1147
jg 0x9eaff
cmpl $0x2b, %ebp
ja 0x9ed25
movl %ebp, %ecx
leaq 0x221e4(%rip), %rdx     # 0xc0cc0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x257cf(%rip), %rsi     # 0xc42c2
leaq 0x257d0(%rip), %rdx     # 0xc42ca
jmp 0x9ed4a
cmpl $0x1148, %ebp           # imm = 0x1148
je 0x9eceb
cmpl $0x1149, %ebp           # imm = 0x1149
jne 0x9ed19
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x25776(%rip), %rsi     # 0xc429b
leaq 0x2577c(%rip), %rdx     # 0xc42a8
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x25750(%rip), %rsi     # 0xc428f
leaq 0x25754(%rip), %rdx     # 0xc429a
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x25720(%rip), %rsi     # 0xc4279
leaq 0x25722(%rip), %rdx     # 0xc4282
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x25827(%rip), %rsi     # 0xc439a
leaq 0x2583c(%rip), %rdx     # 0xc43b6
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2577a(%rip), %rsi     # 0xc4307
leaq 0x2577e(%rip), %rdx     # 0xc4312
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x25710(%rip), %rsi     # 0xc42b7
leaq 0x25713(%rip), %rdx     # 0xc42c1
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x25752(%rip), %rsi     # 0xc4313
leaq 0x25754(%rip), %rdx     # 0xc431c
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x257f2(%rip), %rsi     # 0xc43cd
leaq 0x25809(%rip), %rdx     # 0xc43eb
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2578d(%rip), %rsi     # 0xc4382
leaq 0x2579d(%rip), %rdx     # 0xc4399
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2569a(%rip), %rsi     # 0xc42a9
leaq 0x256a0(%rip), %rdx     # 0xc42b6
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x256d1(%rip), %rsi     # 0xc42fa
leaq 0x256d6(%rip), %rdx     # 0xc4306
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x25688(%rip), %rsi     # 0xc42cb
leaq 0x2569a(%rip), %rdx     # 0xc42e4
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x256c0(%rip), %rsi     # 0xc431d
leaq 0x256c4(%rip), %rdx     # 0xc4328
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x25740(%rip), %rsi     # 0xc43b7
leaq 0x2574e(%rip), %rdx     # 0xc43cc
jmp 0x9ed4a
cmpl $0x4e1f, 0x7d0(%r14) # imm = 0x4E1F
jbe 0x9ed60
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x25643(%rip), %rsi     # 0xc42e5
leaq 0x25650(%rip), %rdx     # 0xc42f9
jmp 0x9ed4a
movq 0x60(%rax), %rax
btl $0xe, %eax
jb 0x9ed02
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
testw %ax, %ax
js 0x9ed3c
leaq 0x256ac(%rip), %rsi     # 0xc4377
leaq 0x256af(%rip), %rdx     # 0xc4381
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2570a(%rip), %rsi     # 0xc43ec
leaq 0x2571e(%rip), %rdx     # 0xc4407
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2558a(%rip), %rsi     # 0xc4283
leaq 0x2558e(%rip), %rdx     # 0xc428e
jmp 0x9ed4a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2564c(%rip), %rsi     # 0xc435c
leaq 0x25653(%rip), %rdx     # 0xc436a
jmp 0x9ed4a
cmpl $0x114a, %ebp           # imm = 0x114A
je 0x9edc9
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x256d5(%rip), %rsi     # 0xc4408
leaq 0x256e2(%rip), %rdx     # 0xc441c
jmp 0x9ed4a
leaq 0x25628(%rip), %rsi     # 0xc436b
leaq 0x2562c(%rip), %rdx     # 0xc4376
movq %rbx, %rdi
callq 0x7c64
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x24fd6(%rip), %rsi     # 0xc3d53
leaq 0x24ff0(%rip), %rdx     # 0xc3d74
leaq 0x8(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0x5dff3(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x5dfcb(%rip), %rsi     # 0xfcd80
movq 0x5f21c(%rip), %rdx     # 0xfdfd8
movq %rbx, %rdi
callq 0x6470
jmp 0x9ee93
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x24f38(%rip), %rsi     # 0xc3d1e
leaq 0x24f53(%rip), %rdx     # 0xc3d40
leaq 0x8(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0x5df8a(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x5df62(%rip), %rsi     # 0xfcd80
movq 0x5f1b3(%rip), %rdx     # 0xfdfd8
movq %rbx, %rdi
callq 0x6470
jmp 0x9ee93
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x254dd(%rip), %rsi     # 0xc4329
leaq 0x25508(%rip), %rdx     # 0xc435b
leaq 0x8(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0x5df24(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x5defc(%rip), %rsi     # 0xfcd80
movq 0x5f14d(%rip), %rdx     # 0xfdfd8
movq %rbx, %rdi
callq 0x6470
jmp 0x9ee9b
jmp 0x9eeb7
jmp 0x9ee9b
jmp 0x9eeb7
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x9eebd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9eebd
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x9eeca
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64a0