// File: /workspace/github_cpp_makefile_star2_O1/rossy[P]crossc/SPIRV-Cross/spirv_glsl.cpp
// Function: spirv_cross::CompilerGLSL::to_function_args[abi:cxx11](unsigned int, spirv_cross::SPIRType const&, bool, bool, bool, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, bool*)
string CompilerGLSL::to_function_args(uint32_t img, const SPIRType &imgtype, bool is_fetch, bool is_gather,
                                      bool is_proj, uint32_t coord, uint32_t coord_components, uint32_t dref,
                                      uint32_t grad_x, uint32_t grad_y, uint32_t lod, uint32_t coffset, uint32_t offset,
                                      uint32_t bias, uint32_t comp, uint32_t sample, bool *p_forward)
{
	string farg_str;
	if (is_fetch)
		farg_str = convert_separate_image_to_expression(img);
	else
		farg_str = to_expression(img);

	bool swizz_func = backend.swizzle_is_function;
	auto swizzle = [swizz_func](uint32_t comps, uint32_t in_comps) -> const char * {
		if (comps == in_comps)
			return "";

		switch (comps)
		{
		case 1:
			return ".x";
		case 2:
			return swizz_func ? ".xy()" : ".xy";
		case 3:
			return swizz_func ? ".xyz()" : ".xyz";
		default:
			return "";
		}
	};

	bool forward = should_forward(coord);

	// The IR can give us more components than we need, so chop them off as needed.
	auto swizzle_expr = swizzle(coord_components, expression_type(coord).vecsize);
	// Only enclose the UV expression if needed.
	auto coord_expr = (*swizzle_expr == '\0') ? to_expression(coord) : (to_enclosed_expression(coord) + swizzle_expr);

	// texelFetch only takes int, not uint.
	auto &coord_type = expression_type(coord);
	if (coord_type.basetype == SPIRType::UInt)
	{
		auto expected_type = coord_type;
		expected_type.basetype = SPIRType::Int;
		coord_expr = bitcast_expression(expected_type, coord_type.basetype, coord_expr);
	}

	// textureLod on sampler2DArrayShadow and samplerCubeShadow does not exist in GLSL for some reason.
	// To emulate this, we will have to use textureGrad with a constant gradient of 0.
	// The workaround will assert that the LOD is in fact constant 0, or we cannot emit correct code.
	// This happens for HLSL SampleCmpLevelZero on Texture2DArray and TextureCube.
	bool workaround_lod_array_shadow_as_grad =
	    ((imgtype.image.arrayed && imgtype.image.dim == Dim2D) || imgtype.image.dim == DimCube) &&
	    image_is_comparison(imgtype, img) && lod;

	if (dref)
	{
		forward = forward && should_forward(dref);

		// SPIR-V splits dref and coordinate.
		if (is_gather || coord_components == 4) // GLSL also splits the arguments in two. Same for textureGather.
		{
			farg_str += ", ";
			farg_str += to_expression(coord);
			farg_str += ", ";
			farg_str += to_expression(dref);
		}
		else if (is_proj)
		{
			// Have to reshuffle so we get vec4(coord, dref, proj), special case.
			// Other shading languages splits up the arguments for coord and compare value like SPIR-V.
			// The coordinate type for textureProj shadow is always vec4 even for sampler1DShadow.
			farg_str += ", vec4(";

			if (imgtype.image.dim == Dim1D)
			{
				// Could reuse coord_expr, but we will mess up the temporary usage checking.
				farg_str += to_enclosed_expression(coord) + ".x";
				farg_str += ", ";
				farg_str += "0.0, ";
				farg_str += to_expression(dref);
				farg_str += ", ";
				farg_str += to_enclosed_expression(coord) + ".y)";
			}
			else if (imgtype.image.dim == Dim2D)
			{
				// Could reuse coord_expr, but we will mess up the temporary usage checking.
				farg_str += to_enclosed_expression(coord) + (swizz_func ? ".xy()" : ".xy");
				farg_str += ", ";
				farg_str += to_expression(dref);
				farg_str += ", ";
				farg_str += to_enclosed_expression(coord) + ".z)";
			}
			else
				SPIRV_CROSS_THROW("Invalid type for textureProj with shadow.");
		}
		else
		{
			// Create a composite which merges coord/dref into a single vector.
			auto type = expression_type(coord);
			type.vecsize = coord_components + 1;
			farg_str += ", ";
			farg_str += type_to_glsl_constructor(type);
			farg_str += "(";
			farg_str += coord_expr;
			farg_str += ", ";
			farg_str += to_expression(dref);
			farg_str += ")";
		}
	}
	else
	{
		farg_str += ", ";
		farg_str += coord_expr;
	}

	if (grad_x || grad_y)
	{
		forward = forward && should_forward(grad_x);
		forward = forward && should_forward(grad_y);
		farg_str += ", ";
		farg_str += to_expression(grad_x);
		farg_str += ", ";
		farg_str += to_expression(grad_y);
	}

	if (lod)
	{
		if (workaround_lod_array_shadow_as_grad)
		{
			// Implement textureGrad() instead. LOD == 0.0 is implemented as gradient of 0.0.
			// Implementing this as plain texture() is not safe on some implementations.
			if (imgtype.image.dim == Dim2D)
				farg_str += ", vec2(0.0), vec2(0.0)";
			else if (imgtype.image.dim == DimCube)
				farg_str += ", vec3(0.0), vec3(0.0)";
		}
		else
		{
			if (check_explicit_lod_allowed(lod))
			{
				forward = forward && should_forward(lod);
				farg_str += ", ";
				farg_str += to_expression(lod);
			}
		}
	}
	else if (is_fetch && imgtype.image.dim != DimBuffer && !imgtype.image.ms)
	{
		// Lod argument is optional in OpImageFetch, but we require a LOD value, pick 0 as the default.
		farg_str += ", 0";
	}

	if (coffset)
	{
		forward = forward && should_forward(coffset);
		farg_str += ", ";
		farg_str += to_expression(coffset);
	}
	else if (offset)
	{
		forward = forward && should_forward(offset);
		farg_str += ", ";
		farg_str += to_expression(offset);
	}

	if (bias)
	{
		forward = forward && should_forward(bias);
		farg_str += ", ";
		farg_str += to_expression(bias);
	}

	if (comp)
	{
		forward = forward && should_forward(comp);
		farg_str += ", ";
		farg_str += to_expression(comp);
	}

	if (sample)
	{
		farg_str += ", ";
		farg_str += to_expression(sample);
	}

	*p_forward = forward;

	return farg_str;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movl %r9d, %r15d
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x130(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl %r8d, 0x108(%rsp)
testl %r8d, %r8d
movl %edx, 0x10c(%rsp)
je 0x3d439
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x3d1e8
jmp 0x3d448
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x345e6
leaq 0x28(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6310
movq (%r13), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3d473
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x198(%rsp), %ebp
movb 0x620(%r14), %al
movb %al, 0x7(%rsp)
movq %r14, %rdi
movl %ebp, %esi
callq 0x39e96
movl %eax, (%rsp)
movq %r14, %rdi
movl %ebp, %esi
callq 0x12aba
movl 0x1a0(%rsp), %ebp
leaq 0x78405(%rip), %r13     # 0xb58af
cmpl %ebp, 0x14(%rax)
movq %r12, 0x100(%rsp)
je 0x3d4f6
cmpl $0x1, %ebp
je 0x3d4ef
cmpl $0x3, %ebp
je 0x3d4d6
cmpl $0x2, %ebp
jne 0x3d4f6
leaq 0x7c192(%rip), %rax     # 0xb965f
leaq 0x7c191(%rip), %r13     # 0xb9665
jmp 0x3d4e4
leaq 0x7e85c(%rip), %rax     # 0xbbd39
leaq 0x7e85c(%rip), %r13     # 0xbbd40
cmpb $0x0, 0x7(%rsp)
cmovneq %rax, %r13
jmp 0x3d4f6
leaq 0x7d896(%rip), %r13     # 0xbad8c
movb (%r13), %r12b
testb %r12b, %r12b
je 0x3d556
leaq 0x138(%rsp), %rdi
movq %r14, %rsi
movl 0x198(%rsp), %edx
callq 0x34d0e
leaq 0x138(%rsp), %rdi
movq %r13, %rsi
callq 0x64e0
leaq 0x120(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x3d56f
movq %rsi, 0x110(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x120(%rsp)
jmp 0x3d575
leaq 0x110(%rsp), %rdi
movq %r14, %rsi
movl 0x198(%rsp), %edx
callq 0x345e6
jmp 0x3d590
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x118(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
testb %r12b, %r12b
movq 0x100(%rsp), %r12
je 0x3d5be
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d5be
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
movl 0x198(%rsp), %esi
callq 0x12aba
movq %rax, %r13
cmpl $0x5, 0xc(%rax)
jne 0x3d6c4
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
callq 0x1f216
leaq 0x28(%rsp), %rdx
movl $0x4, 0xc(%rdx)
movl 0xc(%r13), %ecx
leaq 0x8(%rsp), %rdi
leaq 0x110(%rsp), %r8
movq %r14, %rsi
callq 0x3e3d8
leaq 0x110(%rsp), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
callq 0x6310
movq (%r13), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3d63c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xbfd6d(%rip), %rax     # 0xfd3b0
addq $0x10, %rax
leaq 0xc8(%rsp), %r13
movq %rax, -0xa0(%r13)
movq %r13, %rdi
callq 0xdeb6
movq -0x38(%r13), %rdi
testq %rdi, %rdi
je 0x3d677
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x3d6ad
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x60(%rsp)
movl %eax, 0x68(%rsp)
movq %rax, 0x70(%rsp)
movl %eax, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x3d6c4
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movl 0x84(%r12), %eax
cmpl $0x1, %eax
sete %cl
andb 0x89(%r12), %cl
cmpl $0x3, %eax
sete %al
orb %cl, %al
cmpb $0x1, %al
jne 0x3d709
movq %r14, %rdi
movq %r12, %rsi
movl 0x10c(%rsp), %edx
callq 0x1b812
cmpl $0x0, 0x1c0(%rsp)
setne %r13b
andb %al, %r13b
jmp 0x3d70c
xorl %r13d, %r13d
movl 0x1a8(%rsp), %r12d
testl %r12d, %r12d
je 0x3d72f
cmpb $0x0, (%rsp)
je 0x3d75b
movq %r14, %rdi
movl %r12d, %esi
callq 0x39e96
movl %eax, (%rsp)
jmp 0x3d762
leaq 0x7d985(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
jmp 0x3dd1f
movl $0x0, (%rsp)
cmpl $0x4, %ebp
setne %al
xorb $0x1, %r15b
testb %r15b, %al
jne 0x3d80e
leaq 0x7d93f(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl 0x198(%rsp), %edx
callq 0x345e6
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
leaq 0x38(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x3d7c5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7d8ef(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x345e6
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3dd1f
movq 0x38(%rsp), %rsi
jmp 0x3dd17
cmpb $0x0, 0x190(%rsp)
je 0x3d89d
leaq 0x7be2a(%rip), %rsi     # 0xb964d
movq %rbx, %rdi
callq 0x64e0
movq 0x100(%rsp), %rax
movl 0x84(%rax), %eax
cmpl $0x1, %eax
je 0x3da17
testl %eax, %eax
movl 0x198(%rsp), %edx
jne 0x3e159
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x34d0e
leaq 0x7d527(%rip), %rsi     # 0xbad8c
leaq 0x8(%rsp), %rdi
callq 0x64e0
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3db7c
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x3db83
movq %r14, %rdi
movl 0x198(%rsp), %esi
callq 0x12aba
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x1f216
incl %ebp
movl %ebp, 0x3c(%rsp)
leaq 0x7d7f5(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %r14, %rsi
callq 0x35152
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
leaq 0x18(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x3d90d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x8638d(%rip), %rsi     # 0xc3ca1
movq %rbx, %rdi
callq 0x64e0
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
leaq 0x7d780(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x345e6
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3d97c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7e0a2(%rip), %rsi     # 0xbba25
movq %rbx, %rdi
callq 0x64e0
leaq 0xbfa1e(%rip), %rax     # 0xfd3b0
addq $0x10, %rax
leaq 0xc8(%rsp), %r15
movq %rax, -0xa0(%r15)
movq %r15, %rdi
callq 0xdeb6
movq -0x38(%r15), %rdi
testq %rdi, %rdi
je 0x3d9c6
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x3d9fc
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
xorl %eax, %eax
movq %rax, 0x60(%rsp)
movl %eax, 0x68(%rsp)
movq %rax, 0x70(%rsp)
movl %eax, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x3dd1f
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
jmp 0x3dd1a
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl 0x198(%rsp), %edx
callq 0x34d0e
leaq 0x7bc2d(%rip), %rax     # 0xb965f
leaq 0x7bc2c(%rip), %rsi     # 0xb9665
cmpb $0x0, 0x7(%rsp)
cmovneq %rax, %rsi
leaq 0x8(%rsp), %rdi
callq 0x64e0
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3da73
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x3da7a
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3dabb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x18(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x3dad6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7d5de(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x345e6
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3db1e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7d596(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl 0x198(%rsp), %edx
callq 0x34d0e
leaq 0x7bb21(%rip), %rsi     # 0xb9669
leaq 0x8(%rsp), %rdi
callq 0x64e0
movq %r15, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3dc8d
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x3dc94
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3dbc4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x18(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x3dbdf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7d4d5(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x7ba60(%rip), %rsi     # 0xb9655
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x345e6
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3dc36
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7d47e(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl 0x198(%rsp), %edx
callq 0x34d0e
leaq 0x7b9fb(%rip), %rsi     # 0xb965b
leaq 0x8(%rsp), %rdi
callq 0x64e0
movq %r15, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3dcc0
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x3dcc7
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
jmp 0x3dcf1
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3dd08
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3dd1f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x1b8(%rsp), %r15d
movl 0x1b0(%rsp), %r12d
movl %r15d, %eax
orl %r12d, %eax
je 0x3ddfc
cmpb $0x0, (%rsp)
je 0x3dd60
movq %r14, %rdi
movl %r12d, %esi
callq 0x39e96
testb %al, %al
je 0x3dd60
movq %r14, %rdi
movl %r15d, %esi
callq 0x39e96
movl %eax, (%rsp)
jmp 0x3dd67
movl $0x0, (%rsp)
leaq 0x7d34d(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x345e6
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
leaq 0x38(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x3ddb4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7d300(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x345e6
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3ddfc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x100(%rsp), %rax
cmpl $0x0, 0x1c0(%rsp)
je 0x3de30
testb %r13b, %r13b
je 0x3de61
movl 0x84(%rax), %eax
cmpl $0x1, %eax
je 0x3de92
cmpl $0x3, %eax
jne 0x3defa
leaq 0x7b880(%rip), %rsi     # 0xb96ae
jmp 0x3de99
cmpb $0x0, 0x108(%rsp)
je 0x3defa
cmpl $0x5, 0x84(%rax)
je 0x3defa
cmpb $0x0, 0x8a(%rax)
jne 0x3defa
leaq 0x85ca2(%rip), %rsi     # 0xc3b01
jmp 0x3de99
movq %r14, %rdi
movl 0x1c0(%rsp), %esi
callq 0x3b2d4
testb %al, %al
je 0x3defa
cmpb $0x0, (%rsp)
je 0x3dea3
movq %r14, %rdi
movl 0x1c0(%rsp), %esi
callq 0x39e96
movl %eax, (%rsp)
jmp 0x3deaa
leaq 0x7b7fe(%rip), %rsi     # 0xb9697
movq %rbx, %rdi
callq 0x64e0
jmp 0x3defa
movl $0x0, (%rsp)
leaq 0x7d20a(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl 0x1c0(%rsp), %edx
callq 0x345e6
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3defa
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x1c8(%rsp), %r15d
testl %r15d, %r15d
je 0x3df1d
cmpb $0x0, (%rsp)
je 0x3df44
movq %r14, %rdi
movl %r15d, %esi
callq 0x39e96
movl %eax, (%rsp)
jmp 0x3df4b
movl 0x1d0(%rsp), %r15d
testl %r15d, %r15d
je 0x3dfd1
cmpb $0x0, (%rsp)
je 0x3df7e
movq %r14, %rdi
movl %r15d, %esi
callq 0x39e96
movl %eax, (%rsp)
jmp 0x3df85
movl $0x0, (%rsp)
leaq 0x7d169(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x345e6
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
jmp 0x3dfb6
movl $0x0, (%rsp)
leaq 0x7d12f(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x345e6
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3dfd1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x1d8(%rsp), %r15d
testl %r15d, %r15d
je 0x3e047
cmpb $0x0, (%rsp)
je 0x3dff4
movq %r14, %rdi
movl %r15d, %esi
callq 0x39e96
movl %eax, (%rsp)
jmp 0x3dffb
movl $0x0, (%rsp)
leaq 0x7d0b9(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x345e6
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e047
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x1e0(%rsp), %r15d
testl %r15d, %r15d
je 0x3e0bd
cmpb $0x0, (%rsp)
je 0x3e06a
movq %r14, %rdi
movl %r15d, %esi
callq 0x39e96
movl %eax, (%rsp)
jmp 0x3e071
movl $0x0, (%rsp)
leaq 0x7d043(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x345e6
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e0bd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x1e8(%rsp), %r15d
testl %r15d, %r15d
je 0x3e116
leaq 0x7cfea(%rip), %rsi     # 0xbb0bb
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x345e6
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e116
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x1f0(%rsp), %rax
movl (%rsp), %ecx
movb %cl, (%rax)
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e144
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x6140
movq %rax, %r15
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7b4f6(%rip), %rsi     # 0xb966d
leaq 0x7b518(%rip), %rdx     # 0xb9696
leaq 0x28(%rsp), %rdi
callq 0x7c64
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xbebf9(%rip), %rax     # 0xfcd98
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xbebd1(%rip), %rsi     # 0xfcd80
movq 0xbfe22(%rip), %rdx     # 0xfdfd8
movq %r15, %rdi
callq 0x6470
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3e1e0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3e1e0
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x3e38e
movq %r15, %rdi
callq 0x6200
jmp 0x3e38e
jmp 0x3e1f8
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3e21e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3e21e
jmp 0x3e21b
jmp 0x3e38b
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
jne 0x3e27b
jmp 0x3e38e
jmp 0x3e38b
jmp 0x3e2e3
jmp 0x3e38b
jmp 0x3e2e3
jmp 0x3e38b
jmp 0x3e248
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3e269
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3e269
jmp 0x3e266
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e38e
movq 0x18(%rsp), %rsi
jmp 0x3e347
jmp 0x3e38b
jmp 0x3e38b
jmp 0x3e331
jmp 0x3e38b
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x3e2c5
jmp 0x3e376
jmp 0x3e373
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e376
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3e376
jmp 0x3e373
jmp 0x3e331
jmp 0x3e38b
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
jne 0x3e342
jmp 0x3e38e
jmp 0x3e38b
jmp 0x3e331
jmp 0x3e38b
jmp 0x3e38b
jmp 0x3e386
jmp 0x3e373
jmp 0x3e38b
jmp 0x3e386
jmp 0x3e386
jmp 0x3e331
jmp 0x3e38b
jmp 0x3e331
jmp 0x3e38b
jmp 0x3e331
jmp 0x3e38b
jmp 0x3e331
jmp 0x3e38b
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
jne 0x3e342
jmp 0x3e38e
jmp 0x3e38b
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e38e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3e38e
jmp 0x3e38b
movq %rax, %r14
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e3af
movq 0x148(%rsp), %rsi
jmp 0x3e3a7
jmp 0x3e386
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x1c438
jmp 0x3e38e
jmp 0x3e38b
jmp 0x3e386
movq %rax, %r14
jmp 0x3e3af
movq %rax, %r14
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e3af
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x6260
movq (%rbx), %rdi
cmpq 0x130(%rsp), %rdi
je 0x3e3cf
movq 0x130(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
nop