LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cpp.cpp
// Function: spirv_cross::CompilerCPP::variable_decl(spirv_cross::SPIRType const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int)
string CompilerCPP::variable_decl(const SPIRType &type, const string &name, uint32_t /* id */)
{
	string base = type_to_glsl(type);
	remap_variable_type_name(type, name, base);
	bool runtime = false;

	for (uint32_t i = 0; i < type.array.size(); i++)
	{
		auto &array = type.array[i];
		if (!array && type.array_size_literal[i])
		{
			// Avoid using runtime arrays with std::array since this is undefined.
			// Runtime arrays cannot be passed around as values, so this is fine.
			runtime = true;
		}
		else
			base = join("std::array<", base, ", ", to_array_size(type, i), ">");
	}
	base += ' ';
	return base + name + (runtime ? "[1]" : "");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, 0x8(%rsp)
movq (%rsi), %rax
leaq 0x28(%rsp), %rbx
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %ecx, %ecx
callq *0x98(%rax)
movq %r12, 0x20(%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, 0x10(%rsp)
movq %r14, %rdx
movq %rbx, %rcx
callq 0x9626
leaq 0x38(%r15), %rax
movq %rax, 0x18(%rsp)
leaq 0x68(%rsp), %rbx
leaq 0x48(%rsp), %rbp
leaq 0x28(%rsp), %r14
xorl %r12d, %r12d
movl %r13d, %r13d
movq 0x20(%r15), %rax
movq 0x28(%r15), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
jbe 0x8d0b
cmpl $0x0, (%rax,%r13,4)
jne 0x8cac
movq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0xab22
movb $0x1, %cl
testb %al, %al
jne 0x8d00
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x35634
movq %rbp, %rdi
leaq 0x868ce(%rip), %rsi     # 0x8f597
movq %r14, %rdx
leaq 0x8c3b8(%rip), %rcx     # 0x9508b
movq %rbx, %r8
leaq 0x864f7(%rip), %r9      # 0x8f1d4
callq 0xaa19
movq %r14, %rdi
movq %rbp, %rsi
callq 0x6320
movq %rbp, %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x6548
movl %r12d, %ecx
incl %r13d
movl %ecx, %r12d
jmp 0x8c7b
leaq 0x28(%rsp), %rdi
pushq $0x20
popq %rsi
callq 0x6230
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0xab5e
leaq 0x86870(%rip), %rax     # 0x8f5a3
leaq 0x86b4d(%rip), %rdx     # 0x8f887
testb $0x1, %r12b
cmovneq %rax, %rdx
leaq 0x48(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xab3f
leaq 0x48(%rsp), %rdi
callq 0x6548
leaq 0x28(%rsp), %rdi
callq 0x6548
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x8d97
jmp 0x8d9e
jmp 0x8d9e
jmp 0x8d9e
jmp 0x8d9e
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x6548
jmp 0x8da1
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.hpp
// Function: void spirv_cross::CompilerGLSL::statement<char const (&) [11], char const*&, char const (&) [2], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [4]>(char const (&) [11], char const*&, char const (&) [2], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [4])
inline void statement(Ts &&... ts)
	{
		if (force_recompile)
		{
			// Do not bother emitting code while force_recompile is active.
			// We will compile again.
			statement_count++;
			return;
		}

		if (redirect_statement)
			redirect_statement->push_back(join(std::forward<Ts>(ts)...));
		else
		{
			for (uint32_t i = 0; i < indent; i++)
				(*buffer) << "    ";
			statement_inner(std::forward<Ts>(ts)...);
			(*buffer) << '\n';
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpb $0x1, 0x1d0(%rdi)
jne 0x9381
incl 0x750(%r14)
jmp 0x93e6
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq 0x90(%rsp), %r11
movq 0x88(%rsp), %r10
movq 0x80(%rsp), %rax
movq 0x428(%r14), %rbx
testq %rbx, %rbx
je 0x93f5
subq $0x8, %rsp
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
pushq %r11
pushq %r10
pushq %rax
callq 0xcec2
addq $0x20, %rsp
movq %rbx, %rdi
movq %r14, %rsi
callq 0xcc8c
leaq 0x28(%rsp), %rdi
callq 0x6548
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %r8, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq %r9, 0x20(%rsp)
xorl %r15d, %r15d
leaq 0x8646c(%rip), %rbx     # 0x8f883
cmpl 0x638(%r14), %r15d
jae 0x9434
movq 0x420(%r14), %rdi
movq %rbx, %rsi
callq 0x6260
incl %r15d
jmp 0x9417
subq $0x8, %rsp
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq 0x18(%rsp), %r8
movq 0x28(%rsp), %r9
pushq 0x8(%rsp)
pushq 0x18(%rsp)
pushq 0x30(%rsp)
callq 0xcf68
addq $0x20, %rsp
movq 0x420(%r14), %rdi
pushq $0xa
popq %rsi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6310
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.hpp
// Function: void spirv_cross::CompilerGLSL::statement_no_indent<char const (&) [9], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [9], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [9]>(char const (&) [9], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [9], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const (&) [9])
inline void statement_no_indent(Ts &&... ts)
	{
		auto old_indent = indent;
		indent = 0;
		statement(std::forward<Ts>(ts)...);
		indent = old_indent;
	}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x638(%rdi), %ebp
andl $0x0, 0x638(%rdi)
callq 0xc7a2
movl %ebp, 0x638(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::parse_fixup()
void Compiler::parse_fixup()
{
	// Figure out specialization constants for work group sizes.
	for (auto &id : ir.ids)
	{
		if (id.get_type() == TypeConstant)
		{
			auto &c = id.get<SPIRConstant>();
			if (ir.meta[c.self].decoration.builtin && ir.meta[c.self].decoration.builtin_type == BuiltInWorkgroupSize)
			{
				// In current SPIR-V, there can be just one constant like this.
				// All entry points will receive the constant value.
				for (auto &entry : ir.entry_points)
				{
					entry.second.workgroup_size.constant = c.self;
					entry.second.workgroup_size.x = c.scalar(0, 0);
					entry.second.workgroup_size.y = c.scalar(0, 1);
					entry.second.workgroup_size.z = c.scalar(0, 2);
				}
			}
		}
		else if (id.get_type() == TypeVariable)
		{
			auto &var = id.get<SPIRVariable>();
			if (var.storage == StorageClassPrivate || var.storage == StorageClassWorkgroup ||
			    var.storage == StorageClassOutput)
				global_variables.push_back(var.self);
			if (variable_storage_is_aliased(var))
				aliased_variables.push_back(var.self);
		}
	}

	fixup_type_alias();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %r14
movq 0x28(%rdi), %rbp
leaq 0x118(%rdi), %r15
leaq 0x130(%rdi), %r12
leaq 0xe0(%rdi), %rax
movq %rax, (%rsp)
cmpq %rbp, %r14
je 0x102a7
movl 0x8(%r14), %eax
cmpl $0x2, %eax
je 0x10259
cmpl $0x3, %eax
jne 0x1029e
movq %r14, %rdi
callq 0x172b0
movl 0x8(%rax), %ecx
movq 0x38(%rbx), %rdx
imulq $0x148, %rcx, %rsi      # imm = 0x148
cmpb $0x1, 0xcc(%rdx,%rsi)
jne 0x1029e
addq %rsi, %rdx
cmpl $0x19, 0xa0(%rdx)
jne 0x1029e
movq (%rsp), %rdx
movq (%rdx), %rdx
testq %rdx, %rdx
je 0x1029e
movl %ecx, 0xbc(%rdx)
movl 0x10(%rax), %esi
movl %esi, 0xb0(%rdx)
movl 0x18(%rax), %esi
movl %esi, 0xb4(%rdx)
movl 0x20(%rax), %esi
movl %esi, 0xb8(%rdx)
jmp 0x1022e
movq %r14, %rdi
callq 0x9b30
movq %rax, %r13
movl 0x10(%rax), %eax
cmpl $0x6, %eax
ja 0x10280
pushq $0x58
popq %rcx
btl %eax, %ecx
jae 0x10280
leaq 0x8(%r13), %rsi
movq %r15, %rdi
callq 0x6c06
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1030c
testb %al, %al
je 0x1029e
addq $0x8, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x6c06
addq $0x10, %r14
jmp 0x101df
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x117c4
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::variable_storage_is_aliased(spirv_cross::SPIRVariable const&)
bool Compiler::variable_storage_is_aliased(const SPIRVariable &v)
{
	auto &type = get<SPIRType>(v.basetype);
	bool ssbo = v.storage == StorageClassStorageBuffer ||
	            ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock);
	bool image = type.basetype == SPIRType::Image;
	bool counter = type.basetype == SPIRType::AtomicCounter;

	bool is_restrict;
	if (ssbo)
		is_restrict = ir.get_buffer_block_flags(v).get(DecorationRestrict);
	else
		is_restrict = has_decoration(v.self, DecorationRestrict);

	return !is_restrict && (ssbo || image || counter);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rsi), %esi
callq 0x90a4
cmpl $0xc, 0x10(%r14)
jne 0x10340
movl 0xc(%rax), %eax
cmpl $0xd, %eax
sete %bpl
cmpl $0x8, %eax
sete %r12b
jmp 0x1037f
movl 0x8(%rax), %ecx
movl 0xc(%rax), %eax
movq 0x38(%rbx), %rdx
imulq $0x148, %rcx, %rcx      # imm = 0x148
cmpl $0xd, %eax
sete %bpl
cmpl $0x8, %eax
sete %r12b
testb $0x8, 0x60(%rdx,%rcx)
jne 0x1037f
movl 0x8(%r14), %esi
addq $0x8, %rbx
pushq $0x13
popq %rdx
movq %rbx, %rdi
callq 0x1fcfa
movl %eax, %ebx
xorl %ecx, %ecx
jmp 0x103a9
addq $0x8, %rbx
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1fb0a
movl (%r15), %ebx
shrl $0x13, %ebx
andl $0x1, %ebx
leaq 0x8(%rsp), %rdi
callq 0xb51c
movb $0x1, %cl
orb %bpl, %r12b
movl %ebx, %edx
xorb $0x1, %dl
movzbl %r12b, %eax
movzbl %dl, %edx
testb %bl, %bl
cmovnel %edx, %eax
testb %cl, %cl
cmovnel %edx, %eax
andb $0x1, %al
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::function_is_pure(spirv_cross::SPIRFunction const&)
bool Compiler::function_is_pure(const SPIRFunction &func)
{
	for (auto block : func.blocks)
	{
		if (!block_is_pure(get<SPIRBlock>(block)))
		{
			//fprintf(stderr, "Function %s is impure!\n", to_name(func.self).c_str());
			return false;
		}
	}

	//fprintf(stderr, "Function %s is pure!\n", to_name(func.self).c_str());
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x68(%rsi), %rcx
movq 0x70(%rsi), %r14
movq %rcx, %r15
cmpq %r14, %rcx
je 0x104a4
movl (%r15), %esi
movq %rbx, %rdi
callq 0x6bf0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x103dc
leaq 0x4(%r15), %rcx
testb %al, %al
jne 0x1047e
cmpq %r14, %r15
sete %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::to_name[abi:cxx11](unsigned int, bool) const
string Compiler::to_name(uint32_t id, bool allow_alias) const
{
	if (allow_alias && ir.ids.at(id).get_type() == TypeType)
	{
		// If this type is a simple alias, emit the
		// name of the original type instead.
		// We don't want to override the meta alias
		// as that can be overridden by the reflection APIs after parse.
		auto &type = get<SPIRType>(id);
		if (type.type_alias)
		{
			// If the alias master has been specially packed, we will have emitted a clean variant as well,
			// so skip the name aliasing here.
			if (!has_decoration(type.type_alias, DecorationCPacked))
				return to_name(type.type_alias);
		}
	}

	if (ir.meta[id].decoration.alias.empty())
		return join("_", id);
	else
		return ir.meta[id].decoration.alias;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, 0xc(%rsp)
testl %ecx, %ecx
je 0x10535
leaq 0x20(%r14), %rdi
movl %ebp, %r15d
movq %r15, %rsi
callq 0x6e6e
cmpl $0x1, 0x8(%rax)
jne 0x10538
movq %r14, %rdi
movl %ebp, %esi
callq 0x16fc8
movl 0x98(%rax), %esi
testl %esi, %esi
je 0x10538
movq %rax, %r12
leaq 0x8(%r14), %rdi
pushq $0xa
popq %rdx
callq 0x1fcfa
testb %al, %al
jne 0x10538
movl 0x98(%r12), %edx
movq (%r14), %rax
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x38(%rax)
jmp 0x1056c
movl %ebp, %r15d
movq 0x38(%r14), %rsi
imulq $0x148, %r15, %rax      # imm = 0x148
cmpq $0x0, 0x8(%rsi,%rax)
je 0x10558
addq %rax, %rsi
movq %rbx, %rdi
callq 0x63c0
jmp 0x1056c
leaq 0x889e8(%rip), %rsi     # 0x98f47
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0xc419
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::register_global_read_dependencies(spirv_cross::SPIRBlock const&, unsigned int)
void Compiler::register_global_read_dependencies(const SPIRBlock &block, uint32_t id)
{
	for (auto &i : block.ops)
	{
		auto ops = stream(i);
		auto op = static_cast<Op>(i.op);

		switch (op)
		{
		case OpFunctionCall:
		{
			uint32_t func = ops[2];
			register_global_read_dependencies(get<SPIRFunction>(func), id);
			break;
		}

		case OpLoad:
		case OpImageRead:
		{
			// If we're in a storage class which does not get invalidated, adding dependencies here is no big deal.
			auto *var = maybe_get_backing_variable(ops[2]);
			if (var && var->storage != StorageClassFunction)
			{
				auto &type = get<SPIRType>(var->basetype);

				// InputTargets are immutable.
				if (type.basetype != SPIRType::Image && type.image.dim != DimSubpassData)
					var->dependees.push_back(id);
			}
			break;
		}

		default:
			break;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movl %edx, (%r14)
movq 0x38(%rsi), %r15
movq 0x40(%rsi), %r13
cmpq %r13, %r15
je 0x1062c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16f1e
movzwl (%r15), %ecx
cmpl $0x62, %ecx
je 0x105df
cmpl $0x3d, %ecx
je 0x105df
cmpl $0x39, %ecx
jne 0x10623
movl 0x8(%rax), %esi
movq %rbx, %rdi
callq 0xa048
movl 0xc(%rsp), %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1063a
jmp 0x10623
movl 0x8(%rax), %esi
movq %rbx, %rdi
callq 0x1067e
testq %rax, %rax
je 0x10623
movq %rax, %r12
cmpl $0x7, 0x10(%rax)
je 0x10623
movl 0xc(%r12), %esi
movq %rbx, %rdi
callq 0x90a4
cmpl $0xd, 0xc(%rax)
je 0x10623
cmpl $0x6, 0x84(%rax)
je 0x10623
addq $0x40, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x6c06
addq $0xc, %r15
jmp 0x1059c
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::maybe_get_backing_variable(unsigned int)
SPIRVariable *Compiler::maybe_get_backing_variable(uint32_t chain)
{
	auto *var = maybe_get<SPIRVariable>(chain);
	if (!var)
	{
		auto *cexpr = maybe_get<SPIRExpression>(chain);
		if (cexpr)
			var = maybe_get<SPIRVariable>(cexpr->loaded_from);

		auto *access_chain = maybe_get<SPIRAccessChain>(chain);
		if (access_chain)
			var = maybe_get<SPIRVariable>(access_chain->loaded_from);
	}

	return var;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0xa9e4
movq %rax, %r14
testq %rax, %rax
je 0x1069c
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movl %ebp, %esi
callq 0x16fde
testq %rax, %rax
je 0x106bb
movl 0x34(%rax), %esi
movq %rbx, %rdi
callq 0xa9e4
movq %rax, %r14
jmp 0x106be
xorl %r14d, %r14d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x17014
testq %rax, %rax
je 0x10694
movl 0x5c(%rax), %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xa9e4
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::register_read(unsigned int, unsigned int, bool)
void Compiler::register_read(uint32_t expr, uint32_t chain, bool forwarded)
{
	auto &e = get<SPIRExpression>(expr);
	auto *var = maybe_get_backing_variable(chain);

	if (var)
	{
		e.loaded_from = var->self;

		// If the backing variable is immutable, we do not need to depend on the variable.
		if (forwarded && !is_immutable(var->self))
			var->dependees.push_back(e.self);

		// If we load from a parameter, make sure we create "inout" if we also write to the parameter.
		// The default is "in" however, so we never invalidate our compilation by reading.
		if (var && var->parameter)
			var->parameter->read_count++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %r15
callq 0x1704a
movq %rax, %rbx
movq %r15, %rdi
movl %r14d, %esi
callq 0x1067e
testq %rax, %rax
je 0x1073c
movq %rax, %r14
movl 0x8(%rax), %esi
movl %esi, 0x34(%rbx)
testb %bpl, %bpl
je 0x10730
movq %r15, %rdi
callq 0x10748
testb %al, %al
jne 0x10730
movq %r14, %rdi
addq $0x40, %rdi
addq $0x8, %rbx
movq %rbx, %rsi
callq 0x6c06
movq 0x68(%r14), %rax
testq %rax, %rax
je 0x1073c
incl 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::is_immutable(unsigned int) const
bool Compiler::is_immutable(uint32_t id) const
{
	if (ir.ids[id].get_type() == TypeVariable)
	{
		auto &var = get<SPIRVariable>(id);

		// Anything we load from the UniformConstant address space is guaranteed to be immutable.
		bool pointer_to_const = var.storage == StorageClassUniformConstant;
		return pointer_to_const || var.phi_variable || !expression_is_lvalue(id);
	}
	else if (ir.ids[id].get_type() == TypeAccessChain)
		return get<SPIRAccessChain>(id).immutable;
	else if (ir.ids[id].get_type() == TypeExpression)
		return get<SPIRExpression>(id).immutable;
	else if (ir.ids[id].get_type() == TypeConstant || ir.ids[id].get_type() == TypeConstantOp ||
	         ir.ids[id].get_type() == TypeUndef)
		return true;
	else
		return false;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %eax
movq 0x20(%rdi), %rcx
shlq $0x4, %rax
movl 0x8(%rcx,%rax), %eax
addl $-0x2, %eax
cmpl $0xb, %eax
ja 0x107b2
movl %esi, %ebx
movq %rdi, %r14
movb $0x1, %bpl
leaq 0x7f117(%rip), %rcx     # 0x8f888
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
movl %ebx, %esi
callq 0x17060
cmpl $0x0, 0x10(%rax)
je 0x107c4
cmpb $0x0, 0x5a(%rax)
jne 0x107c4
movq %r14, %rdi
movl %ebx, %esi
callq 0x10b42
movl %eax, %ebp
xorb $0x1, %bpl
jmp 0x107c4
movq %r14, %rdi
movl %ebx, %esi
callq 0x170e4
movb 0x65(%rax), %bpl
jmp 0x107c4
xorl %ebp, %ebp
jmp 0x107c4
movq %r14, %rdi
movl %ebx, %esi
callq 0x17076
movb 0x38(%rax), %bpl
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::register_write(unsigned int)
void Compiler::register_write(uint32_t chain)
{
	auto *var = maybe_get<SPIRVariable>(chain);
	if (!var)
	{
		// If we're storing through an access chain, invalidate the backing variable instead.
		auto *expr = maybe_get<SPIRExpression>(chain);
		if (expr && expr->loaded_from)
			var = maybe_get<SPIRVariable>(expr->loaded_from);

		auto *access_chain = maybe_get<SPIRAccessChain>(chain);
		if (access_chain && access_chain->loaded_from)
			var = maybe_get<SPIRVariable>(access_chain->loaded_from);
	}

	if (var)
	{
		// If our variable is in a storage class which can alias with other buffers,
		// invalidate all variables which depend on aliased variables.
		if (variable_storage_is_aliased(*var))
			flush_all_aliased_variables();
		else if (var)
			flush_dependees(*var);

		// We tried to write to a parameter which is not marked with out qualifier, force a recompile.
		if (var->parameter && var->parameter->write_count == 0)
		{
			var->parameter->write_count++;
			force_recompile = true;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0xa9e4
movq %rax, %r14
testq %rax, %rax
jne 0x1082e
movq %rbx, %rdi
movl %ebp, %esi
callq 0x16fde
testq %rax, %rax
je 0x10805
movl 0x34(%rax), %esi
testl %esi, %esi
je 0x10805
movq %rbx, %rdi
callq 0xa9e4
movq %rax, %r14
jmp 0x10808
xorl %r14d, %r14d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x17014
testq %rax, %rax
je 0x10829
movl 0x5c(%rax), %esi
testl %esi, %esi
je 0x10829
movq %rbx, %rdi
callq 0xa9e4
movq %rax, %r14
testq %r14, %r14
je 0x1086c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1030c
movq %rbx, %rdi
testb %al, %al
je 0x10847
callq 0x10872
jmp 0x1084f
movq %r14, %rsi
callq 0x108b0
movq 0x68(%r14), %rax
testq %rax, %rax
je 0x1086c
cmpl $0x0, 0xc(%rax)
jne 0x1086c
movl $0x1, 0xc(%rax)
movb $0x1, 0x1d0(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::flush_control_dependent_expressions(unsigned int)
void Compiler::flush_control_dependent_expressions(uint32_t block_id)
{
	auto &block = get<SPIRBlock>(block_id);
	for (auto &expr : block.invalidate_expressions)
		invalid_expressions.insert(expr);
	block.invalidate_expressions.clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x6bf0
movq %rax, %rbx
movq 0xe8(%rax), %r15
movq 0xf0(%rax), %r12
addq $0x198, %r14            # imm = 0x198
cmpq %r12, %r15
je 0x10994
movq %r14, %rdi
movq %r15, %rsi
callq 0x1af30
addq $0x4, %r15
jmp 0x1097e
movq 0xe8(%rbx), %rax
cmpq %rax, 0xf0(%rbx)
je 0x109ab
movq %rax, 0xf0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::flush_all_active_variables()
void Compiler::flush_all_active_variables()
{
	// Invalidate all temporaries we read from variables in this block since they were forwarded.
	// Invalidate all temporaries we read from globals.
	for (auto &v : current_function->local_variables)
		flush_dependees(get<SPIRVariable>(v));
	for (auto &arg : current_function->arguments)
		flush_dependees(get<SPIRVariable>(arg.id));
	for (auto global : global_variables)
		flush_dependees(get<SPIRVariable>(global));

	flush_all_aliased_variables();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x148(%rdi), %rax
movq 0x48(%rax), %r14
movq 0x50(%rax), %r15
cmpq %r15, %r14
je 0x109f0
movl (%r14), %esi
movq %rbx, %rdi
callq 0x9c0e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x108b0
addq $0x4, %r14
jmp 0x109cf
movq 0x148(%rbx), %rax
movq 0x18(%rax), %r14
movq 0x20(%rax), %r15
cmpq %r15, %r14
je 0x10a21
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0x9c0e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x108b0
addq $0x14, %r14
jmp 0x109ff
movq 0x118(%rbx), %r14
movq 0x120(%rbx), %r15
cmpq %r15, %r14
je 0x10a50
movl (%r14), %esi
movq %rbx, %rdi
callq 0x9c0e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x108b0
addq $0x4, %r14
jmp 0x10a2f
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x10872
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::expression_type_id(unsigned int) const
uint32_t Compiler::expression_type_id(uint32_t id) const
{
	switch (ir.ids[id].get_type())
	{
	case TypeVariable:
		return get<SPIRVariable>(id).basetype;

	case TypeExpression:
		return get<SPIRExpression>(id).expression_type;

	case TypeConstant:
		return get<SPIRConstant>(id).constant_type;

	case TypeConstantOp:
		return get<SPIRConstantOp>(id).basetype;

	case TypeUndef:
		return get<SPIRUndef>(id).basetype;

	case TypeCombinedImageSampler:
		return get<SPIRCombinedImageSampler>(id).combined_type;

	case TypeAccessChain:
		return get<SPIRAccessChain>(id).basetype;

	default:
		SPIRV_CROSS_THROW("Cannot resolve expression type.");
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %eax
movq 0x20(%rdi), %rcx
shlq $0x4, %rax
movl 0x8(%rcx,%rax), %eax
addl $-0x2, %eax
cmpl $0xb, %eax
ja 0x10ad2
leaq 0x7ee35(%rip), %rcx     # 0x8f8b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x17060
jmp 0x10ac3
callq 0x170ce
jmp 0x10ac3
callq 0x1708c
jmp 0x10ac3
callq 0x170e4
jmp 0x10ac3
callq 0x17076
addq $0x30, %rax
jmp 0x10ac7
callq 0x170a2
addq $0x28, %rax
jmp 0x10ac7
callq 0x170b8
addq $0xc, %rax
movl (%rax), %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x7f10c(%rip), %rsi     # 0x8fbf0
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xd62b4(%rip), %rsi     # 0xe6dc0
movq 0xd74cd(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x10b32
jmp 0x10b3a
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::is_hidden_variable(spirv_cross::SPIRVariable const&, bool) const
bool Compiler::is_hidden_variable(const SPIRVariable &var, bool include_builtins) const
{
	if ((is_builtin_variable(var) && !include_builtins) || var.remapped_variable)
		return true;

	// Combined image samplers are always considered active as they are "magic" variables.
	if (find_if(begin(combined_image_samplers), end(combined_image_samplers), [&var](const CombinedImageSampler &samp) {
		    return samp.combined_id == var.self;
	    }) != end(combined_image_samplers))
	{
		return false;
	}

	bool hidden = false;
	if (check_active_interface_variables && storage_class_is_interface(var.storage))
		hidden = active_interface_variables.find(var.self) == end(active_interface_variables);
	return hidden;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x10c60
movl %eax, %ecx
xorb $0x1, %cl
orb %bpl, %cl
movb $0x1, %al
cmpb $0x1, %cl
jne 0x10c5b
cmpb $0x0, 0x5b(%r14)
jne 0x10c5b
movq 0x1d8(%rbx), %rdi
movq 0x1e0(%rbx), %r8
movq %r8, %rcx
subq %rdi, %rcx
pushq $0xc
popq %r10
movq %rcx, %rax
cqto
idivq %r10
sarq $0x2, %rax
leaq 0x8(%r14), %rsi
movl 0x8(%r14), %r9d
testq %rax, %rax
jle 0x10bda
cmpl %r9d, (%rdi)
je 0x10c1f
cmpl %r9d, 0xc(%rdi)
je 0x10c0f
cmpl %r9d, 0x18(%rdi)
je 0x10c15
cmpl %r9d, 0x24(%rdi)
je 0x10c1b
addq $0x30, %rdi
decq %rax
addq $-0x30, %rcx
jmp 0x10bb1
movq %rcx, %rax
cqto
idivq %r10
cmpq $0x1, %rax
je 0x10c06
cmpq $0x2, %rax
je 0x10bfd
cmpq $0x3, %rax
jne 0x10c24
cmpl %r9d, (%rdi)
je 0x10c1f
addq $0xc, %rdi
cmpl %r9d, (%rdi)
je 0x10c1f
addq $0xc, %rdi
cmpl %r9d, (%rdi)
cmovneq %r8, %rdi
jmp 0x10c1f
addq $0xc, %rdi
jmp 0x10c1f
addq $0x18, %rdi
jmp 0x10c1f
addq $0x24, %rdi
cmpq %r8, %rdi
jne 0x10c59
cmpb $0x1, 0x190(%rbx)
jne 0x10c59
movl 0x10(%r14), %ecx
xorl %eax, %eax
cmpl $0xc, %ecx
ja 0x10c5b
movl $0x160f, %edx           # imm = 0x160F
btl %ecx, %edx
jae 0x10c5b
addq $0x158, %rbx            # imm = 0x158
movq %rbx, %rdi
callq 0x1aefe
testq %rax, %rax
sete %al
jmp 0x10c5b
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::is_builtin_variable(spirv_cross::SPIRVariable const&) const
bool Compiler::is_builtin_variable(const SPIRVariable &var) const
{
	if (var.compat_builtin || ir.meta[var.self].decoration.builtin)
		return true;
	else
		return is_builtin_type(get<SPIRType>(var.basetype));
}

// Assembly:
pushq %rbx
cmpb $0x0, 0x38(%rsi)
jne 0x10c82
movq %rdi, %rbx
movl 0x8(%rsi), %eax
movq 0x38(%rdi), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
cmpb $0x0, 0xcc(%rcx,%rax)
je 0x10c86
movb $0x1, %al
popq %rbx
retq
movl 0xc(%rsi), %esi
movq %rbx, %rdi
callq 0x16fc8
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x10c9e
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::is_builtin_type(spirv_cross::SPIRType const&) const
bool Compiler::is_builtin_type(const SPIRType &type) const
{
	// We can have builtin structs as well. If one member of a struct is builtin, the struct must also be builtin.
	for (auto &m : ir.meta[type.self].members)
		if (m.builtin)
			return true;

	return false;
}

// Assembly:
movl 0x8(%rsi), %eax
movq 0x38(%rdi), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
movq 0xd0(%rcx,%rax), %rdx
movq 0xd8(%rcx,%rax), %rax
movq %rdx, %rcx
cmpq %rax, %rdx
je 0x10cd4
leaq 0xd0(%rcx), %rdx
cmpb $0x1, 0xcc(%rcx)
jne 0x10cbc
cmpq %rax, %rcx
setne %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::is_member_builtin(spirv_cross::SPIRType const&, unsigned int, spv::BuiltIn*) const
bool Compiler::is_member_builtin(const SPIRType &type, uint32_t index, BuiltIn *builtin) const
{
	auto &memb = ir.meta[type.self].members;
	if (index < memb.size() && memb[index].builtin)
	{
		if (builtin)
			*builtin = memb[index].builtin_type;
		return true;
	}

	return false;
}

// Assembly:
movl 0x8(%rsi), %eax
movq 0x38(%rdi), %r8
imulq $0x148, %rax, %rax      # imm = 0x148
movl %edx, %edi
movq 0xd0(%r8,%rax), %rsi
movq 0xd8(%r8,%rax), %rax
subq %rsi, %rax
movl $0xd0, %r8d
cqto
idivq %r8
cmpq %rdi, %rax
jbe 0x10d33
imulq $0xd0, %rdi, %rdx
cmpb $0x1, 0xcc(%rsi,%rdx)
jne 0x10d33
movb $0x1, %al
testq %rcx, %rcx
je 0x10d32
addq %rdx, %rsi
movl 0xa0(%rsi), %edx
movl %edx, (%rcx)
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_active_interface_variables() const
unordered_set<uint32_t> Compiler::get_active_interface_variables() const
{
	// Traverse the call graph and find all interface variables which are in use.
	unordered_set<uint32_t> variables;
	InterfaceVariableAccessHandler handler(*this, variables);
	traverse_all_reachable_opcodes(get<SPIRFunction>(ir.default_entry_point), handler);

	// If we needed to create one, we'll need it.
	if (dummy_sampler_id)
		variables.insert(dummy_sampler_id);

	return variables;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30(%rdi), %rax
movq %rax, (%rdi)
movq $0x1, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movl $0x3f800000, 0x20(%rdi) # imm = 0x3F800000
movups %xmm0, 0x28(%rdi)
leaq 0xd5c35(%rip), %rax     # 0xe7148
addq $0x10, %rax
movq %rax, (%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movl 0x108(%rsi), %esi
movq %r14, %rdi
callq 0x17146
movq %rsp, %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1157c
cmpl $0x0, 0x39c(%r14)
je 0x1155d
addq $0x39c, %r14            # imm = 0x39C
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1af30
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xb51c
movq %r14, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::traverse_all_reachable_opcodes(spirv_cross::SPIRFunction const&, spirv_cross::Compiler::OpcodeHandler&) const
bool Compiler::traverse_all_reachable_opcodes(const SPIRFunction &func, OpcodeHandler &handler) const
{
	for (auto block : func.blocks)
		if (!traverse_all_reachable_opcodes(get<SPIRBlock>(block), handler))
			return false;

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0x68(%rsi), %rcx
movq 0x70(%rsi), %r15
movq %rcx, %r12
cmpq %r15, %rcx
je 0x115bd
movl (%r12), %esi
movq %r14, %rdi
callq 0x6c24
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x1259c
leaq 0x4(%r12), %rcx
testb %al, %al
jne 0x11592
cmpq %r15, %r12
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::interface_variable_exists_in_entry_point(unsigned int) const
bool Compiler::interface_variable_exists_in_entry_point(uint32_t id) const
{
	auto &var = get<SPIRVariable>(id);
	if (var.storage != StorageClassInput && var.storage != StorageClassOutput &&
	    var.storage != StorageClassUniformConstant)
		SPIRV_CROSS_THROW("Only Input, Output variables and Uniform constants are part of a shader linking interface.");

	// This is to avoid potential problems with very old glslang versions which did
	// not emit input/output interfaces properly.
	// We can assume they only had a single entry point, and single entry point
	// shaders could easily be assumed to use every interface variable anyways.
	if (ir.entry_points.size() <= 1)
		return true;

	auto &execution = get_entry_point();
	return find(begin(execution.interface_variables), end(execution.interface_variables), id) !=
	       end(execution.interface_variables);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
callq 0x17060
movl 0x10(%rax), %eax
cmpl $0x3, %eax
ja 0x11644
cmpl $0x2, %eax
je 0x11644
movb $0x1, %al
cmpq $0x2, 0xe8(%rbx)
jb 0x1163b
movq %rbx, %rdi
callq 0x12f12
movq %rax, %rbx
movq 0x48(%rax), %rdi
movq 0x50(%rax), %rsi
leaq 0xc(%rsp), %rdx
callq 0x1d387
cmpq 0x50(%rbx), %rax
setne %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x7e86f(%rip), %rsi     # 0x8fec5
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xd5742(%rip), %rsi     # 0xe6dc0
movq 0xd695b(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x116a4
jmp 0x116ac
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_remapped_declared_block_name[abi:cxx11](unsigned int) const
std::string Compiler::get_remapped_declared_block_name(uint32_t id) const
{
	auto itr = declared_block_names.find(id);
	if (itr != end(declared_block_names))
		return itr->second;
	else
	{
		auto &var = get<SPIRVariable>(id);
		auto &type = get<SPIRType>(var.basetype);
		auto &block_name = ir.meta[type.self].decoration.alias;
		return block_name.empty() ? get_block_fallback_name(id) : block_name;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
movl %edx, (%rsi)
leaq 0x3d8(%r14), %rdi
callq 0x1f40e
testq %rax, %rax
je 0x116e2
addq $0x10, %rax
movq %rbx, %rdi
movq %rax, %rsi
jmp 0x11715
movl 0x4(%rsp), %esi
movq %r14, %rdi
callq 0x17060
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0x16fc8
movl 0x8(%rax), %eax
movq 0x38(%r14), %rsi
imulq $0x148, %rax, %rax      # imm = 0x148
cmpq $0x0, 0x8(%rsi,%rax)
je 0x11725
addq %rax, %rsi
movq %rbx, %rdi
callq 0x63c0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x4(%rsp), %edx
movq (%r14), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x20(%rax)
jmp 0x1171a
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::type_is_block_like(spirv_cross::SPIRType const&) const
bool Compiler::type_is_block_like(const SPIRType &type) const
{
	if (type.basetype != SPIRType::Struct)
		return false;

	if (has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock))
	{
		return true;
	}

	// Block-like types may have Offset decorations.
	for (uint32_t i = 0; i < uint32_t(type.member_types.size()); i++)
		if (has_member_decoration(type.self, i, DecorationOffset))
			return true;

	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $0xc, 0xc(%rsi)
jne 0x117ad
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rsi), %esi
addq $0x8, %r14
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x1fcfa
movb $0x1, %bpl
testb %al, %al
jne 0x117af
movl 0x8(%rbx), %esi
pushq $0x3
popq %rdx
movq %r14, %rdi
callq 0x1fcfa
testb %al, %al
jne 0x117af
xorl %r15d, %r15d
pushq $0x23
popq %r12
movq 0x70(%rbx), %rax
subq 0x68(%rbx), %rax
shrq $0x2, %rax
cmpl %eax, %r15d
setb %bpl
jae 0x117af
movl 0x8(%rbx), %esi
movq %r14, %rdi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x1ffac
incl %r15d
testb %al, %al
je 0x1177e
jmp 0x117af
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::fixup_type_alias()
void Compiler::fixup_type_alias()
{
	// Due to how some backends work, the "master" type of type_alias must be a block-like type if it exists.
	// FIXME: Multiple alias types which are both block-like will be awkward, for now, it's best to just drop the type
	// alias if the slave type is a block type.
	for (auto &id : ir.ids)
	{
		if (id.get_type() != TypeType)
			continue;

		auto &type = id.get<SPIRType>();

		if (type.type_alias && type_is_block_like(type))
		{
			// Become the master.
			for (auto &other_id : ir.ids)
			{
				if (other_id.get_type() != TypeType)
					continue;
				if (other_id.get_id() == type.self)
					continue;

				auto &other_type = other_id.get<SPIRType>();
				if (other_type.type_alias == type.type_alias)
					other_type.type_alias = type.self;
			}

			get<SPIRType>(type.type_alias).type_alias = id.get_id();
			type.type_alias = 0;
		}
	}

	for (auto &id : ir.ids)
	{
		if (id.get_type() != TypeType)
			continue;

		auto &type = id.get<SPIRType>();
		if (type.type_alias && type_is_block_like(type))
		{
			// This is not allowed, drop the type_alias.
			type.type_alias = 0;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %r14
movq 0x28(%rdi), %r13
cmpq %r13, %r14
je 0x1189c
cmpl $0x1, 0x8(%r14)
jne 0x11893
movq %r14, %rdi
callq 0x998c
cmpl $0x0, 0x98(%rax)
je 0x11893
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11738
testb %al, %al
je 0x11893
movq 0x20(%rbx), %r12
movq 0x28(%rbx), %rbp
cmpq %rbp, %r12
je 0x11867
cmpl $0x1, 0x8(%r12)
jne 0x11861
movq (%r12), %rax
testq %rax, %rax
je 0x11838
movl 0x8(%rax), %eax
jmp 0x1183a
xorl %eax, %eax
cmpl 0x8(%r15), %eax
je 0x11861
movq %r12, %rdi
callq 0x998c
movl 0x98(%rax), %ecx
cmpl 0x98(%r15), %ecx
jne 0x11861
movl 0x8(%r15), %ecx
movl %ecx, 0x98(%rax)
addq $0x10, %r12
jmp 0x1181d
movq (%r14), %rax
testq %rax, %rax
je 0x11874
movl 0x8(%rax), %ebp
jmp 0x11876
xorl %ebp, %ebp
movl 0x98(%r15), %esi
movq %rbx, %rdi
callq 0x90a4
movl %ebp, 0x98(%rax)
andl $0x0, 0x98(%r15)
addq $0x10, %r14
jmp 0x117da
movq 0x20(%rbx), %r14
movq 0x28(%rbx), %r12
cmpq %r12, %r14
je 0x118e1
cmpl $0x1, 0x8(%r14)
jne 0x118db
movq %r14, %rdi
callq 0x998c
cmpl $0x0, 0x98(%rax)
je 0x118db
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11738
testb %al, %al
je 0x118db
andl $0x0, 0x98(%r15)
addq $0x10, %r14
jmp 0x118a4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_non_pointer_type(spirv_cross::SPIRType const&) const
const SPIRType &Compiler::get_non_pointer_type(const SPIRType &type) const
{
	auto *p_type = &type;
	while (p_type->pointer)
	{
		assert(p_type->parent_type);
		p_type = &get<SPIRType>(p_type->parent_type);
	}
	return *p_type;
}

// Assembly:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
cmpb $0x1, 0x60(%rax)
jne 0x11e6b
movl 0x9c(%rax), %esi
testl %esi, %esi
je 0x11e6d
movq %rbx, %rdi
callq 0x16fc8
jmp 0x11e51
popq %rbx
retq
leaq 0x7de51(%rip), %rdi     # 0x8fcc5
leaq 0x7de5e(%rip), %rsi     # 0x8fcd9
leaq 0x7debb(%rip), %rcx     # 0x8fd3d
movl $0x3cf, %edx            # imm = 0x3CF
callq 0x61c0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_member_qualified_name[abi:cxx11](unsigned int, unsigned int) const
const std::string &Compiler::get_member_qualified_name(uint32_t type_id, uint32_t index) const
{
	const static string empty;

	auto &m = ir.meta.at(type_id);
	if (index < m.members.size())
		return m.members[index].qualified_alias;
	else
		return empty;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movb 0xd6561(%rip), %al      # 0xe84f0
testb %al, %al
je 0x11fdd
addq $0x38, %r14
movl %ebp, %esi
movq %r14, %rdi
callq 0x17518
movl %ebx, %ecx
movq 0xd0(%rax), %rsi
movq 0xd8(%rax), %rax
subq %rsi, %rax
movl $0xd0, %edi
cqto
idivq %rdi
imulq $0xd0, %rcx, %rdx
cmpq %rcx, %rax
leaq 0x20(%rsi,%rdx), %rcx
leaq 0xd64fc(%rip), %rax     # 0xe84d0
cmovaq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xd650c(%rip), %rdi     # 0xe84f0
callq 0x64c0
testl %eax, %eax
je 0x11f93
leaq 0xd64ec(%rip), %rax     # 0xe84e0
movq %rax, 0xd64d5(%rip)     # 0xe84d0
leaq 0xd64ce(%rip), %rsi     # 0xe84d0
andq $0x0, 0xd64ce(%rip)     # 0xe84d8
movb $0x0, 0xd64cf(%rip)     # 0xe84e0
movq 0xd5fc0(%rip), %rdi     # 0xe7fd8
leaq 0xd6281(%rip), %rdx     # 0xe82a0
callq 0x6240
leaq 0xd64c5(%rip), %rdi     # 0xe84f0
callq 0x61b0
jmp 0x11f93
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_block_fallback_name[abi:cxx11](unsigned int) const
const std::string Compiler::get_block_fallback_name(uint32_t id) const
{
	auto &var = get<SPIRVariable>(id);
	if (get_name(id).empty())
		return join("_", get<SPIRType>(var.basetype).self, "_", id);
	else
		return get_name(id);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, 0x4(%rsp)
movq %rsi, %rdi
movl %edx, %esi
callq 0x17060
movq %rax, %r15
leaq 0x38(%r14), %r12
movl %ebp, %r13d
movq %r12, %rdi
movq %r13, %rsi
callq 0x17518
cmpq $0x0, 0x8(%rax)
je 0x1210d
movq %r12, %rdi
movq %r13, %rsi
callq 0x17518
movq %rbx, %rdi
movq %rax, %rsi
callq 0x63c0
jmp 0x12134
movl 0xc(%r15), %esi
movq %r14, %rdi
callq 0x16fc8
leaq 0x8(%rax), %rdx
leaq 0x86e23(%rip), %rcx     # 0x98f47
leaq 0x4(%rsp), %r8
movq %rbx, %rdi
movq %rcx, %rsi
callq 0x17539
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_binary_offset_for_decoration(unsigned int, spv::Decoration, unsigned int&) const
bool Compiler::get_binary_offset_for_decoration(uint32_t id, spv::Decoration decoration, uint32_t &word_offset) const
{
	auto &word_offsets = ir.meta.at(id).decoration_word_offset;
	auto itr = word_offsets.find(decoration);
	if (itr == end(word_offsets))
		return false;

	word_offset = itr->second;
	return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
addq $0x38, %rdi
movl %esi, %esi
callq 0x17518
leaq 0xe8(%rax), %rdi
leaq 0x4(%rsp), %rsi
movl %ebp, (%rsi)
callq 0x1c648
testq %rax, %rax
je 0x121b8
movl 0xc(%rax), %ecx
movl %ecx, (%rbx)
testq %rax, %rax
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::block_is_outside_flow_control_from_block(spirv_cross::SPIRBlock const&, spirv_cross::SPIRBlock const&)
bool Compiler::block_is_outside_flow_control_from_block(const SPIRBlock &from, const SPIRBlock &to)
{
	auto *start = &from;

	if (start->self == to.self)
		return true;

	// Break cycles.
	if (is_continue(start->self))
		return false;

	// If our select block doesn't merge, we must break or continue in these blocks,
	// so if continues occur branchless within these blocks, consider them branchless as well.
	// This is typically used for loop control.
	if (start->terminator == SPIRBlock::Select && start->merge == SPIRBlock::MergeNone &&
	    (block_is_outside_flow_control_from_block(get<SPIRBlock>(start->true_block), to) ||
	     block_is_outside_flow_control_from_block(get<SPIRBlock>(start->false_block), to)))
	{
		return true;
	}
	else if (start->merge_block && block_is_outside_flow_control_from_block(get<SPIRBlock>(start->merge_block), to))
	{
		return true;
	}
	else if (start->next_block && block_is_outside_flow_control_from_block(get<SPIRBlock>(start->next_block), to))
	{
		return true;
	}
	else
		return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x8(%rsi), %eax
movb $0x1, %bl
cmpl 0x8(%rdx), %eax
je 0x12462
movq %rdi, %r15
movq 0x80(%rdi), %rcx
testb $0x2, (%rcx,%rax)
jne 0x12460
movq %rdx, %r14
movq %rsi, %r12
cmpl $0x2, 0xc(%rsi)
jne 0x1241a
cmpl $0x0, 0x10(%r12)
jne 0x1241a
movl 0x2c(%r12), %esi
movq %r15, %rdi
callq 0x6bf0
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x1239e
testb %al, %al
jne 0x12462
movl 0x30(%r12), %esi
movq %r15, %rdi
callq 0x6bf0
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x1239e
testb %al, %al
jne 0x12462
movl 0x1c(%r12), %esi
testl %esi, %esi
je 0x1243d
movq %r15, %rdi
callq 0x6bf0
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x1239e
testb %al, %al
jne 0x12462
movl 0x18(%r12), %esi
testl %esi, %esi
je 0x12460
movq %r15, %rdi
callq 0x6bf0
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x1239e
testb %al, %al
jne 0x12462
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::execution_is_noop(spirv_cross::SPIRBlock const&, spirv_cross::SPIRBlock const&) const
bool Compiler::execution_is_noop(const SPIRBlock &from, const SPIRBlock &to) const
{
	if (!execution_is_branchless(from, to))
		return false;

	auto *start = &from;
	for (;;)
	{
		if (start->self == to.self)
			return true;

		if (!start->ops.empty())
			return false;

		auto &next = get<SPIRBlock>(start->next_block);
		// Flushing phi variables does not count as noop.
		for (auto &phi : next.phi_variables)
			if (phi.parent == start->self)
				return false;

		start = &next;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x124d2
testb %al, %al
je 0x124ca
movl 0x8(%r15), %eax
cmpl 0x8(%rbx), %eax
sete %al
je 0x124cc
movq 0x38(%r15), %rcx
cmpq 0x40(%r15), %rcx
jne 0x124cc
movl 0x18(%r15), %esi
movq %r14, %rdi
callq 0x6c24
movq 0x50(%rax), %rcx
movq 0x58(%rax), %rdx
cmpq %rdx, %rcx
je 0x124c5
movl 0x4(%rcx), %esi
addq $0xc, %rcx
cmpl 0x8(%r15), %esi
jne 0x124b1
jmp 0x124ca
movq %rax, %r15
jmp 0x12487
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::execution_is_branchless(spirv_cross::SPIRBlock const&, spirv_cross::SPIRBlock const&) const
bool Compiler::execution_is_branchless(const SPIRBlock &from, const SPIRBlock &to) const
{
	auto *start = &from;
	for (;;)
	{
		if (start->self == to.self)
			return true;

		if (start->terminator == SPIRBlock::Direct && start->merge == SPIRBlock::MergeNone)
			start = &get<SPIRBlock>(start->next_block);
		else
			return false;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %rax
movq %rdi, %r14
movl 0x8(%rax), %ecx
movl 0x8(%rbx), %edx
cmpl %edx, %ecx
je 0x12502
cmpl $0x1, 0xc(%rax)
jne 0x12502
cmpl $0x0, 0x10(%rax)
jne 0x12502
movl 0x18(%rax), %esi
movq %r14, %rdi
callq 0x6c24
jmp 0x124df
cmpl %edx, %ecx
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop