// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::add_function_overload(spirv_cross::SPIRFunction const&)
void CompilerGLSL::add_function_overload(const SPIRFunction &func)
{
	Hasher hasher;
	for (auto &arg : func.arguments)
	{
		// Parameters can vary with pointer type or not,
		// but that will not change the signature in GLSL/HLSL,
		// so strip the pointer type before hashing.
		uint32_t type_id = get_non_pointer_type_id(arg.type);
		auto &type = get<SPIRType>(type_id);

		if (!combined_image_samplers.empty())
		{
			// If we have combined image samplers, we cannot really trust the image and sampler arguments
			// we pass down to callees, because they may be shuffled around.
			// Ignore these arguments, to make sure that functions need to differ in some other way
			// to be considered different overloads.
			if (type.basetype == SPIRType::SampledImage ||
			    (type.basetype == SPIRType::Image && type.image.sampled == 1) || type.basetype == SPIRType::Sampler)
			{
				continue;
			}
		}

		hasher.u32(type_id);
	}
	uint64_t types_hash = hasher.get();

	auto function_name = to_name(func.self);
	auto itr = function_overloads.find(function_name);
	if (itr != end(function_overloads))
	{
		// There exists a function with this name already.
		auto &overloads = itr->second;
		if (overloads.count(types_hash) != 0)
		{
			// Overload conflict, assign a new name.
			add_resource_name(func.self);
			function_overloads[to_name(func.self)].insert(types_hash);
		}
		else
		{
			// Can reuse the name.
			overloads.insert(types_hash);
		}
	}
	else
	{
		// First time we see this function name.
		add_resource_name(func.self);
		function_overloads[to_name(func.self)].insert(types_hash);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq 0x18(%rsi), %r15
movq %rsi, 0x10(%rsp)
movq 0x20(%rsi), %r13
movabsq $-0x340d631b7bdddcdb, %r12 # imm = 0xCBF29CE484222325
movabsq $0x100000001b3, %r14    # imm = 0x100000001B3
cmpq %r13, %r15
je 0x3e6ee
movl (%r15), %esi
movq %rbx, %rdi
callq 0x11e00
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0x90a4
movq 0x1d8(%rbx), %rcx
cmpq 0x1e0(%rbx), %rcx
je 0x3e6df
movl 0xc(%rax), %ecx
leal -0xe(%rcx), %edx
cmpl $0x2, %edx
jb 0x3e6e8
cmpl $0xd, %ecx
jne 0x3e6df
cmpl $0x1, 0x8c(%rax)
je 0x3e6e8
imulq %r14, %r12
movl %ebp, %eax
xorq %rax, %r12
addq $0x14, %r15
jmp 0x3e69a
movq %r12, 0x8(%rsp)
movq 0x10(%rsp), %r14
movl 0x8(%r14), %edx
movq (%rbx), %rax
leaq 0x38(%rsp), %r12
pushq $0x1
popq %rcx
movq %r12, %rdi
movq %rbx, %rsi
callq *0x38(%rax)
leaq 0x5a0(%rbx), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x4e74c
movq %rax, %r12
testq %rax, %rax
je 0x3e781
addq $0x28, %r12
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x4e81c
testq %rax, %rax
je 0x3e7c8
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x22d1a
movl 0x8(%r14), %edx
movq (%rbx), %rax
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rcx
movq %rbx, %rsi
callq *0x38(%rax)
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x4e8ac
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x4ec2e
jmp 0x3e7bc
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x22d1a
movl 0x8(%r14), %edx
movq (%rbx), %rax
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rcx
movq %rbx, %rsi
callq *0x38(%rax)
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x4e8ac
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x4ec2e
leaq 0x18(%rsp), %rdi
callq 0x6548
jmp 0x3e7d5
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x4ec2e
leaq 0x38(%rsp), %rdi
callq 0x6548
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3e805
jmp 0x3e805
jmp 0x3e7f4
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x6548
jmp 0x3e808
jmp 0x3e805
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0