// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/contrib/ssw/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;
	/* 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;
	uint8_t *t;
	int32_t column_len;
    alignment_end* bests;

	/* 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) {
		const __m128i* vP;
		__m128i* pv;
		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. */
		vP = vProfile + ref[i] * segLen; /* Right part of the vProfile */

		/* Swap the 2 H buffers. */
		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 */
        /* reset pointers to the start of the saved data */
        j = 0;
        vH = _mm_load_si128 (pvHStore + j);

        /*  the computed vF value is for the given column.  since */
        /*  we are at the end, we need to shift the vF value over */
        /*  to the next column. */
        vF = _mm_slli_si128 (vF, 1);
        vTemp = _mm_subs_epu8 (vH, vGapO);
		vTemp = _mm_subs_epu8 (vF, vTemp);
		vTemp = _mm_cmpeq_epi8 (vTemp, vZero);
		cmp  = _mm_movemask_epi8 (vTemp);

        while (cmp != 0xffff)
        {
            vH = _mm_max_epu8 (vH, vF);
			vMaxColumn = _mm_max_epu8(vMaxColumn, vH);
            _mm_store_si128 (pvHStore + j, vH);
            vF = _mm_subs_epu8 (vF, vGapE);
            j++;
            if (j >= segLen)
            {
                j = 0;
                vF = _mm_slli_si128 (vF, 1);
            }
            vH = _mm_load_si128 (pvHStore + j);

            vTemp = _mm_subs_epu8 (vH, vGapO);
            vTemp = _mm_subs_epu8 (vF, vTemp);
            vTemp = _mm_cmpeq_epi8 (vTemp, vZero);
            cmp  = _mm_movemask_epi8 (vTemp);
        }

		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. */
	t = (uint8_t*)pvHmax;
	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. */
	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 $0x680, %rsp            # imm = 0x680
movl %r8d, -0x668(%rbp)
movl %ecx, %eax
movl -0x668(%rbp), %ecx
movl %eax, -0x664(%rbp)
movl %edx, %eax
movl -0x664(%rbp), %edx
movl %eax, -0x660(%rbp)
movl %esi, %eax
movl -0x660(%rbp), %esi
movl %eax, -0x65c(%rbp)
movq %rdi, %r8
movl -0x65c(%rbp), %edi
movb %r9b, %al
movl 0x28(%rbp), %r9d
movb 0x20(%rbp), %r9b
movb 0x18(%rbp), %r9b
movq 0x10(%rbp), %r9
movq %r8, -0x4f0(%rbp)
movb %dil, -0x4f1(%rbp)
movl %esi, -0x4f8(%rbp)
movl %edx, -0x4fc(%rbp)
movb %cl, -0x4fd(%rbp)
movb %al, -0x4fe(%rbp)
movb $0x0, -0x4ff(%rbp)
movl -0x4fc(%rbp), %eax
decl %eax
movl %eax, -0x504(%rbp)
movl $0xffffffff, -0x508(%rbp) # imm = 0xFFFFFFFF
movl -0x4fc(%rbp), %ecx
movl %ecx, %eax
addl $0xf, %eax
addl $0x1e, %ecx
testl %eax, %eax
cmovsl %ecx, %eax
sarl $0x4, %eax
movl %eax, -0x50c(%rbp)
movslq -0x4f8(%rbp), %rdi
movl $0x1, %esi
callq 0x29b0c0
movq %rax, -0x518(%rbp)
movslq -0x4f8(%rbp), %rdi
movl $0x4, %esi
callq 0x29b0c0
movq %rax, -0x520(%rbp)
movl $0x0, -0x4e8(%rbp)
movl -0x4e8(%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, -0x530(%rbp)
movslq -0x50c(%rbp), %rdi
movl $0x10, %esi
movq %rsi, -0x658(%rbp)
callq 0x29b0c0
movq -0x658(%rbp), %rsi
movq %rax, -0x538(%rbp)
movslq -0x50c(%rbp), %rdi
callq 0x29b0c0
movq -0x658(%rbp), %rsi
movq %rax, -0x540(%rbp)
movslq -0x50c(%rbp), %rdi
callq 0x29b0c0
movq -0x658(%rbp), %rsi
movq %rax, -0x548(%rbp)
movslq -0x50c(%rbp), %rdi
callq 0x29b0c0
movq %rax, -0x550(%rbp)
movb -0x4fd(%rbp), %al
movb %al, -0x4e1(%rbp)
movb -0x4e1(%rbp), %al
movb %al, -0x64b(%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, -0x570(%rbp)
movb -0x4fe(%rbp), %al
movb %al, -0x4e2(%rbp)
movb -0x4e2(%rbp), %al
movb %al, -0x64a(%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, -0x580(%rbp)
movb 0x20(%rbp), %al
movb %al, -0x4e3(%rbp)
movb -0x4e3(%rbp), %al
movb %al, -0x649(%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, -0x590(%rbp)
movdqa -0x530(%rbp), %xmm0
movdqa %xmm0, -0x5a0(%rbp)
movdqa -0x530(%rbp), %xmm0
movdqa %xmm0, -0x5b0(%rbp)
movl $0x0, -0x5c8(%rbp)
movl -0x4f8(%rbp), %eax
movl %eax, -0x5cc(%rbp)
movl $0x1, -0x5d0(%rbp)
movsbl -0x4f1(%rbp), %eax
cmpl $0x1, %eax
jne 0x29d749
movl -0x4f8(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x5c8(%rbp)
movl $0xffffffff, -0x5cc(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x5d0(%rbp) # imm = 0xFFFFFFFF
movl -0x5c8(%rbp), %eax
movl %eax, -0x554(%rbp)
movl -0x554(%rbp), %eax
cmpl -0x5cc(%rbp), %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x29e27a
movaps -0x530(%rbp), %xmm0
movaps %xmm0, -0x620(%rbp)
movaps -0x530(%rbp), %xmm0
movaps %xmm0, -0x630(%rbp)
movq -0x538(%rbp), %rax
movl -0x50c(%rbp), %ecx
decl %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps (%rax,%rcx), %xmm0
movaps %xmm0, -0x640(%rbp)
movaps -0x640(%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, -0x640(%rbp)
movq 0x10(%rbp), %rax
movq -0x4f0(%rbp), %rcx
movslq -0x554(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
imull -0x50c(%rbp), %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x5f0(%rbp)
movq -0x540(%rbp), %rax
movq %rax, -0x5f8(%rbp)
movq -0x538(%rbp), %rax
movq %rax, -0x540(%rbp)
movq -0x5f8(%rbp), %rax
movq %rax, -0x538(%rbp)
movl $0x0, -0x558(%rbp)
movl -0x558(%rbp), %eax
cmpl -0x50c(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x29dbaf
movdqa -0x640(%rbp), %xmm1
movq -0x5f0(%rbp), %rax
movslq -0x558(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x498(%rbp)
movq -0x498(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm1, -0x4d0(%rbp)
movdqa %xmm0, -0x4e0(%rbp)
movdqa -0x4d0(%rbp), %xmm0
movdqa -0x4e0(%rbp), %xmm1
paddusb %xmm1, %xmm0
movdqa %xmm0, -0x640(%rbp)
movdqa -0x640(%rbp), %xmm1
movdqa -0x590(%rbp), %xmm0
movdqa %xmm1, -0x380(%rbp)
movdqa %xmm0, -0x390(%rbp)
movdqa -0x380(%rbp), %xmm0
movdqa -0x390(%rbp), %xmm1
psubusb %xmm1, %xmm0
movdqa %xmm0, -0x640(%rbp)
movq -0x548(%rbp), %rax
movslq -0x558(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x4a0(%rbp)
movq -0x4a0(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x610(%rbp)
movdqa -0x640(%rbp), %xmm1
movdqa -0x610(%rbp), %xmm0
movdqa %xmm1, -0x180(%rbp)
movdqa %xmm0, -0x190(%rbp)
movdqa -0x180(%rbp), %xmm0
movdqa -0x190(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x640(%rbp)
movdqa -0x640(%rbp), %xmm1
movdqa -0x620(%rbp), %xmm0
movdqa %xmm1, -0x1a0(%rbp)
movdqa %xmm0, -0x1b0(%rbp)
movdqa -0x1a0(%rbp), %xmm0
movdqa -0x1b0(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x640(%rbp)
movdqa -0x630(%rbp), %xmm1
movdqa -0x640(%rbp), %xmm0
movdqa %xmm1, -0x1c0(%rbp)
movdqa %xmm0, -0x1d0(%rbp)
movdqa -0x1c0(%rbp), %xmm0
movdqa -0x1d0(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x630(%rbp)
movq -0x538(%rbp), %rax
movslq -0x558(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x640(%rbp), %xmm0
movq %rax, -0x118(%rbp)
movdqa %xmm0, -0x130(%rbp)
movdqa -0x130(%rbp), %xmm0
movq -0x118(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x640(%rbp), %xmm1
movdqa -0x570(%rbp), %xmm0
movdqa %xmm1, -0x3a0(%rbp)
movdqa %xmm0, -0x3b0(%rbp)
movdqa -0x3a0(%rbp), %xmm0
movdqa -0x3b0(%rbp), %xmm1
psubusb %xmm1, %xmm0
movdqa %xmm0, -0x640(%rbp)
movdqa -0x610(%rbp), %xmm1
movdqa -0x580(%rbp), %xmm0
movdqa %xmm1, -0x3c0(%rbp)
movdqa %xmm0, -0x3d0(%rbp)
movdqa -0x3c0(%rbp), %xmm0
movdqa -0x3d0(%rbp), %xmm1
psubusb %xmm1, %xmm0
movdqa %xmm0, -0x610(%rbp)
movdqa -0x610(%rbp), %xmm1
movdqa -0x640(%rbp), %xmm0
movdqa %xmm1, -0x1e0(%rbp)
movdqa %xmm0, -0x1f0(%rbp)
movdqa -0x1e0(%rbp), %xmm0
movdqa -0x1f0(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x610(%rbp)
movq -0x548(%rbp), %rax
movslq -0x558(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x610(%rbp), %xmm0
movq %rax, -0x138(%rbp)
movdqa %xmm0, -0x150(%rbp)
movdqa -0x150(%rbp), %xmm0
movq -0x138(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x620(%rbp), %xmm1
movdqa -0x580(%rbp), %xmm0
movdqa %xmm1, -0x3e0(%rbp)
movdqa %xmm0, -0x3f0(%rbp)
movdqa -0x3e0(%rbp), %xmm0
movdqa -0x3f0(%rbp), %xmm1
psubusb %xmm1, %xmm0
movdqa %xmm0, -0x620(%rbp)
movdqa -0x620(%rbp), %xmm1
movdqa -0x640(%rbp), %xmm0
movdqa %xmm1, -0x200(%rbp)
movdqa %xmm0, -0x210(%rbp)
movdqa -0x200(%rbp), %xmm0
movdqa -0x210(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x620(%rbp)
movq -0x540(%rbp), %rax
movslq -0x558(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x4a8(%rbp)
movq -0x4a8(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x640(%rbp)
movl -0x558(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x558(%rbp)
jmp 0x29d828
movl $0x0, -0x558(%rbp)
movq -0x538(%rbp), %rax
movslq -0x558(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x4b0(%rbp)
movq -0x4b0(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm0, -0x640(%rbp)
movaps -0x620(%rbp), %xmm0
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movaps %xmm0, -0x620(%rbp)
movaps -0x640(%rbp), %xmm1
movaps -0x570(%rbp), %xmm0
movaps %xmm1, -0x400(%rbp)
movaps %xmm0, -0x410(%rbp)
movaps -0x400(%rbp), %xmm0
movaps -0x410(%rbp), %xmm1
psubusb %xmm1, %xmm0
movaps %xmm0, -0x5c0(%rbp)
movaps -0x620(%rbp), %xmm1
movaps -0x5c0(%rbp), %xmm0
movaps %xmm1, -0x420(%rbp)
movaps %xmm0, -0x430(%rbp)
movaps -0x420(%rbp), %xmm0
movaps -0x430(%rbp), %xmm1
psubusb %xmm1, %xmm0
movaps %xmm0, -0x5c0(%rbp)
movaps -0x5c0(%rbp), %xmm1
movaps -0x530(%rbp), %xmm0
movaps %xmm1, -0xc0(%rbp)
movaps %xmm0, -0xd0(%rbp)
movaps -0xc0(%rbp), %xmm0
movaps -0xd0(%rbp), %xmm1
pcmpeqb %xmm1, %xmm0
movdqa %xmm0, -0x5c0(%rbp)
movdqa -0x5c0(%rbp), %xmm0
movdqa %xmm0, -0x90(%rbp)
movdqa -0x90(%rbp), %xmm0
pmovmskb %xmm0, %eax
movl %eax, -0x5fc(%rbp)
cmpl $0xffff, -0x5fc(%rbp)   # imm = 0xFFFF
je 0x29deed
movdqa -0x640(%rbp), %xmm1
movdqa -0x620(%rbp), %xmm0
movdqa %xmm1, -0x220(%rbp)
movdqa %xmm0, -0x230(%rbp)
movdqa -0x220(%rbp), %xmm0
movdqa -0x230(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x640(%rbp)
movdqa -0x630(%rbp), %xmm1
movdqa -0x640(%rbp), %xmm0
movdqa %xmm1, -0x240(%rbp)
movdqa %xmm0, -0x250(%rbp)
movdqa -0x240(%rbp), %xmm0
movdqa -0x250(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x630(%rbp)
movq -0x538(%rbp), %rax
movslq -0x558(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x640(%rbp), %xmm0
movq %rax, -0x158(%rbp)
movdqa %xmm0, -0x170(%rbp)
movdqa -0x170(%rbp), %xmm0
movq -0x158(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x620(%rbp), %xmm1
movdqa -0x580(%rbp), %xmm0
movdqa %xmm1, -0x440(%rbp)
movdqa %xmm0, -0x450(%rbp)
movdqa -0x440(%rbp), %xmm0
movdqa -0x450(%rbp), %xmm1
psubusb %xmm1, %xmm0
movdqa %xmm0, -0x620(%rbp)
movl -0x558(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x558(%rbp)
movl -0x558(%rbp), %eax
cmpl -0x50c(%rbp), %eax
jl 0x29ddf9
movl $0x0, -0x558(%rbp)
movaps -0x620(%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, -0x620(%rbp)
movq -0x538(%rbp), %rax
movslq -0x558(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x4b8(%rbp)
movq -0x4b8(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm0, -0x640(%rbp)
movaps -0x640(%rbp), %xmm1
movaps -0x570(%rbp), %xmm0
movaps %xmm1, -0x460(%rbp)
movaps %xmm0, -0x470(%rbp)
movaps -0x460(%rbp), %xmm0
movaps -0x470(%rbp), %xmm1
psubusb %xmm1, %xmm0
movaps %xmm0, -0x5c0(%rbp)
movaps -0x620(%rbp), %xmm1
movaps -0x5c0(%rbp), %xmm0
movaps %xmm1, -0x480(%rbp)
movaps %xmm0, -0x490(%rbp)
movaps -0x480(%rbp), %xmm0
movaps -0x490(%rbp), %xmm1
psubusb %xmm1, %xmm0
movaps %xmm0, -0x5c0(%rbp)
movaps -0x5c0(%rbp), %xmm1
movaps -0x530(%rbp), %xmm0
movaps %xmm1, -0xe0(%rbp)
movaps %xmm0, -0xf0(%rbp)
movaps -0xe0(%rbp), %xmm0
movaps -0xf0(%rbp), %xmm1
pcmpeqb %xmm1, %xmm0
movdqa %xmm0, -0x5c0(%rbp)
movdqa -0x5c0(%rbp), %xmm0
movdqa %xmm0, -0xa0(%rbp)
movdqa -0xa0(%rbp), %xmm0
pmovmskb %xmm0, %eax
movl %eax, -0x5fc(%rbp)
jmp 0x29dcbb
movaps -0x5a0(%rbp), %xmm1
movaps -0x630(%rbp), %xmm0
movaps %xmm1, -0x260(%rbp)
movaps %xmm0, -0x270(%rbp)
movaps -0x260(%rbp), %xmm0
movaps -0x270(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x5a0(%rbp)
movaps -0x5b0(%rbp), %xmm1
movaps -0x5a0(%rbp), %xmm0
movaps %xmm1, -0x100(%rbp)
movaps %xmm0, -0x110(%rbp)
movaps -0x100(%rbp), %xmm0
movaps -0x110(%rbp), %xmm1
pcmpeqb %xmm1, %xmm0
movdqa %xmm0, -0x5c0(%rbp)
movdqa -0x5c0(%rbp), %xmm0
movdqa %xmm0, -0xb0(%rbp)
movdqa -0xb0(%rbp), %xmm0
pmovmskb %xmm0, %eax
movl %eax, -0x5fc(%rbp)
cmpl $0xffff, -0x5fc(%rbp)   # imm = 0xFFFF
je 0x29e151
movaps -0x5a0(%rbp), %xmm0
movaps %xmm0, -0x5b0(%rbp)
movaps -0x5a0(%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, -0x280(%rbp)
movaps %xmm0, -0x290(%rbp)
movaps -0x280(%rbp), %xmm0
movaps -0x290(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x5a0(%rbp)
movaps -0x5a0(%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, -0x2a0(%rbp)
movaps %xmm0, -0x2b0(%rbp)
movaps -0x2a0(%rbp), %xmm0
movaps -0x2b0(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x5a0(%rbp)
movaps -0x5a0(%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, -0x2c0(%rbp)
movaps %xmm0, -0x2d0(%rbp)
movaps -0x2c0(%rbp), %xmm0
movaps -0x2d0(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x5a0(%rbp)
movaps -0x5a0(%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, -0x2e0(%rbp)
movaps %xmm0, -0x2f0(%rbp)
movaps -0x2e0(%rbp), %xmm0
movaps -0x2f0(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x5a0(%rbp)
movl -0x5a0(%rbp), %eax
movzwl %ax, %eax
movb %al, -0x641(%rbp)
movdqa -0x5b0(%rbp), %xmm0
movdqa %xmm0, -0x5a0(%rbp)
movzbl -0x641(%rbp), %eax
movzbl -0x4ff(%rbp), %ecx
cmpl %ecx, %eax
setg %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x29e14f
movb -0x641(%rbp), %al
movb %al, -0x4ff(%rbp)
movzbl -0x4ff(%rbp), %eax
movzbl 0x20(%rbp), %ecx
addl %ecx, %eax
cmpl $0xff, %eax
jl 0x29e0d8
jmp 0x29e27a
movl -0x554(%rbp), %eax
movl %eax, -0x508(%rbp)
movl $0x0, -0x558(%rbp)
movl -0x558(%rbp), %eax
cmpl -0x50c(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x29e14d
movq -0x538(%rbp), %rax
movslq -0x558(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa (%rax), %xmm0
movq -0x550(%rbp), %rax
movslq -0x558(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa %xmm0, (%rax)
movl -0x558(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x558(%rbp)
jmp 0x29e0ee
jmp 0x29e14f
jmp 0x29e151
movaps -0x630(%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, -0x300(%rbp)
movaps %xmm0, -0x310(%rbp)
movaps -0x300(%rbp), %xmm0
movaps -0x310(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x630(%rbp)
movaps -0x630(%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, -0x320(%rbp)
movaps %xmm0, -0x330(%rbp)
movaps -0x320(%rbp), %xmm0
movaps -0x330(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x630(%rbp)
movaps -0x630(%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, -0x340(%rbp)
movaps %xmm0, -0x350(%rbp)
movaps -0x340(%rbp), %xmm0
movaps -0x350(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x630(%rbp)
movaps -0x630(%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, -0x360(%rbp)
movaps %xmm0, -0x370(%rbp)
movaps -0x360(%rbp), %xmm0
movaps -0x370(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movaps %xmm0, -0x630(%rbp)
movl -0x630(%rbp), %eax
movzwl %ax, %eax
movb %al, %dl
movq -0x518(%rbp), %rax
movslq -0x554(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x518(%rbp), %rax
movslq -0x554(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movzbl 0x18(%rbp), %ecx
cmpl %ecx, %eax
jne 0x29e261
jmp 0x29e27a
jmp 0x29e263
movl -0x5d0(%rbp), %eax
addl -0x554(%rbp), %eax
movl %eax, -0x554(%rbp)
jmp 0x29d755
movq -0x550(%rbp), %rax
movq %rax, -0x5d8(%rbp)
movl -0x50c(%rbp), %eax
shll $0x4, %eax
movl %eax, -0x5dc(%rbp)
movl $0x0, -0x554(%rbp)
movl -0x554(%rbp), %eax
cmpl -0x5dc(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x29e351
movq -0x5d8(%rbp), %rax
movzbl (%rax), %eax
movzbl -0x4ff(%rbp), %ecx
cmpl %ecx, %eax
jne 0x29e329
movl -0x554(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, -0x66c(%rbp)
movl -0x554(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl -0x66c(%rbp), %eax
imull -0x50c(%rbp), %edx
addl %edx, %eax
movl %eax, -0x648(%rbp)
movl -0x648(%rbp), %eax
cmpl -0x504(%rbp), %eax
jge 0x29e327
movl -0x648(%rbp), %eax
movl %eax, -0x504(%rbp)
jmp 0x29e329
jmp 0x29e32b
movl -0x554(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x554(%rbp)
movq -0x5d8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x5d8(%rbp)
jmp 0x29e2a1
movq -0x550(%rbp), %rdi
callq 0x29b160
movq -0x548(%rbp), %rdi
callq 0x29b160
movq -0x540(%rbp), %rdi
callq 0x29b160
movq -0x538(%rbp), %rdi
callq 0x29b160
movl $0x2, %edi
movl $0xc, %esi
callq 0x29b0c0
movq %rax, -0x5e8(%rbp)
movzbl -0x4ff(%rbp), %eax
movzbl 0x20(%rbp), %ecx
addl %ecx, %eax
cmpl $0xff, %eax
jl 0x29e3b8
movl $0xff, %eax
movl %eax, -0x670(%rbp)
jmp 0x29e3c5
movzbl -0x4ff(%rbp), %eax
movl %eax, -0x670(%rbp)
movl -0x670(%rbp), %eax
movw %ax, %cx
movq -0x5e8(%rbp), %rax
movw %cx, (%rax)
movl -0x508(%rbp), %ecx
movq -0x5e8(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x504(%rbp), %ecx
movq -0x5e8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x5e8(%rbp), %rax
movw $0x0, 0xc(%rax)
movq -0x5e8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x5e8(%rbp), %rax
movl $0x0, 0x14(%rax)
movl -0x508(%rbp), %eax
subl 0x28(%rbp), %eax
cmpl $0x0, %eax
jle 0x29e440
movl -0x508(%rbp), %eax
subl 0x28(%rbp), %eax
movl %eax, -0x674(%rbp)
jmp 0x29e44a
xorl %eax, %eax
movl %eax, -0x674(%rbp)
jmp 0x29e44a
movl -0x674(%rbp), %eax
movl %eax, -0x5c4(%rbp)
movl $0x0, -0x554(%rbp)
movl -0x554(%rbp), %eax
cmpl -0x5c4(%rbp), %eax
jge 0x29e4d2
movq -0x518(%rbp), %rax
movslq -0x554(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x5e8(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
cmpl %ecx, %eax
jle 0x29e4bf
movq -0x518(%rbp), %rax
movslq -0x554(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movw %ax, %cx
movq -0x5e8(%rbp), %rax
movw %cx, 0xc(%rax)
movl -0x554(%rbp), %ecx
movq -0x5e8(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x29e4c1
movl -0x554(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x554(%rbp)
jmp 0x29e460
movl -0x508(%rbp), %eax
addl 0x28(%rbp), %eax
cmpl -0x4f8(%rbp), %eax
jle 0x29e4f1
movl -0x4f8(%rbp), %eax
movl %eax, -0x678(%rbp)
jmp 0x29e500
movl -0x508(%rbp), %eax
addl 0x28(%rbp), %eax
movl %eax, -0x678(%rbp)
movl -0x678(%rbp), %eax
movl %eax, -0x5c4(%rbp)
movl -0x5c4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x554(%rbp)
movl -0x554(%rbp), %eax
cmpl -0x4f8(%rbp), %eax
jge 0x29e58d
movq -0x518(%rbp), %rax
movslq -0x554(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x5e8(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
cmpl %ecx, %eax
jle 0x29e57a
movq -0x518(%rbp), %rax
movslq -0x554(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movw %ax, %cx
movq -0x5e8(%rbp), %rax
movw %cx, 0xc(%rax)
movl -0x554(%rbp), %ecx
movq -0x5e8(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x29e57c
movl -0x554(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x554(%rbp)
jmp 0x29e51b
movq -0x518(%rbp), %rdi
callq 0x29b160
movq -0x520(%rbp), %rdi
callq 0x29b160
movq -0x5e8(%rbp), %rax
addq $0x680, %rsp            # imm = 0x680
popq %rbp
retq
nopw %cs:(%rax,%rax)