// File: /workspace/github_cpp_makefile_star2_O3/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 $0x138, %rsp            # imm = 0x138
movl %r9d, %r12d
movq %rcx, %rbp
movl %edx, %r15d
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, 0x10c(%rsp)
testl %r8d, %r8d
je 0x3cbe0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x3c996
jmp 0x3cbf0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x33f8a
leaq 0x28(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6310
movq (%r13), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3cc1b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x178(%rsp), %r13d
movb 0x620(%r14), %al
movb %al, 0x7(%rsp)
movq %r14, %rdi
movl %r13d, %esi
callq 0x39684
movl %eax, (%rsp)
movq %rbp, 0x100(%rsp)
movq %r14, %rdi
movl %r13d, %esi
callq 0x12a72
movl 0x180(%rsp), %ebp
leaq 0x77c52(%rip), %r13     # 0xb48af
cmpl %ebp, 0x14(%rax)
je 0x3cca1
cmpl $0x1, %ebp
je 0x3cc9a
cmpl $0x3, %ebp
je 0x3cc81
cmpl $0x2, %ebp
jne 0x3cca1
leaq 0x7b9d7(%rip), %rax     # 0xb864f
leaq 0x7b9d6(%rip), %r13     # 0xb8655
jmp 0x3cc8f
leaq 0x7e0a1(%rip), %rax     # 0xbad29
leaq 0x7e0a1(%rip), %r13     # 0xbad30
cmpb $0x0, 0x7(%rsp)
cmovneq %rax, %r13
jmp 0x3cca1
leaq 0x7d0db(%rip), %r13     # 0xb9d7c
cmpb $0x0, (%r13)
je 0x3ccf9
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl 0x178(%rsp), %edx
callq 0x34600
leaq 0x28(%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 0x3cd16
movq %rsi, 0x110(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x120(%rsp)
jmp 0x3cd1c
leaq 0x110(%rsp), %rdi
movq %r14, %rsi
movl 0x178(%rsp), %r13d
movl %r13d, %edx
callq 0x33f8a
jmp 0x3cd5a
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)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3cd52
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x178(%rsp), %r13d
movq %r14, %rdi
movl %r13d, %esi
callq 0x12a72
movq %rax, %r13
cmpl $0x5, 0xc(%rax)
jne 0x3ce5c
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
callq 0x1eafa
leaq 0x28(%rsp), %rdx
movl $0x4, 0xc(%rdx)
movl 0xc(%r13), %ecx
leaq 0x8(%rsp), %rdi
leaq 0x110(%rsp), %r8
movq %r14, %rsi
callq 0x3db74
leaq 0x110(%rsp), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
callq 0x6310
movq (%r13), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3cdd4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0xbf605(%rip), %rax     # 0xfc3e0
addq $0x10, %rax
leaq 0xc8(%rsp), %r13
movq %rax, -0xa0(%r13)
movq %r13, %rdi
callq 0xde80
movq -0x38(%r13), %rdi
testq %rdi, %rdi
je 0x3ce0f
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x3ce45
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 0x3ce5c
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x100(%rsp), %rsi
movl 0x84(%rsi), %eax
cmpl $0x1, %eax
sete %cl
andb 0x89(%rsi), %cl
cmpl $0x3, %eax
sete %al
orb %cl, %al
cmpb $0x1, %al
jne 0x3ce9e
movq %r14, %rdi
movl %r15d, %edx
callq 0x1b12c
cmpl $0x0, 0x1a0(%rsp)
setne %r13b
andb %al, %r13b
jmp 0x3cea1
xorl %r13d, %r13d
movl 0x188(%rsp), %esi
testl %esi, %esi
je 0x3cec5
cmpb $0x0, (%rsp)
je 0x3cef1
movq %r14, %rdi
movl %esi, %r15d
callq 0x39684
movl %eax, (%rsp)
movl %r15d, %esi
jmp 0x3cef8
leaq 0x7d1df(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
jmp 0x3d4bb
movl $0x0, (%rsp)
cmpl $0x4, %ebp
setne %al
xorb $0x1, %r12b
testb %r12b, %al
jne 0x3cfa5
movl %esi, %ebp
leaq 0x7d197(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl 0x178(%rsp), %edx
callq 0x33f8a
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 0x3cf5d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7d147(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x33f8a
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3d4bb
movq 0x38(%rsp), %rsi
jmp 0x3d4b3
cmpb $0x0, 0x170(%rsp)
je 0x3d036
movl %esi, %ebp
leaq 0x7b681(%rip), %rsi     # 0xb863d
movq %rbx, %rdi
callq 0x64e0
movq 0x100(%rsp), %rax
movl 0x84(%rax), %eax
cmpl $0x1, %eax
je 0x3d1b3
testl %eax, %eax
movl 0x178(%rsp), %edx
jne 0x3d902
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x34600
leaq 0x7cd7e(%rip), %rsi     # 0xb9d7c
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 0x3d318
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x3d31f
movl %esi, %r12d
movq %r14, %rdi
movl 0x178(%rsp), %esi
callq 0x12a72
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x1eafa
incl %ebp
movl %ebp, 0x3c(%rsp)
leaq 0x7d049(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %r14, %rsi
callq 0x34a5c
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 0x3d0a9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x85bc1(%rip), %rsi     # 0xc2c71
movq %rbx, %rdi
callq 0x64e0
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
leaq 0x7cfd4(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x33f8a
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3d118
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7d8f6(%rip), %rsi     # 0xbaa15
movq %rbx, %rdi
callq 0x64e0
leaq 0xbf2b2(%rip), %rax     # 0xfc3e0
addq $0x10, %rax
leaq 0xc8(%rsp), %r15
movq %rax, -0xa0(%r15)
movq %r15, %rdi
callq 0xde80
movq -0x38(%r15), %rdi
testq %rdi, %rdi
je 0x3d162
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6260
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x3d198
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 0x3d4bb
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
jmp 0x3d4b6
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl 0x178(%rsp), %edx
callq 0x34600
leaq 0x7b481(%rip), %rax     # 0xb864f
leaq 0x7b480(%rip), %rsi     # 0xb8655
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 0x3d20f
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x3d216
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 0x3d257
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x18(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x3d273
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7ce31(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x33f8a
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3d2ba
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7cdea(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl 0x178(%rsp), %edx
callq 0x34600
leaq 0x7b375(%rip), %rsi     # 0xb8659
leaq 0x8(%rsp), %rdi
callq 0x64e0
movq %r15, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3d429
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x3d430
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 0x3d360
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x18(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x3d37c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7cd28(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x7b2b3(%rip), %rsi     # 0xb8645
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x33f8a
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3d3d2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7ccd2(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl 0x178(%rsp), %edx
callq 0x34600
leaq 0x7b24f(%rip), %rsi     # 0xb864b
leaq 0x8(%rsp), %rdi
callq 0x64e0
movq %r15, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3d45c
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x3d463
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 0x3d48d
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 0x3d4a4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3d4bb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x198(%rsp), %r15d
movl 0x190(%rsp), %r12d
movl %r15d, %eax
orl %r12d, %eax
je 0x3d5a2
cmpb $0x0, (%rsp)
je 0x3d4fc
movq %r14, %rdi
movl %r12d, %esi
callq 0x39684
testb %al, %al
je 0x3d4fc
movq %r14, %rdi
movl %r15d, %esi
callq 0x39684
movl %eax, (%rsp)
jmp 0x3d503
movl $0x0, (%rsp)
leaq 0x7cba1(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x33f8a
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 0x3d550
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
leaq 0x7cb54(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x33f8a
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
movq 0x100(%rsp), %r15
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3d5aa
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3d5aa
movq 0x100(%rsp), %r15
cmpl $0x0, 0x1a0(%rsp)
je 0x3d5d7
testb %r13b, %r13b
je 0x3d60a
movl 0x84(%r15), %eax
cmpl $0x1, %eax
je 0x3d63b
cmpl $0x3, %eax
jne 0x3d6a3
leaq 0x7b0c9(%rip), %rsi     # 0xb869e
jmp 0x3d642
cmpb $0x0, 0x10c(%rsp)
je 0x3d6a3
cmpl $0x5, 0x84(%r15)
je 0x3d6a3
cmpb $0x0, 0x8a(%r15)
jne 0x3d6a3
leaq 0x854c9(%rip), %rsi     # 0xc2ad1
jmp 0x3d642
movq %r14, %rdi
movl 0x1a0(%rsp), %esi
callq 0x3aaca
testb %al, %al
je 0x3d6a3
cmpb $0x0, (%rsp)
je 0x3d64c
movq %r14, %rdi
movl 0x1a0(%rsp), %esi
callq 0x39684
movl %eax, (%rsp)
jmp 0x3d653
leaq 0x7b045(%rip), %rsi     # 0xb8687
movq %rbx, %rdi
callq 0x64e0
jmp 0x3d6a3
movl $0x0, (%rsp)
leaq 0x7ca51(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl 0x1a0(%rsp), %edx
callq 0x33f8a
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 0x3d6a3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x1a8(%rsp), %r15d
testl %r15d, %r15d
je 0x3d6c6
cmpb $0x0, (%rsp)
je 0x3d6ed
movq %r14, %rdi
movl %r15d, %esi
callq 0x39684
movl %eax, (%rsp)
jmp 0x3d6f4
movl 0x1b0(%rsp), %r15d
testl %r15d, %r15d
je 0x3d77a
cmpb $0x0, (%rsp)
je 0x3d727
movq %r14, %rdi
movl %r15d, %esi
callq 0x39684
movl %eax, (%rsp)
jmp 0x3d72e
movl $0x0, (%rsp)
leaq 0x7c9b0(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x33f8a
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x60b0
jmp 0x3d75f
movl $0x0, (%rsp)
leaq 0x7c976(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x33f8a
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 0x3d77a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x1b8(%rsp), %r15d
testl %r15d, %r15d
je 0x3d7f0
cmpb $0x0, (%rsp)
je 0x3d79d
movq %r14, %rdi
movl %r15d, %esi
callq 0x39684
movl %eax, (%rsp)
jmp 0x3d7a4
movl $0x0, (%rsp)
leaq 0x7c900(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x33f8a
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 0x3d7f0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x1c0(%rsp), %r15d
testl %r15d, %r15d
je 0x3d866
cmpb $0x0, (%rsp)
je 0x3d813
movq %r14, %rdi
movl %r15d, %esi
callq 0x39684
movl %eax, (%rsp)
jmp 0x3d81a
movl $0x0, (%rsp)
leaq 0x7c88a(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x33f8a
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 0x3d866
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movl 0x1c8(%rsp), %r15d
testl %r15d, %r15d
je 0x3d8bf
leaq 0x7c831(%rip), %rsi     # 0xba0ab
movq %rbx, %rdi
callq 0x64e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x33f8a
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 0x3d8bf
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
movq 0x1d0(%rsp), %rax
movl (%rsp), %ecx
movb %cl, (%rax)
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d8ed
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x6260
movq %rbx, %rax
addq $0x138, %rsp            # imm = 0x138
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 0x7ad3d(%rip), %rsi     # 0xb865d
leaq 0x7ad5f(%rip), %rdx     # 0xb8686
leaq 0x28(%rsp), %rdi
callq 0x7be0
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x6320
leaq 0xbe480(%rip), %rax     # 0xfbdc8
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xbe458(%rip), %rsi     # 0xfbdb0
movq 0xbf679(%rip), %rdx     # 0xfcfd8
movq %r15, %rdi
callq 0x6470
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3d981
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
testb %bpl, %bpl
jne 0x3d98e
jmp 0x3db2a
movq %rax, %r14
movq %r15, %rdi
callq 0x6200
jmp 0x3db2a
jmp 0x3d99d
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3d9c3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3d9c3
jmp 0x3d9c0
jmp 0x3db27
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x3da20
jmp 0x3db2a
jmp 0x3db27
jmp 0x3da88
jmp 0x3db27
jmp 0x3da88
jmp 0x3db27
jmp 0x3d9ed
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3da0e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3da0e
jmp 0x3da0b
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3db2a
movq 0x18(%rsp), %rsi
jmp 0x3dae9
jmp 0x3db27
jmp 0x3db27
jmp 0x3dad3
jmp 0x3db27
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x3da6a
jmp 0x3db12
jmp 0x3db0f
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3db12
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3db12
jmp 0x3db0f
jmp 0x3dad3
jmp 0x3db27
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
jne 0x3dae4
jmp 0x3db2a
jmp 0x3db27
jmp 0x3dad3
jmp 0x3db27
jmp 0x3db27
jmp 0x3db22
jmp 0x3db0f
jmp 0x3db27
jmp 0x3db22
jmp 0x3db22
jmp 0x3dad3
jmp 0x3db27
jmp 0x3dad3
jmp 0x3db27
jmp 0x3dad3
jmp 0x3db27
jmp 0x3dad3
jmp 0x3db27
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
jne 0x3dae4
jmp 0x3db2a
jmp 0x3db27
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3db2a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x6260
jmp 0x3db2a
jmp 0x3db27
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3db4b
movq 0x38(%rsp), %rsi
jmp 0x3db43
jmp 0x3db22
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x1be02
jmp 0x3db2a
jmp 0x3db27
jmp 0x3db22
movq %rax, %r14
jmp 0x3db4b
movq %rax, %r14
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3db4b
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x6260
movq (%rbx), %rdi
cmpq 0x130(%rsp), %rdi
je 0x3db6b
movq 0x130(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x6260
movq %r14, %rdi
callq 0x64a0
nop