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_push_constant_block_glsl(spirv_cross::SPIRVariable const&)
void CompilerGLSL::emit_push_constant_block_glsl(const SPIRVariable &var)
{
	// OpenGL has no concept of push constant blocks, implement it as a uniform struct.
	auto &type = get<SPIRType>(var.basetype);

	auto &flags = ir.meta[var.self].decoration.decoration_flags;
	flags.clear(DecorationBinding);
	flags.clear(DecorationDescriptorSet);

#if 0
    if (flags & ((1ull << DecorationBinding) | (1ull << DecorationDescriptorSet)))
        SPIRV_CROSS_THROW("Push constant blocks cannot be compiled to GLSL with Binding or Set syntax. "
                            "Remap to location with reflection API first or disable these decorations.");
#endif

	// We're emitting the push constant block as a regular struct, so disable the block qualifier temporarily.
	// Otherwise, we will end up emitting layout() qualifiers on naked structs which is not allowed.
	auto &block_flags = ir.meta[type.self].decoration.decoration_flags;
	bool block_flag = block_flags.get(DecorationBlock);
	block_flags.clear(DecorationBlock);

	emit_struct(type);

	if (block_flag)
		block_flags.set(DecorationBlock);

	emit_uniform(var);
	statement("");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rsi), %esi
