// File: rossy[P]crossc/SPIRV-Cross/spirv_msl.cpp
// Function: spirv_cross::CompilerMSL::emit_entry_point_declarations()
void CompilerMSL::emit_entry_point_declarations()
{
	// FIXME: Get test coverage here ...

	// Emit constexpr samplers here.
	for (auto &samp : constexpr_samplers)
	{
		auto &var = get<SPIRVariable>(samp.first);
		auto &type = get<SPIRType>(var.basetype);
		if (type.basetype == SPIRType::Sampler)
			add_resource_name(samp.first);

		vector<string> args;
		auto &s = samp.second;

		if (s.coord != MSL_SAMPLER_COORD_NORMALIZED)
			args.push_back("coord::pixel");

		if (s.min_filter == s.mag_filter)
		{
			if (s.min_filter != MSL_SAMPLER_FILTER_NEAREST)
				args.push_back("filter::linear");
		}
		else
		{
			if (s.min_filter != MSL_SAMPLER_FILTER_NEAREST)
				args.push_back("min_filter::linear");
			if (s.mag_filter != MSL_SAMPLER_FILTER_NEAREST)
				args.push_back("mag_filter::linear");
		}

		switch (s.mip_filter)
		{
		case MSL_SAMPLER_MIP_FILTER_NONE:
			// Default
			break;
		case MSL_SAMPLER_MIP_FILTER_NEAREST:
			args.push_back("mip_filter::nearest");
			break;
		case MSL_SAMPLER_MIP_FILTER_LINEAR:
			args.push_back("mip_filter::linear");
			break;
		default:
			SPIRV_CROSS_THROW("Invalid mip filter.");
		}

		if (s.s_address == s.t_address && s.s_address == s.r_address)
		{
			if (s.s_address != MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE)
				args.push_back(create_sampler_address("", s.s_address));
		}
		else
		{
			if (s.s_address != MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE)
				args.push_back(create_sampler_address("s_", s.s_address));
			if (s.t_address != MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE)
				args.push_back(create_sampler_address("t_", s.t_address));
			if (s.r_address != MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE)
				args.push_back(create_sampler_address("r_", s.r_address));
		}

		if (s.compare_enable)
		{
			switch (s.compare_func)
			{
			case MSL_SAMPLER_COMPARE_FUNC_ALWAYS:
				args.push_back("compare_func::always");
				break;
			case MSL_SAMPLER_COMPARE_FUNC_NEVER:
				args.push_back("compare_func::never");
				break;
			case MSL_SAMPLER_COMPARE_FUNC_EQUAL:
				args.push_back("compare_func::equal");
				break;
			case MSL_SAMPLER_COMPARE_FUNC_NOT_EQUAL:
				args.push_back("compare_func::not_equal");
				break;
			case MSL_SAMPLER_COMPARE_FUNC_LESS:
				args.push_back("compare_func::less");
				break;
			case MSL_SAMPLER_COMPARE_FUNC_LESS_EQUAL:
				args.push_back("compare_func::less_equal");
				break;
			case MSL_SAMPLER_COMPARE_FUNC_GREATER:
				args.push_back("compare_func::greater");
				break;
			case MSL_SAMPLER_COMPARE_FUNC_GREATER_EQUAL:
				args.push_back("compare_func::greater_equal");
				break;
			default:
				SPIRV_CROSS_THROW("Invalid sampler compare function.");
			}
		}

		if (s.s_address == MSL_SAMPLER_ADDRESS_CLAMP_TO_BORDER || s.t_address == MSL_SAMPLER_ADDRESS_CLAMP_TO_BORDER ||
		    s.r_address == MSL_SAMPLER_ADDRESS_CLAMP_TO_BORDER)
		{
			switch (s.border_color)
			{
			case MSL_SAMPLER_BORDER_COLOR_OPAQUE_BLACK:
				args.push_back("border_color::opaque_black");
				break;
			case MSL_SAMPLER_BORDER_COLOR_OPAQUE_WHITE:
				args.push_back("border_color::opaque_white");
				break;
			case MSL_SAMPLER_BORDER_COLOR_TRANSPARENT_BLACK:
				args.push_back("border_color::transparent_black");
				break;
			default:
				SPIRV_CROSS_THROW("Invalid sampler border color.");
			}
		}

		if (s.anisotropy_enable)
			args.push_back(join("max_anisotropy(", s.max_anisotropy, ")"));
		if (s.lod_clamp_enable)
		{
			args.push_back(
			    join("lod_clamp(", convert_to_string(s.lod_clamp_min), ", ", convert_to_string(s.lod_clamp_max), ")"));
		}

		statement("constexpr sampler ",
		          type.basetype == SPIRType::SampledImage ? to_sampler_expression(samp.first) : to_name(samp.first),
		          "(", merge(args), ");");
	}

	// Emit buffer arrays here.
	for (uint32_t array_id : buffer_arrays)
	{
		const auto &var = get<SPIRVariable>(array_id);
		const auto &type = get<SPIRType>(var.basetype);
		string name = get_name(array_id);
		statement(get_argument_address_space(var) + " " + type_to_glsl(type) + "* " + name + "[] =");
		begin_scope();
		for (uint32_t i = 0; i < type.array[0]; ++i)
			statement(name + "_" + convert_to_string(i) + ",");
		end_scope_decl();
		statement("");
	}
	// For some reason, without this, we end up emitting the arrays twice.
	buffer_arrays.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x760, %rsp            # imm = 0x760
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x688(%rbp)
addq $0x9c8, %rax            # imm = 0x9C8
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x113560
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x113590
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1135c0
testb $0x1, %al
jne 0xf18b4
jmp 0xf2bd7
leaq -0x18(%rbp), %rdi
callq 0x1135f0
movq -0x688(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %esi
callq 0xfec0
movq -0x688(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0xc(%rax), %esi
callq 0xea90
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0xf, 0xc(%rax)
jne 0xf190a
movq -0x688(%rbp), %rdi
movq -0x28(%rbp), %rax
movl (%rax), %esi
callq 0x5c1d0
leaq -0x50(%rbp), %rdi
callq 0x30390
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpl $0x0, (%rax)
je 0xf19b5
leaq -0x79(%rbp), %rdi
movq %rdi, -0x690(%rbp)
callq 0x7650
movq -0x690(%rbp), %rdx
leaq 0x58ed5(%rip), %rsi     # 0x14a81f
leaq -0x78(%rbp), %rdi
callq 0x7520
jmp 0xf1955
leaq -0x50(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xecd0
jmp 0xf1964
leaq -0x78(%rbp), %rdi
callq 0x7708
leaq -0x79(%rbp), %rdi
callq 0x73d0
jmp 0xf19b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf19a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x7708
leaq -0x79(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
movq -0x58(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x58(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0xf1a7a
movq -0x58(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xf1a75
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x698(%rbp)
callq 0x7650
movq -0x698(%rbp), %rdx
leaq 0x58e4b(%rip), %rsi     # 0x14a843
leaq -0xb0(%rbp), %rdi
callq 0x7520
jmp 0xf1a06
leaq -0x50(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xecd0
jmp 0xf1a18
leaq -0xb0(%rbp), %rdi
callq 0x7708
leaq -0xb1(%rbp), %rdi
callq 0x73d0
jmp 0xf1a75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf1a64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x7708
leaq -0xb1(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
jmp 0xf1bd4
movq -0x58(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xf1b26
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x6a0(%rbp)
callq 0x7650
movq -0x6a0(%rbp), %rdx
leaq 0x58d83(%rip), %rsi     # 0x14a82c
leaq -0xd8(%rbp), %rdi
callq 0x7520
jmp 0xf1ab7
leaq -0x50(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0xecd0
jmp 0xf1ac9
leaq -0xd8(%rbp), %rdi
callq 0x7708
leaq -0xd9(%rbp), %rdi
callq 0x73d0
jmp 0xf1b26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf1b15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x7708
leaq -0xd9(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
movq -0x58(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0xf1bd2
leaq -0x101(%rbp), %rdi
movq %rdi, -0x6a8(%rbp)
callq 0x7650
movq -0x6a8(%rbp), %rdx
leaq 0x58cea(%rip), %rsi     # 0x14a83f
leaq -0x100(%rbp), %rdi
callq 0x7520
jmp 0xf1b63
leaq -0x50(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0xecd0
jmp 0xf1b75
leaq -0x100(%rbp), %rdi
callq 0x7708
leaq -0x101(%rbp), %rdi
callq 0x73d0
jmp 0xf1bd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf1bc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x7708
leaq -0x101(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
jmp 0xf1bd4
movq -0x58(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x6ac(%rbp)
testl %eax, %eax
je 0xf1c08
jmp 0xf1be7
movl -0x6ac(%rbp), %eax
subl $0x1, %eax
je 0xf1c0d
jmp 0xf1bf4
movl -0x6ac(%rbp), %eax
subl $0x2, %eax
je 0xf1cae
jmp 0xf1d4f
jmp 0xf1e2b
leaq -0x129(%rbp), %rdi
movq %rdi, -0x6b8(%rbp)
callq 0x7650
movq -0x6b8(%rbp), %rdx
leaq 0x58c24(%rip), %rsi     # 0x14a852
leaq -0x128(%rbp), %rdi
callq 0x7520
jmp 0xf1c3c
leaq -0x50(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0xecd0
jmp 0xf1c4e
leaq -0x128(%rbp), %rdi
callq 0x7708
leaq -0x129(%rbp), %rdi
callq 0x73d0
jmp 0xf1e2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf1c9d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x7708
leaq -0x129(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
leaq -0x151(%rbp), %rdi
movq %rdi, -0x6c0(%rbp)
callq 0x7650
movq -0x6c0(%rbp), %rdx
leaq 0x58b97(%rip), %rsi     # 0x14a866
leaq -0x150(%rbp), %rdi
callq 0x7520
jmp 0xf1cdd
leaq -0x50(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0xecd0
jmp 0xf1cef
leaq -0x150(%rbp), %rdi
callq 0x7708
leaq -0x151(%rbp), %rdi
callq 0x73d0
jmp 0xf1e2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf1d3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x7708
leaq -0x151(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
movb $0x1, -0x17a(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x6d0(%rbp)
leaq -0x179(%rbp), %rdi
movq %rdi, -0x6c8(%rbp)
callq 0x7650
movq -0x6c8(%rbp), %rdx
leaq 0x58af1(%rip), %rsi     # 0x14a879
leaq -0x178(%rbp), %rdi
callq 0x7520
jmp 0xf1d96
movq -0x6d0(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x9c50
jmp 0xf1dab
movq -0x6d0(%rbp), %rdi
movb $0x0, -0x17a(%rbp)
leaq 0xbc018(%rip), %rsi     # 0x1addd8
leaq -0xe8137(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xf30cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf1e03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x7708
leaq -0x179(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x17a(%rbp)
jne 0xf1e1a
jmp 0xf1e26
movq -0x6d0(%rbp), %rdi
callq 0x72c0
jmp 0xf2bc9
movq -0x58(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x58(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jne 0xf1ed8
movq -0x58(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x58(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jne 0xf1ed8
movq -0x58(%rbp), %rax
cmpl $0x1, 0x10(%rax)
je 0xf1ed3
movq -0x58(%rbp), %rax
movl 0x10(%rax), %edx
leaq 0x4ca33(%rip), %rsi     # 0x13e89e
leaq -0x1a0(%rbp), %rdi
callq 0xf30d0
jmp 0xf1e79
leaq -0x50(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0xecd0
jmp 0xf1e8b
leaq -0x1a0(%rbp), %rdi
callq 0x7708
jmp 0xf1ed3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2bc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x7708
jmp 0xf2bc9
jmp 0xf2015
movq -0x58(%rbp), %rax
cmpl $0x1, 0x10(%rax)
je 0xf1f41
movq -0x58(%rbp), %rax
movl 0x10(%rax), %edx
leaq 0x5899d(%rip), %rsi     # 0x14a88d
leaq -0x1c0(%rbp), %rdi
callq 0xf30d0
jmp 0xf1efe
leaq -0x50(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0xecd0
jmp 0xf1f10
leaq -0x1c0(%rbp), %rdi
callq 0x7708
jmp 0xf1f41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x7708
jmp 0xf2bc9
movq -0x58(%rbp), %rax
cmpl $0x1, 0x14(%rax)
je 0xf1faa
movq -0x58(%rbp), %rax
movl 0x14(%rax), %edx
leaq 0x560ca(%rip), %rsi     # 0x148023
leaq -0x1e0(%rbp), %rdi
callq 0xf30d0
jmp 0xf1f67
leaq -0x50(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0xecd0
jmp 0xf1f79
leaq -0x1e0(%rbp), %rdi
callq 0x7708
jmp 0xf1faa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x7708
jmp 0xf2bc9
movq -0x58(%rbp), %rax
cmpl $0x1, 0x18(%rax)
je 0xf2013
movq -0x58(%rbp), %rax
movl 0x18(%rax), %edx
leaq 0x4c284(%rip), %rsi     # 0x13e246
leaq -0x200(%rbp), %rdi
callq 0xf30d0
jmp 0xf1fd0
leaq -0x50(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0xecd0
jmp 0xf1fe2
leaq -0x200(%rbp), %rdi
callq 0x7708
jmp 0xf2013
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x7708
jmp 0xf2bc9
jmp 0xf2015
movq -0x58(%rbp), %rax
testb $0x1, 0x30(%rax)
je 0xf2638
movq -0x58(%rbp), %rax
movl 0x1c(%rax), %eax
movq %rax, -0x6d8(%rbp)
subq $0x7, %rax
ja 0xf255a
movq -0x6d8(%rbp), %rax
leaq 0x57d7b(%rip), %rcx     # 0x149dc4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x221(%rbp), %rdi
movq %rdi, -0x6e0(%rbp)
callq 0x7650
movq -0x6e0(%rbp), %rdx
leaq 0x5881d(%rip), %rsi     # 0x14a890
leaq -0x220(%rbp), %rdi
callq 0x7520
jmp 0xf2081
leaq -0x50(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0xecd0
jmp 0xf2093
leaq -0x220(%rbp), %rdi
callq 0x7708
leaq -0x221(%rbp), %rdi
callq 0x73d0
jmp 0xf2636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf20e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x7708
leaq -0x221(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
leaq -0x249(%rbp), %rdi
movq %rdi, -0x6e8(%rbp)
callq 0x7650
movq -0x6e8(%rbp), %rdx
leaq 0x58791(%rip), %rsi     # 0x14a8a5
leaq -0x248(%rbp), %rdi
callq 0x7520
jmp 0xf2122
leaq -0x50(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0xecd0
jmp 0xf2134
leaq -0x248(%rbp), %rdi
callq 0x7708
leaq -0x249(%rbp), %rdi
callq 0x73d0
jmp 0xf2636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2183
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x7708
leaq -0x249(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
leaq -0x271(%rbp), %rdi
movq %rdi, -0x6f0(%rbp)
callq 0x7650
movq -0x6f0(%rbp), %rdx
leaq 0x58704(%rip), %rsi     # 0x14a8b9
leaq -0x270(%rbp), %rdi
callq 0x7520
jmp 0xf21c3
leaq -0x50(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0xecd0
jmp 0xf21d5
leaq -0x270(%rbp), %rdi
callq 0x7708
leaq -0x271(%rbp), %rdi
callq 0x73d0
jmp 0xf2636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2224
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x7708
leaq -0x271(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
leaq -0x299(%rbp), %rdi
movq %rdi, -0x6f8(%rbp)
callq 0x7650
movq -0x6f8(%rbp), %rdx
leaq 0x58677(%rip), %rsi     # 0x14a8cd
leaq -0x298(%rbp), %rdi
callq 0x7520
jmp 0xf2264
leaq -0x50(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0xecd0
jmp 0xf2276
leaq -0x298(%rbp), %rdi
callq 0x7708
leaq -0x299(%rbp), %rdi
callq 0x73d0
jmp 0xf2636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf22c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x7708
leaq -0x299(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
leaq -0x2c1(%rbp), %rdi
movq %rdi, -0x700(%rbp)
callq 0x7650
movq -0x700(%rbp), %rdx
leaq 0x585ee(%rip), %rsi     # 0x14a8e5
leaq -0x2c0(%rbp), %rdi
callq 0x7520
jmp 0xf2305
leaq -0x50(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0xecd0
jmp 0xf2317
leaq -0x2c0(%rbp), %rdi
callq 0x7708
leaq -0x2c1(%rbp), %rdi
callq 0x73d0
jmp 0xf2636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2366
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x7708
leaq -0x2c1(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
leaq -0x2e9(%rbp), %rdi
movq %rdi, -0x708(%rbp)
callq 0x7650
movq -0x708(%rbp), %rdx
leaq 0x58560(%rip), %rsi     # 0x14a8f8
leaq -0x2e8(%rbp), %rdi
callq 0x7520
jmp 0xf23a6
leaq -0x50(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0xecd0
jmp 0xf23b8
leaq -0x2e8(%rbp), %rdi
callq 0x7708
leaq -0x2e9(%rbp), %rdi
callq 0x73d0
jmp 0xf2636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2407
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x2e8(%rbp), %rdi
callq 0x7708
leaq -0x2e9(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
leaq -0x311(%rbp), %rdi
movq %rdi, -0x710(%rbp)
callq 0x7650
movq -0x710(%rbp), %rdx
leaq 0x584d8(%rip), %rsi     # 0x14a911
leaq -0x310(%rbp), %rdi
callq 0x7520
jmp 0xf2447
leaq -0x50(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0xecd0
jmp 0xf2459
leaq -0x310(%rbp), %rdi
callq 0x7708
leaq -0x311(%rbp), %rdi
callq 0x73d0
jmp 0xf2636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf24a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x310(%rbp), %rdi
callq 0x7708
leaq -0x311(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
leaq -0x339(%rbp), %rdi
movq %rdi, -0x718(%rbp)
callq 0x7650
movq -0x718(%rbp), %rdx
leaq 0x5844d(%rip), %rsi     # 0x14a927
leaq -0x338(%rbp), %rdi
callq 0x7520
jmp 0xf24e8
leaq -0x50(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0xecd0
jmp 0xf24fa
leaq -0x338(%rbp), %rdi
callq 0x7708
leaq -0x339(%rbp), %rdi
callq 0x73d0
jmp 0xf2636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2549
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x338(%rbp), %rdi
callq 0x7708
leaq -0x339(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
movb $0x1, -0x362(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x728(%rbp)
leaq -0x361(%rbp), %rdi
movq %rdi, -0x720(%rbp)
callq 0x7650
movq -0x720(%rbp), %rdx
leaq 0x583b0(%rip), %rsi     # 0x14a943
leaq -0x360(%rbp), %rdi
callq 0x7520
jmp 0xf25a1
movq -0x728(%rbp), %rdi
leaq -0x360(%rbp), %rsi
callq 0x9c50
jmp 0xf25b6
movq -0x728(%rbp), %rdi
movb $0x0, -0x362(%rbp)
leaq 0xbb80d(%rip), %rsi     # 0x1addd8
leaq -0xe8942(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xf30cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf260e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x360(%rbp), %rdi
callq 0x7708
leaq -0x361(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x362(%rbp)
jne 0xf2625
jmp 0xf2631
movq -0x728(%rbp), %rdi
callq 0x72c0
jmp 0xf2bc9
jmp 0xf2638
movq -0x58(%rbp), %rax
cmpl $0x2, 0x10(%rax)
je 0xf265a
movq -0x58(%rbp), %rax
cmpl $0x2, 0x14(%rax)
je 0xf265a
movq -0x58(%rbp), %rax
cmpl $0x2, 0x18(%rax)
jne 0xf2953
movq -0x58(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x72c(%rbp)
testl %eax, %eax
je 0xf27d4
jmp 0xf2671
movl -0x72c(%rbp), %eax
subl $0x1, %eax
je 0xf2692
jmp 0xf267e
movl -0x72c(%rbp), %eax
subl $0x2, %eax
je 0xf2733
jmp 0xf2875
leaq -0x389(%rbp), %rdi
movq %rdi, -0x738(%rbp)
callq 0x7650
movq -0x738(%rbp), %rdx
leaq 0x582b2(%rip), %rsi     # 0x14a965
leaq -0x388(%rbp), %rdi
callq 0x7520
jmp 0xf26c1
leaq -0x50(%rbp), %rdi
leaq -0x388(%rbp), %rsi
callq 0xecd0
jmp 0xf26d3
leaq -0x388(%rbp), %rdi
callq 0x7708
leaq -0x389(%rbp), %rdi
callq 0x73d0
jmp 0xf2951
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2722
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x388(%rbp), %rdi
callq 0x7708
leaq -0x389(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
leaq -0x3b1(%rbp), %rdi
movq %rdi, -0x740(%rbp)
callq 0x7650
movq -0x740(%rbp), %rdx
leaq 0x5822c(%rip), %rsi     # 0x14a980
leaq -0x3b0(%rbp), %rdi
callq 0x7520
jmp 0xf2762
leaq -0x50(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0xecd0
jmp 0xf2774
leaq -0x3b0(%rbp), %rdi
callq 0x7708
leaq -0x3b1(%rbp), %rdi
callq 0x73d0
jmp 0xf2951
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf27c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0x7708
leaq -0x3b1(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
leaq -0x3d9(%rbp), %rdi
movq %rdi, -0x748(%rbp)
callq 0x7650
movq -0x748(%rbp), %rdx
leaq 0x581a6(%rip), %rsi     # 0x14a99b
leaq -0x3d8(%rbp), %rdi
callq 0x7520
jmp 0xf2803
leaq -0x50(%rbp), %rdi
leaq -0x3d8(%rbp), %rsi
callq 0xecd0
jmp 0xf2815
leaq -0x3d8(%rbp), %rdi
callq 0x7708
leaq -0x3d9(%rbp), %rdi
callq 0x73d0
jmp 0xf2951
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2864
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x3d8(%rbp), %rdi
callq 0x7708
leaq -0x3d9(%rbp), %rdi
callq 0x73d0
jmp 0xf2bc9
movb $0x1, -0x402(%rbp)
movl $0x10, %edi
callq 0x71a0
movq %rax, -0x758(%rbp)
leaq -0x401(%rbp), %rdi
movq %rdi, -0x750(%rbp)
callq 0x7650
movq -0x750(%rbp), %rdx
leaq 0x5810d(%rip), %rsi     # 0x14a9bb
leaq -0x400(%rbp), %rdi
callq 0x7520
jmp 0xf28bc
movq -0x758(%rbp), %rdi
leaq -0x400(%rbp), %rsi
callq 0x9c50
jmp 0xf28d1
movq -0x758(%rbp), %rdi
movb $0x0, -0x402(%rbp)
leaq 0xbb4f2(%rip), %rsi     # 0x1addd8
leaq -0xe8c5d(%rip), %rdx    # 0x9c90
callq 0x7610
jmp 0xf30cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2929
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x400(%rbp), %rdi
callq 0x7708
leaq -0x401(%rbp), %rdi
callq 0x73d0
testb $0x1, -0x402(%rbp)
jne 0xf2940
jmp 0xf294c
movq -0x758(%rbp), %rdi
callq 0x72c0
jmp 0xf2bc9
jmp 0xf2953
movq -0x58(%rbp), %rax
testb $0x1, 0x32(%rax)
je 0xf29c4
movq -0x58(%rbp), %rdx
addq $0x2c, %rdx
leaq 0x5806d(%rip), %rsi     # 0x14a9d9
leaq 0x52586(%rip), %rcx     # 0x144ef9
leaq -0x428(%rbp), %rdi
callq 0x113620
jmp 0xf2981
leaq -0x50(%rbp), %rdi
leaq -0x428(%rbp), %rsi
callq 0xecd0
jmp 0xf2993
leaq -0x428(%rbp), %rdi
callq 0x7708
jmp 0xf29c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x428(%rbp), %rdi
callq 0x7708
jmp 0xf2bc9
movq -0x58(%rbp), %rax
testb $0x1, 0x31(%rax)
je 0xf2acc
movq -0x58(%rbp), %rax
movss 0x24(%rax), %xmm0
leaq -0x468(%rbp), %rdi
callq 0xa1d10
jmp 0xf29e9
movq -0x58(%rbp), %rax
movss 0x28(%rax), %xmm0
leaq -0x488(%rbp), %rdi
callq 0xa1d10
jmp 0xf2a00
leaq 0x57fe2(%rip), %rsi     # 0x14a9e9
leaq 0x51b81(%rip), %rcx     # 0x14458f
leaq 0x524e4(%rip), %r9      # 0x144ef9
leaq -0x448(%rbp), %rdi
leaq -0x468(%rbp), %rdx
leaq -0x488(%rbp), %r8
callq 0x1136e0
jmp 0xf2a31
leaq -0x50(%rbp), %rdi
leaq -0x448(%rbp), %rsi
callq 0xecd0
jmp 0xf2a43
leaq -0x448(%rbp), %rdi
callq 0x7708
leaq -0x488(%rbp), %rdi
callq 0x7708
leaq -0x468(%rbp), %rdi
callq 0x7708
jmp 0xf2acc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2abb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2aaf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x448(%rbp), %rdi
callq 0x7708
leaq -0x488(%rbp), %rdi
callq 0x7708
leaq -0x468(%rbp), %rdi
callq 0x7708
jmp 0xf2bc9
movq -0x38(%rbp), %rax
cmpl $0xe, 0xc(%rax)
jne 0xf2af3
movq -0x688(%rbp), %rsi
movq -0x28(%rbp), %rax
movl (%rax), %edx
leaq -0x4a8(%rbp), %rdi
callq 0xf3250
jmp 0xf2af1
jmp 0xf2b19
movq -0x688(%rbp), %rsi
movq -0x28(%rbp), %rax
movl (%rax), %edx
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq -0x4a8(%rbp), %rdi
movl $0x1, %ecx
callq *%rax
jmp 0xf2b17
jmp 0xf2b19
leaq -0x4c8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9f2c0
jmp 0xf2b2b
movq -0x688(%rbp), %rdi
leaq 0x57ebb(%rip), %rsi     # 0x14a9f4
leaq 0x5a7ed(%rip), %rcx     # 0x14d32d
leaq 0x5655e(%rip), %r9      # 0x1490a5
leaq -0x4a8(%rbp), %rdx
leaq -0x4c8(%rbp), %r8
callq 0x1137b0
jmp 0xf2b5c
leaq -0x4c8(%rbp), %rdi
callq 0x7708
leaq -0x4a8(%rbp), %rdi
callq 0x7708
leaq -0x50(%rbp), %rdi
callq 0x14cd0
leaq -0x18(%rbp), %rdi
callq 0x113900
jmp 0xf189e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2bbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0x7708
leaq -0x4a8(%rbp), %rdi
callq 0x7708
leaq -0x50(%rbp), %rdi
callq 0x14cd0
jmp 0xf30c3
movq -0x688(%rbp), %rax
addq $0xa00, %rax            # imm = 0xA00
movq %rax, -0x4d0(%rbp)
movq -0x4d0(%rbp), %rdi
callq 0x86d0
movq %rax, -0x4d8(%rbp)
movq -0x4d0(%rbp), %rdi
callq 0x8700
movq %rax, -0x4e0(%rbp)
leaq -0x4d8(%rbp), %rdi
leaq -0x4e0(%rbp), %rsi
callq 0x8730
testb $0x1, %al
jne 0xf2c2d
jmp 0xf30a7
leaq -0x4d8(%rbp), %rdi
callq 0x8770
movq -0x688(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x4e4(%rbp)
movl -0x4e4(%rbp), %esi
callq 0xfec0
movq -0x688(%rbp), %rdi
movq %rax, -0x4f0(%rbp)
movq -0x4f0(%rbp), %rax
movl 0xc(%rax), %esi
callq 0xea90
movq -0x688(%rbp), %rdi
movq %rax, -0x4f8(%rbp)
movl -0x4e4(%rbp), %esi
callq 0x23340
movq %rax, %rsi
leaq -0x518(%rbp), %rdi
callq 0x7170
movq -0x688(%rbp), %rsi
movq -0x4f0(%rbp), %rdx
leaq -0x5d8(%rbp), %rdi
callq 0xf34c0
jmp 0xf2cb4
leaq 0x4bbe2(%rip), %rdx     # 0x13e89d
leaq -0x5b8(%rbp), %rdi
leaq -0x5d8(%rbp), %rsi
callq 0x11910
jmp 0xf2cd0
movq -0x688(%rbp), %rsi
movq -0x4f8(%rbp), %rdx
movq (%rsi), %rax
movq 0x98(%rax), %rax
leaq -0x5f8(%rbp), %rdi
xorl %ecx, %ecx
callq *%rax
jmp 0xf2cf5
leaq -0x598(%rbp), %rdi
leaq -0x5b8(%rbp), %rsi
leaq -0x5f8(%rbp), %rdx
callq 0x2f7f0
jmp 0xf2d11
leaq 0x50d11(%rip), %rdx     # 0x143a29
leaq -0x578(%rbp), %rdi
leaq -0x598(%rbp), %rsi
callq 0x11910
jmp 0xf2d2d
leaq -0x558(%rbp), %rdi
leaq -0x578(%rbp), %rsi
leaq -0x518(%rbp), %rdx
callq 0xa1530
jmp 0xf2d49
leaq 0x57cb7(%rip), %rdx     # 0x14aa07
leaq -0x538(%rbp), %rdi
leaq -0x558(%rbp), %rsi
callq 0x11910
jmp 0xf2d65
movq -0x688(%rbp), %rdi
leaq -0x538(%rbp), %rsi
callq 0x113930
jmp 0xf2d7a
leaq -0x538(%rbp), %rdi
callq 0x7708
leaq -0x558(%rbp), %rdi
callq 0x7708
leaq -0x578(%rbp), %rdi
callq 0x7708
leaq -0x598(%rbp), %rdi
callq 0x7708
leaq -0x5f8(%rbp), %rdi
callq 0x7708
leaq -0x5b8(%rbp), %rdi
callq 0x7708
leaq -0x5d8(%rbp), %rdi
callq 0x7708
movq -0x688(%rbp), %rdi
callq 0x5c200
jmp 0xf2ddc
movl $0x0, -0x5fc(%rbp)
movl -0x5fc(%rbp), %eax
movl %eax, -0x75c(%rbp)
movq -0x4f8(%rbp), %rdi
addq $0x20, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8570
movq %rax, %rcx
movl -0x75c(%rbp), %eax
cmpl (%rcx), %eax
jae 0xf3059
leaq 0x55700(%rip), %rdx     # 0x14851e
leaq -0x660(%rbp), %rdi
leaq -0x518(%rbp), %rsi
callq 0x2f8c0
jmp 0xf2e33
leaq -0x680(%rbp), %rdi
leaq -0x5fc(%rbp), %rsi
callq 0x2f940
jmp 0xf2e48
leaq -0x640(%rbp), %rdi
leaq -0x660(%rbp), %rsi
leaq -0x680(%rbp), %rdx
callq 0x2f7f0
jmp 0xf2e64
leaq 0x591de(%rip), %rdx     # 0x14c049
leaq -0x620(%rbp), %rdi
leaq -0x640(%rbp), %rsi
callq 0x11910
jmp 0xf2e80
movq -0x688(%rbp), %rdi
leaq -0x620(%rbp), %rsi
callq 0x113930
jmp 0xf2e95
leaq -0x620(%rbp), %rdi
callq 0x7708
leaq -0x640(%rbp), %rdi
callq 0x7708
leaq -0x680(%rbp), %rdi
callq 0x7708
leaq -0x660(%rbp), %rdi
callq 0x7708
movl -0x5fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5fc(%rbp)
jmp 0xf2de6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf3099
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2fc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2fbc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2fb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2fa4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2f98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf2f8c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x538(%rbp), %rdi
callq 0x7708
leaq -0x558(%rbp), %rdi
callq 0x7708
leaq -0x578(%rbp), %rdi
callq 0x7708
leaq -0x598(%rbp), %rdi
callq 0x7708
leaq -0x5f8(%rbp), %rdi
callq 0x7708
leaq -0x5b8(%rbp), %rdi
callq 0x7708
leaq -0x5d8(%rbp), %rdi
callq 0x7708
jmp 0xf3099
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf304b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf303f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xf3033
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x620(%rbp), %rdi
callq 0x7708
leaq -0x640(%rbp), %rdi
callq 0x7708
leaq -0x680(%rbp), %rdi
callq 0x7708
leaq -0x660(%rbp), %rdi
callq 0x7708
jmp 0xf3099
movq -0x688(%rbp), %rdi
callq 0x5c350
jmp 0xf3067
movq -0x688(%rbp), %rdi
leaq 0x4b829(%rip), %rsi     # 0x13e89e
callq 0xedf0
jmp 0xf307c
leaq -0x518(%rbp), %rdi
callq 0x7708
leaq -0x4d8(%rbp), %rdi
callq 0x8790
jmp 0xf2c11
leaq -0x518(%rbp), %rdi
callq 0x7708
jmp 0xf30c3
movq -0x688(%rbp), %rdi
addq $0xa00, %rdi            # imm = 0xA00
callq 0x8a00
addq $0x760, %rsp            # imm = 0x760
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x7640
nop