LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_execution_mode_argument(spv::ExecutionMode, unsigned int) const
uint32_t Compiler::get_execution_mode_argument(spv::ExecutionMode mode, uint32_t index) const
{
	auto &execution = get_entry_point();
	switch (mode)
	{
	case ExecutionModeLocalSize:
		switch (index)
		{
		case 0:
			return execution.workgroup_size.x;
		case 1:
			return execution.workgroup_size.y;
		case 2:
			return execution.workgroup_size.z;
		default:
			return 0;
		}

	case ExecutionModeInvocations:
		return execution.invocations;

	case ExecutionModeOutputVertices:
		return execution.output_vertices;

	default:
		return 0;
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
leaq 0xd0(%rdi), %rax
leaq 0x108(%rdi), %rsi
movq %rax, %rdi
callq 0x21c42
movq %rax, %rcx
testl %ebp, %ebp
je 0x160fa
cmpl $0x1a, %ebp
je 0x160f2
xorl %eax, %eax
cmpl $0x11, %ebp
jne 0x16100
cmpl $0x2, %ebx
je 0x1610f
cmpl $0x1, %ebx
je 0x16107
testl %ebx, %ebx
jne 0x16100
movl 0xb0(%rcx), %eax
jmp 0x16100
movl 0xc4(%rcx), %eax
jmp 0x16100
movl 0xc0(%rcx), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl 0xb4(%rcx), %eax
jmp 0x16100
movl 0xb8(%rcx), %eax
jmp 0x16100
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_entry_points[abi:cxx11]() const
vector<string> Compiler::get_entry_points() const
{
	vector<string> entries;
	for (auto &entry : ir.entry_points)
		entries.push_back(entry.second.orig_name);
	return entries;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
addq $0xe0, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x16323
leaq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0x1ba60
jmp 0x1630d
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xda2c
movq %r14, %rdi
callq 0x64a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_entry_points_and_stages() const
vector<EntryPoint> Compiler::get_entry_points_and_stages() const
{
	vector<EntryPoint> entries;
	for (auto &entry : ir.entry_points)
		entries.push_back({ entry.second.orig_name, entry.second.model });
	return entries;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0xe0(%rsi), %r12
testq %r12, %r12
je 0x163c1
leaq 0x10(%rsp), %r15
movq %rsp, %r14
movq %r15, (%rsp)
movq 0x38(%r12), %rsi
movq 0x40(%r12), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0xe456
movl 0xc8(%r12), %eax
movl %eax, 0x20(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2198c
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x163b8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq (%r12), %r12
testq %r12, %r12
jne 0x16372
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
jmp 0x163ee
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x163ee
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x1ba9e
movq %r14, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_entry_point(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, spv::ExecutionModel)
SPIREntryPoint &Compiler::get_entry_point(const std::string &name, ExecutionModel model)
{
	auto itr = find_if(begin(ir.entry_points), end(ir.entry_points),
	                   [&](const std::pair<uint32_t, SPIREntryPoint> &entry) -> bool {
		                   return entry.second.orig_name == name && entry.second.model == model;
	                   });

	if (itr == end(ir.entry_points))
		SPIRV_CROSS_THROW("Entry point does not exist.");

	return itr->second;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %edx, 0xc(%rsp)
movq 0xe0(%rdi), %rbp
testq %rbp, %rbp
je 0x166c5
movq %rsi, %r14
leaq 0x80(%rsp), %r12
leaq 0x30(%rsp), %r15
movl 0x8(%rbp), %eax
movl %eax, 0x10(%rsp)
leaq 0x10(%rbp), %r13
leaq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0x1e72a
movq 0x48(%rsp), %rdx
cmpq 0x8(%r14), %rdx
jne 0x16650
testq %rdx, %rdx
je 0x16654
movq (%r14), %rsi
movq 0x40(%rsp), %rdi
callq 0x6280
testl %eax, %eax
je 0x16654
xorl %ebx, %ebx
jmp 0x16662
movl 0xc(%rsp), %eax
cmpl %eax, 0xd0(%rsp)
sete %bl
movq %r12, %rdi
callq 0xd570
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x16681
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x1669d
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x166b4
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bl, %bl
jne 0x16729
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x16617
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x9e7f4(%rip), %rsi     # 0xb4ed6
leaq 0x9e808(%rip), %rdx     # 0xb4ef1
leaq 0x10(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0xe56be(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xe5696(%rip), %rsi     # 0xfbdb0
movq 0xe68b7(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %r13, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x16758
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x16762
jmp 0x1676a
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::CombinedImageSamplerHandler::push_remap_parameters(spirv_cross::SPIRFunction const&, unsigned int const*, unsigned int)
void Compiler::CombinedImageSamplerHandler::push_remap_parameters(const SPIRFunction &func, const uint32_t *args,
                                                                  uint32_t length)
{
	// If possible, pipe through a remapping table so that parameters know
	// which variables they actually bind to in this scope.
	unordered_map<uint32_t, uint32_t> remapping;
	for (uint32_t i = 0; i < length; i++)
		remapping[func.arguments[i].id] = remap_parameter(args[i]);
	parameter_remapping.push(move(remapping));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, 0x8(%rsp)
movq %rdi, %rbx
leaq 0x40(%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)
testl %ecx, %ecx
je 0x16b4a
movq %rsi, %r15
movl %ecx, %r13d
movl $0x4, %r12d
xorl %r14d, %r14d
movq 0x8(%rsp), %rax
movl (%rax,%r14,4), %esi
movq %rbx, %rdi
callq 0x16b8c
movl %eax, %ebp
movq 0x18(%r15), %rsi
addq %r12, %rsi
leaq 0x10(%rsp), %rdi
callq 0x21d9e
movl %ebp, (%rax)
incq %r14
addq $0x14, %r12
cmpq %r14, %r13
jne 0x16b18
addq $0x10, %rbx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x2202e
leaq 0x10(%rsp), %rdi
callq 0xdcda
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16b76
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xdcda
movq %rbx, %rdi
callq 0x64a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::CombinedImageSamplerHandler::remap_parameter(unsigned int)
uint32_t Compiler::CombinedImageSamplerHandler::remap_parameter(uint32_t id)
{
	auto *var = compiler.maybe_get_backing_variable(id);
	if (var)
		id = var->self;

	if (parameter_remapping.empty())
		return id;

	auto &remapping = parameter_remapping.top();
	auto itr = remapping.find(id);
	if (itr != end(remapping))
		return itr->second;
	else
		return id;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
movq 0x8(%rdi), %rdi
callq 0x12c9a
testq %rax, %rax
je 0x16bad
movl 0x8(%rax), %ebp
movl %ebp, 0x4(%rsp)
movq 0x40(%rbx), %rdi
cmpq 0x20(%rbx), %rdi
je 0x16be8
cmpq 0x48(%rbx), %rdi
jne 0x16bca
movq 0x58(%rbx), %rax
movl $0x1f8, %edi            # imm = 0x1F8
addq -0x8(%rax), %rdi
addq $-0x38, %rdi
leaq 0x4(%rsp), %rbx
movq %rbx, %rsi
callq 0x2235e
leaq 0xc(%rax), %rcx
testq %rax, %rax
cmoveq %rbx, %rcx
movl (%rcx), %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::CombinedImageSamplerHandler::begin_function_scope(unsigned int const*, unsigned int)
bool Compiler::CombinedImageSamplerHandler::begin_function_scope(const uint32_t *args, uint32_t length)
{
	if (length < 3)
		return false;

	auto &callee = compiler.get<SPIRFunction>(args[2]);
	args += 3;
	length -= 3;
	push_remap_parameters(callee, args, length);
	functions.push(&callee);
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
cmpl $0x3, %edx
jb 0x16c6c
movq %rsi, %r12
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movl 0x8(%rsi), %esi
callq 0xb98a
movq %rax, %r15
addq $0xc, %r12
leal -0x3(%rbx), %ecx
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x16acc
movq %r15, (%rsp)
movq 0x90(%r14), %rax
movq 0xa0(%r14), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x16c5d
movq %r15, (%rax)
addq $0x8, 0x90(%r14)
jmp 0x16c6c
addq $0x60, %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x223ba
cmpl $0x3, %ebx
setae %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::build_combined_image_samplers()
void Compiler::build_combined_image_samplers()
{
	for (auto &id : ir.ids)
	{
		if (id.get_type() == TypeFunction)
		{
			auto &func = id.get<SPIRFunction>();
			func.combined_parameters.clear();
			func.shadow_arguments.clear();
			func.do_combined_parameters = true;
		}
	}

	combined_image_samplers.clear();
	CombinedImageSamplerHandler handler(*this);
	traverse_all_reachable_opcodes(get<SPIRFunction>(ir.default_entry_point), handler);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %r14
movq 0x28(%rdi), %r15
cmpq %r15, %r14
je 0x18139
cmpl $0x4, 0x8(%r14)
jne 0x18133
movq %r14, %rdi
callq 0x10274
movq 0x80(%rax), %rcx
cmpq %rcx, 0x88(%rax)
je 0x1811e
movq %rcx, 0x88(%rax)
movq 0x30(%rax), %rcx
cmpq %rcx, 0x38(%rax)
je 0x1812c
movq %rcx, 0x38(%rax)
movb $0x1, 0xca(%rax)
addq $0x10, %r14
jmp 0x180f3
movq 0x1d8(%rbx), %rax
cmpq %rax, 0x1e0(%rbx)
je 0x18150
movq %rax, 0x1e0(%rbx)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x1be5e
movl 0x108(%rbx), %esi
movq %rbx, %rdi
callq 0xb98a
movq %rsp, %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x13dbc
leaq 0xe401a(%rip), %rax     # 0xfc198
addq $0x10, %rax
leaq 0x60(%rsp), %rdi
movq %rax, -0x60(%rdi)
callq 0x1f3c2
leaq 0x10(%rsp), %rdi
callq 0x1f27a
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0xe3fe7(%rip), %rax     # 0xfc198
addq $0x10, %rax
leaq 0x60(%rsp), %rdi
movq %rax, -0x60(%rdi)
callq 0x1f3c2
leaq 0x10(%rsp), %rdi
callq 0x1f27a
movq %rbx, %rdi
callq 0x64a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_specialization_constants() const
vector<SpecializationConstant> Compiler::get_specialization_constants() const
{
	vector<SpecializationConstant> spec_consts;
	for (auto &id : ir.ids)
	{
		if (id.get_type() == TypeConstant)
		{
			auto &c = id.get<SPIRConstant>();
			if (c.specialization && has_decoration(c.self, DecorationSpecId))
				spec_consts.push_back({ c.self, get_decoration(c.self, DecorationSpecId) });
		}
	}
	return spec_consts;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x20(%rsi), %r15
movq 0x28(%rsi), %rbp
cmpq %rbp, %r15
je 0x1827d
movq %rsi, %r14
addq $0x8, %r14
movq %rsp, %r12
cmpl $0x3, 0x8(%r15)
jne 0x18274
movq %r15, %rdi
callq 0x1bf10
movq %rax, %r13
cmpb $0x1, 0x108(%rax)
jne 0x18274
movl 0x8(%r13), %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x2492a
testb %al, %al
je 0x18274
movl 0x8(%r13), %esi
movl %esi, (%rsp)
movq %r14, %rdi
movl $0x1, %edx
callq 0x24982
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x18269
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x18274
movq %rbx, %rdi
movq %r12, %rdx
callq 0x22f8c
addq $0x10, %r15
cmpq %rbp, %r15
jne 0x18209
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x18291
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x182a8
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: exists_unaccessed_path_to_return(spirv_cross::CFG const&, unsigned int, std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int>> const&)
static bool exists_unaccessed_path_to_return(const CFG &cfg, uint32_t block, const unordered_set<uint32_t> &blocks)
{
	// This block accesses the variable.
	if (blocks.find(block) != end(blocks))
		return false;

	// We are at the end of the CFG.
	if (cfg.get_succeeding_edges(block).empty())
		return true;

	// If any of our successors have a path to the end, there exists a path from block.
	for (auto &succ : cfg.get_succeeding_edges(block))
		if (exists_unaccessed_path_to_return(cfg, succ, blocks))
			return true;

	return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x4(%rsp), %rax
movl %esi, (%rax)
movq %rdx, %rdi
movq %rax, %rsi
callq 0x1f4b4
testq %rax, %rax
je 0x183a4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl 0x4(%rsp), %eax
movq 0x28(%r14), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %r12
movq 0x8(%rcx,%rax,8), %r15
cmpq %r15, %r12
je 0x183e5
addq $0x4, %r12
movl -0x4(%r12), %esi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x18371
testb %al, %al
jne 0x18398
leaq 0x4(%r12), %rcx
cmpq %r15, %r12
movq %rcx, %r12
jne 0x183c2
jmp 0x18398
movb $0x1, %al
jmp 0x18398
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::AnalyzeVariableScopeAccessHandler::notify_variable_access(unsigned int, unsigned int)
void Compiler::AnalyzeVariableScopeAccessHandler::notify_variable_access(uint32_t id, uint32_t block)
{
	if (id_is_phi_variable(id))
		accessed_variables_to_block[id].insert(block);
	else if (id_is_potential_temporary(id))
		accessed_temporaries_to_block[id].insert(block);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
callq 0x18942
testb %al, %al
je 0x188e8
addq $0x18, %rbx
jmp 0x18919
movq 0x8(%rbx), %rcx
movq 0x20(%rcx), %rax
movq 0x28(%rcx), %rcx
subq %rax, %rcx
shrq $0x4, %rcx
cmpl %ebp, %ecx
jbe 0x1893b
movl %ebp, %ecx
shlq $0x4, %rcx
cmpq $0x0, (%rax,%rcx)
je 0x18915
addq %rcx, %rax
cmpl $0x9, 0x8(%rax)
jne 0x1893b
addq $0x50, %rbx
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x23124
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x1f510
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::AnalyzeVariableScopeAccessHandler::id_is_phi_variable(unsigned int) const
bool Compiler::AnalyzeVariableScopeAccessHandler::id_is_phi_variable(uint32_t id) const
{
	if (id >= compiler.get_current_id_bound())
		return false;
	auto *var = compiler.maybe_get<SPIRVariable>(id);
	return var && var->phi_variable;
}

// Assembly:
pushq %rax
movq 0x8(%rdi), %rdi
movq 0x28(%rdi), %rax
subq 0x20(%rdi), %rax
shrq $0x4, %rax
cmpl %esi, %eax
jbe 0x18966
callq 0xc7b4
testq %rax, %rax
je 0x18966
movb 0x5a(%rax), %al
jmp 0x18968
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::AnalyzeVariableScopeAccessHandler::id_is_potential_temporary(unsigned int) const
bool Compiler::AnalyzeVariableScopeAccessHandler::id_is_potential_temporary(uint32_t id) const
{
	if (id >= compiler.get_current_id_bound())
		return false;

	// Temporaries are not created before we start emitting code.
	return compiler.ir.ids[id].empty() || (compiler.ir.ids[id].get_type() == TypeExpression);
}

// Assembly:
movq 0x8(%rdi), %rcx
movq 0x20(%rcx), %rax
movq 0x28(%rcx), %rcx
subq %rax, %rcx
shrq $0x4, %rcx
cmpl %esi, %ecx
jbe 0x18999
movl %esi, %ecx
shlq $0x4, %rcx
cmpq $0x0, (%rax,%rcx)
je 0x1899c
addq %rcx, %rax
cmpl $0x9, 0x8(%rax)
sete %al
retq
xorl %eax, %eax
retq
movb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cfg.hpp
// Function: void spirv_cross::CFG::walk_from<spirv_cross::Compiler::analyze_variable_scope(spirv_cross::SPIRFunction&, spirv_cross::Compiler::AnalyzeVariableScopeAccessHandler&)::$_0>(std::unordered_set<unsigned int, std::hash<unsigned int>, std::equal_to<unsigned int>, std::allocator<unsigned int>>&, unsigned int, spirv_cross::Compiler::analyze_variable_scope(spirv_cross::SPIRFunction&, spirv_cross::Compiler::AnalyzeVariableScopeAccessHandler&)::$_0 const&) const
void walk_from(std::unordered_set<uint32_t> &seen_blocks, uint32_t block, const Op &op) const
	{
		if (seen_blocks.count(block))
			return;
		seen_blocks.insert(block);

		op(block);
		for (auto b : succeeding_edges[block])
			walk_from(seen_blocks, b, op);
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x4(%rsp), %rsi
movl %edx, (%rsi)
movq %r14, %rdi
callq 0x1f4b4
testq %rax, %rax
je 0x198b2
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x8(%rsp), %r12
movq %r14, (%r12)
leaq 0x4(%rsp), %r13
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1f510
movl (%r13), %eax
movl %eax, (%r12)
movq (%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x21122
testq %rax, %rax
je 0x198ef
movq 0x8(%rbx), %rax
movb $0x0, (%rax)
movl 0x4(%rsp), %eax
movq 0x28(%r15), %rcx
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %r12
movq 0x8(%rcx,%rax,8), %r13
cmpq %r13, %r12
je 0x198a4
movl (%r12), %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x1987a
addq $0x4, %r12
jmp 0x19904
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_common_basic_type(spirv_cross::SPIRType const&, spirv_cross::SPIRType::BaseType&)
bool Compiler::get_common_basic_type(const SPIRType &type, SPIRType::BaseType &base_type)
{
	if (type.basetype == SPIRType::Struct)
	{
		base_type = SPIRType::Unknown;
		for (auto &member_type : type.member_types)
		{
			SPIRType::BaseType member_base;
			if (!get_common_basic_type(get<SPIRType>(member_type), member_base))
				return false;

			if (base_type == SPIRType::Unknown)
				base_type = member_base;
			else if (base_type != member_base)
				return false;
		}
		return true;
	}
	else
	{
		base_type = type.basetype;
		return true;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl 0xc(%rsi), %eax
cmpl $0xc, %eax
jne 0x199c1
movl $0x0, (%r14)
movq 0x68(%rsi), %r13
movq 0x70(%rsi), %rbp
movb $0x1, %bl
cmpq %rbp, %r13
je 0x199ca
movq %rdi, %r15
leaq 0x4(%rsp), %r12
movl (%r13), %esi
movq %r15, %rdi
callq 0xa3ea
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x19950
testb %al, %al
je 0x199c8
movl (%r14), %eax
movl 0x4(%rsp), %ecx
testl %eax, %eax
je 0x199b3
cmpl %ecx, %eax
je 0x199b6
jmp 0x199c8
movl %ecx, (%r14)
addq $0x4, %r13
cmpq %rbp, %r13
jne 0x19984
jmp 0x199ca
movl %eax, (%r14)
movb $0x1, %bl
jmp 0x199ca
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::update_active_builtins()
void Compiler::update_active_builtins()
{
	active_input_builtins.reset();
	active_output_builtins.reset();
	cull_distance_count = 0;
	clip_distance_count = 0;
	ActiveBuiltinHandler handler(*this);
	traverse_all_reachable_opcodes(get<SPIRFunction>(ir.default_entry_point), handler);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
movq %r14, 0x2d0(%rdi)
addq $0x2d8, %rdi            # imm = 0x2D8
callq 0xd500
movq %r14, 0x310(%rbx)
leaq 0x318(%rbx), %rdi
callq 0xd500
movq %r14, 0x350(%rbx)
leaq 0xe20ed(%rip), %rax     # 0xfc258
addq $0x10, %rax
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movq %rbx, 0x8(%r14)
movl 0x108(%rbx), %esi
movq %rbx, %rdi
callq 0xb98a
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x13dbc
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::has_active_builtin(spv::BuiltIn, spv::StorageClass)
bool Compiler::has_active_builtin(BuiltIn builtin, StorageClass storage)
{
	const Bitset *flags;
	switch (storage)
	{
	case StorageClassInput:
		flags = &active_input_builtins;
		break;
	case StorageClassOutput:
		flags = &active_output_builtins;
		break;

	default:
		return false;
	}
	return flags->get(builtin);
}

// Assembly:
cmpl $0x1, %edx
je 0x1a1b1
cmpl $0x3, %edx
jne 0x1a1e8
movl $0x310, %eax            # imm = 0x310
jmp 0x1a1b6
movl $0x2d0, %eax            # imm = 0x2D0
pushq %rax
addq %rax, %rdi
movl %esi, 0x4(%rsp)
cmpl $0x3f, %esi
ja 0x1a1cf
movq (%rdi), %rax
btq %rsi, %rax
setb %al
jmp 0x1a1e3
addq $0x8, %rdi
leaq 0x4(%rsp), %rsi
callq 0x1f4b4
testq %rax, %rax
setne %al
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::analyze_image_and_sampler_usage()
void Compiler::analyze_image_and_sampler_usage()
{
	CombinedImageSamplerDrefHandler dref_handler(*this);
	traverse_all_reachable_opcodes(get<SPIRFunction>(ir.default_entry_point), dref_handler);

	CombinedImageSamplerUsageHandler handler(*this, dref_handler.dref_combined_samplers);
	traverse_all_reachable_opcodes(get<SPIRFunction>(ir.default_entry_point), handler);
	comparison_ids = move(handler.comparison_ids);
	need_subpass_input = handler.need_subpass_input;

	// Forward information from separate images and samplers into combined image samplers.
	for (auto &combined : combined_image_samplers)
		if (comparison_ids.count(combined.sampler_id))
			comparison_ids.insert(combined.combined_id);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %r12
leaq 0xe20b1(%rip), %r15     # 0xfc2b8
addq $0x10, %r15
leaq 0x20(%rsp), %r14
movq %r15, -0x10(%r14)
movq %rdi, -0x8(%r14)
leaq 0x50(%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)
movl 0x108(%rdi), %esi
callq 0xb98a
leaq 0x10(%rsp), %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0x13dbc
leaq 0xe20bb(%rip), %rbx     # 0xfc318
addq $0x10, %rbx
leaq 0x70(%rsp), %rax
movq %rbx, -0x18(%rax)
movq %r12, -0x10(%rax)
movq %r14, -0x8(%rax)
leaq 0xa0(%rsp), %rax
movq %rax, -0x30(%rax)
movl $0x1, %ecx
movq %rcx, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0xa8(%rsp), %r14
leaq 0xd8(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
movb $0x0, 0x8(%rax)
movl 0x108(%r12), %esi
movq %r12, %rdi
callq 0xb98a
leaq 0x58(%rsp), %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0x13dbc
leaq 0x360(%r12), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x6728
movb 0xe0(%rsp), %al
movb %al, 0x398(%r12)
movq 0x1d8(%r12), %rbp
movq 0x1e0(%r12), %r14
cmpq %r14, %rbp
je 0x1a34a
leaq 0x8(%rsp), %r12
leaq 0x8(%rbp), %rsi
movq %r13, %rdi
callq 0x1f4b4
testq %rax, %rax
je 0x1a341
movq %r13, 0x8(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x1f510
addq $0xc, %rbp
cmpq %r14, %rbp
jne 0x1a31d
movq %rbx, 0x58(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0xd570
leaq 0x70(%rsp), %rdi
callq 0x1f41a
movq %r15, 0x10(%rsp)
leaq 0x20(%rsp), %rdi
callq 0xd570
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0xd549
jmp 0x1a396
movq %rax, %r12
jmp 0x1a3b5
movq %rax, %r12
movq %rbx, 0x58(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0xd570
leaq 0x70(%rsp), %rdi
callq 0x1f41a
movq %r15, 0x10(%rsp)
leaq 0x20(%rsp), %rdi
callq 0xd570
movq %r12, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::CombinedImageSamplerDrefHandler::handle(spv::Op, unsigned int const*, unsigned int)
bool Compiler::CombinedImageSamplerDrefHandler::handle(spv::Op opcode, const uint32_t *args, uint32_t)
{
	// Mark all sampled images which are used with Dref.
	switch (opcode)
	{
	case OpImageSampleDrefExplicitLod:
	case OpImageSampleDrefImplicitLod:
	case OpImageSampleProjDrefExplicitLod:
	case OpImageSampleProjDrefImplicitLod:
	case OpImageSparseSampleProjDrefImplicitLod:
	case OpImageSparseSampleDrefImplicitLod:
	case OpImageSparseSampleProjDrefExplicitLod:
	case OpImageSparseSampleDrefExplicitLod:
	case OpImageDrefGather:
	case OpImageSparseDrefGather:
		dref_combined_samplers.insert(args[2]);
		return true;

	default:
		break;
	}

	return true;
}

// Assembly:
leal -0x59(%rsi), %eax
cmpl $0x8, %eax
jbe 0x1a3eb
addl $0xfffffecd, %esi       # imm = 0xFFFFFECD
cmpl $0x8, %esi
ja 0x1a413
movl $0x133, %eax            # imm = 0x133
btl %esi, %eax
jb 0x1a3f5
jmp 0x1a413
movl $0x133, %ecx            # imm = 0x133
btl %eax, %ecx
jae 0x1a3d4
pushq %rax
addq $0x10, %rdi
addq $0x8, %rdx
movq %rsp, %rax
movq %rdi, (%rax)
movq %rdx, %rsi
movq %rax, %rdx
callq 0x1f510
addq $0x8, %rsp
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::CFGBuilder::follow_function_call(spirv_cross::SPIRFunction const&)
bool Compiler::CFGBuilder::follow_function_call(const SPIRFunction &func)
{
	if (function_cfgs.find(func.self) == end(function_cfgs))
	{
		function_cfgs[func.self].reset(new CFG(compiler, func));
		return true;
	}
	else
		return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r12
leaq 0x10(%rdi), %r15
leaq 0x8(%rsi), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x23544
movq %rax, %rbx
testq %rax, %rax
jne 0x1a856
movq %r15, %rdi
movq %r13, %rsi
callq 0x236f2
movq %rax, %r15
movl $0x90, %edi
callq 0x6250
movq %rax, %r13
movq 0x8(%r12), %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x718c
movq (%r15), %rsi
movq %r13, (%r15)
testq %rsi, %rsi
je 0x1a856
movq %r15, %rdi
callq 0xe060
testq %rbx, %rbx
sete %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x90, %esi
movq %r13, %rdi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::CombinedImageSamplerUsageHandler::begin_function_scope(unsigned int const*, unsigned int)
bool Compiler::CombinedImageSamplerUsageHandler::begin_function_scope(const uint32_t *args, uint32_t length)
{
	if (length < 3)
		return false;

	auto &func = compiler.get<SPIRFunction>(args[2]);
	const auto *arg = &args[3];
	length -= 3;

	for (uint32_t i = 0; i < length; i++)
	{
		auto &argument = func.arguments[i];
		dependency_hierarchy[argument.id].insert(arg[i]);
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0xc(%rsp)
cmpl $0x3, %edx
jb 0x1a901
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rdi
movl 0x8(%rsi), %esi
callq 0xb98a
movq %rax, %r12
movl 0xc(%rsp), %eax
addl $-0x3, %eax
je 0x1a901
addq $0xc, %r14
addq $0x18, %r15
movl %eax, %eax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rbp
xorl %ebx, %ebx
leaq 0x10(%rsp), %r13
movq 0x18(%r12), %rax
leaq (%rax,%rbx), %rsi
addq $0x4, %rsi
movq %r15, %rdi
callq 0x23124
movq %rax, 0x10(%rsp)
movq %rax, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1f510
addq $0x4, %r14
addq $0x14, %rbx
cmpq %rbx, %rbp
jne 0x1a8cc
cmpl $0x3, 0xc(%rsp)
setae %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::CombinedImageSamplerUsageHandler::add_hierarchy_to_comparison_ids(unsigned int)
void Compiler::CombinedImageSamplerUsageHandler::add_hierarchy_to_comparison_ids(uint32_t id)
{
	// Traverse the variable dependency hierarchy and tag everything in its path with comparison ids.
	comparison_ids.insert(id);
	for (auto &dep_id : dependency_hierarchy[id])
		add_hierarchy_to_comparison_ids(dep_id);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movl %esi, (%r14)
addq $0x50, %rdi
leaq 0x10(%rsp), %rdx
movq %rdi, (%rdx)
movq %r14, %rsi
callq 0x1f510
leaq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x23124
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x1a964
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x1a918
movq (%r14), %r14
jmp 0x1a94e
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::CombinedImageSamplerUsageHandler::handle(spv::Op, unsigned int const*, unsigned int)
bool Compiler::CombinedImageSamplerUsageHandler::handle(Op opcode, const uint32_t *args, uint32_t length)
{
	switch (opcode)
	{
	case OpAccessChain:
	case OpInBoundsAccessChain:
	case OpLoad:
	{
		if (length < 3)
			return false;
		dependency_hierarchy[args[1]].insert(args[2]);

		// Ideally defer this to OpImageRead, but then we'd need to track loaded IDs.
		// If we load an image, we're going to use it and there is little harm in declaring an unused gl_FragCoord.
		auto &type = compiler.get<SPIRType>(args[0]);
		if (type.image.dim == DimSubpassData)
			need_subpass_input = true;

		// If we load a SampledImage and it will be used with Dref, propagate the state up.
		if (dref_combined_samplers.count(args[1]) != 0)
			add_hierarchy_to_comparison_ids(args[1]);
		break;
	}

	case OpSampledImage:
	{
		if (length < 4)
			return false;

		uint32_t result_type = args[0];
		uint32_t result_id = args[1];
		auto &type = compiler.get<SPIRType>(result_type);
		if (type.image.depth || dref_combined_samplers.count(result_id) != 0)
		{
			// This image must be a depth image.
			uint32_t image = args[2];
			add_hierarchy_to_comparison_ids(image);

			// This sampler must be a SamplerComparisonState, and not a regular SamplerState.
			uint32_t sampler = args[3];
			add_hierarchy_to_comparison_ids(sampler);

			// Mark the OpSampledImage itself as being comparison state.
			comparison_ids.insert(result_id);
		}
		return true;
	}

	default:
		break;
	}

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rdi, %r14
movb $0x1, %bl
leal -0x41(%rsi), %eax
cmpl $0x2, %eax
jb 0x1a991
cmpl $0x56, %esi
je 0x1a9f6
cmpl $0x3d, %esi
jne 0x1a9fd
cmpl $0x3, %ecx
jb 0x1a9fb
leaq 0x18(%r14), %rdi
leaq 0x4(%r15), %r12
movq %r12, %rsi
callq 0x23124
leaq 0x8(%r15), %rsi
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq %rax, %rdi
callq 0x1f510
movq 0x8(%r14), %rdi
movl (%r15), %esi
callq 0xa3ea
cmpl $0x6, 0x84(%rax)
jne 0x1a9d7
movb $0x1, 0x88(%r14)
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0x1f4b4
testq %rax, %rax
je 0x1a9fd
movl (%r12), %esi
movq %r14, %rdi
callq 0x1a918
jmp 0x1a9fd
cmpl $0x4, %ecx
jae 0x1aa0b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl (%r15), %esi
movl 0x4(%r15), %eax
movl %eax, 0xc(%rsp)
movq 0x8(%r14), %rdi
callq 0xa3ea
cmpb $0x0, 0x88(%rax)
jne 0x1aa3b
movq 0x10(%r14), %rdi
leaq 0xc(%rsp), %rsi
callq 0x1f4b4
testq %rax, %rax
je 0x1a9fd
movl 0x8(%r15), %esi
movq %r14, %rdi
callq 0x1a918
movl 0xc(%r15), %esi
movq %r14, %rdi
callq 0x1a918
addq $0x50, %r14
leaq 0x10(%rsp), %rdx
movq %r14, (%rdx)
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x1f510
jmp 0x1a9fd
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::buffer_is_hlsl_counter_buffer(unsigned int) const
bool Compiler::buffer_is_hlsl_counter_buffer(uint32_t id) const
{
	// First, check for the proper decoration.
	if (ir.meta.at(id).hlsl_is_magic_counter_buffer)
		return true;

	// Check for legacy fallback method.
	// FIXME: This should be deprecated eventually.

	if (ir.meta.at(id).hlsl_magic_counter_buffer_candidate)
	{
		auto *var = maybe_get<SPIRVariable>(id);
		// Ensure that this is actually a buffer object.
		return var && (var->storage == StorageClassStorageBuffer ||
		               has_decoration(get<SPIRType>(var->basetype).self, DecorationBufferBlock));
	}
	else
		return false;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %eax
movq 0x38(%rdi), %rcx
movq 0x40(%rdi), %rdi
subq %rcx, %rdi
sarq $0x3, %rdi
movabsq $-0x7063e7063e7063e7, %rdx # imm = 0x8F9C18F9C18F9C19
imulq %rdi, %rdx
cmpq %rax, %rdx
jbe 0x1aafb
imulq $0x148, %rax, %rax      # imm = 0x148
movb $0x1, %bpl
cmpb $0x0, 0x141(%rcx,%rax)
jne 0x1aaf2
addq %rax, %rcx
cmpb $0x1, 0x140(%rcx)
jne 0x1aaf0
movq %rbx, %rdi
callq 0x1b5ca
testq %rax, %rax
je 0x1aaf0
cmpl $0xc, 0x10(%rax)
je 0x1aaf2
movl 0xc(%rax), %esi
movq %rbx, %rdi
callq 0x1b382
movl 0x8(%rax), %esi
addq $0x8, %rbx
movq %rbx, %rdi
movl $0x3, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2492a
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x99617(%rip), %rdi     # 0xb4119
movq %rax, %rsi
xorl %eax, %eax
callq 0x63d0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::buffer_get_hlsl_counter_buffer(unsigned int, unsigned int&) const
bool Compiler::buffer_get_hlsl_counter_buffer(uint32_t id, uint32_t &counter_id) const
{
	// First, check for the proper decoration.
	if (ir.meta[id].hlsl_magic_counter_buffer != 0)
	{
		counter_id = ir.meta[id].hlsl_magic_counter_buffer;
		return true;
	}

	// Check for legacy fallback method.
	// FIXME: This should be deprecated eventually.

	auto &name = get_name(id);
	uint32_t id_bound = get_current_id_bound();
	for (uint32_t i = 0; i < id_bound; i++)
	{
		if (ir.meta[i].hlsl_magic_counter_buffer_candidate && ir.meta[i].hlsl_magic_counter_buffer_name == name)
		{
			auto *var = maybe_get<SPIRVariable>(i);
			// Ensure that this is actually a buffer object.
			if (var && (var->storage == StorageClassStorageBuffer ||
			            has_decoration(get<SPIRType>(var->basetype).self, DecorationBufferBlock)))
			{
				counter_id = i;
				return true;
			}
		}
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %esi
movq 0x38(%rdi), %r13
imulq $0x148, %rsi, %rax      # imm = 0x148
movl 0x144(%r13,%rax), %r15d
testl %r15d, %r15d
je 0x1ab3e
movl %r15d, (%rbx)
movb $0x1, %al
jmp 0x1ac09
movq %rdi, %r14
movq 0x40(%rdi), %rcx
subq %r13, %rcx
sarq $0x3, %rcx
movabsq $-0x7063e7063e7063e7, %rdx # imm = 0x8F9C18F9C18F9C19
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0x1ac18
movq 0x28(%r14), %rcx
subq 0x20(%r14), %rcx
shrq $0x4, %rcx
testl %ecx, %ecx
je 0x1ac07
addq %rax, %r13
leaq 0x8(%r14), %rax
movq %rax, (%rsp)
movl %ecx, %ebp
movl $0x140, %r12d           # imm = 0x140
xorl %r15d, %r15d
movq 0x38(%r14), %rax
cmpb $0x1, (%rax,%r12)
jne 0x1abf8
movq -0x18(%rax,%r12), %rdx
cmpq 0x8(%r13), %rdx
jne 0x1abf8
testq %rdx, %rdx
je 0x1abba
movq (%r13), %rsi
movq -0x20(%rax,%r12), %rdi
callq 0x6280
testl %eax, %eax
jne 0x1abf8
movq %r14, %rdi
movl %r15d, %esi
callq 0x1b5ca
testq %rax, %rax
je 0x1abf8
cmpl $0xc, 0x10(%rax)
je 0x1ab34
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0x1b382
movl 0x8(%rax), %esi
movq (%rsp), %rdi
movl $0x3, %edx
callq 0x2492a
testb %al, %al
jne 0x1ab34
incq %r15
addq $0x148, %r12            # imm = 0x148
cmpq %r15, %rbp
jne 0x1ab8d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x994fa(%rip), %rdi     # 0xb4119
xorl %eax, %eax
callq 0x63d0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::combined_decoration_for_member(spirv_cross::SPIRType const&, unsigned int) const
Bitset Compiler::combined_decoration_for_member(const SPIRType &type, uint32_t index) const
{
	Bitset flags;
	auto &memb = ir.meta[type.self].members;
	if (index >= memb.size())
		return flags;
	auto &dec = memb[index];

	// If our type is a struct, traverse all the members as well recursively.
	flags.merge_or(dec.decoration_flags);
	for (uint32_t i = 0; i < type.member_types.size(); i++)
		flags.merge_or(combined_decoration_for_member(get<SPIRType>(type.member_types[i]), i));

	return flags;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq $0x0, (%rdi)
leaq 0x38(%rdi), %rax
movq %rax, 0x8(%rdi)
movq $0x1, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movl $0x3f800000, 0x28(%rdi) # imm = 0x3F800000
movq %rdi, 0x8(%rsp)
movups %xmm0, 0x30(%rdi)
movl 0x8(%rdx), %eax
movq 0x38(%rsi), %rdx
imulq $0x148, %rax, %rsi      # imm = 0x148
movl %ecx, %ecx
movq 0xd0(%rdx,%rsi), %rax
movq 0xd8(%rdx,%rsi), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
movabsq $0x4ec4ec4ec4ec4ec5, %rsi # imm = 0x4EC4EC4EC4EC4EC5
imulq %rdx, %rsi
cmpq %rcx, %rsi
jbe 0x1b0dc
movq 0x8(%rsp), %rsi
leaq 0x8(%rsi), %r12
imulq $0xd0, %rcx, %rcx
movq 0x60(%rax,%rcx), %rdx
movq %rdx, (%rsi)
movq 0x78(%rax,%rcx), %rbp
testq %rbp, %rbp
je 0x1b05e
leaq 0x18(%rsp), %r13
leaq 0x8(%rbp), %rsi
movq %r12, 0x18(%rsp)
movq %r12, %rdi
movq %r13, %rdx
callq 0x1f510
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x1b041
movq 0x68(%r14), %rax
cmpq %rax, 0x70(%r14)
je 0x1b0dc
xorl %ebp, %ebp
leaq 0x10(%rsp), %r13
movl (%rax,%rbp,4), %esi
movq %r15, %rdi
callq 0x1b382
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x1af9a
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
orq %rax, (%rcx)
movq 0x30(%rsp), %rbx
testq %rbx, %rbx
je 0x1b0bc
leaq 0x8(%rbx), %rsi
movq %r12, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rdx
callq 0x1f510
movq (%rbx), %rbx
jmp 0x1b09e
leaq 0x20(%rsp), %rdi
callq 0xd570
incl %ebp
movq 0x68(%r14), %rax
movq 0x70(%r14), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbp, %rcx
ja 0x1b06f
movq 0x8(%rsp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1b0f2
movq %rax, %rbx
jmp 0x1b104
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xd570
movq %r12, %rdi
callq 0xd570
movq %rbx, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross.hpp
// Function: spirv_cross::SPIRVariable const* spirv_cross::Compiler::maybe_get<spirv_cross::SPIRVariable>(unsigned int) const
const T *maybe_get(uint32_t id) const
	{
		if (ir.ids.at(id).get_type() == T::type)
			return &get<T>(id);
		else
			return nullptr;
	}

// Assembly:
movl %esi, %eax
movq 0x20(%rdi), %rcx
movq 0x28(%rdi), %rdx
subq %rcx, %rdx
sarq $0x4, %rdx
cmpq %rax, %rdx
jbe 0x1b5f2
shlq $0x4, %rax
cmpl $0x2, 0x8(%rcx,%rax)
je 0x1b45e
xorl %eax, %eax
retq
pushq %rax
leaq 0x98b1f(%rip), %rdi     # 0xb4119
movq %rax, %rsi
xorl %eax, %eax
callq 0x63d0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_common.hpp
// Function: spirv_cross::Variant::operator=(spirv_cross::Variant const&)
Variant &operator=(const Variant &other)
	{
#ifdef SPIRV_CROSS_COPY_CONSTRUCTOR_SANITIZE
		abort();
#endif
		if (this != &other)
		{
			holder.reset();
			if (other.holder)
				holder = other.holder->clone();
			type = other.type;
			allow_type_rewrite = other.allow_type_rewrite;
		}
		return *this;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x1ccba
movq %rsi, %r14
movq (%rbx), %rdi
movq $0x0, (%rbx)
testq %rdi, %rdi
je 0x1cc6b
movq (%rdi), %rax
callq *0x8(%rax)
movq (%r14), %rsi
testq %rsi, %rsi
je 0x1ccac
movq (%rsi), %rax
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq *0x10(%rax)
movq (%r15), %rax
movq $0x0, (%r15)
movq (%rbx), %rdi
movq %rax, (%rbx)
testq %rdi, %rdi
je 0x1ccac
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1ccac
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movb 0xc(%r14), %al
movb %al, 0xc(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_common.hpp
// Function: spirv_cross::SPIRAccessChain& spirv_cross::variant_set<spirv_cross::SPIRAccessChain, unsigned int const&, spv::StorageClass const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned int&>(spirv_cross::Variant&, unsigned int const&, spv::StorageClass const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned int&)
T &variant_set(Variant &var, P &&... args)
{
	auto uptr = std::unique_ptr<T>(new T(std::forward<P>(args)...));
	auto ptr = uptr.get();
	var.set(std::move(uptr), T::type);
	return *ptr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %r15
movq %r8, %r13
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, 0x30(%rsp)
movl $0x68, %edi
callq 0x6250
movq %rax, %rbx
movl (%rbp), %ebp
movl (%r12), %r12d
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0xe456
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0xe456
movl (%r15), %r9d
leaq 0x10(%rsp), %rcx
leaq 0x38(%rsp), %r8
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x84a96
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x849d7
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x849f3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x8(%rsp), %rsi
movq %rbx, (%rsi)
movq 0x30(%rsp), %rdi
movl $0xc, %edx
callq 0x22712
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x84a1a
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x84a8e
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x84a8e
movq %rax, %r15
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x84a60
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x84a60
movq %rax, %r15
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x84a81
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x84a81
movq %rax, %r15
movl $0x68, %esi
movq %rbx, %rdi
callq 0x6260
movq %r15, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_common.hpp
// Function: spirv_cross::Variant::set(std::unique_ptr<spirv_cross::IVariant, std::default_delete<spirv_cross::IVariant>>, unsigned int)
void set(std::unique_ptr<IVariant> val, uint32_t new_type)
	{
		holder = std::move(val);
		if (!allow_type_rewrite && type != TypeNone && type != new_type)
			SPIRV_CROSS_THROW("Overwriting a variant with new type.");
		type = new_type;
		allow_type_rewrite = false;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movq %rdi, %r14
movq (%rsi), %rax
movq $0x0, (%rsi)
movq (%rdi), %rdi
movq %rax, (%r14)
testq %rdi, %rdi
je 0x2273c
movq (%rdi), %rax
callq *0x8(%rax)
cmpb $0x0, 0xc(%r14)
jne 0x22755
movl 0x8(%r14), %eax
testl %eax, %eax
sete %cl
cmpl %ebx, %eax
sete %al
orb %cl, %al
je 0x22769
movl %ebx, 0x8(%r14)
movb $0x0, 0xc(%r14)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x92b08(%rip), %rsi     # 0xb528e
leaq 0x92b25(%rip), %rdx     # 0xb52b2
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0xd961a(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xd95f2(%rip), %rsi     # 0xfbdb0
movq 0xda813(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x227e7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x227f1
jmp 0x227f9
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_cross_parsed_ir.cpp
// Function: spirv_cross::ParsedIR::get_member_name[abi:cxx11](unsigned int, unsigned int) const
const string &ParsedIR::get_member_name(uint32_t id, uint32_t index) const
{
	auto &m = meta[id];
	if (index >= m.members.size())
	{
		static string empty;
		return empty;
	}

	return m.members[index].alias;
}

// Assembly:
movl %esi, %eax
movq 0x30(%rdi), %rsi
movl %edx, %ecx
imulq $0x148, %rax, %rdx      # imm = 0x148
movq 0xd0(%rsi,%rdx), %rax
movq 0xd8(%rsi,%rdx), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
movabsq $0x4ec4ec4ec4ec4ec5, %rsi # imm = 0x4EC4EC4EC4EC4EC5
imulq %rdx, %rsi
cmpq %rcx, %rsi
jbe 0x23f8e
imulq $0xd0, %rcx, %rcx
addq %rcx, %rax
retq
movb 0xd9574(%rip), %al      # 0xfd508
testb %al, %al
je 0x23fa0
leaq 0xd9549(%rip), %rax     # 0xfd4e8
retq
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x6b08
movq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
nop