callq 0xa3ea
movl 0x8(%r14), %ecx
movq 0x38(%rbx), %r15
imulq $0x148, %rcx, %rcx      # imm = 0x148
movabsq $-0x600000001, %rdx     # imm = 0xFFFFFFF9FFFFFFFF
andq %rdx, 0x60(%r15,%rcx)
movl 0x8(%rax), %ecx
imulq $0x148, %rcx, %r12      # imm = 0x148
movq 0x60(%r15,%r12), %r13
movq %r13, %rcx
andq $-0x5, %rcx
movq %rcx, 0x60(%r15,%r12)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x27fa4
testb $0x4, %r13b
je 0x2ac4c
leaq (%r15,%r12), %rax
addq $0x60, %rax
orb $0x4, (%rax)
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0xf8(%rax)
leaq 0x89c4d(%rip), %rsi     # 0xb48af
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xa6c4
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_buffer_block(spirv_cross::SPIRVariable const&)
void CompilerGLSL::emit_buffer_block(const SPIRVariable &var)
{
	if (flattened_buffer_blocks.count(var.self))
		emit_buffer_block_flattened(var);
	else if (is_legacy() || (!options.es && options.version == 130))
		emit_buffer_block_legacy(var);
	else
		emit_buffer_block_native(var);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x678, %rdi            # imm = 0x678
addq $0x8, %rsi
callq 0x1f4b4
testq %rax, %rax
je 0x2aca5
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2a7b4
movb 0x43c(%r14), %al
testb %al, %al
movl $0x12b, %ecx            # imm = 0x12B
movl $0x81, %edx
cmovnel %ecx, %edx
movl 0x438(%r14), %ecx
cmpl %edx, %ecx
seta %dl
cmpl $0x82, %ecx
setne %cl
orb %al, %cl
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
testb %cl, %dl
je 0x2ace8
popq %rbx
popq %r14
jmp 0x2ae10
popq %rbx
popq %r14
jmp 0x2acf0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_buffer_block_legacy(spirv_cross::SPIRVariable const&)
void CompilerGLSL::emit_buffer_block_legacy(const SPIRVariable &var)
{
	auto &type = get<SPIRType>(var.basetype);
	bool ssbo = var.storage == StorageClassStorageBuffer ||
	            ir.meta[type.self].decoration.decoration_flags.get(DecorationBufferBlock);
	if (ssbo)
		SPIRV_CROSS_THROW("SSBOs not supported in legacy targets.");

	// We're emitting the push constant block as a regular struct, so disable the block qualifier temporarily.
	// Otherwise, we will end up emitting layout() qualifiers on naked structs which is not allowed.
	auto &block_flags = ir.meta[type.self].decoration.decoration_flags;
	bool block_flag = block_flags.get(DecorationBlock);
	block_flags.clear(DecorationBlock);
	emit_struct(type);
	if (block_flag)
		block_flags.set(DecorationBlock);
	emit_uniform(var);
	statement("");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rsi), %esi
callq 0xa3ea
cmpl $0xc, 0x10(%r14)
je 0x2ad7d
movl 0x8(%rax), %edx
movq 0x38(%rbx), %rcx
imulq $0x148, %rdx, %rdx      # imm = 0x148
movq 0x60(%rcx,%rdx), %r15
testb $0x8, %r15b
jne 0x2ad7d
leaq (%rcx,%rdx), %r12
addq $0x60, %r12
movq %r15, %rcx
andq $-0xd, %rcx
movq %rcx, (%r12)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x27fa4
testb $0x4, %r15b
je 0x2ad53
orb $0x4, (%r12)
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0xf8(%rax)
leaq 0x89b46(%rip), %rsi     # 0xb48af
movq %rbx, %rdi
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa6c4
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8c238(%rip), %rsi     # 0xb6fd2
leaq 0x8c257(%rip), %rdx     # 0xb6ff8
movq %rsp, %rdi
callq 0x7be0
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0xd100a(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xd0fe2(%rip), %rsi     # 0xfbdb0
movq 0xd2203(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2adf6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x2ae00
jmp 0x2ae08
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::end_scope_decl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void CompilerGLSL::end_scope_decl(const string &decl)
{
	if (!indent)
		SPIRV_CROSS_THROW("Popping empty indent stack.");
	indent--;
	statement("} ", decl, ";");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl 0x638(%rdi), %eax
testl %eax, %eax
je 0x2b4c2
movq %rsi, %rdx
decl %eax
movl %eax, 0x638(%rdi)
leaq 0x8f749(%rip), %rsi     # 0xbabf5
leaq 0x9363e(%rip), %rcx     # 0xbeaf1
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x59f08
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8f6fa(%rip), %rsi     # 0xbabd9
leaq 0x8f70e(%rip), %rdx     # 0xbabf4
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0xd08c1(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xd0899(%rip), %rsi     # 0xfbdb0
movq 0xd1aba(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2b540
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x2b54a
jmp 0x2b552
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::to_storage_qualifiers_glsl(spirv_cross::SPIRVariable const&)
const char *CompilerGLSL::to_storage_qualifiers_glsl(const SPIRVariable &var)
{
	auto &execution = get_entry_point();

	if (var.storage == StorageClassInput || var.storage == StorageClassOutput)
	{
		if (is_legacy() && execution.model == ExecutionModelVertex)
			return var.storage == StorageClassInput ? "attribute " : "varying ";
		else if (is_legacy() && execution.model == ExecutionModelFragment)
			return "varying "; // Fragment outputs are renamed so they never hit this case.
		else
			return var.storage == StorageClassInput ? "in " : "out ";
	}
	else if (var.storage == StorageClassUniformConstant || var.storage == StorageClassUniform ||
	         var.storage == StorageClassPushConstant)
	{
		return "uniform ";
	}

	return "";
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x15f76
movl 0x10(%r14), %ecx
cmpl $0x9, %ecx
ja 0x2bab7
movl $0x205, %edx            # imm = 0x205
btl %ecx, %edx
jae 0x2ba38
leaq 0x8b5e5(%rip), %rax     # 0xb7018
jmp 0x2bad5
movl $0xa, %edx
btl %ecx, %edx
jae 0x2bab7
movb 0x43c(%rbx), %dl
movl 0x438(%rbx), %esi
cmpl $0x12c, %esi            # imm = 0x12C
setb %dil
andb %dl, %dil
cmpb $0x1, %dil
jne 0x2ba80
movl 0xb8(%rax), %eax
movb $0x1, %dl
testl %eax, %eax
je 0x2baa4
cmpl $0x4, %eax
sete %al
testb %al, %dl
je 0x2bac0
leaq 0x8b620(%rip), %rax     # 0xb709e
jmp 0x2bad5
cmpl $0x82, %esi
setb %sil
notb %dl
andb %sil, %dl
movl 0xb8(%rax), %eax
testl %eax, %eax
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x2ba6d
cmpl $0x1, %ecx
leaq 0x8b5e5(%rip), %rcx     # 0xb7093
leaq 0x8b5e9(%rip), %rax     # 0xb709e
jmp 0x2bad1
leaq 0x88df1(%rip), %rax     # 0xb48af
jmp 0x2bad5
cmpl $0x1, %ecx
leaq 0x8b5dd(%rip), %rcx     # 0xb70a7
leaq 0x8eaf2(%rip), %rax     # 0xba5c3
cmoveq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::to_member_name[abi:cxx11](spirv_cross::SPIRType const&, unsigned int)
string CompilerGLSL::to_member_name(const SPIRType &type, uint32_t index)
{
	auto &memb = ir.meta[type.self].members;
	if (index < memb.size() && !memb[index].alias.empty())
		return memb[index].alias;
	else
		return join("_m", index);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl %ecx, 0xc(%rsp)
movl 0x8(%rdx), %eax
movq 0x38(%rsi), %rdx
imulq $0x148, %rax, %rsi      # imm = 0x148
movl %ecx, %ecx
movq 0xd0(%rdx,%rsi), %rax
movq 0xd8(%rdx,%rsi), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
movabsq $0x4ec4ec4ec4ec4ec5, %rsi # imm = 0x4EC4EC4EC4EC4EC5
imulq %rdx, %rsi
cmpq %rcx, %rsi
jbe 0x2c0f9
imulq $0xd0, %rcx, %rcx
movq 0x8(%rax,%rcx), %rdx
testq %rdx, %rdx
je 0x2c0f9
addq %rcx, %rax
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xe456
jmp 0x2c10d
leaq 0x8e467(%rip), %rsi     # 0xba567
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x57d32
movq %rbx, %rax
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::emit_uniform(spirv_cross::SPIRVariable const&)
void CompilerGLSL::emit_uniform(const SPIRVariable &var)
{
	auto &type = get<SPIRType>(var.basetype);
	if (type.basetype == SPIRType::Image && type.image.sampled == 2)
	{
		if (!options.es && options.version < 420)
			require_extension_internal("GL_ARB_shader_image_load_store");
		else if (options.es && options.version < 310)
			SPIRV_CROSS_THROW("At least ESSL 3.10 required for shader image load store.");
	}

	add_resource_name(var.self);
	statement(layout_for_variable(var), variable_decl(var), ";");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0xc(%rsi), %esi
callq 0xa3ea
cmpl $0xd, 0xc(%rax)
jne 0x2cb1e
cmpl $0x2, 0x8c(%rax)
jne 0x2cb1e
movb 0x43c(%rbx), %al
movl 0x438(%rbx), %ecx
cmpl $0x1a4, %ecx            # imm = 0x1A4
setae %dl
orb %al, %dl
je 0x2cad9
cmpl $0x136, %ecx            # imm = 0x136
setb %cl
andb %cl, %al
cmpb $0x1, %al
jne 0x2cb1e
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8a6b4(%rip), %rsi     # 0xb7146
leaq 0x8a6e5(%rip), %rdx     # 0xb717e
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x6320
leaq 0xcf30e(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0xcf2e6(%rip), %rsi     # 0xfbdb0
movq 0xd0507(%rip), %rdx     # 0xfcfd8
movq %r14, %rdi
callq 0x6470
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x89c76(%rip), %rsi     # 0xb675f
leaq 0x89c8d(%rip), %rdx     # 0xb677d
leaq 0x8(%rsp), %rdi
callq 0x7be0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x26356
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2cb1e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x8(%r14), %eax
leaq 0x488(%rbx), %rsi
imulq $0x148, %rax, %rdx      # imm = 0x148
addq 0x38(%rbx), %rdx
movq %rbx, %rdi
callq 0x2b3ee
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x295fe
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2c7ac
leaq 0x91f8e(%rip), %rcx     # 0xbeaf1
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x521d0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2cb90
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2cbab
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2cbd0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x2cbda
jmp 0x2cc36
movq %rax, %rbx
movq %r14, %rdi
callq 0x6200
jmp 0x2cc36
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x2cc29
jmp 0x2cc36
movq %rax, %rbx
jmp 0x2cc36
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2cc1b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x2cc1b
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2cc36
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::remap_swizzle(spirv_cross::SPIRType const&, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string CompilerGLSL::remap_swizzle(const SPIRType &out_type, uint32_t input_components, const string &expr)
{
	if (out_type.vecsize == input_components)
		return expr;
	else if (input_components == 1 && !backend.can_swizzle_scalar)
		return join(type_to_glsl(out_type), "(", expr, ")");
	else
	{
		// FIXME: This will not work with packed expressions.
		auto e = enclose_expression(expr) + ".";
		// Just clamp the swizzle index if we have more outputs than inputs.
		for (uint32_t c = 0; c < out_type.vecsize; c++)
			e += index_to_swizzle(min(c, input_components - 1));
		if (backend.swizzle_is_function && out_type.vecsize > 1)
			e += "()";

		remove_duplicate_swizzle(e);
		return e;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r12
movq %rdi, %rbx
cmpl %ecx, 0x14(%rdx)
jne 0x329d7
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xe456
jmp 0x32ac7
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
cmpl $0x1, %ecx
jne 0x329f2
cmpb $0x0, 0x62c(%r14)
je 0x32ad9
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rdx
callq 0x32b66
leaq 0x87e40(%rip), %rsi     # 0xba849
movq %r13, %rdi
callq 0x64e0
leaq 0x10(%rbx), %r12
movq %r12, (%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x32a33
movq %rdx, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x32a3b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x32a6d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
cmpl $0x0, 0x14(%r15)
je 0x32abc
decl %ebp
xorl %r13d, %r13d
cmpl %r13d, %ebp
movl %r13d, %esi
cmovbl %ebp, %esi
callq 0x32c76
movq %rbx, %rdi
movq %rax, %rsi
callq 0x64e0
incl %r13d
movl 0x14(%r15), %eax
cmpl %eax, %r13d
jb 0x32a79
cmpl $0x2, %eax
jb 0x32abc
cmpb $0x0, 0x620(%r14)
je 0x32abc
leaq 0x85e9c(%rip), %rsi     # 0xb8950
movq %rbx, %rdi
callq 0x64e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32d38
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rax
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq *0x98(%rax)
leaq 0x90178(%rip), %rdx     # 0xc2c71
leaq 0x87f15(%rip), %r8      # 0xbaa15
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rcx
callq 0x5274b
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x32ac7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x32ac7
jmp 0x32b2d
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x32b5e
movq 0x18(%rsp), %rsi
jmp 0x32b56
jmp 0x32b47
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x32b5e
movq (%r12), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::enclose_expression(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string CompilerGLSL::enclose_expression(const string &expr)
{
	bool need_parens = false;

	// If the expression starts with a unary we need to enclose to deal with cases where we have back-to-back
	// unary expressions.
	if (!expr.empty())
	{
		auto c = expr.front();
		if (c == '-' || c == '+' || c == '!' || c == '~')
			need_parens = true;
	}

	if (!need_parens)
	{
		uint32_t paren_count = 0;
		for (auto c : expr)
		{
			if (c == '(' || c == '[')
				paren_count++;
			else if (c == ')' || c == ']')
			{
				assert(paren_count);
				paren_count--;
			}
			else if (c == ' ' && paren_count == 0)
			{
				need_parens = true;
				break;
			}
		}
		assert(paren_count == 0);
	}

	// If this expression contains any spaces which are not enclosed by parentheses,
	// we need to enclose it so we can treat the whole string as an expression.
	// This happens when two expressions have been part of a binary op earlier.
	if (need_parens)
		return join('(', expr, ')');
	else
		return expr;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
testq %rcx, %rcx
je 0x32bb4
movzbl (%rsi), %r9d
cmpq $0x2d, %r9
ja 0x32b94
movabsq $0x280200000000, %rax   # imm = 0x280200000000
btq %r9, %rax
jb 0x32b9a
cmpl $0x7e, %r9d
jne 0x32bbc
leaq 0xf(%rsp), %rsi
movb $0x28, (%rsi)
leaq 0xe(%rsp), %rcx
movb $0x29, (%rcx)
movq %rbx, %rdi
callq 0x52ee1
jmp 0x32c2f
addq %rsi, %rcx
movq %rcx, %rax
jmp 0x32c1d
leaq (%rsi,%rcx), %rax
xorl %edi, %edi
movl $0x1, %r8d
movzbl %r9b, %r10d
cmpl $0x5a, %r10d
jg 0x32be0
cmpl $0x28, %r10d
je 0x32bec
cmpl $0x29, %r10d
je 0x32bf0
jmp 0x32bf8
cmpl $0x5d, %r10d
je 0x32bf0
cmpl $0x5b, %r10d
jne 0x32bf8
incl %edi
jmp 0x32c0b
testl %edi, %edi
je 0x32c38
decl %edi
jmp 0x32c0b
cmpb $0x20, %r9b
sete %r9b
testl %edi, %edi
sete %r10b
testb %r10b, %r9b
jne 0x32b9a
cmpq %r8, %rcx
je 0x32c19
movb (%rsi,%r8), %r9b
incq %r8
jmp 0x32bc8
testl %edi, %edi
jne 0x32c57
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq %rbx, %rdi
movq %rax, %rdx
callq 0xe456
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x8538d(%rip), %rdi     # 0xb7fcc
leaq 0x84102(%rip), %rsi     # 0xb6d48
leaq 0x8538b(%rip), %rcx     # 0xb7fd8
movl $0x949, %edx            # imm = 0x949
callq 0x61b0
leaq 0x853bf(%rip), %rdi     # 0xb801d
leaq 0x840e3(%rip), %rsi     # 0xb6d48
leaq 0x8536c(%rip), %rcx     # 0xb7fd8
movl $0x952, %edx            # imm = 0x952
callq 0x61b0
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::index_to_swizzle(unsigned int)
const char *CompilerGLSL::index_to_swizzle(uint32_t index)
{
	switch (index)
	{
	case 0:
		return "x";
	case 1:
		return "y";
	case 2:
		return "z";
	case 3:
		return "w";
	default:
		SPIRV_CROSS_THROW("Swizzle index out of range");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
cmpl $0x4, %esi
jae 0x32ca0
movl %esi, %eax
leaq 0x8377e(%rip), %rcx     # 0xb640c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x867e0(%rip), %rsi     # 0xb949d
leaq 0x867f3(%rip), %rdx     # 0xb94b7
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0xc90e3(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xc90bb(%rip), %rsi     # 0xfbdb0
movq 0xca2dc(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x32d1e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x32d28
jmp 0x32d30
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::to_unpacked_expression[abi:cxx11](unsigned int)
string CompilerGLSL::to_unpacked_expression(uint32_t id)
{
	// If we need to transpose, it will also take care of unpacking rules.
	auto *e = maybe_get<SPIRExpression>(id);
	bool need_transpose = e && e->need_transpose;
	if (!need_transpose && has_decoration(id, DecorationCPacked))
		return unpack_expression_type(to_expression(id), expression_type(id));
	else
		return to_expression(id);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x1b3b6
testq %rax, %rax
je 0x34693
cmpb $0x0, 0x39(%rax)
jne 0x346f0
movq %r14, %rdi
movl %ebp, %esi
movl $0xa, %edx
callq 0x12974
testb %al, %al
je 0x346f0
movq %rsp, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x33f8a
movq %r14, %rdi
movl %ebp, %esi
callq 0x12a72
movq (%r14), %r8
movq %rsp, %rdx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rcx
callq *0x100(%r8)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x346fd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x346fd
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x33f8a
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34727
movq 0x10(%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::to_enclosed_unpacked_expression[abi:cxx11](unsigned int)
string CompilerGLSL::to_enclosed_unpacked_expression(uint32_t id)
{
	// If we need to transpose, it will also take care of unpacking rules.
	auto *e = maybe_get<SPIRExpression>(id);
	bool need_transpose = e && e->need_transpose;
	if (!need_transpose && has_decoration(id, DecorationCPacked))
		return unpack_expression_type(to_expression(id), expression_type(id));
	else
		return to_enclosed_expression(id);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x1b3b6
testq %rax, %rax
je 0x34755
cmpb $0x0, 0x39(%rax)
jne 0x347b2
movq %r14, %rdi
movl %ebp, %esi
movl $0xa, %edx
callq 0x12974
testb %al, %al
je 0x347b2
movq %rsp, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x33f8a
movq %r14, %rdi
movl %ebp, %esi
callq 0x12a72
movq (%r14), %r8
movq %rsp, %rdx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rcx
callq *0x100(%r8)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x347bf
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x347bf
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x34600
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x347e9
movq 0x10(%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::to_extract_component_expression[abi:cxx11](unsigned int, unsigned int)
string CompilerGLSL::to_extract_component_expression(uint32_t id, uint32_t index)
{
	auto expr = to_enclosed_expression(id);
	if (has_decoration(id, DecorationCPacked))
		return join(expr, "[", index, "]");
	else
		return join(expr, ".", index_to_swizzle(index));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl %ecx, 0xc(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x34600
movq %r15, %rdi
movl %r14d, %esi
movl $0xa, %edx
callq 0x12974
testb %al, %al
je 0x3484b
leaq 0x8e4bc(%rip), %rdx     # 0xc2cec
leaq 0x89307(%rip), %r8      # 0xbdb3e
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rcx
movq %rbx, %rdi
callq 0x52f7d
jmp 0x3486e
movl %ebp, %esi
callq 0x32c76
leaq 0x30(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x85fe8(%rip), %rdx     # 0xba849
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x53028
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34889
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x34899
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x348b7
movq 0x20(%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::track_expression_read(unsigned int)
void CompilerGLSL::track_expression_read(uint32_t id)
{
	// If we try to read a forwarded temporary more than once we will stamp out possibly complex code twice.
	// In this case, it's better to just bind the complex expression to the temporary and read that temporary twice.
	if (expression_is_forwarded(id))
	{
		auto &v = expression_usage_counts[id];
		v++;

		if (v >= 2)
		{
			//if (v == 2)
			//    fprintf(stderr, "ID %u was forced to temporary due to more than 1 expression use!\n", id);

			forced_temporaries.insert(id);
			// Force a recompile after this pass to avoid forwarding this variable.
			force_recompile = true;
		}
	}
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl %esi, 0x4(%rsp)
leaq 0x8(%rsp), %rax
movl %esi, (%rax)
addq $0x260, %rdi            # imm = 0x260
movq %rax, %rsi
callq 0x21122
testq %rax, %rax
je 0x34923
leaq 0x6e8(%rbx), %rdi
leaq 0x4(%rsp), %rsi
callq 0x21d9e
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
cmpl $0x2, %ecx
jb 0x34923
leaq 0x228(%rbx), %rdi
leaq 0x8(%rsp), %rdx
movq %rdi, (%rdx)
leaq 0x4(%rsp), %rsi
callq 0x1f510
movb $0x1, 0x1d0(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::load_flattened_struct[abi:cxx11](spirv_cross::SPIRVariable&)
string CompilerGLSL::load_flattened_struct(SPIRVariable &var)
{
	auto expr = type_to_glsl_constructor(get<SPIRType>(var.basetype));
	expr += '(';

	auto &type = get<SPIRType>(var.basetype);
	for (uint32_t i = 0; i < uint32_t(type.member_types.size()); i++)
	{
		if (i)
			expr += ", ";

		// Flatten the varyings.
		// Apply name transformation for flattened I/O blocks.
		expr += to_flattened_struct_member(var, i);
	}
	expr += ')';
	return expr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0xc(%rdx), %esi
movq %r15, %rdi
callq 0xa3ea
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x34a5c
movq %rbx, %rdi
movl $0x28, %esi
callq 0x6230
movl 0xc(%r14), %esi
movq %r15, %rdi
callq 0xa3ea
movq %rax, %r12
movq 0x70(%rax), %rax
subq 0x68(%r12), %rax
shrq $0x2, %rax
testl %eax, %eax
je 0x349f3
xorl %ebp, %ebp
leaq 0x8(%rsp), %r13
testl %ebp, %ebp
je 0x349a1
movq %rbx, %rdi
leaq 0x8570f(%rip), %rsi     # 0xba0ab
callq 0x64e0
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x41a14
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x349df
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
incl %ebp
movq 0x70(%r12), %rax
subq 0x68(%r12), %rax
shrq $0x2, %rax
cmpl %eax, %ebp
jb 0x3498e
movq %rbx, %rdi
movl $0x29, %esi
callq 0x6230
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x34a18
jmp 0x34a18
jmp 0x34a18
movq %rax, %r14
jmp 0x34a3c
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x34a3c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x34a53
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::bitcast_glsl[abi:cxx11](spirv_cross::SPIRType const&, unsigned int)
string CompilerGLSL::bitcast_glsl(const SPIRType &result_type, uint32_t argument)
{
	auto op = bitcast_glsl_op(result_type, expression_type(argument));
	if (op.empty())
		return to_enclosed_expression(argument);
	else
		return join(op, "(", to_expression(argument), ")");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %ecx, %esi
callq 0x12a72
movq (%r14), %r8
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %rcx
callq *0x168(%r8)
cmpq $0x0, 0x8(%r12)
je 0x36276
movq %rsp, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x33f8a
leaq 0x8ca2f(%rip), %rdx     # 0xc2c71
leaq 0x847cc(%rip), %r8      # 0xbaa15
leaq 0x20(%rsp), %rsi
movq %rsp, %rcx
movq %rbx, %rdi
callq 0x5337f
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36283
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x36283
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x34600
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3629e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x362d0
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x362d3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x362d3
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x362ee
movq 0x30(%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_op(unsigned int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
SPIRExpression &CompilerGLSL::emit_op(uint32_t result_type, uint32_t result_id, const string &rhs, bool forwarding,
                                      bool suppress_usage_tracking)
{
	if (forwarding && (forced_temporaries.find(result_id) == end(forced_temporaries)))
	{
		// Just forward it without temporary.
		// If the forward is trivial, we do not force flushing to temporary for this expression.
		if (!suppress_usage_tracking)
			forwarded_temporaries.insert(result_id);

		return set<SPIRExpression>(result_id, rhs, result_type, true);
	}
	else
	{
		// If expression isn't immutable, bind it to a temporary and make the new temporary immutable (they always are).
		statement(declare_temporary(result_type, result_id), rhs, ";");
		return set<SPIRExpression>(result_id, to_name(result_id), result_type, true);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movl %edx, %ecx
movl %esi, %edx
movq %rdi, %rbx
movl %esi, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
testl %r8d, %r8d
je 0x39472
movl %r9d, %ebp
leaq 0x228(%rbx), %rdi
leaq 0xc(%rsp), %rsi
callq 0x21122
testq %rax, %rax
je 0x39505
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x39060
leaq 0x85668(%rip), %rcx     # 0xbeaf1
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x53abe
leaq 0x28(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x394b2
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0xc(%rsp), %ebp
movq (%rbx), %rax
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movl $0x1, %ecx
callq *0x38(%rax)
leaq 0x17(%rsp), %r8
movb $0x1, (%r8)
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x53c18
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x39543
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x39543
testb %bpl, %bpl
jne 0x39523
leaq 0x260(%rbx), %rdi
leaq 0x18(%rsp), %rdx
movq %rdi, (%rdx)
leaq 0xc(%rsp), %rsi
callq 0x1f510
movl 0xc(%rsp), %esi
leaq 0x18(%rsp), %r8
movb $0x1, (%r8)
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x53a76
movq %rax, %rbx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
jne 0x39571
jmp 0x3957e
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3957e
movq 0x28(%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_binary_op(unsigned int, unsigned int, unsigned int, unsigned int, char const*)
void CompilerGLSL::emit_binary_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op)
{
	bool forward = should_forward(op0) && should_forward(op1);
	emit_op(result_type, result_id,
	        join(to_enclosed_unpacked_expression(op0), " ", op, " ", to_enclosed_unpacked_expression(op1)), forward);

	inherit_expression_dependencies(result_id, op0);
	inherit_expression_dependencies(result_id, op1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r8d, %ebx
movl %ecx, %r15d
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r14
movq %r9, (%rsp)
movl %ecx, %esi
callq 0x39684
testb %al, %al
je 0x396f8
movq %r14, %rdi
movl %ebx, %esi
callq 0x39684
movl %eax, %r13d
jmp 0x396fb
xorl %r13d, %r13d
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x34730
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x34730
leaq 0x7b18d(%rip), %rdx     # 0xb48ae
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq %rsp, %rcx
leaq 0x8(%rsp), %r9
movq %rdx, %r8
callq 0x53ceb
movzbl %r13b, %r8d
leaq 0x48(%rsp), %rcx
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
xorl %r9d, %r9d
callq 0x3942c
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3976f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3978a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x397a5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x1616c
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1616c
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x397f0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x397f0
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x39810
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x39810
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3982b
movq 0x38(%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_unrolled_unary_op(unsigned int, unsigned int, unsigned int, char const*)
void CompilerGLSL::emit_unrolled_unary_op(uint32_t result_type, uint32_t result_id, uint32_t operand, const char *op)
{
	auto &type = get<SPIRType>(result_type);
	auto expr = type_to_glsl_constructor(type);
	expr += '(';
	for (uint32_t i = 0; i < type.vecsize; i++)
	{
		// Make sure to call to_expression multiple times to ensure
		// that these expressions are properly flushed to temporaries if needed.
		expr += op;
		expr += to_extract_component_expression(operand, i);

		if (i + 1 < type.vecsize)
			expr += ", ";
	}
	expr += ')';
	emit_op(result_type, result_id, expr, should_forward(operand));

	inherit_expression_dependencies(result_id, operand);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r12
movl %ecx, %ebx
movl %edx, (%rsp)
movq %rdi, %r14
movl %esi, 0x4(%rsp)
callq 0xa3ea
movq %rax, %r13
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x34a5c
movq %r15, %rdi
movl $0x28, %esi
callq 0x6230
cmpl $0x0, 0x14(%r13)
je 0x398f2
xorl %ebp, %ebp
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x64e0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl %ebx, %edx
movl %ebp, %ecx
callq 0x347f2
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x60b0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x398d1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
incl %ebp
movl 0x14(%r13), %eax
cmpl %eax, %ebp
jae 0x398ee
movq %r15, %rdi
leaq 0x807c6(%rip), %rsi     # 0xba0ab
callq 0x64e0
movl 0x14(%r13), %eax
cmpl %eax, %ebp
jb 0x39887
leaq 0x28(%rsp), %rdi
movl $0x29, %esi
callq 0x6230
movq %r14, %rdi
movl %ebx, %esi
callq 0x39684
movzbl %al, %r8d
leaq 0x28(%rsp), %rcx
movq %r14, %rdi
movl 0x4(%rsp), %esi
movl (%rsp), %edx
xorl %r9d, %r9d
callq 0x3942c
movq %r14, %rdi
movl (%rsp), %esi
movl %ebx, %edx
callq 0x1616c
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3994e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x39982
jmp 0x39982
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x39985
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x39985
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x399a0
movq 0x38(%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_binary_func_op(unsigned int, unsigned int, unsigned int, unsigned int, char const*)
void CompilerGLSL::emit_binary_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1,
                                       const char *op)
{
	bool forward = should_forward(op0) && should_forward(op1);
	emit_op(result_type, result_id, join(op, "(", to_unpacked_expression(op0), ", ", to_unpacked_expression(op1), ")"),
	        forward);
	inherit_expression_dependencies(result_id, op0);
	inherit_expression_dependencies(result_id, op1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r8d, %ebx
movl %ecx, %r15d
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r14
movq %r9, 0x10(%rsp)
movl %ecx, %esi
callq 0x39684
testb %al, %al
je 0x3a0d1
movq %r14, %rdi
movl %ebx, %esi
callq 0x39684
movl %eax, %r13d
jmp 0x3a0d4
xorl %r13d, %r13d
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x3466e
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x3466e
leaq 0x8091b(%rip), %rax     # 0xbaa15
movq %rax, (%rsp)
leaq 0x88b6c(%rip), %rdx     # 0xc2c71
leaq 0x7ff9f(%rip), %r8      # 0xba0ab
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rcx
leaq 0x18(%rsp), %r9
callq 0x53f0f
movzbl %r13b, %r8d
leaq 0x58(%rsp), %rcx
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
xorl %r9d, %r9d
callq 0x3942c
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a159
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a174
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a18f
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x1616c
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1616c
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a1da
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3a1da
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a1fa
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3a1fa
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a215
movq 0x48(%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::check_explicit_lod_allowed(unsigned int)
bool CompilerGLSL::check_explicit_lod_allowed(uint32_t lod)
{
	auto &execution = get_entry_point();
	bool allowed = !is_legacy_es() || execution.model == ExecutionModelFragment;
	if (!allowed && lod != 0)
	{
		auto *lod_constant = maybe_get<SPIRConstant>(lod);
		if (!lod_constant || lod_constant->scalar_f32() != 0.0f)
		{
			SPIRV_CROSS_THROW("Explicit lod not allowed in legacy ES non-fragment shaders.");
		}
	}
	return allowed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %r14
callq 0x15f76
movb 0x43c(%r14), %cl
cmpl $0x12c, 0x438(%r14) # imm = 0x12C
setae %dl
xorb $0x1, %cl
orb %dl, %cl
cmpl $0x4, 0xb8(%rax)
sete %bl
orb %cl, %bl
testl %ebp, %ebp
je 0x3ab2a
testb %bl, %bl
jne 0x3ab2a
movq %r14, %rdi
movl %ebp, %esi
callq 0x54236
testq %rax, %rax
je 0x3ab37
movss 0x10(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3ab37
jp 0x3ab37
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6140
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7d7bc(%rip), %rsi     # 0xb8310
leaq 0x7d7f0(%rip), %rdx     # 0xb834b
leaq 0x8(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6320
leaq 0xc124c(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xc1224(%rip), %rsi     # 0xfbdb0
movq 0xc2445(%rip), %rdx     # 0xfcfd8
movq %rbx, %rdi
callq 0x6470
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3abb5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x3abbf
jmp 0x3abc7
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::emit_sampled_image_op(unsigned int, unsigned int, unsigned int, unsigned int)
void CompilerGLSL::emit_sampled_image_op(uint32_t result_type, uint32_t result_id, uint32_t image_id, uint32_t samp_id)
{
	if (options.vulkan_semantics && combined_image_samplers.empty())
	{
		emit_binary_func_op(result_type, result_id, image_id, samp_id,
		                    type_to_glsl(get<SPIRType>(result_type), result_id).c_str());

		// Make sure to suppress usage tracking. It is illegal to create temporaries of opaque types.
		forwarded_temporaries.erase(result_id);
	}
	else
	{
		// Make sure to suppress usage tracking. It is illegal to create temporaries of opaque types.
		emit_op(result_type, result_id, to_combined_image_sampler(image_id, samp_id), true, true);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %r15d
movl %ecx, %r12d
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movl %edx, 0x4(%rsp)
cmpb $0x1, 0x43e(%rdi)
jne 0x3bd77
movq 0x1d8(%rbx), %rax
cmpq 0x1e0(%rbx), %rax
je 0x3bdc6
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movl %r12d, %edx
movl %r15d, %ecx
callq 0x3b62a
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
movq %r13, %rcx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x3942c
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3be31
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3be31
movq %rbx, %rdi
movl %r14d, %esi
callq 0xa3ea
movq (%rbx), %r8
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq *0x98(%r8)
movq (%r13), %r9
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl %r12d, %ecx
movl %r15d, %r8d
callq 0x3a096
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3be1d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
addq $0x260, %rbx            # imm = 0x260
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x1e95a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3be42
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3be60
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::register_control_dependent_expression(unsigned int)
void CompilerGLSL::register_control_dependent_expression(uint32_t expr)
{
	if (forwarded_temporaries.find(expr) == end(forwarded_temporaries))
		return;

	assert(current_emitting_block);
	current_emitting_block->invalidate_expressions.push_back(expr);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rax
movl %esi, (%rax)
addq $0x260, %rdi            # imm = 0x260
movq %rax, %rsi
callq 0x21122
testq %rax, %rax
je 0x3c6d9
movq 0x410(%rbx), %rdi
testq %rdi, %rdi
je 0x3c6df
movq 0xf0(%rdi), %rsi
cmpq 0xf8(%rdi), %rsi
je 0x3c6c8
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xf0(%rdi)
jmp 0x3c6d9
addq $0xe8, %rdi
leaq 0xc(%rsp), %rdx
callq 0x797e
addq $0x10, %rsp
popq %rbx
retq
leaq 0x7d58d(%rip), %rdi     # 0xb9c73
leaq 0x7a65b(%rip), %rsi     # 0xb6d48
leaq 0x7d596(%rip), %rcx     # 0xb9c8a
movl $0x182b, %edx           # imm = 0x182B
callq 0x61b0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3dbae
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xe456
jmp 0x3dc99
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movq %rdx, %rsi
callq 0x1eafa
movl %ebp, 0xc(%r13)
movq (%r12), %rax
movq %rsp, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *0x168(%rax)
leaq 0x8508a(%rip), %rdx     # 0xc2c71
leaq 0x7ce27(%rip), %r8      # 0xbaa15
movq %rsp, %rsi
movq %rbx, %rdi
movq %r14, %rcx
callq 0x5274b
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3dc17
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xbe7c2(%rip), %rax     # 0xfc3e0
addq $0x10, %rax
leaq 0xc0(%rsp), %r14
movq %rax, -0xa0(%r14)
movq %r14, %rdi
callq 0xde80
movq -0x38(%r14), %rdi
testq %rdi, %rdi
je 0x3dc52
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x3dc82
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 0x3dc99
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3dcd1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3dcd1
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x1be02
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::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 0x12e12
movq %rbx, %rdi
movl %ebp, %esi
callq 0xc7b4
testq %rax, %rax
je 0x3e9cf
movl 0x8(%rax), %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x43a7a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq