// File: /workspace/github_c_makefile_star2_O0/ToniWestbrook[P]paladin/ksw.c
// Function: ksw_extend2
int ksw_extend2(int qlen, const uint8_t *query, int tlen, const uint8_t *target, int m, const int8_t *mat, int o_del, int e_del, int o_ins, int e_ins, int w, int end_bonus, int zdrop, int h0, int *_qle, int *_tle, int *_gtle, int *_gscore, int *_max_off)
{
	eh_t *eh; // score array
	int8_t *qp; // query profile
	int i, j, k, oe_del = o_del + e_del, oe_ins = o_ins + e_ins, beg, end, max, max_i, max_j, max_ins, max_del, max_ie, gscore, max_off;
	assert(h0 > 0);

	// allocate memory
	qp = malloc(qlen * m);
	eh = calloc(qlen + 1, 8);

	// 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 = h0; eh[1].h = h0 > oe_ins? h0 - oe_ins : 0;
	for (j = 2; j <= qlen && eh[j-1].h > e_ins; ++j)
		eh[j].h = eh[j-1].h - e_ins;

	// adjust $w if it is too large
	k = m * m;
	for (i = 0, max = 0; i < k; ++i) // get the max score
		max = max > mat[i]? max : mat[i];
	max_ins = (int)((double)(qlen * max + end_bonus - o_ins) / e_ins + 1.);
	max_ins = max_ins > 1? max_ins : 1;
	w = w < max_ins? w : max_ins;
	max_del = (int)((double)(qlen * max + end_bonus - o_del) / e_del + 1.);
	max_del = max_del > 1? max_del : 1;
	w = w < max_del? w : max_del; // TODO: is this necessary?

	// DP loop
	max = h0, max_i = max_j = -1; max_ie = -1, gscore = -1;
	max_off = 0;
	beg = 0, end = qlen;
	for (i = 0; LIKELY(i < tlen); ++i) {
		int t, f = 0, h1, m = 0, mj = -1;
		int8_t *q = &qp[target[i] * qlen];

		// apply the band and the constraint (if provided)
		if (beg < i - w) beg = i - w;
		if (end > i + w + 1) end = i + w + 1;
		if (end > qlen) end = qlen;

		// compute the first column
		if (beg == 0) {
			h1 = h0 - (o_del + e_del * (i + 1));
			if (h1 < 0) h1 = 0;
		} else h1 = 0;
		for (j = beg; LIKELY(j < end); ++j) {
			// At the beginning of the loop: eh[j] = { H(i-1,j-1), E(i,j) }, f = F(i,j) and h1 = H(i,j-1)
			// Similar to SSE2-SW, cells are computed in the following order:
			//   H(i,j)   = max{H(i-1,j-1)+S(i,j), E(i,j), F(i,j)}
			//   E(i+1,j) = max{H(i,j)-gapo, E(i,j)} - gape
			//   F(i,j+1) = max{H(i,j)-gapo, F(i,j)} - gape
			eh_t *p = &eh[j];
			int h, M = p->h, e = p->e; // get H(i-1,j-1) and E(i-1,j)
			p->h = h1;          // set H(i,j-1) for the next row
			M = M? M + q[j] : 0;// separating H and M to disallow a cigar like "100M3I3D20M"
			h = M > e? M : e;   // e and f are guaranteed to be non-negative, so h>=0 even if M<0
			h = h > f? h : f;
			h1 = h;             // save H(i,j) to h1 for the next column
			mj = m > h? mj : j; // record the position where max score is achieved
			m = m > h? m : h;   // m is stored at eh[mj+1]
			t = M - oe_del;
			t = t > 0? t : 0;
			e -= e_del;
			e = e > t? e : t;   // computed E(i+1,j)
			p->e = e;           // save E(i+1,j) for the next row
			t = M - oe_ins;
			t = t > 0? t : 0;
			f -= e_ins;
			f = f > t? f : t;   // computed F(i,j+1)
		}
		eh[end].h = h1; eh[end].e = 0;
		if (j == qlen) {
			max_ie = gscore > h1? max_ie : i;
			gscore = gscore > h1? gscore : h1;
		}
		if (m == 0) break;
		if (m > max) {
			max = m, max_i = i, max_j = mj;
			max_off = max_off > abs(mj - i)? max_off : abs(mj - i);
		} else if (zdrop > 0) {
			if (i - max_i > mj - max_j) {
				if (max - m - ((i - max_i) - (mj - max_j)) * e_del > zdrop) break;
			} else {
				if (max - m - ((mj - max_j) - (i - max_i)) * e_ins > zdrop) break;
			}
		}
		// update beg and end for the next round
		for (j = beg; LIKELY(j < end) && eh[j].h == 0 && eh[j].e == 0; ++j);
		beg = j;
		for (j = end; LIKELY(j >= beg) && eh[j].h == 0 && eh[j].e == 0; --j);
		end = j + 2 < qlen? j + 2 : qlen;
		//beg = 0; end = qlen; // uncomment this line for debugging
	}
	free(eh); free(qp);
	if (_qle) *_qle = max_j + 1;
	if (_tle) *_tle = max_i + 1;
	if (_gtle) *_gtle = max_ie + 1;
	if (_gscore) *_gscore = gscore;
	if (_max_off) *_max_off = max_off;
	return max;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq 0x70(%rbp), %rax
movq 0x68(%rbp), %rax
movq 0x60(%rbp), %rax
movq 0x58(%rbp), %rax
movq 0x50(%rbp), %rax
movl 0x48(%rbp), %eax
movl 0x40(%rbp), %eax
movl 0x38(%rbp), %eax
movl 0x30(%rbp), %eax
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movl 0x10(%rbp), %eax
addl 0x18(%rbp), %eax
movl %eax, -0x50(%rbp)
movl 0x20(%rbp), %eax
addl 0x28(%rbp), %eax
movl %eax, -0x54(%rbp)
cmpl $0x0, 0x48(%rbp)
jle 0x34cb7
jmp 0x34cd6
leaq 0x6859(%rip), %rdi      # 0x3b517
leaq 0x6833(%rip), %rsi      # 0x3b4f8
movl $0x182, %edx            # imm = 0x182
leaq 0x684d(%rip), %rcx      # 0x3b51e
callq 0x3190
movl -0x4(%rbp), %eax
imull -0x24(%rbp), %eax
movslq %eax, %rdi
leaq 0x6811(%rip), %rsi      # 0x3b4f8
movl $0x185, %edx            # imm = 0x185
leaq 0x68c7(%rip), %rcx      # 0x3b5ba
callq 0x31ca0
movq %rax, -0x40(%rbp)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movl $0x8, %esi
leaq 0x67e7(%rip), %rdx      # 0x3b4f8
movl $0x186, %ecx            # imm = 0x186
leaq 0x689d(%rip), %r8       # 0x3b5ba
callq 0x31bf0
movq %rax, -0x38(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x34da6
movq -0x30(%rbp), %rax
movl -0x4c(%rbp), %ecx
imull -0x24(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x34d99
movq -0x88(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq -0x48(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movb (%rax,%rcx), %dl
movq -0x40(%rbp), %rax
movl -0x44(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x44(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x34d5b
jmp 0x34d9b
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x34d34
movl 0x48(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movl 0x48(%rbp), %eax
cmpl -0x54(%rbp), %eax
jle 0x34dc5
movl 0x48(%rbp), %eax
subl -0x54(%rbp), %eax
movl %eax, -0xc0(%rbp)
jmp 0x34dcf
xorl %eax, %eax
movl %eax, -0xc0(%rbp)
jmp 0x34dcf
movl -0xc0(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
movl $0x2, -0x48(%rbp)
movl -0x48(%rbp), %ecx
xorl %eax, %eax
cmpl -0x4(%rbp), %ecx
movb %al, -0xc1(%rbp)
jg 0x34e0f
movq -0x38(%rbp), %rax
movl -0x48(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,8), %eax
cmpl 0x28(%rbp), %eax
setg %al
movb %al, -0xc1(%rbp)
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x34e1b
jmp 0x34e44
movq -0x38(%rbp), %rax
movl -0x48(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,8), %edx
subl 0x28(%rbp), %edx
movq -0x38(%rbp), %rax
movslq -0x48(%rbp), %rcx
movl %edx, (%rax,%rcx,8)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x34de3
movl -0x24(%rbp), %eax
imull -0x24(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x60(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x34ea8
movl -0x60(%rbp), %eax
movq -0x30(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jle 0x34e82
movl -0x60(%rbp), %eax
movl %eax, -0xc8(%rbp)
jmp 0x34e94
movq -0x30(%rbp), %rax
movslq -0x44(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0xc8(%rbp)
movl -0xc8(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x34e5c
movl -0x4(%rbp), %eax
imull -0x60(%rbp), %eax
addl 0x38(%rbp), %eax
subl 0x20(%rbp), %eax
cvtsi2sd %eax, %xmm0
cvtsi2sdl 0x28(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd 0x54be(%rip), %xmm1     # 0x3a388
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x6c(%rbp)
cmpl $0x1, -0x6c(%rbp)
jle 0x34ee6
movl -0x6c(%rbp), %eax
movl %eax, -0xcc(%rbp)
jmp 0x34ef3
movl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x34ef3
movl -0xcc(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl 0x30(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x34f0f
movl 0x30(%rbp), %eax
movl %eax, -0xd0(%rbp)
jmp 0x34f18
movl -0x6c(%rbp), %eax
movl %eax, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
movl %eax, 0x30(%rbp)
movl -0x4(%rbp), %eax
imull -0x60(%rbp), %eax
addl 0x38(%rbp), %eax
subl 0x10(%rbp), %eax
cvtsi2sd %eax, %xmm0
cvtsi2sdl 0x18(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd 0x5445(%rip), %xmm1     # 0x3a388
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x70(%rbp)
cmpl $0x1, -0x70(%rbp)
jle 0x34f5f
movl -0x70(%rbp), %eax
movl %eax, -0xd4(%rbp)
jmp 0x34f6c
movl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0x34f6c
movl -0xd4(%rbp), %eax
movl %eax, -0x70(%rbp)
movl 0x30(%rbp), %eax
cmpl -0x70(%rbp), %eax
jge 0x34f88
movl 0x30(%rbp), %eax
movl %eax, -0xd8(%rbp)
jmp 0x34f91
movl -0x70(%rbp), %eax
movl %eax, -0xd8(%rbp)
movl -0xd8(%rbp), %eax
movl %eax, 0x30(%rbp)
movl 0x48(%rbp), %eax
movl %eax, -0x60(%rbp)
movl $0xffffffff, -0x68(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x74(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x78(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x7c(%rbp)
movl $0x0, -0x58(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x14(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x355c4
movl $0x0, -0x90(%rbp)
movl $0x0, -0x98(%rbp)
movl $0xffffffff, -0x9c(%rbp) # imm = 0xFFFFFFFF
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x44(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
imull -0x4(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movl -0x58(%rbp), %eax
movl -0x44(%rbp), %ecx
subl 0x30(%rbp), %ecx
cmpl %ecx, %eax
jge 0x35046
movl -0x44(%rbp), %eax
subl 0x30(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x5c(%rbp), %eax
movl -0x44(%rbp), %ecx
addl 0x30(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x35062
movl -0x44(%rbp), %eax
addl 0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jle 0x35070
movl -0x4(%rbp), %eax
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x58(%rbp)
jne 0x350a7
movl 0x48(%rbp), %eax
movl 0x10(%rbp), %ecx
movl 0x18(%rbp), %edx
movl -0x44(%rbp), %esi
addl $0x1, %esi
imull %esi, %edx
addl %edx, %ecx
subl %ecx, %eax
movl %eax, -0x94(%rbp)
cmpl $0x0, -0x94(%rbp)
jge 0x350a5
movl $0x0, -0x94(%rbp)
jmp 0x350b1
movl $0x0, -0x94(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x5c(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3534c
movq -0x38(%rbp), %rax
movslq -0x48(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xb8(%rbp)
movq -0xb0(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xbc(%rbp)
movl -0x94(%rbp), %ecx
movq -0xb0(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x0, -0xb8(%rbp)
je 0x3513d
movl -0xb8(%rbp), %eax
movq -0xa8(%rbp), %rcx
movslq -0x48(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
addl %ecx, %eax
movl %eax, -0xdc(%rbp)
jmp 0x35147
xorl %eax, %eax
movl %eax, -0xdc(%rbp)
jmp 0x35147
movl -0xdc(%rbp), %eax
movl %eax, -0xb8(%rbp)
movl -0xb8(%rbp), %eax
cmpl -0xbc(%rbp), %eax
jle 0x3516f
movl -0xb8(%rbp), %eax
movl %eax, -0xe0(%rbp)
jmp 0x3517b
movl -0xbc(%rbp), %eax
movl %eax, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
cmpl -0x90(%rbp), %eax
jle 0x351a3
movl -0xb4(%rbp), %eax
movl %eax, -0xe4(%rbp)
jmp 0x351af
movl -0x90(%rbp), %eax
movl %eax, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
movl %eax, -0x94(%rbp)
movl -0x98(%rbp), %eax
cmpl -0xb4(%rbp), %eax
jle 0x351e3
movl -0x9c(%rbp), %eax
movl %eax, -0xe8(%rbp)
jmp 0x351ec
movl -0x48(%rbp), %eax
movl %eax, -0xe8(%rbp)
movl -0xe8(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl -0x98(%rbp), %eax
cmpl -0xb4(%rbp), %eax
jle 0x35214
movl -0x98(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0x35220
movl -0xb4(%rbp), %eax
movl %eax, -0xec(%rbp)
movl -0xec(%rbp), %eax
movl %eax, -0x98(%rbp)
movl -0xb8(%rbp), %eax
subl -0x50(%rbp), %eax
movl %eax, -0x8c(%rbp)
cmpl $0x0, -0x8c(%rbp)
jle 0x35252
movl -0x8c(%rbp), %eax
movl %eax, -0xf0(%rbp)
jmp 0x3525c
xorl %eax, %eax
movl %eax, -0xf0(%rbp)
jmp 0x3525c
movl -0xf0(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl 0x18(%rbp), %ecx
movl -0xbc(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
cmpl -0x8c(%rbp), %eax
jle 0x35295
movl -0xbc(%rbp), %eax
movl %eax, -0xf4(%rbp)
jmp 0x352a1
movl -0x8c(%rbp), %eax
movl %eax, -0xf4(%rbp)
movl -0xf4(%rbp), %eax
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %ecx
movq -0xb0(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0xb8(%rbp), %eax
subl -0x54(%rbp), %eax
movl %eax, -0x8c(%rbp)
cmpl $0x0, -0x8c(%rbp)
jle 0x352e3
movl -0x8c(%rbp), %eax
movl %eax, -0xf8(%rbp)
jmp 0x352ed
xorl %eax, %eax
movl %eax, -0xf8(%rbp)
jmp 0x352ed
movl -0xf8(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl 0x28(%rbp), %ecx
movl -0x90(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %eax
cmpl -0x8c(%rbp), %eax
jle 0x35326
movl -0x90(%rbp), %eax
movl %eax, -0xfc(%rbp)
jmp 0x35332
movl -0x8c(%rbp), %eax
movl %eax, -0xfc(%rbp)
movl -0xfc(%rbp), %eax
movl %eax, -0x90(%rbp)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x350b7
movl -0x94(%rbp), %edx
movq -0x38(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movl %edx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movl $0x0, 0x4(%rax,%rcx,8)
movl -0x48(%rbp), %eax
cmpl -0x4(%rbp), %eax
jne 0x353c8
movl -0x78(%rbp), %eax
cmpl -0x94(%rbp), %eax
jle 0x3538b
movl -0x74(%rbp), %eax
movl %eax, -0x100(%rbp)
jmp 0x35394
movl -0x44(%rbp), %eax
movl %eax, -0x100(%rbp)
movl -0x100(%rbp), %eax
movl %eax, -0x74(%rbp)
movl -0x78(%rbp), %eax
cmpl -0x94(%rbp), %eax
jle 0x353b3
movl -0x78(%rbp), %eax
movl %eax, -0x104(%rbp)
jmp 0x353bf
movl -0x94(%rbp), %eax
movl %eax, -0x104(%rbp)
movl -0x104(%rbp), %eax
movl %eax, -0x78(%rbp)
cmpl $0x0, -0x98(%rbp)
jne 0x353d6
jmp 0x355c4
movl -0x98(%rbp), %eax
cmpl -0x60(%rbp), %eax
jle 0x3543c
movl -0x98(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x9c(%rbp), %eax
movl %eax, -0x68(%rbp)
movl -0x7c(%rbp), %eax
movl -0x9c(%rbp), %ecx
subl -0x44(%rbp), %ecx
movl %ecx, %edx
negl %edx
cmovnsl %edx, %ecx
cmpl %ecx, %eax
jle 0x3541b
movl -0x7c(%rbp), %eax
movl %eax, -0x108(%rbp)
jmp 0x35431
movl -0x9c(%rbp), %eax
subl -0x44(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x108(%rbp)
movl -0x108(%rbp), %eax
movl %eax, -0x7c(%rbp)
jmp 0x354b1
cmpl $0x0, 0x40(%rbp)
jle 0x354af
movl -0x44(%rbp), %eax
subl -0x64(%rbp), %eax
movl -0x9c(%rbp), %ecx
subl -0x68(%rbp), %ecx
cmpl %ecx, %eax
jle 0x35481
movl -0x60(%rbp), %eax
subl -0x98(%rbp), %eax
movl -0x44(%rbp), %ecx
subl -0x64(%rbp), %ecx
movl -0x9c(%rbp), %edx
subl -0x68(%rbp), %edx
subl %edx, %ecx
imull 0x18(%rbp), %ecx
subl %ecx, %eax
cmpl 0x40(%rbp), %eax
jle 0x3547f
jmp 0x355c4
jmp 0x354ad
movl -0x60(%rbp), %eax
subl -0x98(%rbp), %eax
movl -0x9c(%rbp), %ecx
subl -0x68(%rbp), %ecx
movl -0x44(%rbp), %edx
subl -0x64(%rbp), %edx
subl %edx, %ecx
imull 0x28(%rbp), %ecx
subl %ecx, %eax
cmpl 0x40(%rbp), %eax
jle 0x354ab
jmp 0x355c4
jmp 0x354ad
jmp 0x354af
jmp 0x354b1
movl -0x58(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x5c(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x109(%rbp)
je 0x35502
movq -0x38(%rbp), %rcx
movslq -0x48(%rbp), %rdx
xorl %eax, %eax
cmpl $0x0, (%rcx,%rdx,8)
movb %al, -0x109(%rbp)
jne 0x35502
movq -0x38(%rbp), %rax
movslq -0x48(%rbp), %rcx
cmpl $0x0, 0x4(%rax,%rcx,8)
sete %al
movb %al, -0x109(%rbp)
movb -0x109(%rbp), %al
testb $0x1, %al
jne 0x3550e
jmp 0x3551b
jmp 0x35510
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x354b7
movl -0x48(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x58(%rbp), %eax
setge %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x10a(%rbp)
je 0x35572
movq -0x38(%rbp), %rcx
movslq -0x48(%rbp), %rdx
xorl %eax, %eax
cmpl $0x0, (%rcx,%rdx,8)
movb %al, -0x10a(%rbp)
jne 0x35572
movq -0x38(%rbp), %rax
movslq -0x48(%rbp), %rcx
cmpl $0x0, 0x4(%rax,%rcx,8)
sete %al
movb %al, -0x10a(%rbp)
movb -0x10a(%rbp), %al
testb $0x1, %al
jne 0x3557e
jmp 0x3558b
jmp 0x35580
movl -0x48(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x35527
movl -0x48(%rbp), %eax
addl $0x2, %eax
cmpl -0x4(%rbp), %eax
jge 0x355a4
movl -0x48(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x110(%rbp)
jmp 0x355ad
movl -0x4(%rbp), %eax
movl %eax, -0x110(%rbp)
movl -0x110(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x34fd7
movq -0x38(%rbp), %rdi
callq 0x3380
movq -0x40(%rbp), %rdi
callq 0x3380
cmpq $0x0, 0x50(%rbp)
je 0x355e9
movl -0x68(%rbp), %ecx
addl $0x1, %ecx
movq 0x50(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, 0x58(%rbp)
je 0x355fc
movl -0x64(%rbp), %ecx
addl $0x1, %ecx
movq 0x58(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, 0x60(%rbp)
je 0x3560f
movl -0x74(%rbp), %ecx
addl $0x1, %ecx
movq 0x60(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, 0x68(%rbp)
je 0x3561f
movl -0x78(%rbp), %ecx
movq 0x68(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, 0x70(%rbp)
je 0x3562f
movl -0x7c(%rbp), %ecx
movq 0x70(%rbp), %rax
movl %ecx, (%rax)
movl -0x60(%rbp), %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopl (%rax,%rax)