LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::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, 0x10(%rsp)
movq %rdi, %r14
movl %ecx, 0x14(%rsp)
leaq 0x28(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x79da4(%rip), %rsi     # 0xb87ab
leaq 0x79db1(%rip), %rdx     # 0xb87bf
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0x7be0
movq %r14, %rdi
movq %r13, %rsi
callq 0x26356
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3ea3d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
decl %r12d
cmpl $0x3, %r12d
ja 0x3eadf
leaq 0x76f0b(%rip), %rax     # 0xb595c
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl (%r15), %ecx
movl 0x4(%r15), %r8d
leaq 0x79d58(%rip), %r9      # 0xb87c0
jmp 0x3eab8
movl (%r15), %ecx
movl 0x4(%r15), %r8d
movl 0x8(%r15), %r9d
leaq 0x79d76(%rip), %rax     # 0xb87f2
movq %rax, (%rsp)
movq %r14, %rdi
movl 0x10(%rsp), %esi
movl %ebx, %edx
callq 0x3a620
jmp 0x3eac6
movl (%r15), %ecx
leaq 0x79d6b(%rip), %r8      # 0xb8805
movq %r14, %rdi
movl 0x10(%rsp), %esi
movl %ebx, %edx
callq 0x39f86
jmp 0x3eac6
movl (%r15), %ecx
movl 0x4(%r15), %r8d
leaq 0x79d1e(%rip), %r9      # 0xb87d6
movq %r14, %rdi
movl 0x10(%rsp), %esi
movl %ebx, %edx
callq 0x3a096
movq %r14, %rdi
movl %ebx, %esi
callq 0x3c676
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x79d28(%rip), %rsi     # 0xb880e
leaq 0x14(%rsp), %rdx
movq %r14, %rdi
callq 0x55012
jmp 0x3ead0
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3eb0f
movq 0x28(%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_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, (%rsp)
movl %esi, %r14d
movq %rdi, %rbx
movl %ecx, 0x4(%rsp)
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x79cf0(%rip), %rsi     # 0xb8839
leaq 0x79d10(%rip), %rdx     # 0xb8860
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x7be0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x26356
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3eb7f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
cmpl $0x1, %r12d
jne 0x3eba3
movl (%r15), %ecx
movl 0x4(%r15), %r8d
leaq 0x79cce(%rip), %r9      # 0xb8861
movq %rbx, %rdi
movl %r14d, %esi
movl (%rsp), %edx
callq 0x3a096
jmp 0x3ebb7
leaq 0x79cce(%rip), %rsi     # 0xb8878
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
callq 0x55136
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3ebe0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/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, 0x10(%rsp)
movl %esi, %ebp
movq %rdi, %r14
movl %ecx, 0x14(%rsp)
leaq 0x28(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x79c9d(%rip), %rsi     # 0xb88b6
leaq 0x79cb2(%rip), %rdx     # 0xb88d2
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0x7be0
movq %r14, %rdi
movq %r13, %rsi
callq 0x26356
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3ec4f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
cmpl $0x9, %r12d
ja 0x3ecd1
movl $0xe, %eax
btl %r12d, %eax
jb 0x3ec8a
movl $0x70, %eax
btl %r12d, %eax
jb 0x3ec9e
movl $0x380, %eax            # imm = 0x380
btl %r12d, %eax
jae 0x3ecd1
movl (%r15), %ecx
movl 0x4(%r15), %r8d
movl 0x8(%r15), %r9d
leaq 0x79c55(%rip), %rax     # 0xb88dd
jmp 0x3ecb0
movl (%r15), %ecx
movl 0x4(%r15), %r8d
movl 0x8(%r15), %r9d
leaq 0x79c37(%rip), %rax     # 0xb88d3
jmp 0x3ecb0
movl (%r15), %ecx
movl 0x4(%r15), %r8d
movl 0x8(%r15), %r9d
leaq 0x79c28(%rip), %rax     # 0xb88d8
movq %rax, (%rsp)
movq %r14, %rdi
movl %ebp, %esi
movl 0x10(%rsp), %edx
callq 0x3a620
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x79c0a(%rip), %rsi     # 0xb88e2
leaq 0x14(%rsp), %rdx
movq %r14, %rdi
callq 0x5525a
jmp 0x3ecc2
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3ed01
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movl %ecx, %r12d
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %ecx, 0x4(%rsp)
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x79bdc(%rip), %rsi     # 0xb8915
leaq 0x79be6(%rip), %rdx     # 0xb8926
leaq 0x8(%rsp), %rdi
callq 0x7be0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x26356
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3ed6e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
cmpl $0x1, %r12d
je 0x3ede4
cmpl $0x2, %r12d
je 0x3edd8
cmpl $0x3, %r12d
jne 0x3edfc
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x79bba(%rip), %rsi     # 0xb8949
leaq 0x79bbc(%rip), %rdx     # 0xb8952
callq 0x7be0
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x3942c
movq %r14, %rdi
movl %ebx, %esi
callq 0x3c676
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3ee10
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3ee10
movl (%r15), %ecx
leaq 0x79b56(%rip), %r8      # 0xb8938
jmp 0x3edee
movl (%r15), %ecx
leaq 0x79b39(%rip), %r8      # 0xb8927
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x39f86
jmp 0x3ee10
leaq 0x79b50(%rip), %rsi     # 0xb8953
leaq 0x4(%rsp), %rdx
movq %r14, %rdi
callq 0x5537e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3ee3f
jmp 0x3ee23
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3ee42
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3ee42
movq %rax, %rbx
movq %rbx, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x33f8a
movq %r14, %rdi
movl %r15d, %esi
callq 0x12a72
movq %rax, %r15
cmpl %ebp, 0xc(%rax)
je 0x4024b
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x1eafa
leaq 0x40(%rsp), %rdx
movl %ebp, 0xc(%rdx)
movq (%r14), %rax
movq %rsp, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq *0x168(%rax)
leaq 0x82b13(%rip), %rdx     # 0xc2c71
leaq 0x7a8b0(%rip), %r8      # 0xbaa15
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
movq %rbx, %rcx
callq 0x554a2
leaq 0x20(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4019f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x401ba
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xbc21f(%rip), %rax     # 0xfc3e0
addq $0x10, %rax
leaq 0xe0(%rsp), %r14
movq %rax, -0xa0(%r14)
movq %r14, %rdi
callq 0xde80
movq -0x38(%r14), %rdi
testq %rdi, %rdi
je 0x401f5
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x40234
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x78(%rsp)
movl %eax, 0x80(%rsp)
movq %rax, 0x88(%rsp)
movl %eax, 0x90(%rsp)
movq %rax, 0x98(%rsp)
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x4024b
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq %rbx, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4027f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4027f
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x1be02
jmp 0x40290
jmp 0x4028d
movq %rax, %r14
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x402a7
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_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 %r12
pushq %rbx
movl %ecx, %r15d
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdx), %rax
movq 0x28(%rdx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movq 0x48(%r12), %rsi
movl 0x50(%r12), %edi
movq 0x38(%r12), %rcx
subq %rcx, %rsi
leaq (%rdi,%rsi,8), %rsi
cmpq %rsi, %rdx
jne 0x419e7
cmpl $0x1, 0x64(%r12)
jne 0x41911
movq %r14, %rdi
callq 0x15f76
cmpl $0x1, 0xb8(%rax)
jne 0x41907
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
jmp 0x41996
movq 0x20(%r12), %rax
movq 0x38(%r12), %rcx
movl %r15d, %edx
movl %r15d, %esi
shrl $0x6, %esi
movq (%rcx,%rsi,8), %rcx
btq %r15, %rcx
movl (%rax,%rdx,4), %ebp
jae 0x41976
testl %ebp, %ebp
je 0x41985
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x419bb
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebp, %edx
cmpl $0x63, %edx
jbe 0x419b4
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0x419b9
cmpl $0x2710, %edx           # imm = 0x2710
jb 0x419bb
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0x41945
addl $-0x3, %eax
jmp 0x419bb
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x33f8a
jmp 0x419db
leaq 0x10(%rbx), %rax
cmpb $0x0, 0x622(%r14)
movq %rax, (%rbx)
je 0x419a4
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
jmp 0x419db
movw $0x31, 0x10(%rbx)
movq $0x1, 0x8(%rbx)
jmp 0x419db
addl $-0x2, %eax
jmp 0x419bb
decl %eax
movl %eax, %esi
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
xorl %edx, %edx
callq 0x62f0
movq (%rbx), %rdi
movl 0x8(%rbx), %esi
movl %ebp, %edx
callq 0x20b57
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x78bda(%rip), %rdi     # 0xba5c8
leaq 0x75353(%rip), %rsi     # 0xb6d48
leaq 0x78c5c(%rip), %rcx     # 0xba658
movl $0x214a, %edx           # imm = 0x214A
callq 0x61b0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2c7ac
movl %ebp, 0x10(%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl 0x638(%rdi), %eax
testl %eax, %eax
je 0x42d8c
decl %eax
movl %eax, 0x638(%rdi)
leaq 0x7540c(%rip), %rsi     # 0xb8189
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x59e02
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x77e30(%rip), %rsi     # 0xbabd9
leaq 0x77e44(%rip), %rdx     # 0xbabf4
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0xb8ff7(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xb8fcf(%rip), %rsi     # 0xfbdb0
movq 0xba1f0(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x42e0a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x42e14
jmp 0x42e1c
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_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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r14d
movl %ecx, %ebp
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x4(%rsp), %rax
movl %esi, (%rax)
addq $0x228, %rdi            # imm = 0x228
movq %rax, %rsi
callq 0x21122
testq %rax, %rax
je 0x4397e
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %ebp, %ebp
je 0x439a0
movl %ebp, %r12d
xorl %r13d, %r13d
movl (%r15,%r13,4), %esi
movq %rbx, %rdi
callq 0x39684
testb %al, %al
je 0x4396b
incq %r13
cmpq %r13, %r12
jne 0x43988
movb $0x1, %bpl
testb %r14b, %r14b
jne 0x4396d
movq 0x118(%rbx), %r14
movq 0x120(%rbx), %r15
cmpq %r15, %r14
je 0x439d0
movl (%r14), %esi
movq %rbx, %rdi
callq 0x39684
testb %al, %al
je 0x4396b
addq $0x4, %r14
jmp 0x439b6
movq 0x130(%rbx), %r15
movq 0x138(%rbx), %r14
cmpq %r14, %r15
je 0x4396d
addq $0x4, %r15
movl -0x4(%r15), %esi
movq %rbx, %rdi
callq 0x39684
movl %eax, %ebp
testb %al, %al
je 0x4396d
leaq 0x4(%r15), %rax
cmpq %r14, %r15
movq %rax, %r15
jne 0x439e7
jmp 0x4396d
// File: /workspace/github_cpp_makefile_star2_O3/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 0x43a45
movl (%r14), %esi
movq %rbx, %rdi
callq 0xb3ca
movq %rbx, %rdi
movq %rax, %rsi
callq 0x12ef8
addq $0x4, %r14
jmp 0x43a24
movq 0x130(%rbx), %r14
movq 0x138(%rbx), %r15
cmpq %r15, %r14
je 0x43a74
movl (%r14), %esi
movq %rbx, %rdi
callq 0xb3ca
movq %rbx, %rdi
movq %rax, %rsi
callq 0x12ef8
addq $0x4, %r14
jmp 0x43a53
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
callq 0xc7b4
testq %rax, %rax
je 0x43aeb
movq %rax, %rbx
cmpb $0x1, 0x59(%rax)
jne 0x43aeb
movl 0x10(%rbx), %ebp
movl $0x7, 0x10(%rbx)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2c7ac
movl %ebp, 0x10(%rbx)
leaq 0x7b030(%rip), %rdx     # 0xbeaf1
movq %r14, %rdi
movq %r15, %rsi
callq 0xaa14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43ae7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movb $0x0, 0x59(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43b14
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4424e
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x48(%rax)
addq $0xc, %r14
jmp 0x44237
movq $0x0, 0x410(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
movq %rcx, (%rsp)
movq 0x20(%rsi), %rax
subq 0x18(%rsi), %rax
shrq $0x2, %rax
imull $0xcccccccd, %eax, %ebp # imm = 0xCCCCCCCD
subl %edx, %ebp
jbe 0x4b177
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %eax
leaq (%rax,%rax,4), %rax
leaq 0x4(,%rax,4), %r13
leaq 0x8(%rsp), %r12
movq 0x18(%r14), %rbx
cmpb $0x0, 0xc(%rbx,%r13)
je 0x4b186
movl (%rbx,%r13), %esi
movq %r15, %rdi
callq 0xb3ca
movl 0x1c(%rax), %esi
testl %esi, %esi
je 0x4b134
movq %r15, %rdi
callq 0x43a7a
movl (%rbx,%r13), %edx
movq (%r15), %rax
movq %r12, %rdi
movq %r15, %rsi
callq *0xd0(%rax)
movq (%rsp), %rdi
movq %r12, %rsi
callq 0xebc2
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4b16f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x14, %r13
decl %ebp
jne 0x4b10d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6f356(%rip), %rdi     # 0xba4e3
leaq 0x6bbb4(%rip), %rsi     # 0xb6d48
leaq 0x6f362(%rip), %rcx     # 0xba4fd
movl $0x2013, %edx           # imm = 0x2013
callq 0x61b0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4b1c4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x20, %rsp
testl %edx, %edx
je 0x4b221
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
xorl %r12d, %r12d
movl (%rbx,%r12,4), %esi
movq %r14, %rdi
callq 0xc7b4
testq %rax, %rax
je 0x4b219
cmpb $0x1, 0x5b(%rax)
jne 0x4b219
movl 0xc(%rax), %esi
movq %r14, %rdi
callq 0xa3ea
cmpl $0xd, 0xc(%rax)
jne 0x4b219
cmpl $0x6, 0x84(%rax)
je 0x4b22e
incq %r12
cmpq %r12, %r15
jne 0x4b1e8
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6f9ad(%rip), %rsi     # 0xbabf8
leaq 0x6fad0(%rip), %rdx     # 0xbad22
movq %rsp, %rdi
callq 0x7be0
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0xb0b59(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xb0b31(%rip), %rsi     # 0xfbdb0
movq 0xb1d52(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4b2a7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x4b2b1
jmp 0x4b2b9
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_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 %r12
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x12a72
movl 0x64(%rax), %r15d
cmpl $0xb, %r15d
jne 0x4b39f
cmpb $0x1, 0x43c(%rbx)
jne 0x4b33f
cmpl $0x13f, 0x438(%rbx)     # imm = 0x13F
ja 0x4b33f
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x6f60b(%rip), %rsi     # 0xba917
leaq 0x6f61e(%rip), %rdx     # 0xba931
movq %rsp, %r14
movq %r14, %rdi
callq 0x7be0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26356
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4b33f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
movl %ebp, %esi
callq 0x12c9a
testq %rax, %rax
je 0x4b39f
movl 0x8(%rax), %esi
movq 0x38(%rbx), %rax
movq 0x40(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x7063e7063e7063e7, %rdx # imm = 0x8F9C18F9C18F9C19
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0x4b3b3
imulq $0x148, %rsi, %rdx      # imm = 0x148
movq 0x60(%rax,%rdx), %rcx
testl $0x3000000, %ecx        # imm = 0x3000000
je 0x4b39f
addq %rdx, %rax
addq $0x60, %rax
andq $-0x3000001, %rcx       # imm = 0xFCFFFFFF
movq %rcx, (%rax)
movb $0x1, 0x1d0(%rbx)
cmpl $0xb, %r15d
sete %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x68d5f(%rip), %rdi     # 0xb4119
xorl %eax, %eax
callq 0x63d0
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4b3da
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_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 %r15
pushq %r14
pushq %rbx
subq $0xf8, %rsp
cmpb $0x1, 0x628(%rdi)
jne 0x4b588
cmpb $0x0, 0x43c(%rdi)
movl $0x12b, %eax            # imm = 0x12B
movl $0x81, %ecx
cmovnel %eax, %ecx
cmpl %ecx, 0x438(%rdi)
ja 0x4b59c
movl %esi, %eax
movq 0x38(%rdi), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
testb $0x10, 0x60(%rcx,%rax)
jne 0x4b5a3
xorl %eax, %eax
jmp 0x4b648
callq 0x12a72
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1eafa
movl 0x18(%rbx), %eax
cmpl 0x14(%rbx), %eax
jne 0x4b656
leaq 0xb0e15(%rip), %rax     # 0xfc3e0
addq $0x10, %rax
leaq 0xc0(%rsp), %rbx
movq %rax, -0xa0(%rbx)
movq %rbx, %rdi
callq 0xde80
movq -0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x4b5ff
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x4b62f
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x58(%rsp)
movl %eax, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movl %eax, 0x70(%rsp)
movq %rax, 0x78(%rsp)
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x4b646
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movb $0x1, %al
addq $0xf8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6eef7(%rip), %rsi     # 0xba56a
leaq 0x6ef23(%rip), %rdx     # 0xba59d
movq %rsp, %rdi
callq 0x7be0
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0xb0731(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xb0709(%rip), %rsi     # 0xfbdb0
movq 0xb192a(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4b6cf
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x4b6d9
jmp 0x4b6e1
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
leaq 0x20(%rsp), %rdi
callq 0x1be02
movq %r14, %rdi
callq 0x64a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0xf8, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x628(%rdi)
jne 0x4b72e
cmpb $0x0, 0x43c(%rbx)
movl $0x12b, %eax            # imm = 0x12B
movl $0x81, %ecx
cmovnel %eax, %ecx
cmpl %ecx, 0x438(%rbx)
ja 0x4b756
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x1af9a
movb (%r15), %r15b
leaq 0x28(%rsp), %rdi
callq 0xd570
testb $0x10, %r15b
jne 0x4b75d
xorl %eax, %eax
jmp 0x4b80e
movl %ebp, %eax
movq 0x68(%r14), %rcx
movl (%rcx,%rax,4), %esi
movq %rbx, %rdi
callq 0xa3ea
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1eafa
movl 0x18(%rbx), %eax
cmpl 0x14(%rbx), %eax
jne 0x4b81c
leaq 0xb0c4f(%rip), %rax     # 0xfc3e0
addq $0x10, %rax
leaq 0xc0(%rsp), %rbx
movq %rax, -0xa0(%rbx)
movq %rbx, %rdi
callq 0xde80
movq -0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x4b7c5
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x4b7f5
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x58(%rsp)
movl %eax, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movl %eax, 0x70(%rsp)
movq %rax, 0x78(%rsp)
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x4b80c
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movb $0x1, %al
addq $0xf8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6ed31(%rip), %rsi     # 0xba56a
leaq 0x6ed5d(%rip), %rdx     # 0xba59d
movq %rsp, %rdi
callq 0x7be0
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0xb056b(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xb0543(%rip), %rsi     # 0xfbdb0
movq 0xb1764(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4b895
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x4b89f
jmp 0x4b8a7
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
leaq 0x20(%rsp), %rdi
callq 0x1be02
movq %r14, %rdi
callq 0x64a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x12a72
movq %rax, %r12
leaq 0x68936(%rip), %rax     # 0xb48af
movq %rax, (%rsp)
cmpb $0x1, 0x60(%r12)
jne 0x4bfac
movl 0xc(%r15), %eax
testl %eax, %eax
je 0x4bf9d
cmpl $0x0, 0x8(%r15)
je 0x4bf9d
leaq 0x6e626(%rip), %rax     # 0xba5c1
jmp 0x4bfa8
testl %eax, %eax
je 0x4bfac
leaq 0x6e61b(%rip), %rax     # 0xba5c3
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
movq %r14, %rsi
movl $0x1, %ecx
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 0x58101
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c025
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c040
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c05b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c08d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4c08d
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c0ad
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4c0ad
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c0c8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::to_pls_qualifiers_glsl(spirv_cross::SPIRVariable const&)
const char *CompilerGLSL::to_pls_qualifiers_glsl(const SPIRVariable &variable)
{
	auto flags = ir.meta[variable.self].decoration.decoration_flags;
	if (flags.get(DecorationRelaxedPrecision))
		return "mediump ";
	else
		return "highp ";
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl 0x8(%rsi), %eax
movq 0x38(%rdi), %rcx
imulq $0x148, %rax, %rax      # imm = 0x148
leaq (%rcx,%rax), %rsi
addq $0x68, %rsi
movq -0x8(%rsi), %rax
leaq 0x10(%rsp), %rbx
movq %rax, -0x8(%rbx)
xorl %eax, %eax
movq %rax, (%rbx)
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq 0x18(%rsi), %rcx
movq %rcx, 0x18(%rbx)
movups 0x20(%rsi), %xmm0
movups %xmm0, 0x20(%rbx)
movq %rax, 0x30(%rbx)
movq %rsp, %rdx
movq %rbx, (%rdx)
movq %rbx, %rdi
callq 0xd3c2
testb $0x1, -0x8(%rbx)
leaq 0x6e468(%rip), %rax     # 0xba5b2
leaq 0x6e458(%rip), %r14     # 0xba5a9
cmoveq %rax, %r14
movq %rbx, %rdi
callq 0xd570
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_fixup()
void CompilerGLSL::emit_fixup()
{
	auto &execution = get_entry_point();
	if (execution.model == ExecutionModelVertex)
	{
		if (options.vertex.fixup_clipspace)
		{
			const char *suffix = backend.float_literal_suffix ? "f" : "";
			statement("gl_Position.z = 2.0", suffix, " * gl_Position.z - gl_Position.w;");
		}

		if (options.vertex.flip_vert_y)
			statement("gl_Position.y = -gl_Position.y;");
	}
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x15f76
cmpl $0x0, 0xb8(%rax)
jne 0x4e440
cmpb $0x1, 0x442(%rbx)
jne 0x4e428
leaq 0x6885c(%rip), %rax     # 0xb6c54
leaq 0x664b0(%rip), %rcx     # 0xb48af
cmpb $0x0, 0x600(%rbx)
cmovneq %rax, %rcx
leaq 0x8(%rsp), %rdx
movq %rcx, (%rdx)
leaq 0x6c519(%rip), %rsi     # 0xba932
leaq 0x6c526(%rip), %rcx     # 0xba946
movq %rbx, %rdi
callq 0x586e8
cmpb $0x1, 0x443(%rbx)
jne 0x4e440
leaq 0x6c530(%rip), %rsi     # 0xba968
movq %rbx, %rdi
callq 0x587f2
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::flush_phi_required(unsigned int, unsigned int)
bool CompilerGLSL::flush_phi_required(uint32_t from, uint32_t to)
{
	auto &child = get<SPIRBlock>(to);
	for (auto &phi : child.phi_variables)
		if (phi.parent == from)
			return true;
	return false;
}

// Assembly:
pushq %rbx
movl %esi, %ebx
movl %edx, %esi
callq 0x7870
movq 0x50(%rax), %rdx
movq 0x58(%rax), %rcx
cmpq %rcx, %rdx
je 0x4e477
addq $0xc, %rdx
cmpl %ebx, -0x8(%rdx)
sete %al
je 0x4e479
leaq 0xc(%rdx), %rsi
cmpq %rcx, %rdx
movq %rsi, %rdx
jne 0x4e461
jmp 0x4e479
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::flush_phi(unsigned int, unsigned int)
void CompilerGLSL::flush_phi(uint32_t from, uint32_t to)
{
	auto &child = get<SPIRBlock>(to);

	for (auto &phi : child.phi_variables)
	{
		if (phi.parent == from)
		{
			auto &var = get<SPIRVariable>(phi.function_variable);

			// A Phi variable might be a loop variable, so flush to static expression.
			if (var.loop_variable && !var.loop_variable_enable)
				var.static_expression = phi.local_variable;
			else
			{
				flush_variable_declaration(phi.function_variable);

				// This might be called in continue block, so make sure we
				// use this to emit ESSL 1.0 compliant increments/decrements.
				auto lhs = to_expression(phi.function_variable);
				auto rhs = to_expression(phi.local_variable);
				if (!optimize_read_modify_write(get<SPIRType>(var.basetype), lhs, rhs))
					statement(lhs, " = ", rhs, ";");
			}

			register_write(phi.function_variable);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
movq %rdi, %r14
movl %edx, %esi
callq 0x7870
movq 0x50(%rax), %rbp
movq 0x58(%rax), %r15
cmpq %r15, %rbp
je 0x4e597
leaq 0x28(%rsp), %r12
cmpl %ebx, 0x4(%rbp)
jne 0x4e58a
movl 0x8(%rbp), %esi
movq %r14, %rdi
callq 0xb3ca
movq %rax, %r13
cmpb $0x1, 0x64(%rax)
jne 0x4e4d4
cmpb $0x0, 0x65(%r13)
je 0x4e578
movl 0x8(%rbp), %esi
movq %r14, %rdi
callq 0x43a7a
movl 0x8(%rbp), %edx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x33f8a
movl (%rbp), %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x33f8a
movl 0xc(%r13), %esi
movq %r14, %rdi
callq 0xa3ea
movq %r14, %rdi
movq %rax, %rsi
leaq 0x8(%rsp), %rdx
movq %r12, %rcx
callq 0x44084
testb %al, %al
jne 0x4e53e
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
leaq 0x7052b(%rip), %rdx     # 0xbea5a
movq %r12, %rcx
leaq 0x705b8(%rip), %r8      # 0xbeaf1
callq 0x559e4
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4e55a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4e57f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4e57f
movl (%rbp), %eax
movl %eax, 0x3c(%r13)
movl 0x8(%rbp), %esi
movq %r14, %rdi
callq 0x12e12
addq $0xc, %rbp
cmpq %r15, %rbp
jne 0x4e4ac
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x4e5ca
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4e5ca
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4e5e6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::propagate_loop_dominators(spirv_cross::SPIRBlock const&)
void CompilerGLSL::propagate_loop_dominators(const SPIRBlock &block)
{
	// Propagate down the loop dominator block, so that dominated blocks can back trace.
	if (block.merge == SPIRBlock::MergeLoop || block.loop_dominator)
	{
		uint32_t dominator = block.merge == SPIRBlock::MergeLoop ? block.self : block.loop_dominator;

		auto set_dominator = [this](uint32_t self, uint32_t new_dominator) {
			auto &dominated_block = this->get<SPIRBlock>(self);

			// If we already have a loop dominator, we're trying to break out to merge targets
			// which should not update the loop dominator.
			if (!dominated_block.loop_dominator)
				dominated_block.loop_dominator = new_dominator;
		};

		// After merging a loop, we inherit the loop dominator always.
		if (block.merge_block)
			set_dominator(block.merge_block, block.loop_dominator);

		if (block.true_block)
			set_dominator(block.true_block, dominator);
		if (block.false_block)
			set_dominator(block.false_block, dominator);
		if (block.next_block)
			set_dominator(block.next_block, dominator);
		if (block.default_block)
			set_dominator(block.default_block, dominator);

		for (auto &c : block.cases)
			set_dominator(c.block, dominator);

		// In older glslang output continue_block can be == loop header.
		if (block.continue_block && block.continue_block != block.self)
			set_dominator(block.continue_block, dominator);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x10(%rsi), %eax
movl 0xb4(%rsi), %r15d
cmpl $0x1, %eax
setne %cl
testl %r15d, %r15d
sete %dl
testb %dl, %cl
jne 0x4ed27
movq %rsi, %r14
movq %rdi, %rbx
movl %r15d, %ebp
cmpl $0x1, %eax
jne 0x4ec32
movl 0x8(%r14), %ebp
movl 0x1c(%r14), %esi
testl %esi, %esi
je 0x4ec52
movq %rbx, %rdi
callq 0x7870
cmpl $0x0, 0xb4(%rax)
jne 0x4ec52
movl %r15d, 0xb4(%rax)
movl 0x2c(%r14), %esi
testl %esi, %esi
je 0x4ec71
movq %rbx, %rdi
callq 0x7870
cmpl $0x0, 0xb4(%rax)
jne 0x4ec71
movl %ebp, 0xb4(%rax)
movl 0x30(%r14), %esi
testl %esi, %esi
je 0x4ec90
movq %rbx, %rdi
callq 0x7870
cmpl $0x0, 0xb4(%rax)
jne 0x4ec90
movl %ebp, 0xb4(%rax)
movl 0x18(%r14), %esi
testl %esi, %esi
je 0x4ecaf
movq %rbx, %rdi
callq 0x7870
cmpl $0x0, 0xb4(%rax)
jne 0x4ecaf
movl %ebp, 0xb4(%rax)
movl 0x34(%r14), %esi
testl %esi, %esi
je 0x4ecce
movq %rbx, %rdi
callq 0x7870
cmpl $0x0, 0xb4(%rax)
jne 0x4ecce
movl %ebp, 0xb4(%rax)
movq 0x98(%r14), %r15
movq 0xa0(%r14), %r12
cmpq %r12, %r15
je 0x4ed02
movl 0x4(%r15), %esi
movq %rbx, %rdi
callq 0x7870
cmpl $0x0, 0xb4(%rax)
jne 0x4ecfc
movl %ebp, 0xb4(%rax)
addq $0x8, %r15
jmp 0x4ecdc
movl 0x20(%r14), %esi
testl %esi, %esi
je 0x4ed27
cmpl 0x8(%r14), %esi
je 0x4ed27
movq %rbx, %rdi
callq 0x7870
cmpl $0x0, 0xb4(%rax)
jne 0x4ed27
movl %ebp, 0xb4(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::bitcast_from_builtin_load(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, spirv_cross::SPIRType const&)
void CompilerGLSL::bitcast_from_builtin_load(uint32_t source_id, std::string &expr,
                                             const spirv_cross::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;

	// TODO: Fill in for more builtins.
	switch (builtin)
	{
	case BuiltInLayer:
	case BuiltInPrimitiveId:
	case BuiltInViewportIndex:
	case BuiltInInstanceId:
	case BuiltInInstanceIndex:
	case BuiltInVertexId:
	case BuiltInVertexIndex:
	case BuiltInSampleId:
	case BuiltInBaseVertex:
	case BuiltInBaseInstance:
	case BuiltInDrawIndex:
		expected_type = SPIRType::Int;
		break;

	case BuiltInGlobalInvocationId:
	case BuiltInLocalInvocationId:
	case BuiltInWorkgroupId:
	case BuiltInLocalInvocationIndex:
	case BuiltInWorkgroupSize:
	case BuiltInNumWorkgroups:
		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 0x500de
movl 0x8(%rax), %ebp
movq %r15, %rdi
movl %ebp, %esi
movl $0xb, %edx
callq 0x12974
testb %al, %al
je 0x5017e
movq %r15, %rdi
movl %ebp, %esi
movl $0xb, %edx
callq 0x14e6e
movl 0xc(%r14), %edx
movl $0x4, %ecx
cmpl $0x2b, %eax
ja 0x50136
movl %eax, %esi
movabsq $0xc00000406e0, %rdi    # imm = 0xC00000406E0
btq %rsi, %rdi
jb 0x50140
movl $0x3f000000, %edi       # imm = 0x3F000000
btq %rsi, %rdi
jae 0x50136
movl $0x5, %ecx
jmp 0x50140
addl $0xffffeeb8, %eax       # imm = 0xFFFFEEB8
cmpl $0x3, %eax
jae 0x5017e
cmpl %edx, %ecx
je 0x5017e
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %r8
callq 0x3db74
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6310
movq (%r12), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5017e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop