// File: /workspace/github_c_makefile_star2_O2/lh3[P]miniprot/nasw-sse.c
// Function: ns_global_gs32b
void ns_global_gs32b(void *km, const char *ns, int32_t nl, const char *as, int32_t al, const ns_opt_t *opt, const uint8_t *ss, ns_rst_t *r)
{
	typedef int32_t ns_int_t;
	const int32_t ssize = sizeof(ns_int_t), vsize = 16 / ssize;
	const ns_int_t neg_inf = -0x40000000;
	NS_GEN_VAR(epi32)
	NS_GEN_PREPARE(epi32)
	NS_GEN_INIT1(epi32)

	if (tb == 0) {
		for (i = 2; i < nl; ++i) {
			NS_GEN_INIT2(epi32)
			for (j = 0; j < slen; ++j) {
				__m128i h, t, u, v;
				// H(i-3,j-1) + s(i,j)
				u = _mm_load_si128(H3 + j - 1);
				v = _mm_load_si128(S + j);
				h = _mm_add_epi32(u, v);
				// I(i,j) = max{ H(i,j-1) - q, I(i,j-1) } - e
				t = _mm_sub_epi32(last_h, go);
				t = _mm_max_epi32(t, I);
				I = _mm_sub_epi32(t, ge);
				h = _mm_max_epi32(h, I);
				// D(i,j) = max{ H(i-3,j) - q, D(i-3,j) } - e
				u = _mm_load_si128(H3 + j);
				v = _mm_load_si128(D3 + j);
				t = _mm_max_epi32(_mm_sub_epi32(u, go), v);
				t = _mm_sub_epi32(t, gei);
				_mm_store_si128(D + j, t);
				h = _mm_max_epi32(h, t);
				// A(i,j) = max{ H(i-1,j)   - r - d(i-1), A(i-1,j) }
				u = _mm_sub_epi32(_mm_load_si128(H1 + j), io);
				v = _mm_load_si128(A + j);
				t = _mm_sub_epi32(u, dim1);
				t = _mm_max_epi32(t, v);
				_mm_store_si128(A + j, t);
				h = _mm_max_epi32(h, _mm_sub_epi32(t, ai));
				// B(i,j) = max{ H(i-1,j-1) - r - d(i),   B(i-1,j) }
				u = _mm_sub_epi32(_mm_load_si128(H1 + j - 1), io);
				v = _mm_load_si128(B + j);
				t = _mm_sub_epi32(u, di);
				t = _mm_max_epi32(t, v);
				_mm_store_si128(B + j, t);
				h = _mm_max_epi32(h, _mm_sub_epi32(t, aim2));
				// C(i,j) = max{ H(i-1,j-1) - r - d(i+1), C(i-1,j) }
				v = _mm_load_si128(C + j);
				t = _mm_sub_epi32(u, dip1);
				t = _mm_max_epi32(t, v);
				_mm_store_si128(C + j, t);
				h = _mm_max_epi32(h, _mm_sub_epi32(t, aim1));
				// H(i-1,j-1)-f and H(i-2,j-1)-f
				t = _mm_sub_epi32(_mm_load_si128(H1 + j), fs);
				h = _mm_max_epi32(h, t);
				t = _mm_sub_epi32(_mm_load_si128(H2 + j), fs);
				h = _mm_max_epi32(h, t);
				// H(i-1,j)-f and H(i-2,j)-f
				t = _mm_sub_epi32(_mm_load_si128(H1 + j - 1), fs);
				h = _mm_max_epi32(h, t);
				t = _mm_sub_epi32(_mm_load_si128(H2 + j - 1), fs);
				h = _mm_max_epi32(h, t);
				// save H
				_mm_store_si128(H + j, h);
				last_h = h;
			}
			I = _mm_max_epi32(_mm_sub_epi32(last_h, goe), _mm_sub_epi32(I, ge));
			for (k = 0; k < vsize; ++k) { // lazy-F loop
				I = _mm_insert_epi32(_mm_slli_si128(I, sizeof(ns_int_t)), neg_inf, 0);
				for (j = 0; j < slen; ++j) {
					__m128i h;
					h = _mm_load_si128(H + j);
					h = _mm_max_epi32(h, I);
					_mm_store_si128(H + j, h);
					h = _mm_sub_epi32(h, goe);
					I = _mm_sub_epi32(I, ge);
					if (ns_le_epi32(I, h)) break;
				}
				if (j < slen) break;
			}
			tmp = H3, H3 = H2, H2 = H1, H1 = H, H = tmp;
			tmp = D3, D3 = D2, D2 = D1, D1 = D, D = tmp;
		}
	} else {
		for (i = 2; i < nl; ++i) {
			__m128i *tbi = tb + i * slen;
			NS_GEN_INIT2(epi32)
			for (j = 0; j < slen; ++j) {
				__m128i h, t, u, v, y, z;
				// H(i-3,j-1) + s(i,j)
				y = _mm_setzero_si128();
				z = _mm_setzero_si128();
				u = _mm_load_si128(H3 + j - 1);
				v = _mm_load_si128(S + j);
				h = _mm_add_epi32(u, v);
				// I(i,j) = max{ H(i,j-1) - q, I(i,j-1) } - e
				t = _mm_sub_epi32(last_h, go);
				z = _mm_or_si128(z, _mm_and_si128(_mm_cmpgt_epi32(I, t), _mm_set1_epi32(1<<4)));
				t = _mm_max_epi32(t, I);
				I = _mm_sub_epi32(t, ge);
				y = ns_select(_mm_cmpgt_epi32(I, h), _mm_set1_epi32(1), y);
				h = _mm_max_epi32(h, I);
				// D(i,j) = max{ H(i-3,j) - q, D(i-3,j) } - e
				u = _mm_sub_epi32(_mm_load_si128(H3 + j), go);
				v = _mm_load_si128(D3 + j);
				z = _mm_or_si128(z, _mm_and_si128(_mm_cmpgt_epi32(v, u), _mm_set1_epi32(1<<5)));
				t = _mm_max_epi32(u, v);
				t = _mm_sub_epi32(t, gei);
				_mm_store_si128(D + j, t);
				y = ns_select(_mm_cmpgt_epi32(t, h), _mm_set1_epi32(2), y);
				h = _mm_max_epi32(h, t);
				// A(i,j) = max{ H(i-1,j)   - r - d(i-1), A(i-1,j) }
				u = _mm_sub_epi32(_mm_load_si128(H1 + j), io);
				v = _mm_load_si128(A + j);
				t = _mm_sub_epi32(u, dim1);
				z = _mm_or_si128(z, _mm_and_si128(_mm_cmpgt_epi32(v, t), _mm_set1_epi32(1<<6)));
				t = _mm_max_epi32(t, v);
				_mm_store_si128(A + j, t);
				t = _mm_sub_epi32(t, ai);
				y = ns_select(_mm_cmpgt_epi32(t, h), _mm_set1_epi32(3), y);
				h = _mm_max_epi32(h, t);
				// B(i,j) = max{ H(i-1,j-1) - r - d(i),   B(i-1,j) }
				u = _mm_sub_epi32(_mm_load_si128(H1 + j - 1), io);
				v = _mm_load_si128(B + j);
				t = _mm_sub_epi32(u, di);
				z = _mm_or_si128(z, _mm_and_si128(_mm_cmpgt_epi32(v, t), _mm_set1_epi32(1<<7)));
				t = _mm_max_epi32(t, v);
				_mm_store_si128(B + j, t);
				t = _mm_sub_epi32(t, aim2);
				y = ns_select(_mm_cmpgt_epi32(t, h), _mm_set1_epi32(4), y);
				h = _mm_max_epi32(h, t);
				// C(i,j) = max{ H(i-1,j-1) - r - d(i+1), C(i-1,j) }
				v = _mm_load_si128(C + j);
				t = _mm_sub_epi32(u, dip1);
				z = _mm_or_si128(z, _mm_and_si128(_mm_cmpgt_epi32(v, t), _mm_set1_epi32(1<<8)));
				t = _mm_max_epi32(t, v);
				_mm_store_si128(C + j, t);
				t = _mm_sub_epi32(t, aim1);
				y = ns_select(_mm_cmpgt_epi32(t, h), _mm_set1_epi32(5), y);
				h = _mm_max_epi32(h, t);
				// H(i-1,j-1)-f and H(i-2,j-1)-f
				t = _mm_sub_epi32(_mm_load_si128(H1 + j), fs);
				y = ns_select(_mm_cmpgt_epi32(t, h), _mm_set1_epi32(6), y);
				h = _mm_max_epi32(h, t);
				t = _mm_sub_epi32(_mm_load_si128(H2 + j), fs);
				y = ns_select(_mm_cmpgt_epi32(t, h), _mm_set1_epi32(7), y);
				h = _mm_max_epi32(h, t);
				// H(i-1,j)-f and H(i-2,j)-f
				t = _mm_sub_epi32(_mm_load_si128(H1 + j - 1), fs);
				y = ns_select(_mm_cmpgt_epi32(t, h), _mm_set1_epi32(8), y);
				h = _mm_max_epi32(h, t);
				t = _mm_sub_epi32(_mm_load_si128(H2 + j - 1), fs);
				y = ns_select(_mm_cmpgt_epi32(t, h), _mm_set1_epi32(9), y);
				h = _mm_max_epi32(h, t);
				// save H and traceback
				z = _mm_or_si128(z, y);
				_mm_store_si128(tbi + j, z);
				_mm_store_si128(H + j, h);
				last_h = h;
			}
			I = _mm_max_epi32(_mm_sub_epi32(last_h, goe), _mm_sub_epi32(I, ge));
			for (k = 0; k < vsize; ++k) { // lazy-F loop
				I = _mm_insert_epi32(_mm_slli_si128(I, sizeof(ns_int_t)), neg_inf, 0);
				for (j = 0; j < slen; ++j) {
					__m128i h, z;
					z = _mm_load_si128(tbi + j);
					h = _mm_load_si128(H + j);
					z = _mm_or_si128(z, _mm_and_si128(_mm_cmpgt_epi32(I, h), _mm_set1_epi32(1<<9)));
					h = _mm_max_epi32(h, I);
					_mm_store_si128(tbi + j, z);
					_mm_store_si128(H + j, h);
					h = _mm_sub_epi32(h, goe);
					I = _mm_sub_epi32(I, ge);
					if (ns_le_epi32(I, h)) break;
				}
				if (j < slen) break;
			}
			tmp = H3, H3 = H2, H2 = H1, H1 = H, H = tmp;
			tmp = D3, D3 = D2, D2 = D1, D1 = D, D = tmp;
		}
	}
	r->score = *((ns_int_t*)&H1[(al-1)%slen] + (al-1)/slen);
	kfree(km, mem_H);
	kfree(km, mem_ap);
	kfree(km, nas);
	if (tb) {
		ns_backtrack(km, vsize, tb, nl, al, &r->cigar, &r->n_cigar, &r->m_cigar);
		kfree(km, mem_tb);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %r9, %r12
movl %r8d, %r14d
movl %edx, %ebp
movq 0x188(%rsp), %r9
movq 0x180(%rsp), %r10
movl (%r12), %r11d
leal 0x3(%r14), %eax
pushq $0x4
popq %r8
cltd
idivl %r8d
movq %rax, 0x10(%rsp)
andq $0x0, 0xf0(%rsp)
andl $0x0, (%r9)
movq %rdi, %r15
movl %ebp, 0x8(%r9)
movl %r14d, 0xc(%r9)
movq %r9, 0x120(%rsp)
movl $0x80000000, 0x10(%r9)  # imm = 0x80000000
leaq 0x130(%rsp), %rax
movl %r11d, 0xa0(%rsp)
testb $0x2, %r11b
jne 0x95bd
leaq 0xe8(%rsp), %r11
leaq 0xf8(%rsp), %rbx
movq %r15, %rdi
movl %ebp, %edx
movl %r14d, %r8d
movq %r12, %r9
pushq %rax
pushq %r11
pushq %rbx
pushq %r10
callq 0x8ecc
jmp 0x95e3
leaq 0xe8(%rsp), %r11
leaq 0xf8(%rsp), %rbx
movq %r15, %rdi
movl %ebp, %edx
movl %r14d, %r8d
movq %r12, %r9
pushq %rax
pushq %r11
pushq %rbx
pushq %r10
callq 0x8b6c
addq $0x20, %rsp
movq %rax, 0x48(%rsp)
movslq 0x1c(%r12), %rsi
movslq 0x10(%rsp), %r13
imulq %r13, %rsi
leaq 0x140(%rsp), %rdx
movq %r15, %rdi
callq 0x9184
movq %rax, %rsi
leal (,%r13,4), %eax
cltq
movq %r14, 0x128(%rsp)
movslq %r14d, %rcx
xorl %edx, %edx
testl %r13d, %r13d
movl $0x0, %r14d
cmovgl %r13d, %r14d
movq %rsi, 0xe0(%rsp)
movl 0x1c(%r12), %edi
cmpl %edi, %edx
jge 0x968f
imull %edx, %edi
movslq %edi, %rdi
addq 0x40(%r12), %rdi
xorl %r8d, %r8d
cmpq %r14, %r8
je 0x968b
movq 0xf8(%rsp), %r9
movq %r8, %r10
cmpq %rax, %r10
jge 0x9686
movl $0xc0000000, %r11d      # imm = 0xC0000000
cmpq %rcx, %r10
jge 0x967a
movzbl (%r9,%r10), %r11d
movsbl (%rdi,%r11), %r11d
movl %r11d, (%rsi)
addq $0x4, %rsi
addq %r13, %r10
jmp 0x9660
incq %r8
jmp 0x9650
incl %edx
jmp 0x9639
movl %ebp, 0x8(%rsp)
movsd 0x4(%r12), %xmm0
movaps %xmm0, 0x90(%rsp)
movl 0xc(%r12), %eax
movl %eax, 0xc(%rsp)
movss 0x10(%r12), %xmm0
movaps %xmm0, 0x60(%rsp)
movq %r12, 0x30(%rsp)
movq %r13, %r12
shlq $0x4, %r12
leal 0x1(%r13), %ebx
leal (%rbx,%rbx,4), %eax
imull $0x7, %r13d, %ebp
addl %eax, %ebp
movslq %ebp, %rsi
leaq 0x138(%rsp), %rdx
movq %r15, 0xb0(%rsp)
movq %r15, %rdi
callq 0x9184
movdqa 0x90(%rsp), %xmm0
leal 0x2(,%r13,2), %ecx
movslq %ecx, %rdx
shlq $0x4, %rdx
leal (%rbx,%rbx,2), %ecx
movslq %ecx, %rdi
shlq $0x4, %rdi
leal 0x4(,%r13,4), %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movq %rax, 0x50(%rsp)
movq %rcx, 0x88(%rsp)
addq %rax, %rcx
movq %rcx, 0x20(%rsp)
leaq (%rcx,%r12), %rax
leaq 0x10(%r12,%rax), %rax
movq %rax, (%rsp)
addq %r12, %rax
movq %rax, 0x28(%rsp)
addq %r12, %rax
movq %rax, 0x18(%rsp)
leaq (%rax,%r12), %r15
movq %r12, 0xc8(%rsp)
addq %r15, %r12
xorl %ebx, %ebx
pshufd $0x55, %xmm0, %xmm15    # xmm15 = xmm0[1,1,1,1]
movdqa %xmm15, %xmm1
paddd %xmm0, %xmm1
movd 0xc(%rsp), %xmm3
testb $0x6, 0xa0(%rsp)
movdqa %xmm15, 0xa0(%rsp)
jne 0x9812
movq 0x30(%rsp), %rax
movl (%rax), %ecx
movl $0x0, %eax
andl $0x1, %ecx
je 0x9814
movq 0x10(%rsp), %rax
imull 0x8(%rsp), %eax
movslq %eax, %rsi
movq %rdx, 0x80(%rsp)
leaq 0xf0(%rsp), %rdx
movq %rdi, 0x78(%rsp)
movq 0xb0(%rsp), %rdi
movdqa %xmm1, 0x110(%rsp)
movdqa %xmm3, 0x100(%rsp)
callq 0x9184
movdqa 0x100(%rsp), %xmm3
movdqa 0x110(%rsp), %xmm1
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rdx
movdqa 0x90(%rsp), %xmm0
movdqa 0xa0(%rsp), %xmm15
jmp 0x9814
xorl %eax, %eax
movq %rax, 0xb8(%rsp)
movq 0x50(%rsp), %rsi
leaq 0x10(%rsi), %rax
leaq (%rsi,%rdx), %r8
leaq (%rsi,%rdi), %r10
movq 0xc8(%rsp), %r9
leaq (%r12,%r9), %r11
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
pshufd $0x0, %xmm1, %xmm2      # xmm2 = xmm1[0,0,0,0]
pshufd $0x0, %xmm3, %xmm1      # xmm1 = xmm3[0,0,0,0]
movdqa %xmm1, 0x90(%rsp)
pshufd $0x0, 0x60(%rsp), %xmm3 # xmm3 = mem[0,0,0,0]
leaq 0x10(%rsi,%r9), %rcx
movq %rcx, 0x60(%rsp)
leaq 0x20(%rsi,%r9), %rcx
leaq 0x10(%rsi,%rdx), %rdx
addq %rsi, %rdi
addq $0x10, %rdi
movq 0x20(%rsp), %rsi
addq %rsi, %r9
addq $0x10, %r9
testl %ebp, %ebp
cmovlel %ebx, %ebp
shlq $0x4, %rbp
movdqa 0x92ef(%rip), %xmm13    # 0x12b80
movq 0x50(%rsp), %rsi
cmpq %rbx, %rbp
je 0x98a7
movdqa %xmm13, (%rsi,%rbx)
addq $0x10, %rbx
jmp 0x9896
movaps (%r10), %xmm1
andps 0x92de(%rip), %xmm1     # 0x12b90
movaps %xmm1, (%r10)
movdqa (%r8), %xmm1
xorl %r10d, %r10d
movq 0x30(%rsp), %rbx
subw 0x10(%rbx), %r10w
pinsrw $0x0, %r10d, %xmm1
xorl %r10d, %r10d
pinsrw $0x1, %r10d, %xmm1
movdqa %xmm1, (%r8)
movq 0x60(%rsp), %rsi
movdqa (%rsi), %xmm1
movzwl 0x10(%rbx), %r8d
xorl %ebx, %ebx
subw %r8w, %bx
pinsrw $0x0, %ebx, %xmm1
pinsrw $0x1, %r10d, %xmm1
movdqa %xmm1, (%rsi)
movq 0x10(%rsp), %rsi
decl %esi
movq 0xe8(%rsp), %r8
movq %r8, 0xd8(%rsp)
movq 0x130(%rsp), %r8
movq %r8, 0xd0(%rsp)
movslq %esi, %rsi
movq %rsi, 0xc0(%rsp)
movslq 0x8(%rsp), %rsi
movq %rsi, 0x110(%rsp)
movq 0xb8(%rsp), %rsi
testq %rsi, %rsi
movdqa %xmm2, 0x100(%rsp)
je 0x9f12
shlq $0x4, %r14
shlq $0x5, %r13
addq %rsi, %r13
pushq $0x2
popq %rbx
movq (%rsp), %r8
movq 0x18(%rsp), %r10
cmpq 0x110(%rsp), %rbx
jge 0xa350
movq %rdi, %rbp
movq %r10, %rsi
movq %r8, (%rsp)
movq 0x48(%rsp), %rdi
movq %rbx, 0x30(%rsp)
movzbl (%rdi,%rbx), %r10d
movdqa %xmm3, 0x50(%rsp)
cmpl $0x14, %r10d
je 0x99a9
movdqa %xmm15, 0x50(%rsp)
movq 0xd8(%rsp), %rbx
movq 0x30(%rsp), %r8
movsbl -0x1(%rbx,%r8), %edi
movl %edi, 0x20(%rsp)
movsbl (%rbx,%r8), %edi
movl %edi, 0x78(%rsp)
movsbl 0x1(%rbx,%r8), %edi
movl %edi, 0x80(%rsp)
movq 0xd0(%rsp), %rbx
movsbl (%rbx,%r8), %edi
movl %edi, 0x88(%rsp)
movsbl -0x1(%rbx,%r8), %edi
movl %edi, 0x60(%rsp)
movsbl -0x2(%rbx,%r8), %ebx
movl %ebx, 0x18(%rsp)
movq %r8, %rbx
cmpq $0x3, %r8
jb 0x9a46
movq 0xc0(%rsp), %rbx
shlq $0x4, %rbx
movdqa (%rbp,%rbx), %xmm1
pslldq $0x4, %xmm1             # xmm1 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
movdqa %xmm1, -0x10(%rbp)
movdqa (%rdx,%rbx), %xmm1
pslldq $0x4, %xmm1             # xmm1 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
movdqa %xmm1, -0x10(%rdx)
movdqa (%rcx,%rbx), %xmm1
movq 0x30(%rsp), %rbx
pslldq $0x4, %xmm1             # xmm1 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
movdqa %xmm1, -0x10(%rcx)
imull 0x10(%rsp), %r10d
movslq %r10d, %r10
shlq $0x4, %r10
addq 0xe0(%rsp), %r10
movd 0x78(%rsp), %xmm1
pshufd $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
movdqa %xmm1, 0x30(%rsp)
incq %rbx
movd 0x80(%rsp), %xmm1
pshufd $0x0, %xmm1, %xmm7      # xmm7 = xmm1[0,0,0,0]
movd 0x88(%rsp), %xmm1
pshufd $0x0, %xmm1, %xmm8      # xmm8 = xmm1[0,0,0,0]
movd 0x60(%rsp), %xmm1
pshufd $0x0, %xmm1, %xmm9      # xmm9 = xmm1[0,0,0,0]
movd 0x18(%rsp), %xmm1
pshufd $0x0, %xmm1, %xmm10     # xmm10 = xmm1[0,0,0,0]
movl 0x20(%rsp), %edi
addl 0xc(%rsp), %edi
movd %edi, %xmm1
pshufd $0x0, %xmm1, %xmm11     # xmm11 = xmm1[0,0,0,0]
xorl %edi, %edi
movdqa %xmm13, %xmm1
cmpq %rdi, %r14
je 0x9e35
movdqa (%r10,%rdi), %xmm2
paddd -0x10(%rbp,%rdi), %xmm2
psubd %xmm0, %xmm13
movdqa %xmm1, %xmm14
pcmpgtd %xmm13, %xmm14
pand 0x90b6(%rip), %xmm14    # 0x12ba0
movdqa %xmm13, %xmm12
pcmpgtd %xmm1, %xmm12
pand %xmm12, %xmm13
pandn %xmm1, %xmm12
por %xmm13, %xmm12
psubd %xmm15, %xmm12
movdqa %xmm12, %xmm1
pcmpgtd %xmm2, %xmm1
movdqa %xmm2, %xmm15
pcmpgtd %xmm12, %xmm15
pand %xmm15, %xmm2
pandn %xmm12, %xmm15
por %xmm2, %xmm15
movdqa (%rbp,%rdi), %xmm2
psubd %xmm0, %xmm2
movdqa (%rsi,%rdi), %xmm4
movdqa %xmm2, %xmm5
pcmpgtd %xmm4, %xmm5
movdqa %xmm2, %xmm6
pand %xmm5, %xmm6
pandn %xmm4, %xmm5
por %xmm6, %xmm5
psubd 0x50(%rsp), %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm15, %xmm6
movdqa %xmm6, %xmm13
pandn %xmm1, %xmm13
pcmpgtd %xmm2, %xmm4
pand 0x903a(%rip), %xmm4     # 0x12bb0
por %xmm14, %xmm4
movdqa %xmm5, (%r9,%rdi)
pand 0x9037(%rip), %xmm6     # 0x12bc0
psrld $0x1f, %xmm13
por %xmm6, %xmm13
movdqa %xmm15, %xmm1
pcmpgtd %xmm5, %xmm1
pand %xmm1, %xmm15
pandn %xmm5, %xmm1
por %xmm15, %xmm1
movdqa (%rcx,%rdi), %xmm2
psubd %xmm11, %xmm2
movdqa (%r15,%rdi), %xmm5
movdqa %xmm5, %xmm14
pcmpgtd %xmm2, %xmm14
pand 0x9002(%rip), %xmm14    # 0x12bd0
por %xmm4, %xmm14
movdqa %xmm2, %xmm6
pcmpgtd %xmm5, %xmm6
pand %xmm6, %xmm2
pandn %xmm5, %xmm6
por %xmm2, %xmm6
movdqa %xmm6, (%r15,%rdi)
psubd %xmm8, %xmm6
movdqa %xmm6, %xmm5
pcmpgtd %xmm1, %xmm5
movdqa %xmm5, %xmm2
pandn %xmm13, %xmm2
psrld $0x1e, %xmm5
por %xmm2, %xmm5
movdqa %xmm1, %xmm4
pcmpgtd %xmm6, %xmm4
pand %xmm4, %xmm1
pandn %xmm6, %xmm4
por %xmm1, %xmm4
movdqa -0x10(%rcx,%rdi), %xmm15
psubd 0x90(%rsp), %xmm15
movdqa (%r12,%rdi), %xmm1
movdqa %xmm15, %xmm2
psubd 0x30(%rsp), %xmm2
movdqa %xmm1, %xmm6
pcmpgtd %xmm2, %xmm6
movdqa %xmm2, %xmm13
pcmpgtd %xmm1, %xmm13
pand %xmm13, %xmm2
pandn %xmm1, %xmm13
por %xmm2, %xmm13
movdqa %xmm13, (%r12,%rdi)
psubd %xmm10, %xmm13
movdqa %xmm13, %xmm2
pcmpgtd %xmm4, %xmm2
movdqa %xmm2, %xmm1
pandn %xmm5, %xmm1
pand 0x8f59(%rip), %xmm6     # 0x12be0
pand 0x8f61(%rip), %xmm2     # 0x12bf0
por %xmm1, %xmm2
movdqa %xmm4, %xmm1
pcmpgtd %xmm13, %xmm1
pand %xmm1, %xmm4
pandn %xmm13, %xmm1
por %xmm4, %xmm1
movdqa (%r11,%rdi), %xmm4
psubd %xmm7, %xmm15
movdqa %xmm4, %xmm13
pcmpgtd %xmm15, %xmm13
pand 0x8f39(%rip), %xmm13    # 0x12c00
por %xmm6, %xmm13
por %xmm14, %xmm13
movdqa %xmm15, %xmm5
pcmpgtd %xmm4, %xmm5
pand %xmm5, %xmm15
pandn %xmm4, %xmm5
por %xmm15, %xmm5
movdqa 0xa0(%rsp), %xmm15
movdqa %xmm5, (%r11,%rdi)
psubd %xmm9, %xmm5
movdqa %xmm5, %xmm4
pcmpgtd %xmm1, %xmm4
movdqa %xmm4, %xmm6
pandn %xmm2, %xmm6
pand 0x8efb(%rip), %xmm4     # 0x12c10
por %xmm6, %xmm4
movdqa %xmm1, %xmm2
pcmpgtd %xmm5, %xmm2
pand %xmm2, %xmm1
pandn %xmm5, %xmm2
por %xmm1, %xmm2
movdqa (%rcx,%rdi), %xmm1
psubd %xmm3, %xmm1
movdqa %xmm1, %xmm5
pcmpgtd %xmm2, %xmm5
movdqa %xmm5, %xmm6
pandn %xmm4, %xmm6
pand 0x8ed2(%rip), %xmm5     # 0x12c20
por %xmm6, %xmm5
movdqa %xmm2, %xmm4
pcmpgtd %xmm1, %xmm4
pand %xmm4, %xmm2
pandn %xmm1, %xmm4
por %xmm2, %xmm4
movdqa (%rdx,%rdi), %xmm1
psubd %xmm3, %xmm1
movdqa %xmm1, %xmm2
pcmpgtd %xmm4, %xmm2
movdqa %xmm2, %xmm6
pandn %xmm5, %xmm6
movdqa -0x10(%rcx,%rdi), %xmm5
psrld $0x1d, %xmm2
por %xmm6, %xmm2
movdqa %xmm4, %xmm6
pcmpgtd %xmm1, %xmm6
pand %xmm6, %xmm4
pandn %xmm1, %xmm6
por %xmm4, %xmm6
psubd %xmm3, %xmm5
movdqa %xmm5, %xmm1
pcmpgtd %xmm6, %xmm1
movdqa %xmm1, %xmm4
pandn %xmm2, %xmm4
movdqa -0x10(%rdx,%rdi), %xmm2
pand 0x8e6c(%rip), %xmm1     # 0x12c30
por %xmm4, %xmm1
movdqa %xmm6, %xmm4
pcmpgtd %xmm5, %xmm4
pand %xmm4, %xmm6
pandn %xmm5, %xmm4
por %xmm6, %xmm4
psubd %xmm3, %xmm2
movdqa %xmm2, %xmm5
pcmpgtd %xmm4, %xmm5
movdqa %xmm5, %xmm6
pandn %xmm1, %xmm6
pand 0x8e48(%rip), %xmm5     # 0x12c40
por %xmm6, %xmm5
por %xmm13, %xmm5
movdqa %xmm4, %xmm13
pcmpgtd %xmm2, %xmm13
pand %xmm13, %xmm4
pandn %xmm2, %xmm13
por %xmm4, %xmm13
movdqa %xmm5, (%r13,%rdi)
movdqa %xmm13, (%rax,%rdi)
addq $0x10, %rdi
movdqa %xmm12, %xmm1
jmp 0x9abd
movdqa 0x100(%rsp), %xmm7
psubd %xmm7, %xmm13
psubd %xmm15, %xmm1
movdqa %xmm13, %xmm5
pcmpgtd %xmm1, %xmm5
pand %xmm5, %xmm13
pandn %xmm1, %xmm5
por %xmm13, %xmm5
xorl %edi, %edi
movdqa 0x8d16(%rip), %xmm13    # 0x12b80
movdqa 0x8ddd(%rip), %xmm8     # 0x12c50
cmpl $0x4, %edi
je 0x9ee5
pslldq $0x4, %xmm5             # xmm5 = zero,zero,zero,zero,xmm5[0,1,2,3,4,5,6,7,8,9,10,11]
xorl %r10d, %r10d
cmpq %r10, %r14
je 0x9ee1
movdqa (%rax,%r10), %xmm1
movdqa %xmm5, %xmm2
pcmpgtd %xmm1, %xmm2
movdqa %xmm2, %xmm4
pand %xmm8, %xmm4
por (%r13,%r10), %xmm4
movdqa %xmm5, %xmm6
pand %xmm2, %xmm6
pandn %xmm1, %xmm2
por %xmm6, %xmm2
movdqa %xmm4, (%r13,%r10)
movdqa %xmm2, (%rax,%r10)
psubd %xmm7, %xmm2
psubd %xmm15, %xmm5
movdqa %xmm5, %xmm1
pcmpgtw %xmm2, %xmm1
pmovmskb %xmm1, %r8d
testl %r8d, %r8d
je 0x9ee5
addq $0x10, %r10
jmp 0x9e80
incl %edi
jmp 0x9e73
addq 0xc8(%rsp), %r13
movq 0x28(%rsp), %r10
movq (%rsp), %rdi
movq %rdi, 0x28(%rsp)
movq %r9, %r8
movq %rsi, %r9
movq %rdx, %rdi
movq %rcx, %rdx
movq %rax, %rcx
movq %rbp, %rax
jmp 0x996f
shlq $0x4, %r14
imulq $0x70, %r13, %rsi
addq 0x88(%rsp), %rsi
movq 0x50(%rsp), %r8
addq %r8, %rsi
addq $0x10, %rsi
pushq $0x2
popq %r11
movdqa 0x8c46(%rip), %xmm4     # 0x12b80
movq 0x28(%rsp), %rbp
movq 0x18(%rsp), %r8
cmpq 0x110(%rsp), %r11
jge 0xa350
movq %rdi, %rbx
movq %r8, %r13
movq %rbp, 0x28(%rsp)
movq 0x48(%rsp), %rdi
movzbl (%rdi,%r11), %edi
movdqa %xmm3, %xmm5
cmpl $0x14, %edi
je 0x9f75
movdqa %xmm15, %xmm5
movq 0xd8(%rsp), %r8
movsbl -0x1(%r8,%r11), %ebp
movsbl (%r8,%r11), %r10d
movl %r10d, 0x20(%rsp)
movsbl 0x1(%r8,%r11), %r8d
movl %r8d, 0x60(%rsp)
movq %r11, %r8
movq 0xd0(%rsp), %r11
movsbl (%r11,%r8), %r10d
movl %r10d, 0x18(%rsp)
movsbl -0x1(%r11,%r8), %r10d
movl %r10d, 0x30(%rsp)
movsbl -0x2(%r11,%r8), %r11d
movl %r11d, 0x50(%rsp)
movq %r8, %r11
cmpq $0x3, %r8
jb 0xa00b
movq 0xc0(%rsp), %r11
shlq $0x4, %r11
movdqa (%rbx,%r11), %xmm1
pslldq $0x4, %xmm1             # xmm1 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
movdqa %xmm1, -0x10(%rbx)
movdqa (%rdx,%r11), %xmm1
pslldq $0x4, %xmm1             # xmm1 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
movdqa %xmm1, -0x10(%rdx)
movdqa (%rcx,%r11), %xmm1
movq %r8, %r11
pslldq $0x4, %xmm1             # xmm1 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
movdqa %xmm1, -0x10(%rcx)
imull 0x10(%rsp), %edi
movslq %edi, %rdi
shlq $0x4, %rdi
addq 0xe0(%rsp), %rdi
movd 0x20(%rsp), %xmm1
pshufd $0x0, %xmm1, %xmm6      # xmm6 = xmm1[0,0,0,0]
incq %r11
movd 0x60(%rsp), %xmm1
pshufd $0x0, %xmm1, %xmm7      # xmm7 = xmm1[0,0,0,0]
movd 0x18(%rsp), %xmm1
pshufd $0x0, %xmm1, %xmm8      # xmm8 = xmm1[0,0,0,0]
movd 0x30(%rsp), %xmm1
pshufd $0x0, %xmm1, %xmm9      # xmm9 = xmm1[0,0,0,0]
movd 0x50(%rsp), %xmm1
pshufd $0x0, %xmm1, %xmm10     # xmm10 = xmm1[0,0,0,0]
addl 0xc(%rsp), %ebp
movd %ebp, %xmm1
pshufd $0x0, %xmm1, %xmm11     # xmm11 = xmm1[0,0,0,0]
xorl %r10d, %r10d
movdqa %xmm4, %xmm13
movdqa %xmm4, %xmm1
movq 0x28(%rsp), %rbp
cmpq %r10, %r14
je 0xa2ae
movdqa (%rdi,%r10), %xmm2
paddd -0x10(%rbx,%r10), %xmm2
psubd %xmm0, %xmm13
movdqa %xmm13, %xmm12
pcmpgtd %xmm1, %xmm12
pand %xmm12, %xmm13
pandn %xmm1, %xmm12
por %xmm13, %xmm12
psubd %xmm15, %xmm12
movdqa %xmm2, %xmm1
pcmpgtd %xmm12, %xmm1
pand %xmm1, %xmm2
pandn %xmm12, %xmm1
por %xmm2, %xmm1
movdqa (%rbx,%r10), %xmm2
movdqa (%r13,%r10), %xmm13
psubd %xmm0, %xmm2
movdqa %xmm2, %xmm14
pcmpgtd %xmm13, %xmm14
pand %xmm14, %xmm2
pandn %xmm13, %xmm14
por %xmm2, %xmm14
psubd %xmm5, %xmm14
movdqa %xmm14, (%r9,%r10)
movdqa %xmm1, %xmm2
pcmpgtd %xmm14, %xmm2
pand %xmm2, %xmm1
pandn %xmm14, %xmm2
por %xmm1, %xmm2
movdqa (%rcx,%r10), %xmm1
psubd %xmm11, %xmm1
movdqa (%r15,%r10), %xmm13
movdqa %xmm1, %xmm14
pcmpgtd %xmm13, %xmm14
pand %xmm14, %xmm1
pandn %xmm13, %xmm14
por %xmm1, %xmm14
movdqa %xmm14, (%r15,%r10)
psubd %xmm8, %xmm14
movdqa %xmm2, %xmm13
pcmpgtd %xmm14, %xmm13
pand %xmm13, %xmm2
pandn %xmm14, %xmm13
por %xmm2, %xmm13
movdqa -0x10(%rcx,%r10), %xmm1
psubd 0x90(%rsp), %xmm1
movdqa (%r12,%r10), %xmm2
movdqa %xmm1, %xmm14
psubd %xmm6, %xmm14
movdqa %xmm14, %xmm15
pcmpgtd %xmm2, %xmm15
pand %xmm15, %xmm14
pandn %xmm2, %xmm15
por %xmm14, %xmm15
movdqa %xmm15, (%r12,%r10)
psubd %xmm10, %xmm15
movdqa %xmm13, %xmm2
pcmpgtd %xmm15, %xmm2
pand %xmm2, %xmm13
pandn %xmm15, %xmm2
movdqa 0xa0(%rsp), %xmm15
por %xmm13, %xmm2
movdqa (%rsi,%r10), %xmm13
psubd %xmm7, %xmm1
movdqa %xmm1, %xmm14
pcmpgtd %xmm13, %xmm14
pand %xmm14, %xmm1
pandn %xmm13, %xmm14
por %xmm1, %xmm14
movdqa %xmm14, (%rsi,%r10)
psubd %xmm9, %xmm14
movdqa %xmm2, %xmm1
pcmpgtd %xmm14, %xmm1
pand %xmm1, %xmm2
pandn %xmm14, %xmm1
por %xmm2, %xmm1
movdqa (%rcx,%r10), %xmm2
psubd %xmm3, %xmm2
movdqa %xmm1, %xmm13
pcmpgtd %xmm2, %xmm13
pand %xmm13, %xmm1
pandn %xmm2, %xmm13
por %xmm1, %xmm13
movdqa (%rdx,%r10), %xmm1
psubd %xmm3, %xmm1
movdqa %xmm13, %xmm2
pcmpgtd %xmm1, %xmm2
pand %xmm2, %xmm13
pandn %xmm1, %xmm2
movdqa -0x10(%rcx,%r10), %xmm1
por %xmm13, %xmm2
psubd %xmm3, %xmm1
movdqa %xmm2, %xmm14
pcmpgtd %xmm1, %xmm14
pand %xmm14, %xmm2
pandn %xmm1, %xmm14
movdqa -0x10(%rdx,%r10), %xmm1
por %xmm2, %xmm14
psubd %xmm3, %xmm1
movdqa %xmm14, %xmm13
pcmpgtd %xmm1, %xmm13
pand %xmm13, %xmm14
pandn %xmm1, %xmm13
por %xmm14, %xmm13
movdqa %xmm13, (%rax,%r10)
addq $0x10, %r10
movdqa %xmm12, %xmm1
jmp 0xa07b
movdqa 0x100(%rsp), %xmm6
psubd %xmm6, %xmm13
psubd %xmm15, %xmm1
movdqa %xmm13, %xmm5
pcmpgtd %xmm1, %xmm5
pand %xmm5, %xmm13
pandn %xmm1, %xmm5
por %xmm13, %xmm5
xorl %edi, %edi
cmpl $0x4, %edi
je 0xa331
pslldq $0x4, %xmm5             # xmm5 = zero,zero,zero,zero,xmm5[0,1,2,3,4,5,6,7,8,9,10,11]
xorl %r8d, %r8d
cmpq %r8, %r14
je 0xa32d
movdqa (%rax,%r8), %xmm1
movdqa %xmm1, %xmm2
pcmpgtd %xmm5, %xmm2
pand %xmm2, %xmm1
pandn %xmm5, %xmm2
por %xmm1, %xmm2
movdqa %xmm2, (%rax,%r8)
psubd %xmm6, %xmm2
psubd %xmm15, %xmm5
movdqa %xmm5, %xmm1
pcmpgtw %xmm2, %xmm1
pmovmskb %xmm1, %r10d
testl %r10d, %r10d
je 0xa331
addq $0x10, %r8
jmp 0xa2e7
incl %edi
jmp 0xa2da
movq %rbp, %r8
movq (%rsp), %rbp
movq %r9, (%rsp)
movq %r13, %r9
movq %rdx, %rdi
movq %rcx, %rdx
movq %rax, %rcx
movq %rbx, %rax
jmp 0x9f44
movq 0x128(%rsp), %rbx
leal -0x1(%rbx), %eax
cltd
idivl 0x10(%rsp)
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rcx, %rdx
cltq
movl (%rdx,%rax,4), %eax
movq 0x120(%rsp), %r14
movl %eax, 0x10(%r14)
movq 0x138(%rsp), %rsi
movq 0xb0(%rsp), %r15
movq %r15, %rdi
callq 0x736b
movq 0x140(%rsp), %rsi
movq %r15, %rdi
callq 0x736b
movq %r15, %rdi
movq 0x48(%rsp), %rsi
callq 0x736b
movq 0xb8(%rsp), %rdx
testq %rdx, %rdx
movl 0x8(%rsp), %ecx
je 0xa3fd
leaq 0x18(%r14), %r9
leaq 0x4(%r14), %rax
pushq $0x4
popq %rsi
movq %r15, %rdi
movl %ebx, %r8d
pushq %rax
pushq %r14
callq 0x91a2
popq %rax
popq %rcx
movq 0xf0(%rsp), %rsi
movq %r15, %rdi
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x736b
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq