// File: /workspace/github_cpp_makefile_star2_O1/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 0x4d687
movabsq $0x100000001b3, %r14    # imm = 0x100000001B3
movl (%r12), %esi
movq %rbx, %rdi
callq 0x14bf8
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0xa426
movq 0x1d8(%rbx), %rcx
cmpq 0x1e0(%rbx), %rcx
je 0x4d675
movl 0xc(%rax), %ecx
leal -0xe(%rcx), %edx
cmpl $0x2, %edx
jb 0x4d67e
cmpl $0xd, %ecx
jne 0x4d675
cmpl $0xf, %ecx
je 0x4d67e
cmpl $0x1, 0x8c(%rax)
je 0x4d67e
imulq %r14, %r15
movl %ebp, %eax
xorq %rax, %r15
addq $0x14, %r12
cmpq %r13, %r12
jne 0x4d62f
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 0x6123c
movq %rax, %r12
testq %rax, %rax
je 0x4d733
addq $0x28, %r12
movq %rsp, %rsi
movq %r12, %rdi
callq 0x61338
testq %rax, %rax
je 0x4d7a5
movl 0x8(%r14), %eax
leaq 0x488(%rbx), %rsi
imulq $0x148, %rax, %rdx      # imm = 0x148
addq 0x38(%rbx), %rdx
movq %rbx, %rdi
callq 0x2b9f6
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 0x613b4
leaq 0x30(%rsp), %rdx
movq %rax, (%rdx)
movq %rsp, %rsi
movq %rax, %rdi
callq 0x61708
jmp 0x4d788
movl 0x8(%r14), %eax
leaq 0x488(%rbx), %rsi
imulq $0x148, %rax, %rdx      # imm = 0x148
addq 0x38(%rbx), %rdx
movq %rbx, %rdi
callq 0x2b9f6
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 0x613b4
leaq 0x30(%rsp), %rdx
movq %rax, (%rdx)
movq %rsp, %rsi
movq %rax, %rdi
callq 0x61708
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d7b8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4d7b8
leaq 0x8(%rsp), %rdx
movq %r12, (%rdx)
movq %rsp, %rsi
movq %r12, %rdi
callq 0x61708
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d7d3
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 0x4d80a
jmp 0x4d80a
jmp 0x4d7e8
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d80d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4d80d
jmp 0x4d80a
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d828
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0