// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/ksw2/ksw2_extd.c
// Function: ksw_extd
void ksw_extd(void *km, int qlen, const uint8_t *query, int tlen, const uint8_t *target, int8_t m, const int8_t *mat,
			  int8_t gapo, int8_t gape, int8_t gapo2, int8_t gape2, int w, int zdrop, int flag, ksw_extz_t *ez)
{
	eh_t *eh;
	int8_t *qp; // query profile
	int32_t i, j, k, max_j = 0, gapoe = gapo + gape, gapoe2 = gapo2 + gape2, n_col, *off = 0, with_cigar = !(flag&KSW_EZ_SCORE_ONLY);
	uint8_t *z = 0; // backtrack matrix; in each cell: f<<4|e<<2|h; in principle, we can halve the memory, but backtrack will be more complex

	ksw_reset_extz(ez);

	// allocate memory
	if (w < 0) w = tlen > qlen? tlen : qlen;
	n_col = qlen < 2*w+1? qlen : 2*w+1; // maximum #columns of the backtrack matrix
	qp = (int8_t*)kmalloc(km, qlen * m);
	eh = (eh_t*)kcalloc(km, qlen + 1, sizeof(eh_t));
	if (with_cigar) {
		z = (uint8_t*)kmalloc(km, (size_t)n_col * tlen);
		off = (int32_t*)kcalloc(km, tlen, 4);
	}

	// generate the query profile
	for (k = i = 0; k < m; ++k) {
		const int8_t *p = &mat[k * m];
		for (j = 0; j < qlen; ++j) qp[i++] = p[query[j]];
	}

	// fill the first row
	eh[0].h = 0, eh[0].e = -gapoe - gapoe, eh[0].e2 = -gapoe2 - gapoe2;
	for (j = 1; j <= qlen && j <= w; ++j) {
		int tmp;
		eh[j].h = -(gapo + gape * j) > -(gapo2 + gape2 * j)? -(gapo + gape * j) : -(gapo2 + gape2 * j);
		tmp = -(gapoe + gape * j) > -(gapoe2 + gape2 * j)? -(gapoe + gape * j) : -(gapoe2 + gape2 * j);
		eh[j].e = tmp - gapoe;
		eh[j].e2 = tmp - gapoe2;
	}
	for (; j <= qlen; ++j) eh[j].h = eh[j].e = eh[j].e2 = KSW_NEG_INF; // everything is -inf outside the band

	// DP loop
	for (i = 0; i < tlen; ++i) { // target sequence is in the outer loop
		int32_t f, f2, h1, st, en, max = KSW_NEG_INF, tmp;
		int8_t *q = &qp[target[i] * qlen];
		st = i > w? i - w : 0;
		en = i + w < qlen - 1? i + w : qlen - 1;
		tmp = -(gapoe + gape * i) > -(gapoe2 + gape2 * i)? -(gapoe + gape * i) : -(gapoe2 + gape2 * i);
		h1 = st > 0? KSW_NEG_INF : tmp;
		f  = st > 0? KSW_NEG_INF : tmp - gapoe;
		f2 = st > 0? KSW_NEG_INF : tmp - gapoe2;
		if (!with_cigar) {
			for (j = st; j <= en; ++j) {
				eh_t *p = &eh[j];
				int32_t h = p->h, h2, e = p->e, e2 = p->e2;
				p->h = h1;
				h += q[j];
				h = h >= e?  h : e;
				h = h >= f?  h : f;
				h = h >= e2? h : e2;
				h = h >= f2? h : f2;
				h1 = h;
				max_j = max > h? max_j : j;
				max   = max > h? max   : h;
				h -= gapoe;
				e -= gape;
				e  = e > h? e : h;
				p->e = e;
				f -= gape;
				f  = f > h? f : h;
				h2 = h1 - gapoe2;
				e2-= gape2;
				e2 = e2 > h2? e2 : h2;
				p->e2 = e2;
				f2-= gape2;
				f2 = f2 > h2? f2 : h2;
			}
		} else if (!(flag&KSW_EZ_RIGHT)) {
			uint8_t *zi = &z[(long)i * n_col];
			off[i] = st;
			for (j = st; j <= en; ++j) {
				eh_t *p = &eh[j];
				int32_t h = p->h, h2, e = p->e, e2 = p->e2;
				uint8_t d; // direction
				p->h = h1;
				h += q[j];
				d = h >= e?  0 : 1;
				h = h >= e?  h : e;
				d = h >= f?  d : 2;
				h = h >= f?  h : f;
				d = h >= e2? d : 3;
				h = h >= e2? h : e2;
				d = h >= f2? d : 4;
				h = h >= f2? h : f2;
				h1 = h;
				max_j = max > h? max_j : j;
				max   = max > h? max   : h;
				h -= gapoe;
				e -= gape;
				d |= e > h? 1<<3 : 0;
				e  = e > h? e    : h;
				p->e = e;
				f -= gape;
				d |= f > h? 1<<4 : 0; // if we want to halve the memory, use one bit only, instead of two
				f  = f > h? f    : h;
				h2 = h1 - gapoe2;
				e2-= gape2;
				d |= e2 > h2? 1<<5 : 0;
				e2 = e2 > h2? e2 : h2;
				p->e2 = e2;
				f2-= gape2;
				d |= f2 > h2? 1<<6 : 0;
				f2 = f2 > h2? f2 : h2;
				zi[j - st] = d; // z[i,j] keeps h for the current cell and e/f for the next cell
			}
		} else {
			uint8_t *zi = &z[(long)i * n_col];
			off[i] = st;
			for (j = st; j <= en; ++j) {
				eh_t *p = &eh[j];
				int32_t h = p->h, h2, e = p->e, e2 = p->e2;
				uint8_t d; // direction
				p->h = h1;
				h += q[j];
				d = h > e?  0 : 1;
				h = h > e?  h : e;
				d = h > f?  d : 2;
				h = h > f?  h : f;
				d = h > e2? d : 3;
				h = h > e2? h : e2;
				d = h > f2? d : 4;
				h = h > f2? h : f2;
				h1 = h;
				max_j = max > h? max_j : j;
				max   = max > h? max   : h;
				h -= gapoe;
				e -= gape;
				d |= e >= h? 1<<3 : 0;
				e  = e >= h? e    : h;
				p->e = e;
				f -= gape;
				d |= f >= h? 1<<4 : 0; // if we want to halve the memory, use one bit only, instead of two
				f  = f >= h? f    : h;
				h2 = h1 - gapoe2;
				e2-= gape2;
				d |= e2 >= h2? 1<<5 : 0;
				e2 = e2 >= h2? e2 : h2;
				p->e2 = e2;
				f2-= gape2;
				d |= f2 >= h2? 1<<6 : 0;
				f2 = f2 >= h2? f2 : h2;
				zi[j - st] = d; // z[i,j] keeps h for the current cell and e/f for the next cell
			}
		}
		eh[j].h = h1, eh[j].e = KSW_NEG_INF;
		// update ez
		if (en == qlen - 1 && eh[qlen].h > ez->mqe)
			ez->mqe = eh[qlen].h, ez->mqe_t = i;
		if (i == tlen - 1)
			ez->mte = max, ez->mte_q = max_j;
		if (ksw_apply_zdrop(ez, 0, max, i, max_j, zdrop, gape2)) break;
		if (i == tlen - 1 && en == qlen - 1)
			ez->score = eh[qlen].h;
	}
	kfree(km, qp); kfree(km, eh);
	if (with_cigar) {
		int rev_cigar = !!(flag & KSW_EZ_REV_CIGAR);
		if (!ez->zdropped && !(flag&KSW_EZ_EXTZ_ONLY))
			ksw_backtrack(km, 0, rev_cigar, 0, z, off, 0, n_col, tlen-1, qlen-1, &ez->m_cigar, &ez->n_cigar, &ez->cigar);
		else if (ez->max_t >= 0 && ez->max_q >= 0)
			ksw_backtrack(km, 0, rev_cigar, 0, z, off, 0, n_col, ez->max_t, ez->max_q, &ez->m_cigar, &ez->n_cigar, &ez->cigar);
		kfree(km, z); kfree(km, off);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r8, 0xd0(%rsp)
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
movq 0x160(%rsp), %rsi
movl 0x158(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x150(%rsp), %eax
movl %eax, 0x44(%rsp)
movq 0x120(%rsp), %r13
movl 0x148(%rsp), %eax
movsbl 0x138(%rsp), %edx
movq %rdx, 0x10(%rsp)
movsbl 0x140(%rsp), %edx
movq %rdx, 0x80(%rsp)
movsbl 0x128(%rsp), %edx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x48(%rsp)
cmpl %r14d, %ecx
movl %r14d, %edx
cmovgl %ecx, %edx
testl %eax, %eax
cmovnsl %eax, %edx
movsbl 0x130(%rsp), %r12d
movaps 0x3ce388(%rip), %xmm0   # 0x5ca150
movups %xmm0, 0x10(%rsi)
movl $0x0, 0x24(%rsi)
movaps 0x3ce386(%rip), %xmm0   # 0x5ca160
movq %rdx, 0x70(%rsp)
leal 0x1(,%rdx,2), %ebp
cmpl %r14d, %ebp
cmovgel %r14d, %ebp
movq %rsi, 0xa0(%rsp)
movups %xmm0, (%rsi)
movl %r9d, 0x8(%rsp)
movl %r9d, %eax
imull %r14d, %eax
movslq %eax, %rsi
callq 0x1fbb34
movq %rax, 0x78(%rsp)
movq %r14, 0x58(%rsp)
leal 0x1(%r14), %eax
movslq %eax, %rsi
movl $0xc, %edx
movq %r15, 0x90(%rsp)
movq %r15, %rdi
callq 0x1fbc89
movq %rax, %r14
testb $0x1, 0xc(%rsp)
movq 0x48(%rsp), %rax
movl %ebp, 0x40(%rsp)
jne 0x1fbe7b
movslq %ebp, %rsi
movslq %eax, %rbp
imulq %rbp, %rsi
movq 0x90(%rsp), %r15
movq %r15, %rdi
callq 0x1fbb34
movq %rax, 0x20(%rsp)
movl $0x4, %edx
movq %r15, %rdi
movq %rbp, %rsi
callq 0x1fbc89
movq %rax, 0x28(%rsp)
jmp 0x1fbe8d
movq $0x0, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x18(%rsp), %rax
addl %r12d, %eax
movq %rax, 0x38(%rsp)
movq 0x80(%rsp), %rbp
movq 0x10(%rsp), %rax
addl %ebp, %eax
movq %rax, 0x30(%rsp)
movl 0x8(%rsp), %eax
testb %al, %al
movq 0x58(%rsp), %r11
jle 0x1fbefe
movl %eax, %eax
movl %r11d, %ecx
xorl %edx, %edx
xorl %esi, %esi
testl %r11d, %r11d
jle 0x1fbef6
movq %rdx, %rdi
imulq %rax, %rdi
addq %r13, %rdi
movslq %esi, %r8
addq 0x78(%rsp), %r8
xorl %r9d, %r9d
movzbl (%rbx,%r9), %r10d
movb (%rdi,%r10), %r10b
movb %r10b, (%r8,%r9)
incq %r9
cmpq %r9, %rcx
jne 0x1fbede
addl %r9d, %esi
incq %rdx
cmpq %rax, %rdx
jne 0x1fbec4
movl $0x0, (%r14)
movq 0x38(%rsp), %r15
leal (%r15,%r15), %eax
negl %eax
movl %eax, 0x4(%r14)
movq 0x30(%rsp), %r13
leal (,%r13,2), %eax
negl %eax
movl %eax, 0x8(%r14)
movq 0x70(%rsp), %rax
cmpl %eax, %r11d
cmovll %r11d, %eax
testl %eax, %eax
jle 0x1fbfac
leal 0x1(%rax), %edx
movq 0x10(%rsp), %rcx
leal (%rcx,%rbp,2), %ecx
movq 0x18(%rsp), %rsi
leal (%rsi,%r12,2), %esi
leaq (%rdx,%rdx,2), %rdi
leaq -0xc(,%rdi,4), %rdi
xorl %r8d, %r8d
movl %r15d, %r9d
movl %r13d, %r10d
cmpl %r9d, %r10d
movl %r9d, %r11d
cmovll %r10d, %r11d
negl %r11d
movl %r11d, 0xc(%r14,%r8)
cmpl %esi, %ecx
movl %esi, %r11d
cmovll %ecx, %r11d
negl %r11d
movl %r11d, %ebx
subl %r15d, %ebx
movl %ebx, 0x10(%r14,%r8)
subl %r13d, %r11d
movl %r11d, 0x14(%r14,%r8)
addl %ebp, %ecx
addl %ebp, %r10d
addl %r12d, %esi
addl %r12d, %r9d
addq $0xc, %r8
cmpq %r8, %rdi
jne 0x1fbf60
movq 0x58(%rsp), %r11
jmp 0x1fbfb1
movl $0x1, %edx
cmpl %r11d, %edx
movq 0x48(%rsp), %rsi
jg 0x1fbfed
xorl %ecx, %ecx
testl %eax, %eax
cmovgl %eax, %ecx
leaq (%rcx,%rcx,2), %rax
leaq (%r14,%rax,4), %rax
addq $0x14, %rax
movabsq $-0x3fffffff40000000, %rdx # imm = 0xC0000000C0000000
movl $0xc0000000, (%rax)     # imm = 0xC0000000
movq %rdx, -0x8(%rax)
incl %ecx
addq $0xc, %rax
cmpl %r11d, %ecx
jl 0x1fbfd8
testl %esi, %esi
jle 0x1fc570
movq 0x70(%rsp), %rsi
leal (%rsi,%rsi), %eax
leal -0x1(%r11), %r9d
movslq %r11d, %rcx
leaq (%rcx,%rcx,2), %rdx
leaq (%r14,%rdx,4), %rdx
movq %rdx, 0x98(%rsp)
movq 0x48(%rsp), %rdx
leal -0x1(%rdx), %edi
movq %rdi, 0xc0(%rsp)
movl %esi, %edi
movq %rdi, 0xb8(%rsp)
movl %edx, %edx
movq %rdx, 0xb0(%rsp)
movslq %esi, %rdx
movq %rdx, %rdi
notq %rdi
movq %rdi, 0x68(%rsp)
negl %esi
movl %esi, 0x88(%rsp)
shlq $0x2, %rdx
leaq (%rdx,%rdx,2), %rdx
negq %rdx
addq %r14, %rdx
addq $0x8, %rdx
movq %rdx, 0x60(%rsp)
cltq
incq %rax
cmpq %rcx, %rax
cmovgeq %rcx, %rax
movq %rax, 0xa8(%rsp)
movq 0x20(%rsp), %rbx
xorl %r15d, %r15d
xorl %r10d, %r10d
movl %r9d, 0x8c(%rsp)
movq %r14, 0xc8(%rsp)
movq %r12, 0x50(%rsp)
movq 0x70(%rsp), %rsi
movl %esi, %eax
subl %r15d, %eax
movl %r15d, %edi
cmovgl %esi, %edi
negl %eax
movl %edi, %r14d
addl 0x88(%rsp), %r14d
movq 0xd0(%rsp), %rcx
movzbl (%rcx,%r15), %ecx
imull %r11d, %ecx
movslq %ecx, %rdx
addq 0x78(%rsp), %rdx
cmpq 0xb8(%rsp), %r15
movl $0x0, %ecx
cmovbel %ecx, %eax
leal (%rsi,%r15), %ecx
cmpl %r9d, %ecx
movl %r9d, %r11d
movl %ecx, 0x8(%rsp)
cmovll %ecx, %r11d
leaq (,%rdi,4), %rcx
movl %r15d, %esi
imull %ebp, %esi
addl %r13d, %esi
movq %r13, %r9
movl %r15d, %r13d
imull %r12d, %r13d
movq 0x38(%rsp), %r8
addl %r8d, %r13d
cmpl %r13d, %esi
cmovll %esi, %r13d
negl %r13d
movq %r15, %r12
movl %r13d, %r15d
subl %r8d, %r15d
movl %r13d, %r8d
subl %r9d, %r8d
testl %eax, %eax
movl $0xc0000000, %esi       # imm = 0xC0000000
cmovgl %esi, %r13d
cmovgl %esi, %r15d
leaq (%rcx,%rcx,2), %r9
cmovgl %esi, %r8d
movl 0xc(%rsp), %ecx
testb $0x1, %cl
movq %rbx, 0xd8(%rsp)
movq %r12, 0xe0(%rsp)
jne 0x1fc28a
movq 0x28(%rsp), %rsi
movl %eax, (%rsi,%r12,4)
movl $0xc0000000, %esi       # imm = 0xC0000000
testb $0x2, %cl
jne 0x1fc29c
cmpl %r11d, %eax
movq 0x50(%rsp), %r12
jg 0x1fc2aa
movq 0x68(%rsp), %rcx
addq %rcx, %rdi
addq 0x60(%rsp), %r9
cltq
movslq %r11d, %rcx
movq %rcx, 0x18(%rsp)
subq %rax, %rbx
movq %rbx, 0x10(%rsp)
movl -0x8(%r9), %eax
movl -0x4(%r9), %r11d
movl (%r9), %ecx
movl %r13d, -0x8(%r9)
movsbl 0x1(%rdx,%rdi), %r13d
addl %eax, %r13d
xorl %ebx, %ebx
cmpl %r11d, %r13d
cmovlel %r11d, %r13d
setl %bl
cmpl %r15d, %r13d
cmovlel %r15d, %r13d
movl $0x2, %eax
cmovll %eax, %ebx
cmpl %ecx, %r13d
cmovlel %ecx, %r13d
movl $0x3, %eax
cmovll %eax, %ebx
cmpl %r8d, %r13d
cmovlel %r8d, %r13d
movl $0x4, %eax
cmovll %eax, %ebx
cmpl %r13d, %esi
cmovlel %r14d, %r10d
cmovlel %r13d, %esi
movl %r13d, %ebp
subl 0x38(%rsp), %ebp
subl %r12d, %r11d
cmpl %ebp, %r11d
setg %al
cmovlel %ebp, %r11d
shlb $0x3, %al
orb %bl, %al
movl %r11d, -0x4(%r9)
subl %r12d, %r15d
cmpl %ebp, %r15d
setg %r11b
cmovlel %ebp, %r15d
movq 0x80(%rsp), %rbp
shlb $0x4, %r11b
movl %r13d, %ebx
subl 0x30(%rsp), %ebx
subl %ebp, %ecx
cmpl %ebx, %ecx
cmovlel %ebx, %ecx
movl %ecx, (%r9)
setg %cl
shlb $0x5, %cl
subl %ebp, %r8d
cmpl %ebx, %r8d
cmovlel %ebx, %r8d
setg %bl
orb %r11b, %cl
orb %al, %cl
shlb $0x6, %bl
orb %bl, %cl
movq 0x10(%rsp), %rax
movb %cl, 0x1(%rax,%rdi)
incq %rdi
incl %r14d
addq $0xc, %r9
cmpq 0x18(%rsp), %rdi
jl 0x1fc1a6
jmp 0x1fc45d
cmpl %r11d, %eax
jle 0x1fc2b2
movl %eax, %r14d
movq 0x50(%rsp), %r12
jmp 0x1fc45d
cmpl %r11d, %eax
movq 0x50(%rsp), %r12
jle 0x1fc35f
movl %eax, %r14d
jmp 0x1fc45d
movq 0x68(%rsp), %rax
addq %rdi, %rax
addq 0x60(%rsp), %r9
movslq %r11d, %rdi
movq 0x50(%rsp), %r12
movl -0x8(%r9), %ebx
movl -0x4(%r9), %r11d
movl (%r9), %ecx
movl %r13d, -0x8(%r9)
movsbl 0x1(%rdx,%rax), %r13d
addl %ebx, %r13d
cmpl %r11d, %r13d
cmovlel %r11d, %r13d
cmpl %r15d, %r13d
jg 0x1fc2ee
movl %r15d, %r13d
cmpl %ecx, %r13d
jg 0x1fc2f6
movl %ecx, %r13d
cmpl %r8d, %r13d
cmovlel %r8d, %r13d
cmpl %r13d, %esi
cmovlel %r14d, %r10d
cmovlel %r13d, %esi
movl %r13d, %ebx
subl 0x38(%rsp), %ebx
subl %r12d, %r11d
cmpl %ebx, %r11d
jg 0x1fc31a
movl %ebx, %r11d
movl %r11d, -0x4(%r9)
subl %r12d, %r15d
cmpl %ebx, %r15d
cmovlel %ebx, %r15d
movl %r13d, %r11d
subl 0x30(%rsp), %r11d
subl %ebp, %ecx
cmpl %r11d, %ecx
jg 0x1fc33a
movl %r11d, %ecx
movl %ecx, (%r9)
subl %ebp, %r8d
cmpl %r11d, %r8d
cmovlel %r11d, %r8d
incq %rax
incl %r14d
addq $0xc, %r9
cmpq %rdi, %rax
jl 0x1fc2c7
jmp 0x1fc45d
movq 0x68(%rsp), %rcx
addq %rcx, %rdi
addq 0x60(%rsp), %r9
cltq
movslq %r11d, %rcx
movq %rcx, 0x18(%rsp)
subq %rax, %rbx
movq %rbx, 0x10(%rsp)
movl -0x8(%r9), %eax
movl -0x4(%r9), %r11d
movl (%r9), %ecx
movl %r13d, -0x8(%r9)
movsbl 0x1(%rdx,%rdi), %r13d
addl %eax, %r13d
xorl %ebx, %ebx
cmpl %r11d, %r13d
cmovlel %r11d, %r13d
setle %bl
cmpl %r15d, %r13d
cmovlel %r15d, %r13d
movl $0x2, %eax
cmovlel %eax, %ebx
cmpl %ecx, %r13d
cmovlel %ecx, %r13d
movl $0x3, %eax
cmovlel %eax, %ebx
cmpl %r8d, %r13d
cmovlel %r8d, %r13d
movl $0x4, %eax
cmovlel %eax, %ebx
cmpl %r13d, %esi
cmovlel %r14d, %r10d
cmovlel %r13d, %esi
movl %r13d, %ebp
subl 0x38(%rsp), %ebp
subl %r12d, %r11d
cmpl %ebp, %r11d
setge %al
cmovlel %ebp, %r11d
shlb $0x3, %al
orb %bl, %al
movl %r11d, -0x4(%r9)
subl %r12d, %r15d
cmpl %ebp, %r15d
setge %r11b
cmovlel %ebp, %r15d
movq 0x80(%rsp), %rbp
shlb $0x4, %r11b
movl %r13d, %ebx
subl 0x30(%rsp), %ebx
subl %ebp, %ecx
cmpl %ebx, %ecx
cmovlel %ebx, %ecx
movl %ecx, (%r9)
setge %cl
shlb $0x5, %cl
subl %ebp, %r8d
cmpl %ebx, %r8d
cmovlel %ebx, %r8d
setge %bl
orb %r11b, %cl
orb %al, %cl
shlb $0x6, %bl
orb %bl, %cl
movq 0x10(%rsp), %rax
movb %cl, 0x1(%rax,%rdi)
incq %rdi
incl %r14d
addq $0xc, %r9
cmpq 0x18(%rsp), %rdi
jl 0x1fc37e
movslq %r14d, %rax
leaq (%rax,%rax,2), %rax
movq 0xc8(%rsp), %r14
movl %r13d, (%r14,%rax,4)
movl $0xc0000000, 0x4(%r14,%rax,4) # imm = 0xC0000000
movl 0x8c(%rsp), %r9d
movl 0x8(%rsp), %edi
cmpl %edi, %r9d
movq 0xa0(%rsp), %r8
movq 0xe0(%rsp), %r15
jg 0x1fc4b2
movq 0x98(%rsp), %rax
movl (%rax), %eax
cmpl 0xc(%r8), %eax
jle 0x1fc4b2
movl %eax, 0xc(%r8)
movl %r15d, 0x10(%r8)
movq 0xc0(%rsp), %rbx
cmpq %rbx, %r15
movq 0x58(%rsp), %r11
movq 0x30(%rsp), %r13
jne 0x1fc4d1
movl %esi, 0x14(%r8)
movl %r10d, 0x18(%r8)
movl (%r8), %eax
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
subl %esi, %ecx
jge 0x1fc4f4
andl $0x80000000, %eax       # imm = 0x80000000
orl %esi, %eax
movl %eax, (%r8)
movl %r15d, 0x8(%r8)
movl %r10d, 0x4(%r8)
jmp 0x1fc531
movslq 0x8(%r8), %rdx
cmpq %rdx, %r15
jl 0x1fc531
cmpl $0x0, 0x44(%rsp)
js 0x1fc531
movl 0x4(%r8), %esi
cmpl %r10d, %esi
jg 0x1fc531
addl %r10d, %edx
movl %r15d, %edi
subl %edx, %edi
addl %esi, %edi
movl %edi, %edx
negl %edx
cmovsl %edi, %edx
movl 0x8(%rsp), %edi
imull %ebp, %edx
addl 0x44(%rsp), %edx
cmpl %edx, %ecx
jg 0x1fc667
cmpq %rbx, %r15
setne %al
cmpl %edi, %r9d
setg %cl
orb %al, %cl
jne 0x1fc54f
movq 0x98(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x1c(%r8)
incq %r15
movq 0xd8(%rsp), %rbx
addq 0xa8(%rsp), %rbx
cmpq 0xb0(%rsp), %r15
jne 0x1fc09a
movq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq 0x78(%rsp), %rsi
callq 0x1fb9e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1fb9e0
movl 0xc(%rsp), %ecx
testb $0x1, %cl
jne 0x1fc5eb
movq 0xa0(%rsp), %r11
leaq 0x24(%r11), %rax
movl %ecx, %esi
shrl $0x7, %esi
andl $0x1, %esi
testb $0x40, %cl
jne 0x1fc5fd
cmpl $0x0, (%r11)
js 0x1fc5fd
movq 0x48(%rsp), %r9
decl %r9d
movq 0x58(%rsp), %r14
decl %r14d
leaq 0x20(%r11), %r10
addq $0x28, %r11
movq %rbx, %rdi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movl 0x40(%rsp), %r8d
pushq %r11
pushq %rax
pushq %r10
pushq %r14
jmp 0x1fc633
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%r11), %r9d
testl %r9d, %r9d
movl 0x40(%rsp), %r8d
js 0x1fc63c
movl 0x4(%r11), %r10d
testl %r10d, %r10d
js 0x1fc63c
movq %r11, %r14
addq $0x20, %r11
addq $0x28, %r14
movq %rbx, %rdi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
pushq %r14
pushq %rax
pushq %r11
pushq %r10
callq 0x1fc674
addq $0x20, %rsp
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
callq 0x1fb9e0
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1fb9e0
orl $0x80000000, %eax       # imm = 0x80000000
movl %eax, (%r8)
jmp 0x1fc570