LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross_parsed_ir.cpp
// Function: spirv_cross::ParsedIR::get_member_decoration(unsigned int, unsigned int, spv::Decoration) const
uint32_t ParsedIR::get_member_decoration(uint32_t id, uint32_t index, Decoration decoration) const
{
	auto &m = meta[id];
	if (index >= m.members.size())
		return 0;

	auto &dec = m.members[index];
	if (!dec.decoration_flags.get(decoration))
		return 0;

	switch (decoration)
	{
	case DecorationBuiltIn:
		return dec.builtin_type;
	case DecorationLocation:
		return dec.location;
	case DecorationComponent:
		return dec.component;
	case DecorationBinding:
		return dec.binding;
	case DecorationOffset:
		return dec.offset;
	case DecorationSpecId:
		return dec.spec_id;
	case DecorationIndex:
		return dec.index;
	default:
		return 1;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %esi, %eax
movq 0x30(%rdi), %rsi
movl %edx, %ecx
imulq $0x148, %rax, %rax      # imm = 0x148
movq 0xd0(%rsi,%rax), %r15
movq 0xd8(%rsi,%rax), %rax
subq %r15, %rax
movl $0xd0, %esi
cqto
idivq %rsi
xorl %ebx, %ebx
cmpq %rcx, %rax
jbe 0x20085
imulq $0xd0, %rcx, %r12
leaq (%r15,%r12), %rdi
addq $0x60, %rdi
movl %r14d, %esi
callq 0x16ef0
testb %al, %al
je 0x20085
addq %r12, %r15
pushq $0x1
popq %rbx
leal -0x1e(%r14), %eax
cmpl $0x5, %eax
ja 0x20045
leaq 0x704d5(%rip), %rcx     # 0x90508
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0xa4(%r15), %ebx
jmp 0x20085
cmpl $0x1, %r14d
je 0x2007e
cmpl $0xb, %r14d
jne 0x20085
movl 0xa0(%r15), %ebx
jmp 0x20085
movl 0xa8(%r15), %ebx
jmp 0x20085
movl 0xc8(%r15), %ebx
jmp 0x20085
movl 0xb0(%r15), %ebx
jmp 0x20085
movl 0xb4(%r15), %ebx
jmp 0x20085
movl 0xc4(%r15), %ebx
movl %ebx, %eax
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_parsed_ir.cpp
// Function: spirv_cross::ParsedIR::set_member_decoration_string(unsigned int, unsigned int, spv::Decoration, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void ParsedIR::set_member_decoration_string(uint32_t id, uint32_t index, Decoration decoration, const string &argument)
{
	meta[id].members.resize(max(meta[id].members.size(), size_t(index) + 1));
	auto &dec = meta[id].members[index];
	dec.decoration_flags.set(decoration);

	switch (decoration)
	{
	case DecorationHlslSemanticGOOGLE:
		dec.hlsl_semantic = argument;
		break;

	default:
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %ecx
movq %rdi, %r14
movl %esi, %eax
movq 0x30(%rdi), %rdx
imulq $0x148, %rax, %r15      # imm = 0x148
movl $0xd0, %esi
leaq (%r15,%rsi), %rdi
addq %rdx, %rdi
movq 0xd8(%rdx,%r15), %rax
subq 0xd0(%rdx,%r15), %rax
cqto
idivq %rsi
movl %ecx, %r12d
leaq 0x1(%r12), %rsi
cmpq %rsi, %rax
cmovaq %rax, %rsi
callq 0x174de
movq 0x30(%r14), %rax
movq 0xd0(%rax,%r15), %r14
imulq $0xd0, %r12, %r15
leaq (%r14,%r15), %rdi
addq $0x60, %rdi
movl %ebp, %esi
callq 0x17654
cmpl $0x1603, %ebp           # imm = 0x1603
jne 0x2012c
addq %r15, %r14
addq $0x40, %r14
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6170
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_parsed_ir.cpp
// Function: spirv_cross::ParsedIR::get_member_decoration_string[abi:cxx11](unsigned int, unsigned int, spv::Decoration) const
const string &ParsedIR::get_member_decoration_string(uint32_t id, uint32_t index, Decoration decoration) const
{
	static const string empty;
	auto &m = meta[id];

	if (!has_member_decoration(id, index, decoration))
		return empty;

	auto &dec = m.members[index];

	switch (decoration)
	{
	case DecorationHlslSemanticGOOGLE:
		return dec.hlsl_semantic;

	default:
		return empty;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movb 0xc8462(%rip), %al      # 0xe85b0
testb %al, %al
je 0x201ac
movq 0x30(%r15), %r12
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x1ffac
testb %al, %al
je 0x2019c
movl %r14d, %eax
imulq $0x148, %rax, %rax      # imm = 0x148
movl %ebp, %ecx
movq 0xd0(%r12,%rax), %rax
imulq $0xd0, %rcx, %rcx
cmpl $0x1603, %ebx           # imm = 0x1603
leaq 0x40(%rax,%rcx), %rcx
leaq 0xc83fa(%rip), %rax     # 0xe8590
cmoveq %rcx, %rax
jmp 0x201a3
leaq 0xc83ed(%rip), %rax     # 0xe8590
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc83fd(%rip), %rdi     # 0xe85b0
callq 0x64c0
testl %eax, %eax
je 0x20152
leaq 0xc83dd(%rip), %rax     # 0xe85a0
movq %rax, 0xc83c6(%rip)     # 0xe8590
leaq 0xc83bf(%rip), %rsi     # 0xe8590
andq $0x0, 0xc83bf(%rip)     # 0xe8598
movb $0x0, 0xc83c0(%rip)     # 0xe85a0
movq 0xc7df1(%rip), %rdi     # 0xe7fd8
leaq 0xc80b2(%rip), %rdx     # 0xe82a0
callq 0x6240
leaq 0xc83b6(%rip), %rdi     # 0xe85b0
callq 0x61b0
jmp 0x20152
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross_parsed_ir.cpp
// Function: spirv_cross::ParsedIR::unset_member_decoration(unsigned int, unsigned int, spv::Decoration)
void ParsedIR::unset_member_decoration(uint32_t id, uint32_t index, Decoration decoration)
{
	auto &m = meta[id];
	if (index >= m.members.size())
		return;

	auto &dec = m.members[index];

	dec.decoration_flags.clear(decoration);
	switch (decoration)
	{
	case DecorationBuiltIn:
		dec.builtin = false;
		break;

	case DecorationLocation:
		dec.location = 0;
		break;

	case DecorationComponent:
		dec.component = 0;
		break;

	case DecorationOffset:
		dec.offset = 0;
		break;

	case DecorationSpecId:
		dec.spec_id = 0;
		break;

	case DecorationHlslSemanticGOOGLE:
		dec.hlsl_semantic.clear();
		break;

	default:
		break;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %esi, %eax
movq 0x30(%rdi), %rdi
movl %edx, %ecx
imulq $0x148, %rax, %rax      # imm = 0x148
movq 0xd0(%rdi,%rax), %rsi
movq 0xd8(%rdi,%rax), %rax
subq %rsi, %rax
movl $0xd0, %edi
cqto
idivq %rdi
cmpq %rcx, %rax
jbe 0x202b4
imulq $0xd0, %rcx, %rax
leaq (%rsi,%rax), %r14
leaq (%rsi,%rax), %rdi
addq $0x60, %rdi
movl %ebx, %esi
callq 0x1767c
cmpl $0x1, %ebx
je 0x202ac
cmpl $0x1603, %ebx           # imm = 0x1603
je 0x2029e
cmpl $0x1e, %ebx
je 0x20280
cmpl $0x1f, %ebx
je 0x20294
cmpl $0x23, %ebx
je 0x2028a
cmpl $0xb, %ebx
jne 0x202b4
movb $0x0, 0xcc(%r14)
jmp 0x202b4
andl $0x0, 0xa4(%r14)
jmp 0x202b4
andl $0x0, 0xb4(%r14)
jmp 0x202b4
andl $0x0, 0xa8(%r14)
jmp 0x202b4
andq $0x0, 0x48(%r14)
movq 0x40(%r14), %rax
movb $0x0, (%rax)
jmp 0x202b4
andl $0x0, 0xc4(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross_parsed_ir.cpp
// Function: spirv_cross::ParsedIR::increase_bound_by(unsigned int)
uint32_t ParsedIR::increase_bound_by(uint32_t incr_amount)
{
	auto curr_bound = ids.size();
	auto new_bound = curr_bound + incr_amount;
	ids.resize(new_bound);
	meta.resize(new_bound);
	block_meta.resize(new_bound);
	return uint32_t(curr_bound);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %r14
subq 0x18(%rdi), %r14
addq $0x18, %rdi
sarq $0x4, %r14
movl %esi, %r15d
addq %r14, %r15
movq %r15, %rsi
callq 0x20306
leaq 0x30(%rbx), %rdi
movq %r15, %rsi
callq 0x20336
addq $0x78, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20370
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_common.hpp
// Function: spirv_cross::Bitset::merge_and(spirv_cross::Bitset const&)
inline void merge_and(const Bitset &other)
	{
		lower &= other.lower;
		std::unordered_set<uint32_t> tmp_set;
		for (auto &v : higher)
			if (other.higher.count(v) != 0)
				tmp_set.insert(v);
		higher = std::move(tmp_set);
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
andq %rax, (%rdi)
leaq 0x38(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq 0x18(%rdi), %r13
addq $0x8, %r14
leaq 0x8(%rsp), %r15
movq (%r13), %r13
testq %r13, %r13
je 0x20445
leaq 0x8(%r13), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x1aeea
testq %rax, %rax
je 0x2041b
movq %r15, %rdi
movq %r12, %rsi
callq 0x1af30
jmp 0x2041b
addq $0x8, %rbx
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19fc0
movq %r14, %rdi
callq 0xb51c
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb51c
movq %rbx, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_common.hpp
// Function: spirv_cross::Variant::operator=(spirv_cross::Variant&&)
Variant &operator=(Variant &&other) SPIRV_CROSS_NOEXCEPT
	{
		if (this != &other)
		{
			holder = std::move(other.holder);
			type = other.type;
			allow_type_rewrite = other.allow_type_rewrite;
			other.type = TypeNone;
		}
		return *this;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x20696
movq %rsi, %r14
movq %rbx, %rdi
callq 0x1889e
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movb 0xc(%r14), %al
movb %al, 0xc(%rbx)
andl $0x0, 0x8(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::sanitize_underscores(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string CompilerGLSL::sanitize_underscores(const string &str)
{
	string res;
	res.reserve(str.size());

	bool last_underscore = false;
	for (auto c : str)
	{
		if (c == '_')
		{
			if (last_underscore)
				continue;

			res += c;
			last_underscore = true;
		}
		else
		{
			res += c;
			last_underscore = false;
		}
	}
	return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rsi
callq 0x6420
movq (%r14), %r15
movq 0x8(%r14), %r14
xorl %r12d, %r12d
xorl %eax, %eax
cmpq %r12, %r14
je 0x20c0a
movb (%r15,%r12), %cl
cmpb $0x5f, %cl
sete %bpl
testb %al, %bpl
jne 0x20c03
movsbl %cl, %esi
movq %rbx, %rdi
callq 0x6230
incq %r12
movl %ebp, %eax
jmp 0x20be3
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x20c18
movq %rax, %r14
movq %rbx, %rdi
callq 0x6548
movq %r14, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::reset()
void CompilerGLSL::reset()
{
	// We do some speculative optimizations which should pretty much always work out,
	// but just in case the SPIR-V is rather weird, recompile until it's happy.
	// This typically only means one extra pass.
	force_recompile = false;

	// Clear invalid expression tracking.
	invalid_expressions.clear();
	current_function = nullptr;

	// Clear temporary usage tracking.
	expression_usage_counts.clear();
	forwarded_temporaries.clear();

	resource_names.clear();
	block_input_names.clear();
	block_output_names.clear();
	block_ubo_names.clear();
	block_ssbo_names.clear();
	function_overloads.clear();

	for (auto &id : ir.ids)
	{
		if (id.get_type() == TypeVariable)
		{
			// Clear unflushed dependees.
			id.get<SPIRVariable>().dependees.clear();
		}
		else if (id.get_type() == TypeExpression)
		{
			// And remove all expressions.
			id.reset();
		}
		else if (id.get_type() == TypeFunction)
		{
			// Reset active state for all functions.
			id.get<SPIRFunction>().active = false;
			id.get<SPIRFunction>().flush_undeclared = true;
		}
	}

	statement_count = 0;
	indent = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movb $0x0, 0x1d0(%rdi)
addq $0x198, %rdi            # imm = 0x198
callq 0xb3ca
andq $0x0, 0x148(%rbx)
leaq 0x6e8(%rbx), %rdi
callq 0xbc12
leaq 0x260(%rbx), %rdi
callq 0xb3ca
leaq 0x488(%rbx), %rdi
callq 0xb854
leaq 0x4c0(%rbx), %rdi
callq 0xb854
leaq 0x4f8(%rbx), %rdi
callq 0xb854
leaq 0x530(%rbx), %rdi
callq 0xb854
leaq 0x568(%rbx), %rdi
callq 0xb854
leaq 0x5a0(%rbx), %rdi
callq 0xbcba
movq 0x20(%rbx), %r14
movq 0x28(%rbx), %r15
cmpq %r15, %r14
je 0x20d15
movl 0x8(%r14), %eax
cmpl $0x9, %eax
je 0x20d07
cmpl $0x4, %eax
je 0x20ce7
cmpl $0x2, %eax
jne 0x20d0f
movq %r14, %rdi
callq 0x9b30
movq 0x40(%rax), %rcx
cmpq %rcx, 0x48(%rax)
je 0x20d0f
movq %rcx, 0x48(%rax)
jmp 0x20d0f
movq %r14, %rdi
callq 0xe202
movb $0x0, 0xc8(%rax)
movq %r14, %rdi
callq 0xe202
movb $0x1, 0xc9(%rax)
jmp 0x20d0f
movq %r14, %rdi
callq 0x40fa0
addq $0x10, %r14
jmp 0x20cb7
andl $0x0, 0x750(%rbx)
andl $0x0, 0x638(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::remap_pls_variables()
void CompilerGLSL::remap_pls_variables()
{
	for (auto &input : pls_inputs)
	{
		auto &var = get<SPIRVariable>(input.id);

		bool input_is_target = false;
		if (var.storage == StorageClassUniformConstant)
		{
			auto &type = get<SPIRType>(var.basetype);
			input_is_target = type.image.dim == DimSubpassData;
		}

		if (var.storage != StorageClassInput && !input_is_target)
			SPIRV_CROSS_THROW("Can only use in and target variables for PLS inputs.");
		var.remapped_variable = true;
	}

	for (auto &output : pls_outputs)
	{
		auto &var = get<SPIRVariable>(output.id);
		if (var.storage != StorageClassOutput)
			SPIRV_CROSS_THROW("Can only use out variables for PLS outputs.");
		var.remapped_variable = true;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq 0x758(%rdi), %r15
movq 0x760(%rdi), %r12
cmpq %r12, %r15
je 0x20d93
movl (%r15), %esi
movq %rbx, %rdi
callq 0x9c0e
movq %rax, %r14
movl 0x10(%rax), %ecx
testl %ecx, %ecx
je 0x20d65
xorl %eax, %eax
jmp 0x20d7f
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0x90a4
cmpl $0x6, 0x84(%rax)
sete %al
movl 0x10(%r14), %ecx
cmpl $0x1, %ecx
je 0x20d88
testb %al, %al
je 0x20dce
movb $0x1, 0x5b(%r14)
addq $0x8, %r15
jmp 0x20d47
movq 0x770(%rbx), %r14
movq 0x778(%rbx), %r15
cmpq %r15, %r14
je 0x20dc1
movl (%r14), %esi
movq %rbx, %rdi
callq 0x9c0e
cmpl $0x3, 0x10(%rax)
jne 0x20e19
movb $0x1, 0x5b(%rax)
addq $0x8, %r14
jmp 0x20da1
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x706d0(%rip), %rsi     # 0x914b0
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 0xc5fb8(%rip), %rsi     # 0xe6dc0
movq 0xc71d1(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x20e62
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x706ba(%rip), %rsi     # 0x914e5
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 0xc5f6d(%rip), %rsi     # 0xe6dc0
movq 0xc7186(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x20e66
jmp 0x20e7a
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x20e7d
jmp 0x20e85
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::fixup_image_load_store_access()
void CompilerGLSL::fixup_image_load_store_access()
{
	for (auto &id : ir.ids)
	{
		if (id.get_type() != TypeVariable)
			continue;

		uint32_t var = id.get<SPIRVariable>().self;
		auto &vartype = expression_type(var);
		if (vartype.basetype == SPIRType::Image)
		{
			// Older glslangValidator does not emit required qualifiers here.
			// Solve this by making the image access as restricted as possible and loosen up if we need to.
			// If any no-read/no-write flags are actually set, assume that the compiler knows what it's doing.

			auto &flags = ir.meta.at(var).decoration.decoration_flags;
			if (!flags.get(DecorationNonWritable) && !flags.get(DecorationNonReadable))
			{
				flags.set(DecorationNonWritable);
				flags.set(DecorationNonReadable);
			}
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %r14
movq 0x28(%rdi), %r13
leaq 0x38(%rdi), %r15
cmpq %r13, %r14
je 0x21659
cmpl $0x2, 0x8(%r14)
jne 0x21653
movq %r14, %rdi
callq 0x9b30
movl 0x8(%rax), %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x104b0
cmpl $0xd, 0xc(%rax)
jne 0x21653
movq %r15, %rdi
movq %r12, %rsi
callq 0x1738e
movq 0x60(%rax), %rcx
testl $0x3000000, %ecx        # imm = 0x3000000
jne 0x21653
orq $0x3000000, %rcx        # imm = 0x3000000
movq %rcx, 0x60(%rax)
addq $0x10, %r14
jmp 0x21608
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_struct(spirv_cross::SPIRType&)
void CompilerGLSL::emit_struct(SPIRType &type)
{
	// Struct types can be stamped out multiple times
	// with just different offsets, matrix layouts, etc ...
	// Type-punning with these types is legal, which complicates things
	// when we are storing struct and array types in an SSBO for example.
	// If the type master is packed however, we can no longer assume that the struct declaration will be redundant.
	if (type.type_alias != 0 && !has_decoration(type.type_alias, DecorationCPacked))
		return;

	add_resource_name(type.self);
	auto name = type_to_glsl(type);

	statement(!backend.explicit_struct_type ? "struct " : "", name);
	begin_scope();

	type.member_name_cache.clear();

	uint32_t i = 0;
	bool emitted = false;
	for (auto &member : type.member_types)
	{
		add_member_name(type, i);
		emit_struct_member(type, member, i);
		i++;
		emitted = true;
	}

	// Don't declare empty structs in GLSL, this is not allowed.
	if (type_is_empty(type) && !backend.supports_empty_struct)
	{
		statement("int empty_struct_member;");
		emitted = true;
	}

	end_scope_decl();

	if (emitted)
		statement("");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x98(%rsi), %esi
testl %esi, %esi
je 0x22bb7
pushq $0xa
popq %rdx
movq %rbx, %rdi
callq 0x103d2
testb %al, %al
je 0x22cdf
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x22d1a
movq (%rbx), %rax
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq *0x98(%rax)
leaq 0x6cca4(%rip), %rax     # 0x8f887
leaq 0x6ee4d(%rip), %rcx     # 0x91a37
cmpb $0x0, 0x623(%rbx)
cmovneq %rax, %rcx
leaq 0x18(%rsp), %rsi
movq %rcx, (%rsi)
movq %rbx, %rdi
movq %r15, %rdx
callq 0x41ad6
movq %rbx, %rdi
callq 0x22d28
leaq 0xa0(%r14), %rdi
callq 0xb854
movq 0x68(%r14), %r13
movq 0x70(%r14), %rax
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
leaq 0x18(%rsp), %r12
xorl %r15d, %r15d
cmpq 0x10(%rsp), %r13
je 0x22c8c
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x22d40
movl (%r13), %r15d
movq %r12, %rdi
leaq 0x6cc32(%rip), %rsi     # 0x8f887
leaq 0xf(%rsp), %rdx
callq 0x6100
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
movl %ebp, %ecx
movq %r12, %r8
xorl %r9d, %r9d
callq *0xa8(%rax)
movq %r12, %rdi
callq 0x6548
incl %ebp
addq $0x4, %r13
movb $0x1, %r15b
jmp 0x22c33
cmpl $0xc, 0xc(%r14)
jne 0x22cb8
movq 0x70(%r14), %rax
cmpq %rax, 0x68(%r14)
jne 0x22cb8
cmpb $0x0, 0x631(%rbx)
jne 0x22cb8
movb $0x1, %r15b
leaq 0x6ed8f(%rip), %rsi     # 0x91a3f
movq %rbx, %rdi
callq 0x417ea
movq %rbx, %rdi
callq 0x22dba
testb $0x1, %r15b
je 0x22cd5
leaq 0x6cbba(%rip), %rsi     # 0x8f887
movq %rbx, %rdi
callq 0x928e
leaq 0x38(%rsp), %rdi
callq 0x6548
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x22cf6
jmp 0x22cf6
jmp 0x22cf6
jmp 0x22cf6
movq %rax, %rbx
jmp 0x22d08
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x6548
leaq 0x38(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::add_member_name(spirv_cross::SPIRType&, unsigned int)
void CompilerGLSL::add_member_name(SPIRType &type, uint32_t index)
{
	auto &memb = ir.meta[type.self].members;
	if (index < memb.size() && !memb[index].alias.empty())
	{
		auto &name = memb[index].alias;
		if (name.empty())
			return;

		// Reserved for temporaries.
		if (name[0] == '_' && name.size() >= 2 && isdigit(name[1]))
		{
			name.clear();
			return;
		}

		update_name_cache(type.member_name_cache, name);
	}
}

// Assembly:
movl 0x8(%rsi), %eax
movq 0x38(%rdi), %r9
imulq $0x148, %rax, %rax      # imm = 0x148
movl %edx, %r8d
movq 0xd0(%r9,%rax), %rcx
movq 0xd8(%r9,%rax), %rax
subq %rcx, %rax
movl $0xd0, %r9d
cqto
idivq %r9
cmpq %r8, %rax
jbe 0x22daa
imulq $0xd0, %r8, %rdx
movq 0x8(%rcx,%rdx), %rax
testq %rax, %rax
je 0x22daa
addq %rdx, %rcx
cmpq $0x1, %rax
je 0x22dab
movq (%rcx), %rax
cmpb $0x5f, (%rax)
jne 0x22dab
movsbl 0x1(%rax), %edx
addl $-0x30, %edx
cmpl $0x9, %edx
ja 0x22dab
andq $0x0, 0x8(%rcx)
movb $0x0, (%rax)
retq
addq $0xa0, %rsi
movq %rcx, %rdx
jmp 0x11c66
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::end_scope_decl()
void CompilerGLSL::end_scope_decl()
{
	if (!indent)
		SPIRV_CROSS_THROW("Popping empty indent stack.");
	indent--;
	statement("};");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl 0x638(%rdi), %eax
testl %eax, %eax
je 0x22de8
decl %eax
movl %eax, 0x638(%rdi)
leaq 0x79c6f(%rip), %rsi     # 0x9ca4a
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x475c4
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x72dbf(%rip), %rsi     # 0x95bb9
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 0xc3f9e(%rip), %rsi     # 0xe6dc0
movq 0xc51b7(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x22e48
jmp 0x22e50
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_glsl.cpp
// Function: spirv_cross::CompilerGLSL::to_interpolation_qualifiers[abi:cxx11](spirv_cross::Bitset const&)
string CompilerGLSL::to_interpolation_qualifiers(const Bitset &flags)
{
	string res;
	//if (flags & (1ull << DecorationSmooth))
	//    res += "smooth ";
	if (flags.get(DecorationFlat))
		res += "flat ";
	if (flags.get(DecorationNoPerspective))
		res += "noperspective ";
	if (flags.get(DecorationCentroid))
		res += "centroid ";
	if (flags.get(DecorationPatch))
		res += "patch ";
	if (flags.get(DecorationSample))
		res += "sample ";
	if (flags.get(DecorationInvariant))
		res += "invariant ";
	if (flags.get(DecorationExplicitInterpAMD))
		res += "__explicitInterpAMD ";

	return res;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rdx, %r14
movb $0x0, 0x10(%rdi)
movq (%rdx), %rax
btl $0xe, %eax
jae 0x22e8d
leaq 0x6ebd6(%rip), %rsi     # 0x91a58
movq %rbx, %rdi
callq 0x64d0
movq (%r14), %rax
btl $0xd, %eax
jae 0x22ea5
leaq 0x6ebc4(%rip), %rsi     # 0x91a5e
movq %rbx, %rdi
callq 0x64d0
movq (%r14), %rax
btl $0x10, %eax
jae 0x22ebd
leaq 0x6ebbb(%rip), %rsi     # 0x91a6d
movq %rbx, %rdi
callq 0x64d0
movq (%r14), %rax
testw %ax, %ax
jns 0x22ed4
leaq 0x6ebae(%rip), %rsi     # 0x91a77
movq %rbx, %rdi
callq 0x64d0
movq (%r14), %rax
btl $0x11, %eax
jae 0x22eec
leaq 0x6eb9d(%rip), %rsi     # 0x91a7e
movq %rbx, %rdi
callq 0x64d0
movq (%r14), %rax
btl $0x12, %eax
jae 0x22f01
leaq 0x6eb8d(%rip), %rsi     # 0x91a86
movq %rbx, %rdi
callq 0x64d0
movq %r14, %rdi
movl $0x1387, %esi           # imm = 0x1387
callq 0x16ef0
testb %al, %al
je 0x22f21
leaq 0x6eb78(%rip), %rsi     # 0x91a91
movq %rbx, %rdi
callq 0x64d0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x6548
movq %r14, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::can_use_io_location(spv::StorageClass, bool)
bool CompilerGLSL::can_use_io_location(StorageClass storage, bool block)
{
	// Location specifiers are must have in SPIR-V, but they aren't really supported in earlier versions of GLSL.
	// Be very explicit here about how to solve the issue.
	if ((get_execution_model() != ExecutionModelVertex && storage == StorageClassInput) ||
	    (get_execution_model() != ExecutionModelFragment && storage == StorageClassOutput))
	{
		uint32_t minimum_desktop_version = block ? 440 : 410;
		// ARB_enhanced_layouts vs ARB_separate_shader_objects ...

		if (!options.es && options.version < minimum_desktop_version && !options.separate_shader_objects)
			return false;
		else if (options.es && options.version < 310)
			return false;
	}

	if ((get_execution_model() == ExecutionModelVertex && storage == StorageClassInput) ||
	    (get_execution_model() == ExecutionModelFragment && storage == StorageClassOutput))
	{
		if (options.es && options.version < 300)
			return false;
		else if (!options.es && options.version < 330)
			return false;
	}

	if (storage == StorageClassUniform || storage == StorageClassUniformConstant)
	{
		if (options.es && options.version < 310)
			return false;
		else if (!options.es && options.version < 430)
			return false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
callq 0x130e6
cmpl $0x1, %ebp
jne 0x23340
testl %eax, %eax
jne 0x23352
movq %rbx, %rdi
callq 0x130e6
cmpl $0x3, %ebp
jne 0x2338d
cmpl $0x4, %eax
je 0x2338d
cmpb $0x0, 0x43c(%rbx)
je 0x2336c
cmpl $0x136, 0x438(%rbx)     # imm = 0x136
jae 0x2338d
jmp 0x233f9
testb %r14b, %r14b
movl $0x1b8, %eax            # imm = 0x1B8
movl $0x19a, %ecx            # imm = 0x19A
cmovnel %eax, %ecx
cmpl %ecx, 0x438(%rbx)
jae 0x2338d
cmpb $0x0, 0x43f(%rbx)
je 0x233f9
movl %ebp, %r14d
xorl $0x1, %r14d
movq %rbx, %rdi
callq 0x130e6
orl %r14d, %eax
je 0x233b5
movq %rbx, %rdi
callq 0x130e6
xorl $0x4, %eax
movl %ebp, %ecx
xorl $0x3, %ecx
orl %eax, %ecx
jne 0x233d1
cmpb $0x0, 0x43c(%rbx)
movl $0x12b, %eax            # imm = 0x12B
movl $0x149, %ecx            # imm = 0x149
cmovnel %eax, %ecx
cmpl %ecx, 0x438(%rbx)
jbe 0x233f9
testl $0xfffffffd, %ebp       # imm = 0xFFFFFFFD
jne 0x233f5
cmpb $0x0, 0x43c(%rbx)
movl $0x135, %eax            # imm = 0x135
movl $0x1ad, %ecx            # imm = 0x1AD
cmovnel %eax, %ecx
cmpl %ecx, 0x438(%rbx)
jbe 0x233f9
movb $0x1, %al
jmp 0x233fb
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::type_to_packed_base_size(spirv_cross::SPIRType const&, spirv_cross::BufferPackingStandard)
uint32_t CompilerGLSL::type_to_packed_base_size(const SPIRType &type, BufferPackingStandard)
{
	switch (type.basetype)
	{
	case SPIRType::Double:
	case SPIRType::Int64:
	case SPIRType::UInt64:
		return 8;
	case SPIRType::Float:
	case SPIRType::Int:
	case SPIRType::UInt:
		return 4;
	case SPIRType::Half:
		return 2;

	default:
		SPIRV_CROSS_THROW("Unrecognized type in type_to_packed_base_size.");
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl 0xc(%rsi), %eax
addl $-0x4, %eax
cmpl $0x8, %eax
jae 0x234e4
movl $0xef, %ecx
btl %eax, %ecx
jae 0x234e4
movl %eax, %eax
leaq 0x72a44(%rip), %rcx     # 0x95f1c
movl (%rcx,%rax,4), %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x6e7c4(%rip), %rsi     # 0x91cba
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 0xc38a2(%rip), %rsi     # 0xe6dc0
movq 0xc4abb(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x23544
jmp 0x2354c
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_glsl.cpp
// Function: spirv_cross::CompilerGLSL::type_to_packed_array_stride(spirv_cross::SPIRType const&, spirv_cross::Bitset const&, spirv_cross::BufferPackingStandard)
uint32_t CompilerGLSL::type_to_packed_array_stride(const SPIRType &type, const Bitset &flags,
                                                   BufferPackingStandard packing)
{
	// Array stride is equal to aligned size of the underlying type.
	uint32_t parent = type.parent_type;
	assert(parent);

	auto &tmp = get<SPIRType>(parent);

	uint32_t size = type_to_packed_size(tmp, flags, packing);
	if (tmp.array.empty())
	{
		uint32_t alignment = type_to_packed_alignment(type, flags, packing);
		return (size + alignment - 1) & ~(alignment - 1);
	}
	else
	{
		// For multidimensional arrays, array stride always matches size of subtype.
		// The alignment cannot change because multidimensional arrays are basically N * M array elements.
		return size;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movl 0x9c(%rsi), %esi
testl %esi, %esi
je 0x23856
movl %ecx, %ebx
movq %rdx, %r14
movq %rdi, %r12
callq 0x90a4
movq %rax, %rbp
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x23876
movl %eax, %r13d
movq 0x20(%rbp), %rax
cmpq 0x28(%rbp), %rax
jne 0x23844
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x23554
leal (%rax,%r13), %ecx
decl %ecx
negl %eax
andl %ecx, %eax
movl %eax, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6e4c4(%rip), %rdi     # 0x91d21
leaq 0x6e4c4(%rip), %rsi     # 0x91d28
leaq 0x6e4d8(%rip), %rcx     # 0x91d43
movl $0x3f4, %edx            # imm = 0x3F4
callq 0x61c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::to_array_size_literal(spirv_cross::SPIRType const&, unsigned int) const
uint32_t CompilerGLSL::to_array_size_literal(const SPIRType &type, uint32_t index) const
{
	assert(type.array.size() == type.array_size_literal.size());

	if (type.array_size_literal[index])
	{
		return type.array[index];
	}
	else
	{
		// Use the default spec constant value.
		// This is the best we can do.
		uint32_t array_size_id = type.array[index];
		uint32_t array_size = get<SPIRConstant>(array_size_id).scalar();
		return array_size;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq 0x28(%rsi), %rax
movq 0x48(%rsi), %rcx
subq 0x20(%rsi), %rax
sarq $0x2, %rax
movl 0x50(%rsi), %esi
subq 0x38(%r14), %rcx
leaq (%rsi,%rcx,8), %rcx
cmpq %rcx, %rax
jne 0x23afb
movq %rdi, %rbx
leaq 0x38(%r14), %rdi
movl %edx, %r15d
movq %r15, %rsi
callq 0xab22
shlq $0x2, %r15
addq 0x20(%r14), %r15
testb %al, %al
jne 0x23af2
movl (%r15), %esi
movq %rbx, %rdi
callq 0x1708c
movq %rax, %r15
addq $0x10, %r15
movl (%r15), %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x71aa6(%rip), %rdi     # 0x955a8
leaq 0x6e21f(%rip), %rsi     # 0x91d28
leaq 0x71acc(%rip), %rcx     # 0x955dc
movl $0x2138, %edx           # imm = 0x2138
callq 0x61c0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_push_constant_block(spirv_cross::SPIRVariable const&)
void CompilerGLSL::emit_push_constant_block(const SPIRVariable &var)
{
	if (flattened_buffer_blocks.count(var.self))
		emit_buffer_block_flattened(var);
	else if (options.vulkan_semantics)
		emit_push_constant_block_vulkan(var);
	else
		emit_push_constant_block_glsl(var);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x678, %rdi            # imm = 0x678
addq $0x8, %rsi
callq 0x1aeea
testq %rax, %rax
je 0x249d7
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x24a0c
cmpb $0x1, 0x43e(%r14)
jne 0x249fa
movq (%r14), %rax
movq 0xe8(%rax), %rax
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x24d2c
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_push_constant_block_glsl(spirv_cross::SPIRVariable const&)
void CompilerGLSL::emit_push_constant_block_glsl(const SPIRVariable &var)
{
	// OpenGL has no concept of push constant blocks, implement it as a uniform struct.
	auto &type = get<SPIRType>(var.basetype);

	auto &flags = ir.meta[var.self].decoration.decoration_flags;
	flags.clear(DecorationBinding);
	flags.clear(DecorationDescriptorSet);

#if 0
    if (flags & ((1ull << DecorationBinding) | (1ull << DecorationDescriptorSet)))
        SPIRV_CROSS_THROW("Push constant blocks cannot be compiled to GLSL with Binding or Set syntax. "
                            "Remap to location with reflection API first or disable these decorations.");
#endif

	// We're emitting the push constant block as a regular struct, so disable the block qualifier temporarily.
	// Otherwise, we will end up emitting layout() qualifiers on naked structs which is not allowed.
	auto &block_flags = ir.meta[type.self].decoration.decoration_flags;
	bool block_flag = block_flags.get(DecorationBlock);
	block_flags.clear(DecorationBlock);

	emit_struct(type);

	if (block_flag)
		block_flags.set(DecorationBlock);

	emit_uniform(var);
	statement("");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rsi), %esi
callq 0x90a4
movl 0x8(%r14), %ecx
movq 0x38(%rbx), %r15
imulq $0x148, %rcx, %rcx      # imm = 0x148
movabsq $-0x600000001, %rdx     # imm = 0xFFFFFFF9FFFFFFFF
andq %rdx, 0x60(%r15,%rcx)
movl 0x8(%rax), %ecx
imulq $0x148, %rcx, %r12      # imm = 0x148
movq 0x60(%r15,%r12), %r13
movq %r13, %rcx
andq $-0x5, %rcx
movq %rcx, 0x60(%r15,%r12)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x22b86
testb $0x4, %r13b
je 0x24d98
leaq (%r15,%r12), %rax
addq $0x60, %rax
orb $0x4, (%rax)
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0xf8(%rax)
leaq 0x6aad9(%rip), %rsi     # 0x8f887
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x928e
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_buffer_block(spirv_cross::SPIRVariable const&)
void CompilerGLSL::emit_buffer_block(const SPIRVariable &var)
{
	if (flattened_buffer_blocks.count(var.self))
		emit_buffer_block_flattened(var);
	else if (is_legacy() || (!options.es && options.version == 130))
		emit_buffer_block_legacy(var);
	else
		emit_buffer_block_native(var);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x678, %rdi            # imm = 0x678
addq $0x8, %rsi
callq 0x1aeea
testq %rax, %rax
je 0x24df1
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x24a0c
movq %r14, %rdi
callq 0x41b9c
testb %al, %al
jne 0x24e14
cmpb $0x0, 0x43c(%r14)
jne 0x24e26
cmpl $0x82, 0x438(%r14)
jne 0x24e26
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x24e38
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x24f36
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_buffer_block_legacy(spirv_cross::SPIRVariable const&)
void CompilerGLSL::emit_buffer_block_legacy(const SPIRVariable &var)
{
	auto &type = get<SPIRType>(var.basetype);
	bool ssbo = var.storage == StorageClassStorageBuffer ||
	            ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock);
	if (ssbo)
		SPIRV_CROSS_THROW("SSBOs not supported in legacy targets.");

	// We're emitting the push constant block as a regular struct, so disable the block qualifier temporarily.
	// Otherwise, we will end up emitting layout() qualifiers on naked structs which is not allowed.
	auto &block_flags = ir.meta[type.self].decoration.decoration_flags;
	bool block_flag = block_flags.get(DecorationBlock);
	block_flags.clear(DecorationBlock);
	emit_struct(type);
	if (block_flag)
		block_flags.set(DecorationBlock);
	emit_uniform(var);
	statement("");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rsi), %esi
callq 0x90a4
cmpl $0xc, 0x10(%r14)
je 0x24ec5
movl 0x8(%rax), %edx
movq 0x38(%rbx), %rcx
imulq $0x148, %rdx, %rdx      # imm = 0x148
movq 0x60(%rcx,%rdx), %r15
testb $0x8, %r15b
jne 0x24ec5
leaq (%rcx,%rdx), %r12
addq $0x60, %r12
movq %r15, %rcx
andq $-0xd, %rcx
movq %rcx, (%r12)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x22b86
testb $0x4, %r15b
je 0x24e9b
orb $0x4, (%r12)
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0xf8(%rax)
leaq 0x6a9d6(%rip), %rsi     # 0x8f887
movq %rbx, %rdi
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x928e
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x6d0db(%rip), %rsi     # 0x91fb2
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 0xc1ec1(%rip), %rsi     # 0xe6dc0
movq 0xc30da(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x24f25
jmp 0x24f2d
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::end_scope_decl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void CompilerGLSL::end_scope_decl(const string &decl)
{
	if (!indent)
		SPIRV_CROSS_THROW("Popping empty indent stack.");
	indent--;
	statement("} ", decl, ";");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl 0x638(%rdi), %eax
testl %eax, %eax
je 0x2540c
movq %rsi, %rdx
decl %eax
movl %eax, 0x638(%rdi)
leaq 0x707dd(%rip), %rsi     # 0x95bd5
leaq 0x74682(%rip), %rcx     # 0x99a81
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x47c96
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x7079b(%rip), %rsi     # 0x95bb9
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 0xc197a(%rip), %rsi     # 0xe6dc0
movq 0xc2b93(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x2546c
jmp 0x25474
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_glsl.cpp
// Function: spirv_cross::CompilerGLSL::to_storage_qualifiers_glsl(spirv_cross::SPIRVariable const&)
const char *CompilerGLSL::to_storage_qualifiers_glsl(const SPIRVariable &var)
{
	auto &execution = get_entry_point();

	if (var.storage == StorageClassInput || var.storage == StorageClassOutput)
	{
		if (is_legacy() && execution.model == ExecutionModelVertex)
			return var.storage == StorageClassInput ? "attribute " : "varying ";
		else if (is_legacy() && execution.model == ExecutionModelFragment)
			return "varying "; // Fragment outputs are renamed so they never hit this case.
		else
			return var.storage == StorageClassInput ? "in " : "out ";
	}
	else if (var.storage == StorageClassUniformConstant || var.storage == StorageClassUniform ||
	         var.storage == StorageClassPushConstant)
	{
		return "uniform ";
	}

	return "";
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x12fa4
movq %rax, %r14
movl 0x10(%rbx), %eax
cmpl $0x9, %eax
ja 0x258c5
movl $0x205, %ecx            # imm = 0x205
btl %eax, %ecx
jae 0x25874
leaq 0x6c786(%rip), %rax     # 0x91ff8
jmp 0x258e4
pushq $0xa
popq %rcx
btl %eax, %ecx
jae 0x258c5
movq %r15, %rdi
callq 0x41b9c
testb %al, %al
je 0x258a6
cmpl $0x0, 0xb8(%r14)
jne 0x258a6
cmpl $0x1, 0x10(%rbx)
leaq 0x6c7d6(%rip), %rcx     # 0x92073
leaq 0x6c7da(%rip), %rax     # 0x9207e
jmp 0x258e0
movq %r15, %rdi
callq 0x41b9c
testb %al, %al
je 0x258ce
cmpl $0x4, 0xb8(%r14)
jne 0x258ce
leaq 0x6c7bb(%rip), %rax     # 0x9207e
jmp 0x258e4
leaq 0x69fbb(%rip), %rax     # 0x8f887
jmp 0x258e4
cmpl $0x1, 0x10(%rbx)
leaq 0x6c7ae(%rip), %rcx     # 0x92087
leaq 0x6fcc3(%rip), %rax     # 0x955a3
cmoveq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::to_member_name[abi:cxx11](spirv_cross::SPIRType const&, unsigned int)
string CompilerGLSL::to_member_name(const SPIRType &type, uint32_t index)
{
	auto &memb = ir.meta[type.self].members;
	if (index < memb.size() && !memb[index].alias.empty())
		return memb[index].alias;
	else
		return join("_m", index);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl %ecx, 0xc(%rsp)
movl 0x8(%rdx), %eax
movq 0x38(%rsi), %rdx
imulq $0x148, %rax, %rax      # imm = 0x148
movl %ecx, %ecx
movq 0xd0(%rdx,%rax), %rsi
movq 0xd8(%rdx,%rax), %rax
subq %rsi, %rax
movl $0xd0, %edi
cqto
idivq %rdi
cmpq %rcx, %rax
jbe 0x25d24
imulq $0xd0, %rcx, %rax
cmpq $0x0, 0x8(%rsi,%rax)
je 0x25d24
addq %rax, %rsi
movq %rbx, %rdi
callq 0x63c0
jmp 0x25d38
leaq 0x6f81c(%rip), %rsi     # 0x95547
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x464c7
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::variable_decl[abi:cxx11](spirv_cross::SPIRVariable const&)
string CompilerGLSL::variable_decl(const SPIRVariable &variable)
{
	// Ignore the pointer type since GLSL doesn't have pointers.
	auto &type = get<SPIRType>(variable.basetype);

	auto res = join(to_qualifiers_glsl(variable.self), variable_decl(type, to_name(variable.self), variable.self));

	if (variable.loop_variable && variable.static_expression)
	{
		uint32_t expr = variable.static_expression;
		if (ir.ids[expr].get_type() != TypeUndef)
			res += join(" = ", to_expression(variable.static_expression));
	}
	else if (variable.initializer)
	{
		uint32_t expr = variable.initializer;
		if (ir.ids[expr].get_type() != TypeUndef)
			res += join(" = ", to_initializer_expression(variable));
	}
	return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rdx), %esi
movq %r14, %rdi
callq 0x90a4
movq %rax, %r12
movl 0x8(%r15), %edx
movq (%r14), %rax
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq *0x128(%rax)
movl 0x8(%r15), %edx
movq (%r14), %rax
leaq 0x48(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq *0x38(%rax)
movl 0x8(%r15), %r8d
movq (%r14), %rax
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rcx
movq %r14, %rsi
movq %r12, %rdx
callq *0xc8(%rax)
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x4228c
leaq 0x8(%rsp), %rdi
callq 0x6548
leaq 0x48(%rsp), %rdi
callq 0x6548
leaq 0x28(%rsp), %rdi
callq 0x6548
cmpb $0x1, 0x64(%r15)
jne 0x2628f
movl 0x3c(%r15), %edx
testq %rdx, %rdx
je 0x2628f
movq 0x20(%r14), %rax
movq %rdx, %rcx
shlq $0x4, %rcx
cmpl $0xd, 0x8(%rax,%rcx)
je 0x262f2
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2b9f0
leaq 0x73779(%rip), %rsi     # 0x999ea
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x46816
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x64f0
jmp 0x262de
movl 0x18(%r15), %eax
testq %rax, %rax
je 0x262f2
movq 0x20(%r14), %rcx
shlq $0x4, %rax
cmpl $0xd, 0x8(%rcx,%rax)
je 0x262f2
movq (%r14), %rax
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *0x160(%rax)
leaq 0x73728(%rip), %rsi     # 0x999ea
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x46816
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x64f0
leaq 0x28(%rsp), %rdi
callq 0x6548
leaq 0x8(%rsp), %rdi
callq 0x6548
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x26307
jmp 0x26316
jmp 0x26325
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x6548
jmp 0x26319
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x6548
jmp 0x26328
movq %rax, %r14
movq %rbx, %rdi
jmp 0x26353
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x6548
jmp 0x2633f
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x6548
jmp 0x2634e
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x6548
movq %r14, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_uniform(spirv_cross::SPIRVariable const&)
void CompilerGLSL::emit_uniform(const SPIRVariable &var)
{
	auto &type = get<SPIRType>(var.basetype);
	if (type.basetype == SPIRType::Image && type.image.sampled == 2)
	{
		if (!options.es && options.version < 420)
			require_extension_internal("GL_ARB_shader_image_load_store");
		else if (options.es && options.version < 310)
			SPIRV_CROSS_THROW("At least ESSL 3.10 required for shader image load store.");
	}

	add_resource_name(var.self);
	statement(layout_for_variable(var), variable_decl(var), ";");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rsi), %esi
callq 0x90a4
cmpl $0xd, 0xc(%rax)
jne 0x26421
cmpl $0x2, 0x8c(%rax)
jne 0x26421
movb 0x43c(%rbx), %al
movl 0x438(%rbx), %ecx
cmpl $0x1a4, %ecx            # imm = 0x1A4
setae %dl
orb %al, %dl
je 0x263fa
cmpl $0x136, %ecx            # imm = 0x136
setb %cl
andb %cl, %al
cmpb $0x1, %al
jne 0x26421
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x6bd5f(%rip), %rsi     # 0x92126
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xc09d5(%rip), %rsi     # 0xe6dc0
movq 0xc1bee(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
leaq 0x6b33e(%rip), %rsi     # 0x9173f
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x6100
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x21390
movq %rsp, %rdi
callq 0x6548
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x22d1a
movq %rsp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x23d8a
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2619e
leaq 0x7362f(%rip), %rcx     # 0x99a81
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x422f6
leaq 0x20(%rsp), %rdi
callq 0x6548
movq %rsp, %rdi
callq 0x6548
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x26492
jmp 0x264bd
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
jmp 0x264bd
jmp 0x264b2
movq %rax, %r14
jmp 0x264bd
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x6548
jmp 0x264b5
movq %rax, %r14
movq %rsp, %rdi
callq 0x6548
movq %r14, %rdi
callq 0x64b0
nop