// File: /workspace/github_cpp_makefile_star2_O3/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 $0xd8, %rsp
movl %r8d, %ebp
movq %rcx, 0x98(%rsp)
movq %rsi, %r15
movb 0x110(%rsp), %al
movb %r9b, 0x7(%rsp)
leaq 0x10(%rdi), %rcx
movq %rcx, 0x8(%rsp)
movq %rcx, (%rdi)
movq $0x0, 0x8(%rdi)
movq %rdi, %r13
movb $0x0, 0x10(%rdi)
testb %al, %al
movl %edx, 0x6c(%rsp)
jne 0x3521d
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x34600
leaq 0x18(%rsp), %r14
movq %r13, %rdi
movq %r14, %rsi
callq 0x6310
movq (%r14), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x35219
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x6c(%rsp), %edx
movq %r15, %rdi
movl %edx, %esi
callq 0x130d0
movl %eax, %r14d
movq %r15, %rdi
movl %eax, %esi
callq 0x14b06
movq %rax, %r12
movq %r13, %rdi
movl $0x5b, %esi
xorl %edx, %edx
callq 0x6340
cmpq $-0x1, %rax
setne 0x3f(%rsp)
movq (%r15), %rax
movq %r15, %rdi
movl 0x6c(%rsp), %ebx
movl %ebx, %esi
callq *0x108(%rax)
movl %eax, 0x70(%rsp)
movq %r15, %rdi
movl %ebx, %esi
movl $0xa, %edx
callq 0x12974
movl %eax, 0x40(%rsp)
testl %ebp, %ebp
je 0x35c3f
movl 0x6c(%rsp), %eax
movl %ebp, %ecx
movq %rcx, 0xd0(%rsp)
xorl %ecx, %ecx
imulq $0x148, %rax, %rax      # imm = 0x148
movq %rax, 0xc8(%rsp)
movl $0x0, 0x74(%rsp)
movl $0x0, 0x44(%rsp)
movq 0x98(%rsp), %rbp
movq %rcx, 0xa0(%rsp)
movl (%rbp,%rcx,4), %edx
movl %edx, 0x14(%rsp)
movq 0x20(%r12), %rcx
movq 0x28(%r12), %rax
cmpq %rax, %rcx
je 0x3542d
cmpb $0x1, 0x440(%r15)
jne 0x3531f
testb $0x1, 0x44(%rsp)
jne 0x3531f
subq %rcx, %rax
movl $0x0, 0x44(%rsp)
movl $0x0, 0x74(%rsp)
cmpq $0x5, %rax
jb 0x3531f
movb $0x1, %al
movl %eax, 0x44(%rsp)
movq %r13, %rdi
leaq 0x8d9d8(%rip), %rsi     # 0xc2cec
callq 0x64e0
movb $0x1, %al
movl %eax, 0x74(%rsp)
cmpl $0x0, 0x9c(%r12)
je 0x35c80
movq %r13, 0x18(%rsp)
leaq 0x7(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x14(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r15, 0x30(%rsp)
movq %r15, %rdi
movl 0x6c(%rsp), %esi
callq 0xc7b4
movq %rax, %r14
testq %rax, %rax
je 0x3539e
cmpq $0x0, 0xa0(%rsp)
jne 0x3539e
cmpb $0x0, 0x62d(%r15)
je 0x3539e
movq %r15, %rdi
movq %r14, %rsi
callq 0x13330
testb %al, %al
je 0x3539e
movl 0x8(%r12), %esi
movq %r15, %rdi
movl $0x2, %edx
callq 0x12974
testb %al, %al
je 0x35721
movb 0x440(%r15), %al
andb 0x74(%rsp), %al
cmpb $0x1, %al
jne 0x354cd
movl 0x9c(%r12), %esi
movq %r15, %rdi
callq 0xa3ea
movq %rax, %r14
cmpb $0x1, 0x7(%rsp)
jne 0x35616
movl 0x14(%rsp), %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x358ce
movl $0x4, %eax
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x358c7
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x358cc
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x358ce
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 0x353e8
addl $-0x3, %eax
jmp 0x358ce
cmpl $0xc, 0xc(%r12)
jne 0x354dc
cmpb $0x0, 0x7(%rsp)
jne 0x35451
movq %r15, %rdi
movl %edx, %esi
callq 0x1c036
movl 0x10(%rax), %edx
movl %edx, 0x14(%rsp)
movl %edx, %eax
movq 0x70(%r12), %rcx
subq 0x68(%r12), %rcx
sarq $0x2, %rcx
cmpq %rax, %rcx
jbe 0x35c9f
movq %r15, %rdi
movq %r12, %rsi
leaq 0x78(%rsp), %rcx
callq 0x133ea
testb %al, %al
je 0x356d6
testb $0x1, 0x3f(%rsp)
je 0x357e0
movq %r13, %rdi
leaq 0x853b2(%rip), %rsi     # 0xba849
callq 0x64e0
movl 0x78(%rsp), %edx
movl 0x64(%r12), %ecx
movq (%r15), %rax
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq *0xa0(%rax)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %r13, %rdi
callq 0x60b0
jmp 0x35861
leaq 0x18(%rsp), %rdi
callq 0x41750
jmp 0x35a16
cmpl $0x2, 0x18(%r12)
jb 0x3563e
testb $0x1, 0x70(%rsp)
je 0x3559e
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %r14
movq %r14, %rdi
callq 0xe456
movq (%r15), %rax
movzbl 0x40(%rsp), %r8d
andl $0x1, %r8d
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq *0x118(%rax)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x6310
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x35569
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x3558e
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x6260
movl $0x0, 0x70(%rsp)
movl $0x0, 0x40(%rsp)
movq %r13, %rdi
leaq 0x8d744(%rip), %rsi     # 0xc2cec
callq 0x64e0
cmpb $0x1, 0x7(%rsp)
jne 0x357a5
movl 0x14(%rsp), %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x35b98
movl $0x4, %eax
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x35b91
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x35b96
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x35b98
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 0x355d1
addl $-0x3, %eax
jmp 0x35b98
movl 0x14(%rsp), %edx
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0x34600
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r13, %rdi
callq 0x60b0
jmp 0x35908
cmpl $0x2, 0x14(%r12)
jb 0x35792
movb 0x7(%rsp), %al
cmpb $0x1, %al
jne 0x3565d
testb $0x1, 0x40(%rsp)
je 0x35b19
movq 0x20(%r15), %rcx
movq %rdx, %rsi
shlq $0x4, %rsi
cmpl $0x3, 0x8(%rcx,%rsi)
jne 0x3567a
testb $0x1, 0x40(%rsp)
je 0x35b3e
testb %al, %al
je 0x35a36
leaq 0x18(%rsp), %rdi
leaq 0x8d65e(%rip), %rsi     # 0xc2cec
leaq 0x14(%rsp), %rdx
leaq 0x884a4(%rip), %rcx     # 0xbdb3e
callq 0x55715
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %r13, %rdi
callq 0x60b0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x35b6e
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x35b6e
movl 0x14(%rsp), %edx
movq %r15, %rdi
movl %r14d, %esi
callq 0x14c42
leaq 0x28(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x18(%rsp), %rdi
callq 0xe456
cmpq $0x0, 0x20(%rsp)
je 0x3580a
movq %r13, %rdi
leaq 0x18(%rsp), %rsi
callq 0x6170
jmp 0x35861
movq 0x38(%r15), %rax
movq 0xc8(%rsp), %rcx
cmpl $0x2, 0xa0(%rax,%rcx)
jae 0x35783
movl 0x10(%r14), %eax
cmpl $0x3, %eax
je 0x35a90
cmpl $0x1, %eax
jne 0x35783
movl 0x14(%rsp), %edx
leaq 0x78(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x33f8a
leaq 0x48(%rsp), %rdi
leaq 0x83dc9(%rip), %rsi     # 0xb9532
movq %r14, %rdx
leaq 0x83dc6(%rip), %rcx     # 0xb9539
movq %r13, %rbx
movq %r13, %r8
callq 0x555d9
jmp 0x35ac5
leaq 0x18(%rsp), %rdi
callq 0x41750
jmp 0x35a16
cmpb $0x0, 0x62f(%r15)
jne 0x35c1b
jmp 0x35d07
movl 0x14(%rsp), %edx
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x33f8a
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %r13, %rdi
callq 0x60b0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
jne 0x35be9
jmp 0x35bf6
movl 0x78(%rsp), %edx
movl 0x64(%r12), %ecx
movq (%r15), %rax
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x6310
jmp 0x35861
movq %r15, %rdi
movl 0x6c(%rsp), %esi
callq 0x12c9a
movl 0x14(%rsp), %r8d
movq (%r15), %r9
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r12, %rcx
callq *0x120(%r9)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r13, %rdi
callq 0x60b0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x35861
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x3587d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x14(%rsp), %edx
movl 0x8(%r12), %esi
movq %r15, %rdi
movl $0xa, %ecx
callq 0x1406a
movl %eax, 0x40(%rsp)
movl 0x14(%rsp), %edx
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0x110(%rax)
movl %eax, 0x70(%rsp)
movl 0x14(%rsp), %eax
movq 0x68(%r12), %rcx
movl (%rcx,%rax,4), %esi
movq %r15, %rdi
callq 0xa3ea
jmp 0x35c18
addl $-0x2, %eax
jmp 0x358ce
decl %eax
movl %eax, %esi
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rdi
xorl %edx, %edx
callq 0x62f0
movq 0x48(%rsp), %rdi
movl 0x50(%rsp), %esi
movl %ebp, %edx
callq 0x20b57
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r13, %rdi
callq 0x60b0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x35924
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x20(%r14), %rax
movq 0x28(%r14), %rcx
movq %rcx, %rbp
subq %rax, %rbp
shrq $0x2, %rbp
testl %ebp, %ebp
je 0x359d2
decl %ebp
movq %r13, %rdi
leaq 0x83bfa(%rip), %rsi     # 0xb9544
callq 0x64e0
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x418a0
leaq 0x48(%rsp), %rdi
movq %rbx, %rdx
callq 0x32b66
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r13, %rdi
callq 0x60b0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3599f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x359c1
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x6260
addl $-0x1, %ebp
jb 0x35940
movq 0x20(%r14), %rax
movq 0x28(%r14), %rcx
cmpq %rcx, %rax
je 0x359f7
movq %r13, %rdi
leaq 0x8d294(%rip), %rsi     # 0xc2c75
callq 0x64e0
movq 0x98(%rsp), %rbp
testb $0x1, 0x44(%rsp)
je 0x35a07
jmp 0x35a16
movl $0x0, 0x44(%rsp)
movq 0x98(%rsp), %rbp
movq %r13, %rdi
leaq 0x8812d(%rip), %rsi     # 0xbdb3e
callq 0x64e0
movl 0x9c(%r12), %r14d
movq %r15, %rdi
movl %r14d, %esi
callq 0xa3ea
movq %rax, %r12
movb $0x1, 0x3f(%rsp)
jmp 0x35c1b
movq %r13, %rdi
leaq 0x8d2ac(%rip), %rsi     # 0xc2cec
callq 0x64e0
movl 0x14(%rsp), %edx
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x33f8a
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %r13, %rdi
callq 0x60b0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x35a84
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x880b3(%rip), %rax     # 0xbdb3e
jmp 0x35b31
movl 0x14(%rsp), %edx
leaq 0x78(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x33f8a
leaq 0x48(%rsp), %rdi
leaq 0x83a8c(%rip), %rsi     # 0xb953c
movq %r14, %rdx
leaq 0x83a7f(%rip), %rcx     # 0xb9539
movq %r13, %rbx
movq %r13, %r8
callq 0x55677
movq %rbx, %rdi
leaq 0x48(%rsp), %rsi
callq 0x6310
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x35aee
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x35a16
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x35a16
movq %r13, %rdi
leaq 0x84d26(%rip), %rsi     # 0xba849
callq 0x64e0
movl 0x14(%rsp), %esi
callq 0x32c76
movq %r13, %rdi
movq %rax, %rsi
callq 0x64e0
jmp 0x35b6e
movq %r15, %rdi
movl %edx, %esi
callq 0x1c036
movq %rax, %r14
movq %r13, %rdi
leaq 0x84cf4(%rip), %rsi     # 0xba849
callq 0x64e0
movl 0x10(%r14), %esi
callq 0x32c76
movq %r13, %rdi
movq %rax, %rsi
callq 0x64e0
movl 0x9c(%r12), %r14d
movq %r15, %rdi
movl %r14d, %esi
callq 0xa3ea
movq %rax, %r12
movl $0x0, 0x40(%rsp)
jmp 0x35c1b
addl $-0x2, %eax
jmp 0x35b98
decl %eax
movl %eax, %esi
leaq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x18(%rsp), %rdi
xorl %edx, %edx
callq 0x62f0
movq 0x18(%rsp), %rdi
movl 0x20(%rsp), %esi
movl %ebp, %edx
callq 0x20b57
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %r13, %rdi
callq 0x60b0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
movq 0x98(%rsp), %rbp
je 0x35bf6
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r13, %rdi
leaq 0x87f3e(%rip), %rsi     # 0xbdb3e
callq 0x64e0
movl 0x9c(%r12), %r14d
movq %r15, %rdi
movl %r14d, %esi
callq 0xa3ea
movq %rax, %r12
movq 0xa0(%rsp), %rcx
incq %rcx
cmpq 0xd0(%rsp), %rcx
jne 0x352b7
testb $0x1, 0x44(%rsp)
jne 0x35d6c
movq 0x120(%rsp), %rax
movq 0x118(%rsp), %rcx
testq %rcx, %rcx
je 0x35c5d
movl 0x70(%rsp), %edx
andb $0x1, %dl
movb %dl, (%rcx)
testq %rax, %rax
je 0x35c6b
movl 0x40(%rsp), %ecx
andb $0x1, %cl
movb %cl, (%rax)
movq %r13, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7f06d(%rip), %rdi     # 0xb4cf4
leaq 0x810ba(%rip), %rsi     # 0xb6d48
leaq 0x83823(%rip), %rcx     # 0xb94b8
movl $0x14a6, %edx           # imm = 0x14A6
callq 0x61b0
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
movq %rax, (%rdi)
leaq 0x83888(%rip), %rsi     # 0xb9548
leaq 0x8389f(%rip), %rdx     # 0xb9566
callq 0x7be0
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc60e5(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc60bd(%rip), %rsi     # 0xfbdb0
movq 0xc72de(%rip), %rdx     # 0xfcfd8
movq %r15, %rdi
callq 0x6470
jmp 0x35dcf
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
movq %rax, (%rdi)
leaq 0x8383f(%rip), %rsi     # 0xb9567
leaq 0x83858(%rip), %rdx     # 0xb9587
callq 0x7be0
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc607d(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc6055(%rip), %rsi     # 0xfbdb0
movq 0xc7276(%rip), %rdx     # 0xfcfd8
movq %r15, %rdi
callq 0x6470
jmp 0x35dcf
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
movq %rax, (%rdi)
leaq 0x837fb(%rip), %rsi     # 0xb9588
leaq 0x8388d(%rip), %rdx     # 0xb9621
callq 0x7be0
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xc6018(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xc5ff0(%rip), %rsi     # 0xfbdb0
movq 0xc7211(%rip), %rdx     # 0xfcfd8
movq %r15, %rdi
callq 0x6470
jmp 0x35dd6
jmp 0x35f4a
movq %rax, %r14
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x35f4d
movq 0x88(%rsp), %rsi
jmp 0x35f32
jmp 0x35f4a
jmp 0x35eb7
jmp 0x35f4a
jmp 0x35eb7
jmp 0x35f4a
jmp 0x35ed4
jmp 0x35f02
jmp 0x35ed4
jmp 0x35f02
jmp 0x35f4a
movq %rax, %r14
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x35eba
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x35eba
jmp 0x35f4a
jmp 0x35eb7
jmp 0x35f4a
jmp 0x35f4a
jmp 0x35eb7
jmp 0x35f4a
jmp 0x35eb7
jmp 0x35f4a
movq %rax, %r14
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x35f4d
movq 0xb8(%rsp), %rsi
jmp 0x35f32
jmp 0x35f4a
jmp 0x35f4a
jmp 0x35f4a
jmp 0x35f4a
jmp 0x35f4a
jmp 0x35f4a
jmp 0x35eb7
movq %rax, %r14
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x35f4d
movq 0x28(%rsp), %rsi
jmp 0x35f32
movq %rax, %r14
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x35ef3
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
movq 0x8(%rsp), %rbx
jne 0x35f0a
jmp 0x35f9f
movq %rax, %r14
movq 0x8(%rsp), %rbx
movq %r15, %rdi
callq 0x6200
jmp 0x35f9f
jmp 0x35f1b
jmp 0x35f4a
movq %rax, %r14
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x35f4d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x35f4d
jmp 0x35f4a
jmp 0x35f4a
jmp 0x35f4a
jmp 0x35f4a
jmp 0x35f4a
jmp 0x35f4a
jmp 0x35f4a
movq %rax, %r14
movq 0x8(%rsp), %rbx
jmp 0x35f9f
movq %rax, %r14
jmp 0x35f78
movq %rax, %r14
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x35f78
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x8(%rsp), %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x35f9f
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x6260
movq (%r13), %rdi
cmpq %rbx, %rdi
je 0x35fb3
movq (%rbx), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0