LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::continue_block_type(spirv_cross::SPIRBlock const&) const
SPIRBlock::ContinueBlockType Compiler::continue_block_type(const SPIRBlock &block) const
{
	// The block was deemed too complex during code emit, pick conservative fallback paths.
	if (block.complex_continue)
		return SPIRBlock::ComplexLoop;

	// In older glslang output continue block can be equal to the loop header.
	// In this case, execution is clearly branchless, so just assume a while loop header here.
	if (block.merge == SPIRBlock::MergeLoop)
		return SPIRBlock::WhileLoop;

	auto &dominator = get<SPIRBlock>(block.loop_dominator);

	if (execution_is_noop(block, dominator))
		return SPIRBlock::WhileLoop;
	else if (execution_is_branchless(block, dominator))
		return SPIRBlock::ForLoop;
	else
	{
		if (block.merge == SPIRBlock::MergeNone && block.terminator == SPIRBlock::Select &&
		    block.true_block == dominator.self && block.false_block == dominator.merge_block)
		{
			return SPIRBlock::DoWhileLoop;
		}
		else
			return SPIRBlock::ComplexLoop;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq $0x4
popq %r12
cmpb $0x0, 0xb1(%rsi)
je 0x1252a
movl %r12d, %ebp
jmp 0x1256e
movq %rsi, %rbx
pushq $0x2
popq %rbp
cmpl $0x1, 0x10(%rsi)
je 0x1256e
movq %rdi, %r15
movl 0xb4(%rbx), %esi
callq 0x6c24
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x12470
testb %al, %al
jne 0x1256e
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x124d2
testb %al, %al
je 0x12579
pushq $0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x10(%rbx)
jne 0x12525
cmpl $0x2, 0xc(%rbx)
jne 0x12525
movl 0x2c(%rbx), %eax
cmpl 0x8(%r14), %eax
jne 0x12525
movl 0x30(%rbx), %eax
cmpl 0x1c(%r14), %eax
jne 0x12525
pushq $0x3
jmp 0x1256d
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::traverse_all_reachable_opcodes(spirv_cross::SPIRBlock const&, spirv_cross::Compiler::OpcodeHandler&) const
bool Compiler::traverse_all_reachable_opcodes(const SPIRBlock &block, OpcodeHandler &handler) const
{
	handler.set_current_block(block);

	// Ideally, perhaps traverse the CFG instead of all blocks in order to eliminate dead blocks,
	// but this shouldn't be a problem in practice unless the SPIR-V is doing insane things like recursing
	// inside dead blocks ...
	for (auto &i : block.ops)
	{
		auto ops = stream(i);
		auto op = static_cast<Op>(i.op);

		if (!handler.handle(op, ops, i.length))
			return false;

		if (op == OpFunctionCall)
		{
			auto &func = get<SPIRFunction>(ops[2]);
			if (handler.follow_function_call(func))
			{
				if (!handler.begin_function_scope(ops, i.length))
					return false;
				if (!traverse_all_reachable_opcodes(get<SPIRFunction>(ops[2]), handler))
					return false;
				if (!handler.end_function_scope(ops, i.length))
					return false;
			}
		}
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq (%rdx), %rax
movq %rdx, %rdi
callq *0x20(%rax)
movq 0x38(%r12), %r15
movq 0x40(%r12), %r13
cmpq %r13, %r15
je 0x12668
movq %r14, %rdi
movq %r15, %rsi
callq 0x16f1e
movq %rax, %r12
movzwl (%r15), %ebp
movzwl %bp, %esi
movl 0x8(%r15), %ecx
movq (%rbx), %rax
movq %rbx, %rdi
movq %r12, %rdx
callq *0x10(%rax)
testb %al, %al
je 0x12668
cmpw $0x39, %bp
jne 0x1265f
movl 0x8(%r12), %esi
movq %r14, %rdi
callq 0x17146
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x18(%rcx)
testb %al, %al
je 0x1265f
movl 0x8(%r15), %edx
movq (%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
callq *0x28(%rax)
testb %al, %al
je 0x12668
movl 0x8(%r12), %esi
movq %r14, %rdi
callq 0x17146
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x1157c
testb %al, %al
je 0x12668
movl 0x8(%r15), %edx
movq (%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
callq *0x30(%rax)
testb %al, %al
je 0x12668
addq $0xc, %r15
jmp 0x125c3
cmpq %r13, %r15
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::type_struct_member_offset(spirv_cross::SPIRType const&, unsigned int) const
uint32_t Compiler::type_struct_member_offset(const SPIRType &type, uint32_t index) const
{
	// Decoration must be set in valid SPIR-V, otherwise throw.
	auto &dec = ir.meta[type.self].members.at(index);
	if (dec.decoration_flags.get(DecorationOffset))
		return dec.offset;
	else
		SPIRV_CROSS_THROW("Struct member does not have Offset set.");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl 0x8(%rsi), %eax
movq 0x38(%rdi), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
leaq (%rcx,%rax), %rdi
addq $0xd0, %rdi
movl %edx, %esi
callq 0x175ec
testb $0x8, 0x64(%rax)
je 0x126bb
movl 0xb4(%rax), %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x7d6c4(%rip), %rsi     # 0x8fd91
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 0xd46cb(%rip), %rsi     # 0xe6dc0
movq 0xd58e4(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x1271b
jmp 0x12723
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_cross.cpp
// Function: spirv_cross::Compiler::type_struct_member_array_stride(spirv_cross::SPIRType const&, unsigned int) const
uint32_t Compiler::type_struct_member_array_stride(const SPIRType &type, uint32_t index) const
{
	// Decoration must be set in valid SPIR-V, otherwise throw.
	// ArrayStride is part of the array type not OpMemberDecorate.
	auto &dec = ir.meta[type.member_types[index]].decoration;
	if (dec.decoration_flags.get(DecorationArrayStride))
		return dec.array_stride;
	else
		SPIRV_CROSS_THROW("Struct member does not have ArrayStride set.");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %edx, %eax
movq 0x68(%rsi), %rcx
movl (%rcx,%rax,4), %ecx
movq 0x38(%rdi), %rax
imulq $0x148, %rcx, %rcx      # imm = 0x148
testb $0x40, 0x60(%rax,%rcx)
je 0x12761
addq %rcx, %rax
movl 0xb8(%rax), %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x7d646(%rip), %rsi     # 0x8fdb9
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 0xd4625(%rip), %rsi     # 0xe6dc0
movq 0xd583e(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x127c1
jmp 0x127c9
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_cross.cpp
// Function: spirv_cross::Compiler::type_struct_member_matrix_stride(spirv_cross::SPIRType const&, unsigned int) const
uint32_t Compiler::type_struct_member_matrix_stride(const SPIRType &type, uint32_t index) const
{
	// Decoration must be set in valid SPIR-V, otherwise throw.
	// MatrixStride is part of OpMemberDecorate.
	auto &dec = ir.meta[type.self].members[index];
	if (dec.decoration_flags.get(DecorationMatrixStride))
		return dec.matrix_stride;
	else
		SPIRV_CROSS_THROW("Struct member does not have MatrixStride set.");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl 0x8(%rsi), %eax
movq 0x38(%rdi), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
movl %edx, %edx
movq 0xd0(%rcx,%rax), %rax
imulq $0xd0, %rdx, %rcx
testb $-0x80, 0x60(%rax,%rcx)
je 0x12812
addq %rcx, %rax
movl 0xbc(%rax), %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x7d5c2(%rip), %rsi     # 0x8fde6
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 0xd4574(%rip), %rsi     # 0xe6dc0
movq 0xd578d(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x12872
jmp 0x1287a
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::BufferAccessHandler::handle(spv::Op, unsigned int const*, unsigned int)
bool Compiler::BufferAccessHandler::handle(Op opcode, const uint32_t *args, uint32_t length)
{
	if (opcode != OpAccessChain && opcode != OpInBoundsAccessChain)
		return true;

	// Invalid SPIR-V.
	if (length < 4)
		return false;

	if (args[2] != id)
		return true;

	// Don't bother traversing the entire access chain tree yet.
	// If we access a struct member, assume we access the entire member.
	uint32_t index = compiler.get<SPIRConstant>(args[3]).scalar();

	// Seen this index already.
	if (seen.find(index) != end(seen))
		return true;
	seen.insert(index);

	auto &type = compiler.expression_type(id);
	uint32_t offset = compiler.type_struct_member_offset(type, index);

	size_t range;
	// If we have another member in the struct, deduce the range by looking at the next member.
	// This is okay since structs in SPIR-V can have padding, but Offset decoration must be
	// monotonically increasing.
	// Of course, this doesn't take into account if the SPIR-V for some reason decided to add
	// very large amounts of padding, but that's not really a big deal.
	if (index + 1 < type.member_types.size())
	{
		range = compiler.type_struct_member_offset(type, index + 1) - offset;
	}
	else
	{
		// No padding, so just deduce it from the size of the member directly.
		range = compiler.get_declared_struct_member_size(type, index);
	}

	ranges.push_back({ index, offset, range });
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
addl $-0x43, %esi
movb $0x1, %bl
cmpl $-0x2, %esi
jb 0x12d53
cmpl $0x4, %ecx
jae 0x12c96
xorl %ebx, %ebx
jmp 0x12d53
movq %rdi, %r14
movl 0x8(%rdx), %eax
cmpl 0x18(%rdi), %eax
jne 0x12d53
movq 0x8(%r14), %rdi
movl 0xc(%rdx), %esi
callq 0x1708c
movl 0x10(%rax), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x20(%r14), %r15
movq %r15, %rdi
callq 0x1c722
testq %rax, %rax
jne 0x12d53
leaq 0x4(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x1af30
movq 0x8(%r14), %rdi
movl 0x18(%r14), %esi
callq 0x104b0
movq %rax, %r15
movq 0x8(%r14), %rdi
movl (%r12), %edx
movq %rax, %rsi
callq 0x1267e
movl %eax, %ebp
movl (%r12), %edx
movq 0x70(%r15), %rcx
subq 0x68(%r15), %rcx
leal 0x1(%rdx), %eax
sarq $0x2, %rcx
movq 0x8(%r14), %rdi
cmpq %rax, %rcx
jbe 0x12d2c
movq %r15, %rsi
movl %eax, %edx
callq 0x1267e
subl %ebp, %eax
jmp 0x12d35
movq (%rdi), %rax
movq %r15, %rsi
callq *0x30(%rax)
movq 0x10(%r14), %rdi
movl 0x4(%rsp), %ecx
leaq 0x8(%rsp), %rsi
movl %ecx, (%rsi)
movl %ebp, %ecx
movq %rcx, 0x8(%rsi)
movq %rax, 0x10(%rsi)
callq 0x1c740
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_active_buffer_ranges(unsigned int) const
std::vector<BufferRange> Compiler::get_active_buffer_ranges(uint32_t id) const
{
	std::vector<BufferRange> ranges;
	BufferAccessHandler handler(*this, ranges, id);
	traverse_all_reachable_opcodes(get<SPIRFunction>(ir.default_entry_point), handler);
	return ranges;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0xd4367(%rip), %rax     # 0xe70e8
addq $0x10, %rax
leaq 0x50(%rsp), %rcx
movq %rax, -0x50(%rcx)
movq %rsi, -0x48(%rcx)
movq %rdi, -0x40(%rcx)
movl %edx, -0x38(%rcx)
movq %rcx, -0x30(%rcx)
movq $0x1, -0x28(%rcx)
movups %xmm0, -0x20(%rcx)
movl $0x3f800000, -0x10(%rcx) # imm = 0x3F800000
movups %xmm0, -0x8(%rcx)
movl 0x108(%rsi), %esi
movq %r14, %rdi
callq 0x17146
movq %rsp, %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1157c
movq %rsp, %rdi
callq 0x1763c
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x1763c
movq %rbx, %rdi
callq 0x1c8e6
movq %r14, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::types_are_logically_equivalent(spirv_cross::SPIRType const&, spirv_cross::SPIRType const&) const
bool Compiler::types_are_logically_equivalent(const SPIRType &a, const SPIRType &b) const
{
	if (a.basetype != b.basetype)
		return false;
	if (a.width != b.width)
		return false;
	if (a.vecsize != b.vecsize)
		return false;
	if (a.columns != b.columns)
		return false;
	if (a.array.size() != b.array.size())
		return false;

	size_t array_count = a.array.size();
	if (array_count && memcmp(a.array.data(), b.array.data(), array_count * sizeof(uint32_t)) != 0)
		return false;

	if (a.basetype == SPIRType::Image || a.basetype == SPIRType::SampledImage)
	{
		if (memcmp(&a.image, &b.image, sizeof(SPIRType::Image)) != 0)
			return false;
	}

	if (a.member_types.size() != b.member_types.size())
		return false;

	size_t member_types = a.member_types.size();
	for (size_t i = 0; i < member_types; i++)
	{
		if (!types_are_logically_equivalent(get<SPIRType>(a.member_types[i]), get<SPIRType>(b.member_types[i])))
			return false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0xc(%rsi), %ebp
cmpl 0xc(%rdx), %ebp
jne 0x12ef2
movq %rdx, %rbx
movq %rsi, %r14
movl 0x10(%rsi), %eax
cmpl 0x10(%rdx), %eax
jne 0x12ef2
movl 0x14(%r14), %eax
cmpl 0x14(%rbx), %eax
jne 0x12ef2
movl 0x18(%r14), %eax
cmpl 0x18(%rbx), %eax
jne 0x12ef2
movq %rdi, %r15
movq 0x20(%r14), %rdi
movq 0x28(%r14), %rax
movq %rax, %rdx
subq %rdi, %rdx
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rcx
subq %rsi, %rcx
cmpq %rcx, %rdx
jne 0x12ef2
cmpq %rdi, %rax
je 0x12e74
callq 0x62a0
testl %eax, %eax
jne 0x12ef2
addl $-0xd, %ebp
cmpl $0x1, %ebp
ja 0x12e8b
movl 0x80(%r14), %eax
cmpl 0x80(%rbx), %eax
jne 0x12ef2
movq 0x70(%r14), %rcx
subq 0x68(%r14), %rcx
movq 0x70(%rbx), %rax
subq 0x68(%rbx), %rax
cmpq %rax, %rcx
jne 0x12ef2
sarq $0x2, %rcx
xorl %r13d, %r13d
movq %rcx, (%rsp)
cmpq %r13, %rcx
sete %bpl
je 0x12ef4
movq 0x68(%r14), %rax
movl (%rax,%r13,4), %esi
movq %r15, %rdi
callq 0x16fc8
movq %rax, %r12
movq 0x68(%rbx), %rax
movl (%rax,%r13,4), %esi
movq %r15, %rdi
callq 0x16fc8
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x12dfe
movq (%rsp), %rcx
incq %r13
testb %al, %al
jne 0x12eab
jmp 0x12ef4
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::set_execution_mode(spv::ExecutionMode, unsigned int, unsigned int, unsigned int)
void Compiler::set_execution_mode(ExecutionMode mode, uint32_t arg0, uint32_t arg1, uint32_t arg2)
{
	auto &execution = get_entry_point();

	execution.flags.set(mode);
	switch (mode)
	{
	case ExecutionModeLocalSize:
		execution.workgroup_size.x = arg0;
		execution.workgroup_size.y = arg1;
		execution.workgroup_size.z = arg2;
		break;

	case ExecutionModeInvocations:
		execution.invocations = arg0;
		break;

	case ExecutionModeOutputVertices:
		execution.output_vertices = arg0;
		break;

	default:
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %r14d
movl %edx, %ebp
movl %esi, %r12d
callq 0x12fa4
movq %rax, %r15
leaq 0x60(%rax), %rdi
movl %r12d, %esi
callq 0x17654
testl %r12d, %r12d
je 0x12f94
cmpl $0x1a, %r12d
je 0x12f8b
cmpl $0x11, %r12d
jne 0x12f9b
movl %ebp, 0xa0(%r15)
movl %r14d, 0xa4(%r15)
movl %ebx, 0xa8(%r15)
jmp 0x12f9b
movl %ebp, 0xb4(%r15)
jmp 0x12f9b
movl %ebp, 0xb0(%r15)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_work_group_size_specialization_constants(spirv_cross::SpecializationConstant&, spirv_cross::SpecializationConstant&, spirv_cross::SpecializationConstant&) const
uint32_t Compiler::get_work_group_size_specialization_constants(SpecializationConstant &x, SpecializationConstant &y,
                                                                SpecializationConstant &z) const
{
	auto &execution = get_entry_point();
	x = { 0, 0 };
	y = { 0, 0 };
	z = { 0, 0 };

	if (execution.workgroup_size.constant != 0)
	{
		auto &c = get<SPIRConstant>(execution.workgroup_size.constant);

		if (c.m.c[0].id[0] != 0)
		{
			x.id = c.m.c[0].id[0];
			x.constant_id = get_decoration(c.m.c[0].id[0], DecorationSpecId);
		}

		if (c.m.c[0].id[1] != 0)
		{
			y.id = c.m.c[0].id[1];
			y.constant_id = get_decoration(c.m.c[0].id[1], DecorationSpecId);
		}

		if (c.m.c[0].id[2] != 0)
		{
			z.id = c.m.c[0].id[2];
			z.constant_id = get_decoration(c.m.c[0].id[2], DecorationSpecId);
		}
	}

	return execution.workgroup_size.constant;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %r14
callq 0x12f12
andq $0x0, (%rbp)
andq $0x0, (%r12)
andq $0x0, (%rbx)
movq %rax, %r15
movl 0xac(%rax), %esi
testl %esi, %esi
je 0x13076
movq %r14, %rdi
callq 0x1708c
movq %rax, %r13
movl 0x30(%rax), %eax
testl %eax, %eax
je 0x13035
movl %eax, (%rbp)
movl 0x30(%r13), %esi
leaq 0x8(%r14), %rdi
pushq $0x1
popq %rdx
callq 0x1fd2c
movl %eax, 0x4(%rbp)
movl 0x34(%r13), %eax
testl %eax, %eax
je 0x13056
movl %eax, (%r12)
movl 0x34(%r13), %esi
leaq 0x8(%r14), %rdi
pushq $0x1
popq %rdx
callq 0x1fd2c
movl %eax, 0x4(%r12)
movl 0x38(%r13), %eax
testl %eax, %eax
je 0x13076
movl %eax, (%rbx)
movl 0x38(%r13), %esi
addq $0x8, %r14
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x1fd2c
movl %eax, 0x4(%rbx)
movl 0xac(%r15), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_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
callq 0x12f12
movq %rax, %rcx
testl %ebp, %ebp
je 0x130c9
cmpl $0x1a, %ebp
je 0x130c1
xorl %eax, %eax
cmpl $0x11, %ebp
jne 0x130cf
cmpl $0x2, %ebx
je 0x130de
cmpl $0x1, %ebx
je 0x130d6
testl %ebx, %ebx
jne 0x130cf
movl 0xa0(%rcx), %eax
jmp 0x130cf
movl 0xb4(%rcx), %eax
jmp 0x130cf
movl 0xb0(%rcx), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl 0xa4(%rcx), %eax
jmp 0x130cf
movl 0xa8(%rcx), %eax
jmp 0x130cf
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::inherit_expression_dependencies(unsigned int, unsigned int)
void Compiler::inherit_expression_dependencies(uint32_t dst, uint32_t source_expression)
{
	// Don't inherit any expression dependencies if the expression in dst
	// is not a forwarded temporary.
	if (forwarded_temporaries.find(dst) == end(forwarded_temporaries) ||
	    forced_temporaries.find(dst) != end(forced_temporaries))
	{
		return;
	}

	auto &e = get<SPIRExpression>(dst);
	auto *phi = maybe_get<SPIRVariable>(source_expression);
	if (phi && phi->phi_variable)
	{
		// We have used a phi variable, which can change at the end of the block,
		// so make sure we take a dependency on this phi variable.
		phi->dependees.push_back(dst);
	}

	auto *s = maybe_get<SPIRExpression>(source_expression);
	if (!s)
		return;

	auto &e_deps = e.expression_dependencies;
	auto &s_deps = s->expression_dependencies;

	// If we depend on a expression, we also depend on all sub-dependencies from source.
	e_deps.push_back(source_expression);
	e_deps.insert(end(e_deps), begin(s_deps), end(s_deps));

	// Eliminate duplicated dependencies.
	sort(begin(e_deps), end(e_deps));
	e_deps.erase(unique(begin(e_deps), end(e_deps)), end(e_deps));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %r14
movq %rsp, %rax
movl %esi, (%rax)
movl %edx, 0x4(%rsp)
addq $0x260, %rdi            # imm = 0x260
movq %rax, %rsi
callq 0x1c722
testq %rax, %rax
je 0x13202
leaq 0x228(%r14), %rdi
movq %rsp, %rsi
callq 0x1c722
testq %rax, %rax
jne 0x13202
movl (%rsp), %esi
movq %r14, %rdi
callq 0x1704a
movq %rax, %rbx
movq %r14, %rdi
movl %ebp, %esi
callq 0xa9e4
testq %rax, %rax
je 0x1319f
cmpb $0x1, 0x5a(%rax)
jne 0x1319f
addq $0x40, %rax
movq %rsp, %rsi
movq %rax, %rdi
callq 0x6c06
movq %r14, %rdi
movl %ebp, %esi
callq 0x16fde
testq %rax, %rax
je 0x13202
movq %rax, %r15
movq %rbx, %r14
addq $0x40, %r14
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x6c06
movq 0x48(%rbx), %rsi
movq 0x40(%r15), %rdx
movq 0x48(%r15), %rcx
movq %r14, %rdi
callq 0x176a4
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rsi
callq 0x1cabb
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rsi
callq 0x1cebb
movq 0x48(%rbx), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x176c4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::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)
andq $0x0, 0x10(%rdi)
addq $0xe0, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x13240
leaq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0x176ca
jmp 0x1322a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xb98a
movq %r14, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_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 %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
addq $0xe0, %r14
leaq 0x8(%rsp), %r15
movq (%r14), %r14
testq %r14, %r14
je 0x132b8
leaq 0x38(%r14), %rsi
movq %r15, %rdi
callq 0x63c0
movl 0xc8(%r14), %eax
movl %eax, 0x28(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1d0dc
movq %r15, %rdi
callq 0x6548
jmp 0x13284
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
jmp 0x132d7
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x176f6
movq %r14, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_first_entry_point(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
SPIREntryPoint &Compiler::get_first_entry_point(const std::string &name)
{
	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; });

	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
movq %rsi, %r14
movq %rdi, %rbx
addq $0xe0, %rbx
leaq 0x40(%rsp), %r15
leaq 0x18(%rsp), %r12
leaq 0x10(%rsp), %r13
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x1338e
leaq 0x8(%rbx), %rsi
movq %r13, %rdi
callq 0x1d2dc
movq %r15, %rdi
movq %r14, %rsi
callq 0x17d0d
movl %eax, %ebp
movq %r12, %rdi
callq 0xc1b6
testb %bpl, %bpl
je 0x13347
addq $0x10, %rbx
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x7cb09(%rip), %rsi     # 0x8fea9
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 0xd39f8(%rip), %rsi     # 0xe6dc0
movq 0xd4c11(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x133ee
jmp 0x133f6
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::get_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 %rsi, %r14
movq %rdi, %rbx
addq $0xe0, %rbx
leaq 0x40(%rsp), %r15
leaq 0x18(%rsp), %r12
leaq 0x10(%rsp), %r13
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x134c0
leaq 0x8(%rbx), %rsi
movq %r13, %rdi
callq 0x1d2dc
movq %r15, %rdi
movq %r14, %rsi
callq 0x17d0d
testb %al, %al
je 0x1349d
movl 0xd0(%rsp), %ebp
movq %r12, %rdi
callq 0xc1b6
cmpl 0xc(%rsp), %ebp
jne 0x13463
jmp 0x134a7
movq %r12, %rdi
callq 0xc1b6
jmp 0x13463
addq $0x10, %rbx
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x7c9d7(%rip), %rsi     # 0x8fea9
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xd38c6(%rip), %rsi     # 0xe6dc0
movq 0xd4adf(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x13520
jmp 0x13528
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::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 %rsi, %r15
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)
movl %ecx, %r13d
pushq $0x4
popq %r12
xorl %r14d, %r14d
cmpq %r14, %r13
je 0x137d8
movq 0x8(%rsp), %rax
movl (%rax,%r14,4), %esi
movq %rbx, %rdi
callq 0x1381a
movl %eax, %ebp
movq 0x18(%r15), %rsi
addq %r12, %rsi
leaq 0x10(%rsp), %rdi
callq 0x1d40e
movl %ebp, (%rax)
incq %r14
addq $0x14, %r12
jmp 0x137a4
addq $0x10, %rbx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1d66e
leaq 0x10(%rsp), %rdi
callq 0xbbf6
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13804
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xbbf6
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1067e
testq %rax, %rax
je 0x1383b
movl 0x8(%rax), %ebp
movl %ebp, 0x4(%rsp)
movq 0x40(%rbx), %rdi
cmpq 0x20(%rbx), %rdi
je 0x13876
cmpq 0x48(%rbx), %rdi
jne 0x13858
movq 0x58(%rbx), %rax
movl $0x1f8, %edi            # imm = 0x1F8
addq -0x8(%rax), %rdi
addq $-0x38, %rdi
leaq 0x4(%rsp), %rbx
movq %rbx, %rsi
callq 0x1d98c
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_O2/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 0x138d5
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movl 0x8(%rsi), %esi
callq 0xa048
movq %rax, %r12
addq $0xc, %r15
leal -0x3(%rbx), %ecx
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1375e
addq $0x60, %r14
movq %rsp, %rsi
movq %r12, (%rsi)
movq %r14, %rdi
callq 0x1d9aa
cmpl $0x3, %ebx
setae %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::CombinedImageSamplerHandler::end_function_scope(unsigned int const*, unsigned int)
bool Compiler::CombinedImageSamplerHandler::end_function_scope(const uint32_t *args, uint32_t length)
{
	if (length < 3)
		return false;

	auto &callee = compiler.get<SPIRFunction>(args[2]);
	args += 3;

	// There are two types of cases we have to handle,
	// a callee might call sampler2D(texture2D, sampler) directly where
	// one or more parameters originate from parameters.
	// Alternatively, we need to provide combined image samplers to our callees,
	// and in this case we need to add those as well.

	pop_remap_parameters();

	// Our callee has now been processed at least once.
	// No point in doing it again.
	callee.do_combined_parameters = false;

	auto &params = functions.top()->combined_parameters;
	functions.pop();
	if (functions.empty())
		return true;

	auto &caller = *functions.top();
	if (caller.do_combined_parameters)
	{
		for (auto &param : params)
		{
			uint32_t image_id = param.global_image ? param.image_id : args[param.image_id];
			uint32_t sampler_id = param.global_sampler ? param.sampler_id : args[param.sampler_id];

			auto *i = compiler.maybe_get_backing_variable(image_id);
			auto *s = compiler.maybe_get_backing_variable(sampler_id);
			if (i)
				image_id = i->self;
			if (s)
				sampler_id = s->self;

			register_combined_image_sampler(caller, image_id, sampler_id, param.depth);
		}
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0x4(%rsp)
cmpl $0x3, %edx
jb 0x13a2a
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rdi
movl 0x8(%rsi), %esi
callq 0xa048
movq %rax, %rbx
leaq 0x10(%r15), %rdi
callq 0x1d92c
movb $0x0, 0xca(%rbx)
leaq 0x60(%r15), %rdi
movq 0x90(%r15), %rax
cmpq 0x98(%r15), %rax
jne 0x1394c
movq 0xa8(%r15), %rcx
movl $0x200, %eax            # imm = 0x200
addq -0x8(%rcx), %rax
movq -0x8(%rax), %rbx
callq 0x1dbde
movq 0x90(%r15), %rax
cmpq 0x70(%r15), %rax
je 0x13a2a
cmpq 0x98(%r15), %rax
jne 0x1397f
movq 0xa8(%r15), %rcx
movl $0x200, %eax            # imm = 0x200
addq -0x8(%rcx), %rax
movq -0x8(%rax), %rax
movq %rax, 0x10(%rsp)
cmpb $0x1, 0xca(%rax)
jne 0x13a2a
addq $0xc, %r14
movq 0x80(%rbx), %rax
movq 0x88(%rbx), %rcx
movq %rcx, 0x8(%rsp)
cmpq 0x8(%rsp), %rax
je 0x13a2a
leaq 0x4(%rax), %rcx
movl 0x4(%rax), %edx
movl 0x8(%rax), %esi
cmpb $0x0, 0xc(%rax)
leaq (%r14,%rdx,4), %rdx
cmovneq %rcx, %rdx
movl (%rdx), %ebp
leaq 0x8(%rax), %r12
leaq (%r14,%rsi,4), %rcx
cmpb $0x0, 0xd(%rax)
cmovneq %r12, %rcx
movl (%rcx), %r13d
movq 0x8(%r15), %rdi
movl %ebp, %esi
callq 0x1067e
movq %rax, %rbx
movq 0x8(%r15), %rdi
movl %r13d, %esi
callq 0x1067e
testq %rbx, %rbx
je 0x13a00
movl 0x8(%rbx), %ebp
testq %rax, %rax
je 0x13a09
movl 0x8(%rax), %r13d
movzbl 0x6(%r12), %r8d
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %edx
movl %r13d, %ecx
callq 0x13a42
addq $0x8, %r12
movq %r12, %rax
jmp 0x139ac
cmpl $0x3, 0x4(%rsp)
setae %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::build_dummy_sampler_for_combined_images()
uint32_t Compiler::build_dummy_sampler_for_combined_images()
{
	DummySamplerForCombinedImageHandler handler(*this);
	traverse_all_reachable_opcodes(get<SPIRFunction>(ir.default_entry_point), handler);
	if (handler.need_dummy_sampler)
	{
		uint32_t offset = ir.increase_bound_by(3);
		auto type_id = offset + 0;
		auto ptr_type_id = offset + 1;
		auto var_id = offset + 2;

		SPIRType sampler_type;
		auto &sampler = set<SPIRType>(type_id);
		sampler.basetype = SPIRType::Sampler;

		auto &ptr_sampler = set<SPIRType>(ptr_type_id);
		ptr_sampler = sampler;
		ptr_sampler.self = type_id;
		ptr_sampler.storage = StorageClassUniformConstant;
		ptr_sampler.pointer = true;

		set<SPIRVariable>(var_id, ptr_type_id, StorageClassUniformConstant, 0);
		set_name(var_id, "SPIRV_Cross_DummySampler");
		dummy_sampler_id = var_id;
		return var_id;
	}
	else
		return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
leaq 0xd2bad(%rip), %rax     # 0xe7208
addq $0x10, %rax
leaq 0x28(%rsp), %r15
movq %rax, (%r15)
movq %rdi, 0x8(%r15)
movb $0x0, 0x10(%r15)
movl 0x108(%rdi), %esi
callq 0xa048
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x1157c
xorl %r14d, %r14d
cmpb $0x1, 0x10(%r15)
jne 0x147e0
leaq 0x8(%rbx), %r15
pushq $0x3
popq %rsi
movq %r15, %rdi
callq 0x202bc
movl %eax, %r14d
leaq 0xd2d40(%rip), %rax     # 0xe73f0
addq $0x10, %rax
leaq 0x110(%rsp), %rcx
movq %rax, -0xd0(%rcx)
movaps 0x7b516(%rip), %xmm0    # 0x8fbe0
movups %xmm0, -0xc8(%rcx)
movl $0x1, -0xb8(%rcx)
andq $0x0, -0x88(%rcx)
leal 0x1(%r14), %ebp
andl $0x0, -0x80(%rcx)
movl %ebp, 0x4(%rsp)
andq $0x0, -0x78(%rcx)
movb $0x0, -0x70(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, -0xb0(%rcx)
movups %xmm0, -0xa0(%rcx)
andl $0x0, -0x90(%rcx)
movl $0x8, -0x6c(%rcx)
movups %xmm0, -0x68(%rcx)
andq $0x0, -0x58(%rcx)
andq $0x0, -0x38(%rcx)
movq %rcx, -0x30(%rcx)
movq $0x1, -0x28(%rcx)
movups %xmm0, -0x20(%rcx)
movl $0x3f800000, -0x10(%rcx) # imm = 0x3F800000
movups %xmm0, -0x8(%rcx)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x17718
movq %rax, %r12
movl $0xf, 0xc(%rax)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x17718
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
callq 0x173b0
movl %r14d, %eax
addl $0x2, %r14d
movl %eax, 0x8(%r13)
andl $0x0, 0x64(%r13)
movb $0x1, 0x60(%r13)
leaq 0x8(%rsp), %rcx
andl $0x0, (%rcx)
movq %rsp, %r8
andl $0x0, (%r8)
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x17734
leaq 0x7b87b(%rip), %rsi     # 0x90023
leaq 0x8(%rsp), %rdi
movq %rsp, %rdx
callq 0x6100
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
movl %r14d, %esi
callq 0x1f57e
leaq 0x8(%rsp), %rdi
callq 0x6548
movl %r14d, 0x39c(%rbx)
leaq 0x40(%rsp), %rdi
callq 0x17a3e
movl %r14d, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
jmp 0x1480d
jmp 0x1480a
jmp 0x1480a
jmp 0x1480a
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x17a3e
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1487d
cmpl $0x4, 0x8(%r14)
jne 0x14877
movq %r14, %rdi
callq 0xe202
movq 0x80(%rax), %rcx
cmpq %rcx, 0x88(%rax)
je 0x14862
movq %rcx, 0x88(%rax)
movq 0x30(%rax), %rcx
cmpq %rcx, 0x38(%rax)
je 0x14870
movq %rcx, 0x38(%rax)
movb $0x1, 0xca(%rax)
addq $0x10, %r14
jmp 0x14837
movq 0x1d8(%rbx), %rax
cmpq %rax, 0x1e0(%rbx)
je 0x14894
movq %rax, 0x1e0(%rbx)
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x17a7c
movl 0x108(%rbx), %esi
movq %rbx, %rdi
callq 0xa048
movq %rsp, %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1157c
movq %rsp, %rdi
callq 0x17ac8
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x17ac8
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq 0x20(%rsi), %r15
movq 0x28(%rsi), %r12
addq $0x8, %r14
pushq $0x1
popq %rbp
cmpq %r12, %r15
je 0x14967
cmpl $0x3, 0x8(%r15)
jne 0x14961
movq %r15, %rdi
callq 0x17af0
movq %rax, %r13
cmpb $0x1, 0x108(%rax)
jne 0x14961
movl 0x8(%r13), %esi
movq %r14, %rdi
movl %ebp, %edx
callq 0x1fcfa
testb %al, %al
je 0x14961
movl 0x8(%r13), %esi
movl %esi, (%rsp)
movq %r14, %rdi
movl %ebp, %edx
callq 0x1fd2c
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
movq %rsp, %rsi
callq 0x1e47a
addq $0x10, %r15
jmp 0x1490f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1497b
movq %rax, %r14
movq %rbx, %rdi
callq 0x1e446
movq %r14, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0xc(%rsp), %rax
movl %esi, (%rax)
movq %rdx, %rdi
movq %rax, %rsi
callq 0x1aefe
testq %rax, %rax
je 0x14a84
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0xc(%rsp), %eax
movq 0x28(%r14), %rcx
imulq $0x18, %rax, %rax
movq (%rcx,%rax), %r15
movq 0x8(%rcx,%rax), %r12
cmpq %r12, %r15
je 0x14abf
cmpq %r12, %r15
setne %bpl
je 0x14a75
movl (%r15), %esi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x14a4a
addq $0x4, %r15
testb %al, %al
je 0x14a9e
jmp 0x14a75
movb $0x1, %bpl
jmp 0x14a75
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::AnalyzeVariableScopeAccessHandler::set_current_block(spirv_cross::SPIRBlock const&)
void Compiler::AnalyzeVariableScopeAccessHandler::set_current_block(const SPIRBlock &block)
{
	current_block = &block;

	// If we're branching to a block which uses OpPhi, in GLSL
	// this will be a variable write when we branch,
	// so we need to track access to these variables as well to
	// have a complete picture.
	const auto test_phi = [this, &block](uint32_t to) {
		auto &next = compiler.get<SPIRBlock>(to);
		for (auto &phi : next.phi_variables)
		{
			if (phi.parent == block.self)
			{
				accessed_variables_to_block[phi.function_variable].insert(block.self);
				// Phi variables are also accessed in our target branch block.
				accessed_variables_to_block[phi.function_variable].insert(next.self);

				notify_variable_access(phi.local_variable, block.self);
			}
		}
	};

	switch (block.terminator)
	{
	case SPIRBlock::Direct:
		notify_variable_access(block.condition, block.self);
		test_phi(block.next_block);
		break;

	case SPIRBlock::Select:
		notify_variable_access(block.condition, block.self);
		test_phi(block.true_block);
		test_phi(block.false_block);
		break;

	case SPIRBlock::MultiSelect:
		notify_variable_access(block.condition, block.self);
		for (auto &target : block.cases)
			test_phi(target.block);
		if (block.default_block)
			test_phi(block.default_block);
		break;

	default:
		break;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rsi, 0x130(%rdi)
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movl 0xc(%rsi), %eax
cmpl $0x3, %eax
je 0x14bfc
cmpl $0x2, %eax
je 0x14bdf
cmpl $0x1, %eax
jne 0x14c42
movl 0x8(%rbx), %edx
movl 0x28(%rbx), %esi
callq 0x14c4e
movl 0x18(%rbx), %esi
jmp 0x14c38
movl 0x8(%rbx), %edx
movl 0x28(%rbx), %esi
callq 0x14c4e
movl 0x2c(%rbx), %esi
leaq 0x8(%rsp), %rdi
callq 0x14c9e
movl 0x30(%rbx), %esi
jmp 0x14c38
movl 0x8(%rbx), %edx
movl 0x28(%rbx), %esi
callq 0x14c4e
movq 0x98(%rbx), %r15
movq 0xa0(%rbx), %r12
leaq 0x8(%rsp), %r14
cmpq %r12, %r15
je 0x14c31
movl 0x4(%r15), %esi
movq %r14, %rdi
callq 0x14c9e
addq $0x8, %r15
jmp 0x14c1a
movl 0x34(%rbx), %esi
testl %esi, %esi
je 0x14c42
leaq 0x8(%rsp), %rdi
callq 0x14c9e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::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
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
movl %edx, (%rsp)
callq 0x14d3e
testb %al, %al
je 0x14c6a
pushq $0x18
jmp 0x14c7a
movq %rbx, %rdi
movl %ebp, %esi
callq 0x14d66
testb %al, %al
je 0x14c96
pushq $0x50
popq %rax
addq %rax, %rbx
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x1e658
movq %rsp, %rsi
movq %rax, %rdi
callq 0x1af30
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_cross.cpp
// Function: spirv_cross::Compiler::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 0x14d62
callq 0xa9e4
testq %rax, %rax
je 0x14d62
movb 0x5a(%rax), %al
jmp 0x14d64
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x14d95
movl %esi, %ecx
shlq $0x4, %rcx
cmpq $0x0, (%rax,%rcx)
je 0x14d98
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_O2/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 0x8(%rsp), %rsi
movl %edx, (%rsi)
movq %r14, %rdi
callq 0x1aeea
testq %rax, %rax
je 0x15aea
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x1af30
movl (%r12), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movq (%rbx), %rdi
callq 0x1c722
testq %rax, %rax
je 0x15b19
movq 0x8(%rbx), %rax
movb $0x0, (%rax)
movl 0x8(%rsp), %eax
movq 0x28(%r15), %rcx
imulq $0x18, %rax, %rax
movq (%rcx,%rax), %r12
movq 0x8(%rcx,%rax), %r13
cmpq %r13, %r12
je 0x15adc
movl (%r12), %edx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x15ab2
addq $0x4, %r12
jmp 0x15b2e
nop