// File: /workspace/github_c_makefile_star2_O1/lh3[P]pre-pe/pre-lianti.c
// Function: lt_process
void lt_process(const lt_global_t *g, bseq1_t s[2])
{
	int i, k, n_hits[2], mlen;
	lt_sc_hit_t hits[2][MAX_BINDING_HITS];
	char *rseq, *rqual, *xseq, *xqual, *bc;

	mlen = s[0].l_seq > s[1].l_seq? s[0].l_seq : s[1].l_seq;
	rseq = (char*)alloca(mlen + 1);
	rqual = (char*)alloca(mlen + 1);
	xseq = (char*)alloca(s[0].l_seq + s[1].l_seq + 1);
	xqual = (char*)alloca(s[0].l_seq + s[1].l_seq + 1);
	bc = (char*)alloca(mlen + 1);

	// trim heading and trailing N
	for (k = 0; k < 2; ++k) {
		bseq1_t *sk = &s[k];
		for (i = sk->l_seq - 1; i >= 0; --i) // trim trailing "N"
			if (sk->seq[i] != 'N') break;
		sk->l_seq = i + 1;
		sk->seq[sk->l_seq] = sk->qual[sk->l_seq] = 0;
		for (i = 0; i < sk->l_seq; ++i) // trim heading "N"
			if (sk->seq[i] != 'N') break;
		if (i) trim_bseq_5(sk, i);
	}
	// trim Illumina PE adapters
	trim_adap(&s[0], lt_adapter1, 0, g->opt.min_adap_len, g->opt.max_adap_pen, 1);
	trim_adap(&s[1], lt_adapter2, 0, g->opt.min_adap_len, g->opt.max_adap_pen, 1);
	// find binding motifs
	for (k = 0; k < 2; ++k)
		n_hits[k] = lt_sc_test(g->sc_bind, s[k].seq, MAX_BINDING_HITS, hits[k]);
	if (s[0].l_seq < g->opt.min_seq_len || s[1].l_seq < g->opt.min_seq_len) {
		s[0].type = s[1].type = LT_SHORT_SEQ;
	} else if (n_hits[0] + n_hits[1] == 0) {
		s[0].type = s[1].type = LT_NO_BINDING;
	} else if (n_hits[0] == MAX_BINDING_HITS || n_hits[1] == MAX_BINDING_HITS) {
		s[0].type = s[1].type = LT_TOO_MANY_BINDING;
	} else if (n_hits[0] > 0 && n_hits[1] > 0) { // both ends contain the binding motif
		int bpos[2], l_prom[2];
		s[0].dbl_bind = s[1].dbl_bind = 1;
		for (i = 0; i < 2; ++i) {
			bpos[i] = hits[i][n_hits[i] - 1].pos;
			l_prom[i] = lt_ue_rev1(bpos[i], s[i].seq, s[i].qual, g->sc_prom->l, lt_promoter, 0, g->opt.min_bc_len, g->opt.max_bc_pen);
			if (l_prom[i] != bpos[i] && l_prom[i] != g->sc_prom->l)
				l_prom[i] = 0;
			if (l_prom[i] < g->opt.min_bc_len) l_prom[i] = 0;
		}
		if (l_prom[0] == 0 && l_prom[1] == 0) {
			s[0].type = s[1].type = LT_CHIMERA;
		} else {
			int w = l_prom[0] < l_prom[1]? 1 : 0;
			trim_bseq_5(&s[w], bpos[w] + g->sc_bind->l);
			n_hits[w] = 0;
		}
	}
	// find end overlaps
	if ((n_hits[0] == 0 || n_hits[1] == 0) && s[0].type == LT_UNKNOWN) {
		int f, r, fpos, bpos, l_bc_prom;
		lt_sc_hit_t hits_prom;
		f = n_hits[0]? 0 : 1;
		r = f^1;
		bpos = hits[f][n_hits[f] - 1].pos;
		fpos = bpos + g->sc_bind->l;
		// barcode
		l_bc_prom = lt_ue_rev1(bpos, s[f].seq, s[f].qual, g->sc_prom->l, lt_promoter, 0, g->opt.min_bc_len, g->opt.max_bc_pen); // test if "barcode" is actually teh T7 promotor
		if (l_bc_prom >= g->opt.min_bc_len) {
			bc[0] = '*', bc[1] = 0;
		} else if (bpos < g->opt.bc_len) {
			strncpy(bc, s[f].seq, bpos);
			bc[bpos] = 0;
		} else {
			strncpy(bc, s[f].seq + (bpos - g->opt.bc_len), g->opt.bc_len);
			bc[g->opt.bc_len] = 0;
		}
		s[0].bc = strdup(bc);
		s[1].bc = strdup(bc);
		// test merge and promoter sequences
		if (lt_sc_test(g->sc_prom, &s[f].seq[fpos], 1, &hits_prom) > 0) {
			s[0].type = s[1].type = LT_POST_PROMOTER;
		} else {
			int n_fh, n_rh, n_ch;
			uint64_t fh[2], rh[2], ch[2];
			// reverse the other read
			lt_seq_revcomp(s[r].l_seq, s[r].seq, rseq);
			lt_seq_rev(s[r].l_seq, s[r].qual, rqual);
			// find overlaps
			n_fh = lt_ue_for(s[f].l_seq - bpos, &s[f].seq[bpos], &s[f].qual[bpos], s[r].l_seq, rseq, rqual, g->opt.max_ovlp_pen, g->opt.min_ovlp_len, 2, fh);
			n_rh = lt_ue_rev(s[f].l_seq - bpos, &s[f].seq[bpos], &s[f].qual[bpos], s[r].l_seq, rseq, rqual, g->opt.max_ovlp_pen, g->opt.min_ovlp_len, 2, rh);
			n_ch = lt_ue_contained(s[f].l_seq - bpos, &s[f].seq[bpos], &s[f].qual[bpos], s[r].l_seq, rseq, rqual, g->opt.max_ovlp_pen, 2, ch);
			if (n_fh + n_rh + n_ch > 1) {
				s[0].type = s[1].type = LT_AMBI_MERGE;
			} else if (n_fh + n_rh + n_ch == 0) {
				s[0].type = s[1].type = LT_NO_MERGE;
			} else {
				int x = 0;
				s[0].type = s[1].type = LT_MERGED;
				if (n_fh == 1) {
					/*  GGG19bp------------------->
					                     <--------------- */
					int l = (uint32_t)fh[0], st = fh[0]>>32;
					for (i = fpos; i < bpos + st; ++i)
						xseq[x] = s[f].seq[i], xqual[x++] = s[f].qual[i];
					for (i = fpos < bpos + st? 0 : fpos - (bpos + st); i < l; ++i) {
						int j = bpos + st + i, y;
						y = merge_base(g->opt.max_qual, s[f].seq[j], s[f].qual[j], rseq[i], rqual[i]);
						xseq[x] = (uint8_t)y, xqual[x++] = y>>8;
					}
					if (l < s[r].l_seq) {
						for (i = l; i < s[r].l_seq; ++i)
							xseq[x] = rseq[i], xqual[x++] = rqual[i];
					} else { // FIXME: please check pre-meta.c; this block is probably buggy!!!
						for (i = bpos + l; i < s[f].l_seq; ++i)
							xseq[x] = s[f].seq[i], xqual[x++] = s[f].qual[i];
					}
				} else if (n_rh == 1) {
					/*      GGG19bp--------------------->
					   <--------------------------           */
					int l = (uint32_t)rh[0], st = rh[0]>>32, l2;
					for (i = fpos; i < s[f].l_seq - st - l; ++i)
						xseq[x] = s[f].seq[i], xqual[x++] = s[f].qual[i];
					l2 = fpos < s[f].l_seq - st - l? l : s[f].l_seq - st - fpos;
					for (i = s[r].l_seq - l2; i < s[r].l_seq; ++i) {
						int j = i - s[r].l_seq + (s[f].l_seq - st), y;
						y = merge_base(g->opt.max_qual, s[f].seq[j], s[f].qual[j], rseq[i], rqual[i]);
						xseq[x] = (uint8_t)y, xqual[x++] = y>>8;
					}
				} else if (n_ch == 1) {
					/*    GGG19bp---------------->
					   <-----------------------------    */
					int j, st = ch[0]>>32;
					for (j = fpos; j < s[f].l_seq; ++j) {
						int i = j + st - bpos, y;
						y = merge_base(g->opt.max_qual, s[f].seq[j], s[f].qual[j], rseq[i], rqual[i]);
						xseq[x] = (uint8_t)y, xqual[x++] = y>>8;
					}
				}
				xseq[x] = xqual[x] = 0;
				for (i = 0; i < x; ++i)
					if (xseq[i] == 'N' || xseq[i] == 'n') break;
				if (i != x) s[0].type = s[1].type = LT_AMBI_BASE;
				else if (x < g->opt.min_seq_len) s[0].type = s[1].type = LT_SHORT_MERGE;
				free(s[0].seq); free(s[0].qual);
				s[0].seq = strdup(xseq);
				s[0].qual = strdup(xqual);
				s[0].l_seq = x;
				s[1].l_seq = 0;
			}
		}
		if (s[0].type == LT_AMBI_MERGE || s[0].type == LT_NO_MERGE) {
			int n_ambi = 0;
			trim_bseq_5(&s[f], fpos);
			for (k = 0; k < 2; ++k) {
				for (i = 0; i < s[k].l_seq; ++i)
					if (s[k].seq[i] == 'N') ++n_ambi;
			}
			if (n_ambi) s[0].type = s[1].type = LT_AMBI_BASE;
			else if (s[f].l_seq < g->opt.min_seq_len || s[r].l_seq < g->opt.min_seq_len)
				s[0].type = s[1].type = LT_SHORT_PE;
			if (f == 1) {
				char *tmp;
				tmp = s[f].seq, s[f].seq = s[r].seq, s[r].seq = tmp;
				tmp = s[f].qual, s[f].qual = s[r].qual, s[r].qual = tmp;
				i = s[f].l_seq, s[f].l_seq = s[r].l_seq, s[r].l_seq = i;
				f = 0, r = 1;
			}
		}
	}
	if (s[0].type == LT_MERGED || s[0].type == LT_NO_MERGE || s[0].type == LT_AMBI_MERGE || s[0].type == LT_NO_BINDING) {
		if (s->type == LT_NO_BINDING) {
			for (i = 0; i < 2; ++i) {
				trim_adap(&s[i], lt_oligo_for, 0, g->opt.min_adap_len, g->opt.max_adap_pen, 0);
				trim_adap(&s[i], lt_bind_rev, 0, g->opt.min_adap_len, g->opt.max_adap_pen, 1);
				trim_adap(&s[i], lt_oligo_rev, 1, g->opt.min_adap_len, g->opt.max_adap_pen, 0);
				trim_adap(&s[i], lt_bind, 1, g->opt.min_adap_len, g->opt.max_adap_pen, 1);
			}
		} else {
			trim_adap(&s[0], lt_oligo_for, 0, g->opt.min_adap_len, g->opt.max_adap_pen, 0);
			trim_adap(&s[0], lt_bind_rev, 0, g->opt.min_adap_len, g->opt.max_adap_pen, 1);
			if (s->type != LT_MERGED) {
				trim_adap(&s[1], lt_bind_rev, 0, g->opt.min_adap_len, g->opt.max_adap_pen, 1);
				trim_adap(&s[1], lt_oligo_rev, 1, g->opt.min_adap_len, g->opt.max_adap_pen, 0);
				trim_adap(&s[1], lt_bind, 1, g->opt.min_adap_len, g->opt.max_adap_pen, 1);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rsi, %r14
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl (%rsi), %edx
andl %ecx, %edx
andl 0x28(%rsi), %ecx
cmpl %ecx, %edx
movl %ecx, %eax
cmoval %edx, %eax
movq %rdi, -0x48(%rbp)
addq $0x28, %rsi
movq %rsi, -0x90(%rbp)
addl $0x10, %eax
andl $-0x10, %eax
movq %rsp, %rsi
subq %rax, %rsi
movq %rsi, -0x70(%rbp)
movq %rsi, %rsp
movq %rsp, %rsi
subq %rax, %rsi
movq %rsi, -0xb0(%rbp)
movq %rsi, %rsp
addl %edx, %ecx
addl $0x10, %ecx
andl $-0x10, %ecx
movq %rsp, %rdx
subq %rcx, %rdx
movq %rdx, -0x88(%rbp)
movq %rdx, %rsp
movq %rsp, %rdx
subq %rcx, %rdx
movq %rdx, -0x80(%rbp)
movq %rdx, %rsp
movq %rsp, %rcx
subq %rax, %rcx
movq %rcx, -0x50(%rbp)
movq %rcx, %rsp
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq %r14, -0x40(%rbp)
leaq (,%r13,4), %rax
addq %r13, %rax
leaq (%r14,%rax,8), %r12
movl (%r12), %eax
movl %eax, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %ebx, %ebx
testq %rdx, %rdx
jle 0x36d6
leaq -0x1(%rdx), %rcx
movq 0x10(%r12), %rsi
cmpb $0x4e, -0x1(%rsi,%rdx)
movq %rcx, %rdx
je 0x36b8
incl %ecx
jmp 0x36d8
xorl %ecx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %eax       # imm = 0x80000000
orl %ecx, %eax
movl %eax, (%r12)
movq 0x18(%r12), %rax
movb %bl, (%rax,%rcx)
movq 0x10(%r12), %rax
movl (%r12), %ecx
andq %r15, %rcx
movb %bl, (%rax,%rcx)
movl (%r12), %eax
andq %r15, %rax
je 0x3720
movq 0x10(%r12), %rcx
xorl %ebx, %ebx
cmpb $0x4e, (%rcx,%rbx)
jne 0x3720
incq %rbx
cmpq %rbx, %rax
jne 0x3710
movl %eax, %ebx
testl %ebx, %ebx
je 0x378d
movq 0x10(%r12), %rdi
movl %ebx, %r14d
leaq (%rdi,%r14), %rsi
subl %ebx, %eax
movslq %eax, %rdx
callq 0x21e0
movq 0x18(%r12), %rdi
addq %rdi, %r14
movl (%r12), %edx
andq %r15, %rdx
movslq %ebx, %rax
subq %rax, %rdx
movq %r14, %rsi
movq -0x40(%rbp), %r14
callq 0x21e0
movl (%r12), %eax
movl %eax, %ecx
subl %ebx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %eax       # imm = 0x80000000
orl %ecx, %eax
movl %eax, (%r12)
movq 0x18(%r12), %rax
xorl %edx, %edx
movb %dl, (%rax,%rcx)
movq 0x10(%r12), %rax
movl (%r12), %ecx
andq %r15, %rcx
movb %dl, (%rax,%rcx)
leaq 0x1(%r13), %rax
testq %r13, %r13
movq %rax, %r13
je 0x369d
movq %r14, %r12
movq 0x49c9(%rip), %r14      # 0x8170
movq -0x48(%rbp), %rax
movl 0x18(%rax), %ecx
movq %rcx, -0x38(%rbp)
movl 0x1c(%rax), %r15d
movq %r14, %rdi
callq 0x20c0
movl (%r12), %ebx
movl %ebx, %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
leaq -0xd0(%rbp), %r10
movl %r13d, %edi
movq %rdx, -0x58(%rbp)
movl %eax, %ecx
movq %r14, %r8
xorl %r9d, %r9d
pushq %r10
pushq $0x4
pushq %r15
pushq -0x38(%rbp)
callq 0x2ec4
addq $0x20, %rsp
testl %eax, %eax
jle 0x3871
decl %eax
movq -0xd0(%rbp,%rax,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
subl %eax, %r13d
cmpl %r15d, %r13d
jle 0x3855
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %ebx       # imm = 0x80000000
orl %ecx, %ebx
movq -0x40(%rbp), %r12
movl %ebx, (%r12)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andq %rcx, %rax
xorl %edx, %edx
movq -0x58(%rbp), %rsi
movb %dl, (%rsi,%rax)
movq 0x10(%r12), %rax
movl (%r12), %esi
andq %rcx, %rsi
movb %dl, (%rax,%rsi)
jmp 0x3871
sarq $0x20, %rcx
movq -0x58(%rbp), %rdi
addq %rcx, %rdi
movslq %r13d, %rdx
movl $0x22, %esi
callq 0x2110
movq -0x40(%rbp), %r12
movq 0x4900(%rip), %r14      # 0x8178
movq -0x48(%rbp), %rax
movl 0x18(%rax), %ecx
movq %rcx, -0x38(%rbp)
movl 0x1c(%rax), %r15d
movq %r14, %rdi
callq 0x20c0
movl 0x28(%r12), %ebx
movl %ebx, %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movq 0x38(%r12), %rsi
movq 0x40(%r12), %rdx
movl %r13d, %edi
movq %rdx, -0x58(%rbp)
movl %eax, %ecx
movq %r14, %r8
xorl %r9d, %r9d
leaq -0xd0(%rbp), %rax
pushq %rax
pushq $0x4
pushq %r15
pushq -0x38(%rbp)
callq 0x2ec4
addq $0x20, %rsp
testl %eax, %eax
jle 0x3944
decl %eax
movq -0xd0(%rbp,%rax,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
subl %eax, %r13d
cmpl %r15d, %r13d
jle 0x3928
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %ebx       # imm = 0x80000000
orl %ecx, %ebx
movq -0x40(%rbp), %r12
movl %ebx, 0x28(%r12)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andq %rcx, %rax
xorl %edx, %edx
movq -0x58(%rbp), %rsi
movb %dl, (%rsi,%rax)
movq 0x38(%r12), %rax
movl 0x28(%r12), %esi
andq %rcx, %rsi
movb %dl, (%rax,%rsi)
jmp 0x3944
sarq $0x20, %rcx
movq -0x58(%rbp), %rdi
addq %rcx, %rdi
movslq %r13d, %rdx
movl $0x22, %esi
callq 0x2110
movq -0x40(%rbp), %r12
movq -0x48(%rbp), %r13
movq 0x30(%r13), %r14
leaq 0x10(%r12), %rbx
leaq -0x170(%rbp), %r15
xorl %r12d, %r12d
movq (%rbx), %rsi
movq %r14, %rdi
movl $0x3, %edx
movq %r15, %rcx
callq 0x2b00
movl %eax, -0xa8(%rbp,%r12,4)
incq %r12
addq $0xc, %r15
addq $0x28, %rbx
cmpq $0x1, %r12
je 0x395b
movq -0x40(%rbp), %r14
movl (%r14), %eax
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl 0x8(%r13), %edx
cmpl %edx, %ecx
jl 0x39b7
movq -0x90(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
cmpl %edx, %esi
jge 0x3aa2
movl $0x2, %eax
movl %eax, 0x2c(%r14)
movl %eax, 0x4(%r14)
movl -0xa8(%rbp), %ecx
testl %ecx, %ecx
je 0x39db
cmpl $0x0, -0xa4(%rbp)
jne 0x45b4
cmpl $0x0, 0x4(%r14)
jne 0x45b4
xorl %eax, %eax
movl %ecx, -0x108(%rbp)
testl %ecx, %ecx
setne -0x29(%rbp)
sete %al
leaq (%rax,%rax,4), %rbx
shll $0x2, %eax
movslq -0xa8(%rbp,%rax), %rcx
leaq (%rax,%rax,2), %rax
addq %rbp, %rax
addq $-0x170, %rax           # imm = 0xFE90
movl -0x4(%rax,%rcx,4), %r12d
andl $0x3fffffff, %r12d      # imm = 0x3FFFFFFF
movq 0x30(%r13), %rax
movl (%rax), %eax
movq %rax, -0x60(%rbp)
addl %r12d, %eax
movl %eax, -0x58(%rbp)
movq 0x10(%r14,%rbx,8), %rsi
movq 0x18(%r14,%rbx,8), %rdx
movq %r13, %r15
movq 0x38(%r13), %r13
movl (%r13), %ecx
movq 0x471d(%rip), %r8       # 0x8168
movl 0x20(%r15), %eax
movl 0x24(%r15), %r14d
movl %r12d, %edi
movq %rsi, -0x38(%rbp)
movq %rdx, -0x68(%rbp)
xorl %r9d, %r9d
pushq %rax
pushq %r14
callq 0x2dde
addq $0x10, %rsp
cmpl %r14d, %eax
movq %r12, -0x78(%rbp)
jge 0x3adb
movslq 0x28(%r15), %r14
cmpl %r14d, %r12d
movq -0x50(%rbp), %rdi
jge 0x3bf2
movq -0x38(%rbp), %r15
movq %r15, %rsi
movq %r12, %rdx
callq 0x2070
movq -0x50(%rbp), %rdi
movq %r12, %r14
jmp 0x3c0e
movl -0xa8(%rbp), %esi
movl -0xa4(%rbp), %edx
movl %esi, %edi
addl %edx, %edi
jne 0x3abe
movl $0x3, %eax
jmp 0x39bc
cmpl $0x3, %esi
setne %dil
cmpl $0x3, %edx
setne %r8b
testb %r8b, %dil
jne 0x3af1
movl $0x4, %eax
jmp 0x39bc
movq -0x50(%rbp), %rdi
movb $0x2a, (%rdi)
movl $0x1, %r14d
movq -0x38(%rbp), %r15
jmp 0x3c0e
testl %esi, %esi
setle %sil
testl %edx, %edx
setle %dl
orb %sil, %dl
jne 0x39c4
movl $0x80000000, %edx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0x28(%r14)
orl %edx, %eax
movl %eax, (%r14)
movq 0x38(%r13), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movq 0x4643(%rip), %rax      # 0x8168
movq %rax, -0x58(%rbp)
movl 0x20(%r13), %eax
movq %rax, -0x68(%rbp)
movl 0x24(%r13), %r10d
leaq 0x18(%r14), %r15
leaq -0x174(%rbp), %rbx
xorl %r13d, %r13d
movq %r10, -0x60(%rbp)
movl -0x38(%rbp), %r12d
movslq -0xa8(%rbp,%r13), %rax
movl (%rbx,%rax,4), %r14d
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
andl %eax, %r14d
movl %r14d, -0xd0(%rbp,%r13)
movq -0x8(%r15), %rsi
movq (%r15), %rdx
movl %r14d, %edi
movl %r12d, %ecx
movq -0x58(%rbp), %r8
xorl %r9d, %r9d
pushq -0x68(%rbp)
pushq %r10
callq 0x2dde
addq $0x10, %rsp
movl %eax, %ecx
cmpl %r12d, %eax
je 0x3b92
xorl %ecx, %ecx
cmpl %r14d, %eax
cmovel %eax, %ecx
movl $0x0, %eax
movq -0x60(%rbp), %r10
cmpl %r10d, %ecx
jl 0x3ba8
movl %ecx, %eax
movl %eax, -0x120(%rbp,%r13)
addq $0x4, %r13
addq $0x28, %r15
addq $0xc, %rbx
cmpq $0x4, %r13
je 0x3b4b
movl -0x120(%rbp), %eax
movl -0x11c(%rbp), %ecx
movl %eax, %edx
orl %ecx, %edx
jne 0x40db
movl $0x6, %eax
movq -0x40(%rbp), %r14
movl %eax, 0x2c(%r14)
movl %eax, 0x4(%r14)
movq -0x48(%rbp), %r13
jmp 0x39c4
movl %r12d, %eax
subl %r14d, %eax
movslq %eax, %rsi
movq -0x38(%rbp), %r15
addq %r15, %rsi
movq %r14, %rdx
callq 0x2070
movq -0x50(%rbp), %rdi
movq -0x40(%rbp), %rax
leaq (%rax,%rbx,8), %r12
movb $0x0, (%rdi,%r14)
movq %rax, %r14
movq %rdi, %rbx
callq 0x2250
movq %rax, 0x20(%r14)
movq %rbx, %rdi
callq 0x2250
movq %rax, 0x48(%r14)
movslq -0x58(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq (%r15,%rax), %rbx
leaq -0x134(%rbp), %rcx
movq %r13, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x2b00
testl %eax, %eax
jle 0x3c79
movl $0x5, %eax
movl %eax, 0x2c(%r14)
movl %eax, 0x4(%r14)
movq -0x48(%rbp), %r13
movq %r12, %r15
jmp 0x4460
movq %r15, %r9
movzbl -0x29(%rbp), %eax
leaq (%rax,%rax,4), %rax
movl (%r14,%rax,8), %r15d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movq -0x70(%rbp), %r8
movq -0x78(%rbp), %r10
je 0x3cc7
movq 0x10(%r14,%rax,8), %rcx
leaq 0x45fb(%rip), %rdx      # 0x82a0
movq %r15, %rsi
movsbq (%rcx), %rdi
testq %rdi, %rdi
js 0x3cb7
movb (%rdi,%rdx), %dil
jmp 0x3cba
movb $0x4e, %dil
movb %dil, -0x1(%r8,%rsi)
incq %rcx
decq %rsi
jne 0x3ca8
movq %rbx, -0xe0(%rbp)
leaq (%r14,%rax,8), %rsi
movb $0x0, (%r8,%r15)
testl %r15d, %r15d
movq -0xb0(%rbp), %r14
je 0x3cf9
movq 0x18(%rsi), %rax
movl %r15d, %ecx
movb (%rax), %dl
movb %dl, -0x1(%r14,%rcx)
incq %rax
decq %rcx
jne 0x3cea
movq %rsi, -0x110(%rbp)
movb $0x0, (%r14,%r15)
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movq %r12, -0xd8(%rbp)
andl (%r12), %r13d
subl %r10d, %r13d
movq %r15, %rcx
movq %r15, -0xf0(%rbp)
movl %r10d, %r15d
leaq (%r9,%r15), %r12
addq -0x68(%rbp), %r15
movq -0x48(%rbp), %rax
movl 0x10(%rax), %r11d
movq %r11, -0xe8(%rbp)
movl 0x14(%rax), %r10d
movq %r10, -0x98(%rbp)
movl %r13d, %edi
movq %r12, %rsi
movq %r12, -0xa0(%rbp)
movq %r15, %rdx
movq -0x70(%rbp), %rbx
movq %rbx, %r8
movq %r14, %r9
leaq -0xd0(%rbp), %rax
pushq %rax
movl $0x2, %eax
pushq %rax
pushq %r10
pushq %r11
callq 0x2ec4
addq $0x20, %rsp
movq %rax, -0x50(%rbp)
leaq -0x120(%rbp), %rax
movl %r13d, %edi
movq %r12, %rsi
movq %r15, %rdx
movq -0xf0(%rbp), %r12
movl %r12d, %ecx
movq %rbx, %r8
movq %r14, %r9
pushq %rax
movl $0x2, %eax
pushq %rax
pushq -0x98(%rbp)
movq -0xe8(%rbp), %rbx
pushq %rbx
callq 0x2fe5
addq $0x20, %rsp
movq %rax, -0x98(%rbp)
subq $0x8, %rsp
leaq -0x150(%rbp), %rax
movl %r13d, %edi
movq -0xa0(%rbp), %rsi
movq %r15, %rdx
movl %r12d, %ecx
movq -0x70(%rbp), %r8
movq %r14, %r9
pushq %rax
movl $0x2, %r14d
pushq %r14
pushq %rbx
callq 0x30cb
movq -0x98(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq $0x20, %rsp
leal (%rsi,%rdx), %ecx
addl %eax, %ecx
cmpl %r14d, %ecx
jl 0x3e2a
movl $0x17, %eax
movq -0x40(%rbp), %r14
movl %eax, 0x2c(%r14)
movl %eax, 0x4(%r14)
movq -0x48(%rbp), %r13
jmp 0x4459
testl %ecx, %ecx
movq -0x40(%rbp), %r14
movq -0x48(%rbp), %r13
je 0x4117
movl $0x15, %ecx
movl %ecx, 0x2c(%r14)
movl %ecx, 0x4(%r14)
cmpl $0x1, %edx
jne 0x4129
movq -0xd0(%rbp), %rbx
movq %rbx, -0x100(%rbp)
shrq $0x20, %rbx
movq -0x78(%rbp), %rax
addl %ebx, %eax
xorl %r15d, %r15d
movslq %eax, %rcx
movl $0x0, %r12d
movq -0x60(%rbp), %r14
cmpl %ebx, %r14d
jge 0x3ee8
movq -0x78(%rbp), %rdx
movq %rcx, %r12
leal (%r14,%rdx), %ecx
incl %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
notl %r14d
addl %eax, %r14d
subl %edx, %r14d
incq %r14
movq -0x88(%rbp), %rdi
movq -0xe0(%rbp), %rsi
movq %r14, %rdx
callq 0x2160
movq -0xf8(%rbp), %rax
movq -0x68(%rbp), %rcx
leaq (%rcx,%rax), %rsi
movq -0x80(%rbp), %rdi
movq %r14, %rdx
movq %rax, %r14
callq 0x2160
movq %r12, %rcx
xorl %r12d, %r12d
leaq (%r14,%r12), %rax
incq %rax
incq %r12
cmpq %rcx, %rax
jl 0x3ed5
movq -0x60(%rbp), %r14
subl %ebx, %r14d
cmovll %r15d, %r14d
movq -0x100(%rbp), %r15
cmpl %r15d, %r14d
jge 0x4058
movl 0xc(%r13), %eax
movl %eax, -0x104(%rbp)
movslq %r14d, %rdx
movslq %r15d, %rax
movq %rax, -0x98(%rbp)
movl %r12d, %r12d
movq -0x80(%rbp), %rax
addq %r12, %rax
movq %rax, -0xf0(%rbp)
movq -0x88(%rbp), %rax
addq %r12, %rax
movq %rax, -0xe8(%rbp)
movq -0x70(%rbp), %rax
addq %rdx, %rax
movq %rax, -0xe0(%rbp)
movq -0xb0(%rbp), %rax
addq %rdx, %rax
movq %rax, -0x130(%rbp)
movq %rdx, -0xa0(%rbp)
addq %rdx, %rcx
movq -0x38(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x128(%rbp)
addq -0x68(%rbp), %rcx
xorl %edx, %edx
movq %rcx, -0x60(%rbp)
movq -0x128(%rbp), %rax
movsbq (%rax,%rdx), %r14
movsbl (%rcx,%rdx), %ebx
movq -0xe0(%rbp), %rax
movsbq (%rax,%rdx), %r13
movq -0x130(%rbp), %rax
movq %rdx, -0x50(%rbp)
movsbl (%rax,%rdx), %r15d
cmpb %r13b, %r14b
jne 0x3fe7
cmpb %r15b, %bl
movl %r15d, %eax
cmovgl %ebx, %eax
cmovll %ebx, %r15d
movl %r15d, %ecx
addl $-0x21, %ecx
shrl $0x1f, %ecx
addl %r15d, %ecx
addl $-0x21, %ecx
sarl %ecx
leal (%rax,%rcx), %ebx
addl $-0x21, %ebx
callq 0x2030
shlq $0x2, %r14
addq (%rax), %r14
movl -0x104(%rbp), %eax
cmpl %eax, %ebx
cmovgel %eax, %ebx
jmp 0x4007
callq 0x2030
movq (%rax), %rax
cmpb %r15b, %bl
jle 0x3ffd
leaq (%rax,%r14,4), %r14
subl %r15d, %ebx
jmp 0x4007
leaq (%rax,%r13,4), %r14
subl %ebx, %r15d
movl %r15d, %ebx
movq -0x50(%rbp), %rdx
movl (%r14), %eax
shll $0x8, %ebx
addl $0x2100, %ebx           # imm = 0x2100
orl %eax, %ebx
movq -0xe8(%rbp), %rcx
movb %al, (%rcx,%rdx)
movq -0xf0(%rbp), %rax
movb %bh, (%rax,%rdx)
movq -0xa0(%rbp), %rax
addq %rdx, %rax
incq %rax
incq %rdx
cmpq -0x98(%rbp), %rax
movq -0x60(%rbp), %rcx
jl 0x3f79
addl %edx, %r12d
movq -0x100(%rbp), %r15
movq -0x110(%rbp), %rax
movl (%rax), %ebx
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
cmpl %r15d, %ebx
movq -0xd8(%rbp), %rax
movq -0x78(%rbp), %rcx
jle 0x4347
movl %r12d, %r12d
movq -0x88(%rbp), %rax
leaq (%rax,%r12), %rdi
movslq %r15d, %r14
movq -0x70(%rbp), %rsi
addq %r14, %rsi
notl %r15d
addl %ebx, %r15d
incq %r15
movq %r15, %rdx
callq 0x2160
movq -0x80(%rbp), %rax
leaq (%rax,%r12), %rdi
movq -0xb0(%rbp), %rsi
addq %r14, %rsi
movq %r15, %rdx
callq 0x2160
subq %rbx, %r14
xorl %eax, %eax
movq -0x48(%rbp), %r13
decq %rax
cmpq %rax, %r14
jne 0x40c7
subl %eax, %r12d
movq -0x40(%rbp), %r14
jmp 0x43c2
xorl %ebx, %ebx
cmpl %ecx, %eax
setl %bl
leaq (%rbx,%rbx,4), %rax
movq -0x40(%rbp), %r14
leaq (%r14,%rax,8), %rdi
shll $0x2, %ebx
movq -0x48(%rbp), %r13
movq 0x30(%r13), %rax
movl (%rax), %esi
addl -0xd0(%rbp,%rbx), %esi
callq 0x4dc3
movl $0x0, -0xa8(%rbp,%rbx)
jmp 0x39c4
movl $0x16, %eax
movl %eax, 0x2c(%r14)
movl %eax, 0x4(%r14)
jmp 0x4459
cmpl $0x1, %esi
movq -0xd8(%rbp), %rcx
jne 0x4c99
movq -0x120(%rbp), %r8
movq %r8, %rdi
shrq $0x20, %rdi
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
andl (%rcx), %ebx
movl %ebx, %r15d
subl %edi, %r15d
movl %r15d, %r13d
subl %r8d, %r13d
xorl %r12d, %r12d
movl -0x58(%rbp), %edx
cmpl %r13d, %edx
jge 0x41e4
movq -0x60(%rbp), %r14
notl %r14d
addl %ebx, %r14d
movq -0x78(%rbp), %rax
movq %r8, -0xa0(%rbp)
addl %r8d, %eax
movq %rdi, -0x50(%rbp)
addl %edi, %eax
subl %eax, %r14d
incq %r14
movq -0x88(%rbp), %rdi
movq -0xe0(%rbp), %rsi
movq %r14, %rdx
callq 0x2160
movq -0xf8(%rbp), %rax
movq -0x68(%rbp), %rcx
leaq (%rcx,%rax), %rsi
movq -0x80(%rbp), %rdi
movq %r14, %rdx
movq %rax, %r14
callq 0x2160
movslq %r13d, %rax
xorl %r12d, %r12d
leaq (%r14,%r12), %rcx
incq %rcx
incq %r12
cmpq %rax, %rcx
jl 0x41c3
movq -0x40(%rbp), %r14
movl -0x58(%rbp), %edx
movq -0x50(%rbp), %rdi
movq -0xa0(%rbp), %r8
subl %edx, %r15d
cmpl %r13d, %edx
cmovll %r8d, %r15d
testl %r15d, %r15d
jle 0x43be
movq -0x110(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, -0xa0(%rbp)
subl %r15d, %eax
movq -0x60(%rbp), %rsi
addl %ebx, %esi
addl -0x78(%rbp), %esi
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
movl %ecx, -0xe8(%rbp)
cltq
movl %r12d, %r12d
addq %rax, -0x70(%rbp)
movq %rax, -0x78(%rbp)
addq %rax, -0xb0(%rbp)
cmpl %edx, %r13d
cmovgel %edx, %r13d
addl %r8d, %edi
movq -0x80(%rbp), %rax
addq %r12, %rax
movq %rax, -0x98(%rbp)
addl %r13d, %edi
movq -0x88(%rbp), %rax
addq %r12, %rax
movq %rax, -0xf0(%rbp)
subl %edi, %esi
xorl %edx, %edx
movq %rsi, -0x60(%rbp)
leal (%rsi,%rdx), %eax
cltq
movq -0x38(%rbp), %rcx
movsbq (%rcx,%rax), %r14
movq -0x68(%rbp), %rcx
movsbl (%rcx,%rax), %ebx
movq -0x70(%rbp), %rax
movsbq (%rax,%rdx), %r13
movq -0xb0(%rbp), %rax
movq %rdx, -0x50(%rbp)
movsbl (%rax,%rdx), %r15d
cmpb %r13b, %r14b
jne 0x42de
cmpb %r15b, %bl
movl %r15d, %eax
cmovgl %ebx, %eax
cmovll %ebx, %r15d
movl %r15d, %ecx
addl $-0x21, %ecx
shrl $0x1f, %ecx
addl %r15d, %ecx
addl $-0x21, %ecx
sarl %ecx
leal (%rax,%rcx), %ebx
addl $-0x21, %ebx
callq 0x2030
shlq $0x2, %r14
addq (%rax), %r14
movl -0xe8(%rbp), %eax
cmpl %eax, %ebx
cmovgel %eax, %ebx
jmp 0x42fe
callq 0x2030
movq (%rax), %rax
cmpb %r15b, %bl
jle 0x42f4
leaq (%rax,%r14,4), %r14
subl %r15d, %ebx
jmp 0x42fe
leaq (%rax,%r13,4), %r14
subl %ebx, %r15d
movl %r15d, %ebx
movq -0x50(%rbp), %rdx
movl (%r14), %eax
shll $0x8, %ebx
addl $0x2100, %ebx           # imm = 0x2100
orl %eax, %ebx
movq -0xf0(%rbp), %rcx
movb %al, (%rcx,%rdx)
movq -0x98(%rbp), %rax
movb %bh, (%rax,%rdx)
movq -0x78(%rbp), %rax
addq %rdx, %rax
incq %rax
incq %rdx
cmpq -0xa0(%rbp), %rax
movq -0x60(%rbp), %rsi
jl 0x426d
addl %edx, %r12d
jmp 0x43ba
leal (%rcx,%r15), %ebx
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
andl (%rax), %r13d
cmpl %r13d, %ebx
jge 0x43ba
movl %r12d, %r14d
movq -0x88(%rbp), %rax
leaq (%rax,%r14), %rdi
movl %ebx, %eax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rsi
addq %rax, %rsi
movq %r15, %rax
movl %ecx, %r15d
notl %r15d
addl %r13d, %r15d
subl %eax, %r15d
incq %r15
movq %r15, %rdx
callq 0x2160
addq -0x80(%rbp), %r14
movq -0x68(%rbp), %rsi
addq -0x70(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2160
addl %r13d, %r12d
subl -0x78(%rbp), %r12d
subl -0x100(%rbp), %r12d
incl %ebx
cmpl %ebx, %r13d
jg 0x43b3
movq -0x40(%rbp), %r14
movq -0x48(%rbp), %r13
movl %r12d, %ebx
movslq %r12d, %rcx
xorl %eax, %eax
movq -0x80(%rbp), %rdx
movb %al, (%rdx,%rcx)
movq -0x88(%rbp), %r15
movb %al, (%r15,%rcx)
testl %ecx, %ecx
jle 0x43f9
xorl %eax, %eax
movzbl (%r15,%rax), %ecx
orl $0x20, %ecx
cmpl $0x6e, %ecx
je 0x43f9
incq %rax
cmpq %rax, %rbx
jne 0x43e2
movl %ebx, %eax
movl $0x1, %ecx
cmpl %ebx, %eax
jne 0x440d
movl $0xb, %ecx
cmpl 0x8(%r13), %ebx
jge 0x4415
movl %ecx, 0x2c(%r14)
movl %ecx, 0x4(%r14)
movq 0x10(%r14), %rdi
callq 0x2050
movq 0x18(%r14), %rdi
callq 0x2050
movq %r15, %rdi
callq 0x2250
movq %rax, 0x10(%r14)
movq -0x80(%rbp), %rdi
callq 0x2250
movq %rax, 0x18(%r14)
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movl $0x80000000, %eax       # imm = 0x80000000
movl (%r14), %ecx
andl %eax, %ecx
orl %ebx, %ecx
movl %ecx, (%r14)
andl %eax, 0x28(%r14)
movq -0xd8(%rbp), %r15
movl 0x4(%r14), %eax
andl $-0x2, %eax
cmpl $0x16, %eax
jne 0x45b4
movq 0x10(%r15), %rdi
movq -0xf8(%rbp), %rbx
leaq (%rdi,%rbx), %rsi
movl (%r15), %edx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andq %rax, %rdx
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
subq %rbx, %rdx
callq 0x21e0
movq 0x18(%r15), %rdi
leaq (%rdi,%rbx), %rsi
movl (%r15), %edx
andq %r12, %rdx
subq %rbx, %rdx
callq 0x21e0
movl (%r15), %eax
movl %eax, %ecx
subl -0x58(%rbp), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %eax       # imm = 0x80000000
orl %ecx, %eax
movl %eax, (%r15)
movq 0x18(%r15), %rdx
xorl %eax, %eax
movb %al, (%rdx,%rcx)
movq 0x10(%r15), %rcx
movl (%r15), %edx
andq %r12, %rdx
movb %al, (%rcx,%rdx)
xorl %ecx, %ecx
leaq (%rax,%rax,4), %rsi
movl (%r14,%rsi,8), %edx
andq $0x7fffffff, %rdx       # imm = 0x7FFFFFFF
je 0x450f
leaq (%r14,%rsi,8), %rsi
movq 0x10(%rsi), %rsi
xorl %edi, %edi
xorl %r8d, %r8d
cmpb $0x4e, (%rsi,%rdi)
sete %r8b
addl %r8d, %ecx
incq %rdi
cmpq %rdi, %rdx
jne 0x44f9
leaq 0x1(%rax), %rdx
testq %rax, %rax
movq %rdx, %rax
je 0x44de
movl $0x1, %eax
testl %ecx, %ecx
jne 0x454b
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl (%r15), %esi
andl %ecx, %esi
movl 0x8(%r13), %edx
movl $0xc, %eax
cmpl %edx, %esi
jl 0x454b
movzbl -0x29(%rbp), %esi
leaq (%rsi,%rsi,4), %rsi
andl (%r14,%rsi,8), %ecx
cmpl %edx, %ecx
jge 0x4553
movl %eax, 0x2c(%r14)
movl %eax, 0x4(%r14)
cmpl $0x0, -0x108(%rbp)
jne 0x45b4
movq 0x10(%r15), %rax
xorl %ecx, %ecx
movb -0x29(%rbp), %dl
movb %dl, %cl
leaq (%rcx,%rcx,4), %rcx
movq 0x10(%r14,%rcx,8), %rdx
movq %rdx, 0x10(%r15)
movq %rax, 0x10(%r14,%rcx,8)
movq 0x18(%r15), %rax
movq 0x18(%r14,%rcx,8), %rdx
movq %rdx, 0x18(%r15)
movq %rax, 0x18(%r14,%rcx,8)
movl (%r15), %eax
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl %eax, %esi
andl %edx, %esi
movl (%r14,%rcx,8), %edi
andl %edi, %edx
movl $0x80000000, %r8d       # imm = 0x80000000
andl %r8d, %eax
orl %edx, %eax
movl %eax, (%r15)
andl %r8d, %edi
orl %esi, %edi
movl %edi, (%r14,%rcx,8)
movl 0x4(%r14), %eax
leal -0x15(%rax), %ecx
cmpl $0x3, %ecx
jae 0x46aa
movq %r14, %r15
movq 0x3bb2(%rip), %r14      # 0x8180
movq %r13, %rax
movl 0x18(%r13), %r13d
movl 0x1c(%rax), %ebx
movq %r14, %rdi
callq 0x20c0
movl (%r15), %r12d
movq %r12, -0x38(%rbp)
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movq 0x10(%r15), %rsi
movq 0x18(%r15), %r15
movl %r12d, %edi
movq %r15, %rdx
movl %eax, %ecx
movq %r14, %r8
xorl %r9d, %r9d
leaq -0xd0(%rbp), %rax
pushq %rax
pushq $0x4
pushq %rbx
pushq %r13
callq 0x2ec4
addq $0x20, %rsp
testl %eax, %eax
jle 0x49e3
movq -0xd0(%rbp), %rcx
movl %ecx, %edx
shrq $0x20, %rcx
addq %rcx, %rdx
cmpq %r12, %rdx
je 0x4654
leal -0x1(%rax), %ecx
movq -0xd0(%rbp,%rcx,8), %rcx
movl %ecx, %edx
shrq $0x20, %rcx
addq %rcx, %rdx
cmpq %r12, %rdx
jne 0x49e3
decl %eax
movq -0xd0(%rbp,%rax,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
subl %eax, %r12d
cmpl %ebx, %r12d
jle 0x49cc
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x38(%rbp), %rdx
andl $0x80000000, %edx       # imm = 0x80000000
orl %ecx, %edx
movq -0x40(%rbp), %rsi
movl %edx, (%rsi)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andq %rcx, %rax
xorl %edx, %edx
movb %dl, (%r15,%rax)
movq 0x10(%rsi), %rax
movl (%rsi), %esi
andq %rcx, %rsi
movb %dl, (%rax,%rsi)
jmp 0x49e3
cmpl $0x3, %eax
jne 0x4c8a
xorl %ebx, %ebx
movq 0x3ac4(%rip), %r14      # 0x8180
movl 0x18(%r13), %r15d
movl 0x1c(%r13), %r13d
movq %r14, %rdi
callq 0x20c0
movq -0x40(%rbp), %rcx
movl (%rcx,%rbx), %r12d
movq %r12, -0x90(%rbp)
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movq 0x10(%rcx,%rbx), %rsi
movq 0x18(%rcx,%rbx), %rdx
movl %r12d, %edi
movq %rdx, -0x38(%rbp)
movl %eax, %ecx
movq %r14, %r8
xorl %r9d, %r9d
leaq -0xd0(%rbp), %rax
pushq %rax
pushq $0x4
pushq %r13
pushq %r15
callq 0x2ec4
addq $0x20, %rsp
testl %eax, %eax
jle 0x47b8
movq -0xd0(%rbp), %rcx
movl %ecx, %edx
shrq $0x20, %rcx
addq %rcx, %rdx
cmpq %r12, %rdx
je 0x4748
leal -0x1(%rax), %ecx
movq -0xd0(%rbp,%rcx,8), %rcx
movl %ecx, %edx
shrq $0x20, %rcx
addq %rcx, %rdx
cmpq %r12, %rdx
jne 0x47b8
decl %eax
movq -0xd0(%rbp,%rax,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
subl %eax, %r12d
cmpl %r13d, %r12d
jle 0x47a0
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x90(%rbp), %rdx
andl $0x80000000, %edx       # imm = 0x80000000
orl %ecx, %edx
movq -0x40(%rbp), %rcx
movl %edx, (%rcx,%rbx)
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andq %rsi, %rax
xorl %edx, %edx
movq -0x38(%rbp), %rdi
movb %dl, (%rdi,%rax)
movq 0x10(%rcx,%rbx), %rax
movl (%rcx,%rbx), %ecx
andq %rsi, %rcx
movb %dl, (%rax,%rcx)
jmp 0x47b8
sarq $0x20, %rcx
movq -0x38(%rbp), %rdi
addq %rcx, %rdi
movslq %r12d, %rdx
movl $0x22, %esi
callq 0x2110
movq 0x39d1(%rip), %r14      # 0x8190
movq -0x48(%rbp), %rax
movl 0x18(%rax), %ecx
movq %rcx, -0x38(%rbp)
movl 0x1c(%rax), %r15d
movq %r14, %rdi
callq 0x20c0
movq -0x40(%rbp), %r9
movl (%r9,%rbx), %r13d
movl %r13d, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movq 0x10(%r9,%rbx), %rsi
movq 0x18(%r9,%rbx), %rdx
movl %r12d, %edi
movq %rdx, -0x58(%rbp)
movl %eax, %ecx
movq %r14, %r8
movq %r9, %r14
xorl %r9d, %r9d
leaq -0xd0(%rbp), %rax
pushq %rax
pushq $0x4
movq %r15, -0x90(%rbp)
pushq %r15
pushq -0x38(%rbp)
callq 0x2ec4
addq $0x20, %rsp
testl %eax, %eax
jle 0x4894
decl %eax
movq -0xd0(%rbp,%rax,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
subl %eax, %r12d
cmpl -0x90(%rbp), %r12d
jle 0x487c
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %r13d      # imm = 0x80000000
orl %ecx, %r13d
movl %r13d, (%r14,%rbx)
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andq %rsi, %rax
xorl %edx, %edx
movq -0x58(%rbp), %rcx
movb %dl, (%rcx,%rax)
movq 0x10(%r14,%rbx), %rax
movl (%r14,%rbx), %ecx
andq %rsi, %rcx
movb %dl, (%rax,%rcx)
jmp 0x4894
sarq $0x20, %rcx
movq -0x58(%rbp), %rdi
addq %rcx, %rdi
movslq %r12d, %rdx
movl $0x22, %esi
callq 0x2110
leaq (%r14,%rbx), %rdi
movq 0x38e9(%rip), %rsi      # 0x8188
movq -0x48(%rbp), %r15
movl 0x18(%r15), %r8d
movl 0x1c(%r15), %ecx
movl $0x1, %edx
xorl %r9d, %r9d
callq 0x4e2f
movq 0x38a1(%rip), %r12      # 0x8160
movl 0x18(%r15), %eax
movq %rax, -0x38(%rbp)
movl 0x1c(%r15), %r15d
movq %r12, %rdi
callq 0x20c0
movl (%r14,%rbx), %r13d
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl %ecx, %r13d
movq 0x10(%r14,%rbx), %rsi
movq 0x18(%r14,%rbx), %r14
movl %r13d, %edi
movq %rsi, -0x90(%rbp)
movq %r14, %rdx
movl %eax, %ecx
movq %r12, %r8
xorl %r9d, %r9d
leaq -0xd0(%rbp), %rax
pushq %rax
pushq $0x4
pushq %r15
pushq -0x38(%rbp)
callq 0x2fe5
addq $0x20, %rsp
testl %eax, %eax
jle 0x49b5
movq %r14, %rdi
decl %eax
movq -0xd0(%rbp,%rax,8), %rdx
movq %rdx, %rax
shrq $0x20, %rax
subl %eax, %r13d
movslq %r13d, %r14
cmpl %r15d, %r13d
jle 0x49a8
movq -0x90(%rbp), %rdi
leaq (%rdi,%r14), %rsi
sarq $0x20, %rdx
callq 0x21e0
movq -0x40(%rbp), %r15
movq 0x18(%r15,%rbx), %rdi
leaq (%rdi,%r14), %rsi
movl (%r15,%rbx), %edx
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
andq %r12, %rdx
subq %r14, %rdx
callq 0x21e0
movl (%r15,%rbx), %eax
movl %eax, %ecx
subl %r14d, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %eax       # imm = 0x80000000
orl %ecx, %eax
movl %eax, (%r15,%rbx)
movq 0x18(%r15,%rbx), %rax
xorl %edx, %edx
movb %dl, (%rax,%rcx)
movq 0x10(%r15,%rbx), %rax
movl (%r15,%rbx), %ecx
andq %r12, %rcx
movb %dl, (%rax,%rcx)
jmp 0x49b5
movl $0x22, %esi
movq %r14, %rdx
callq 0x2110
addq $0x28, %rbx
cmpq $0x28, %rbx
movq -0x48(%rbp), %r13
je 0x46b5
jmp 0x4c8a
sarq $0x20, %rcx
addq %rcx, %r15
movslq %r12d, %rdx
movq %r15, %rdi
movl $0x22, %esi
callq 0x2110
movq 0x37a6(%rip), %r14      # 0x8190
movq -0x48(%rbp), %rax
movl 0x18(%rax), %ecx
movq %rcx, -0x38(%rbp)
movl 0x1c(%rax), %r13d
movq %r14, %rdi
callq 0x20c0
movq -0x40(%rbp), %r9
movl (%r9), %ebx
movl %ebx, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movq 0x10(%r9), %rsi
movq 0x18(%r9), %r15
movl %r12d, %edi
movq %r15, %rdx
movl %eax, %ecx
movq %r14, %r8
movq %r9, %r14
xorl %r9d, %r9d
leaq -0xd0(%rbp), %rax
pushq %rax
pushq $0x4
pushq %r13
pushq -0x38(%rbp)
callq 0x2ec4
addq $0x20, %rsp
testl %eax, %eax
jle 0x4aa7
decl %eax
movq -0xd0(%rbp,%rax,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
subl %eax, %r12d
cmpl %r13d, %r12d
jle 0x4a90
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %ebx       # imm = 0x80000000
orl %ecx, %ebx
movl %ebx, (%r14)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andq %rcx, %rax
xorl %edx, %edx
movb %dl, (%r15,%rax)
movq 0x10(%r14), %rax
movl (%r14), %esi
andq %rcx, %rsi
movb %dl, (%rax,%rsi)
jmp 0x4aa7
sarq $0x20, %rcx
addq %rcx, %r15
movslq %r12d, %rdx
movq %r15, %rdi
movl $0x22, %esi
callq 0x2110
cmpl $0x15, 0x4(%r14)
movq -0x48(%rbp), %rax
je 0x4c8a
movq 0x36d3(%rip), %r14      # 0x8190
movl 0x18(%rax), %ecx
movq %rcx, -0x38(%rbp)
movl 0x1c(%rax), %r13d
movq %r14, %rdi
callq 0x20c0
movq -0x40(%rbp), %r9
movl 0x28(%r9), %ebx
movl %ebx, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movq 0x38(%r9), %rsi
movq 0x40(%r9), %r15
movl %r12d, %edi
movq %r15, %rdx
movl %eax, %ecx
movq %r14, %r8
movq %r9, %r14
xorl %r9d, %r9d
leaq -0xd0(%rbp), %rax
pushq %rax
pushq $0x4
pushq %r13
pushq -0x38(%rbp)
callq 0x2ec4
addq $0x20, %rsp
testl %eax, %eax
jle 0x4b79
decl %eax
movq -0xd0(%rbp,%rax,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
subl %eax, %r12d
cmpl %r13d, %r12d
jle 0x4b62
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %ebx       # imm = 0x80000000
orl %ecx, %ebx
movl %ebx, 0x28(%r14)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andq %rcx, %rax
xorl %edx, %edx
movb %dl, (%r15,%rax)
movq 0x38(%r14), %rax
movl 0x28(%r14), %esi
andq %rcx, %rsi
movb %dl, (%rax,%rsi)
jmp 0x4b79
sarq $0x20, %rcx
addq %rcx, %r15
movslq %r12d, %rdx
movq %r15, %rdi
movl $0x22, %esi
callq 0x2110
movq 0x3608(%rip), %rsi      # 0x8188
movq -0x48(%rbp), %rbx
movl 0x18(%rbx), %r8d
movl 0x1c(%rbx), %ecx
movq -0x90(%rbp), %rdi
movl $0x1, %edx
xorl %r9d, %r9d
callq 0x4e2f
movq 0x35ba(%rip), %r13      # 0x8160
movl 0x18(%rbx), %r15d
movl 0x1c(%rbx), %ebx
movq %r13, %rdi
callq 0x20c0
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
andl 0x28(%r14), %r12d
movq %r14, %rcx
movq 0x38(%r14), %r14
movq 0x40(%rcx), %rdx
movl %r12d, %edi
movq %r14, %rsi
movq %rdx, -0x48(%rbp)
movl %eax, %ecx
movq %r13, %r8
xorl %r9d, %r9d
leaq -0xd0(%rbp), %rax
pushq %rax
pushq $0x4
pushq %rbx
pushq %r15
callq 0x2fe5
addq $0x20, %rsp
testl %eax, %eax
jle 0x4c8a
decl %eax
movq -0xd0(%rbp,%rax,8), %rdx
movq %rdx, %rax
shrq $0x20, %rax
subl %eax, %r12d
movslq %r12d, %r13
cmpl %ebx, %r12d
jle 0x4c79
leaq (%r14,%r13), %rsi
sarq $0x20, %rdx
movq %r14, %rdi
callq 0x21e0
movq -0x40(%rbp), %r14
movq 0x40(%r14), %rdi
leaq (%rdi,%r13), %rsi
movl 0x28(%r14), %edx
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
andq %rbx, %rdx
subq %r13, %rdx
callq 0x21e0
movl 0x28(%r14), %eax
movl %eax, %ecx
subl %r13d, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %eax       # imm = 0x80000000
orl %ecx, %eax
movl %eax, 0x28(%r14)
movq 0x40(%r14), %rax
xorl %edx, %edx
movb %dl, (%rax,%rcx)
movq 0x38(%r14), %rax
movl 0x28(%r14), %ecx
andq %rbx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x4c8a
movq -0x48(%rbp), %rdi
movl $0x22, %esi
movq %r13, %rdx
callq 0x2110
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r12d, %r12d
cmpl $0x1, %eax
jne 0x43c2
movl (%rcx), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, -0x38(%rbp)
cmpl %eax, -0x58(%rbp)
jge 0x43c2
movl 0xc(%r13), %eax
movl %eax, -0x50(%rbp)
movq -0x68(%rbp), %rax
addq -0xf8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
addl -0x14c(%rbp), %eax
movq %rax, -0x60(%rbp)
xorl %r12d, %r12d
movq %r12, %rdx
movq -0x60(%rbp), %rax
addl %r12d, %eax
movq -0xe0(%rbp), %rcx
movsbq (%rcx,%r12), %r12
movq -0x68(%rbp), %rcx
movq %rdx, %r15
movsbl (%rcx,%rdx), %ebx
cltq
movq -0x70(%rbp), %rcx
movsbq (%rcx,%rax), %r14
movq -0xb0(%rbp), %rcx
movsbl (%rcx,%rax), %r13d
cmpb %r14b, %r12b
jne 0x4d57
cmpb %r13b, %bl
movl %r13d, %eax
cmovgl %ebx, %eax
cmovll %ebx, %r13d
movl %r13d, %ecx
addl $-0x21, %ecx
shrl $0x1f, %ecx
addl %r13d, %ecx
addl $-0x21, %ecx
sarl %ecx
leal (%rax,%rcx), %ebx
addl $-0x21, %ebx
callq 0x2030
cmpl -0x50(%rbp), %ebx
jl 0x4d4e
movl -0x50(%rbp), %ebx
shlq $0x2, %r12
addq (%rax), %r12
jmp 0x4d77
callq 0x2030
movq (%rax), %rax
cmpb %r13b, %bl
jle 0x4d6d
leaq (%rax,%r12,4), %r12
subl %r13d, %ebx
jmp 0x4d77
leaq (%rax,%r14,4), %r12
subl %ebx, %r13d
movl %r13d, %ebx
movq -0x40(%rbp), %r14
movq -0x48(%rbp), %r13
movq %r15, %rdx
movl (%r12), %eax
shll $0x8, %ebx
addl $0x2100, %ebx           # imm = 0x2100
orl %eax, %ebx
movq -0x88(%rbp), %rcx
movb %al, (%rcx,%r15)
leaq 0x1(%r15), %r12
movq -0x80(%rbp), %rax
movb %bh, (%rax,%rdx)
movq -0xf8(%rbp), %rax
addq %r15, %rax
incq %rax
cmpq -0x38(%rbp), %rax
jl 0x4ce0
jmp 0x43c2