LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::get_declared_struct_member_alignment(spirv_cross::SPIRType const&, unsigned int) const
size_t CompilerMSL::get_declared_struct_member_alignment(const SPIRType &struct_type, uint32_t index) const
{
	auto &type = get<SPIRType>(struct_type.member_types[index]);

	switch (type.basetype)
	{
	case SPIRType::Unknown:
	case SPIRType::Void:
	case SPIRType::AtomicCounter:
	case SPIRType::Image:
	case SPIRType::SampledImage:
	case SPIRType::Sampler:
		SPIRV_CROSS_THROW("Querying alignment of opaque object.");

	case SPIRType::Struct:
		return 16; // Per Vulkan spec section 14.5.4

	default:
	{
		// Alignment of packed type is the same as the underlying component or column size.
		// Alignment of unpacked type is the same as the vector size.
		// Alignment of 3-elements vector is the same as 4-elements (including packed using column).
		if (member_is_packed_type(struct_type, index))
			return (type.width / 8) * (type.columns == 3 ? 4 : type.columns);
		else
			return (type.width / 8) * (type.vecsize == 3 ? 4 : type.vecsize);
	}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %eax
movq 0x68(%rsi), %rcx
movl (%rcx,%rax,4), %esi
callq 0x1b382
movq %rax, %rbx
movl 0xc(%rax), %ecx
cmpl $0xf, %ecx
ja 0x8f649
movl $0x10, %eax
cmpl $0xc, %ecx
je 0x8f676
movl $0xe103, %eax           # imm = 0xE103
btl %ecx, %eax
jb 0x8f683
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x41a06
movl 0x10(%rbx), %ecx
shrl $0x3, %ecx
testb %al, %al
je 0x8f665
movl 0x18(%rbx), %edx
jmp 0x8f668
movl 0x14(%rbx), %edx
cmpl $0x3, %edx
movl $0x4, %eax
cmovnel %edx, %eax
imull %ecx, %eax
movl %eax, %eax
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 0x33d87(%rip), %rsi     # 0xc3427
leaq 0x33da4(%rip), %rdx     # 0xc344b
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0x6c700(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x6c6d8(%rip), %rsi     # 0xfbdb0
movq 0x6d8f9(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x8f701
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x8f70b
jmp 0x8f713
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::emit_header()
void CompilerMSL::emit_header()
{
	for (auto &pragma : pragma_lines)
		statement(pragma);

	if (!pragma_lines.empty())
		statement("");

	statement("#include <metal_stdlib>");
	statement("#include <simd/simd.h>");

	for (auto &header : header_lines)
		statement(header);

	statement("");
	statement("using namespace metal;");
	statement("");

	for (auto &td : typedef_lines)
		statement(td);

	if (!typedef_lines.empty())
		statement("");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x898(%rdi), %r14
leaq 0x888(%rdi), %r15
cmpq %r15, %r14
je 0x8f7eb
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0xa36ee
movq %r14, %rdi
callq 0x62e0
movq %rax, %r14
cmpq %r15, %rax
jne 0x8f7cf
cmpq $0x0, 0x8a8(%rbx)
je 0x8f804
leaq 0x250b3(%rip), %rsi     # 0xb48af
movq %rbx, %rdi
callq 0xa6c4
leaq 0x30d45(%rip), %rsi     # 0xc0550
movq %rbx, %rdi
callq 0xa37ea
leaq 0x30d4e(%rip), %rsi     # 0xc0568
movq %rbx, %rdi
callq 0xc23a
movq 0x738(%rbx), %r14
movq 0x740(%rbx), %r15
cmpq %r15, %r14
je 0x8f846
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb634
addq $0x20, %r14
jmp 0x8f830
leaq 0x25062(%rip), %r14     # 0xb48af
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa6c4
leaq 0x30d20(%rip), %rsi     # 0xc057f
movq %rbx, %rdi
callq 0xc23a
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa6c4
movq 0x8c8(%rbx), %r14
leaq 0x8b8(%rbx), %r15
cmpq %r15, %r14
je 0x8f8a1
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0xa36ee
movq %r14, %rdi
callq 0x62e0
movq %rax, %r14
cmpq %r15, %rax
jne 0x8f885
cmpq $0x0, 0x8d8(%rbx)
je 0x8f8bf
leaq 0x24ffd(%rip), %rsi     # 0xb48af
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xa6c4
popq %rbx
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::emit_interface_block(unsigned int)
void CompilerMSL::emit_interface_block(uint32_t ib_var_id)
{
	if (ib_var_id)
	{
		auto &ib_var = get<SPIRVariable>(ib_var_id);
		auto &ib_type = get<SPIRType>(ib_var.basetype);
		assert(ib_type.basetype == SPIRType::Struct && !ib_type.member_types.empty());
		emit_struct(ib_type);
	}
}

// Assembly:
pushq %rbx
testl %esi, %esi
je 0x8fc40
movq %rdi, %rbx
callq 0xb3ca
movl 0xc(%rax), %esi
movq %rbx, %rdi
callq 0xa3ea
cmpl $0xc, 0xc(%rax)
jne 0x8fc42
movq 0x68(%rax), %rcx
cmpq 0x70(%rax), %rcx
je 0x8fc42
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x27fa4
popq %rbx
retq
leaq 0x32ce3(%rip), %rdi     # 0xc292c
leaq 0x307b3(%rip), %rsi     # 0xc0403
leaq 0x32d1b(%rip), %rcx     # 0xc2972
movl $0xb16, %edx            # imm = 0xB16
callq 0x61b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::emit_array_copy(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int)
void CompilerMSL::emit_array_copy(const string &lhs, uint32_t rhs_id)
{
	// Assignment from an array initializer is fine.
	auto &type = expression_type(rhs_id);
	auto *var = maybe_get_backing_variable(rhs_id);

	// Unfortunately, we cannot template on address space in MSL,
	// so explicit address space redirection it is ...
	bool is_constant = false;
	if (ir.ids[rhs_id].get_type() == TypeConstant)
	{
		is_constant = true;
	}
	else if (var && var->remapped_variable && var->statically_assigned &&
	         ir.ids[var->static_expression].get_type() == TypeConstant)
	{
		is_constant = true;
	}

	const char *tag = is_constant ? "FromConstant" : "FromStack";
	statement("spvArrayCopy", tag, type.array.size(), "(", lhs, ", ", to_expression(rhs_id), ");");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %esi
callq 0x12a72
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
callq 0x12c9a
movl %ebp, %ecx
movq 0x20(%r14), %rdx
shlq $0x4, %rcx
cmpl $0x3, 0x8(%rdx,%rcx)
jne 0x92a0c
leaq 0x2dfd8(%rip), %rcx     # 0xc09e2
jmp 0x92a42
leaq 0x2dfc5(%rip), %rcx     # 0xc09d8
testq %rax, %rax
je 0x92a42
cmpb $0x1, 0x5b(%rax)
jne 0x92a42
cmpb $0x1, 0x39(%rax)
jne 0x92a42
movl 0x3c(%rax), %eax
shlq $0x4, %rax
cmpl $0x3, 0x8(%rdx,%rax)
leaq 0x2dfab(%rip), %rax     # 0xc09e2
leaq 0x2df9a(%rip), %rcx     # 0xc09d8
cmoveq %rax, %rcx
leaq 0x30(%rsp), %r12
movq %rcx, (%r12)
movq 0x28(%r15), %rax
subq 0x20(%r15), %rax
sarq $0x2, %rax
leaq 0x28(%rsp), %r15
movq %rax, (%r15)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x33f8a
subq $0x8, %rsp
leaq 0x2c074(%rip), %rax     # 0xbeaf0
leaq 0x27628(%rip), %r10     # 0xba0ab
leaq 0x2df93(%rip), %rsi     # 0xc0a1d
leaq 0x301e0(%rip), %r8      # 0xc2c71
movq %r14, %rdi
movq %r12, %rdx
movq %r15, %rcx
movq %rbx, %r9
pushq %rax
pushq %r13
pushq %r10
callq 0xa5ada
addq $0x20, %rsp
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92ac6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92af3
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_msl.cpp
// Function: spirv_cross::CompilerMSL::to_func_call_arg[abi:cxx11](unsigned int)
string CompilerMSL::to_func_call_arg(uint32_t id)
{
	string arg_str = CompilerGLSL::to_func_call_arg(id);

	// Manufacture automatic sampler arg if the arg is a SampledImage texture.
	auto &type = expression_type(id);
	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
movq %r14, %rdi
movl %ebp, %esi
callq 0x12a72
cmpl $0xe, 0xc(%rax)
jne 0x9a5e5
cmpl $0x5, 0x84(%rax)
je 0x9a5e5
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x893aa
leaq 0x1fb5d(%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 0x9a589
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x9a593
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 0x9a5ca
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9a5e5
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 0x9a612
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9a612
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9a634
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9a634
jmp 0x9a631
movq %rax, %r14
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x9a64b
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_msl.cpp
// Function: spirv_cross::CompilerMSL::is_non_native_row_major_matrix(unsigned int)
bool CompilerMSL::is_non_native_row_major_matrix(uint32_t id)
{
	// Natively supported row-major matrices do not need to be converted.
	if (backend.native_row_major_matrix)
		return false;

	// Non-matrix or column-major matrix types do not need to be converted.
	if (!ir.meta[id].decoration.decoration_flags.get(DecorationRowMajor))
		return false;

	// Generate a function that will swap matrix elements from row-major to column-major.
	// Packed row-matrix should just use transpose() function.
	if (!has_decoration(id, DecorationCPacked))
	{
		const auto type = expression_type(id);
		add_convert_row_major_matrix_function(type.columns, type.vecsize);
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
cmpb $0x0, 0x628(%rdi)
jne 0x9a683
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %eax
movq 0x38(%rdi), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
testb $0x10, 0x60(%rcx,%rax)
jne 0x9a695
xorl %ebx, %ebx
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl %ebp, %esi
movl $0xa, %edx
callq 0x12974
movb $0x1, %bl
testb %al, %al
jne 0x9a685
movq %r14, %rdi
movl %ebp, %esi
callq 0x12a72
movq %rsp, %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x1eafa
movl 0x14(%r15), %edx
movl 0x18(%r15), %esi
movq %r14, %rdi
callq 0x9a76e
leaq 0x61d07(%rip), %rax     # 0xfc3e0
addq $0x10, %rax
leaq 0xa0(%rsp), %r14
movq %rax, -0xa0(%r14)
movq %r14, %rdi
callq 0xde80
movq -0x38(%r14), %rdi
testq %rdi, %rdi
je 0x9a70a
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x9a73a
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x38(%rsp)
movl %eax, 0x40(%rsp)
movq %rax, 0x48(%rsp)
movl %eax, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x9a685
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
jmp 0x9a685
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1be02
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::add_convert_row_major_matrix_function(unsigned int, unsigned int)
void CompilerMSL::add_convert_row_major_matrix_function(uint32_t cols, uint32_t rows)
{
	SPVFuncImpl spv_func;
	if (cols == rows) // Square matrix...just use transpose() function
		return;
	else if (cols == 2 && rows == 3)
		spv_func = SPVFuncImplRowMajor2x3;
	else if (cols == 2 && rows == 4)
		spv_func = SPVFuncImplRowMajor2x4;
	else if (cols == 3 && rows == 2)
		spv_func = SPVFuncImplRowMajor3x2;
	else if (cols == 3 && rows == 4)
		spv_func = SPVFuncImplRowMajor3x4;
	else if (cols == 4 && rows == 2)
		spv_func = SPVFuncImplRowMajor4x2;
	else if (cols == 4 && rows == 3)
		spv_func = SPVFuncImplRowMajor4x3;
	else
		SPIRV_CROSS_THROW("Could not convert row-major matrix.");

	auto rslt = spv_function_implementations.insert(spv_func);
	if (rslt.second)
	{
		add_pragma_line("#pragma clang diagnostic ignored \"-Wmissing-prototypes\"");
		force_recompile = true;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
cmpl %edx, %esi
je 0x9a877
movq %rdi, %rbx
movl %esi, %ecx
xorl $0x2, %ecx
movl %edx, %eax
xorl $0x3, %eax
orl %ecx, %eax
jne 0x9a79b
movl $0x12, 0x4(%rsp)
jmp 0x9a805
movl %edx, %eax
xorl $0x4, %eax
orl %eax, %ecx
jne 0x9a7ae
movl $0x13, 0x4(%rsp)
jmp 0x9a805
movl %esi, %edi
xorl $0x3, %edi
movl %edx, %ecx
xorl $0x2, %ecx
movl %edi, %r8d
orl %ecx, %r8d
jne 0x9a7ca
movl $0x14, 0x4(%rsp)
jmp 0x9a805
orl %eax, %edi
jne 0x9a7d8
movl $0x15, 0x4(%rsp)
jmp 0x9a805
movl %esi, %eax
xorl $0x4, %eax
orl %ecx, %eax
jne 0x9a7eb
movl $0x16, 0x4(%rsp)
jmp 0x9a805
cmpl $0x4, %esi
jne 0x9a882
cmpl $0x3, %edx
jne 0x9a882
movl $0x17, 0x4(%rsp)
leaq 0x7e0(%rbx), %rdi
leaq 0x4(%rsp), %rsi
callq 0xac3d6
testb $0x1, %dl
je 0x9a877
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x25b38(%rip), %rsi     # 0xc0363
leaq 0x25b68(%rip), %rdx     # 0xc039a
leaq 0x8(%rsp), %rdi
callq 0x7be0
leaq 0x880(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0xa997c
testb $0x1, %dl
je 0x9a859
movb $0x1, 0x1d0(%rbx)
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x9a870
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movb $0x1, 0x1d0(%rbx)
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 0x28392(%rip), %rsi     # 0xc2c31
leaq 0x283ae(%rip), %rdx     # 0xc2c54
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0x61501(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x614d9(%rip), %rsi     # 0xfbdb0
movq 0x626fa(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x9a900
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x9a90a
jmp 0x9a933
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
jmp 0x9a933
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x9a933
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x9a933
movq %rax, %r14
movq %r14, %rdi
callq 0x64a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::member_is_non_native_row_major_matrix(spirv_cross::SPIRType const&, unsigned int)
bool CompilerMSL::member_is_non_native_row_major_matrix(const SPIRType &type, uint32_t index)
{
	// Natively supported row-major matrices do not need to be converted.
	if (backend.native_row_major_matrix)
		return false;

	// Non-matrix or column-major matrix types do not need to be converted.
	if (!combined_decoration_for_member(type, index).get(DecorationRowMajor))
		return false;

	// Generate a function that will swap matrix elements from row-major to column-major.
	// Packed row-matrix should just use transpose() function.
	if (!has_member_decoration(type.self, index, DecorationCPacked))
	{
		const auto mbr_type = get<SPIRType>(type.member_types[index]);
		add_convert_row_major_matrix_function(mbr_type.columns, mbr_type.vecsize);
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
cmpb $0x0, 0x628(%rdi)
jne 0x9a97e
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x1af9a
movb (%rbx), %bl
leaq 0x8(%rsp), %rdi
callq 0xd570
testb $0x10, %bl
jne 0x9a990
xorl %ebx, %ebx
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%r15), %esi
movq %r14, %rdi
movl %ebp, %edx
movl $0xa, %ecx
callq 0x1406a
movb $0x1, %bl
testb %al, %al
jne 0x9a980
movl %ebp, %eax
movq 0x68(%r15), %rcx
movl (%rcx,%rax,4), %esi
movq %r14, %rdi
callq 0xa3ea
movq %rsp, %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x1eafa
movl 0x14(%r15), %edx
movl 0x18(%r15), %esi
movq %r14, %rdi
callq 0x9a76e
leaq 0x61a01(%rip), %rax     # 0xfc3e0
addq $0x10, %rax
leaq 0xa0(%rsp), %r14
movq %rax, -0xa0(%r14)
movq %r14, %rdi
callq 0xde80
movq -0x38(%r14), %rdi
testq %rdi, %rdi
je 0x9aa10
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x9aa40
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x38(%rsp)
movl %eax, 0x40(%rsp)
movq %rax, 0x48(%rsp)
movl %eax, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x9a980
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
jmp 0x9a980
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1be02
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::emit_fixup()
void CompilerMSL::emit_fixup()
{
	if ((get_entry_point().model == ExecutionModelVertex) && stage_out_var_id && !qual_pos_var_name.empty())
	{
		if (options.vertex.fixup_clipspace)
			statement(qual_pos_var_name, ".z = (", qual_pos_var_name, ".z + ", qual_pos_var_name,
			          ".w) * 0.5;       // Adjust clip-space for Metal");

		if (options.vertex.flip_vert_y)
			statement(qual_pos_var_name, ".y = -(", qual_pos_var_name, ".y);", "    // Invert Y-axis for Metal");
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x15f76
cmpl $0x0, 0xb8(%rax)
jne 0x9b047
cmpl $0x0, 0x930(%rbx)
je 0x9b047
cmpq $0x0, 0x948(%rbx)
je 0x9b047
leaq 0x940(%rbx), %r14
cmpb $0x1, 0x442(%rbx)
jne 0x9b014
leaq 0x27c88(%rip), %rax     # 0xc2c79
movq %rax, (%rsp)
leaq 0x27c70(%rip), %rdx     # 0xc2c6c
leaq 0x27c70(%rip), %r8      # 0xc2c73
movq %rbx, %rdi
movq %r14, %rsi
movq %r14, %rcx
movq %r14, %r9
callq 0xa601c
cmpb $0x1, 0x443(%rbx)
jne 0x9b047
leaq 0x27c85(%rip), %rdx     # 0xc2ca9
leaq 0x20d88(%rip), %r8      # 0xbbdb3
leaq 0x27c7f(%rip), %r9      # 0xc2cb1
movq %rbx, %rdi
movq %r14, %rsi
movq %r14, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa61f4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::get_ordered_member_location(unsigned int, unsigned int, unsigned int*)
uint32_t CompilerMSL::get_ordered_member_location(uint32_t type_id, uint32_t index, uint32_t *comp)
{
	auto &m = ir.meta.at(type_id);
	if (index < m.members.size())
	{
		auto &dec = m.members[index];
		if (comp)
		{
			if (dec.decoration_flags.get(DecorationComponent))
				*comp = dec.component;
			else
				*comp = k_unknown_component;
		}
		if (dec.decoration_flags.get(DecorationLocation))
			return dec.location;
	}

	return index;
}

// Assembly:
movl %esi, %esi
movq 0x38(%rdi), %r8
movq 0x40(%rdi), %rdi
subq %r8, %rdi
sarq $0x3, %rdi
movabsq $-0x7063e7063e7063e7, %rax # imm = 0x8F9C18F9C18F9C19
imulq %rdi, %rax
cmpq %rsi, %rax
jbe 0x9e148
movl %edx, %eax
imulq $0x148, %rsi, %rdi      # imm = 0x148
movq 0xd0(%r8,%rdi), %rsi
movq 0xd8(%r8,%rdi), %rdi
subq %rsi, %rdi
sarq $0x4, %rdi
movabsq $0x4ec4ec4ec4ec4ec5, %r8 # imm = 0x4EC4EC4EC4EC4EC5
imulq %rdi, %r8
cmpq %rax, %r8
jbe 0x9e145
imulq $0xd0, %rax, %rdi
leaq (%rsi,%rdi), %rax
movq 0x60(%rsi,%rdi), %rsi
testq %rcx, %rcx
je 0x9e139
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
testl %esi, %esi
jns 0x9e137
movl 0xa8(%rax), %edi
movl %edi, (%rcx)
btl $0x1e, %esi
jae 0x9e145
movl 0xa4(%rax), %edx
movl %edx, %eax
retq
pushq %rax
leaq 0x15fc9(%rip), %rdi     # 0xb4119
movq %rax, %rdx
xorl %eax, %eax
callq 0x63d0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::to_name[abi:cxx11](unsigned int, bool) const
string CompilerMSL::to_name(uint32_t id, bool allow_alias) const
{
	if (current_function && (current_function->self == ir.default_entry_point))
	{
		string qual_name = ir.meta.at(id).decoration.qualified_alias;
		if (!qual_name.empty())
			return qual_name;
	}
	return Compiler::to_name(id, allow_alias);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x148(%rsi), %rax
testq %rax, %rax
je 0x9e9a7
movl 0x8(%rax), %eax
cmpl 0x108(%r14), %eax
jne 0x9e9a7
movl %ebp, %esi
movq 0x38(%r14), %rax
movq 0x40(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x7063e7063e7063e7, %rdx # imm = 0x8F9C18F9C18F9C19
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0x9e9c4
imulq $0x148, %rsi, %rcx      # imm = 0x148
leaq 0x10(%rbx), %r12
movq %r12, (%rbx)
movq 0x20(%rax,%rcx), %rsi
movq 0x28(%rax,%rcx), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xe456
cmpq $0x0, 0x8(%rbx)
jne 0x9e9b8
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x9e9a7
movq (%r12), %rsi
incq %rsi
callq 0x6260
movzbl %r15b, %ecx
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x12a86
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1574e(%rip), %rdi     # 0xb4119
xorl %eax, %eax
callq 0x63d0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::to_member_reference[abi:cxx11](spirv_cross::SPIRVariable const*, spirv_cross::SPIRType const&, unsigned int)
string CompilerMSL::to_member_reference(const SPIRVariable *var, const SPIRType &type, uint32_t index)
{
	// If this is a buffer array, we have to dereference the buffer pointers.
	if (var && (var->storage == StorageClassUniform || var->storage == StorageClassStorageBuffer) &&
	    !get<SPIRType>(var->basetype).array.empty())
		return join("->", to_member_name(type, index));
	else
		return join(".", to_member_name(type, index));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testq %rdx, %rdx
je 0x9eeb2
movl 0x10(%rdx), %eax
cmpl $0xc, %eax
je 0x9ee76
cmpl $0x2, %eax
jne 0x9eeb2
movl 0xc(%rdx), %esi
movq %r15, %rdi
callq 0xa3ea
movq 0x20(%rax), %rcx
cmpq 0x28(%rax), %rcx
je 0x9eeb2
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x2c088
leaq 0x15356(%rip), %rsi     # 0xb41fb
movq %rbx, %rdi
movq %r12, %rdx
callq 0xa68c5
jmp 0x9eed7
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x2c088
leaq 0x1b97d(%rip), %rsi     # 0xba849
movq %rbx, %rdi
movq %r12, %rdx
callq 0x57dbe
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9eef2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9ef04
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9ef22
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::to_qualifiers_glsl[abi:cxx11](unsigned int)
string CompilerMSL::to_qualifiers_glsl(uint32_t id)
{
	string quals;

	auto &type = expression_type(id);
	if (type.storage == StorageClassWorkgroup)
		quals += "threadgroup ";

	return quals;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
movl %edx, %esi
callq 0x12a72
cmpl $0x4, 0x64(%rax)
jne 0x9ef64
leaq 0x23f95(%rip), %rsi     # 0xc2ef1
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 0x9ef83
movq (%r15), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::SampledImageScanner::handle(spv::Op, unsigned int const*, unsigned int)
bool CompilerMSL::SampledImageScanner::handle(spv::Op opcode, const uint32_t *args, uint32_t length)
{
	switch (opcode)
	{
	case OpLoad:
	case OpImage:
	case OpSampledImage:
	{
		if (length < 3)
			return false;

		uint32_t result_type = args[0];
		auto &type = compiler.get<SPIRType>(result_type);
		if ((type.basetype != SPIRType::Image && type.basetype != SPIRType::SampledImage) || type.image.sampled != 1)
			return true;

		uint32_t id = args[1];
		compiler.set<SPIRExpression>(id, "", result_type, true);
		break;
	}
	case OpImageSampleExplicitLod:
	case OpImageSampleProjExplicitLod:
	case OpImageSampleDrefExplicitLod:
	case OpImageSampleProjDrefExplicitLod:
	case OpImageSampleImplicitLod:
	case OpImageSampleProjImplicitLod:
	case OpImageSampleDrefImplicitLod:
	case OpImageSampleProjDrefImplicitLod:
	case OpImageFetch:
	case OpImageGather:
	case OpImageDrefGather:
		compiler.has_sampled_images =
		    compiler.has_sampled_images || compiler.is_sampled_image_type(compiler.expression_type(args[2]));
		break;
	default:
		break;
	}
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %r14
leal -0x57(%rsi), %eax
cmpl $0xb, %eax
jae 0xa0372
movq 0x8(%r14), %r12
movb $0x1, %bl
cmpb $0x0, 0x934(%r12)
je 0xa0341
movb $0x1, %al
jmp 0xa035c
movl 0x8(%r15), %esi
movq %r12, %rdi
callq 0x12a72
movq %r12, %rdi
movq %rax, %rsi
callq 0x14b1c
movq 0x8(%r14), %r12
movb %al, 0x934(%r12)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movb $0x1, %bl
addl $-0x3d, %esi
cmpl $0x27, %esi
ja 0xa0364
movabsq $0x8002000001, %rax     # imm = 0x8002000001
btq %rsi, %rax
jae 0xa0364
cmpl $0x3, %ecx
jae 0xa0395
xorl %ebx, %ebx
jmp 0xa0364
movl (%r15), %esi
movl %esi, 0x4(%rsp)
movq 0x8(%r14), %rdi
callq 0xa3ea
movl 0xc(%rax), %ecx
addl $-0xd, %ecx
cmpl $0x1, %ecx
ja 0xa0364
cmpl $0x1, 0x8c(%rax)
jne 0xa0364
movl 0x4(%r15), %esi
movq 0x8(%r14), %rdi
leaq 0x3(%rsp), %r8
movb $0x1, (%r8)
leaq 0x144de(%rip), %rdx     # 0xb48af
leaq 0x4(%rsp), %rcx
callq 0x1bc1c
jmp 0xa0364
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::OpCodePreprocessor::handle(spv::Op, unsigned int const*, unsigned int)
bool CompilerMSL::OpCodePreprocessor::handle(Op opcode, const uint32_t *args, uint32_t length)
{
	// Since MSL exists in a single execution scope, function prototype declarations are not
	// needed, and clutter the output. If secondary functions are output (either as a SPIR-V
	// function implementation or as indicated by the presence of OpFunctionCall), then set
	// suppress_missing_prototypes to suppress compiler warnings of missing function prototypes.

	// Mark if the input requires the implementation of an SPIR-V function that does not exist in Metal.
	SPVFuncImpl spv_func = get_spv_func_impl(opcode, args);
	if (spv_func != SPVFuncImplNone)
	{
		compiler.spv_function_implementations.insert(spv_func);
		suppress_missing_prototypes = true;
	}

	switch (opcode)
	{

	case OpFunctionCall:
		suppress_missing_prototypes = true;
		break;

	case OpImageWrite:
		uses_resource_write = true;
		break;

	case OpStore:
		check_resource_write(args[0]);
		break;

	case OpAtomicExchange:
	case OpAtomicCompareExchange:
	case OpAtomicCompareExchangeWeak:
	case OpAtomicIIncrement:
	case OpAtomicIDecrement:
	case OpAtomicIAdd:
	case OpAtomicISub:
	case OpAtomicSMin:
	case OpAtomicUMin:
	case OpAtomicSMax:
	case OpAtomicUMax:
	case OpAtomicAnd:
	case OpAtomicOr:
	case OpAtomicXor:
		uses_atomics = true;
		check_resource_write(args[2]);
		break;

	case OpAtomicLoad:
		uses_atomics = true;
		break;

	default:
		break;
	}

	// If it has one, keep track of the instruction's result type, mapped by ID
	uint32_t result_type, result_id;
	if (compiler.instruction_to_result_type(result_type, result_id, opcode, args, length))
		result_types[result_id] = result_type;

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
callq 0xa04b0
movl %eax, 0x14(%rsp)
testl %eax, %eax
je 0xa0417
movl $0x7e0, %edi            # imm = 0x7E0
addq 0x8(%rbx), %rdi
leaq 0x14(%rsp), %rsi
callq 0xac3d6
movb $0x1, 0x48(%rbx)
leal -0xe5(%r15), %eax
cmpl $0xe, %eax
jae 0xa0477
movb $0x1, 0x49(%rbx)
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0xa0882
movq 0x8(%rbx), %rdi
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
movl %r15d, %ecx
movq %r14, %r8
movl %ebp, %r9d
callq 0x18e82
testb %al, %al
je 0xa046a
movl 0x10(%rsp), %ebp
addq $0x10, %rbx
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d9e
movl %ebp, (%rax)
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x62, %r15d
jg 0xa048e
cmpl $0x39, %r15d
je 0xa04a3
cmpl $0x3e, %r15d
jne 0xa0433
movl (%r14), %esi
jmp 0xa042b
cmpl $0x63, %r15d
je 0xa04a9
cmpl $0xe3, %r15d
jne 0xa0433
movb $0x1, 0x49(%rbx)
jmp 0xa0433
movb $0x1, 0x48(%rbx)
jmp 0xa0433
movb $0x1, 0x4a(%rbx)
jmp 0xa0433
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::OpCodePreprocessor::check_resource_write(unsigned int)
void CompilerMSL::OpCodePreprocessor::check_resource_write(uint32_t var_id)
{
	auto *p_var = compiler.maybe_get_backing_variable(var_id);
	StorageClass sc = p_var ? p_var->storage : StorageClassMax;
	if (sc == StorageClassUniform || sc == StorageClassStorageBuffer)
		uses_resource_write = true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x12c9a
testq %rax, %rax
je 0xa08a5
movl 0x10(%rax), %eax
cmpl $0xc, %eax
je 0xa08a1
cmpl $0x2, %eax
jne 0xa08a5
movb $0x1, 0x4a(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::MemberSorter::operator()(unsigned int, unsigned int)
bool CompilerMSL::MemberSorter::operator()(uint32_t mbr_idx1, uint32_t mbr_idx2)
{
	auto &mbr_meta1 = meta.members[mbr_idx1];
	auto &mbr_meta2 = meta.members[mbr_idx2];
	if (mbr_meta1.builtin != mbr_meta2.builtin)
		return mbr_meta2.builtin;
	else
		switch (sort_aspect)
		{
		case Location:
			return mbr_meta1.location < mbr_meta2.location;
		case LocationReverse:
			return mbr_meta1.location > mbr_meta2.location;
		case Offset:
			return mbr_meta1.offset < mbr_meta2.offset;
		case OffsetThenLocationReverse:
			return (mbr_meta1.offset < mbr_meta2.offset) ||
			       ((mbr_meta1.offset == mbr_meta2.offset) && (mbr_meta1.location > mbr_meta2.location));
		case Alphabetical:
			return mbr_meta1.alias < mbr_meta2.alias;
		default:
			return false;
		}
}

// Assembly:
movq %rdi, %rcx
movq 0x8(%rdi), %rax
movl %esi, %esi
movq 0xd0(%rax), %r8
imulq $0xd0, %rsi, %rdi
movl %edx, %eax
imulq $0xd0, %rax, %rsi
movb 0xcc(%r8,%rsi), %al
cmpb %al, 0xcc(%r8,%rdi)
jne 0xa0914
movl 0x10(%rcx), %eax
cmpq $0x4, %rax
ja 0xa0949
addq %r8, %rdi
addq %r8, %rsi
leaq 0x1f604(%rip), %rcx     # 0xbfef4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0xa4(%rdi), %eax
cmpl 0xa4(%rsi), %eax
jmp 0xa0921
pushq %rax
callq 0x6030
shrl $0x1f, %eax
addq $0x8, %rsp
retq
movl 0xb4(%rdi), %eax
cmpl 0xb4(%rsi), %eax
setb %al
retq
movl 0xb4(%rdi), %ecx
movl 0xb4(%rsi), %edx
movb $0x1, %al
cmpl %edx, %ecx
jb 0xa0914
jne 0xa0949
movl 0xa4(%rdi), %eax
cmpl 0xa4(%rsi), %eax
seta %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::remap_constexpr_sampler(unsigned int, spirv_cross::MSLConstexprSampler const&)
void CompilerMSL::remap_constexpr_sampler(uint32_t id, const MSLConstexprSampler &sampler)
{
	auto &type = get<SPIRType>(get<SPIRVariable>(id).basetype);
	if (type.basetype != SPIRType::SampledImage && type.basetype != SPIRType::Sampler)
		SPIRV_CROSS_THROW("Can only remap SampledImage and Sampler type.");
	if (!type.array.empty())
		SPIRV_CROSS_THROW("Can not remap array of samplers.");
	constexpr_samplers[id] = sampler;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movl %esi, 0x4(%rsp)
callq 0xb3ca
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0xa3ea
movl 0xc(%rax), %ecx
andl $-0x2, %ecx
cmpl $0xe, %ecx
jne 0xa0a0e
movq 0x20(%rax), %rcx
cmpq 0x28(%rax), %rcx
jne 0xa0a74
addq $0x9c8, %r14            # imm = 0x9C8
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0xad62e
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups %xmm0, (%rax)
movups %xmm1, 0x10(%rax)
movups %xmm2, 0x20(%rax)
movl 0x2f(%rbx), %ecx
movl %ecx, 0x2f(%rax)
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 0x22a5b(%rip), %rsi     # 0xc3486
leaq 0x22a81(%rip), %rdx     # 0xc34b3
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0x5b375(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x5b34d(%rip), %rsi     # 0xfbdb0
movq 0x5c56e(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
jmp 0xa0ad8
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x22a23(%rip), %rsi     # 0xc34b4
leaq 0x22a3c(%rip), %rdx     # 0xc34d4
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0x5b30f(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x5b2e7(%rip), %rsi     # 0xfbdb0
movq 0x5c508(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
jmp 0xa0adc
jmp 0xa0afd
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xa0af6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0xa0b00
jmp 0xa0b08
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::bitcast_from_builtin_load(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, spirv_cross::SPIRType const&)
void CompilerMSL::bitcast_from_builtin_load(uint32_t source_id, std::string &expr, const SPIRType &expr_type)
{
	auto *var = maybe_get_backing_variable(source_id);
	if (var)
		source_id = var->self;

	// Only interested in standalone builtin variables.
	if (!has_decoration(source_id, DecorationBuiltIn))
		return;

	auto builtin = static_cast<BuiltIn>(get_decoration(source_id, DecorationBuiltIn));
	auto expected_type = expr_type.basetype;
	switch (builtin)
	{
	case BuiltInGlobalInvocationId:
	case BuiltInLocalInvocationId:
	case BuiltInWorkgroupId:
	case BuiltInLocalInvocationIndex:
	case BuiltInWorkgroupSize:
	case BuiltInNumWorkgroups:
	case BuiltInLayer:
	case BuiltInViewportIndex:
		expected_type = SPIRType::UInt;
		break;

	default:
		break;
	}

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
callq 0x12c9a
testq %rax, %rax
je 0xa0b34
movl 0x8(%rax), %ebp
movq %r15, %rdi
movl %ebp, %esi
movl $0xb, %edx
callq 0x12974
testb %al, %al
je 0xa0bac
movq %r15, %rdi
movl %ebp, %esi
movl $0xb, %edx
callq 0x14e6e
leal -0x18(%rax), %ecx
cmpl $0x6, %ecx
jb 0xa0b66
addl $-0x9, %eax
cmpl $0x1, %eax
ja 0xa0bac
cmpl $0x5, 0xc(%r14)
je 0xa0bac
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x5, %ecx
movq %rbx, %r8
callq 0x3db74
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6310
movq (%r12), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xa0bac
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x20, %rsp
popq %rbx
popq %r12
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::bitcast_to_builtin_store(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, spirv_cross::SPIRType const&)
void CompilerMSL::bitcast_to_builtin_store(uint32_t target_id, std::string &expr, const 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;
	switch (builtin)
	{
	case BuiltInLayer:
	case BuiltInViewportIndex:
		expected_type = SPIRType::UInt;
		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 0xa0cee
movq %r14, %rdi
movl %ebp, %esi
movl $0xb, %edx
callq 0x14e6e
addl $-0xb, %eax
cmpl $-0x2, %eax
jb 0xa0cee
cmpl $0x5, 0xc(%r15)
je 0xa0cee
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x1eafa
movl $0x5, 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 0xa0c66
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x5b773(%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 0xa0ca1
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xa0cd7
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 0xa0cee
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
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::to_initializer_expression[abi:cxx11](spirv_cross::SPIRVariable const&)
std::string CompilerMSL::to_initializer_expression(const SPIRVariable &var)
{
	// We risk getting an array initializer here with MSL. If we have an array.
	// FIXME: We cannot handle non-constant arrays being initialized.
	// We will need to inject spvArrayCopy here somehow ...
	auto &type = get<SPIRType>(var.basetype);
	if (ir.ids[var.initializer].get_type() == TypeConstant &&
	    (!type.array.empty() || type.basetype == SPIRType::Struct))
		return constant_expression(get<SPIRConstant>(var.initializer));
	else
		return CompilerGLSL::to_initializer_expression(var);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rdx), %esi
movq %r14, %rdi
callq 0xa3ea
movl 0x18(%r15), %esi
movq 0x20(%r14), %rcx
movq %rsi, %rdx
shlq $0x4, %rdx
cmpl $0x3, 0x8(%rcx,%rdx)
jne 0xa0d53
movq 0x20(%rax), %rcx
cmpq 0x28(%rax), %rcx
jne 0xa0d63
cmpl $0xc, 0xc(%rax)
je 0xa0d63
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4c0d0
jmp 0xa0d79
movq %r14, %rdi
callq 0x1c036
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2deba
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_parser.cpp
// Function: spirv_cross::Parser::stream(spirv_cross::Instruction const&) const
const uint32_t *Parser::stream(const Instruction &instr) const
{
	// If we're not going to use any arguments, just return nullptr.
	// We want to avoid case where we return an out of range pointer
	// that trips debug assertions on some platforms.
	if (!instr.length)
		return nullptr;

	if (instr.offset + instr.length > ir.spirv.size())
		SPIRV_CROSS_THROW("Compiler::stream() out of range.");
	return &ir.spirv[instr.offset];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl 0x8(%rsi), %ecx
testl %ecx, %ecx
je 0xb0097
movl 0x4(%rsi), %eax
addl %eax, %ecx
movq (%rdi), %rdx
movq 0x8(%rdi), %rsi
subq %rdx, %rsi
sarq $0x2, %rsi
cmpq %rcx, %rsi
jb 0xb00a4
leaq (%rdx,%rax,4), %rax
jmp 0xb0099
xorl %eax, %eax
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 0x5164(%rip), %rsi      # 0xb5225
leaq 0x517d(%rip), %rdx      # 0xb5245
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0x4bcdf(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x4bcb7(%rip), %rsi     # 0xfbdb0
movq 0x4ced8(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xb0122
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0xb012c
jmp 0xb0134
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_parser.cpp
// Function: spirv_cross::extract_string[abi:cxx11](std::vector<unsigned int, std::allocator<unsigned int>> const&, unsigned int)
static string extract_string(const vector<uint32_t> &spirv, uint32_t offset)
{
	string ret;
	for (uint32_t i = offset; i < spirv.size(); i++)
	{
		uint32_t w = spirv[i];

		for (uint32_t j = 0; j < 4; j++, w >>= 8)
		{
			char c = w & 0xff;
			if (c == '\0')
				return ret;
			ret += c;
		}
	}

	SPIRV_CROSS_THROW("String was not terminated before EOF");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r14d
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl %edx, %ecx
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %rcx, %rdx
jbe 0xb01ba
movq %rsi, %r15
movl (%rax,%rcx,4), %ebp
movl $0x4, %r13d
testb %bpl, %bpl
je 0xb021e
movsbl %bpl, %esi
movq %rbx, %rdi
callq 0x6230
shrl $0x8, %ebp
decl %r13d
jne 0xb0184
incl %r14d
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movq %r14, %rcx
cmpq %r14, %rdx
ja 0xb017b
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x13a0c(%rip), %rsi     # 0xc3be3
leaq 0x13a29(%rip), %rdx     # 0xc3c07
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x6320
leaq 0x4bbc9(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x4bba1(%rip), %rsi     # 0xfbdb0
movq 0x4cdc2(%rip), %rdx     # 0xfcfd8
movq %r14, %rdi
callq 0x6470
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xb0247
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0xb0251
jmp 0xb025e
movq %rax, %r15
movq %r14, %rdi
callq 0x6200
jmp 0xb025e
movq %rax, %r15
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0xb0272
movq (%r12), %rsi
incq %rsi
callq 0x6260
movq %r15, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_parser.cpp
// Function: spirv_cross::Parser::variable_storage_is_aliased(spirv_cross::SPIRVariable const&) const
bool Parser::variable_storage_is_aliased(const SPIRVariable &v) const
{
	auto &type = get<SPIRType>(v.basetype);
	bool ssbo = v.storage == StorageClassStorageBuffer ||
	            ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock);
	bool image = type.basetype == SPIRType::Image;
	bool counter = type.basetype == SPIRType::AtomicCounter;

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rsi), %esi
callq 0xb0efe
cmpl $0xc, 0x10(%r14)
jne 0xb072a
movl 0xc(%rax), %eax
cmpl $0xd, %eax
sete %bpl
cmpl $0x8, %eax
sete %r12b
jmp 0xb0767
movl 0x8(%rax), %ecx
movl 0xc(%rax), %eax
movq 0x30(%rbx), %rdx
imulq $0x148, %rcx, %rcx      # imm = 0x148
cmpl $0xd, %eax
sete %bpl
cmpl $0x8, %eax
sete %r12b
testb $0x8, 0x60(%rdx,%rcx)
jne 0xb0767
movl 0x8(%r14), %esi
movq %rbx, %rdi
movl $0x13, %edx
callq 0x2492a
movl %eax, %ebx
xorl %ecx, %ecx
jmp 0xb078d
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2460e
movl (%r15), %ebx
shrl $0x13, %ebx
andl $0x1, %ebx
leaq 0x8(%rsp), %rdi
callq 0xd570
movb $0x1, %cl
orb %bpl, %r12b
movl %ebx, %edx
xorb $0x1, %dl
movzbl %r12b, %eax
movzbl %dl, %edx
testb %bl, %bl
cmovnel %edx, %eax
testb %cl, %cl
cmovnel %edx, %eax
andb $0x1, %al
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_common.hpp
// Function: spirv_cross::Bitset::set(unsigned int)
inline void set(uint32_t bit)
	{
		if (bit < 64)
			lower |= 1ull << bit;
		else
			higher.insert(bit);
	}

// Assembly:
subq $0x18, %rsp
movl %esi, 0xc(%rsp)
cmpl $0x3f, %esi
ja 0xb0a0e
movl $0x1, %eax
movl %esi, %ecx
shlq %cl, %rax
orq %rax, (%rdi)
jmp 0xb0a24
addq $0x8, %rdi
leaq 0x10(%rsp), %rdx
movq %rdi, (%rdx)
leaq 0xc(%rsp), %rsi
callq 0x1f510
addq $0x18, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/crossc-glsl.cc
// Function: crossc_glsl_create
crossc_compiler *crossc_glsl_create(const uint32_t *words, size_t word_count)
{
	crossc_compiler *comp = new crossc_compiler;
	try {
		comp->c = std::make_unique<spirv_cross::CompilerGLSL>(words, word_count);
	} catch (const std::exception &e) {
		comp->error = std::string { e.what() };
	}
	return comp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r15
movl $0x48, %edi
callq 0x6250
movq %rax, %rbx
xorl %eax, %eax
movq %rax, (%rbx)
leaq 0x18(%rbx), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movb %al, 0x18(%rbx)
leaq 0x38(%rbx), %rcx
movq %rcx, 0x28(%rbx)
movq %rax, 0x30(%rbx)
movb %al, 0x38(%rbx)
movl $0x788, %edi            # imm = 0x788
callq 0x6250
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xa262e
movq (%rbx), %rdi
movq %r12, (%rbx)
testq %rdi, %rdi
je 0xb3381
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rdx, %r15
movq %rax, %r14
movl $0x788, %esi            # imm = 0x788
movq %r12, %rdi
callq 0x6260
jmp 0xb33ab
movq %rdx, %r15
movq %rax, %r14
cmpl $0x1, %r15d
jne 0xb3414
movq %r14, %rdi
callq 0x6110
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rax, %rsi
callq 0x6100
movq %rbx, %rdi
addq $0x28, %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xb3402
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
callq 0x6440
jmp 0xb3381
movq %rax, %r14
callq 0x6440
movq %r14, %rdi
callq 0x64a0
movq %rax, %rdi
callq 0xd549