// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::access_chain_internal[abi:cxx11](unsigned int, unsigned int const*, unsigned int, bool, bool, bool*, bool*)
string CompilerGLSL::access_chain_internal(uint32_t base, const uint32_t *indices, uint32_t count,
                                           bool index_is_literal, bool chain_only, bool *need_transpose,
                                           bool *result_is_packed)
{
	string expr;
	if (!chain_only)
		expr = to_enclosed_expression(base);

	// Start traversing type hierarchy at the proper non-pointer types,
	// but keep type_id referencing the original pointer for use below.
	uint32_t type_id = expression_type_id(base);
	const auto *type = &get_non_pointer_type(type_id);

	bool access_chain_is_arrayed = expr.find_first_of('[') != string::npos;
	bool row_major_matrix_needs_conversion = is_non_native_row_major_matrix(base);
	bool is_packed = has_decoration(base, DecorationCPacked);
	bool pending_array_enclose = false;
	bool dimension_flatten = false;

	for (uint32_t i = 0; i < count; i++)
	{
		uint32_t index = indices[i];

		// Arrays
		if (!type->array.empty())
		{
			// If we are flattening multidimensional arrays, only create opening bracket on first
			// array index.
			if (options.flatten_multidimensional_arrays && !pending_array_enclose)
			{
				dimension_flatten = type->array.size() > 1;
				pending_array_enclose = dimension_flatten;
				if (pending_array_enclose)
					expr += "[";
			}

			assert(type->parent_type);

			const auto append_index = [&]() {
				expr += "[";
				if (index_is_literal)
					expr += convert_to_string(index);
				else
					expr += to_expression(index);
				expr += "]";
			};

			auto *var = maybe_get<SPIRVariable>(base);
			if (backend.force_gl_in_out_block && i == 0 && var && is_builtin_variable(*var) &&
			    !has_decoration(type->self, DecorationBlock))
			{
				// This deals with scenarios for tesc/geom where arrays of gl_Position[] are declared.
				// Normally, these variables live in blocks when compiled from GLSL,
				// but HLSL seems to just emit straight arrays here.
				// We must pretend this access goes through gl_in/gl_out arrays
				// to be able to access certain builtins as arrays.
				auto builtin = ir.meta[base].decoration.builtin_type;
				switch (builtin)
				{
				// case BuiltInCullDistance: // These are already arrays, need to figure out rules for these in tess/geom.
				// case BuiltInClipDistance:
				case BuiltInPosition:
				case BuiltInPointSize:
					if (var->storage == StorageClassInput)
						expr = join("gl_in[", to_expression(index), "].", expr);
					else if (var->storage == StorageClassOutput)
						expr = join("gl_out[", to_expression(index), "].", expr);
					else
						append_index();
					break;

				default:
					append_index();
					break;
				}
			}
			else if (options.flatten_multidimensional_arrays && dimension_flatten)
			{
				// If we are flattening multidimensional arrays, do manual stride computation.
				auto &parent_type = get<SPIRType>(type->parent_type);

				if (index_is_literal)
					expr += convert_to_string(index);
				else
					expr += to_enclosed_expression(index);

				for (auto j = uint32_t(parent_type.array.size()); j; j--)
				{
					expr += " * ";
					expr += enclose_expression(to_array_size(parent_type, j - 1));
				}

				if (parent_type.array.empty())
					pending_array_enclose = false;
				else
					expr += " + ";

				if (!pending_array_enclose)
					expr += "]";
			}
			else
			{
				append_index();
			}

			type_id = type->parent_type;
			type = &get<SPIRType>(type_id);

			access_chain_is_arrayed = true;
		}
		// For structs, the index refers to a constant, which indexes into the members.
		// We also check if this member is a builtin, since we then replace the entire expression with the builtin one.
		else if (type->basetype == SPIRType::Struct)
		{
			if (!index_is_literal)
				index = get<SPIRConstant>(index).scalar();

			if (index >= type->member_types.size())
				SPIRV_CROSS_THROW("Member index is out of bounds!");

			BuiltIn builtin;
			if (is_member_builtin(*type, index, &builtin))
			{
				// FIXME: We rely here on OpName on gl_in/gl_out to make this work properly.
				// To make this properly work by omitting all OpName opcodes,
				// we need to infer gl_in or gl_out based on the builtin, and stage.
				if (access_chain_is_arrayed)
				{
					expr += ".";
					expr += builtin_to_glsl(builtin, type->storage);
				}
				else
					expr = builtin_to_glsl(builtin, type->storage);
			}
			else
			{
				// If the member has a qualified name, use it as the entire chain
				string qual_mbr_name = get_member_qualified_name(type_id, index);
				if (!qual_mbr_name.empty())
					expr = qual_mbr_name;
				else
					expr += to_member_reference(maybe_get_backing_variable(base), *type, index);
			}

			is_packed = member_is_packed_type(*type, index);
			row_major_matrix_needs_conversion = member_is_non_native_row_major_matrix(*type, index);
			type = &get<SPIRType>(type->member_types[index]);
		}
		// Matrix -> Vector
		else if (type->columns > 1)
		{
			if (row_major_matrix_needs_conversion)
			{
				expr = convert_row_major_matrix(expr, *type, is_packed);
				row_major_matrix_needs_conversion = false;
				is_packed = false;
			}

			expr += "[";
			if (index_is_literal)
				expr += convert_to_string(index);
			else
				expr += to_expression(index);
			expr += "]";

			type_id = type->parent_type;
			type = &get<SPIRType>(type_id);
		}
		// Vector -> Scalar
		else if (type->vecsize > 1)
		{
			if (index_is_literal && !is_packed)
			{
				expr += ".";
				expr += index_to_swizzle(index);
			}
			else if (ir.ids[index].get_type() == TypeConstant && !is_packed)
			{
				auto &c = get<SPIRConstant>(index);
				expr += ".";
				expr += index_to_swizzle(c.scalar());
			}
			else if (index_is_literal)
			{
				// For packed vectors, we can only access them as an array, not by swizzle.
				expr += join("[", index, "]");
			}
			else
			{
				expr += "[";
				expr += to_expression(index);
				expr += "]";
			}

			is_packed = false;
			type_id = type->parent_type;
			type = &get<SPIRType>(type_id);
		}
		else if (!backend.allow_truncated_access_chain)
			SPIRV_CROSS_THROW("Cannot subdivide a scalar value!");
	}

	if (pending_array_enclose)
	{
		SPIRV_CROSS_THROW("Flattening of multidimensional arrays were enabled, "
		                  "but the access chain was terminated in the middle of a multidimensional array. "
		                  "This is not supported.");
	}

	if (need_transpose)
		*need_transpose = row_major_matrix_needs_conversion;

	if (result_is_packed)
		*result_is_packed = is_packed;

	return expr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r8d, %ebp
movq %rcx, 0xe0(%rsp)
movl %edx, %r13d
movq %rsi, %r15
movb 0x120(%rsp), %al
movb %r9b, 0xf(%rsp)
leaq 0x10(%rdi), %rcx
movq %rcx, 0x20(%rsp)
movq %rcx, (%rdi)
movq $0x0, 0x8(%rdi)
movq %rdi, 0x10(%rsp)
movb $0x0, 0x10(%rdi)
testb %al, %al
jne 0x3590b
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x34d0e
leaq 0x30(%rsp), %r14
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x3590b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r15, %rdi
movl %r13d, %esi
callq 0x13116
movl %eax, %r14d
movq %r15, %rdi
movl %eax, %esi
callq 0x14c94
movq %rax, %r12
movq 0x10(%rsp), %rdi
movl $0x5b, %esi
xorl %edx, %edx
callq 0x6340
cmpq $-0x1, %rax
setne 0x2f(%rsp)
movq (%r15), %rax
movq %r15, %rdi
movl %r13d, %esi
callq *0x108(%rax)
movl %eax, 0x7c(%rsp)
movq %r15, %rdi
movl %r13d, %esi
movl $0xa, %edx
callq 0x1299a
movl %eax, 0x54(%rsp)
testl %ebp, %ebp
je 0x36383
movl %r13d, 0xa4(%rsp)
movl %r13d, %eax
movl %ebp, %ecx
movq %rcx, 0xd8(%rsp)
xorl %r13d, %r13d
imulq $0x148, %rax, %rax      # imm = 0x148
movq %rax, 0xd0(%rsp)
movq $0x0, 0xa8(%rsp)
movl $0x0, 0x78(%rsp)
movq 0x10(%rsp), %rbx
movb 0x2f(%rsp), %bpl
movq 0xe0(%rsp), %rax
movl (%rax,%r13,4), %esi
movl %esi, 0x1c(%rsp)
movq 0x20(%r12), %rax
movq 0x28(%r12), %rcx
cmpq %rcx, %rax
je 0x35a1f
cmpb $0x1, 0x440(%r15)
jne 0x35d00
testb $0x1, 0x78(%rsp)
jne 0x35d00
subq %rax, %rcx
cmpq $0x5, %rcx
setae %bpl
movl %ebp, 0x78(%rsp)
jb 0x35cf6
movq %rbx, %rdi
leaq 0x8e311(%rip), %rsi     # 0xc3d1c
callq 0x64e0
movl %ebp, %eax
movq %rax, 0xa8(%rsp)
jmp 0x35d00
cmpl $0xc, 0xc(%r12)
jne 0x35ac4
cmpb $0x0, 0xf(%rsp)
jne 0x35a41
movq %r15, %rdi
callq 0x1c66e
movl 0x10(%rax), %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %edx
movq 0x70(%r12), %rax
subq 0x68(%r12), %rax
sarq $0x2, %rax
cmpq %rdx, %rax
jbe 0x363f2
movq %r15, %rdi
movq %r12, %rsi
leaq 0x80(%rsp), %rcx
callq 0x13472
testb %al, %al
je 0x35cab
testb $0x1, %bpl
je 0x35f22
movq %rbx, %rdi
leaq 0x85dce(%rip), %rsi     # 0xbb859
callq 0x64e0
movl 0x80(%rsp), %edx
movl 0x64(%r12), %ecx
movq (%r15), %rax
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq *0xa0(%rax)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
jmp 0x35fcf
cmpl $0x2, 0x18(%r12)
jb 0x35c13
testb $0x1, 0x7c(%rsp)
je 0x35b93
movq %rbx, %rcx
movl %ebp, %ebx
leaq 0xc0(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq (%rcx), %rsi
movq 0x8(%rcx), %rdx
addq %rsi, %rdx
leaq 0xb0(%rsp), %rbp
movq %rbp, %rdi
callq 0xe480
movq (%r15), %rax
movzbl 0x54(%rsp), %r8d
andl $0x1, %r8d
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %r12, %rcx
callq *0x118(%rax)
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x6310
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
movl %ebx, %ebp
je 0x35b59
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x35b7e
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x6260
movl $0x0, 0x7c(%rsp)
movl $0x0, 0x54(%rsp)
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
leaq 0x8e17f(%rip), %rsi     # 0xc3d1c
callq 0x64e0
cmpb $0x1, 0xf(%rsp)
jne 0x35ee7
movl %ebp, %r14d
movl 0x1c(%rsp), %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
leaq 0x30(%rsp), %rdi
jb 0x362ee
movl $0x4, %eax
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x362e7
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x362ec
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x362ee
movl %ecx, %edx
movl $0xd1b71759, %esi       # imm = 0xD1B71759
imulq %rsi, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x35bce
addl $-0x3, %eax
jmp 0x362ee
cmpl $0x2, 0x14(%r12)
jb 0x35ed4
movb 0xf(%rsp), %al
cmpb $0x1, %al
jne 0x35c32
testb $0x1, 0x54(%rsp)
je 0x3611c
movq 0x20(%r15), %rcx
movq %rsi, %rdx
shlq $0x4, %rdx
cmpl $0x3, 0x8(%rcx,%rdx)
jne 0x35c4f
testb $0x1, 0x54(%rsp)
je 0x36146
testb %al, %al
je 0x36035
leaq 0x30(%rsp), %rdi
leaq 0x8e0b9(%rip), %rsi     # 0xc3d1c
leaq 0x1c(%rsp), %rdx
leaq 0x88ec7(%rip), %rcx     # 0xbeb36
callq 0x55f0f
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x36174
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x36174
movl 0x1c(%rsp), %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x14dd0
leaq 0x40(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0xe480
cmpq $0x0, 0x38(%rsp)
je 0x35f75
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
callq 0x6170
jmp 0x35fcf
movl %ebp, %eax
movq %rax, 0xa8(%rsp)
cmpl $0x0, 0x9c(%r12)
je 0x363d3
movq %rbx, 0x30(%rsp)
leaq 0xf(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x1c(%rsp), %rax
movq %rax, 0x40(%rsp)
movq %r15, 0x48(%rsp)
movq %r15, %rdi
movl 0xa4(%rsp), %esi
callq 0xc7f4
movq %rax, %r14
testq %rax, %rax
je 0x35d7c
testq %r13, %r13
jne 0x35d7c
cmpb $0x0, 0x62d(%r15)
je 0x35d7c
movq %r15, %rdi
movq %r14, %rsi
callq 0x133a2
testb %al, %al
je 0x35d7c
movl 0x8(%r12), %esi
movq %r15, %rdi
movl $0x2, %edx
callq 0x1299a
testb %al, %al
je 0x35e38
cmpb $0x1, 0x440(%r15)
jne 0x35e10
testb $0x1, 0xa8(%rsp)
je 0x35e10
movl 0x9c(%r12), %esi
movq %r15, %rdi
callq 0xa426
movq %rax, %r14
cmpb $0x1, 0xf(%rsp)
jne 0x35e9d
movl 0x1c(%rsp), %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x36199
movl $0x4, %eax
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x36141
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x36197
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x36199
movl %ecx, %edx
movl $0xd1b71759, %esi       # imm = 0xD1B71759
imulq %rsi, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x35dcb
addl $-0x3, %eax
jmp 0x36199
leaq 0x30(%rsp), %rdi
callq 0x41f7e
movl 0x9c(%r12), %r14d
movq %r15, %rdi
movl %r14d, %esi
callq 0xa426
movq %rax, %r12
movb $0x1, %bpl
jmp 0x3636c
movq 0x38(%r15), %rax
movq 0xd0(%rsp), %rcx
cmpl $0x2, 0xa0(%rax,%rcx)
jae 0x35ec5
movl 0x10(%r14), %eax
cmpl $0x3, %eax
je 0x3608f
cmpl $0x1, %eax
jne 0x35ec5
movl 0x1c(%rsp), %edx
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x345e6
leaq 0x58(%rsp), %rbp
movq %rbp, %rdi
leaq 0x846bc(%rip), %rsi     # 0xba542
movq %r14, %rdx
leaq 0x846b9(%rip), %rcx     # 0xba549
movq %rbx, %r8
callq 0x55dd3
jmp 0x360c7
movl 0x1c(%rsp), %edx
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x34d0e
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
jmp 0x361d5
leaq 0x30(%rsp), %rdi
callq 0x41f7e
jmp 0x35e1a
cmpb $0x0, 0x62f(%r15)
jne 0x3636c
jmp 0x364c1
movl 0x1c(%rsp), %edx
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x345e6
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
jne 0x3633a
jmp 0x36347
movb %bpl, 0x2f(%rsp)
movl 0x80(%rsp), %edx
movl 0x64(%r12), %ecx
movq (%r15), %rax
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x6310
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x35f6e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movb 0x2f(%rsp), %bpl
jmp 0x35feb
movq %r15, %rdi
movl 0xa4(%rsp), %esi
callq 0x12cda
movl 0x1c(%rsp), %r8d
movq (%r15), %r9
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r12, %rcx
callq *0x120(%r9)
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x35fcf
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x35feb
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x1c(%rsp), %edx
movl 0x8(%r12), %esi
movq %r15, %rdi
movl $0xa, %ecx
callq 0x14222
movl %eax, 0x54(%rsp)
movl 0x1c(%rsp), %edx
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0x110(%rax)
movl %eax, 0x7c(%rsp)
movl 0x1c(%rsp), %eax
movq 0x68(%r12), %rcx
movl (%rcx,%rax,4), %esi
movq %r15, %rdi
callq 0xa426
jmp 0x36369
movq %rbx, %rdi
leaq 0x8dcdd(%rip), %rsi     # 0xc3d1c
callq 0x64e0
movl 0x1c(%rsp), %edx
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x345e6
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x36083
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x88aac(%rip), %rax     # 0xbeb36
jmp 0x36134
movl 0x1c(%rsp), %edx
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x345e6
leaq 0x58(%rsp), %rbp
movq %rbp, %rdi
leaq 0x84497(%rip), %rsi     # 0xba54c
movq %r14, %rdx
leaq 0x8448a(%rip), %rcx     # 0xba549
movq %rbx, %r8
callq 0x55e71
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x6310
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x360ee
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x35e1a
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x35e1a
movq %rbx, %rdi
leaq 0x85733(%rip), %rsi     # 0xbb859
callq 0x64e0
movl 0x1c(%rsp), %esi
callq 0x3336a
movq %rbx, %rdi
movq %rax, %rsi
callq 0x64e0
jmp 0x36174
addl $-0x2, %eax
jmp 0x36199
movq %r15, %rdi
callq 0x1c66e
movq %rax, %r14
movq %rbx, %rdi
leaq 0x856fe(%rip), %rsi     # 0xbb859
callq 0x64e0
movl 0x10(%r14), %esi
callq 0x3336a
movq %rbx, %rdi
movq %rax, %rsi
callq 0x64e0
movl 0x9c(%r12), %r14d
movq %r15, %rdi
movl %r14d, %esi
callq 0xa426
movq %rax, %r12
movl $0x0, 0x54(%rsp)
jmp 0x3636c
decl %eax
movl %eax, %esi
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x58(%rsp), %rdi
xorl %edx, %edx
callq 0x62f0
movq 0x58(%rsp), %rdi
movl 0x60(%rsp), %esi
movl %ebp, %edx
callq 0x21251
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x10(%rsp), %rdi
callq 0x60b0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x361f1
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x28(%r14), %rbp
subq 0x20(%r14), %rbp
shrq $0x2, %rbp
testl %ebp, %ebp
je 0x3629b
decl %ebp
movq 0x10(%rsp), %rdi
leaq 0x84341(%rip), %rsi     # 0xba554
callq 0x64e0
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x420ce
leaq 0x58(%rsp), %rdi
movq %rbx, %rdx
callq 0x33218
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x10(%rsp), %rdi
callq 0x60b0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x3626d
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x36292
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x6260
addl $-0x1, %ebp
jb 0x36207
movq 0x20(%r14), %rax
cmpq 0x28(%r14), %rax
je 0x362bb
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
leaq 0x8d9f1(%rip), %rsi     # 0xc3ca5
callq 0x64e0
jmp 0x362c8
movl $0x0, 0x78(%rsp)
movq 0x10(%rsp), %rbx
testb $0x1, 0x78(%rsp)
jne 0x35e1a
movq %rbx, %rdi
leaq 0x88859(%rip), %rsi     # 0xbeb36
callq 0x64e0
jmp 0x35e1a
addl $-0x2, %eax
jmp 0x362ee
decl %eax
movl %eax, %esi
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
xorl %edx, %edx
callq 0x62f0
movq 0x30(%rsp), %rdi
movl 0x38(%rsp), %esi
movl %ebp, %edx
callq 0x21251
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x60b0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
movl %r14d, %ebp
je 0x36347
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rdi
leaq 0x887e5(%rip), %rsi     # 0xbeb36
callq 0x64e0
movl 0x9c(%r12), %r14d
movq %r15, %rdi
movl %r14d, %esi
callq 0xa426
movq %rax, %r12
incq %r13
cmpq 0xd8(%rsp), %r13
jne 0x359b4
movl 0x78(%rsp), %eax
jmp 0x3638a
xorl %eax, %eax
movq 0x10(%rsp), %rbx
testb $0x1, %al
jne 0x3645a
movq 0x130(%rsp), %rax
movq 0x128(%rsp), %rcx
testq %rcx, %rcx
je 0x363b0
movl 0x7c(%rsp), %edx
andb $0x1, %dl
movb %dl, (%rcx)
testq %rax, %rax
je 0x363be
movl 0x54(%rsp), %ecx
andb $0x1, %cl
movb %cl, (%rax)
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7f91d(%rip), %rdi     # 0xb5cf7
leaq 0x81977(%rip), %rsi     # 0xb7d58
leaq 0x840e0(%rip), %rcx     # 0xba4c8
movl $0x14a6, %edx           # imm = 0x14A6
callq 0x61b0
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
movq %rax, (%rdi)
leaq 0x84145(%rip), %rsi     # 0xba558
leaq 0x8415c(%rip), %rdx     # 0xba576
callq 0x7c64
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc6962(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc693a(%rip), %rsi     # 0xfcd80
movq 0xc7b8b(%rip), %rdx     # 0xfdfd8
movq %r15, %rdi
callq 0x6470
jmp 0x36524
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x84120(%rip), %rsi     # 0xba598
leaq 0x841b2(%rip), %rdx     # 0xba631
leaq 0x30(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc68f8(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc68d0(%rip), %rsi     # 0xfcd80
movq 0xc7b21(%rip), %rdx     # 0xfdfd8
movq %r15, %rdi
callq 0x6470
jmp 0x36524
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
movq %rax, (%rdi)
leaq 0x84095(%rip), %rsi     # 0xba577
leaq 0x840ae(%rip), %rdx     # 0xba597
callq 0x7c64
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc6893(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc686b(%rip), %rsi     # 0xfcd80
movq 0xc7abc(%rip), %rdx     # 0xfdfd8
movq %r15, %rdi
callq 0x6470
jmp 0x366a1
jmp 0x3669c
jmp 0x366a1
jmp 0x3669c
jmp 0x36632
jmp 0x3669c
jmp 0x36632
jmp 0x3669c
jmp 0x36652
jmp 0x36673
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
jne 0x36664
jmp 0x36679
jmp 0x36673
jmp 0x3669c
movq %rax, %r14
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x36635
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x36635
jmp 0x36690
jmp 0x36632
jmp 0x3669c
jmp 0x36690
jmp 0x36632
jmp 0x3669c
jmp 0x36632
jmp 0x3669c
movq %rax, %r14
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x366ea
movq 0xc0(%rsp), %rsi
jmp 0x366e2
jmp 0x3669c
jmp 0x3669c
jmp 0x3669c
jmp 0x3669c
jmp 0x3669c
jmp 0x36690
jmp 0x36632
jmp 0x36610
jmp 0x3669c
movq %rax, %r14
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x366ea
movq 0x68(%rsp), %rsi
jmp 0x366e2
jmp 0x3669c
movq %rax, %r14
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x366ea
movq 0x40(%rsp), %rsi
jmp 0x366e2
movq %rax, %r14
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x36679
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x36679
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x366ea
movq %r15, %rdi
callq 0x6200
jmp 0x366ea
jmp 0x3669c
jmp 0x36690
jmp 0x36690
jmp 0x36690
movq %rax, %r14
movq 0x20(%rsp), %rax
jmp 0x366f4
jmp 0x3669c
movq %rax, %r14
jmp 0x366ea
movq %rax, %r14
jmp 0x366c5
movq %rax, %r14
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x366c5
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x366ea
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rbx
movq (%rbx), %rdi
cmpq %rax, %rdi
je 0x36707
movq (%rax), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0