// File: /workspace/github_cpp_makefile_star2_O3/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, %r12
movq %rdi, %r13
callq 0x4ebfa
leaq 0x68(%r12), %rsi
movq %r13, %rdi
callq 0x4fcea
movl 0x20(%r12), %esi
testl %esi, %esi
je 0x4d523
movq %r13, %rdi
callq 0x7870
movq %r13, %rdi
movq %rax, %rsi
callq 0x15288
movl %eax, %ebp
jmp 0x4d525
xorl %ebp, %ebp
movq 0xd0(%r12), %rbx
movq 0xd8(%r12), %r14
cmpq %r14, %rbx
je 0x4d54e
movl (%rbx), %esi
movq %r13, %rdi
callq 0xb3ca
movb $0x1, 0x65(%rax)
addq $0x4, %rbx
jmp 0x4d535
cmpb $0x1, 0x43c(%r13)
movq %r13, (%rsp)
jne 0x4d569
cmpl $0x12c, 0x438(%r13) # imm = 0x12C
jb 0x4d5b1
movq %r13, %rdi
movq %r12, %rsi
movl $0x2, %edx
callq 0x14ef4
testb %al, %al
je 0x4d5b1
movq %r13, %rdi
movq %r12, %rsi
callq 0x4fbe0
movq %r13, %rdi
movq %r12, %rsi
movl $0x2, %edx
callq 0x4f61e
testb %al, %al
je 0x4d792
movl %ebp, 0xc(%rsp)
movb $0x1, %bpl
xorl %ebx, %ebx
movb $0x1, %r14b
jmp 0x4d7eb
movq %r13, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x14ef4
movq %r13, %rdi
movq %r12, %rsi
testb %al, %al
je 0x4d5f0
callq 0x4fbe0
xorl %ebx, %ebx
movq %r13, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x4f61e
testb %al, %al
je 0x4d792
movl %ebp, 0xc(%rsp)
movb $0x1, %bpl
jmp 0x4d7e8
movl $0x1, %edx
callq 0x14ef4
testb %al, %al
je 0x4d62e
movq %r13, %rdi
movq %r12, %rsi
callq 0x4fbe0
movq %r13, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x4f61e
testb %al, %al
je 0x4d792
movl %ebp, 0xc(%rsp)
movb $0x1, %bl
xorl %ebp, %ebp
jmp 0x4d7e8
cmpl $0x3, %ebp
jne 0x4d6bb
movq %r13, %rdi
movq %r12, %rsi
callq 0x4fbe0
movq %r13, %rdi
movq %r12, %rsi
callq 0x4ef52
leaq 0x80(%r12), %rsi
movq %r13, %rdi
callq 0x4fcea
leaq 0x6a1fa(%rip), %rsi     # 0xb785e
movq %r13, %rdi
callq 0x594d4
leaq 0x6d564(%rip), %rsi     # 0xbabd7
movq %r13, %rdi
callq 0x59e02
incl 0x638(%r13)
leaq 0x410(%r13), %r14
movq %r12, 0x410(%r13)
movq 0x38(%r12), %rbx
movq 0x40(%r12), %r15
movl $0x3, %ebp
cmpq %r15, %rbx
je 0x4d78b
movq (%r13), %rax
movq %r13, %rdi
movq %rbx, %rsi
callq *0x48(%rax)
addq $0xc, %rbx
jmp 0x4d69f
cmpl $0x1, 0x10(%r12)
jne 0x4d75b
movq %r13, %rdi
movq %r12, %rsi
callq 0x4fbe0
movq %r13, %rdi
movq %r12, %rsi
callq 0x4ef52
movl 0x20(%r12), %esi
movq %r13, %rdi
callq 0x7870
movb $0x1, 0xb1(%rax)
leaq 0x80(%r12), %rsi
movq %r13, %rdi
callq 0x4fcea
leaq 0x6d353(%rip), %rsi     # 0xbaa5b
movq %r13, %rdi
callq 0x595da
leaq 0x6d4c0(%rip), %rsi     # 0xbabd7
movq %r13, %rdi
callq 0x59e02
incl 0x638(%r13)
leaq 0x410(%r13), %r14
movq %r12, 0x410(%r13)
movq 0x38(%r12), %rbx
movq 0x40(%r12), %r15
movl $0x4, %ebp
cmpq %r15, %rbx
je 0x4d78b
movq (%r13), %rax
movq %r13, %rdi
movq %rbx, %rsi
callq *0x48(%rax)
addq $0xc, %rbx
jmp 0x4d743
leaq 0x410(%r13), %r14
movq %r12, 0x410(%r13)
movq 0x38(%r12), %rbx
movq 0x40(%r12), %r15
cmpq %r15, %rbx
je 0x4d78b
movq (%r13), %rax
movq %r13, %rdi
movq %rbx, %rsi
callq *0x48(%rax)
addq $0xc, %rbx
jmp 0x4d773
movq $0x0, (%r14)
movq 0xd0(%r12), %rbx
movq 0xd8(%r12), %r14
cmpq %r14, %rbx
movl %ebp, 0xc(%rsp)
je 0x4d7e4
movb $0x1, 0x1d0(%r13)
movl (%rbx), %esi
movq %r13, %rdi
callq 0xb3ca
movb $0x0, 0x64(%rax)
addq $0x4, %rbx
cmpq %r14, %rbx
jne 0x4d7b3
movq 0xd0(%r12), %rax
cmpq %rax, 0xd8(%r12)
je 0x4d7e4
movq %rax, 0xd8(%r12)
xorl %ebp, %ebp
xorl %ebx, %ebx
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x4fbe0
movl 0xc(%r12), %eax
decl %eax
cmpl $0x5, %eax
ja 0x4e179
leaq 0x68b12(%rip), %rcx     # 0xb6320
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x18(%r12), %edx
movl 0xb4(%r12), %eax
cmpl %edx, %eax
jne 0x4dd5b
movl 0x8(%r12), %esi
movq (%rsp), %rdi
movl %eax, %edx
jmp 0x4dd7d
movq (%rsp), %r15
movq 0x148(%r15), %rax
movq 0x98(%rax), %rbx
movq 0xa0(%rax), %r14
cmpq %r14, %rbx
je 0x4dc7a
cmpq $0x0, 0x10(%rbx)
je 0x4e155
movq %rbx, %rdi
callq *0x18(%rbx)
addq $0x20, %rbx
jmp 0x4d855
testb %bpl, %bpl
je 0x4dd39
testb %r14b, %r14b
movq (%rsp), %rdi
je 0x4ddd3
movl 0x2c(%r12), %esi
cmpl 0x20(%r12), %esi
jne 0x4e277
callq 0x7870
movq %rax, %rbx
movb 0xb1(%rax), %bpl
movb $0x1, 0xb1(%rax)
movl 0x8(%r12), %esi
movl 0x2c(%r12), %edx
movq (%rsp), %rdi
callq 0x4e7dc
movb %bpl, 0xb1(%rbx)
jmp 0x4df5c
movl 0x28(%r12), %esi
movq (%rsp), %rbp
movq %rbp, %rdi
callq 0x12a72
movl 0xc(%rax), %eax
movl %eax, 0x74(%rsp)
movq 0x418(%rbp), %r14
movq %r12, 0x418(%rbp)
cmpb $0x1, 0xb2(%r12)
jne 0x4d91c
leaq 0x8(%r12), %rdx
leaq 0x6d1be(%rip), %rsi     # 0xbaacb
leaq 0x6d1be(%rip), %rcx     # 0xbaad2
movq %rbp, %rdi
callq 0x596e0
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 0x33f8a
leaq 0x6d1a1(%rip), %rsi     # 0xbaae9
leaq 0x6d0c6(%rip), %rcx     # 0xbaa15
movq %rbp, %rdi
movq %rbx, %rdx
callq 0x5983e
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d975
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x6d25b(%rip), %rsi     # 0xbabd7
movq %rbp, %rdi
callq 0x59e02
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, 0x78(%rsp)
cmpq %rax, %r13
je 0x4dc21
movq %r14, 0x80(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x78(%rsp), %r14
movq %r12, 0x88(%rsp)
leaq 0x4(%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1f4b4
testq %rax, %rax
jne 0x4dc01
movq %r13, 0x90(%rsp)
movq 0x98(%r12), %r14
movq 0xa0(%r12), %r13
cmpq %r13, %r14
movl $0xd1b71759, %esi       # imm = 0xD1B71759
je 0x4db86
movl 0x4(%r14), %eax
cmpl (%r15), %eax
jne 0x4db79
movl (%r14), %ebx
cmpl $0x5, 0x74(%rsp)
jne 0x4da83
movl $0x1, %eax
cmpl $0xa, %ebx
jb 0x4dada
movl $0x4, %eax
movl %ebx, %ecx
cmpl $0x63, %ecx
jbe 0x4dacd
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x4dad8
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x4dada
movl %ecx, %edx
imulq %rsi, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x4da52
addl $-0x3, %eax
jmp 0x4dada
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x4db07
movl $0x4, %r12d
movl %ebp, %eax
cmpl $0x63, %eax
jbe 0x4dad2
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x4db04
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x4db07
movl %eax, %ecx
imulq %rsi, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x4da9d
addl $-0x3, %r12d
jmp 0x4db07
addl $-0x2, %eax
jmp 0x4dada
addl $-0x2, %r12d
jmp 0x4db07
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 0x20b57
jmp 0x4db3d
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 0x20b57
movq (%rsp), %rbp
movq %rbp, %rdi
leaq 0x6cfab(%rip), %rsi     # 0xbaaf2
leaq 0x10(%rsp), %rdx
leaq 0x666f9(%rip), %rcx     # 0xb424c
callq 0x599a0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4db74
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
movl $0xd1b71759, %esi       # imm = 0xD1B71759
addq $0x8, %r14
cmpq %r13, %r14
jne 0x4da26
movq 0x88(%rsp), %r12
movl 0x34(%r12), %eax
cmpl (%r15), %eax
leaq 0x38(%rsp), %rbx
movq 0x90(%rsp), %r13
movq 0x78(%rsp), %r14
jne 0x4dbbf
movb $0x1, %al
movl %eax, 0x34(%rsp)
movq %rbp, %rdi
leaq 0x6cf3e(%rip), %rsi     # 0xbaaf8
callq 0x595da
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
leaq 0x10(%rsp), %rdx
callq 0x1f510
movq %rbp, %rdi
leaq 0x6cff9(%rip), %rsi     # 0xbabd7
callq 0x59e02
incl 0x638(%rbp)
movl 0x8(%r12), %esi
movl (%r15), %edx
movq %rbp, %rdi
callq 0x4e7dc
movq %rbp, %rdi
callq 0x42d5a
addq $0x8, %r13
cmpq %r14, %r13
jne 0x4d9e8
testb $0x1, 0x34(%rsp)
movq 0x80(%rsp), %r14
jne 0x4def1
movl 0x34(%r12), %esi
cmpl 0x18(%r12), %esi
jne 0x4dd87
movl 0x8(%r12), %ebx
movq %rbp, %rdi
callq 0x7870
movq 0x50(%rax), %rcx
movq 0x58(%rax), %rax
cmpq %rax, %rcx
je 0x4def1
cmpl %ebx, 0x4(%rcx)
je 0x4dea4
addq $0xc, %rcx
jmp 0x4dc46
movq (%rsp), %rdi
leaq 0x5e0(%rdi), %rsi
leaq 0x70e81(%rip), %rdx     # 0xbeaf1
callq 0x560e0
jmp 0x4df5c
cmpb $0x0, 0x5d8(%r15)
je 0x4dc90
movq (%r15), %rax
movq %r15, %rdi
callq *0xc0(%rax)
movl 0x24(%r12), %esi
testl %esi, %esi
je 0x4de5d
movq %r15, %rdi
callq 0x12a72
movq 0x20(%rax), %rcx
cmpq 0x28(%rax), %rcx
je 0x4dcbd
cmpb $0x0, 0x62e(%r15)
je 0x4dde7
movl 0x24(%r12), %edx
movq 0x20(%r15), %rcx
movq 0x28(%r15), %rax
subq %rcx, %rax
sarq $0x4, %rax
cmpq %rdx, %rax
jbe 0x4e201
movq %rdx, %rax
shlq $0x4, %rax
cmpl $0xd, 0x8(%rcx,%rax)
je 0x4df5c
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x33f8a
leaq 0x6ce83(%rip), %rsi     # 0xbab86
leaq 0x70de7(%rip), %rcx     # 0xbeaf1
movq %r15, %rdi
movq %rbx, %rdx
callq 0x59372
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4df5c
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4df5c
movl 0x8(%r12), %esi
movl 0x28(%r12), %edx
movl 0x2c(%r12), %ecx
movl 0x30(%r12), %r8d
movq (%rsp), %rdi
callq 0x4e920
jmp 0x4df5c
testb %bl, %bl
jne 0x4dfee
movq (%rsp), %rdi
movq 0x80(%rdi), %rax
testb $0x1e, (%rax,%rdx)
je 0x4df5c
movl 0x8(%r12), %esi
callq 0x4e7dc
jmp 0x4dfee
leaq 0x6cd6a(%rip), %rsi     # 0xbaaf8
movq %rbp, %rdi
callq 0x595da
leaq 0x6ce3a(%rip), %rsi     # 0xbabd7
movq %rbp, %rdi
callq 0x59e02
incl 0x638(%rbp)
movl 0x34(%r12), %edx
movq 0x80(%rbp), %rax
testb $0x14, (%rax,%rdx)
jne 0x4e213
movl 0x8(%r12), %esi
movq %rbp, %rdi
callq 0x4e7dc
jmp 0x4dee9
movl 0x8(%r12), %esi
movl 0x2c(%r12), %edx
callq 0x4e7dc
jmp 0x4df5c
movl 0x24(%r12), %esi
movq 0x20(%r15), %rax
movq 0x28(%r15), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
cmpq %rsi, %rdx
jbe 0x4e296
shlq $0x4, %rsi
cmpl $0xd, 0x8(%rax,%rsi)
je 0x4de5d
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x6cd46(%rip), %rsi     # 0xbab65
leaq 0x6cd57(%rip), %rdx     # 0xbab7d
leaq 0x38(%rsp), %rdi
callq 0x7be0
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 0x4de5d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x148(%r15), %rax
movl 0x60(%rax), %esi
movq %r15, %rdi
callq 0x7870
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x150ec
testb %al, %al
je 0x4de90
cmpl $-0x1, 0xb4(%r12)
je 0x4df5c
leaq 0x6cce7(%rip), %rsi     # 0xbab7e
movq %r15, %rdi
callq 0x59c60
jmp 0x4df5c
leaq 0x6cc4d(%rip), %rsi     # 0xbaaf8
movq %rbp, %rdi
callq 0x595da
leaq 0x6cd1d(%rip), %rsi     # 0xbabd7
movq %rbp, %rdi
callq 0x59e02
incl 0x638(%rbp)
movl 0x8(%r12), %esi
movl 0x18(%r12), %edx
movq %rbp, %rdi
callq 0x4e47c
leaq 0x73dd7(%rip), %rsi     # 0xc1cb8
movq %rbp, %rdi
callq 0x509dc
movq %rbp, %rdi
callq 0x42d5a
movq %rbp, %rdi
callq 0x42d5a
cmpb $0x1, 0xb2(%r12)
jne 0x4df4b
leaq 0x8(%r12), %rdx
leaq 0x6cc40(%rip), %rsi     # 0xbab50
leaq 0x6cc3f(%rip), %rcx     # 0xbab56
movq %rbp, %rdi
callq 0x59b02
leaq 0x6ccb1(%rip), %rsi     # 0xbabd7
movq %rbp, %rdi
callq 0x59e02
incl 0x638(%rbp)
leaq 0x73d7d(%rip), %rsi     # 0xc1cb8
movq %rbp, %rdi
callq 0x509dc
movq %rbp, %rdi
callq 0x42d5a
movq %r14, 0x418(%rbp)
leaq 0x38(%rsp), %rdi
callq 0xd570
movl 0x18(%r12), %edx
testl %edx, %edx
je 0x4dfee
cmpl $0x2, 0x10(%r12)
jne 0x4df77
movq (%rsp), %rbx
jmp 0x4df8d
movl 0x8(%r12), %esi
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x4e47c
movl 0x18(%r12), %edx
movl %edx, %eax
movq 0x80(%rbx), %rcx
movb (%rcx,%rax), %al
testb $0x4, %al
jne 0x4dfb8
testb $0x2, %al
jne 0x4dfd5
movq %rbx, %rdi
movl %edx, %esi
callq 0x7870
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4d4da
jmp 0x4dfee
cmpl $0x2, 0x10(%r12)
jne 0x4e15a
leaq 0x73ced(%rip), %rsi     # 0xc1cb8
movq %rbx, %rdi
callq 0x509dc
jmp 0x4dfee
cmpl $0x2, 0x10(%r12)
jne 0x4e1e2
movl 0x8(%r12), %esi
movq %rbx, %rdi
callq 0x4e5ee
cmpl $0x1, 0x10(%r12)
jne 0x4e129
cmpl $0x3, 0xc(%rsp)
jne 0x4e0e7
movl 0x20(%r12), %edx
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq (%rsp), %r14
movq %r14, %rsi
callq 0x4ed30
cmpq $0x0, 0x8(%rbx)
je 0x4e041
movl 0x20(%r12), %esi
movq %r14, %rdi
callq 0x7870
movb $0x1, %cl
movb %cl, 0xb1(%rax)
movb %cl, 0x1d0(%r14)
movl 0x20(%r12), %esi
movq %r14, %rdi
callq 0x7870
movl 0x28(%rax), %edx
leaq 0x98(%rsp), %rdi
movq %r14, %rsi
callq 0x33f8a
leaq 0x6c9af(%rip), %rsi     # 0xbaa17
leaq 0x6c9a6(%rip), %rcx     # 0xbaa15
leaq 0x10(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x59d65
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x2b486
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e0a9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e0ca
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e0f3
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4e0f3
movq (%rsp), %r14
movq %r14, %rdi
callq 0x42d5a
movl 0x1c(%r12), %edx
movq 0x80(%r14), %rax
testb $0x2, (%rax,%rdx)
jne 0x4e11c
movq %r14, %rdi
movl %edx, %esi
callq 0x7870
movq %r14, %rdi
movq %rax, %rsi
callq 0x4d4da
jmp 0x4e129
movl 0x8(%r12), %esi
movq %r14, %rdi
callq 0x4e5ee
movq 0xe8(%r12), %rax
cmpq %rax, 0xf0(%r12)
je 0x4e143
movq %rax, 0xf0(%r12)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x60f0
leaq 0x6ca4d(%rip), %rdi     # 0xbabae
leaq 0x68be0(%rip), %rsi     # 0xb6d48
leaq 0x6c91e(%rip), %rcx     # 0xbaa8d
movl $0x2727, %edx           # imm = 0x2727
callq 0x61b0
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6c9f8(%rip), %rsi     # 0xbab8e
leaq 0x6ca10(%rip), %rdx     # 0xbabad
leaq 0x38(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x38(%rsp), %rsi
movq %r14, %rdi
callq 0x6320
leaq 0xadc0a(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0xadbe2(%rip), %rsi     # 0xfbdb0
movq 0xaee03(%rip), %rdx     # 0xfcfd8
movq %r14, %rdi
callq 0x6470
jmp 0x4e277
leaq 0x6c9c5(%rip), %rdi     # 0xbabae
leaq 0x68b58(%rip), %rsi     # 0xb6d48
leaq 0x6c896(%rip), %rcx     # 0xbaa8d
movl $0x272c, %edx           # imm = 0x272C
callq 0x61b0
leaq 0x65f11(%rip), %rdi     # 0xb4119
movq %rdx, %rsi
movq %rax, %rdx
jmp 0x4e29d
movl $0x10, %edi
callq 0x6140
movq %rax, %r14
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6c8d1(%rip), %rsi     # 0xbab01
leaq 0x6c918(%rip), %rdx     # 0xbab4f
leaq 0x10(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x6320
leaq 0xadb70(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0xadb48(%rip), %rsi     # 0xfbdb0
movq 0xaed69(%rip), %rdx     # 0xfcfd8
movq %r14, %rdi
callq 0x6470
leaq 0x6c7e6(%rip), %rdi     # 0xbaa64
leaq 0x68ac3(%rip), %rsi     # 0xb6d48
leaq 0x6c801(%rip), %rcx     # 0xbaa8d
movl $0x267f, %edx           # imm = 0x267F
callq 0x61b0
leaq 0x65e7c(%rip), %rdi     # 0xb4119
xorl %eax, %eax
callq 0x63d0
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
jne 0x4e387
jmp 0x4e3ca
movq %rax, %rbx
jmp 0x4e3ca
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4e2dc
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x4e2e9
jmp 0x4e3c0
movq %rax, %rbx
movq %r14, %rdi
callq 0x6200
jmp 0x4e3c0
jmp 0x4e376
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x4e312
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x4e31f
jmp 0x4e3ca
movq %rax, %rbx
movq %r14, %rdi
callq 0x6200
jmp 0x4e3ca
jmp 0x4e376
jmp 0x4e376
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e353
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4e353
movq %rax, %rbx
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e379
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4e379
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e3ca
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x4e3ca
jmp 0x4e39c
jmp 0x4e39c
jmp 0x4e39c
movq %rax, %rbx
jmp 0x4e3c0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x4e3c0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x38(%rsp), %rdi
callq 0xd570
movq %rbx, %rdi
callq 0x64a0