// File: rossy[P]crossc/SPIRV-Cross/spirv_cpp.cpp
// Function: spirv_cross::CompilerCPP::emit_header()
void CompilerCPP::emit_header()
{
	auto &execution = get_entry_point();

	statement("// This C++ shader is autogenerated by spirv-cross.");
	statement("#include \"spirv_cross/internal_interface.hpp\"");
	statement("#include \"spirv_cross/external_interface.h\"");
	// Needed to properly implement GLSL-style arrays.
	statement("#include <array>");
	statement("#include <stdint.h>");
	statement("");
	statement("using namespace spirv_cross;");
	statement("using namespace glm;");
	statement("");

	statement("namespace Impl");
	begin_scope();

	switch (execution.model)
	{
	case ExecutionModelGeometry:
	case ExecutionModelTessellationControl:
	case ExecutionModelTessellationEvaluation:
	case ExecutionModelGLCompute:
	case ExecutionModelFragment:
	case ExecutionModelVertex:
		statement("struct Shader");
		begin_scope();
		break;

	default:
		SPIRV_CROSS_THROW("Unsupported execution model.");
	}

	switch (execution.model)
	{
	case ExecutionModelGeometry:
		impl_type = "GeometryShader<Impl::Shader, Impl::Shader::Resources>";
		resource_type = "GeometryResources";
		break;

	case ExecutionModelVertex:
		impl_type = "VertexShader<Impl::Shader, Impl::Shader::Resources>";
		resource_type = "VertexResources";
		break;

	case ExecutionModelFragment:
		impl_type = "FragmentShader<Impl::Shader, Impl::Shader::Resources>";
		resource_type = "FragmentResources";
		break;

	case ExecutionModelGLCompute:
		impl_type = join("ComputeShader<Impl::Shader, Impl::Shader::Resources, ", execution.workgroup_size.x, ", ",
		                 execution.workgroup_size.y, ", ", execution.workgroup_size.z, ">");
		resource_type = "ComputeResources";
		break;

	case ExecutionModelTessellationControl:
		impl_type = "TessControlShader<Impl::Shader, Impl::Shader::Resources>";
		resource_type = "TessControlResources";
		break;

	case ExecutionModelTessellationEvaluation:
		impl_type = "TessEvaluationShader<Impl::Shader, Impl::Shader::Resources>";
		resource_type = "TessEvaluationResources";
		break;

	default:
		SPIRV_CROSS_THROW("Unsupported execution model.");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x25150
movq -0x98(%rbp), %rdi
movq %rax, -0x10(%rbp)
leaq 0x12ff9d(%rip), %rsi    # 0x13e5be
callq 0x119e0
movq -0x98(%rbp), %rdi
leaq 0x12ffbe(%rip), %rsi    # 0x13e5f2
callq 0x11b00
movq -0x98(%rbp), %rdi
leaq 0x12ffd9(%rip), %rsi    # 0x13e620
callq 0x11c20
movq -0x98(%rbp), %rdi
leaq 0x12fff2(%rip), %rsi    # 0x13e64c
callq 0x11d40
movq -0x98(%rbp), %rdi
leaq 0x12fff0(%rip), %rsi    # 0x13e65d
callq 0x11210
movq -0x98(%rbp), %rdi
leaq 0x13021e(%rip), %rsi    # 0x13e89e
movq %rsi, -0xa0(%rbp)
callq 0xedf0
movq -0x98(%rbp), %rdi
leaq 0x12ffd7(%rip), %rsi    # 0x13e671
callq 0x11e60
movq -0x98(%rbp), %rdi
leaq 0x12ffe1(%rip), %rsi    # 0x13e68e
callq 0x11f80
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdi
callq 0xedf0
movq -0x98(%rbp), %rdi
leaq 0x12ffd0(%rip), %rsi    # 0x13e6a3
callq 0x120a0
movq -0x98(%rbp), %rdi
callq 0x5c200
movq -0x10(%rbp), %rax
movl 0xb8(%rax), %eax
subl $0x5, %eax
ja 0xe719
jmp 0xe6f5
movq -0x98(%rbp), %rdi
leaq 0x12ffaf(%rip), %rsi    # 0x13e6b2
callq 0x121c0
movq -0x98(%rbp), %rdi
callq 0x5c200
jmp 0xe7d1
movb $0x1, -0x45(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0xb0(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x7650
movq -0xa8(%rbp), %rdx
leaq 0x12ff74(%rip), %rsi    # 0x13e6c0
leaq -0x30(%rbp), %rdi
callq 0x7520
jmp 0xe757
movq -0xb0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x9c50
jmp 0xe769
movq -0xb0(%rbp), %rdi
movb $0x0, -0x45(%rbp)
leaq 0x19f65d(%rip), %rsi    # 0x1addd8
leaq -0x4af2(%rip), %rdx     # 0x9c90
callq 0x7610
jmp 0xea8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xe7af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x7708
leaq -0x31(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x45(%rbp)
jne 0xe7c0
jmp 0xe7cc
movq -0xb0(%rbp), %rdi
callq 0x72c0
jmp 0xea85
movq -0x10(%rbp), %rax
movl 0xb8(%rax), %eax
movq %rax, -0xb8(%rbp)
subq $0x5, %rax
ja 0xe9b2
movq -0xb8(%rbp), %rax
leaq 0x12f98a(%rip), %rcx    # 0x13e184
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x98(%rbp), %rdi
addq $0x7a0, %rdi            # imm = 0x7A0
leaq 0x12fec5(%rip), %rsi    # 0x13e6dd
callq 0x7510
movq -0x98(%rbp), %rdi
addq $0x7c0, %rdi            # imm = 0x7C0
leaq 0x12fee1(%rip), %rsi    # 0x13e713
callq 0x7510
jmp 0xea7c
movq -0x98(%rbp), %rdi
addq $0x7a0, %rdi            # imm = 0x7A0
leaq 0x12fed4(%rip), %rsi    # 0x13e725
callq 0x7510
movq -0x98(%rbp), %rdi
addq $0x7c0, %rdi            # imm = 0x7C0
leaq 0x12feee(%rip), %rsi    # 0x13e759
callq 0x7510
jmp 0xea7c
movq -0x98(%rbp), %rdi
addq $0x7a0, %rdi            # imm = 0x7A0
leaq 0x12fedf(%rip), %rsi    # 0x13e769
callq 0x7510
movq -0x98(%rbp), %rdi
addq $0x7c0, %rdi            # imm = 0x7C0
leaq 0x12fefb(%rip), %rsi    # 0x13e79f
callq 0x7510
jmp 0xea7c
movq -0x10(%rbp), %rdx
addq $0xa0, %rdx
movq -0x10(%rbp), %r8
addq $0xa0, %r8
addq $0x4, %r8
movq -0x10(%rbp), %r10
addq $0xa0, %r10
addq $0x8, %r10
leaq -0x68(%rbp), %rdi
leaq 0x12fecf(%rip), %rsi    # 0x13e7b1
leaq 0x135ca6(%rip), %r9     # 0x14458f
leaq 0x12f8fb(%rip), %rax    # 0x13e1eb
movq %r9, %rcx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x122e0
movq -0x98(%rbp), %rdi
addq $0x7a0, %rdi            # imm = 0x7A0
leaq -0x68(%rbp), %rsi
callq 0x7430
leaq -0x68(%rbp), %rdi
callq 0x7708
movq -0x98(%rbp), %rdi
addq $0x7c0, %rdi            # imm = 0x7C0
leaq 0x12feb1(%rip), %rsi    # 0x13e7e7
callq 0x7510
jmp 0xea7c
movq -0x98(%rbp), %rdi
addq $0x7a0, %rdi            # imm = 0x7A0
leaq 0x12fea3(%rip), %rsi    # 0x13e7f8
callq 0x7510
movq -0x98(%rbp), %rdi
addq $0x7c0, %rdi            # imm = 0x7C0
leaq 0x12fec2(%rip), %rsi    # 0x13e831
callq 0x7510
jmp 0xea7c
movq -0x98(%rbp), %rdi
addq $0x7a0, %rdi            # imm = 0x7A0
leaq 0x12feb8(%rip), %rsi    # 0x13e846
callq 0x7510
movq -0x98(%rbp), %rdi
addq $0x7c0, %rdi            # imm = 0x7C0
leaq 0x12feda(%rip), %rsi    # 0x13e882
callq 0x7510
jmp 0xea7c
movb $0x1, -0x8a(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0xc8(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x7650
movq -0xc0(%rbp), %rdx
leaq 0x12fcd5(%rip), %rsi    # 0x13e6c0
leaq -0x88(%rbp), %rdi
callq 0x7520
jmp 0xe9f9
movq -0xc8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x9c50
jmp 0xea0e
movq -0xc8(%rbp), %rdi
movb $0x0, -0x8a(%rbp)
leaq 0x19f3b5(%rip), %rsi    # 0x1addd8
leaq -0x4d9a(%rip), %rdx     # 0x9c90
callq 0x7610
jmp 0xea8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xea57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x7708
leaq -0x89(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x8a(%rbp)
jne 0xea6e
jmp 0xea7a
movq -0xc8(%rbp), %rdi
callq 0x72c0
jmp 0xea85
addq $0xe0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x7640
nop