// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cpp.cpp
// Function: spirv_cross::CompilerCPP::emit_function_prototype(spirv_cross::SPIRFunction&, spirv_cross::Bitset const&)
void CompilerCPP::emit_function_prototype(SPIRFunction &func, const Bitset &)
{
	if (func.self != ir.default_entry_point)
		add_function_overload(func);

	local_variable_names = resource_names;
	string decl;

	auto &type = get<SPIRType>(func.return_type);
	decl += "inline ";
	decl += type_to_glsl(type);
	decl += " ";

	if (func.self == ir.default_entry_point)
	{
		decl += "main";
		processing_entry_point = true;
	}
	else
		decl += to_name(func.self);

	decl += "(";
	for (auto &arg : func.arguments)
	{
		add_local_variable_name(arg.id);

		decl += argument_decl(arg);
		if (&arg != &func.arguments.back())
			decl += ", ";

		// Hold a pointer to the parameter so we can invalidate the readonly field if needed.
		auto *var = maybe_get<SPIRVariable>(arg.id);
		if (var)
			var->parameter = &arg;
	}

	decl += ")";
	statement(decl);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rsi), %eax
cmpl 0x108(%rdi), %eax
je 0x98a8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4ce5a
leaq 0x488(%rbx), %rsi
leaq 0x450(%rbx), %rdi
callq 0xd596
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0xa3ea
movq %rax, %r15
leaq 0xaacd2(%rip), %rsi     # 0xb45b7
leaq 0x28(%rsp), %rdi
callq 0x64e0
movq (%rbx), %rax
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq *0x98(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x60b0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9934
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xaaf73(%rip), %rsi     # 0xb48ae
leaq 0x28(%rsp), %rdi
callq 0x64e0
movl 0x8(%r14), %edx
cmpl 0x108(%rbx), %edx
jne 0x996b
leaq 0xb4185(%rip), %rsi     # 0xbdadd
leaq 0x28(%rsp), %rdi
callq 0x64e0
movb $0x1, 0x5d8(%rbx)
jmp 0x99ae
movq (%rbx), %rax
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x60b0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x99ae
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xb92bc(%rip), %rsi     # 0xc2c71
leaq 0x28(%rsp), %rdi
callq 0x64e0
movq 0x18(%r14), %r15
movq 0x20(%r14), %rbp
cmpq %rbp, %r15
je 0x9a60
leaq 0x8(%rsp), %r12
leaq 0x28(%rsp), %r13
movl 0x4(%r15), %esi
movq %rbx, %rdi
callq 0x393f2
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x9b0c
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r13, %rdi
callq 0x60b0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x9a22
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%r14), %rax
addq $-0x14, %rax
cmpq %rax, %r15
je 0x9a3e
movq %r13, %rdi
leaq 0xb0672(%rip), %rsi     # 0xba0ab
callq 0x64e0
movl 0x4(%r15), %esi
movq %rbx, %rdi
callq 0xc7b4
testq %rax, %rax
je 0x9a53
movq %r15, 0x68(%rax)
addq $0x14, %r15
cmpq %rbp, %r15
jne 0x99da
leaq 0xb0fae(%rip), %rsi     # 0xbaa15
leaq 0x28(%rsp), %rdi
callq 0x64e0
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0xb634
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x9a9a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9ac3
jmp 0x9ae4
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x9ad0
jmp 0x9ae4
jmp 0x9ae4
jmp 0x9ae4
jmp 0x9ae4
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x9ae7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9ae7
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x9b03
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop