LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::convert_separate_image_to_expression[abi:cxx11](unsigned int)
std::string CompilerGLSL::convert_separate_image_to_expression(uint32_t id)
{
	auto *var = maybe_get_backing_variable(id);

	// If we are fetching from a plain OpTypeImage, we must combine with a dummy sampler in GLSL.
	// In Vulkan GLSL, we can make use of the newer GL_EXT_samplerless_texture_functions.
	if (var)
	{
		auto &type = get<SPIRType>(var->basetype);
		if (type.basetype == SPIRType::Image && type.image.sampled == 1 && type.image.dim != DimBuffer)
		{
			if (options.vulkan_semantics)
			{
				// Newer glslang supports this extension to deal with texture2D as argument to texture functions.
				if (dummy_sampler_id)
					SPIRV_CROSS_THROW("Vulkan GLSL should not have a dummy sampler for combining.");
				require_extension_internal("GL_EXT_samplerless_texture_functions");
			}
			else
			{
				if (!dummy_sampler_id)
					SPIRV_CROSS_THROW(
					    "Cannot find dummy sampler ID. Was build_dummy_sampler_for_combined_images() called?");

				return to_combined_image_sampler(id, dummy_sampler_id);
			}
		}
	}

	return to_expression(id);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x1067e
testq %rax, %rax
je 0x31bc8
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0x90a4
cmpl $0xd, 0xc(%rax)
jne 0x31bc8
cmpl $0x1, 0x8c(%rax)
jne 0x31bc8
cmpl $0x5, 0x84(%rax)
je 0x31bc8
movl 0x39c(%r14), %ecx
cmpb $0x1, 0x43e(%r14)
jne 0x31be1
testl %ecx, %ecx
jne 0x31bf4
leaq 0x61a02(%rip), %rsi     # 0x935a4
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x21390
leaq 0x10(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2b9f0
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
testl %ecx, %ecx
je 0x31c3f
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x30bcc
jmp 0x31bd5
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x61963(%rip), %rsi     # 0x93569
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xb5192(%rip), %rsi     # 0xe6dc0
movq 0xb63ab(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x31c88
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x61978(%rip), %rsi     # 0x935c9
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xb5147(%rip), %rsi     # 0xe6dc0
movq 0xb6360(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
jmp 0x31c8c
jmp 0x31ca0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x31ca3
jmp 0x31cbf
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
jmp 0x31cbf
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
jmp 0x31cbf
movq %rax, %r14
movq %r14, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::bitcast_expression(spirv_cross::SPIRType const&, spirv_cross::SPIRType::BaseType, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string CompilerGLSL::bitcast_expression(const SPIRType &target_type, SPIRType::BaseType expr_type,
                                             const std::string &expr)
{
	if (target_type.basetype == expr_type)
		return expr;

	auto src_type = target_type;
	src_type.basetype = expr_type;
	return join(bitcast_glsl_op(target_type, src_type), "(", expr, ")");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r8, %r14
movq %rdi, %rbx
cmpl %ecx, 0xc(%rdx)
jne 0x3277b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x63c0
jmp 0x327db
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movq %rdx, %rsi
callq 0x1a29c
movl %ebp, 0xc(%r13)
movq (%r12), %rax
movq %rsp, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *0x168(%rax)
leaq 0x6b475(%rip), %rdx     # 0x9dc29
leaq 0x6323a(%rip), %r8      # 0x959f5
movq %rsp, %rsi
movq %rbx, %rdi
movq %r14, %rcx
callq 0x426cb
movq %rsp, %rdi
callq 0x6548
leaq 0x20(%rsp), %rdi
callq 0x17a3e
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6548
jmp 0x32800
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x17a3e
movq %rbx, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::register_call_out_argument(unsigned int)
void CompilerGLSL::register_call_out_argument(uint32_t id)
{
	register_write(id);

	auto *var = maybe_get<SPIRVariable>(id);
	if (var)
		flush_variable_declaration(var->self);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x107cc
movq %rbx, %rdi
movl %ebp, %esi
callq 0xa9e4
testq %rax, %rax
je 0x3337d
movl 0x8(%rax), %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x36e4a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_spv_amd_shader_ballot_op(unsigned int, unsigned int, unsigned int, unsigned int const*, unsigned int)
void CompilerGLSL::emit_spv_amd_shader_ballot_op(uint32_t result_type, uint32_t id, uint32_t eop, const uint32_t *args,
                                                 uint32_t)
{
	require_extension_internal("GL_AMD_shader_ballot");

	enum AMDShaderBallot
	{
		SwizzleInvocationsAMD = 1,
		SwizzleInvocationsMaskedAMD = 2,
		WriteInvocationAMD = 3,
		MbcntAMD = 4
	};

	auto op = static_cast<AMDShaderBallot>(eop);

	switch (op)
	{
	case SwizzleInvocationsAMD:
		emit_binary_func_op(result_type, id, args[0], args[1], "swizzleInvocationsAMD");
		register_control_dependent_expression(id);
		break;

	case SwizzleInvocationsMaskedAMD:
		emit_binary_func_op(result_type, id, args[0], args[1], "swizzleInvocationsMaskedAMD");
		register_control_dependent_expression(id);
		break;

	case WriteInvocationAMD:
		emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "writeInvocationAMD");
		register_control_dependent_expression(id);
		break;

	case MbcntAMD:
		emit_unary_func_op(result_type, id, args[0], "mbcntAMD");
		register_control_dependent_expression(id);
		break;

	default:
		statement("// unimplemented SPV AMD shader ballot op ", eop);
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r15
movl %ecx, %r12d
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %ecx, 0x14(%rsp)
leaq 0x603e1(%rip), %rsi     # 0x9378b
leaq 0x18(%rsp), %r13
leaq 0x13(%rsp), %rdx
movq %r13, %rdi
callq 0x6100
movq %r14, %rdi
movq %r13, %rsi
callq 0x21390
leaq 0x18(%rsp), %rdi
callq 0x6548
decl %r12d
cmpl $0x3, %r12d
ja 0x3346d
leaq 0x5d557(%rip), %rax     # 0x9093c
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl (%r15), %ecx
movl 0x4(%r15), %r8d
leaq 0x603a4(%rip), %r9      # 0x937a0
jmp 0x33448
movl (%r15), %ecx
movl 0x4(%r15), %r8d
movl 0x8(%r15), %r9d
leaq 0x603c2(%rip), %rax     # 0x937d2
movq %rax, (%rsp)
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x2fe8e
jmp 0x33454
movl (%r15), %ecx
leaq 0x603b9(%rip), %r8      # 0x937e5
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x2f9ee
jmp 0x33454
movl (%r15), %ecx
movl 0x4(%r15), %r8d
leaq 0x6036e(%rip), %r9      # 0x937b6
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x2fab8
movq %r14, %rdi
movl %ebx, %esi
callq 0x318aa
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6037a(%rip), %rsi     # 0x937ee
leaq 0x14(%rsp), %rdx
movq %r14, %rdi
callq 0x44548
jmp 0x3345e
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_spv_amd_shader_explicit_vertex_parameter_op(unsigned int, unsigned int, unsigned int, unsigned int const*, unsigned int)
void CompilerGLSL::emit_spv_amd_shader_explicit_vertex_parameter_op(uint32_t result_type, uint32_t id, uint32_t eop,
                                                                    const uint32_t *args, uint32_t)
{
	require_extension_internal("GL_AMD_shader_explicit_vertex_parameter");

	enum AMDShaderExplicitVertexParameter
	{
		InterpolateAtVertexAMD = 1
	};

	auto op = static_cast<AMDShaderExplicitVertexParameter>(eop);

	switch (op)
	{
	case InterpolateAtVertexAMD:
		emit_binary_func_op(result_type, id, args[0], args[1], "interpolateAtVertexAMD");
		break;

	default:
		statement("// unimplemented SPV AMD shader explicit vertex parameter op ", eop);
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movl %ecx, %r12d
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movl %ecx, 0x4(%rsp)
leaq 0x6035a(%rip), %rsi     # 0x93819
leaq 0x8(%rsp), %r13
leaq 0x3(%rsp), %rdx
movq %r13, %rdi
callq 0x6100
movq %rbx, %rdi
movq %r13, %rsi
callq 0x21390
leaq 0x8(%rsp), %rdi
callq 0x6548
cmpl $0x1, %r12d
jne 0x33509
movl (%r15), %ecx
movl 0x4(%r15), %r8d
leaq 0x60347(%rip), %r9      # 0x93841
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x2fab8
jmp 0x3351d
leaq 0x60348(%rip), %rsi     # 0x93858
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
callq 0x4460e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_spv_amd_shader_trinary_minmax_op(unsigned int, unsigned int, unsigned int, unsigned int const*, unsigned int)
void CompilerGLSL::emit_spv_amd_shader_trinary_minmax_op(uint32_t result_type, uint32_t id, uint32_t eop,
                                                         const uint32_t *args, uint32_t)
{
	require_extension_internal("GL_AMD_shader_trinary_minmax");

	enum AMDShaderTrinaryMinMax
	{
		FMin3AMD = 1,
		UMin3AMD = 2,
		SMin3AMD = 3,
		FMax3AMD = 4,
		UMax3AMD = 5,
		SMax3AMD = 6,
		FMid3AMD = 7,
		UMid3AMD = 8,
		SMid3AMD = 9
	};

	auto op = static_cast<AMDShaderTrinaryMinMax>(eop);

	switch (op)
	{
	case FMin3AMD:
	case UMin3AMD:
	case SMin3AMD:
		emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "min3");
		break;

	case FMax3AMD:
	case UMax3AMD:
	case SMax3AMD:
		emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "max3");
		break;

	case FMid3AMD:
	case UMid3AMD:
	case SMid3AMD:
		emit_trinary_func_op(result_type, id, args[0], args[1], args[2], "mid3");
		break;

	default:
		statement("// unimplemented SPV AMD shader trinary minmax op ", eop);
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r15
movl %ecx, %r12d
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %ecx, 0x14(%rsp)
leaq 0x6032e(%rip), %rsi     # 0x93896
leaq 0x18(%rsp), %r13
leaq 0x13(%rsp), %rdx
movq %r13, %rdi
callq 0x6100
movq %r14, %rdi
movq %r13, %rsi
callq 0x21390
leaq 0x18(%rsp), %rdi
callq 0x6548
cmpl $0x9, %r12d
ja 0x3360b
pushq $0xe
popq %rax
btl %r12d, %eax
jb 0x335c6
pushq $0x70
popq %rax
btl %r12d, %eax
jb 0x335da
movl $0x380, %eax            # imm = 0x380
btl %r12d, %eax
jae 0x3360b
movl (%r15), %ecx
movl 0x4(%r15), %r8d
movl 0x8(%r15), %r9d
leaq 0x602f9(%rip), %rax     # 0x938bd
jmp 0x335ec
movl (%r15), %ecx
movl 0x4(%r15), %r8d
movl 0x8(%r15), %r9d
leaq 0x602db(%rip), %rax     # 0x938b3
jmp 0x335ec
movl (%r15), %ecx
movl 0x4(%r15), %r8d
movl 0x8(%r15), %r9d
leaq 0x602cc(%rip), %rax     # 0x938b8
movq %rax, (%rsp)
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x2fe8e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x602b0(%rip), %rsi     # 0x938c2
leaq 0x14(%rsp), %rdx
movq %r14, %rdi
callq 0x446d4
jmp 0x335fc
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_spv_amd_gcn_shader_op(unsigned int, unsigned int, unsigned int, unsigned int const*, unsigned int)
void CompilerGLSL::emit_spv_amd_gcn_shader_op(uint32_t result_type, uint32_t id, uint32_t eop, const uint32_t *args,
                                              uint32_t)
{
	require_extension_internal("GL_AMD_gcn_shader");

	enum AMDGCNShader
	{
		CubeFaceIndexAMD = 1,
		CubeFaceCoordAMD = 2,
		TimeAMD = 3
	};

	auto op = static_cast<AMDGCNShader>(eop);

	switch (op)
	{
	case CubeFaceIndexAMD:
		emit_unary_func_op(result_type, id, args[0], "cubeFaceIndexAMD");
		break;
	case CubeFaceCoordAMD:
		emit_unary_func_op(result_type, id, args[0], "cubeFaceCoordAMD");
		break;
	case TimeAMD:
	{
		string expr = "timeAMD()";
		emit_op(result_type, id, expr, true);
		register_control_dependent_expression(id);
		break;
	}

	default:
		statement("// unimplemented SPV AMD gcn shader op ", eop);
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %r8, %r15
movl %ecx, %r12d
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %ecx, 0xc(%rsp)
leaq 0x6029b(%rip), %rsi     # 0x938f5
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x6100
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x21390
leaq 0x10(%rsp), %rdi
callq 0x6548
cmpl $0x1, %r12d
je 0x336e2
cmpl $0x2, %r12d
je 0x336d6
cmpl $0x3, %r12d
jne 0x336fa
leaq 0x60290(%rip), %rsi     # 0x93929
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x6100
leaq 0x10(%rsp), %rcx
pushq $0x1
popq %r8
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
xorl %r9d, %r9d
callq 0x2f196
movq %r14, %rdi
movl %ebx, %esi
callq 0x318aa
leaq 0x10(%rsp), %rdi
callq 0x6548
jmp 0x3370e
movl (%r15), %ecx
leaq 0x60238(%rip), %r8      # 0x93918
jmp 0x336ec
movl (%r15), %ecx
leaq 0x6021b(%rip), %r8      # 0x93907
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x2f9ee
jmp 0x3370e
leaq 0x60232(%rip), %rsi     # 0x93933
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
callq 0x4479a
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3372e
jmp 0x3371f
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6548
jmp 0x33731
movq %rax, %rbx
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::bitcast_expression[abi:cxx11](spirv_cross::SPIRType::BaseType, unsigned int)
std::string CompilerGLSL::bitcast_expression(SPIRType::BaseType target_type, uint32_t arg)
{
	auto expr = to_expression(arg);
	auto &src_type = expression_type(arg);
	if (src_type.basetype != target_type)
	{
		auto target = src_type;
		target.basetype = target_type;
		expr = join(bitcast_glsl_op(target, src_type), "(", expr, ")");
	}

	return expr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %ecx, %edx
callq 0x2b9f0
movq %r14, %rdi
movl %r15d, %esi
callq 0x104b0
movq %rax, %r15
cmpl %ebp, 0xc(%rax)
je 0x347a7
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x1a29c
leaq 0x40(%rsp), %rdx
movl %ebp, 0xc(%rdx)
movq (%r14), %rax
movq %rsp, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq *0x168(%rax)
leaq 0x694c3(%rip), %rdx     # 0x9dc29
leaq 0x61288(%rip), %r8      # 0x959f5
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
movq %rbx, %rcx
callq 0x4485f
leaq 0x20(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6320
movq %r14, %rdi
callq 0x6548
movq %rsp, %rdi
callq 0x6548
leaq 0x40(%rsp), %rdi
callq 0x17a3e
movq %rbx, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x6548
jmp 0x347c8
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x17a3e
jmp 0x347d9
jmp 0x347d6
movq %rax, %r14
movq %rbx, %rdi
callq 0x6548
movq %r14, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::to_array_size[abi:cxx11](spirv_cross::SPIRType const&, unsigned int)
string CompilerGLSL::to_array_size(const SPIRType &type, uint32_t index)
{
	assert(type.array.size() == type.array_size_literal.size());

	// Tessellation control shaders must have either gl_MaxPatchVertices or unsized arrays for input arrays.
	// Opt for unsized as it's the more "correct" variant to use.
	if (type.storage == StorageClassInput && get_entry_point().model == ExecutionModelTessellationControl)
		return "";

	auto &size = type.array[index];
	if (!type.array_size_literal[index])
		return to_expression(size);
	else if (size)
		return convert_to_string(size);
	else if (!backend.flexible_member_array_supported)
	{
		// For runtime-sized arrays, we can work around
		// lack of standard support for this by simply having
		// a single element array.
		//
		// Runtime length arrays must always be the last element
		// in an interface block.
		return "1";
	}
	else
		return "";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq 0x20(%rdx), %r13
movq 0x28(%rdx), %rax
subq %r13, %rax
sarq $0x2, %rax
movq 0x48(%rdx), %rcx
movl 0x50(%rdx), %edx
subq 0x38(%r15), %rcx
leaq (%rdx,%rcx,8), %rcx
cmpq %rcx, %rax
jne 0x3571a
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x1, 0x64(%r15)
jne 0x3569b
movq %r14, %rdi
callq 0x12fa4
cmpl $0x1, 0xb8(%rax)
jne 0x35697
leaq 0x5a1f7(%rip), %rsi     # 0x8f887
leaq 0x7(%rsp), %rdx
jmp 0x35700
movq 0x20(%r15), %r13
addq $0x38, %r15
movl %ebp, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0xab22
movl (%r13,%r12,4), %edx
testb %al, %al
je 0x356cf
testl %edx, %edx
je 0x356dc
leaq (,%r12,4), %rsi
addq %r13, %rsi
movq %rbx, %rdi
callq 0x4690c
jmp 0x35708
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2b9f0
jmp 0x35708
cmpb $0x0, 0x622(%r14)
je 0x356f4
leaq 0x5a19a(%rip), %rsi     # 0x8f887
leaq 0x5(%rsp), %rdx
jmp 0x35700
leaq 0x5f759(%rip), %rsi     # 0x94e54
leaq 0x6(%rsp), %rdx
movq %rbx, %rdi
callq 0x6100
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5fe87(%rip), %rdi     # 0x955a8
leaq 0x5c600(%rip), %rsi     # 0x91d28
leaq 0x5ff09(%rip), %rcx     # 0x95638
movl $0x214a, %edx           # imm = 0x214A
callq 0x61c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::variable_decl_function_local[abi:cxx11](spirv_cross::SPIRVariable&)
string CompilerGLSL::variable_decl_function_local(SPIRVariable &var)
{
	// These variables are always function local,
	// so make sure we emit the variable without storage qualifiers.
	// Some backends will inject custom variables locally in a function
	// with a storage qualifier which is not function-local.
	auto old_storage = var.storage;
	var.storage = StorageClassFunction;
	auto expr = variable_decl(var);
	var.storage = old_storage;
	return expr;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movl 0x10(%rdx), %ebp
movl $0x7, 0x10(%rdx)
callq 0x2619e
movl %ebp, 0x10(%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::end_scope()
void CompilerGLSL::end_scope()
{
	if (!indent)
		SPIRV_CROSS_THROW("Popping empty indent stack.");
	indent--;
	statement("}");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl 0x638(%rdi), %eax
testl %eax, %eax
je 0x36538
decl %eax
movl %eax, 0x638(%rdi)
leaq 0x5cc3e(%rip), %rsi     # 0x93169
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x47bda
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x5f66f(%rip), %rsi     # 0x95bb9
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xb084e(%rip), %rsi     # 0xe6dc0
movq 0xb1a67(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x36598
jmp 0x365a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::flattened_access_chain_matrix[abi:cxx11](unsigned int, unsigned int const*, unsigned int, spirv_cross::SPIRType const&, unsigned int, unsigned int, bool)
std::string CompilerGLSL::flattened_access_chain_matrix(uint32_t base, const uint32_t *indices, uint32_t count,
                                                        const SPIRType &target_type, uint32_t offset,
                                                        uint32_t matrix_stride, bool need_transpose)
{
	assert(matrix_stride);
	SPIRType tmp_type = target_type;
	if (need_transpose)
		swap(tmp_type.vecsize, tmp_type.columns);

	std::string expr;

	expr += type_to_glsl_constructor(tmp_type);
	expr += "(";

	for (uint32_t i = 0; i < tmp_type.columns; i++)
	{
		if (i != 0)
			expr += ", ";

		expr += flattened_access_chain_vector(base, indices, count, tmp_type, offset + i * matrix_stride, matrix_stride,
		                                      /* need_transpose= */ false);
	}

	expr += ")";

	return expr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %r8d, 0x4(%rsp)
movq %rcx, 0x8(%rsp)
movl %edx, (%rsp)
movl 0x148(%rsp), %ebp
testl %ebp, %ebp
je 0x3695f
movq %rsi, %r12
movq %rdi, %rbx
movb 0x150(%rsp), %r14b
leaq 0x30(%rsp), %rdi
movq %r9, %rsi
callq 0x1a29c
testb %r14b, %r14b
je 0x36878
movq 0x44(%rsp), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x44(%rsp)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %r12, %rsi
callq 0x2c226
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x64f0
leaq 0x10(%rsp), %rdi
callq 0x6548
leaq 0x67371(%rip), %rsi     # 0x9dc29
movq %rbx, %rdi
callq 0x64d0
movl 0x140(%rsp), %r14d
xorl %r15d, %r15d
leaq 0x10(%rsp), %r13
cmpl 0x48(%rsp), %r15d
jae 0x36931
testl %r15d, %r15d
je 0x368eb
movq %rbx, %rdi
leaq 0x5e7a5(%rip), %rsi     # 0x9508b
callq 0x64d0
subq $0x8, %rsp
movq %r13, %rdi
movq %r12, %rsi
movl 0x8(%rsp), %edx
movq 0x10(%rsp), %rcx
movl 0xc(%rsp), %r8d
leaq 0x38(%rsp), %r9
pushq $0x0
pushq %rbp
pushq %r14
callq 0x369b2
addq $0x20, %rsp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x64f0
movq %r13, %rdi
callq 0x6548
incl %r15d
addl %ebp, %r14d
jmp 0x368d0
leaq 0x5f0bd(%rip), %rsi     # 0x959f5
movq %rbx, %rdi
callq 0x64d0
leaq 0x30(%rsp), %rdi
callq 0x17a3e
movq %rbx, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5dcd7(%rip), %rdi     # 0x9463d
leaq 0x5b3bb(%rip), %rsi     # 0x91d28
leaq 0x5dcd7(%rip), %rcx     # 0x9464b
movl $0x15e8, %edx           # imm = 0x15E8
callq 0x61c0
jmp 0x36986
jmp 0x36995
jmp 0x36995
jmp 0x36995
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
jmp 0x36998
movq %rax, %r14
movq %rbx, %rdi
callq 0x6548
leaq 0x30(%rsp), %rdi
callq 0x17a3e
movq %r14, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: vector_swizzle(int, int)
static const char *vector_swizzle(int vecsize, int index)
{
	static const char *swizzle[4][4] = {
		{ ".x", ".y", ".z", ".w" }, { ".xy", ".yz", ".zw" }, { ".xyz", ".yzw" }, { "" }
	};

	assert(vecsize >= 1 && vecsize <= 4);
	assert(index >= 0 && index < 4);
	assert(swizzle[vecsize - 1][index]);

	return swizzle[vecsize - 1][index];
}

// Assembly:
pushq %rax
decl %edi
cmpl $0x4, %edi
jae 0x36cdf
movl %edi, %eax
movl %esi, %ecx
shlq $0x5, %rax
leaq 0xb09ef(%rip), %rdx     # 0xe76c0
addq %rax, %rdx
movq (%rdx,%rcx,8), %rax
testq %rax, %rax
je 0x36cfe
popq %rcx
retq
leaq 0x5f045(%rip), %rdi     # 0x95d2b
leaq 0x5b03b(%rip), %rsi     # 0x91d28
leaq 0x5f054(%rip), %rcx     # 0x95d48
movl $0x108, %edx            # imm = 0x108
callq 0x61c0
leaq 0x5f068(%rip), %rdi     # 0x95d6d
leaq 0x5b01c(%rip), %rsi     # 0x91d28
leaq 0x5f035(%rip), %rcx     # 0x95d48
movl $0x10a, %edx            # imm = 0x10A
callq 0x61c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::args_will_forward(unsigned int, unsigned int const*, unsigned int, bool)
bool CompilerGLSL::args_will_forward(uint32_t id, const uint32_t *args, uint32_t num_args, bool pure)
{
	if (forced_temporaries.find(id) != end(forced_temporaries))
		return false;

	for (uint32_t i = 0; i < num_args; i++)
		if (!should_forward(args[i]))
			return false;

	// We need to forward globals as well.
	if (!pure)
	{
		for (auto global : global_variables)
			if (!should_forward(global))
				return false;
		for (auto aliased : aliased_variables)
			if (!should_forward(aliased))
				return false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %ebp
movl %ecx, %r15d
movq %rdx, %r14
movq %rdi, %rbx
leaq 0xc(%rsp), %rax
movl %esi, (%rax)
addq $0x228, %rdi            # imm = 0x228
movq %rax, %rsi
callq 0x1c722
testq %rax, %rax
jne 0x36d9f
movl %r15d, %r15d
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x36d71
movl (%r14,%r12,4), %esi
movq %rbx, %rdi
callq 0x2f360
incq %r12
testb %al, %al
jne 0x36d57
jmp 0x36d9f
movb $0x1, %r14b
testb %bpl, %bpl
jne 0x36da2
movq 0x118(%rbx), %r14
movq 0x120(%rbx), %r15
cmpq %r15, %r14
je 0x36db2
movl (%r14), %esi
movq %rbx, %rdi
callq 0x2f360
addq $0x4, %r14
testb %al, %al
jne 0x36d87
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x130(%rbx), %r15
movq 0x138(%rbx), %r12
cmpq %r12, %r15
sete %r14b
je 0x36da2
movl (%r15), %esi
movq %rbx, %rdi
callq 0x2f360
addq $0x4, %r15
testb %al, %al
jne 0x36dc0
jmp 0x36da2
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::register_impure_function_call()
void CompilerGLSL::register_impure_function_call()
{
	// Impure functions can modify globals and aliased variables, so invalidate them as well.
	for (auto global : global_variables)
		flush_dependees(get<SPIRVariable>(global));
	for (auto aliased : aliased_variables)
		flush_dependees(get<SPIRVariable>(aliased));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x118(%rdi), %r14
movq 0x120(%rdi), %r15
cmpq %r15, %r14
je 0x36e15
movl (%r14), %esi
movq %rbx, %rdi
callq 0x9c0e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x108b0
addq $0x4, %r14
jmp 0x36df4
movq 0x130(%rbx), %r14
movq 0x138(%rbx), %r15
cmpq %r15, %r14
je 0x36e44
movl (%r14), %esi
movq %rbx, %rdi
callq 0x9c0e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x108b0
addq $0x4, %r14
jmp 0x36e23
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::flush_variable_declaration(unsigned int)
void CompilerGLSL::flush_variable_declaration(uint32_t id)
{
	auto *var = maybe_get<SPIRVariable>(id);
	if (var && var->deferred_declaration)
	{
		statement(variable_decl_function_local(*var), ";");
		var->deferred_declaration = false;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
callq 0xa9e4
testq %rax, %rax
je 0x36e98
movq %rax, %rbx
cmpb $0x1, 0x59(%rax)
jne 0x36e98
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x364e6
leaq 0x62c00(%rip), %rdx     # 0x99a81
movq %r14, %rdi
movq %r15, %rsi
callq 0x953a
movq %rsp, %rdi
callq 0x6548
movb $0x0, 0x59(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::remove_unity_swizzle(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool CompilerGLSL::remove_unity_swizzle(uint32_t base, string &op)
{
	auto pos = op.find_last_of('.');
	if (pos == string::npos || pos == 0)
		return false;

	string final_swiz = op.substr(pos + 1, string::npos);

	if (backend.swizzle_is_function)
	{
		if (final_swiz.size() < 2)
			return false;

		if (final_swiz.substr(final_swiz.size() - 2, string::npos) == "()")
			final_swiz.erase(final_swiz.size() - 2, string::npos);
		else
			return false;
	}

	// Check if final swizzle is of form .x, .xy, .xyz, .xyzw or similar.
	// If so, and previous swizzle is of same length,
	// we can drop the final swizzle altogether.
	for (uint32_t i = 0; i < final_swiz.size(); i++)
	{
		static const char expected[] = { 'x', 'y', 'z', 'w' };
		if (i >= 4 || final_swiz[i] != expected[i])
			return false;
	}

	auto &type = expression_type(base);

	// Sanity checking ...
	assert(type.columns == 1 && type.array.empty());

	if (type.vecsize == final_swiz.size())
		op.erase(pos, string::npos);
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
pushq $0x2e
popq %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x6500
leaq 0x1(%rax), %rdx
cmpq $0x2, %rdx
jae 0x36eeb
xorl %ebp, %ebp
jmp 0x36f9d
movq %rax, %r14
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rcx
movq %rbx, %rsi
callq 0x62b0
cmpb $0x1, 0x620(%r15)
jne 0x36f62
movq 0x10(%rsp), %rdx
cmpq $0x2, %rdx
jb 0x36f91
addq $-0x2, %rdx
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $-0x1
popq %rcx
callq 0x62b0
leaq 0x5ca00(%rip), %rsi     # 0x93930
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x17431
movl %eax, %r13d
movq %r12, %rdi
callq 0x6548
testb %r13b, %r13b
je 0x36f91
leaq 0x8(%rsp), %rdi
movq 0x8(%rdi), %rsi
addq $-0x2, %rsi
pushq $-0x1
popq %rdx
callq 0x6080
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
xorl %edx, %edx
leaq 0x5a537(%rip), %rsi     # 0x914ac
cmpq %rdx, %rcx
je 0x36fae
cmpq $0x4, %rdx
je 0x36f91
movb (%rax,%rdx), %dil
leaq 0x1(%rdx), %r8
cmpb (%rdx,%rsi), %dil
movq %r8, %rdx
je 0x36f75
xorl %ebp, %ebp
leaq 0x8(%rsp), %rdi
callq 0x6548
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movl %ebp, %esi
callq 0x104b0
cmpl $0x1, 0x18(%rax)
jne 0x36fe5
movq 0x20(%rax), %rcx
cmpq 0x28(%rax), %rcx
jne 0x36fe5
movl 0x14(%rax), %eax
movb $0x1, %bpl
cmpq %rax, 0x10(%rsp)
jne 0x36f93
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6080
jmp 0x36f93
leaq 0x5db42(%rip), %rdi     # 0x94b2e
leaq 0x5ad35(%rip), %rsi     # 0x91d28
leaq 0x5db5c(%rip), %rcx     # 0x94b56
movl $0x179f, %edx           # imm = 0x179F
callq 0x61c0
jmp 0x37008
jmp 0x37008
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_block_instructions(spirv_cross::SPIRBlock&)
void CompilerGLSL::emit_block_instructions(SPIRBlock &block)
{
	current_emitting_block = &block;
	for (auto &op : block.ops)
		emit_instruction(op);
	current_emitting_block = nullptr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, 0x410(%rdi)
movq 0x38(%rsi), %r14
movq 0x40(%rsi), %r15
cmpq %r15, %r14
je 0x3749a
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x48(%rax)
addq $0xc, %r14
jmp 0x37483
andq $0x0, 0x410(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::append_global_func_args(spirv_cross::SPIRFunction const&, unsigned int, 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>>>>&)
void CompilerGLSL::append_global_func_args(const SPIRFunction &func, uint32_t index, vector<string> &arglist)
{
	auto &args = func.arguments;
	uint32_t arg_cnt = uint32_t(args.size());
	for (uint32_t arg_idx = index; arg_idx < arg_cnt; arg_idx++)
	{
		auto &arg = args[arg_idx];
		assert(arg.alias_global_variable);

		// If the underlying variable needs to be declared
		// (ie. a local variable with deferred declaration), do so now.
		uint32_t var_id = get<SPIRVariable>(arg.id).basevariable;
		if (var_id)
			flush_variable_declaration(var_id);

		arglist.push_back(to_func_call_arg(arg.id));
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x8(%rsp)
movl %edx, %ecx
movq %rdi, %r15
movq 0x20(%rsi), %rax
movq %rsi, 0x10(%rsp)
subq 0x18(%rsi), %rax
pushq $0x14
popq %rsi
cqto
idivq %rsi
movl %ecx, %r13d
movl %eax, %ebp
imulq $0x14, %r13, %rbx
addq $0x4, %rbx
leaq 0x18(%rsp), %r12
cmpq %rbp, %r13
jae 0x3d181
movq 0x10(%rsp), %rax
movq 0x18(%rax), %r14
cmpb $0x0, 0xc(%r14,%rbx)
je 0x3d190
movl (%r14,%rbx), %esi
movq %r15, %rdi
callq 0x9c0e
movl 0x1c(%rax), %esi
testl %esi, %esi
je 0x3d150
movq %r15, %rdi
callq 0x36e4a
movl (%r14,%rbx), %edx
movq (%r15), %rax
movq %r12, %rdi
movq %r15, %rsi
callq *0xd0(%rax)
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0xcc8c
movq %r12, %rdi
callq 0x6548
incq %r13
addq $0x14, %rbx
jmp 0x3d11f
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5832c(%rip), %rdi     # 0x954c3
leaq 0x54b8a(%rip), %rsi     # 0x91d28
leaq 0x58338(%rip), %rcx     # 0x954dd
movl $0x2013, %edx           # imm = 0x2013
callq 0x61c0
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::check_function_call_constraints(unsigned int const*, unsigned int)
void CompilerGLSL::check_function_call_constraints(const uint32_t *args, uint32_t length)
{
	// If our variable is remapped, and we rely on type-remapping information as
	// well, then we cannot pass the variable as a function parameter.
	// Fixing this is non-trivial without stamping out variants of the same function,
	// so for now warn about this and suggest workarounds instead.
	for (uint32_t i = 0; i < length; i++)
	{
		auto *var = maybe_get<SPIRVariable>(args[i]);
		if (!var || !var->remapped_variable)
			continue;

		auto &type = get<SPIRType>(var->basetype);
		if (type.basetype == SPIRType::Image && type.image.dim == DimSubpassData)
		{
			SPIRV_CROSS_THROW("Tried passing a remapped subpassInput variable to a function. "
			                  "This will not work correctly because type-remapping information is lost. "
			                  "To workaround, please consider not passing the subpass input as a function parameter, "
			                  "or use in/out variables instead which do not need type remapping information.");
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x3d217
movl (%rbx,%r12,4), %esi
movq %r14, %rdi
callq 0xa9e4
testq %rax, %rax
je 0x3d212
cmpb $0x1, 0x5b(%rax)
jne 0x3d212
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0x90a4
cmpl $0xd, 0xc(%rax)
jne 0x3d212
cmpl $0x6, 0x84(%rax)
je 0x3d224
incq %r12
jmp 0x3d1dc
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x589a2(%rip), %rsi     # 0x95bd8
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xa9b62(%rip), %rsi     # 0xe6dc0
movq 0xaad7b(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x3d284
jmp 0x3d28c
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
movq %r14, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::check_atomic_image(unsigned int)
bool CompilerGLSL::check_atomic_image(uint32_t id)
{
	auto &type = expression_type(id);
	if (type.storage == StorageClassImage)
	{
		if (options.es && options.version < 320)
			require_extension_internal("GL_OES_shader_image_atomic");

		auto *var = maybe_get_backing_variable(id);
		if (var)
		{
			auto &flags = ir.meta.at(var->self).decoration.decoration_flags;
			if (flags.get(DecorationNonWritable) || flags.get(DecorationNonReadable))
			{
				flags.clear(DecorationNonWritable);
				flags.clear(DecorationNonReadable);
				force_recompile = true;
			}
		}
		return true;
	}
	else
		return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x104b0
movl 0x64(%rax), %r15d
cmpl $0xb, %r15d
jne 0x3d32e
cmpb $0x1, 0x43c(%rbx)
jne 0x3d2f5
cmpl $0x13f, 0x438(%rbx)     # imm = 0x13F
ja 0x3d2f5
leaq 0x58629(%rip), %rsi     # 0x958f7
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x6100
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21390
leaq 0x8(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1067e
testq %rax, %rax
je 0x3d32e
leaq 0x38(%rbx), %rdi
movl 0x8(%rax), %esi
callq 0x1738e
movq 0x60(%rax), %rcx
testl $0x3000000, %ecx        # imm = 0x3000000
je 0x3d32e
andq $-0x3000001, %rcx       # imm = 0xFCFFFFFF
movq %rcx, 0x60(%rax)
movb $0x1, 0x1d0(%rbx)
cmpl $0xb, %r15d
sete %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::get_next_instruction_in_block(spirv_cross::Instruction const&)
const Instruction *CompilerGLSL::get_next_instruction_in_block(const Instruction &instr)
{
	// FIXME: This is kind of hacky. There should be a cleaner way.
	auto offset = uint32_t(&instr - current_emitting_block->ops.data());
	if ((offset + 1) < current_emitting_block->ops.size())
		return &current_emitting_block->ops[offset + 1];
	else
		return nullptr;
}

// Assembly:
movq %rsi, %rax
movq 0x410(%rdi), %rcx
movq 0x38(%rcx), %rdi
movq 0x40(%rcx), %rcx
subq %rdi, %rax
pushq $0xc
popq %r8
cqto
idivq %r8
movq %rax, %rsi
incl %esi
subq %rdi, %rcx
movq %rcx, %rax
cqto
idivq %r8
imulq $0xc, %rsi, %rdx
addq %rdi, %rdx
xorl %ecx, %ecx
cmpq %rax, %rsi
cmovbq %rdx, %rcx
movq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::is_non_native_row_major_matrix(unsigned int)
bool CompilerGLSL::is_non_native_row_major_matrix(uint32_t id)
{
	// Natively supported row-major matrices do not need to be converted.
	// Legacy targets do not support row major.
	if (backend.native_row_major_matrix && !is_legacy())
		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;

	// Only square row-major matrices can be converted at this time.
	// Converting non-square matrices will require defining custom GLSL function that
	// swaps matrix elements while retaining the original dimensional form of the matrix.
	const auto type = expression_type(id);
	if (type.columns != type.vecsize)
		SPIRV_CROSS_THROW("Row-major matrices must be square on this platform.");

	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movl %esi, %ebx
movq %rdi, %r14
cmpb $0x1, 0x628(%rdi)
jne 0x3d41f
movq %r14, %rdi
callq 0x41b9c
testb %al, %al
je 0x3d433
movl %ebx, %eax
movq 0x38(%r14), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
testb $0x10, 0x60(%rcx,%rax)
jne 0x3d437
xorl %eax, %eax
jmp 0x3d465
movq %r14, %rdi
movl %ebx, %esi
callq 0x104b0
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1a29c
movl 0x18(%rbx), %eax
cmpl 0x14(%rbx), %eax
jne 0x3d471
leaq 0x28(%rsp), %rdi
callq 0x17a3e
movb $0x1, %al
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x580c7(%rip), %rsi     # 0x9554a
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xa9915(%rip), %rsi     # 0xe6dc0
movq 0xaab2e(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x3d4d1
jmp 0x3d4d9
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
leaq 0x28(%rsp), %rdi
callq 0x17a3e
movq %r14, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::member_is_non_native_row_major_matrix(spirv_cross::SPIRType const&, unsigned int)
bool CompilerGLSL::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 && !is_legacy())
		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;

	// Only square row-major matrices can be converted at this time.
	// Converting non-square matrices will require defining custom GLSL function that
	// swaps matrix elements while retaining the original dimensional form of the matrix.
	const auto mbr_type = get<SPIRType>(type.member_types[index]);
	if (mbr_type.columns != mbr_type.vecsize)
		SPIRV_CROSS_THROW("Row-major matrices must be square on this platform.");

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x628(%rdi)
jne 0x3d516
movq %rbx, %rdi
callq 0x41b9c
testb %al, %al
je 0x3d53e
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x16ba6
movb (%r15), %r15b
leaq 0x38(%rsp), %rdi
callq 0xb51c
testb $0x10, %r15b
jne 0x3d542
xorl %eax, %eax
jmp 0x3d577
movl %ebp, %eax
movq 0x68(%r14), %rcx
movl (%rcx,%rax,4), %esi
movq %rbx, %rdi
callq 0x90a4
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1a29c
movl 0x18(%rbx), %eax
cmpl 0x14(%rbx), %eax
jne 0x3d585
leaq 0x30(%rsp), %rdi
callq 0x17a3e
movb $0x1, %al
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x57fb3(%rip), %rsi     # 0x9554a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0xa9801(%rip), %rsi     # 0xe6dc0
movq 0xaaa1a(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x3d5e5
jmp 0x3d5ed
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
leaq 0x30(%rsp), %rdi
callq 0x17a3e
movq %r14, %rdi
callq 0x64b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::to_qualifiers_glsl[abi:cxx11](unsigned int)
string CompilerGLSL::to_qualifiers_glsl(uint32_t id)
{
	auto flags = ir.meta[id].decoration.decoration_flags;
	string res;

	auto *var = maybe_get<SPIRVariable>(id);

	if (var && var->storage == StorageClassWorkgroup && !backend.shared_is_implied)
		res += "shared ";

	res += to_interpolation_qualifiers(flags);
	if (var)
		res += to_storage_qualifiers_glsl(*var);

	auto &type = expression_type(id);
	if (type.image.dim != DimSubpassData && type.image.sampled == 2)
	{
		if (flags.get(DecorationCoherent))
			res += "coherent ";
		if (flags.get(DecorationRestrict))
			res += "restrict ";
		if (flags.get(DecorationNonWritable))
			res += "readonly ";
		if (flags.get(DecorationNonReadable))
			res += "writeonly ";
	}

	res += to_precision_qualifiers_glsl(id);

	return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, %eax
movq 0x38(%rsi), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
leaq (%rcx,%rax), %rsi
addq $0x60, %rsi
leaq 0x28(%rsp), %rdi
callq 0x934a
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %r14, %rdi
movl %ebp, %esi
callq 0xa9e4
movq %rax, %r15
testq %rax, %rax
je 0x3d9b7
cmpl $0x4, 0x10(%r15)
jne 0x3d9b7
cmpb $0x0, 0x621(%r14)
jne 0x3d9b7
leaq 0x57bea(%rip), %rsi     # 0x95599
movq %rbx, %rdi
callq 0x64d0
movq (%r14), %rax
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %r14, %rsi
callq *0x140(%rax)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x64f0
leaq 0x8(%rsp), %rdi
callq 0x6548
testq %r15, %r15
je 0x3da03
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x130(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x64d0
movq %r14, %rdi
movl %ebp, %esi
callq 0x104b0
cmpl $0x6, 0x84(%rax)
je 0x3da87
cmpl $0x2, 0x8c(%rax)
jne 0x3da87
movq 0x28(%rsp), %rax
btl $0x17, %eax
jae 0x3da3e
leaq 0x5aecc(%rip), %rsi     # 0x988fd
movq %rbx, %rdi
callq 0x64d0
movq 0x28(%rsp), %rax
btl $0x13, %eax
jae 0x3da58
leaq 0x5458e(%rip), %rsi     # 0x91fd9
movq %rbx, %rdi
callq 0x64d0
movq 0x28(%rsp), %rax
btl $0x18, %eax
jae 0x3da72
leaq 0x54589(%rip), %rsi     # 0x91fee
movq %rbx, %rdi
callq 0x64d0
movq 0x28(%rsp), %rax
btl $0x19, %eax
jae 0x3da87
leaq 0x54564(%rip), %rsi     # 0x91fe3
movq %rbx, %rdi
callq 0x64d0
movq %r14, %rdi
movl %ebp, %esi
callq 0x3d910
movq %rbx, %rdi
movq %rax, %rsi
callq 0x64d0
leaq 0x30(%rsp), %rdi
callq 0xb51c
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x6548
jmp 0x3daca
jmp 0x3dac7
jmp 0x3dac7
movq %rax, %r14
movq %rbx, %rdi
callq 0x6548
leaq 0x30(%rsp), %rdi
callq 0xb51c
movq %r14, %rdi
callq 0x64b0
// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::argument_decl[abi:cxx11](spirv_cross::SPIRFunction::Parameter const&)
string CompilerGLSL::argument_decl(const SPIRFunction::Parameter &arg)
{
	// glslangValidator seems to make all arguments pointer no matter what which is rather bizarre ...
	auto &type = expression_type(arg.id);
	const char *direction = "";

	if (type.pointer)
	{
		if (arg.write_count && arg.read_count)
			direction = "inout ";
		else if (arg.write_count)
			direction = "out ";
	}

	return join(direction, to_qualifiers_glsl(arg.id), variable_decl(type, to_name(arg.id), arg.id));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdx), %esi
movq %r14, %rdi
callq 0x104b0
movq %rax, %r12
leaq 0x51d7a(%rip), %rax     # 0x8f887
movq %rax, (%rsp)
cmpb $0x1, 0x60(%r12)
jne 0x3db40
movl 0xc(%r15), %eax
testl %eax, %eax
je 0x3db31
cmpl $0x0, 0x8(%r15)
je 0x3db31
leaq 0x57a72(%rip), %rax     # 0x955a1
jmp 0x3db3c
testl %eax, %eax
je 0x3db40
leaq 0x57a67(%rip), %rax     # 0x955a3
movq %rax, (%rsp)
movl 0x4(%r15), %edx
movq (%r14), %rax
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq *0x128(%rax)
movl 0x4(%r15), %edx
movq (%r14), %rax
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq *0x38(%rax)
movl 0x4(%r15), %r8d
movq (%r14), %rax
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rcx
movq %r14, %rsi
movq %r12, %rdx
callq *0xc8(%rax)
movq %rsp, %rsi
leaq 0x48(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %rbx, %rdi
callq 0x4679c
leaq 0x28(%rsp), %rdi
callq 0x6548
leaq 0x8(%rsp), %rdi
callq 0x6548
leaq 0x48(%rsp), %rdi
callq 0x6548
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x6548
jmp 0x3dbdb
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6548
jmp 0x3dbea
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x6548
movq %rbx, %rdi
callq 0x64b0