// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::emit_block_chain(spirv_cross::SPIRBlock&)
void CompilerGLSL::emit_block_chain(SPIRBlock &block)
{
	propagate_loop_dominators(block);

	bool select_branch_to_true_block = false;
	bool skip_direct_branch = false;
	bool emitted_for_loop_header = false;
	bool force_complex_continue_block = false;

	emit_hoisted_temporaries(block.declare_temporary);

	SPIRBlock::ContinueBlockType continue_type = SPIRBlock::ContinueNone;
	if (block.continue_block)
		continue_type = continue_block_type(get<SPIRBlock>(block.continue_block));

	// If we have loop variables, stop masking out access to the variable now.
	for (auto var : block.loop_variables)
		get<SPIRVariable>(var).loop_variable_enable = true;

	// This is the method often used by spirv-opt to implement loops.
	// The loop header goes straight into the continue block.
	// However, don't attempt this on ESSL 1.0, because if a loop variable is used in a continue block,
	// it *MUST* be used in the continue block. This loop method will not work.
	if (!is_legacy_es() && block_is_loop_candidate(block, SPIRBlock::MergeToSelectContinueForLoop))
	{
		flush_undeclared_variables(block);
		if (attempt_emit_loop_header(block, SPIRBlock::MergeToSelectContinueForLoop))
		{
			select_branch_to_true_block = true;
			emitted_for_loop_header = true;
			force_complex_continue_block = true;
		}
	}
	// This is the older loop behavior in glslang which branches to loop body directly from the loop header.
	else if (block_is_loop_candidate(block, SPIRBlock::MergeToSelectForLoop))
	{
		flush_undeclared_variables(block);
		if (attempt_emit_loop_header(block, SPIRBlock::MergeToSelectForLoop))
		{
			// The body of while, is actually just the true block, so always branch there unconditionally.
			select_branch_to_true_block = true;
			emitted_for_loop_header = true;
		}
	}
	// This is the newer loop behavior in glslang which branches from Loop header directly to
	// a new block, which in turn has a OpBranchSelection without a selection merge.
	else if (block_is_loop_candidate(block, SPIRBlock::MergeToDirectForLoop))
	{
		flush_undeclared_variables(block);
		if (attempt_emit_loop_header(block, SPIRBlock::MergeToDirectForLoop))
		{
			skip_direct_branch = true;
			emitted_for_loop_header = true;
		}
	}
	else if (continue_type == SPIRBlock::DoWhileLoop)
	{
		flush_undeclared_variables(block);
		emit_while_loop_initializers(block);
		// We have some temporaries where the loop header is the dominator.
		// We risk a case where we have code like:
		// for (;;) { create-temporary; break; } consume-temporary;
		// so force-declare temporaries here.
		emit_hoisted_temporaries(block.potential_declare_temporary);
		statement("do");
		begin_scope();

		emit_block_instructions(block);
	}
	else if (block.merge == SPIRBlock::MergeLoop)
	{
		flush_undeclared_variables(block);
		emit_while_loop_initializers(block);

		// We have a generic loop without any distinguishable pattern like for, while or do while.
		get<SPIRBlock>(block.continue_block).complex_continue = true;
		continue_type = SPIRBlock::ComplexLoop;

		// We have some temporaries where the loop header is the dominator.
		// We risk a case where we have code like:
		// for (;;) { create-temporary; break; } consume-temporary;
		// so force-declare temporaries here.
		emit_hoisted_temporaries(block.potential_declare_temporary);
		statement("for (;;)");
		begin_scope();

		emit_block_instructions(block);
	}
	else
	{
		emit_block_instructions(block);
	}

	// If we didn't successfully emit a loop header and we had loop variable candidates, we have a problem
	// as writes to said loop variables might have been masked out, we need a recompile.
	if (!emitted_for_loop_header && !block.loop_variables.empty())
	{
		force_recompile = true;
		for (auto var : block.loop_variables)
			get<SPIRVariable>(var).loop_variable = false;
		block.loop_variables.clear();
	}

	flush_undeclared_variables(block);
	bool emit_next_block = true;

	// Handle end of block.
	switch (block.terminator)
	{
	case SPIRBlock::Direct:
		// True when emitting complex continue block.
		if (block.loop_dominator == block.next_block)
		{
			branch(block.self, block.next_block);
			emit_next_block = false;
		}
		// True if MergeToDirectForLoop succeeded.
		else if (skip_direct_branch)
			emit_next_block = false;
		else if (is_continue(block.next_block) || is_break(block.next_block) || is_conditional(block.next_block))
		{
			branch(block.self, block.next_block);
			emit_next_block = false;
		}
		break;

	case SPIRBlock::Select:
		// True if MergeToSelectForLoop or MergeToSelectContinueForLoop succeeded.
		if (select_branch_to_true_block)
		{
			if (force_complex_continue_block)
			{
				assert(block.true_block == block.continue_block);

				// We're going to emit a continue block directly here, so make sure it's marked as complex.
				auto &complex_continue = get<SPIRBlock>(block.continue_block).complex_continue;
				bool old_complex = complex_continue;
				complex_continue = true;
				branch(block.self, block.true_block);
				complex_continue = old_complex;
			}
			else
				branch(block.self, block.true_block);
		}
		else
			branch(block.self, block.condition, block.true_block, block.false_block);
		break;

	case SPIRBlock::MultiSelect:
	{
		auto &type = expression_type(block.condition);
		bool uint32_t_case = type.basetype == SPIRType::UInt;

		SPIRBlock *old_emitting_switch = current_emitting_switch;
		current_emitting_switch = &block;

		if (block.need_ladder_break)
			statement("bool _", block.self, "_ladder_break = false;");

		emit_block_hints(block);
		statement("switch (", to_expression(block.condition), ")");
		begin_scope();

		// Multiple case labels can branch to same block, so find all unique blocks.
		bool emitted_default = false;
		unordered_set<uint32_t> emitted_blocks;

		for (auto &c : block.cases)
		{
			if (emitted_blocks.count(c.block) != 0)
				continue;

			// Emit all case labels which branch to our target.
			// FIXME: O(n^2), revisit if we hit shaders with 100++ case labels ...
			for (auto &other_case : block.cases)
			{
				if (other_case.block == c.block)
				{
					auto case_value = uint32_t_case ? convert_to_string(uint32_t(other_case.value)) :
					                                  convert_to_string(int32_t(other_case.value));
					statement("case ", case_value, ":");
				}
			}

			// Maybe we share with default block?
			if (block.default_block == c.block)
			{
				statement("default:");
				emitted_default = true;
			}

			// Complete the target.
			emitted_blocks.insert(c.block);

			begin_scope();
			branch(block.self, c.block);
			end_scope();
		}

		if (!emitted_default)
		{
			if (block.default_block != block.next_block)
			{
				statement("default:");
				begin_scope();
				if (is_break(block.default_block))
					SPIRV_CROSS_THROW("Cannot break; out of a switch statement and out of a loop at the same time ...");
				branch(block.self, block.default_block);
				end_scope();
			}
			else if (flush_phi_required(block.self, block.next_block))
			{
				statement("default:");
				begin_scope();
				flush_phi(block.self, block.next_block);
				statement("break;");
				end_scope();
			}
		}

		end_scope();

		if (block.need_ladder_break)
		{
			statement("if (_", block.self, "_ladder_break)");
			begin_scope();
			statement("break;");
			end_scope();
		}

		current_emitting_switch = old_emitting_switch;
		break;
	}

	case SPIRBlock::Return:
		for (auto &line : current_function->fixup_hooks_out)
			line();

		if (processing_entry_point)
			emit_fixup();

		if (block.return_value)
		{
			auto &type = expression_type(block.return_value);
			if (!type.array.empty() && !backend.can_return_array)
			{
				// If we cannot return arrays, we will have a special out argument we can write to instead.
				// The backend is responsible for setting this up, and redirection the return values as appropriate.
				if (ir.ids.at(block.return_value).get_type() != TypeUndef)
					emit_array_copy("SPIRV_Cross_return_value", block.return_value);

				if (!block_is_outside_flow_control_from_block(get<SPIRBlock>(current_function->entry_block), block) ||
				    block.loop_dominator != SPIRBlock::NoDominator)
				{
					statement("return;");
				}
			}
			else
			{
				// OpReturnValue can return Undef, so don't emit anything for this case.
				if (ir.ids.at(block.return_value).get_type() != TypeUndef)
					statement("return ", to_expression(block.return_value), ";");
			}
		}
		// If this block is the very final block and not called from control flow,
		// we do not need an explicit return which looks out of place. Just end the function here.
		// In the very weird case of for(;;) { return; } executing return is unconditional,
		// but we actually need a return here ...
		else if (!block_is_outside_flow_control_from_block(get<SPIRBlock>(current_function->entry_block), block) ||
		         block.loop_dominator != SPIRBlock::NoDominator)
		{
			statement("return;");
		}
		break;

	case SPIRBlock::Kill:
		statement(backend.discard_literal, ";");
		break;

	case SPIRBlock::Unreachable:
		emit_next_block = false;
		break;

	default:
		SPIRV_CROSS_THROW("Unimplemented block terminator.");
	}

	if (block.next_block && emit_next_block)
	{
		// If we hit this case, we're dealing with an unconditional branch, which means we will output
		// that block after this. If we had selection merge, we already flushed phi variables.
		if (block.merge != SPIRBlock::MergeSelection)
			flush_phi(block.self, block.next_block);

		// For merge selects we might have ignored the fact that a merge target
		// could have been a break; or continue;
		// We will need to deal with it here.
		if (is_loop_break(block.next_block))
		{
			// Cannot check for just break, because switch statements will also use break.
			assert(block.merge == SPIRBlock::MergeSelection);
			statement("break;");
		}
		else if (is_continue(block.next_block))
		{
			assert(block.merge == SPIRBlock::MergeSelection);
			branch_to_continue(block.self, block.next_block);
		}
		else
			emit_block_chain(get<SPIRBlock>(block.next_block));
	}

	if (block.merge == SPIRBlock::MergeLoop)
	{
		if (continue_type == SPIRBlock::DoWhileLoop)
		{
			// Make sure that we run the continue block to get the expressions set, but this
			// should become an empty string.
			// We have no fallbacks if we cannot forward everything to temporaries ...
			auto statements = emit_continue_block(block.continue_block);
			if (!statements.empty())
			{
				// The DoWhile block has side effects, force ComplexLoop pattern next pass.
				get<SPIRBlock>(block.continue_block).complex_continue = true;
				force_recompile = true;
			}

			end_scope_decl(join("while (", to_expression(get<SPIRBlock>(block.continue_block).condition), ")"));
		}
		else
			end_scope();

		// We cannot break out of two loops at once, so don't check for break; here.
		// Using block.self as the "from" block isn't quite right, but it has the same scope
		// and dominance structure, so it's fine.
		if (is_continue(block.merge_block))
			branch_to_continue(block.self, block.merge_block);
		else
			emit_block_chain(get<SPIRBlock>(block.merge_block));
	}

	// Forget about control dependent expressions now.
	block.invalidate_expressions.clear();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r15
movq %rdi, %r12
callq 0x4f3d2
leaq 0x68(%r15), %rsi
movq %r12, %rdi
callq 0x50506
movl 0x20(%r15), %esi
testl %esi, %esi
je 0x4dcc1
movq %r12, %rdi
callq 0x78fe
movq %r12, %rdi
movq %rax, %rsi
callq 0x1544a
movl %eax, 0xc(%rsp)
jmp 0x4dcc9
movl $0x0, 0xc(%rsp)
movq 0xd0(%r15), %rbx
movq 0xd8(%r15), %r14
cmpq %r14, %rbx
je 0x4dcf0
movl (%rbx), %esi
movq %r12, %rdi
callq 0xb40a
movb $0x1, 0x65(%rax)
addq $0x4, %rbx
jmp 0x4dcd7
cmpb $0x1, 0x43c(%r12)
movq %r15, 0x70(%rsp)
movq %r12, (%rsp)
jne 0x4dd12
cmpl $0x12c, 0x438(%r12) # imm = 0x12C
jb 0x4dd58
movq %r12, %rdi
movq %r15, %rsi
movl $0x2, %edx
callq 0x150cc
testb %al, %al
je 0x4dd58
movq %r12, %rdi
movq %r15, %rsi
callq 0x50400
movq %r12, %rdi
movq %r15, %rsi
movl $0x2, %edx
callq 0x4fdc4
testb %al, %al
je 0x4df30
movb $0x1, %bl
xorl %r14d, %r14d
movb $0x1, %al
movb $0x1, %r15b
jmp 0x4df3a
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x150cc
movq %r12, %rdi
movq %r15, %rsi
testb %al, %al
je 0x4dd8e
callq 0x50400
xorl %ebx, %ebx
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x4fdc4
xorl %r14d, %r14d
movl %eax, %r15d
jmp 0x4df3a
movl $0x1, %edx
callq 0x150cc
testb %al, %al
je 0x4ddc1
movq %r12, %rdi
movq %r15, %rsi
callq 0x50400
movq %r12, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x4fdc4
xorl %ebx, %ebx
movl %eax, %r14d
jmp 0x4df37
cmpl $0x3, 0xc(%rsp)
jne 0x4de3f
movq %r12, %rdi
movq %r15, %rsi
callq 0x50400
movq %r12, %rdi
movq %r15, %rsi
callq 0x4f6d8
leaq 0x80(%r15), %rsi
movq %r12, %rdi
callq 0x50506
leaq 0x6aa7a(%rip), %rsi     # 0xb886e
movq %r12, %rdi
callq 0x59cce
leaq 0x6dde4(%rip), %rsi     # 0xbbbe7
movq %r12, %rdi
callq 0x5a5fc
incl 0x638(%r12)
movq %r15, 0x410(%r12)
movq 0x38(%r15), %rbx
movq 0x40(%r15), %r14
cmpq %r14, %rbx
je 0x4ded0
movq (%r12), %rax
movq %r12, %rdi
movq %rbx, %rsi
callq *0x48(%rax)
addq $0xc, %rbx
jmp 0x4de23
cmpl $0x1, 0x10(%r15)
jne 0x4dee6
movq %r12, %rdi
movq %r15, %rsi
callq 0x50400
movq %r12, %rdi
movq %r15, %rsi
callq 0x4f6d8
movl 0x20(%r15), %esi
movq %r12, %rdi
callq 0x78fe
movb $0x1, 0xb1(%rax)
leaq 0x80(%r15), %rsi
movq %r12, %rdi
callq 0x50506
leaq 0x6dbe2(%rip), %rsi     # 0xbba6b
movq %r12, %rdi
callq 0x59dd4
leaq 0x6dd4f(%rip), %rsi     # 0xbbbe7
movq %r12, %rdi
callq 0x5a5fc
incl 0x638(%r12)
movq %r15, 0x410(%r12)
movq 0x38(%r15), %rbx
movq 0x40(%r15), %r14
cmpq %r14, %rbx
je 0x4df0e
movq (%r12), %rax
movq %r12, %rdi
movq %rbx, %rsi
callq *0x48(%rax)
addq $0xc, %rbx
jmp 0x4deb8
movq $0x0, 0x410(%r12)
movl $0x3, 0xc(%rsp)
jmp 0x4df30
movq %r15, 0x410(%r12)
movq 0x38(%r15), %rbx
movq 0x40(%r15), %r14
cmpq %r14, %rbx
je 0x4df24
movq (%r12), %rax
movq %r12, %rdi
movq %rbx, %rsi
callq *0x48(%rax)
addq $0xc, %rbx
jmp 0x4def6
movq $0x0, 0x410(%r12)
movl $0x4, 0xc(%rsp)
jmp 0x4df30
movq $0x0, 0x410(%r12)
xorl %ebx, %ebx
xorl %eax, %eax
xorl %r14d, %r14d
xorl %r15d, %r15d
testb %al, %al
movq 0x70(%rsp), %rbp
jne 0x4df96
movq 0xd0(%rbp), %r12
movq 0xd8(%rbp), %r13
cmpq %r13, %r12
je 0x4df96
movq (%rsp), %rbp
movb $0x1, 0x1d0(%rbp)
movl (%r12), %esi
movq %rbp, %rdi
callq 0xb40a
movb $0x0, 0x64(%rax)
addq $0x4, %r12
cmpq %r13, %r12
jne 0x4df61
movq 0x70(%rsp), %rbp
movq 0xd0(%rbp), %rax
cmpq %rax, 0xd8(%rbp)
je 0x4df96
movq %rax, 0xd8(%rbp)
movq (%rsp), %rdi
movq %rbp, %rsi
callq 0x50400
movl 0xc(%rbp), %eax
decl %eax
cmpl $0x5, %eax
ja 0x4e92c
movq %rbp, %r12
movb $0x1, %bpl
leaq 0x69373(%rip), %rcx     # 0xb7330
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x18(%r12), %edx
cmpl %edx, 0xb4(%r12)
jne 0x4e564
movl 0x8(%r12), %esi
movq (%rsp), %rdi
jmp 0x4e587
movq (%rsp), %r15
movq 0x148(%r15), %rax
movq 0x98(%rax), %rbx
movq 0xa0(%rax), %r14
cmpq %r14, %rbx
je 0x4e483
cmpq $0x0, 0x10(%rbx)
je 0x4e908
movq %rbx, %rdi
callq *0x18(%rbx)
addq $0x20, %rbx
jmp 0x4e000
testb %r15b, %r15b
je 0x4e542
testb %bl, %bl
movq (%rsp), %r14
je 0x4e650
movl 0x20(%r12), %esi
cmpl %esi, 0x2c(%r12)
jne 0x4ea2a
movq %r14, %rdi
callq 0x78fe
movq %rax, %rbx
movb 0xb1(%rax), %bpl
movb $0x1, 0xb1(%rax)
movl 0x8(%r12), %esi
movl 0x2c(%r12), %edx
movq %r14, %rdi
callq 0x4ef9e
movb %bpl, 0xb1(%rbx)
jmp 0x4e71b
movl 0x28(%r12), %esi
movq (%rsp), %rbp
movq %rbp, %rdi
callq 0x12aba
movl 0xc(%rax), %eax
movl %eax, 0x7c(%rsp)
movq 0x418(%rbp), %r14
movq %r12, 0x418(%rbp)
cmpb $0x1, 0xb2(%r12)
jne 0x4e0c8
leaq 0x8(%r12), %rdx
leaq 0x6da22(%rip), %rsi     # 0xbbadb
leaq 0x6da22(%rip), %rcx     # 0xbbae2
movq %rbp, %rdi
callq 0x59eda
movq (%rbp), %rax
movq %rbp, %rdi
movq %r12, %rsi
callq *0x158(%rax)
movl 0x28(%r12), %edx
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x345e6
leaq 0x6da05(%rip), %rsi     # 0xbbaf9
leaq 0x6d92a(%rip), %rcx     # 0xbba25
movq %rbp, %rdi
movq %rbx, %rdx
callq 0x5a038
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e121
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x6dabf(%rip), %rsi     # 0xbbbe7
movq %rbp, %rdi
callq 0x5a5fc
incl 0x638(%rbp)
leaq 0x68(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq 0x98(%r12), %r13
movq 0xa0(%r12), %rax
movq %rax, 0x80(%rsp)
cmpq %rax, %r13
je 0x4e3cb
movq %r14, 0x88(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x80(%rsp), %r14
leaq 0x4(%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1fbce
testq %rax, %rax
jne 0x4e3ab
movq %r13, 0x90(%rsp)
movq 0x98(%r12), %r14
movq 0xa0(%r12), %r13
cmpq %r13, %r14
movl $0xd1b71759, %esi       # imm = 0xD1B71759
je 0x4e330
movl 0x4(%r14), %eax
cmpl (%r15), %eax
jne 0x4e323
movl (%r14), %ebx
cmpl $0x5, 0x7c(%rsp)
jne 0x4e22d
movl $0x1, %eax
cmpl $0xa, %ebx
jb 0x4e284
movl $0x4, %eax
movl %ebx, %ecx
cmpl $0x63, %ecx
jbe 0x4e277
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x4e282
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x4e284
movl %ecx, %edx
imulq %rsi, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x4e1fc
addl $-0x3, %eax
jmp 0x4e284
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x4e2b1
movl $0x4, %r12d
movl %ebp, %eax
cmpl $0x63, %eax
jbe 0x4e27c
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x4e2ae
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x4e2b1
movl %eax, %ecx
imulq %rsi, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x4e247
addl $-0x3, %r12d
jmp 0x4e2b1
addl $-0x2, %eax
jmp 0x4e284
addl $-0x2, %r12d
jmp 0x4e2b1
decl %eax
movl %eax, %esi
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
xorl %edx, %edx
callq 0x62f0
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %esi
movl %ebx, %edx
callq 0x21251
jmp 0x4e2e7
decl %r12d
shrl $0x1f, %ebx
leal (%r12,%rbx), %esi
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
movl $0x2d, %edx
callq 0x62f0
addq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x21251
movq (%rsp), %rbp
movq %rbp, %rdi
leaq 0x6d811(%rip), %rsi     # 0xbbb02
leaq 0x10(%rsp), %rdx
leaq 0x66f4f(%rip), %rcx     # 0xb524c
callq 0x5a19a
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4e31e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
movl $0xd1b71759, %esi       # imm = 0xD1B71759
addq $0x8, %r14
cmpq %r13, %r14
jne 0x4e1d0
movq 0x70(%rsp), %r12
movl 0x34(%r12), %eax
cmpl (%r15), %eax
leaq 0x38(%rsp), %rbx
movq 0x90(%rsp), %r13
movq 0x80(%rsp), %r14
jne 0x4e369
movb $0x1, %al
movl %eax, 0x34(%rsp)
movq %rbp, %rdi
leaq 0x6d7a4(%rip), %rsi     # 0xbbb08
callq 0x59dd4
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
leaq 0x10(%rsp), %rdx
callq 0x1fc02
movq %rbp, %rdi
leaq 0x6d85f(%rip), %rsi     # 0xbbbe7
callq 0x5a5fc
incl 0x638(%rbp)
movl 0x8(%r12), %esi
movl (%r15), %edx
movq %rbp, %rdi
callq 0x4ef9e
movq %rbp, %rdi
callq 0x4358a
addq $0x8, %r13
cmpq %r14, %r13
jne 0x4e192
testb $0x1, 0x34(%rsp)
movq 0x88(%rsp), %r14
jne 0x4e5e0
movl 0x18(%r12), %esi
cmpl %esi, 0x34(%r12)
jne 0x4e591
movl 0x8(%r12), %ebx
movq %rbp, %rdi
callq 0x78fe
movq 0x50(%rax), %rcx
movq 0x58(%rax), %rax
cmpq %rax, %rcx
setne %dl
je 0x4e415
cmpl %ebx, 0x4(%rcx)
je 0x4e415
addq $0xc, %rcx
cmpq %rax, %rcx
setne %dl
je 0x4e415
leaq 0xc(%rcx), %rsi
cmpl %ebx, 0x4(%rcx)
movq %rsi, %rcx
jne 0x4e401
testb %dl, %dl
je 0x4e5e0
leaq 0x6d6e4(%rip), %rsi     # 0xbbb08
movq %rbp, %rdi
callq 0x59dd4
leaq 0x6d7b4(%rip), %rsi     # 0xbbbe7
movq %rbp, %rdi
callq 0x5a5fc
incl 0x638(%rbp)
movl 0x8(%r12), %esi
movl 0x18(%r12), %edx
movq %rbp, %rdi
callq 0x4ec3e
leaq 0x7488e(%rip), %rsi     # 0xc2ce8
movq %rbp, %rdi
callq 0x511d4
jmp 0x4e5d8
movq (%rsp), %rdi
leaq 0x5e0(%rdi), %rsi
leaq 0x71670(%rip), %rdx     # 0xbfae9
callq 0x568da
jmp 0x4e71b
cmpb $0x0, 0x5d8(%r15)
je 0x4e499
movq (%r15), %rax
movq %r15, %rdi
callq *0xc0(%rax)
movl 0x24(%r12), %esi
testl %esi, %esi
je 0x4e6dd
movq %r15, %rdi
callq 0x12aba
movq 0x20(%rax), %rcx
cmpq 0x28(%rax), %rcx
je 0x4e4c6
cmpb $0x0, 0x62e(%r15)
je 0x4e667
movl 0x24(%r12), %edx
movq 0x20(%r15), %rcx
movq 0x28(%r15), %rax
subq %rcx, %rax
sarq $0x4, %rax
cmpq %rdx, %rax
jbe 0x4e9b4
movq %rdx, %rax
shlq $0x4, %rax
cmpl $0xd, 0x8(%rcx,%rax)
je 0x4e71b
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x345e6
leaq 0x6d68a(%rip), %rsi     # 0xbbb96
leaq 0x715d6(%rip), %rcx     # 0xbfae9
movq %r15, %rdi
movq %rbx, %rdx
callq 0x59b6c
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e71b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4e71b
movl 0x8(%r12), %esi
movl 0x28(%r12), %edx
movl 0x2c(%r12), %ecx
movl 0x30(%r12), %r8d
movq (%rsp), %rdi
callq 0x4f0e2
jmp 0x4e71b
testb %r14b, %r14b
jne 0x4e71d
movq (%rsp), %rdi
movq 0x80(%rdi), %rax
testb $0x1e, (%rax,%rdx)
je 0x4e71b
movl 0x8(%r12), %esi
callq 0x4ef9e
jmp 0x4e71d
leaq 0x6d570(%rip), %rsi     # 0xbbb08
movq %rbp, %rdi
callq 0x59dd4
leaq 0x6d640(%rip), %rsi     # 0xbbbe7
movq %rbp, %rdi
callq 0x5a5fc
incl 0x638(%rbp)
movl 0x34(%r12), %edx
movq 0x80(%rbp), %rax
testb $0x14, (%rax,%rdx)
jne 0x4e9c6
movl 0x8(%r12), %esi
movq %rbp, %rdi
callq 0x4ef9e
movq %rbp, %rdi
callq 0x4358a
movq %rbp, %rdi
callq 0x4358a
cmpb $0x1, 0xb2(%r12)
jne 0x4e63a
leaq 0x8(%r12), %rdx
leaq 0x6d561(%rip), %rsi     # 0xbbb60
leaq 0x6d560(%rip), %rcx     # 0xbbb66
movq %rbp, %rdi
callq 0x5a2fc
leaq 0x6d5d2(%rip), %rsi     # 0xbbbe7
movq %rbp, %rdi
callq 0x5a5fc
incl 0x638(%rbp)
leaq 0x746be(%rip), %rsi     # 0xc2ce8
movq %rbp, %rdi
callq 0x511d4
movq %rbp, %rdi
callq 0x4358a
movq %r14, 0x418(%rbp)
leaq 0x38(%rsp), %rdi
callq 0xd5b0
jmp 0x4e71b
movl 0x8(%r12), %esi
movl 0x2c(%r12), %edx
movq %r14, %rdi
callq 0x4ef9e
jmp 0x4e71b
movl 0x24(%r12), %esi
movq 0x20(%r15), %rax
movq 0x28(%r15), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
cmpq %rsi, %rdx
jbe 0x4ea49
shlq $0x4, %rsi
cmpl $0xd, 0x8(%rax,%rsi)
je 0x4e6dd
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x6d4d6(%rip), %rsi     # 0xbbb75
leaq 0x6d4e7(%rip), %rdx     # 0xbbb8d
leaq 0x38(%rsp), %rdi
callq 0x7c64
movl 0x24(%r12), %edx
movq (%r15), %rax
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq *0x150(%rax)
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x4e6dd
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x148(%r15), %rax
movl 0x60(%rax), %esi
movq %r15, %rdi
callq 0x78fe
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x152b2
testb %al, %al
je 0x4e70c
cmpl $-0x1, 0xb4(%r12)
je 0x4e71b
leaq 0x6d47b(%rip), %rsi     # 0xbbb8e
movq %r15, %rdi
callq 0x5a45a
xorl %ebp, %ebp
movl 0x18(%r12), %edx
testl %edx, %edx
sete %al
orb %bpl, %al
movq (%rsp), %r14
jne 0x4e7a9
cmpl $0x2, 0x10(%r12)
je 0x4e745
movl 0x8(%r12), %esi
movq %r14, %rdi
callq 0x4ec3e
movl 0x18(%r12), %edx
movq 0x80(%r14), %rax
movb (%rax,%rdx), %al
testb $0x4, %al
jne 0x4e773
testb $0x2, %al
jne 0x4e790
movq %r14, %rdi
movl %edx, %esi
callq 0x78fe
movq %r14, %rdi
movq %rax, %rsi
callq 0x4dc78
jmp 0x4e7a9
cmpl $0x2, 0x10(%r12)
jne 0x4e90d
leaq 0x74562(%rip), %rsi     # 0xc2ce8
movq %r14, %rdi
callq 0x511d4
jmp 0x4e7a9
cmpl $0x2, 0x10(%r12)
jne 0x4e995
movl 0x8(%r12), %esi
movq %r14, %rdi
callq 0x4edb0
cmpl $0x1, 0x10(%r12)
jne 0x4e8dc
cmpl $0x3, 0xc(%rsp)
jne 0x4e89e
movl 0x20(%r12), %edx
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4f510
cmpq $0x0, 0x8(%rbx)
je 0x4e7f8
movl 0x20(%r12), %esi
movq %r14, %rdi
callq 0x78fe
movb $0x1, %cl
movb %cl, 0xb1(%rax)
movb %cl, 0x1d0(%r14)
movl 0x20(%r12), %esi
movq %r14, %rdi
callq 0x78fe
movl 0x28(%rax), %edx
leaq 0x98(%rsp), %rdi
movq %r14, %rsi
callq 0x345e6
leaq 0x6d208(%rip), %rsi     # 0xbba27
leaq 0x6d1ff(%rip), %rcx     # 0xbba25
leaq 0x10(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x5a55f
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x2ba8e
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e860
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e881
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e8a6
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4e8a6
movq %r14, %rdi
callq 0x4358a
movl 0x1c(%r12), %edx
movq 0x80(%r14), %rax
testb $0x2, (%rax,%rdx)
jne 0x4e8cf
movq %r14, %rdi
movl %edx, %esi
callq 0x78fe
movq %r14, %rdi
movq %rax, %rsi
callq 0x4dc78
jmp 0x4e8dc
movl 0x8(%r12), %esi
movq %r14, %rdi
callq 0x4edb0
movq 0xe8(%r12), %rax
cmpq %rax, 0xf0(%r12)
je 0x4e8f6
movq %rax, 0xf0(%r12)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x60f0
leaq 0x6d2aa(%rip), %rdi     # 0xbbbbe
leaq 0x6943d(%rip), %rsi     # 0xb7d58
leaq 0x6d17b(%rip), %rcx     # 0xbba9d
movl $0x2727, %edx           # imm = 0x2727
callq 0x61b0
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6d255(%rip), %rsi     # 0xbbb9e
leaq 0x6d26d(%rip), %rdx     # 0xbbbbd
leaq 0x38(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x38(%rsp), %rsi
movq %r14, %rdi
callq 0x6320
leaq 0xae427(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0xae3ff(%rip), %rsi     # 0xfcd80
movq 0xaf650(%rip), %rdx     # 0xfdfd8
movq %r14, %rdi
callq 0x6470
jmp 0x4ea2a
leaq 0x6d222(%rip), %rdi     # 0xbbbbe
leaq 0x693b5(%rip), %rsi     # 0xb7d58
leaq 0x6d0f3(%rip), %rcx     # 0xbba9d
movl $0x272c, %edx           # imm = 0x272C
callq 0x61b0
leaq 0x6675e(%rip), %rdi     # 0xb5119
movq %rdx, %rsi
movq %rax, %rdx
jmp 0x4ea50
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6d12e(%rip), %rsi     # 0xbbb11
leaq 0x6d175(%rip), %rdx     # 0xbbb5f
leaq 0x10(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x6320
leaq 0xae38d(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0xae365(%rip), %rsi     # 0xfcd80
movq 0xaf5b6(%rip), %rdx     # 0xfdfd8
movq %r14, %rdi
callq 0x6470
leaq 0x6d043(%rip), %rdi     # 0xbba74
leaq 0x69320(%rip), %rsi     # 0xb7d58
leaq 0x6d05e(%rip), %rcx     # 0xbba9d
movl $0x267f, %edx           # imm = 0x267F
callq 0x61b0
leaq 0x666c9(%rip), %rdi     # 0xb5119
xorl %eax, %eax
callq 0x63d0
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
jne 0x4eb45
jmp 0x4eb88
movq %rax, %rbx
jmp 0x4eb88
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ea97
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4ea97
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x4eb7e
movq %r14, %rdi
callq 0x6200
jmp 0x4eb7e
jmp 0x4eb34
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ead4
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4ead4
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x4eb88
movq %r14, %rdi
callq 0x6200
jmp 0x4eb88
jmp 0x4eb34
jmp 0x4eb34
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4eb11
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4eb11
movq %rax, %rbx
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4eb37
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4eb37
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4eb88
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4eb88
jmp 0x4eb5a
jmp 0x4eb5a
jmp 0x4eb5a
movq %rax, %rbx
jmp 0x4eb7e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4eb7e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rdi
callq 0xd5b0
movq %rbx, %rdi
callq 0x64a0