// File: /workspace/github_c_makefile_star2_O0/sc932[P]ALE/src/ssw.c
// Function: sw_sse2_byte
static alignment_end* sw_sse2_byte (const int8_t* ref,
							 int8_t ref_dir,	// 0: forward ref; 1: reverse ref
							 int32_t refLen,
							 int32_t readLen,
							 const uint8_t weight_gapO, /* will be used as - */
							 const uint8_t weight_gapE, /* will be used as - */
							 const __m128i* vProfile,
							 uint8_t terminate,	/* the best alignment score: used to terminate
												   the matrix calculation when locating the
												   alignment beginning point. If this score
												   is set to 0, it will not be used */
	 						 uint8_t bias,  /* Shift 0 point to a positive value. */
							 int32_t maskLen) {

// Put the largest number of the 16 numbers in vm into m.
#define max16(m, vm) (vm) = _mm_max_epu8((vm), _mm_srli_si128((vm), 8)); \
					  (vm) = _mm_max_epu8((vm), _mm_srli_si128((vm), 4)); \
					  (vm) = _mm_max_epu8((vm), _mm_srli_si128((vm), 2)); \
					  (vm) = _mm_max_epu8((vm), _mm_srli_si128((vm), 1)); \
					  (m) = _mm_extract_epi16((vm), 0)

	uint8_t max = 0;		                     /* the max alignment score */
	int32_t end_read = readLen - 1;
	int32_t end_ref = -1; /* 0_based best alignment ending point; Initialized as isn't aligned -1. */
	int32_t segLen = (readLen + 15) / 16; /* number of segment */

	/* array to record the largest score of each reference position */
	uint8_t* maxColumn = (uint8_t*) calloc(refLen, 1);

	/* array to record the alignment read ending position of the largest score of each reference position */
	int32_t* end_read_column = (int32_t*) calloc(refLen, sizeof(int32_t));

	/* Define 16 byte 0 vector. */
	__m128i vZero = _mm_set1_epi32(0);

	__m128i* pvHStore = (__m128i*) calloc(segLen, sizeof(__m128i));
	__m128i* pvHLoad = (__m128i*) calloc(segLen, sizeof(__m128i));
	__m128i* pvE = (__m128i*) calloc(segLen, sizeof(__m128i));
	__m128i* pvHmax = (__m128i*) calloc(segLen, sizeof(__m128i));

	int32_t i, j, k;
	/* 16 byte insertion begin vector */
	__m128i vGapO = _mm_set1_epi8(weight_gapO);

	/* 16 byte insertion extension vector */
	__m128i vGapE = _mm_set1_epi8(weight_gapE);

	/* 16 byte bias vector */
	__m128i vBias = _mm_set1_epi8(bias);

	__m128i vMaxScore = vZero; /* Trace the highest score of the whole SW matrix. */
	__m128i vMaxMark = vZero; /* Trace the highest score till the previous column. */
	__m128i vTemp;
	int32_t edge, begin = 0, end = refLen, step = 1;

	/* outer loop to process the reference sequence */
	if (ref_dir == 1) {
		begin = refLen - 1;
		end = -1;
		step = -1;
	}
	for (i = begin; LIKELY(i != end); i += step) {
		int32_t cmp;
		__m128i e, vF = vZero, vMaxColumn = vZero; /* Initialize F value to 0.
							   Any errors to vH values will be corrected in the Lazy_F loop.
							 */

		__m128i vH = pvHStore[segLen - 1];
		vH = _mm_slli_si128 (vH, 1); /* Shift the 128-bit value in vH left by 1 byte. */
		const __m128i* vP = vProfile + ref[i] * segLen; /* Right part of the vProfile */

		/* Swap the 2 H buffers. */
		__m128i* pv = pvHLoad;
		pvHLoad = pvHStore;
		pvHStore = pv;

		/* inner loop to process the query sequence */
		for (j = 0; LIKELY(j < segLen); ++j) {
			vH = _mm_adds_epu8(vH, _mm_load_si128(vP + j));
			vH = _mm_subs_epu8(vH, vBias); /* vH will be always > 0 */

			/* Get max from vH, vE and vF. */
			e = _mm_load_si128(pvE + j);
			vH = _mm_max_epu8(vH, e);
			vH = _mm_max_epu8(vH, vF);
			vMaxColumn = _mm_max_epu8(vMaxColumn, vH);

			/* Save vH values. */
			_mm_store_si128(pvHStore + j, vH);

			/* Update vE value. */
			vH = _mm_subs_epu8(vH, vGapO); /* saturation arithmetic, result >= 0 */
			e = _mm_subs_epu8(e, vGapE);
			e = _mm_max_epu8(e, vH);
			_mm_store_si128(pvE + j, e);

			/* Update vF value. */
			vF = _mm_subs_epu8(vF, vGapE);
			vF = _mm_max_epu8(vF, vH);

			/* Load the next vH. */
			vH = _mm_load_si128(pvHLoad + j);
		}

        /* Lazy_F loop: has been revised to disallow adjecent insertion and then deletion, so don't update E(i, j), learn from SWPS3 */
		for (k = 0; LIKELY(k < 16); ++k) {
			vF = _mm_slli_si128 (vF, 1);
			for (j = 0; LIKELY(j < segLen); ++j) {
				vH = _mm_load_si128(pvHStore + j);
				vH = _mm_max_epu8(vH, vF);
				vMaxColumn = _mm_max_epu8(vMaxColumn, vH);	// newly added line
				_mm_store_si128(pvHStore + j, vH);
				vH = _mm_subs_epu8(vH, vGapO);
				vF = _mm_subs_epu8(vF, vGapE);
				if (UNLIKELY(! _mm_movemask_epi8(_mm_cmpgt_epi8(vF, vH)))) goto end;
			}
		}

end:		

		vMaxScore = _mm_max_epu8(vMaxScore, vMaxColumn);
		vTemp = _mm_cmpeq_epi8(vMaxMark, vMaxScore);
		cmp = _mm_movemask_epi8(vTemp);
		if (cmp != 0xffff) {
			uint8_t temp;
			vMaxMark = vMaxScore;
			max16(temp, vMaxScore);
			vMaxScore = vMaxMark;

			if (LIKELY(temp > max)) {
				max = temp;
				if (max + bias >= 255) break;	//overflow
				end_ref = i;

				/* Store the column with the highest alignment score in order to trace the alignment ending position on read. */
				for (j = 0; LIKELY(j < segLen); ++j) pvHmax[j] = pvHStore[j];
			}
		}

		/* Record the max score of current column. */
		max16(maxColumn[i], vMaxColumn);
		if (maxColumn[i] == terminate) break;
	}

	/* Trace the alignment ending position on read. */
	uint8_t *t = (uint8_t*)pvHmax;
	int32_t column_len = segLen * 16;
	for (i = 0; LIKELY(i < column_len); ++i, ++t) {
		int32_t temp;
		if (*t == max) {
			temp = i / 16 + i % 16 * segLen;
			if (temp < end_read) end_read = temp;
		}
	}

	free(pvHmax);
	free(pvE);
	free(pvHLoad);
	free(pvHStore);

	/* Find the most possible 2nd best alignment. */
	alignment_end* bests = (alignment_end*) calloc(2, sizeof(alignment_end));
	bests[0].score = max + bias >= 255 ? 255 : max;
	bests[0].ref = end_ref;
	bests[0].read = end_read;

	bests[1].score = 0;
	bests[1].ref = 0;
	bests[1].read = 0;

	edge = (end_ref - maskLen) > 0 ? (end_ref - maskLen) : 0;
	for (i = 0; i < edge; i ++) {
		if (maxColumn[i] > bests[1].score) {
			bests[1].score = maxColumn[i];
			bests[1].ref = i;
		}
	}
	edge = (end_ref + maskLen) > refLen ? refLen : (end_ref + maskLen);
	for (i = edge + 1; i < refLen; i ++) {
		if (maxColumn[i] > bests[1].score) {
			bests[1].score = maxColumn[i];
			bests[1].ref = i;
		}
	}

	free(maxColumn);
	free(end_read_column);
	return bests;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x5e0, %rsp            # imm = 0x5E0
movl %r8d, -0x5d0(%rbp)
movl %ecx, %eax
movl -0x5d0(%rbp), %ecx
movl %eax, -0x5cc(%rbp)
movl %edx, %eax
movl -0x5cc(%rbp), %edx
movl %eax, -0x5c8(%rbp)
movl %esi, %eax
movl -0x5c8(%rbp), %esi
movl %eax, -0x5c4(%rbp)
movq %rdi, %r8
movl -0x5c4(%rbp), %edi
movb %r9b, %al
movl 0x28(%rbp), %r9d
movb 0x20(%rbp), %r9b
movb 0x18(%rbp), %r9b
movq 0x10(%rbp), %r9
movq %r8, -0x450(%rbp)
movb %dil, -0x451(%rbp)
movl %esi, -0x458(%rbp)
movl %edx, -0x45c(%rbp)
movb %cl, -0x45d(%rbp)
movb %al, -0x45e(%rbp)
movb $0x0, -0x45f(%rbp)
movl -0x45c(%rbp), %eax
decl %eax
movl %eax, -0x464(%rbp)
movl $0xffffffff, -0x468(%rbp) # imm = 0xFFFFFFFF
movl -0x45c(%rbp), %ecx
movl %ecx, %eax
addl $0xf, %eax
addl $0x1e, %ecx
testl %eax, %eax
cmovsl %ecx, %eax
sarl $0x4, %eax
movl %eax, -0x46c(%rbp)
movslq -0x458(%rbp), %rdi
movl $0x1, %esi
callq 0x3310
movq %rax, -0x478(%rbp)
movslq -0x458(%rbp), %rdi
movl $0x4, %esi
callq 0x3310
movq %rax, -0x480(%rbp)
movl $0x0, -0x448(%rbp)
movl -0x448(%rbp), %eax
movl %eax, -0x64(%rbp)
movl %eax, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
movl %eax, -0x70(%rbp)
movd -0x64(%rbp), %xmm0
movd -0x68(%rbp), %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movd -0x6c(%rbp), %xmm2
movd -0x70(%rbp), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x80(%rbp)
movaps -0x80(%rbp), %xmm0
movaps %xmm0, -0x490(%rbp)
movslq -0x46c(%rbp), %rdi
movl $0x10, %esi
movq %rsi, -0x5c0(%rbp)
callq 0x3310
movq -0x5c0(%rbp), %rsi
movq %rax, -0x498(%rbp)
movslq -0x46c(%rbp), %rdi
callq 0x3310
movq -0x5c0(%rbp), %rsi
movq %rax, -0x4a0(%rbp)
movslq -0x46c(%rbp), %rdi
callq 0x3310
movq -0x5c0(%rbp), %rsi
movq %rax, -0x4a8(%rbp)
movslq -0x46c(%rbp), %rdi
callq 0x3310
movq %rax, -0x4b0(%rbp)
movb -0x45d(%rbp), %al
movb %al, -0x441(%rbp)
movb -0x441(%rbp), %al
movb %al, -0x5b3(%rbp)
movb %al, -0x41(%rbp)
movb %al, -0x42(%rbp)
movb %al, -0x43(%rbp)
movb %al, -0x44(%rbp)
movb %al, -0x45(%rbp)
movb %al, -0x46(%rbp)
movb %al, -0x47(%rbp)
movb %al, -0x48(%rbp)
movb %al, -0x49(%rbp)
movb %al, -0x4a(%rbp)
movb %al, -0x4b(%rbp)
movb %al, -0x4c(%rbp)
movb %al, -0x4d(%rbp)
movb %al, -0x4e(%rbp)
movb %al, -0x4f(%rbp)
movb %al, -0x50(%rbp)
movzbl -0x41(%rbp), %eax
movd %eax, %xmm0
movzbl -0x42(%rbp), %eax
movd %eax, %xmm1
punpcklbw %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
movzbl -0x43(%rbp), %eax
movd %eax, %xmm2
movzbl -0x44(%rbp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzbl -0x45(%rbp), %eax
movd %eax, %xmm1
movzbl -0x46(%rbp), %eax
movd %eax, %xmm2
punpcklbw %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7]
movzbl -0x47(%rbp), %eax
movd %eax, %xmm3
movzbl -0x48(%rbp), %eax
movd %eax, %xmm1
punpcklbw %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1],xmm1[2],xmm3[2],xmm1[3],xmm3[3],xmm1[4],xmm3[4],xmm1[5],xmm3[5],xmm1[6],xmm3[6],xmm1[7],xmm3[7]
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzbl -0x49(%rbp), %eax
movd %eax, %xmm2
movzbl -0x4a(%rbp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
movzbl -0x4b(%rbp), %eax
movd %eax, %xmm3
movzbl -0x4c(%rbp), %eax
movd %eax, %xmm2
punpcklbw %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3],xmm2[4],xmm3[4],xmm2[5],xmm3[5],xmm2[6],xmm3[6],xmm2[7],xmm3[7]
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzbl -0x4d(%rbp), %eax
movd %eax, %xmm0
movzbl -0x4e(%rbp), %eax
movd %eax, %xmm3
punpcklbw %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1],xmm3[2],xmm0[2],xmm3[3],xmm0[3],xmm3[4],xmm0[4],xmm3[5],xmm0[5],xmm3[6],xmm0[6],xmm3[7],xmm0[7]
movzbl -0x4f(%rbp), %eax
movd %eax, %xmm4
movzbl -0x50(%rbp), %eax
movd %eax, %xmm0
punpcklbw %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1],xmm0[2],xmm4[2],xmm0[3],xmm4[3],xmm0[4],xmm4[4],xmm0[5],xmm4[5],xmm0[6],xmm4[6],xmm0[7],xmm4[7]
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x60(%rbp)
movaps -0x60(%rbp), %xmm0
movaps %xmm0, -0x4d0(%rbp)
movb -0x45e(%rbp), %al
movb %al, -0x442(%rbp)
movb -0x442(%rbp), %al
movb %al, -0x5b2(%rbp)
movb %al, -0x21(%rbp)
movb %al, -0x22(%rbp)
movb %al, -0x23(%rbp)
movb %al, -0x24(%rbp)
movb %al, -0x25(%rbp)
movb %al, -0x26(%rbp)
movb %al, -0x27(%rbp)
movb %al, -0x28(%rbp)
movb %al, -0x29(%rbp)
movb %al, -0x2a(%rbp)
movb %al, -0x2b(%rbp)
movb %al, -0x2c(%rbp)
movb %al, -0x2d(%rbp)
movb %al, -0x2e(%rbp)
movb %al, -0x2f(%rbp)
movb %al, -0x30(%rbp)
movzbl -0x21(%rbp), %eax
movd %eax, %xmm0
movzbl -0x22(%rbp), %eax
movd %eax, %xmm1
punpcklbw %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
movzbl -0x23(%rbp), %eax
movd %eax, %xmm2
movzbl -0x24(%rbp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzbl -0x25(%rbp), %eax
movd %eax, %xmm1
movzbl -0x26(%rbp), %eax
movd %eax, %xmm2
punpcklbw %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7]
movzbl -0x27(%rbp), %eax
movd %eax, %xmm3
movzbl -0x28(%rbp), %eax
movd %eax, %xmm1
punpcklbw %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1],xmm1[2],xmm3[2],xmm1[3],xmm3[3],xmm1[4],xmm3[4],xmm1[5],xmm3[5],xmm1[6],xmm3[6],xmm1[7],xmm3[7]
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzbl -0x29(%rbp), %eax
movd %eax, %xmm2
movzbl -0x2a(%rbp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
movzbl -0x2b(%rbp), %eax
movd %eax, %xmm3
movzbl -0x2c(%rbp), %eax
movd %eax, %xmm2
punpcklbw %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3],xmm2[4],xmm3[4],xmm2[5],xmm3[5],xmm2[6],xmm3[6],xmm2[7],xmm3[7]
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzbl -0x2d(%rbp), %eax
movd %eax, %xmm0
movzbl -0x2e(%rbp), %eax
movd %eax, %xmm3
punpcklbw %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1],xmm3[2],xmm0[2],xmm3[3],xmm0[3],xmm3[4],xmm0[4],xmm3[5],xmm0[5],xmm3[6],xmm0[6],xmm3[7],xmm0[7]
movzbl -0x2f(%rbp), %eax
movd %eax, %xmm4
movzbl -0x30(%rbp), %eax
movd %eax, %xmm0
punpcklbw %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1],xmm0[2],xmm4[2],xmm0[3],xmm4[3],xmm0[4],xmm4[4],xmm0[5],xmm4[5],xmm0[6],xmm4[6],xmm0[7],xmm4[7]
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x40(%rbp)
movaps -0x40(%rbp), %xmm0
movaps %xmm0, -0x4e0(%rbp)
movb 0x20(%rbp), %al
movb %al, -0x443(%rbp)
movb -0x443(%rbp), %al
movb %al, -0x5b1(%rbp)
movb %al, -0x1(%rbp)
movb %al, -0x2(%rbp)
movb %al, -0x3(%rbp)
movb %al, -0x4(%rbp)
movb %al, -0x5(%rbp)
movb %al, -0x6(%rbp)
movb %al, -0x7(%rbp)
movb %al, -0x8(%rbp)
movb %al, -0x9(%rbp)
movb %al, -0xa(%rbp)
movb %al, -0xb(%rbp)
movb %al, -0xc(%rbp)
movb %al, -0xd(%rbp)
movb %al, -0xe(%rbp)
movb %al, -0xf(%rbp)
movb %al, -0x10(%rbp)
movzbl -0x1(%rbp), %eax
movd %eax, %xmm0
movzbl -0x2(%rbp), %eax
movd %eax, %xmm1
punpcklbw %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
movzbl -0x3(%rbp), %eax
movd %eax, %xmm2
movzbl -0x4(%rbp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzbl -0x5(%rbp), %eax
movd %eax, %xmm1
movzbl -0x6(%rbp), %eax
movd %eax, %xmm2
punpcklbw %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7]
movzbl -0x7(%rbp), %eax
movd %eax, %xmm3
movzbl -0x8(%rbp), %eax
movd %eax, %xmm1
punpcklbw %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1],xmm1[2],xmm3[2],xmm1[3],xmm3[3],xmm1[4],xmm3[4],xmm1[5],xmm3[5],xmm1[6],xmm3[6],xmm1[7],xmm3[7]
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzbl -0x9(%rbp), %eax
movd %eax, %xmm2
movzbl -0xa(%rbp), %eax
movd %eax, %xmm0
punpcklbw %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
movzbl -0xb(%rbp), %eax
movd %eax, %xmm3
movzbl -0xc(%rbp), %eax
movd %eax, %xmm2
punpcklbw %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3],xmm2[4],xmm3[4],xmm2[5],xmm3[5],xmm2[6],xmm3[6],xmm2[7],xmm3[7]
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzbl -0xd(%rbp), %eax
movd %eax, %xmm0
movzbl -0xe(%rbp), %eax
movd %eax, %xmm3
punpcklbw %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1],xmm3[2],xmm0[2],xmm3[3],xmm0[3],xmm3[4],xmm0[4],xmm3[5],xmm0[5],xmm3[6],xmm0[6],xmm3[7],xmm0[7]
movzbl -0xf(%rbp), %eax
movd %eax, %xmm4
movzbl -0x10(%rbp), %eax
movd %eax, %xmm0
punpcklbw %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1],xmm0[2],xmm4[2],xmm0[3],xmm4[3],xmm0[4],xmm4[4],xmm0[5],xmm4[5],xmm0[6],xmm4[6],xmm0[7],xmm4[7]
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa %xmm0, -0x20(%rbp)
movdqa -0x20(%rbp), %xmm0
movdqa %xmm0, -0x4f0(%rbp)
movdqa -0x490(%rbp), %xmm0
movdqa %xmm0, -0x500(%rbp)
movdqa -0x490(%rbp), %xmm0
movdqa %xmm0, -0x510(%rbp)
movl $0x0, -0x528(%rbp)
movl -0x458(%rbp), %eax
movl %eax, -0x52c(%rbp)
movl $0x1, -0x530(%rbp)
movsbl -0x451(%rbp), %eax
cmpl $0x1, %eax
jne 0x11499
movl -0x458(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x528(%rbp)
movl $0xffffffff, -0x52c(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x530(%rbp) # imm = 0xFFFFFFFF
movl -0x528(%rbp), %eax
movl %eax, -0x4b4(%rbp)
movl -0x4b4(%rbp), %eax
cmpl -0x52c(%rbp), %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x11eb2
movaps -0x490(%rbp), %xmm0
movaps %xmm0, -0x560(%rbp)
movaps -0x490(%rbp), %xmm0
movaps %xmm0, -0x570(%rbp)
movq -0x498(%rbp), %rax
movl -0x46c(%rbp), %ecx
decl %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps (%rax,%rcx), %xmm0
movaps %xmm0, -0x580(%rbp)
movaps -0x580(%rbp), %xmm0
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movdqa %xmm0, -0x580(%rbp)
movq 0x10(%rbp), %rax
movq -0x450(%rbp), %rcx
movslq -0x4b4(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
imull -0x46c(%rbp), %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x588(%rbp)
movq -0x4a0(%rbp), %rax
movq %rax, -0x590(%rbp)
movq -0x498(%rbp), %rax
movq %rax, -0x4a0(%rbp)
movq -0x590(%rbp), %rax
movq %rax, -0x498(%rbp)
movl $0x0, -0x4b8(%rbp)
movl -0x4b8(%rbp), %eax
cmpl -0x46c(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x118ff
movdqa -0x580(%rbp), %xmm1
movq -0x588(%rbp), %rax
movslq -0x4b8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x408(%rbp)
movq -0x408(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm1, -0x430(%rbp)
movdqa %xmm0, -0x440(%rbp)
movdqa -0x430(%rbp), %xmm0
movdqa -0x440(%rbp), %xmm1
paddusb %xmm1, %xmm0
movdqa %xmm0, -0x580(%rbp)
movdqa -0x580(%rbp), %xmm1
movdqa -0x4f0(%rbp), %xmm0
movdqa %xmm1, -0x350(%rbp)
movdqa %xmm0, -0x360(%rbp)
movdqa -0x350(%rbp), %xmm0
movdqa -0x360(%rbp), %xmm1
psubusb %xmm1, %xmm0
movdqa %xmm0, -0x580(%rbp)
movq -0x4a8(%rbp), %rax
movslq -0x4b8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x410(%rbp)
movq -0x410(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x550(%rbp)
movdqa -0x580(%rbp), %xmm1
movdqa -0x550(%rbp), %xmm0
movdqa %xmm1, -0x150(%rbp)
movdqa %xmm0, -0x160(%rbp)
movdqa -0x150(%rbp), %xmm0
movdqa -0x160(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x580(%rbp)
movdqa -0x580(%rbp), %xmm1
movdqa -0x560(%rbp), %xmm0
movdqa %xmm1, -0x170(%rbp)
movdqa %xmm0, -0x180(%rbp)
movdqa -0x170(%rbp), %xmm0
movdqa -0x180(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x580(%rbp)
movdqa -0x570(%rbp), %xmm1
movdqa -0x580(%rbp), %xmm0
movdqa %xmm1, -0x190(%rbp)
movdqa %xmm0, -0x1a0(%rbp)
movdqa -0x190(%rbp), %xmm0
movdqa -0x1a0(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x570(%rbp)
movq -0x498(%rbp), %rax
movslq -0x4b8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x580(%rbp), %xmm0
movq %rax, -0xe8(%rbp)
movdqa %xmm0, -0x100(%rbp)
movdqa -0x100(%rbp), %xmm0
movq -0xe8(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x580(%rbp), %xmm1
movdqa -0x4d0(%rbp), %xmm0
movdqa %xmm1, -0x370(%rbp)
movdqa %xmm0, -0x380(%rbp)
movdqa -0x370(%rbp), %xmm0
movdqa -0x380(%rbp), %xmm1
psubusb %xmm1, %xmm0
movdqa %xmm0, -0x580(%rbp)
movdqa -0x550(%rbp), %xmm1
movdqa -0x4e0(%rbp), %xmm0
movdqa %xmm1, -0x390(%rbp)
movdqa %xmm0, -0x3a0(%rbp)
movdqa -0x390(%rbp), %xmm0
movdqa -0x3a0(%rbp), %xmm1
psubusb %xmm1, %xmm0
movdqa %xmm0, -0x550(%rbp)
movdqa -0x550(%rbp), %xmm1
movdqa -0x580(%rbp), %xmm0
movdqa %xmm1, -0x1b0(%rbp)
movdqa %xmm0, -0x1c0(%rbp)
movdqa -0x1b0(%rbp), %xmm0
movdqa -0x1c0(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x550(%rbp)
movq -0x4a8(%rbp), %rax
movslq -0x4b8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x550(%rbp), %xmm0
movq %rax, -0x108(%rbp)
movdqa %xmm0, -0x120(%rbp)
movdqa -0x120(%rbp), %xmm0
movq -0x108(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x560(%rbp), %xmm1
movdqa -0x4e0(%rbp), %xmm0
movdqa %xmm1, -0x3b0(%rbp)
movdqa %xmm0, -0x3c0(%rbp)
movdqa -0x3b0(%rbp), %xmm0
movdqa -0x3c0(%rbp), %xmm1
psubusb %xmm1, %xmm0
movdqa %xmm0, -0x560(%rbp)
movdqa -0x560(%rbp), %xmm1
movdqa -0x580(%rbp), %xmm0
movdqa %xmm1, -0x1d0(%rbp)
movdqa %xmm0, -0x1e0(%rbp)
movdqa -0x1d0(%rbp), %xmm0
movdqa -0x1e0(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x560(%rbp)
movq -0x4a0(%rbp), %rax
movslq -0x4b8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x418(%rbp)
movq -0x418(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x580(%rbp)
movl -0x4b8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4b8(%rbp)
jmp 0x11578
movl $0x0, -0x4bc(%rbp)
cmpl $0x10, -0x4bc(%rbp)
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x11b23
movaps -0x560(%rbp), %xmm0
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movdqa %xmm0, -0x560(%rbp)
movl $0x0, -0x4b8(%rbp)
movl -0x4b8(%rbp), %eax
cmpl -0x46c(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x11b0d
movq -0x498(%rbp), %rax
movslq -0x4b8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x420(%rbp)
movq -0x420(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm0, -0x580(%rbp)
movaps -0x580(%rbp), %xmm1
movaps -0x560(%rbp), %xmm0
movaps %xmm1, -0x1f0(%rbp)
movaps %xmm0, -0x200(%rbp)
movaps -0x1f0(%rbp), %xmm0
movaps -0x200(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x580(%rbp)
movaps -0x570(%rbp), %xmm1
movaps -0x580(%rbp), %xmm0
movaps %xmm1, -0x210(%rbp)
movaps %xmm0, -0x220(%rbp)
movaps -0x210(%rbp), %xmm0
movaps -0x220(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x570(%rbp)
movq -0x498(%rbp), %rax
movslq -0x4b8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movaps -0x580(%rbp), %xmm0
movq %rax, -0x128(%rbp)
movaps %xmm0, -0x140(%rbp)
movaps -0x140(%rbp), %xmm0
movq -0x128(%rbp), %rax
movaps %xmm0, (%rax)
movaps -0x580(%rbp), %xmm1
movaps -0x4d0(%rbp), %xmm0
movaps %xmm1, -0x3d0(%rbp)
movaps %xmm0, -0x3e0(%rbp)
movaps -0x3d0(%rbp), %xmm0
movaps -0x3e0(%rbp), %xmm1
psubusb %xmm1, %xmm0
movaps %xmm0, -0x580(%rbp)
movaps -0x560(%rbp), %xmm1
movaps -0x4e0(%rbp), %xmm0
movaps %xmm1, -0x3f0(%rbp)
movaps %xmm0, -0x400(%rbp)
movaps -0x3f0(%rbp), %xmm0
movaps -0x400(%rbp), %xmm1
psubusb %xmm1, %xmm0
movaps %xmm0, -0x560(%rbp)
movaps -0x560(%rbp), %xmm1
movaps -0x580(%rbp), %xmm0
movaps %xmm1, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps -0xb0(%rbp), %xmm0
movaps -0xc0(%rbp), %xmm1
pcmpgtb %xmm1, %xmm0
movdqa %xmm0, -0xd0(%rbp)
movdqa -0xd0(%rbp), %xmm0
pmovmskb %xmm0, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x11af7
jmp 0x11b25
jmp 0x11af9
movl -0x4b8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4b8(%rbp)
jmp 0x11942
jmp 0x11b0f
movl -0x4bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4bc(%rbp)
jmp 0x11909
jmp 0x11b25
movaps -0x500(%rbp), %xmm1
movaps -0x570(%rbp), %xmm0
movaps %xmm1, -0x230(%rbp)
movaps %xmm0, -0x240(%rbp)
movaps -0x230(%rbp), %xmm0
movaps -0x240(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x500(%rbp)
movaps -0x510(%rbp), %xmm1
movaps -0x500(%rbp), %xmm0
movaps %xmm1, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps -0x90(%rbp), %xmm0
movaps -0xa0(%rbp), %xmm1
pcmpeqb %xmm1, %xmm0
movdqa %xmm0, -0x520(%rbp)
movdqa -0x520(%rbp), %xmm0
movdqa %xmm0, -0xe0(%rbp)
movdqa -0xe0(%rbp), %xmm0
pmovmskb %xmm0, %eax
movl %eax, -0x534(%rbp)
cmpl $0xffff, -0x534(%rbp)   # imm = 0xFFFF
je 0x11d89
movaps -0x500(%rbp), %xmm0
movaps %xmm0, -0x510(%rbp)
movaps -0x500(%rbp), %xmm1
movaps %xmm1, %xmm0
psrldq $0x8, %xmm0             # xmm0 = xmm0[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movaps %xmm1, -0x250(%rbp)
movaps %xmm0, -0x260(%rbp)
movaps -0x250(%rbp), %xmm0
movaps -0x260(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x500(%rbp)
movaps -0x500(%rbp), %xmm1
movaps %xmm1, %xmm0
psrldq $0x4, %xmm0             # xmm0 = xmm0[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
movaps %xmm1, -0x270(%rbp)
movaps %xmm0, -0x280(%rbp)
movaps -0x270(%rbp), %xmm0
movaps -0x280(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x500(%rbp)
movaps -0x500(%rbp), %xmm1
movaps %xmm1, %xmm0
psrldq $0x2, %xmm0             # xmm0 = xmm0[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero
movaps %xmm1, -0x290(%rbp)
movaps %xmm0, -0x2a0(%rbp)
movaps -0x290(%rbp), %xmm0
movaps -0x2a0(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x500(%rbp)
movaps -0x500(%rbp), %xmm1
movaps %xmm1, %xmm0
psrldq $0x1, %xmm0             # xmm0 = xmm0[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero
movaps %xmm1, -0x2b0(%rbp)
movaps %xmm0, -0x2c0(%rbp)
movaps -0x2b0(%rbp), %xmm0
movaps -0x2c0(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x500(%rbp)
movl -0x500(%rbp), %eax
movzwl %ax, %eax
movb %al, -0x591(%rbp)
movdqa -0x510(%rbp), %xmm0
movdqa %xmm0, -0x500(%rbp)
movzbl -0x591(%rbp), %eax
movzbl -0x45f(%rbp), %ecx
cmpl %ecx, %eax
setg %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x11d87
movb -0x591(%rbp), %al
movb %al, -0x45f(%rbp)
movzbl -0x45f(%rbp), %eax
movzbl 0x20(%rbp), %ecx
addl %ecx, %eax
cmpl $0xff, %eax
jl 0x11d10
jmp 0x11eb2
movl -0x4b4(%rbp), %eax
movl %eax, -0x468(%rbp)
movl $0x0, -0x4b8(%rbp)
movl -0x4b8(%rbp), %eax
cmpl -0x46c(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x11d85
movq -0x498(%rbp), %rax
movslq -0x4b8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa (%rax), %xmm0
movq -0x4b0(%rbp), %rax
movslq -0x4b8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa %xmm0, (%rax)
movl -0x4b8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4b8(%rbp)
jmp 0x11d26
jmp 0x11d87
jmp 0x11d89
movaps -0x570(%rbp), %xmm1
movaps %xmm1, %xmm0
psrldq $0x8, %xmm0             # xmm0 = xmm0[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movaps %xmm1, -0x2d0(%rbp)
movaps %xmm0, -0x2e0(%rbp)
movaps -0x2d0(%rbp), %xmm0
movaps -0x2e0(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x570(%rbp)
movaps -0x570(%rbp), %xmm1
movaps %xmm1, %xmm0
psrldq $0x4, %xmm0             # xmm0 = xmm0[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
movaps %xmm1, -0x2f0(%rbp)
movaps %xmm0, -0x300(%rbp)
movaps -0x2f0(%rbp), %xmm0
movaps -0x300(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x570(%rbp)
movaps -0x570(%rbp), %xmm1
movaps %xmm1, %xmm0
psrldq $0x2, %xmm0             # xmm0 = xmm0[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero
movaps %xmm1, -0x310(%rbp)
movaps %xmm0, -0x320(%rbp)
movaps -0x310(%rbp), %xmm0
movaps -0x320(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x570(%rbp)
movaps -0x570(%rbp), %xmm1
movaps %xmm1, %xmm0
psrldq $0x1, %xmm0             # xmm0 = xmm0[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero
movaps %xmm1, -0x330(%rbp)
movaps %xmm0, -0x340(%rbp)
movaps -0x330(%rbp), %xmm0
movaps -0x340(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x570(%rbp)
movl -0x570(%rbp), %eax
movzwl %ax, %eax
movb %al, %dl
movq -0x478(%rbp), %rax
movslq -0x4b4(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x478(%rbp), %rax
movslq -0x4b4(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movzbl 0x18(%rbp), %ecx
cmpl %ecx, %eax
jne 0x11e99
jmp 0x11eb2
jmp 0x11e9b
movl -0x530(%rbp), %eax
addl -0x4b4(%rbp), %eax
movl %eax, -0x4b4(%rbp)
jmp 0x114a5
movq -0x4b0(%rbp), %rax
movq %rax, -0x5a0(%rbp)
movl -0x46c(%rbp), %eax
shll $0x4, %eax
movl %eax, -0x5a4(%rbp)
movl $0x0, -0x4b4(%rbp)
movl -0x4b4(%rbp), %eax
cmpl -0x5a4(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x11f89
movq -0x5a0(%rbp), %rax
movzbl (%rax), %eax
movzbl -0x45f(%rbp), %ecx
cmpl %ecx, %eax
jne 0x11f61
movl -0x4b4(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, -0x5d4(%rbp)
movl -0x4b4(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl -0x5d4(%rbp), %eax
imull -0x46c(%rbp), %edx
addl %edx, %eax
movl %eax, -0x5a8(%rbp)
movl -0x5a8(%rbp), %eax
cmpl -0x464(%rbp), %eax
jge 0x11f5f
movl -0x5a8(%rbp), %eax
movl %eax, -0x464(%rbp)
jmp 0x11f61
jmp 0x11f63
movl -0x4b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4b4(%rbp)
movq -0x5a0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x5a0(%rbp)
jmp 0x11ed9
movq -0x4b0(%rbp), %rdi
callq 0x3050
movq -0x4a8(%rbp), %rdi
callq 0x3050
movq -0x4a0(%rbp), %rdi
callq 0x3050
movq -0x498(%rbp), %rdi
callq 0x3050
movl $0x2, %edi
movl $0xc, %esi
callq 0x3310
movq %rax, -0x5b0(%rbp)
movzbl -0x45f(%rbp), %eax
movzbl 0x20(%rbp), %ecx
addl %ecx, %eax
cmpl $0xff, %eax
jl 0x11ff0
movl $0xff, %eax
movl %eax, -0x5d8(%rbp)
jmp 0x11ffd
movzbl -0x45f(%rbp), %eax
movl %eax, -0x5d8(%rbp)
movl -0x5d8(%rbp), %eax
movw %ax, %cx
movq -0x5b0(%rbp), %rax
movw %cx, (%rax)
movl -0x468(%rbp), %ecx
movq -0x5b0(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x464(%rbp), %ecx
movq -0x5b0(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x5b0(%rbp), %rax
movw $0x0, 0xc(%rax)
movq -0x5b0(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x5b0(%rbp), %rax
movl $0x0, 0x14(%rax)
movl -0x468(%rbp), %eax
subl 0x28(%rbp), %eax
cmpl $0x0, %eax
jle 0x12078
movl -0x468(%rbp), %eax
subl 0x28(%rbp), %eax
movl %eax, -0x5dc(%rbp)
jmp 0x12082
xorl %eax, %eax
movl %eax, -0x5dc(%rbp)
jmp 0x12082
movl -0x5dc(%rbp), %eax
movl %eax, -0x524(%rbp)
movl $0x0, -0x4b4(%rbp)
movl -0x4b4(%rbp), %eax
cmpl -0x524(%rbp), %eax
jge 0x1210a
movq -0x478(%rbp), %rax
movslq -0x4b4(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x5b0(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
cmpl %ecx, %eax
jle 0x120f7
movq -0x478(%rbp), %rax
movslq -0x4b4(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movw %ax, %cx
movq -0x5b0(%rbp), %rax
movw %cx, 0xc(%rax)
movl -0x4b4(%rbp), %ecx
movq -0x5b0(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x120f9
movl -0x4b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4b4(%rbp)
jmp 0x12098
movl -0x468(%rbp), %eax
addl 0x28(%rbp), %eax
cmpl -0x458(%rbp), %eax
jle 0x12129
movl -0x458(%rbp), %eax
movl %eax, -0x5e0(%rbp)
jmp 0x12138
movl -0x468(%rbp), %eax
addl 0x28(%rbp), %eax
movl %eax, -0x5e0(%rbp)
movl -0x5e0(%rbp), %eax
movl %eax, -0x524(%rbp)
movl -0x524(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4b4(%rbp)
movl -0x4b4(%rbp), %eax
cmpl -0x458(%rbp), %eax
jge 0x121c5
movq -0x478(%rbp), %rax
movslq -0x4b4(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x5b0(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
cmpl %ecx, %eax
jle 0x121b2
movq -0x478(%rbp), %rax
movslq -0x4b4(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movw %ax, %cx
movq -0x5b0(%rbp), %rax
movw %cx, 0xc(%rax)
movl -0x4b4(%rbp), %ecx
movq -0x5b0(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x121b4
movl -0x4b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4b4(%rbp)
jmp 0x12153
movq -0x478(%rbp), %rdi
callq 0x3050
movq -0x480(%rbp), %rdi
callq 0x3050
movq -0x5b0(%rbp), %rax
addq $0x5e0, %rsp            # imm = 0x5E0
popq %rbp
retq
nopl (%rax)