// File: /workspace/github_cpp_makefile_star2_O3/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
movabsq $-0x340d631b7bdddcdb, %r15 # imm = 0xCBF29CE484222325
movq 0x18(%rsi), %r12
movq %rsi, 0x28(%rsp)
movq 0x20(%rsi), %r13
cmpq %r13, %r12
je 0x4cee4
movabsq $0x100000001b3, %r14    # imm = 0x100000001B3
movl (%r12), %esi
movq %rbx, %rdi
callq 0x14a6a
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0xa3ea
movq 0x1d8(%rbx), %rcx
cmpq 0x1e0(%rbx), %rcx
je 0x4ced2
movl 0xc(%rax), %ecx
leal -0xe(%rcx), %edx
cmpl $0x2, %edx
jb 0x4cedb
cmpl $0xd, %ecx
jne 0x4ced2
cmpl $0x1, 0x8c(%rax)
je 0x4cedb
imulq %r14, %r15
movl %ebp, %eax
xorq %rax, %r15
addq $0x14, %r12
cmpq %r13, %r12
jne 0x4ce91
movq %r15, (%rsp)
movq 0x28(%rsp), %r14
movl 0x8(%r14), %edx
movq (%rbx), %rax
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
leaq 0x5a0(%rbx), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x609b6
movq %rax, %r12
testq %rax, %rax
je 0x4cf90
addq $0x28, %r12
movq %rsp, %rsi
movq %r12, %rdi
callq 0x60ab2
testq %rax, %rax
je 0x4d002
movl 0x8(%r14), %eax
leaq 0x488(%rbx), %rsi
imulq $0x148, %rax, %rdx      # imm = 0x148
addq 0x38(%rbx), %rdx
movq %rbx, %rdi
callq 0x2b3ee
movl 0x8(%r14), %edx
movq (%rbx), %rax
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x60b0e
leaq 0x30(%rsp), %rdx
movq %rax, (%rdx)
movq %rsp, %rsi
movq %rax, %rdi
callq 0x60e50
jmp 0x4cfe5
movl 0x8(%r14), %eax
leaq 0x488(%rbx), %rsi
imulq $0x148, %rax, %rdx      # imm = 0x148
addq 0x38(%rbx), %rdx
movq %rbx, %rdi
callq 0x2b3ee
movl 0x8(%r14), %edx
movq (%rbx), %rax
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x60b0e
leaq 0x30(%rsp), %rdx
movq %rax, (%rdx)
movq %rsp, %rsi
movq %rax, %rdi
callq 0x60e50
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d015
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4d015
leaq 0x8(%rsp), %rdx
movq %r12, (%rdx)
movq %rsp, %rsi
movq %r12, %rdi
callq 0x60e50
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d030
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4d067
jmp 0x4d067
jmp 0x4d045
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d06a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4d06a
jmp 0x4d067
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d085
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop