LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::args_will_forward(unsigned int, unsigned int const*, unsigned int, bool)
bool CompilerGLSL::args_will_forward(uint32_t id, const uint32_t *args, uint32_t num_args, bool pure)
{
	if (forced_temporaries.find(id) != end(forced_temporaries))
		return false;

	for (uint32_t i = 0; i < num_args; i++)
		if (!should_forward(args[i]))
			return false;

	// We need to forward globals as well.
	if (!pure)
	{
		for (auto global : global_variables)
			if (!should_forward(global))
				return false;
		for (auto aliased : aliased_variables)
			if (!should_forward(aliased))
				return false;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
andb $0x1, %al
movb %al, -0x25(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x88(%rbp)
addq $0x228, %rdi            # imm = 0x228
leaq -0x14(%rbp), %rsi
callq 0x2ff00
movq -0x88(%rbp), %rdi
movq %rax, -0x30(%rbp)
addq $0x228, %rdi            # imm = 0x228
callq 0x2ff30
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2fed0
testb $0x1, %al
jne 0x884ca
jmp 0x884d3
movb $0x0, -0x1(%rbp)
jmp 0x88609
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x88512
movq -0x88(%rbp), %rdi
movq -0x20(%rbp), %rax
movl -0x3c(%rbp), %ecx
movl (%rax,%rcx,4), %esi
callq 0x78810
testb $0x1, %al
jne 0x88505
movb $0x0, -0x1(%rbp)
jmp 0x88609
jmp 0x88507
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x884da
testb $0x1, -0x25(%rbp)
jne 0x88605
movq -0x88(%rbp), %rax
addq $0x118, %rax            # imm = 0x118
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x86d0
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x8700
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x8730
testb $0x1, %al
jne 0x8855a
jmp 0x88591
leaq -0x50(%rbp), %rdi
callq 0x8770
movq -0x88(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %esi
callq 0x78810
testb $0x1, %al
jne 0x88584
movb $0x0, -0x1(%rbp)
jmp 0x88609
jmp 0x88586
leaq -0x50(%rbp), %rdi
callq 0x8790
jmp 0x88547
movq -0x88(%rbp), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0x86d0
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
callq 0x8700
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x8730
testb $0x1, %al
jne 0x885cf
jmp 0x88603
leaq -0x70(%rbp), %rdi
callq 0x8770
movq -0x88(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %esi
callq 0x78810
testb $0x1, %al
jne 0x885f6
movb $0x0, -0x1(%rbp)
jmp 0x88609
jmp 0x885f8
leaq -0x70(%rbp), %rdi
callq 0x8790
jmp 0x885bc
jmp 0x88605
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::register_impure_function_call()
void CompilerGLSL::register_impure_function_call()
{
	// Impure functions can modify globals and aliased variables, so invalidate them as well.
	for (auto global : global_variables)
		flush_dependees(get<SPIRVariable>(global));
	for (auto aliased : aliased_variables)
		flush_dependees(get<SPIRVariable>(aliased));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
addq $0x118, %rax            # imm = 0x118
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x86d0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8700
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x8730
testb $0x1, %al
jne 0x8866b
jmp 0x8869c
leaq -0x18(%rbp), %rdi
callq 0x8770
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %esi
callq 0xfec0
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x1ff00
leaq -0x18(%rbp), %rdi
callq 0x8790
jmp 0x88658
movq -0x50(%rbp), %rax
addq $0x130, %rax            # imm = 0x130
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x86d0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8700
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x8730
testb $0x1, %al
jne 0x886d7
jmp 0x88708
leaq -0x38(%rbp), %rdi
callq 0x8770
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %esi
callq 0xfec0
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x1ff00
leaq -0x38(%rbp), %rdi
callq 0x8790
jmp 0x886c4
addq $0x50, %rsp
popq %rbp
retq
nop
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::flush_variable_declaration(unsigned int)
void CompilerGLSL::flush_variable_declaration(uint32_t id)
{
	auto *var = maybe_get<SPIRVariable>(id);
	if (var && var->deferred_declaration)
	{
		statement(variable_decl_function_local(*var), ";");
		var->deferred_declaration = false;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x50(%rbp)
movl -0xc(%rbp), %esi
callq 0x116b0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x88799
movq -0x18(%rbp), %rax
testb $0x1, 0x59(%rax)
je 0x88799
movq -0x50(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x38(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x87650
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
leaq 0xc093e(%rip), %rdx     # 0x1490a6
callq 0xf270
jmp 0x8876f
leaq -0x38(%rbp), %rdi
callq 0x7708
movq -0x18(%rbp), %rax
movb $0x0, 0x59(%rax)
jmp 0x88799
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x7708
jmp 0x8879f
addq $0x60, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x7640
nopl (%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::skip_argument(unsigned int) const
bool CompilerGLSL::skip_argument(uint32_t id) const
{
	if (!combined_image_samplers.empty() || !options.vulkan_semantics)
	{
		auto &type = expression_type(id);
		if (type.basetype == SPIRType::Sampler || (type.basetype == SPIRType::Image && type.image.sampled == 1))
			return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0xa10a0
testb $0x1, %al
jne 0x88ee9
jmp 0x88ef6
movq -0x28(%rbp), %rax
testb $0x1, 0x43e(%rax)
jne 0x88f2f
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1f760
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0xf, 0xc(%rax)
je 0x88f27
movq -0x20(%rbp), %rax
cmpl $0xd, 0xc(%rax)
jne 0x88f2d
movq -0x20(%rbp), %rax
cmpl $0x1, 0x8c(%rax)
jne 0x88f2d
movb $0x1, -0x1(%rbp)
jmp 0x88f33
jmp 0x88f2f
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nop
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_block_instructions(spirv_cross::SPIRBlock&)
void CompilerGLSL::emit_block_instructions(SPIRBlock &block)
{
	current_emitting_block = &block;
	for (auto &op : block.ops)
		emit_instruction(op);
	current_emitting_block = nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, 0x410(%rax)
movq -0x10(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xa4cc0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xa4cf0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xa4d20
testb $0x1, %al
jne 0x8922c
jmp 0x89252
leaq -0x20(%rbp), %rdi
callq 0xa4d60
movq -0x38(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
movq (%rdi), %rax
callq *0x48(%rax)
leaq -0x20(%rbp), %rdi
callq 0xa4d80
jmp 0x89219
movq -0x38(%rbp), %rax
movq $0x0, 0x410(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::append_global_func_args(spirv_cross::SPIRFunction const&, unsigned int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void CompilerGLSL::append_global_func_args(const SPIRFunction &func, uint32_t index, vector<string> &arglist)
{
	auto &args = func.arguments;
	uint32_t arg_cnt = uint32_t(args.size());
	for (uint32_t arg_idx = index; arg_idx < arg_cnt; arg_idx++)
	{
		auto &arg = args[arg_idx];
		assert(arg.alias_global_variable);

		// If the underlying variable needs to be declared
		// (ie. a local variable with deferred declaration), do so now.
		uint32_t var_id = get<SPIRVariable>(arg.id).basevariable;
		if (var_id)
			flush_variable_declaration(var_id);

		arglist.push_back(to_func_call_arg(arg.id));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x420d0
movl %eax, -0x2c(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0x94cbb
movq -0x28(%rbp), %rdi
movl -0x30(%rbp), %eax
movl %eax, %esi
callq 0x30880
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
testb $0x1, 0x10(%rax)
je 0x94c0a
jmp 0x94c29
leaq 0xafdb6(%rip), %rdi     # 0x1449c7
leaq 0xac614(%rip), %rsi     # 0x14122c
movl $0x2013, %edx           # imm = 0x2013
leaq 0xafdbd(%rip), %rcx     # 0x1449e1
callq 0x7260
movq -0x78(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x4(%rax), %esi
callq 0xfec0
movl 0x1c(%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x94c51
movq -0x78(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x88710
movq -0x78(%rbp), %rsi
movq -0x20(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %edx
movq (%rsi), %rax
movq 0xd0(%rax), %rax
leaq -0x60(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq *%rax
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0xecd0
jmp 0x94c8d
leaq -0x60(%rbp), %rdi
callq 0x7708
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x94be0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x7708
jmp 0x94cc4
addq $0x90, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x7640
nopl (%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::check_function_call_constraints(unsigned int const*, unsigned int)
void CompilerGLSL::check_function_call_constraints(const uint32_t *args, uint32_t length)
{
	// If our variable is remapped, and we rely on type-remapping information as
	// well, then we cannot pass the variable as a function parameter.
	// Fixing this is non-trivial without stamping out variants of the same function,
	// so for now warn about this and suggest workarounds instead.
	for (uint32_t i = 0; i < length; i++)
	{
		auto *var = maybe_get<SPIRVariable>(args[i]);
		if (!var || !var->remapped_variable)
			continue;

		auto &type = get<SPIRType>(var->basetype);
		if (type.basetype == SPIRType::Image && type.image.dim == DimSubpassData)
		{
			SPIRV_CROSS_THROW("Tried passing a remapped subpassInput variable to a function. "
			                  "This will not work correctly because type-remapping information is lost. "
			                  "To workaround, please consider not passing the subpass input as a function parameter, "
			                  "or use in/out variables instead which do not need type remapping information.");
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x94e11
movq -0x68(%rbp), %rdi
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %esi
callq 0x116b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x94d29
movq -0x20(%rbp), %rax
testb $0x1, 0x5b(%rax)
jne 0x94d2e
jmp 0x94e03
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0xc(%rax), %esi
callq 0xea90
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0xd, 0xc(%rax)
jne 0x94e01
movq -0x28(%rbp), %rax
cmpl $0x6, 0x84(%rax)
jne 0x94e01
movb $0x1, -0x5d(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x78(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x7650
movq -0x70(%rbp), %rdx
leaq 0xb0351(%rip), %rsi     # 0x1450dc
leaq -0x48(%rbp), %rdi
callq 0x7520
jmp 0x94d96
movq -0x78(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x9c50
jmp 0x94da5
movq -0x78(%rbp), %rdi
movb $0x0, -0x5d(%rbp)
leaq 0x119024(%rip), %rsi    # 0x1addd8
leaq -0x8b12b(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0x94e23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x94de5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x7708
leaq -0x49(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x5d(%rbp)
jne 0x94df6
jmp 0x94dff
movq -0x78(%rbp), %rdi
callq 0x72c0
jmp 0x94e1a
jmp 0x94e03
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x94cf5
addq $0x80, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::check_atomic_image(unsigned int)
bool CompilerGLSL::check_atomic_image(uint32_t id)
{
	auto &type = expression_type(id);
	if (type.storage == StorageClassImage)
	{
		if (options.es && options.version < 320)
			require_extension_internal("GL_OES_shader_image_atomic");

		auto *var = maybe_get_backing_variable(id);
		if (var)
		{
			auto &flags = ir.meta.at(var->self).decoration.decoration_flags;
			if (flags.get(DecorationNonWritable) || flags.get(DecorationNonReadable))
			{
				flags.clear(DecorationNonWritable);
				flags.clear(DecorationNonReadable);
				force_recompile = true;
			}
		}
		return true;
	}
	else
		return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x70(%rbp)
movl -0x14(%rbp), %esi
callq 0x1f760
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0xb, 0x64(%rax)
jne 0x94f8a
movq -0x70(%rbp), %rax
testb $0x1, 0x43c(%rax)
je 0x94efc
movq -0x70(%rbp), %rax
cmpl $0x140, 0x438(%rax)     # imm = 0x140
jae 0x94efc
leaq -0x41(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x7650
movq -0x78(%rbp), %rdx
leaq 0xaff5e(%rip), %rsi     # 0x144dfb
leaq -0x40(%rbp), %rdi
callq 0x7520
jmp 0x94ea8
movq -0x70(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x589d0
jmp 0x94eb7
leaq -0x40(%rbp), %rdi
callq 0x7708
leaq -0x41(%rbp), %rdi
callq 0x73d0
jmp 0x94efc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x94eee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x7708
leaq -0x41(%rbp), %rdi
callq 0x73d0
jmp 0x94f9c
movq -0x70(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1fa90
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x94f84
movq -0x70(%rbp), %rdi
addq $0x8, %rdi
addq $0x30, %rdi
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x2f5c0
addq $0x60, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
movl $0x18, %esi
callq 0xef50
testb $0x1, %al
jne 0x94f5b
movq -0x68(%rbp), %rdi
movl $0x19, %esi
callq 0xef50
testb $0x1, %al
jne 0x94f5b
jmp 0x94f82
movq -0x68(%rbp), %rdi
movl $0x18, %esi
callq 0x30130
movq -0x68(%rbp), %rdi
movl $0x19, %esi
callq 0x30130
movq -0x70(%rbp), %rax
movb $0x1, 0x1d0(%rax)
jmp 0x94f84
movb $0x1, -0x1(%rbp)
jmp 0x94f8e
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: pls_format_to_components(spirv_cross::PlsFormat)
static uint32_t pls_format_to_components(PlsFormat format)
{
	switch (format)
	{
	default:
	case PlsR32F:
	case PlsR32UI:
		return 1;

	case PlsRG16F:
	case PlsRG16:
	case PlsRG16UI:
	case PlsRG16I:
		return 2;

	case PlsR11FG11FB10F:
		return 3;

	case PlsRGB10A2:
	case PlsRGBA8:
	case PlsRGBA8I:
	case PlsRGB10A2UI:
	case PlsRGBA8UI:
		return 4;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0xb, %eax
ja 0x9503b
movq -0x10(%rbp), %rax
leaq 0xab762(%rip), %rcx     # 0x140794
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x9503d
movl $0x1, -0x4(%rbp)
jmp 0x9505f
movl $0x2, -0x4(%rbp)
jmp 0x9505f
movl $0x3, -0x4(%rbp)
jmp 0x9505f
movl $0x4, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::get_next_instruction_in_block(spirv_cross::Instruction const&)
const Instruction *CompilerGLSL::get_next_instruction_in_block(const Instruction &instr)
{
	// FIXME: This is kind of hacky. There should be a cleaner way.
	auto offset = uint32_t(&instr - current_emitting_block->ops.data());
	if ((offset + 1) < current_emitting_block->ops.size())
		return &current_emitting_block->ops[offset + 1];
	else
		return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movq 0x410(%rax), %rdi
addq $0x38, %rdi
callq 0xa9990
movq %rax, %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
movl $0xc, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x30(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq %rcx, -0x28(%rbp)
movq 0x410(%rax), %rdi
addq $0x38, %rdi
callq 0xa99b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0x9516a
movq -0x30(%rbp), %rax
movq 0x410(%rax), %rdi
addq $0x38, %rdi
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0xa99e0
movq %rax, -0x8(%rbp)
jmp 0x95172
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::is_non_native_row_major_matrix(unsigned int)
bool CompilerGLSL::is_non_native_row_major_matrix(uint32_t id)
{
	// Natively supported row-major matrices do not need to be converted.
	// Legacy targets do not support row major.
	if (backend.native_row_major_matrix && !is_legacy())
		return false;

	// Non-matrix or column-major matrix types do not need to be converted.
	if (!ir.meta[id].decoration.decoration_flags.get(DecorationRowMajor))
		return false;

	// Only square row-major matrices can be converted at this time.
	// Converting non-square matrices will require defining custom GLSL function that
	// swaps matrix elements while retaining the original dimensional form of the matrix.
	const auto type = expression_type(id);
	if (type.columns != type.vecsize)
		SPIRV_CROSS_THROW("Row-major matrices must be square on this platform.");

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x130(%rbp)
testb $0x1, 0x628(%rax)
je 0x9524f
movq -0x130(%rbp), %rdi
callq 0x9f610
testb $0x1, %al
jne 0x9524f
movb $0x0, -0x1(%rbp)
jmp 0x953ab
movq -0x130(%rbp), %rdi
addq $0x8, %rdi
addq $0x30, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0xead0
movq %rax, %rdi
addq $0x60, %rdi
movl $0x4, %esi
callq 0xef50
testb $0x1, %al
jne 0x95286
movb $0x0, -0x1(%rbp)
jmp 0x953ab
movq -0x130(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1f760
movq %rax, %rsi
leaq -0xf0(%rbp), %rdi
callq 0x3d730
movl -0xd8(%rbp), %eax
cmpl -0xdc(%rbp), %eax
je 0x9539b
movb $0x1, -0x125(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x140(%rbp)
leaq -0x111(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x7650
movq -0x138(%rbp), %rdx
leaq 0xaf75f(%rip), %rsi     # 0x144a4e
leaq -0x110(%rbp), %rdi
callq 0x7520
jmp 0x952fd
movq -0x140(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x9c50
jmp 0x95312
movq -0x140(%rbp), %rdi
movb $0x0, -0x125(%rbp)
leaq 0x118ab1(%rip), %rsi    # 0x1addd8
leaq -0x8b69e(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0x953c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x9536a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x7708
leaq -0x111(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x125(%rbp)
jne 0x95381
jmp 0x9538d
movq -0x140(%rbp), %rdi
callq 0x72c0
leaq -0xf0(%rbp), %rdi
callq 0x314e0
jmp 0x953b9
movb $0x1, -0x1(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x314e0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0x120(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::member_is_non_native_row_major_matrix(spirv_cross::SPIRType const&, unsigned int)
bool CompilerGLSL::member_is_non_native_row_major_matrix(const SPIRType &type, uint32_t index)
{
	// Natively supported row-major matrices do not need to be converted.
	if (backend.native_row_major_matrix && !is_legacy())
		return false;

	// Non-matrix or column-major matrix types do not need to be converted.
	if (!combined_decoration_for_member(type, index).get(DecorationRowMajor))
		return false;

	// Only square row-major matrices can be converted at this time.
	// Converting non-square matrices will require defining custom GLSL function that
	// swaps matrix elements while retaining the original dimensional form of the matrix.
	const auto mbr_type = get<SPIRType>(type.member_types[index]);
	if (mbr_type.columns != mbr_type.vecsize)
		SPIRV_CROSS_THROW("Row-major matrices must be square on this platform.");

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x178(%rbp)
testb $0x1, 0x628(%rax)
je 0x95413
movq -0x178(%rbp), %rdi
callq 0x9f610
testb $0x1, %al
jne 0x95413
movb $0x0, -0x1(%rbp)
jmp 0x955b7
movq -0x178(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq -0x60(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x2c660
movq -0x188(%rbp), %rdi
movl $0x4, %esi
callq 0xef50
movb %al, -0x179(%rbp)
jmp 0x9544a
movb -0x179(%rbp), %al
xorb $-0x1, %al
movb %al, -0x189(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xf250
movb -0x189(%rbp), %al
testb $0x1, %al
jne 0x9546d
jmp 0x95490
movb $0x0, -0x1(%rbp)
jmp 0x955b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xf250
jmp 0x955c5
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
movl -0x1c(%rbp), %eax
movl %eax, %esi
callq 0x8570
movq -0x178(%rbp), %rdi
movl (%rax), %esi
callq 0xea90
movq %rax, %rsi
leaq -0x148(%rbp), %rdi
callq 0x3d730
movl -0x130(%rbp), %eax
cmpl -0x134(%rbp), %eax
je 0x955a7
movb $0x1, -0x16a(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x1a0(%rbp)
leaq -0x169(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x7650
movq -0x198(%rbp), %rdx
leaq 0xaf544(%rip), %rsi     # 0x144a4e
leaq -0x168(%rbp), %rdi
callq 0x7520
jmp 0x95518
movq -0x1a0(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x9c50
jmp 0x9552d
movq -0x1a0(%rbp), %rdi
movb $0x0, -0x16a(%rbp)
leaq 0x118896(%rip), %rsi    # 0x1addd8
leaq -0x8b8b9(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0x955ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x95576
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x7708
leaq -0x169(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x16a(%rbp)
jne 0x9558d
jmp 0x95599
movq -0x1a0(%rbp), %rdi
callq 0x72c0
leaq -0x148(%rbp), %rdi
callq 0x314e0
jmp 0x955c5
movb $0x1, -0x1(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x314e0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x7640
nop
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::argument_decl[abi:cxx11](spirv_cross::SPIRFunction::Parameter const&)
string CompilerGLSL::argument_decl(const SPIRFunction::Parameter &arg)
{
	// glslangValidator seems to make all arguments pointer no matter what which is rather bizarre ...
	auto &type = expression_type(arg.id);
	const char *direction = "";

	if (type.pointer)
	{
		if (arg.write_count && arg.read_count)
			direction = "inout ";
		else if (arg.write_count)
			direction = "out ";
	}

	return join(direction, to_qualifiers_glsl(arg.id), variable_decl(type, to_name(arg.id), arg.id));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0xb0(%rbp)
movq %rdi, %rax
movq %rax, -0xa8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x1f760
movq %rax, -0x20(%rbp)
leaq 0xa8a24(%rip), %rax     # 0x13e89e
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
testb $0x1, 0x60(%rax)
je 0x95ec2
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0x95ea9
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x95ea9
leaq 0xaec02(%rip), %rax     # 0x144aa5
movq %rax, -0x28(%rbp)
jmp 0x95ec0
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0x95ebe
leaq 0xaebed(%rip), %rax     # 0x144aa7
movq %rax, -0x28(%rbp)
jmp 0x95ec0
jmp 0x95ec2
movq -0xa0(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edx
movq (%rsi), %rax
movq 0x128(%rax), %rax
leaq -0x48(%rbp), %rdi
callq *%rax
movq -0xa0(%rbp), %rsi
movq -0x20(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edx
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq -0x88(%rbp), %rdi
movl $0x1, %ecx
callq *%rax
jmp 0x95f10
movq -0xb8(%rbp), %rdx
movq -0xa0(%rbp), %rsi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %r8d
movq (%rsi), %rax
movq 0xc8(%rax), %rax
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rcx
callq *%rax
jmp 0x95f3f
movq -0xb0(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x48(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0xa7370
jmp 0x95f59
leaq -0x68(%rbp), %rdi
callq 0x7708
leaq -0x88(%rbp), %rdi
callq 0x7708
leaq -0x48(%rbp), %rdi
callq 0x7708
movq -0xa8(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x95fd6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x95fca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x7708
leaq -0x88(%rbp), %rdi
callq 0x7708
leaq -0x48(%rbp), %rdi
callq 0x7708
movq -0x90(%rbp), %rdi
callq 0x7640
nopl (%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::to_pls_qualifiers_glsl(spirv_cross::SPIRVariable const&)
const char *CompilerGLSL::to_pls_qualifiers_glsl(const SPIRVariable &variable)
{
	auto flags = ir.meta[variable.self].decoration.decoration_flags;
	if (flags.get(DecorationRelaxedPrecision))
		return "mediump ";
	else
		return "highp ";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0xead0
movq %rax, %rsi
addq $0x60, %rsi
leaq -0x58(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0xef10
movq -0x78(%rbp), %rdi
xorl %esi, %esi
callq 0xef50
movb %al, -0x69(%rbp)
jmp 0x9607d
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x96086
jmp 0x960b1
leaq 0xaea00(%rip), %rax     # 0x144a8d
movq %rax, -0x8(%rbp)
movl $0x1, -0x68(%rbp)
jmp 0x960c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xf250
jmp 0x960d9
leaq 0xae9de(%rip), %rax     # 0x144a96
movq %rax, -0x8(%rbp)
movl $0x1, -0x68(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xf250
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: pls_format_to_basetype(spirv_cross::PlsFormat)
static SPIRType::BaseType pls_format_to_basetype(PlsFormat format)
{
	switch (format)
	{
	default:
	case PlsR11FG11FB10F:
	case PlsR32F:
	case PlsRG16F:
	case PlsRGB10A2:
	case PlsRGBA8:
	case PlsRG16:
		return SPIRType::Float;

	case PlsRGBA8I:
	case PlsRG16I:
		return SPIRType::Int;

	case PlsRGB10A2UI:
	case PlsRGBA8UI:
	case PlsRG16UI:
	case PlsR32UI:
		return SPIRType::UInt;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
decl %eax
subl $0x6, %eax
jb 0x96122
jmp 0x96106
movl -0xc(%rbp), %eax
addl $-0x7, %eax
subl $0x2, %eax
jb 0x9612b
jmp 0x96113
movl -0xc(%rbp), %eax
addl $-0x9, %eax
subl $0x4, %eax
jb 0x96134
jmp 0x96120
jmp 0x96122
movl $0xa, -0x4(%rbp)
jmp 0x9613b
movl $0x4, -0x4(%rbp)
jmp 0x9613b
movl $0x5, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: to_pls_layout(spirv_cross::PlsFormat)
static const char *to_pls_layout(PlsFormat format)
{
	switch (format)
	{
	case PlsR11FG11FB10F:
		return "layout(r11f_g11f_b10f) ";
	case PlsR32F:
		return "layout(r32f) ";
	case PlsRG16F:
		return "layout(rg16f) ";
	case PlsRGB10A2:
		return "layout(rgb10_a2) ";
	case PlsRGBA8:
		return "layout(rgba8) ";
	case PlsRG16:
		return "layout(rg16) ";
	case PlsRGBA8I:
		return "layout(rgba8i)";
	case PlsRG16I:
		return "layout(rg16i) ";
	case PlsRGB10A2UI:
		return "layout(rgb10_a2ui) ";
	case PlsRGBA8UI:
		return "layout(rgba8ui) ";
	case PlsRG16UI:
		return "layout(rg16ui) ";
	case PlsR32UI:
		return "layout(r32ui) ";
	default:
		return "";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xb, %eax
ja 0x96214
movq -0x18(%rbp), %rax
leaq 0xaa65e(%rip), %rcx     # 0x1407c4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xaf12f(%rip), %rax     # 0x1452a5
movq %rax, -0x8(%rbp)
jmp 0x9621f
leaq 0xaf137(%rip), %rax     # 0x1452bd
movq %rax, -0x8(%rbp)
jmp 0x9621f
leaq 0xaf135(%rip), %rax     # 0x1452cb
movq %rax, -0x8(%rbp)
jmp 0x9621f
leaq 0xaf134(%rip), %rax     # 0x1452da
movq %rax, -0x8(%rbp)
jmp 0x9621f
leaq 0xaf139(%rip), %rax     # 0x1452ec
movq %rax, -0x8(%rbp)
jmp 0x9621f
leaq 0xaf13b(%rip), %rax     # 0x1452fb
movq %rax, -0x8(%rbp)
jmp 0x9621f
leaq 0xaf13c(%rip), %rax     # 0x145309
movq %rax, -0x8(%rbp)
jmp 0x9621f
leaq 0xaf13e(%rip), %rax     # 0x145318
movq %rax, -0x8(%rbp)
jmp 0x9621f
leaq 0xaf140(%rip), %rax     # 0x145327
movq %rax, -0x8(%rbp)
jmp 0x9621f
leaq 0xaf147(%rip), %rax     # 0x14533b
movq %rax, -0x8(%rbp)
jmp 0x9621f
leaq 0xaf14b(%rip), %rax     # 0x14534c
movq %rax, -0x8(%rbp)
jmp 0x9621f
leaq 0xaf14e(%rip), %rax     # 0x14535c
movq %rax, -0x8(%rbp)
jmp 0x9621f
leaq 0xa8683(%rip), %rax     # 0x13e89e
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_fixup()
void CompilerGLSL::emit_fixup()
{
	auto &execution = get_entry_point();
	if (execution.model == ExecutionModelVertex)
	{
		if (options.vertex.fixup_clipspace)
		{
			const char *suffix = backend.float_literal_suffix ? "f" : "";
			statement("gl_Position.z = 2.0", suffix, " * gl_Position.z - gl_Position.w;");
		}

		if (options.vertex.flip_vert_y)
			statement("gl_Position.y = -gl_Position.y;");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x25150
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xb8(%rax)
jne 0x996b0
movq -0x20(%rbp), %rax
testb $0x1, 0x442(%rax)
je 0x99691
movq -0x20(%rbp), %rdi
movb 0x600(%rdi), %dl
leaq 0xa5236(%rip), %rax     # 0x13e89e
leaq 0xa7ac9(%rip), %rcx     # 0x141138
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, -0x18(%rbp)
leaq 0xab795(%rip), %rsi     # 0x144e16
leaq -0x18(%rbp), %rdx
leaq 0xab79e(%rip), %rcx     # 0x144e2a
callq 0xa7f60
movq -0x20(%rbp), %rax
testb $0x1, 0x443(%rax)
je 0x996ae
movq -0x20(%rbp), %rdi
leaq 0xab7a3(%rip), %rsi     # 0x144e4c
callq 0xa8090
jmp 0x996b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::flush_phi_required(unsigned int, unsigned int)
bool CompilerGLSL::flush_phi_required(uint32_t from, uint32_t to)
{
	auto &child = get<SPIRBlock>(to);
	for (auto &phi : child.phi_variables)
		if (phi.parent == from)
			return true;
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x87d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x40910
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x40940
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x40970
testb $0x1, %al
jne 0x9971b
jmp 0x99747
leaq -0x30(%rbp), %rdi
callq 0x409b0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x9973a
movb $0x1, -0x1(%rbp)
jmp 0x9974b
jmp 0x9973c
leaq -0x30(%rbp), %rdi
callq 0x409d0
jmp 0x99708
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_while_loop_initializers(spirv_cross::SPIRBlock const&)
void CompilerGLSL::emit_while_loop_initializers(const SPIRBlock &block)
{
	// While loops do not take initializers, so declare all of them outside.
	for (auto &loop_var : block.loop_variables)
	{
		auto &var = get<SPIRVariable>(loop_var);
		statement(variable_decl(var), ";");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
addq $0xd0, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xbaf0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xbb20
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x2e710
testb $0x1, %al
jne 0x9a4d6
jmp 0x9a54c
leaq -0x20(%rbp), %rdi
callq 0x2e750
movq -0x70(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %esi
callq 0xfec0
movq -0x70(%rbp), %rsi
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdx
leaq -0x58(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x62d60
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
leaq 0xaeb8c(%rip), %rdx     # 0x1490a6
callq 0xf270
jmp 0x9a521
leaq -0x58(%rbp), %rdi
callq 0x7708
leaq -0x20(%rbp), %rdi
callq 0x2e770
jmp 0x9a4c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x7708
jmp 0x9a555
addq $0x80, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x7640
nop
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::flush_undeclared_variables(spirv_cross::SPIRBlock&)
void CompilerGLSL::flush_undeclared_variables(SPIRBlock &block)
{
	// Enforce declaration order for regression testing purposes.
	sort(begin(block.dominated_variables), end(block.dominated_variables));

	for (auto &v : block.dominated_variables)
	{
		auto &var = get<SPIRVariable>(v);
		if (var.deferred_declaration)
			statement(variable_decl(var), ";");
		var.deferred_declaration = false;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
addq $0xb8, %rdi
callq 0x85d0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0xb8, %rdi
callq 0x8600
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x30280
movq -0x10(%rbp), %rax
addq $0xb8, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x86d0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x8700
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x8730
testb $0x1, %al
jne 0x9b7ee
jmp 0x9b881
leaq -0x30(%rbp), %rdi
callq 0x8770
movq -0x80(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl (%rax), %esi
callq 0xfec0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
testb $0x1, 0x59(%rax)
je 0x9b86b
movq -0x80(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x68(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x62d60
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rsi
leaq 0xad864(%rip), %rdx     # 0x1490a6
callq 0xf270
jmp 0x9b849
leaq -0x68(%rbp), %rdi
callq 0x7708
jmp 0x9b86b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x7708
jmp 0x9b88a
movq -0x48(%rbp), %rax
movb $0x0, 0x59(%rax)
leaq -0x30(%rbp), %rdi
callq 0x8790
jmp 0x9b7d8
addq $0x90, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::bitcast_from_builtin_load(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, spirv_cross::SPIRType const&)
void CompilerGLSL::bitcast_from_builtin_load(uint32_t source_id, std::string &expr,
                                             const spirv_cross::SPIRType &expr_type)
{
	auto *var = maybe_get_backing_variable(source_id);
	if (var)
		source_id = var->self;

	// Only interested in standalone builtin variables.
	if (!has_decoration(source_id, DecorationBuiltIn))
		return;

	auto builtin = static_cast<BuiltIn>(get_decoration(source_id, DecorationBuiltIn));
	auto expected_type = expr_type.basetype;

	// TODO: Fill in for more builtins.
	switch (builtin)
	{
	case BuiltInLayer:
	case BuiltInPrimitiveId:
	case BuiltInViewportIndex:
	case BuiltInInstanceId:
	case BuiltInInstanceIndex:
	case BuiltInVertexId:
	case BuiltInVertexIndex:
	case BuiltInSampleId:
	case BuiltInBaseVertex:
	case BuiltInBaseInstance:
	case BuiltInDrawIndex:
		expected_type = SPIRType::Int;
		break;

	case BuiltInGlobalInvocationId:
	case BuiltInLocalInvocationId:
	case BuiltInWorkgroupId:
	case BuiltInLocalInvocationIndex:
	case BuiltInWorkgroupSize:
	case BuiltInNumWorkgroups:
		expected_type = SPIRType::UInt;
		break;

	default:
		break;
	}

	if (expected_type != expr_type.basetype)
		expr = bitcast_expression(expr_type, expected_type, expr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
movl -0xc(%rbp), %esi
callq 0x1fa90
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x9bd0c
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x58(%rbp), %rdi
movl -0xc(%rbp), %esi
movl $0xb, %edx
callq 0x1f560
testb $0x1, %al
jne 0x9bd26
jmp 0x9bde2
movq -0x58(%rbp), %rdi
movl -0xc(%rbp), %esi
movl $0xb, %edx
callq 0x23520
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x5c(%rbp)
addl $-0x5, %eax
subl $0x3, %eax
jb 0x9bd94
jmp 0x9bd54
movl -0x5c(%rbp), %eax
addl $-0x9, %eax
subl $0x2, %eax
jb 0x9bd94
jmp 0x9bd61
movl -0x5c(%rbp), %eax
subl $0x12, %eax
je 0x9bd94
jmp 0x9bd6b
movl -0x5c(%rbp), %eax
addl $-0x18, %eax
subl $0x6, %eax
jb 0x9bd9d
jmp 0x9bd78
movl -0x5c(%rbp), %eax
addl $-0x2a, %eax
subl $0x2, %eax
jb 0x9bd94
jmp 0x9bd85
movl -0x5c(%rbp), %eax
addl $0xffffeeb8, %eax       # imm = 0xFFFFEEB8
subl $0x2, %eax
ja 0x9bda6
jmp 0x9bd94
movl $0x4, -0x30(%rbp)
jmp 0x9bda8
movl $0x5, -0x30(%rbp)
jmp 0x9bda8
jmp 0x9bda8
movl -0x30(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0xc(%rcx), %eax
je 0x9bde2
movq -0x58(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x30(%rbp), %ecx
movq -0x18(%rbp), %r8
leaq -0x50(%rbp), %rdi
callq 0x7dfd0
movq -0x18(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x7430
leaq -0x50(%rbp), %rdi
callq 0x7708
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::bitcast_to_builtin_store(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, spirv_cross::SPIRType const&)
void CompilerGLSL::bitcast_to_builtin_store(uint32_t target_id, std::string &expr,
                                            const spirv_cross::SPIRType &expr_type)
{
	// Only interested in standalone builtin variables.
	if (!has_decoration(target_id, DecorationBuiltIn))
		return;

	auto builtin = static_cast<BuiltIn>(get_decoration(target_id, DecorationBuiltIn));
	auto expected_type = expr_type.basetype;

	// TODO: Fill in for more builtins.
	switch (builtin)
	{
	case BuiltInLayer:
	case BuiltInPrimitiveId:
	case BuiltInViewportIndex:
		expected_type = SPIRType::Int;
		break;

	default:
		break;
	}

	if (expected_type != expr_type.basetype)
	{
		auto type = expr_type;
		type.basetype = expected_type;
		expr = bitcast_expression(type, expr_type.basetype, expr);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x138(%rbp)
movl -0xc(%rbp), %esi
movl $0xb, %edx
callq 0x1f560
testb $0x1, %al
jne 0x9be2b
jmp 0x9bf18
movq -0x138(%rbp), %rdi
movl -0xc(%rbp), %esi
movl $0xb, %edx
callq 0x23520
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x13c(%rbp)
subl $0x7, %eax
je 0x9be6c
jmp 0x9be5c
movl -0x13c(%rbp), %eax
addl $-0x9, %eax
subl $0x1, %eax
ja 0x9be75
jmp 0x9be6c
movl $0x4, -0x28(%rbp)
jmp 0x9be77
jmp 0x9be77
movl -0x28(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0xc(%rcx), %eax
je 0x9bf18
movq -0x20(%rbp), %rsi
leaq -0x100(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x3d730
movq -0x138(%rbp), %rsi
movq -0x148(%rbp), %rdx
movl -0x28(%rbp), %eax
movl %eax, -0xf4(%rbp)
movq -0x20(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x18(%rbp), %r8
leaq -0x120(%rbp), %rdi
callq 0x7dfd0
jmp 0x9bece
movq -0x18(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x7430
leaq -0x120(%rbp), %rdi
callq 0x7708
leaq -0x100(%rbp), %rdi
callq 0x314e0
jmp 0x9bf18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x314e0
jmp 0x9bf21
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0x128(%rbp), %rdi
callq 0x7640
nopl (%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_common.hpp
// Function: spirv_cross::merge(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
inline std::string merge(const std::vector<std::string> &list)
{
	std::string s;
	for (auto &elem : list)
	{
		s += elem;
		if (&elem != &list.back())
			s += ", ";
	}
	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x7530
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3a140
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3a170
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3a410
testb $0x1, %al
jne 0x9f319
jmp 0x9f38d
leaq -0x28(%rbp), %rdi
callq 0x3a480
movq -0x58(%rbp), %rdi
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rsi
callq 0x7470
jmp 0x9f335
movq -0x38(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa9b70
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
je 0x9f37d
movq -0x58(%rbp), %rdi
leaq 0xa5232(%rip), %rsi     # 0x14458f
callq 0x7340
jmp 0x9f364
jmp 0x9f37d
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x7708
jmp 0x9f3aa
jmp 0x9f37f
leaq -0x28(%rbp), %rdi
callq 0x3a4a0
jmp 0x9f306
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x9f3a0
movq -0x58(%rbp), %rdi
callq 0x7708
movq -0x50(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_common.hpp
// Function: spirv_cross::convert_to_string[abi:cxx11](float)
inline std::string convert_to_string(float t)
{
	// std::to_string for floating point values is broken.
	// Fallback to something more sane.
	char buf[64];
	sprintf(buf, SPIRV_CROSS_FLT_FMT, t);
	// Ensure that the literal is float.
	if (!strchr(buf, '.') && !strchr(buf, 'e'))
		strcat(buf, ".0");
	return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x78(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
leaq -0x50(%rbp), %rdi
movss -0xc(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0xa34c4(%rip), %rsi     # 0x145207
movb $0x1, %al
callq 0x7080
leaq -0x50(%rbp), %rdi
movl $0x2e, %esi
callq 0x7120
cmpq $0x0, %rax
jne 0xa1d82
leaq -0x50(%rbp), %rdi
movl $0x65, %esi
callq 0x7120
cmpq $0x0, %rax
jne 0xa1d82
leaq -0x50(%rbp), %rdi
leaq 0xa63dd(%rip), %rsi     # 0x14815a
callq 0x7660
leaq -0x51(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x7650
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rdx
leaq -0x50(%rbp), %rsi
callq 0x7520
jmp 0xa1da2
leaq -0x51(%rbp), %rdi
callq 0x73d0
movq -0x70(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x51(%rbp), %rdi
callq 0x73d0
movq -0x60(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)
// File: rossy[P]crossc/SPIRV-Cross/spirv_common.hpp
// Function: spirv_cross::convert_to_string[abi:cxx11](double)
inline std::string convert_to_string(double t)
{
	// std::to_string for floating point values is broken.
	// Fallback to something more sane.
	char buf[64];
	sprintf(buf, SPIRV_CROSS_FLT_FMT, t);
	// Ensure that the literal is float.
	if (!strchr(buf, '.') && !strchr(buf, 'e'))
		strcat(buf, ".0");
	return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x78(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
leaq -0x50(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
leaq 0xa30b8(%rip), %rsi     # 0x145207
movb $0x1, %al
callq 0x7080
leaq -0x50(%rbp), %rdi
movl $0x2e, %esi
callq 0x7120
cmpq $0x0, %rax
jne 0xa218e
leaq -0x50(%rbp), %rdi
movl $0x65, %esi
callq 0x7120
cmpq $0x0, %rax
jne 0xa218e
leaq -0x50(%rbp), %rdi
leaq 0xa5fd1(%rip), %rsi     # 0x14815a
callq 0x7660
leaq -0x51(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x7650
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rdx
leaq -0x50(%rbp), %rsi
callq 0x7520
jmp 0xa21ae
leaq -0x51(%rbp), %rdi
callq 0x73d0
movq -0x70(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x51(%rbp), %rdi
callq 0x73d0
movq -0x60(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)
nopl (%rax)