// File: /workspace/github_cpp_makefile_star2_O2/rossy[P]crossc/SPIRV-Cross/spirv_hlsl.cpp
// Function: spirv_cross::CompilerHLSL::compile[abi:cxx11]()
string CompilerHLSL::compile()
{
	// Do not deal with ES-isms like precision, older extensions and such.
	options.es = false;
	options.version = 450;
	options.vulkan_semantics = true;
	backend.float_literal_suffix = true;
	backend.double_literal_suffix = false;
	backend.half_literal_suffix = nullptr;
	backend.long_long_literal_suffix = true;
	backend.uint32_t_literal_suffix = true;
	backend.basic_int_type = "int";
	backend.basic_uint_type = "uint";
	backend.swizzle_is_function = false;
	backend.shared_is_implied = true;
	backend.flexible_member_array_supported = false;
	backend.explicit_struct_type = false;
	backend.use_initializer_list = true;
	backend.use_constructor_splatting = false;
	backend.boolean_mix_support = false;
	backend.can_swizzle_scalar = true;
	backend.can_declare_struct_inline = false;
	backend.can_declare_arrays_inline = false;
	backend.can_return_array = false;

	build_function_control_flow_graphs_and_analyze();
	update_active_builtins();
	analyze_image_and_sampler_usage();

	// Subpass input needs SV_Position.
	if (need_subpass_input)
		active_input_builtins.set(BuiltInFragCoord);

	uint32_t pass_count = 0;
	do
	{
		if (pass_count >= 3)
			SPIRV_CROSS_THROW("Over 3 compilation loops detected. Must be a bug!");

		reset();

		// Move constructor for this type is broken on GCC 4.9 ...
		buffer = unique_ptr<ostringstream>(new ostringstream());

		emit_header();
		emit_resources();

		emit_function(get<SPIRFunction>(ir.default_entry_point), Bitset());
		emit_hlsl_entry_point();

		pass_count++;
	} while (force_recompile);

	// Entry point in HLSL is always main() for the time being.
	get_entry_point().name = "main";

	return buffer->str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
xorl %eax, %eax
movb %al, 0x43c(%rsi)
movl $0x1c2, 0x438(%rsi)     # imm = 0x1C2
movb $0x1, %bpl
movb %bpl, 0x43e(%rsi)
andq $0x0, 0x618(%rsi)
movq %rdi, 0x8(%rsp)
movl $0x1010001, 0x600(%rsi) # imm = 0x1010001
leaq 0x34f60(%rip), %rcx     # 0x9232f
movq %rcx, 0x608(%rsi)
leaq 0x40601(%rip), %rcx     # 0x9d9de
movq %rcx, 0x610(%rsi)
movl $0x100, 0x620(%rsi)     # imm = 0x100
movb %bpl, 0x624(%rsi)
andw $0x0, 0x629(%rsi)
movb %bpl, 0x62c(%rsi)
andw $0x0, 0x626(%rsi)
movb %al, 0x62e(%rsi)
movq %rsi, %rdi
callq 0x162d0
movq %rbx, %rdi
callq 0x16086
movq %rbx, %rdi
callq 0x1610e
cmpb %bpl, 0x398(%rbx)
jne 0x5d43a
orb $-0x80, 0x2d1(%rbx)
leaq 0x18(%rsp), %r15
leaq 0x48(%rsp), %rbp
pushq $0x4
popq %r14
leaq 0x10(%rsp), %r12
decl %r14d
je 0x5d54a
movq %rbx, %rdi
callq 0x20c2c
movl $0x178, %edi            # imm = 0x178
callq 0x6270
movq %rax, %r13
movq %rax, %rdi
callq 0x63a0
movq 0x420(%rbx), %rdi
movq %r13, 0x420(%rbx)
testq %rdi, %rdi
je 0x5d48c
movq (%rdi), %rax
callq *0x8(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x78(%rax)
movq %rbx, %rdi
callq 0x52972
movl 0x108(%rbx), %esi
movq %rbx, %rdi
callq 0xa048
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movq %rbp, 0x18(%rsp)
movq $0x1, 0x20(%rsp)
movups %xmm0, 0x10(%r15)
movl $0x3f800000, 0x38(%rsp) # imm = 0x3F800000
movups %xmm0, 0x28(%r15)
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x21c20
movq %r15, %rdi
callq 0xb51c
movq %rbx, %rdi
callq 0x55900
cmpb $0x0, 0x1d0(%rbx)
jne 0x5d44d
movq %rbx, %rdi
callq 0x12fa4
leaq 0x8(%rax), %rdi
leaq 0x3b552(%rip), %rsi     # 0x98a6d
callq 0x64e0
movq 0x420(%rbx), %rsi
addq $0x8, %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x6430
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x6140
movq %rax, %rbx
leaq 0x31e5c(%rip), %rsi     # 0x8f3b8
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6100
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6f6e
xorl %ebp, %ebp
leaq 0x8983c(%rip), %rsi     # 0xe6dc0
movq 0x8aa55(%rip), %rdx     # 0xe7fe0
movq %rbx, %rdi
callq 0x6490
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6548
testb %bpl, %bpl
jne 0x5d5aa
jmp 0x5d5d1
movq %rax, %r14
movq %rbx, %rdi
callq 0x6200
jmp 0x5d5d1
movq %rax, %r14
movl $0x178, %esi            # imm = 0x178
movq %r13, %rdi
callq 0x6280
jmp 0x5d5d1
movq %rax, %r14
movq %r15, %rdi
callq 0xb51c
movq %r14, %rdi
callq 0x64b0
nop