// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::ActiveBuiltinHandler::handle_builtin(spirv_cross::SPIRType const&, spv::BuiltIn, spirv_cross::Bitset const&)
void Compiler::ActiveBuiltinHandler::handle_builtin(const SPIRType &type, BuiltIn builtin,
                                                    const Bitset &decoration_flags)
{
	// If used, we will need to explicitly declare a new array size for these builtins.

	if (builtin == BuiltInClipDistance)
	{
		if (!type.array_size_literal[0])
			SPIRV_CROSS_THROW("Array size for ClipDistance must be a literal.");
		uint32_t array_size = type.array[0];
		if (array_size == 0)
			SPIRV_CROSS_THROW("Array size for ClipDistance must not be unsized.");
		compiler.clip_distance_count = array_size;
	}
	else if (builtin == BuiltInCullDistance)
	{
		if (!type.array_size_literal[0])
			SPIRV_CROSS_THROW("Array size for CullDistance must be a literal.");
		uint32_t array_size = type.array[0];
		if (array_size == 0)
			SPIRV_CROSS_THROW("Array size for CullDistance must not be unsized.");
		compiler.cull_distance_count = array_size;
	}
	else if (builtin == BuiltInPosition)
	{
		if (decoration_flags.get(DecorationInvariant))
			compiler.position_invariant = true;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
testl %edx, %edx
je 0x15c68
movq %rsi, %r14
cmpl $0x4, %edx
je 0x15c3f
cmpl $0x3, %edx
jne 0x15c79
leaq 0x38(%r14), %rdi
xorl %esi, %esi
callq 0xab22
testb %al, %al
je 0x15cd0
movq 0x20(%r14), %rax
movl (%rax), %eax
testl %eax, %eax
je 0x15d69
movq 0x8(%rbx), %rcx
movl %eax, 0x350(%rcx)
jmp 0x15c79
leaq 0x38(%r14), %rdi
xorl %esi, %esi
callq 0xab22
testb %al, %al
je 0x15c82
movq 0x20(%r14), %rax
movl (%rax), %eax
testl %eax, %eax
je 0x15d1e
movq 0x8(%rbx), %rcx
movl %eax, 0x354(%rcx)
jmp 0x15c79
testb $0x4, 0x2(%rcx)
je 0x15c79
movq 0x8(%rbx), %rax
movb $0x1, 0x358(%rax)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x7a477(%rip), %rsi     # 0x9010b
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xd1104(%rip), %rsi     # 0xe6dc0
movq 0xd231d(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x15db2
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x7a3c9(%rip), %rsi     # 0x900ab
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xd10b6(%rip), %rsi     # 0xe6dc0
movq 0xd22cf(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x15db2
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x7a40a(%rip), %rsi     # 0x9013a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xd1068(%rip), %rsi     # 0xe6dc0
movq 0xd2281(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x15db2
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x7a35f(%rip), %rsi     # 0x900da
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xd101d(%rip), %rsi     # 0xe6dc0
movq 0xd2236(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x15dbe
jmp 0x15dd2
jmp 0x15dbe
jmp 0x15dd2
jmp 0x15dbe
jmp 0x15dd2
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x15dd5
jmp 0x15ddd
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64b0
nop