// File: rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::to_component_argument[abi:cxx11](unsigned int)
string CompilerMSL::to_component_argument(uint32_t id)
{
	if (ir.ids[id].get_type() != TypeConstant)
	{
		SPIRV_CROSS_THROW("ID " + to_string(id) + " is not an OpConstant.");
		return "component::x";
	}

	uint32_t component_index = get<SPIRConstant>(id).scalar();
	switch (component_index)
	{
	case 0:
		return "component::x";
	case 1:
		return "component::y";
	case 2:
		return "component::z";
	case 3:
		return "component::w";

	default:
		SPIRV_CROSS_THROW("The value (" + to_string(component_index) + ") of OpConstant ID " + to_string(id) +
		                  " is not a valid Component index, which must be one of 0, 1, 2, or 3.");
		return "component::x";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, -0x170(%rbp)
movq %rdi, %rax
movq %rax, -0x168(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x160(%rbp)
addq $0x8, %rdi
addq $0x18, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xbdb0
movq %rax, %rdi
callq 0xfa00
cmpl $0x3, %eax
je 0x105df8
movb $0x1, -0x85(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x178(%rbp)
movl -0x14(%rbp), %esi
leaq -0x78(%rbp), %rdi
callq 0x45220
jmp 0x105d1b
leaq 0x47582(%rip), %rsi     # 0x14d2a4
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rdx
callq 0xa6db0
jmp 0x105d31
leaq 0x47505(%rip), %rdx     # 0x14d23d
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x11910
jmp 0x105d47
movq -0x178(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x9c50
jmp 0x105d59
movq -0x178(%rbp), %rdi
movb $0x0, -0x85(%rbp)
leaq 0xa806a(%rip), %rsi     # 0x1addd8
leaq -0xfc0e5(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0x1061a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x105ddc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x105dd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x105dca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x7708
leaq -0x58(%rbp), %rdi
callq 0x7708
leaq -0x78(%rbp), %rdi
callq 0x7708
testb $0x1, -0x85(%rbp)
jne 0x105de7
jmp 0x105df3
movq -0x178(%rbp), %rdi
callq 0x72c0
jmp 0x10619b
movq -0x160(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x31910
movq %rax, %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x2f560
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
movq %rax, -0x180(%rbp)
subq $0x3, %rax
ja 0x105fc7
movq -0x180(%rbp), %rax
leaq 0x444b6(%rip), %rcx     # 0x14a2f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x8d(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x7650
movq -0x170(%rbp), %rdi
movq -0x188(%rbp), %rdx
leaq 0x473e5(%rip), %rsi     # 0x14d254
callq 0x7520
jmp 0x105e76
leaq -0x8d(%rbp), %rdi
callq 0x73d0
jmp 0x10618b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x8d(%rbp), %rdi
callq 0x73d0
jmp 0x10619b
leaq -0x8e(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x7650
movq -0x170(%rbp), %rdi
movq -0x190(%rbp), %rdx
leaq 0x47392(%rip), %rsi     # 0x14d261
callq 0x7520
jmp 0x105ed6
leaq -0x8e(%rbp), %rdi
callq 0x73d0
jmp 0x10618b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x8e(%rbp), %rdi
callq 0x73d0
jmp 0x10619b
leaq -0x8f(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x7650
movq -0x170(%rbp), %rdi
movq -0x198(%rbp), %rdx
leaq 0x4733f(%rip), %rsi     # 0x14d26e
callq 0x7520
jmp 0x105f36
leaq -0x8f(%rbp), %rdi
callq 0x73d0
jmp 0x10618b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x8f(%rbp), %rdi
callq 0x73d0
jmp 0x10619b
leaq -0x90(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x7650
movq -0x170(%rbp), %rdi
movq -0x1a0(%rbp), %rdx
leaq 0x472ec(%rip), %rsi     # 0x14d27b
callq 0x7520
jmp 0x105f96
leaq -0x90(%rbp), %rdi
callq 0x73d0
jmp 0x10618b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x73d0
jmp 0x10619b
movb $0x1, -0x151(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x1a8(%rbp)
movl -0x8c(%rbp), %esi
leaq -0x130(%rbp), %rdi
callq 0x45220
jmp 0x105ff3
leaq 0x4728e(%rip), %rsi     # 0x14d288
leaq -0x110(%rbp), %rdi
leaq -0x130(%rbp), %rdx
callq 0xa6db0
jmp 0x10600f
leaq 0x4727e(%rip), %rdx     # 0x14d294
leaq -0xf0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x11910
jmp 0x10602b
movl -0x14(%rbp), %esi
leaq -0x150(%rbp), %rdi
callq 0x45220
jmp 0x10603c
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0x2f7f0
jmp 0x106058
leaq 0x47249(%rip), %rdx     # 0x14d2a8
leaq -0xb0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x11910
jmp 0x106074
movq -0x1a8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x9c50
jmp 0x106089
movq -0x1a8(%rbp), %rdi
movb $0x0, -0x151(%rbp)
leaq 0xa7d3a(%rip), %rsi     # 0x1addd8
leaq -0xfc415(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0x1061a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x106172
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x106166
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x10615a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x10614e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x106142
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x106136
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x7708
leaq -0xd0(%rbp), %rdi
callq 0x7708
leaq -0x150(%rbp), %rdi
callq 0x7708
leaq -0xf0(%rbp), %rdi
callq 0x7708
leaq -0x110(%rbp), %rdi
callq 0x7708
leaq -0x130(%rbp), %rdi
callq 0x7708
testb $0x1, -0x151(%rbp)
jne 0x10617d
jmp 0x106189
movq -0x1a8(%rbp), %rdi
callq 0x72c0
jmp 0x10619b
movq -0x168(%rbp), %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)