LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::bitcast_to_builtin_store(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, spirv_cross::SPIRType const&)
void CompilerGLSL::bitcast_to_builtin_store(uint32_t target_id, std::string &expr,
                                            const spirv_cross::SPIRType &expr_type)
{
	// Only interested in standalone builtin variables.
	if (!has_decoration(target_id, DecorationBuiltIn))
		return;

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

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

	default:
		break;
	}

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rcx, %r15
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0xb, %edx
callq 0x12974
testb %al, %al
je 0x502cb
movq %r14, %rdi
movl %ebp, %esi
movl $0xb, %edx
callq 0x14e6e
cmpl $0xa, %eax
ja 0x502cb
movl $0x680, %ecx            # imm = 0x680
btl %eax, %ecx
jae 0x502cb
cmpl $0x4, 0xc(%r15)
je 0x502cb
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x1eafa
movl $0x4, 0xc(%r12)
movl 0xc(%r15), %ecx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %r8
callq 0x3db74
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x50243
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xac196(%rip), %rax     # 0xfc3e0
addq $0x10, %rax
leaq 0xc8(%rsp), %rbx
movq %rax, -0xa0(%rbx)
movq %rbx, %rdi
callq 0xde80
movq -0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x5027e
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x502b4
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x60(%rsp)
movl %eax, 0x68(%rsp)
movq %rax, 0x70(%rsp)
movl %eax, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x502cb
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1be02
movq %rbx, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_common.hpp
// Function: spirv_cross::merge(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
inline std::string merge(const std::vector<std::string> &list)
{
	std::string s;
	for (auto &elem : list)
	{
		s += elem;
		if (&elem != &list.back())
			s += ", ";
	}
	return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %r13
movq 0x8(%rsi), %rbp
cmpq %rbp, %r13
je 0x514e2
movq %rsi, %r14
leaq 0x68bfa(%rip), %r15     # 0xba0ab
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x8(%r14), %rax
addq $-0x20, %rax
cmpq %rax, %r13
je 0x514d9
movq %rbx, %rdi
movq %r15, %rsi
callq 0x64e0
addq $0x20, %r13
cmpq %rbp, %r13
jne 0x514b1
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x5150b
movq (%r12), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::emit_interface_block_globally(spirv_cross::SPIRVariable const&)
void CompilerHLSL::emit_interface_block_globally(const SPIRVariable &var)
{
	add_resource_name(var.self);

	// The global copies of I/O variables should not contain interpolation qualifiers.
	// These are emitted inside the interface structs.
	auto &flags = ir.meta[var.self].decoration.decoration_flags;
	auto old_flags = flags;
	flags.reset();
	statement("static ", variable_decl(var), ";");
	flags = old_flags;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r12
movq %rdi, %r15
movl 0x8(%rsi), %esi
callq 0x281be
movl 0x8(%r12), %eax
movq 0x38(%r15), %rcx
imulq $0x148, %rax, %rbp      # imm = 0x148
movq %rcx, (%rsp)
leaq (%rcx,%rbp), %r14
addq $0x68, %r14
movq -0x8(%r14), %rax
leaq 0x30(%rsp), %rbx
movq %rax, -0x8(%rbx)
xorl %r13d, %r13d
movq %r13, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
movq %r13, 0x10(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x18(%rbx)
movups 0x20(%r14), %xmm0
movups %xmm0, 0x20(%rbx)
movq %r13, 0x30(%rbx)
leaq 0x8(%rsp), %rdx
movq %rbx, (%rdx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd3c2
movq %r13, -0x8(%r14)
movq %r14, %rdi
callq 0xd500
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2c7ac
leaq 0x57ec1(%rip), %rsi     # 0xbba47
leaq 0x5af64(%rip), %rcx     # 0xbeaf1
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0x59372
movq (%rsp), %rax
leaq (%rax,%rbp), %r15
addq $0x60, %r15
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63bc1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x28(%rsp), %rax
movq (%rax), %rcx
movq %rcx, (%r15)
cmpq %r15, %rax
je 0x63bdc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d5b4
movq %rbx, %rdi
callq 0xd570
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x63c15
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63c18
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x63c18
movq %rax, %r14
movq %rbx, %rdi
callq 0xd570
movq %r14, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::type_to_consumed_locations(spirv_cross::SPIRType const&) const
uint32_t CompilerHLSL::type_to_consumed_locations(const SPIRType &type) const
{
	// TODO: Need to verify correctness.
	uint32_t elements = 0;

	if (type.basetype == SPIRType::Struct)
	{
		for (uint32_t i = 0; i < uint32_t(type.member_types.size()); i++)
			elements += type_to_consumed_locations(get<SPIRType>(type.member_types[i]));
	}
	else
	{
		uint32_t array_multiplier = 1;
		for (uint32_t i = 0; i < uint32_t(type.array.size()); i++)
		{
			if (type.array_size_literal[i])
				array_multiplier *= type.array[i];
			else
				array_multiplier *= get<SPIRConstant>(type.array[i]).scalar();
		}
		elements += array_multiplier * type.columns;
	}
	return elements;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movabsq $0x3fffffffc, %rsi      # imm = 0x3FFFFFFFC
cmpl $0xc, 0xc(%rbx)
jne 0x63f75
movq 0x68(%rbx), %rax
movq 0x70(%rbx), %rcx
subq %rax, %rcx
testq %rsi, %rcx
je 0x63fe3
xorl %r15d, %r15d
xorl %ebp, %ebp
movl (%rax,%r15,4), %esi
movq %r14, %rdi
callq 0x1b382
movq %r14, %rdi
movq %rax, %rsi
callq 0x63f0a
addl %eax, %ebp
incq %r15
movq 0x68(%rbx), %rax
movq 0x70(%rbx), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movl %ecx, %ecx
cmpq %rcx, %r15
jb 0x63f41
jmp 0x63fe5
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rdx
movq %rdx, %rax
subq %rcx, %rax
movl $0x1, %ebp
testq %rsi, %rax
je 0x63fdd
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x38(%rbx), %rax
movq %r12, %rsi
shrq $0x6, %rsi
movq (%rax,%rsi,8), %rsi
leaq (%rcx,%r15), %rax
btq %r12, %rsi
jb 0x63fc2
movl (%rax), %esi
movq %r14, %rdi
callq 0x1b4c6
addq $0x10, %rax
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rdx
imull (%rax), %ebp
incq %r12
movq %rdx, %rax
subq %rcx, %rax
shrq $0x2, %rax
movl %eax, %eax
addq $0x4, %r15
cmpq %rax, %r12
jb 0x63f93
imull 0x18(%rbx), %ebp
jmp 0x63fe5
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::to_interpolation_qualifiers[abi:cxx11](spirv_cross::Bitset const&)
string CompilerHLSL::to_interpolation_qualifiers(const Bitset &flags)
{
	string res;
	//if (flags & (1ull << DecorationSmooth))
	//    res += "linear ";
	if (flags.get(DecorationFlat))
		res += "nointerpolation ";
	if (flags.get(DecorationNoPerspective))
		res += "noperspective ";
	if (flags.get(DecorationCentroid))
		res += "centroid ";
	if (flags.get(DecorationPatch))
		res += "patch "; // Seems to be different in actual HLSL.
	if (flags.get(DecorationSample))
		res += "sample ";
	if (flags.get(DecorationInvariant))
		res += "invariant "; // Not supported?

	return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rdx), %rax
btl $0xe, %eax
jae 0x64029
leaq 0x57a31(%rip), %rsi     # 0xbba4f
movq %rbx, %rdi
callq 0x64e0
movq (%r14), %rax
btl $0xd, %eax
jae 0x64041
leaq 0x52a48(%rip), %rsi     # 0xb6a7e
movq %rbx, %rdi
callq 0x64e0
movq (%r14), %rax
btl $0x10, %eax
jae 0x64059
leaq 0x52a3f(%rip), %rsi     # 0xb6a8d
movq %rbx, %rdi
callq 0x64e0
movq (%r14), %rax
testw %ax, %ax
jns 0x64070
leaq 0x52a32(%rip), %rsi     # 0xb6a97
movq %rbx, %rdi
callq 0x64e0
movq (%r14), %rax
btl $0x11, %eax
jae 0x64088
leaq 0x52a21(%rip), %rsi     # 0xb6a9e
movq %rbx, %rdi
callq 0x64e0
movq (%r14), %rax
btl $0x12, %eax
jae 0x6409d
leaq 0x52a11(%rip), %rsi     # 0xb6aa6
movq %rbx, %rdi
callq 0x64e0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x640bc
movq (%r15), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::to_semantic[abi:cxx11](unsigned int)
std::string CompilerHLSL::to_semantic(uint32_t vertex_location)
{
	for (auto &attribute : remap_vertex_attributes)
		if (attribute.location == vertex_location)
			return attribute.semantic;

	return join("TEXCOORD", vertex_location);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl %edx, 0xc(%rsp)
movq 0x7b0(%rsi), %rax
movq 0x7b8(%rsi), %rcx
cmpq %rcx, %rax
je 0x640ed
cmpl %edx, (%rax)
je 0x64103
addq $0x28, %rax
jmp 0x640de
leaq 0x5796c(%rip), %rsi     # 0xbba60
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x519b0
jmp 0x6411d
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xe456
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::layout_for_member[abi:cxx11](spirv_cross::SPIRType const&, unsigned int)
string CompilerHLSL::layout_for_member(const SPIRType &type, uint32_t index)
{
	auto &flags = get_member_decoration_bitset(type.self, index);

	// HLSL can emit row_major or column_major decoration in any struct.
	// Do not try to merge combined decorations for children like in GLSL.

	// Flip the convention. HLSL is a bit odd in that the memory layout is column major ... but the language API is "row-major".
	// The way to deal with this is to multiply everything in inverse order, and reverse the memory layout.
	if (flags.get(DecorationColMajor))
		return "row_major ";
	else if (flags.get(DecorationRowMajor))
		return "column_major ";

	return "";
}

// Assembly:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
movl 0x8(%rdx), %esi
movq %rax, %rdi
movl %ecx, %edx
callq 0x14cf8
movq (%rax), %rax
testb $0x20, %al
jne 0x6752f
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
testb $0x10, %al
jne 0x67546
leaq 0x4d388(%rip), %rdx     # 0xb48af
movq %rbx, %rdi
movq %rdx, %rsi
jmp 0x67557
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x563cb(%rip), %rsi     # 0xbd908
leaq 0x563ce(%rip), %rdx     # 0xbd912
jmp 0x67554
leaq 0x563c6(%rip), %rsi     # 0xbd913
leaq 0x563cc(%rip), %rdx     # 0xbd920
movq %rbx, %rdi
callq 0x7be0
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::to_sampler_expression[abi:cxx11](unsigned int)
string CompilerHLSL::to_sampler_expression(uint32_t id)
{
	auto expr = join("_", to_expression(id));
	auto index = expr.find_first_of('[');
	if (index == string::npos)
	{
		return expr + "_sampler";
	}
	else
	{
		// We have an expression like _ident[array], so we cannot tack on _sampler, insert it inside the string instead.
		return expr.insert(index, "_sampler");
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x33f8a
leaq 0x55327(%rip), %rsi     # 0xbdfb7
movq %rsp, %rdi
movq %r14, %rdx
callq 0x57dbe
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x68cb6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rsp, %rdi
movl $0x5b, %esi
xorl %edx, %edx
callq 0x6340
cmpq $-0x1, %rax
je 0x68d00
leaq 0x54ded(%rip), %rcx     # 0xbdabf
movq %rsp, %rdi
movl $0x8, %r8d
movq %rax, %rsi
xorl %edx, %edx
callq 0x62c0
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xe456
jmp 0x68d2a
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xe456
leaq 0x54d9d(%rip), %rsi     # 0xbdabf
movq %rbx, %rdi
callq 0x64e0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x68d45
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x68d85
movq (%r15), %rsi
incq %rsi
callq 0x6260
jmp 0x68d85
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x68da0
movq 0x30(%rsp), %rsi
jmp 0x68d98
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x68da0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::to_func_call_arg[abi:cxx11](unsigned int)
string CompilerHLSL::to_func_call_arg(uint32_t id)
{
	string arg_str = CompilerGLSL::to_func_call_arg(id);

	if (hlsl_options.shader_model <= 30)
		return arg_str;

	// Manufacture automatic sampler arg if the arg is a SampledImage texture and we're in modern HLSL.
	auto &type = expression_type(id);

	// We don't have to consider combined image samplers here via OpSampledImage because
	// those variables cannot be passed as arguments to functions.
	// Only global SampledImage variables may be used as arguments.
	if (type.basetype == SPIRType::SampledImage && type.image.dim != DimBuffer)
		arg_str += ", " + to_sampler_expression(id);

	return arg_str;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x33f52
cmpl $0x1f, 0x788(%r14)
jb 0x68ecb
movq %r14, %rdi
movl %ebp, %esi
callq 0x12a72
cmpl $0xe, 0xc(%rax)
jne 0x68ecb
cmpl $0x5, 0x84(%rax)
je 0x68ecb
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x68c70
leaq 0x51277(%rip), %rcx     # 0xba0ab
leaq 0x28(%rsp), %rdi
movl $0x2, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x62c0
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x68e6f
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x68e79
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq %r15, %rsi
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x60b0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x68eb0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x68ecb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x68ef8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x68ef8
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x68f1a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x68f1a
jmp 0x68f17
movq %rax, %r14
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x68f31
movq (%rbx), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::emit_fixup()
void CompilerHLSL::emit_fixup()
{
	if (get_entry_point().model == ExecutionModelVertex)
	{
		// Do various mangling on the gl_Position.
		if (hlsl_options.shader_model <= 30)
		{
			statement("gl_Position.x = gl_Position.x - gl_HalfPixel.x * "
			          "gl_Position.w;");
			statement("gl_Position.y = gl_Position.y + gl_HalfPixel.y * "
			          "gl_Position.w;");
		}

		if (options.vertex.flip_vert_y)
			statement("gl_Position.y = -gl_Position.y;");
		if (options.vertex.fixup_clipspace)
			statement("gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5;");
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x15f76
cmpl $0x0, 0xb8(%rax)
jne 0x6a2e8
cmpl $0x1e, 0x788(%rbx)
ja 0x6a2b7
leaq 0x53984(%rip), %rsi     # 0xbdc24
movq %rbx, %rdi
callq 0x7a054
leaq 0x539b5(%rip), %rsi     # 0xbdc64
movq %rbx, %rdi
callq 0x7a054
cmpb $0x1, 0x443(%rbx)
jne 0x6a2cf
leaq 0x506a1(%rip), %rsi     # 0xba968
movq %rbx, %rdi
callq 0x587f2
cmpb $0x1, 0x442(%rbx)
jne 0x6a2e8
leaq 0x539c5(%rip), %rsi     # 0xbdca4
movq %rbx, %rdi
popq %rbx
jmp 0x7a15a
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::to_resource_binding_sampler[abi:cxx11](spirv_cross::SPIRVariable const&)
string CompilerHLSL::to_resource_binding_sampler(const SPIRVariable &var)
{
	// For combined image samplers.
	if (!has_decoration(var.self, DecorationBinding))
		return "";

	return to_resource_register('s', get_decoration(var.self, DecorationBinding),
	                            get_decoration(var.self, DecorationDescriptorSet));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rdx), %esi
movq %r14, %rdi
movl $0x21, %edx
callq 0x12974
testb %al, %al
je 0x6c3ed
movl 0x8(%r15), %esi
movq %r14, %rdi
movl $0x21, %edx
callq 0x14e6e
movl %eax, %ebp
movl 0x8(%r15), %esi
movq %r14, %rdi
movl $0x22, %edx
callq 0x14e6e
movq %rbx, %rdi
movq %r14, %rsi
movl $0x73, %edx
movl %ebp, %ecx
movl %eax, %r8d
callq 0x68bf6
jmp 0x6c406
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x484b4(%rip), %rdx     # 0xb48af
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x7be0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::emit_legacy_uniform(spirv_cross::SPIRVariable const&)
void CompilerHLSL::emit_legacy_uniform(const SPIRVariable &var)
{
	auto &type = get<SPIRType>(var.basetype);
	switch (type.basetype)
	{
	case SPIRType::Sampler:
	case SPIRType::Image:
		SPIRV_CROSS_THROW("Separate image and samplers not supported in legacy HLSL.");

	default:
		statement(variable_decl(var), ";");
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rsi), %esi
callq 0xa3ea
movl 0xc(%rax), %eax
orl $0x2, %eax
cmpl $0xf, %eax
je 0x6c956
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2c7ac
leaq 0x521cc(%rip), %rdx     # 0xbeaf1
movq %rbx, %rdi
movq %r15, %rsi
callq 0xaa14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c94b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
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 0x51661(%rip), %rsi     # 0xbdfd4
leaq 0x51693(%rip), %rdx     # 0xbe00d
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0x8f42d(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x8f405(%rip), %rsi     # 0xfbdb0
movq 0x90626(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ca06
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x6ca06
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6c9f4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x6c9fe
jmp 0x6ca06
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_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::emit_uniform(spirv_cross::SPIRVariable const&)
void CompilerHLSL::emit_uniform(const SPIRVariable &var)
{
	add_resource_name(var.self);
	if (hlsl_options.shader_model >= 40)
		emit_modern_uniform(var);
	else
		emit_legacy_uniform(var);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rsi), %esi
callq 0x281be
cmpl $0x28, 0x788(%r14)
jb 0x6ca3c
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6c414
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6c8e8
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::emit_load(spirv_cross::Instruction const&)
void CompilerHLSL::emit_load(const Instruction &instruction)
{
	auto ops = stream(instruction);

	auto *chain = maybe_get<SPIRAccessChain>(ops[2]);
	if (chain)
	{
		uint32_t result_type = ops[0];
		uint32_t id = ops[1];
		uint32_t ptr = ops[2];

		auto load_expr = read_access_chain(*chain);

		bool forward = should_forward(ptr) && forced_temporaries.find(id) == end(forced_temporaries);

		// Do not forward complex load sequences like matrices, structs and arrays.
		auto &type = get<SPIRType>(result_type);
		if (type.columns > 1 || !type.array.empty() || type.basetype == SPIRType::Struct)
			forward = false;

		auto &e = emit_op(result_type, id, load_expr, forward, true);
		e.need_transpose = false;
		register_read(id, ptr, forward);
	}
	else
		CompilerGLSL::emit_instruction(instruction);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1b2ac
movq %rax, %r15
movl 0x8(%rax), %esi
movq %rbx, %rdi
callq 0x1b3f0
testq %rax, %rax
je 0x6dd25
movl (%r15), %r14d
movl 0x4(%r15), %ecx
movl %ecx, 0x4(%rsp)
movl 0x8(%r15), %ebp
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x6d20a
movq %rbx, %rdi
movl %ebp, %esi
callq 0x39684
testb %al, %al
je 0x6dd3a
leaq 0x228(%rbx), %rdi
leaq 0x4(%rsp), %rsi
callq 0x21122
testq %rax, %rax
sete %r15b
jmp 0x6dd3d
movq %rbx, %rdi
movq %r14, %rsi
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x44260
xorl %r15d, %r15d
movq %rbx, %rdi
movl %r14d, %esi
callq 0xa3ea
cmpl $0x1, 0x18(%rax)
jbe 0x6dd53
xorl %r15d, %r15d
jmp 0x6dd63
movq 0x20(%rax), %rcx
cmpq 0x28(%rax), %rcx
jne 0x6dd4e
cmpl $0xc, 0xc(%rax)
je 0x6dd4e
movl 0x4(%rsp), %edx
movzbl %r15b, %r15d
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %r8d
movl $0x1, %r9d
callq 0x3942c
movb $0x0, 0x39(%rax)
movl 0x4(%rsp), %esi
movq %rbx, %rdi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x12cf8
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ddb4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6ddc5
jmp 0x6ddc5
jmp 0x6ddc5
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6dde3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::emit_store(spirv_cross::Instruction const&)
void CompilerHLSL::emit_store(const Instruction &instruction)
{
	auto ops = stream(instruction);
	auto *chain = maybe_get<SPIRAccessChain>(ops[0]);
	if (chain)
		write_access_chain(*chain, ops[1]);
	else
		CompilerGLSL::emit_instruction(instruction);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1b2ac
movq %rax, %r15
movl (%rax), %esi
movq %rbx, %rdi
callq 0x1b3f0
testq %rax, %rax
je 0x6e9c0
movl 0x4(%r15), %edx
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x6ddec
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x44260
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: create_sampler_address[abi:cxx11](char const*, spirv_cross::MSLSamplerAddress)
static string create_sampler_address(const char *prefix, MSLSamplerAddress addr)
{
	switch (addr)
	{
	case MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE:
		return join(prefix, "address::clamp_to_edge");
	case MSL_SAMPLER_ADDRESS_CLAMP_TO_ZERO:
		return join(prefix, "address::clamp_to_zero");
	case MSL_SAMPLER_ADDRESS_CLAMP_TO_BORDER:
		return join(prefix, "address::clamp_to_border");
	case MSL_SAMPLER_ADDRESS_REPEAT:
		return join(prefix, "address::repeat");
	case MSL_SAMPLER_ADDRESS_MIRRORED_REPEAT:
		return join(prefix, "address::mirrored_repeat");
	default:
		SPIRV_CROSS_THROW("Invalid sampler addressing mode.");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, (%rsp)
cmpl $0x4, %edx
ja 0x89312
movl %edx, %eax
leaq 0x365b5(%rip), %rcx     # 0xbf870
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x3a224(%rip), %rdx     # 0xc34ef
jmp 0x892ff
leaq 0x3a25b(%rip), %rdx     # 0xc352f
jmp 0x892dd
leaq 0x3a229(%rip), %rdx     # 0xc3506
movq %rsp, %rsi
callq 0xa6ec7
jmp 0x89307
leaq 0x3a231(%rip), %rdx     # 0xc351f
movq %rsp, %rsi
callq 0xa6f53
jmp 0x89307
leaq 0x3a1d9(%rip), %rdx     # 0xc34d8
movq %rsp, %rsi
callq 0xa6e3b
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 0x3a219(%rip), %rsi     # 0xc3548
leaq 0x3a232(%rip), %rdx     # 0xc3568
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0x72a71(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x72a49(%rip), %rsi     # 0xfbdb0
movq 0x73c6a(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x89390
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x8939a
jmp 0x893a2
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_msl.cpp
// Function: spirv_cross::CompilerMSL::get_argument_address_space[abi:cxx11](spirv_cross::SPIRVariable const&)
string CompilerMSL::get_argument_address_space(const SPIRVariable &argument)
{
	const auto &type = get<SPIRType>(argument.basetype);

	switch (type.storage)
	{
	case StorageClassWorkgroup:
		return "threadgroup";

	case StorageClassStorageBuffer:
	{
		bool readonly = ir.get_buffer_block_flags(argument).get(DecorationNonWritable);
		return readonly ? "const device" : "device";
	}

	case StorageClassUniform:
	case StorageClassUniformConstant:
	case StorageClassPushConstant:
		if (type.basetype == SPIRType::Struct)
		{
			bool ssbo = has_decoration(type.self, DecorationBufferBlock);
			if (ssbo)
			{
				bool readonly = ir.get_buffer_block_flags(argument).get(DecorationNonWritable);
				return readonly ? "const device" : "device";
			}
			else
				return "constant";
		}
		break;

	case StorageClassFunction:
	case StorageClassGeneric:
		// No address space for plain values.
		return type.pointer ? "thread" : "";

	default:
		break;
	}

	return "thread";
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0xc(%rdx), %esi
movq %r15, %rdi
callq 0xa3ea
movl 0x64(%rax), %ecx
cmpq $0xc, %rcx
ja 0x896c1
leaq 0x36247(%rip), %rdx     # 0xbf884
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0xc, 0xc(%rax)
jne 0x896c1
movl 0x8(%rax), %esi
movq %r15, %rdi
movl $0x3, %edx
callq 0x12974
testb %al, %al
je 0x89719
addq $0x8, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2460e
movl (%r12), %eax
btl $0x18, %eax
leaq 0x39794(%rip), %rcx     # 0xc2e1e
leaq 0x39787(%rip), %r14     # 0xc2e18
cmovaeq %rcx, %r14
leaq 0xc(%r14), %r15
leaq 0x6(%r14), %rcx
btl $0x18, %eax
leaq 0x10(%rsp), %rdi
cmovaeq %rcx, %r15
callq 0xd570
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
jmp 0x89731
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x39756(%rip), %rsi     # 0xc2e25
leaq 0x39755(%rip), %rdx     # 0xc2e2b
jmp 0x8972e
movb 0x60(%rax), %al
testb %al, %al
leaq 0x39741(%rip), %rcx     # 0xc2e25
leaq 0x2b1c4(%rip), %rsi     # 0xb48af
cmovneq %rcx, %rsi
leaq 0x6(%rsi), %rdx
testb %al, %al
cmoveq %rsi, %rdx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
jmp 0x8972e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x38e81(%rip), %rsi     # 0xc2591
leaq 0x38e85(%rip), %rdx     # 0xc259c
jmp 0x8972e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2d6ba(%rip), %rsi     # 0xb6de1
leaq 0x2d6bb(%rip), %rdx     # 0xb6de9
movq %rbx, %rdi
callq 0x7be0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::preprocess_op_codes()
void CompilerMSL::preprocess_op_codes()
{
	OpCodePreprocessor preproc(*this);
	traverse_all_reachable_opcodes(get<SPIRFunction>(ir.default_entry_point), preproc);

	if (preproc.suppress_missing_prototypes)
		add_pragma_line("#pragma clang diagnostic ignored \"-Wmissing-prototypes\"");

	if (preproc.uses_atomics)
	{
		add_header_line("#include <metal_atomic>");
		add_pragma_line("#pragma clang diagnostic ignored \"-Wunused-variable\"");
	}

	// Metal vertex functions that write to resources must disable rasterization and return void.
	if (preproc.uses_resource_write)
		is_rasterization_disabled = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %r14
leaq 0x72f7d(%rip), %r15     # 0xfcb18
addq $0x10, %r15
leaq 0x38(%rsp), %rbx
movq %r15, -0x10(%rbx)
movq %rdi, -0x8(%rbx)
leaq 0x68(%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 $0x0, 0x7(%rax)
movl 0x108(%rdi), %esi
callq 0xb98a
leaq 0x28(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x13dbc
cmpb $0x1, 0x70(%rsp)
jne 0x89c4f
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x3675a(%rip), %rsi     # 0xc0363
leaq 0x3678a(%rip), %rdx     # 0xc039a
leaq 0x8(%rsp), %rdi
callq 0x7be0
leaq 0x880(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0xa997c
testb $0x1, %dl
je 0x89c38
movb $0x1, 0x1d0(%r14)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x89c4f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
cmpb $0x1, 0x71(%rsp)
jne 0x89cf0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x36730(%rip), %rsi     # 0xc039b
leaq 0x36740(%rip), %rdx     # 0xc03b2
leaq 0x8(%rsp), %rdi
callq 0x7be0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x4caf8
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x89ca0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x36704(%rip), %rsi     # 0xc03b3
leaq 0x36731(%rip), %rdx     # 0xc03e7
callq 0x7be0
leaq 0x880(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0xa997c
testb $0x1, %dl
je 0x89cd9
movb $0x1, 0x1d0(%r14)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x89cf0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
cmpb $0x1, 0x72(%rsp)
jne 0x89cff
movb $0x1, 0x937(%r14)
movq %r15, 0x28(%rsp)
movq %rbx, %rdi
callq 0xdcda
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x89d20
jmp 0x89d3e
jmp 0x89d20
jmp 0x89d3e
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x89d41
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x89d41
jmp 0x89d3e
movq %rax, %r14
movq %r15, 0x28(%rsp)
movq %rbx, %rdi
callq 0xdcda
movq %r14, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::localize_global_variables()
void CompilerMSL::localize_global_variables()
{
	auto &entry_func = get<SPIRFunction>(ir.default_entry_point);
	auto iter = global_variables.begin();
	while (iter != global_variables.end())
	{
		uint32_t v_id = *iter;
		auto &var = get<SPIRVariable>(v_id);
		if (var.storage == StorageClassPrivate || var.storage == StorageClassWorkgroup)
		{
			entry_func.add_local_variable(v_id);
			iter = global_variables.erase(iter);
		}
		else
			iter++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x108(%rdi), %esi
callq 0xb98a
movq 0x118(%rbx), %r15
cmpq 0x120(%rbx), %r15
je 0x8c281
movq %rax, %r14
movq %rax, %r12
addq $0x48, %r12
leaq 0x4(%rsp), %r13
movl (%r15), %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0xb3ca
movl 0x10(%rax), %eax
orl $0x2, %eax
cmpl $0x6, %eax
jne 0x8c234
movl %ebp, 0x4(%rsp)
movq 0x50(%r14), %rsi
cmpq 0x58(%r14), %rsi
je 0x8c241
movl %ebp, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x50(%r14)
jmp 0x8c24c
addq $0x4, %r15
movq 0x120(%rbx), %rdx
jmp 0x8c27c
movq %r12, %rdi
movq %r13, %rdx
callq 0x797e
movq %r15, %rsi
addq $0x4, %rsi
movq 0x120(%rbx), %rdx
cmpq %rdx, %rsi
je 0x8c271
subq %rsi, %rdx
movq %r15, %rdi
callq 0x6430
movq 0x120(%rbx), %rdx
addq $-0x4, %rdx
movq %rdx, 0x120(%rbx)
cmpq %rdx, %r15
jne 0x8c202
addq $0x8, %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_msl.cpp
// Function: spirv_cross::CompilerMSL::extract_global_variables_from_functions()
void CompilerMSL::extract_global_variables_from_functions()
{
	// Uniforms
	unordered_set<uint32_t> global_var_ids;
	for (auto &id : ir.ids)
	{
		if (id.get_type() == TypeVariable)
		{
			auto &var = id.get<SPIRVariable>();
			if (var.storage == StorageClassInput || var.storage == StorageClassOutput ||
			    var.storage == StorageClassUniform || var.storage == StorageClassUniformConstant ||
			    var.storage == StorageClassPushConstant || var.storage == StorageClassStorageBuffer)
			{
				global_var_ids.insert(var.self);
			}
		}
	}

	// Local vars that are declared in the main function and accessed directly by a function
	auto &entry_func = get<SPIRFunction>(ir.default_entry_point);
	for (auto &var : entry_func.local_variables)
		if (get<SPIRVariable>(var).storage != StorageClassFunction)
			global_var_ids.insert(var);

	std::set<uint32_t> added_arg_ids;
	unordered_set<uint32_t> processed_func_ids;
	extract_global_variables_from_function(ir.default_entry_point, added_arg_ids, global_var_ids, processed_func_ids);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
leaq 0x70(%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)
movq 0x20(%rdi), %r14
movq 0x28(%rdi), %r13
cmpq %r13, %r14
je 0x8c31f
movl $0x120f, %ebp           # imm = 0x120F
leaq 0x40(%rsp), %r15
leaq 0x8(%rsp), %r12
cmpl $0x2, 0x8(%r14)
jne 0x8c316
movq %r14, %rdi
callq 0xb2a4
movl 0x10(%rax), %ecx
cmpl $0xc, %ecx
ja 0x8c316
btl %ecx, %ebp
jae 0x8c316
addq $0x8, %rax
movq %r15, 0x8(%rsp)
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x1f510
addq $0x10, %r14
cmpq %r13, %r14
jne 0x8c2e3
movl 0x108(%rbx), %esi
movq %rbx, %rdi
callq 0xb98a
movq 0x48(%rax), %r14
movq 0x50(%rax), %r13
cmpq %r13, %r14
je 0x8c371
leaq 0x40(%rsp), %r15
leaq 0x8(%rsp), %r12
movl (%r14), %esi
movq %rbx, %rdi
callq 0xb3ca
cmpl $0x7, 0x10(%rax)
je 0x8c368
movq %r15, 0x8(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1f510
addq $0x4, %r14
cmpq %r13, %r14
jne 0x8c344
leaq 0x80(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x38(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movl 0x108(%rbx), %esi
leaq 0x78(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
callq 0x8e244
leaq 0x8(%rsp), %rdi
callq 0xd570
leaq 0x78(%rsp), %rdi
callq 0xa70fa
leaq 0x40(%rsp), %rdi
callq 0xd570
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xd570
leaq 0x78(%rsp), %rdi
callq 0xa70fa
jmp 0x8c421
jmp 0x8c41e
jmp 0x8c41e
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xd570
movq %rbx, %rdi
callq 0x64a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::compile[abi:cxx11](std::vector<spirv_cross::MSLVertexAttr, std::allocator<spirv_cross::MSLVertexAttr>>*, std::vector<spirv_cross::MSLResourceBinding, std::allocator<spirv_cross::MSLResourceBinding>>*)
string CompilerMSL::compile(vector<MSLVertexAttr> *p_vtx_attrs, vector<MSLResourceBinding> *p_res_bindings)
{
	if (p_vtx_attrs)
	{
		vtx_attrs_by_location.clear();
		for (auto &va : *p_vtx_attrs)
			vtx_attrs_by_location[va.location] = &va;
	}

	if (p_res_bindings)
	{
		resource_bindings.clear();
		for (auto &rb : *p_res_bindings)
			resource_bindings.push_back(&rb);
	}

	return compile();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %rbx
testq %rdx, %rdx
je 0x8e178
movq %rdx, %rbp
leaq 0x810(%r14), %r12
movq %r12, %rdi
callq 0xa6d08
movq (%rbp), %r13
movq 0x8(%rbp), %rbp
cmpq %rbp, %r13
je 0x8e178
movq %r12, %rdi
movq %r13, %rsi
callq 0xa73d0
movq %r13, (%rax)
addq $0x14, %r13
jmp 0x8e15f
testq %r15, %r15
je 0x8e1df
movq 0x8f8(%r14), %rax
cmpq %rax, 0x900(%r14)
je 0x8e194
movq %rax, 0x900(%r14)
movq (%r15), %r13
movq 0x8(%r15), %rbp
cmpq %rbp, %r13
je 0x8e1df
leaq 0x8f8(%r14), %r15
movq %rsp, %r12
movq %r13, (%rsp)
movq 0x900(%r14), %rsi
cmpq 0x908(%r14), %rsi
je 0x8e1cb
movq %r13, (%rsi)
addq $0x8, 0x900(%r14)
jmp 0x8e1d6
movq %r15, %rdi
movq %r12, %rdx
callq 0xa765c
addq $0x1c, %r13
cmpq %rbp, %r13
jne 0x8e1aa
movq (%r14), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rax)
movq %rbx, %rax
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_msl.cpp
// Function: spirv_cross::CompilerMSL::mark_as_packable(spirv_cross::SPIRType&)
void CompilerMSL::mark_as_packable(SPIRType &type)
{
	// If this is not the base type (eg. it's a pointer or array), tunnel down
	if (type.parent_type)
	{
		mark_as_packable(get<SPIRType>(type.parent_type));
		return;
	}

	if (type.basetype == SPIRType::Struct)
	{
		set_decoration(type.self, DecorationCPacked);

		// Recurse
		size_t mbr_cnt = type.member_types.size();
		for (uint32_t mbr_idx = 0; mbr_idx < mbr_cnt; mbr_idx++)
		{
			uint32_t mbr_type_id = type.member_types[mbr_idx];
			auto &mbr_type = get<SPIRType>(mbr_type_id);
			mark_as_packable(mbr_type);
			if (mbr_type.type_alias)
			{
				auto &mbr_type_alias = get<SPIRType>(mbr_type.type_alias);
				mark_as_packable(mbr_type_alias);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x9c(%rsi), %esi
testl %esi, %esi
je 0x8eb41
movq %rbx, %rdi
callq 0xa3ea
movl 0x9c(%rax), %esi
testl %esi, %esi
jne 0x8eb2c
movq %rax, %r14
cmpl $0xc, 0xc(%r14)
jne 0x8ebb7
movl 0x8(%r14), %esi
movq %rbx, %rdi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x14d16
movq 0x70(%r14), %r12
movq 0x68(%r14), %rax
subq %rax, %r12
je 0x8ebb7
sarq $0x2, %r12
movl $0x1, %ebp
xorl %eax, %eax
movq 0x68(%r14), %rcx
movl (%rcx,%rax,4), %esi
movq %rbx, %rdi
callq 0xa3ea
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8eb14
movl 0x98(%r15), %esi
testl %esi, %esi
je 0x8ebae
movq %rbx, %rdi
callq 0xa3ea
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8eb14
movl %ebp, %eax
incl %ebp
cmpq %rax, %r12
ja 0x8eb73
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::mark_location_as_used_by_shader(unsigned int, spv::StorageClass)
void CompilerMSL::mark_location_as_used_by_shader(uint32_t location, StorageClass storage)
{
	MSLVertexAttr *p_va;
	if ((get_entry_point().model == ExecutionModelVertex) && (storage == StorageClassInput) &&
	    (p_va = vtx_attrs_by_location[location]))
		p_va->used_by_shader = true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
callq 0x15f76
cmpl $0x1, %ebp
jne 0x8ebff
cmpl $0x0, 0xb8(%rax)
jne 0x8ebff
addq $0x810, %rbx            # imm = 0x810
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0xa73d0
movq (%rax), %rax
testq %rax, %rax
je 0x8ebff
movb $0x1, 0x11(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::ensure_correct_builtin_type(unsigned int, spv::BuiltIn)
uint32_t CompilerMSL::ensure_correct_builtin_type(uint32_t type_id, BuiltIn builtin)
{
	auto &type = get<SPIRType>(type_id);

	if ((builtin == BuiltInSampleMask && is_array(type)) ||
	    ((builtin == BuiltInLayer || builtin == BuiltInViewportIndex) && type.basetype != SPIRType::UInt))
	{
		uint32_t next_id = ir.increase_bound_by(type.pointer ? 2 : 1);
		uint32_t base_type_id = next_id++;
		auto &base_type = set<SPIRType>(base_type_id);
		base_type.basetype = SPIRType::UInt;
		base_type.width = 32;

		if (!type.pointer)
			return base_type_id;

		uint32_t ptr_type_id = next_id++;
		auto &ptr_type = set<SPIRType>(ptr_type_id);
		ptr_type = base_type;
		ptr_type.pointer = true;
		ptr_type.storage = type.storage;
		ptr_type.parent_type = base_type_id;
		return ptr_type_id;
	}

	return type_id;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %r15
callq 0xa3ea
movq %rax, %rbx
cmpl $0x14, %r14d
jne 0x8ec3b
movq %r15, %rdi
movq %rbx, %rsi
callq 0x13482
testb %al, %al
jne 0x8ec53
jmp 0x8ed3d
addl $-0xb, %r14d
cmpl $-0x2, %r14d
jb 0x8ed3d
cmpl $0x5, 0xc(%rbx)
je 0x8ed3d
leaq 0x8(%r15), %rdi
movzbl 0x60(%rbx), %esi
incl %esi
callq 0x24f8a
movl %eax, %r14d
movq %r15, %rdi
movl %eax, %esi
callq 0x1bafc
movq %rax, %r12
movabsq $0x2000000005, %rax     # imm = 0x2000000005
movq %rax, 0xc(%r12)
cmpb $0x1, 0x60(%rbx)
jne 0x8ed3a
leaq 0xc(%r12), %r13
movl %r14d, %ebp
incl %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x1bafc
movq %rax, %r15
movl 0x8(%r12), %eax
movl %eax, 0x8(%r15)
movups (%r13), %xmm0
movups %xmm0, 0xc(%r15)
leaq 0x20(%r15), %rdi
leaq 0x20(%r12), %rsi
callq 0x1bc64
leaq 0x38(%r15), %rdi
leaq 0x38(%r12), %rsi
callq 0x1bd48
movq 0x60(%r12), %rax
movq %rax, 0x60(%r15)
leaq 0x68(%r15), %rdi
leaq 0x68(%r12), %rsi
callq 0x1bc64
movups 0x80(%r12), %xmm0
movups 0x90(%r12), %xmm1
movups %xmm0, 0x80(%r15)
movups %xmm1, 0x90(%r15)
cmpq %r15, %r12
je 0x8ed25
movl $0xa0, %eax
movq %r15, %rdi
addq %rax, %rdi
addq %rax, %r12
movq %r12, %rsi
callq 0xd596
movb $0x1, 0x60(%r15)
movl 0x64(%rbx), %eax
movl %eax, 0x64(%r15)
movl %r14d, 0x9c(%r15)
jmp 0x8ed3d
movl %r14d, %ebp
movl %ebp, %eax
addq $0x8, %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_msl.cpp
// Function: spirv_cross::CompilerMSL::to_qualified_member_name[abi:cxx11](spirv_cross::SPIRType const&, unsigned int)
string CompilerMSL::to_qualified_member_name(const SPIRType &type, uint32_t index)
{
	// Don't qualify Builtin names because they are unique and are treated as such when building expressions
	BuiltIn builtin;
	if (is_member_builtin(type, index, &builtin))
		return builtin_to_glsl(builtin, type.storage);

	// Strip any underscore prefix from member name
	string mbr_name = to_member_name(type, index);
	size_t startPos = mbr_name.find_first_not_of("_");
	mbr_name = (startPos != string::npos) ? mbr_name.substr(startPos) : "";
	return join(to_name(type.self), "_", mbr_name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4(%rsp), %rcx
movq %rsi, %rdi
movq %rdx, %rsi
movl %ebp, %edx
callq 0x133ea
testb %al, %al
je 0x8ed99
movl 0x4(%rsp), %edx
movl 0x64(%r15), %ecx
movq (%r14), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0xa0(%rax)
jmp 0x8ee8b
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x2c088
leaq 0x2f202(%rip), %rsi     # 0xbdfb7
movl $0x1, %ecx
movq %r12, %rdi
xorl %edx, %edx
callq 0x6450
leaq 0x18(%rsp), %r13
cmpq $-0x1, %rax
je 0x8edea
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x6290
jmp 0x8ee01
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x25ab6(%rip), %rdx     # 0xb48af
movq %rdx, %rsi
callq 0x7be0
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0x6310
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x8ee29
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x8(%r15), %edx
movq (%r14), %rax
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq *0x38(%rax)
leaq 0x2f170(%rip), %rdx     # 0xbdfb7
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rcx
movq %rbx, %rdi
callq 0x51f10
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x8ee70
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8ee8b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8eebd
jmp 0x8eebd
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x8eec0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x8eec0
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8eedb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
nop