// File: /workspace/github_c_makefile_star2_O3/lh3[P]pre-pe/pre-dip-c.c
// Function: lt_process
void lt_process(const lt_global_t *g, bseq1_t s[2])
{
	int i, k, mlen;
	mlen = s[0].l_seq > s[1].l_seq? s[0].l_seq : s[1].l_seq;

	// 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);
	
	// trim transposon sequences and store barcodes
	int olig_pos[2];
	char *bc[2];
	
	for (k = 0; k < 2; ++k) {
		olig_pos[k] = 0;
		bc[k] = (char*)alloca(mlen + 1);
		bc[k][0] = 0;
		trim_olig(&s[k], lt_oligo_for, 1, g->opt.min_olig_len, g->opt.max_olig_pen, &olig_pos[k], bc[k], 1);
		trim_olig(&s[k], lt_oligo_rev, 0, g->opt.min_olig_len, g->opt.max_olig_pen, 0, 0, 0);
        trim_adap(&s[k], lt_oligo_rev, 0, g->opt.min_adap_len, g->opt.max_adap_pen, 1);
	}

	
	// merge the two ends
	int n_fh;
	uint64_t fh[2];
	char *rseq, *rqual, *xseq, *xqual;
	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);
	// reverse the other read
	lt_seq_revcomp(s[1].l_seq, s[1].seq, rseq);
	lt_seq_rev(s[1].l_seq, s[1].qual, rqual);
	// find overlaps
	n_fh = lt_ue_for(s[0].l_seq, s[0].seq, s[0].qual, s[1].l_seq, rseq, rqual, g->opt.max_ovlp_pen, g->opt.min_ovlp_len, 2, fh);
	if (n_fh == 1) {
    	int l = (uint32_t)fh[0], st = fh[0]>>32;
        if (st + l == s[0].l_seq) { // good stitch
            //printf("%s\n%s\n%s\n%s\n%d,%d,%d,%d\n",s[0].seq,s[0].qual,rseq,rqual,st,l,s[0].l_seq,s[1].l_seq);
    		int x = 0;
    		s[0].type = s[1].type = LT_MERGED;
    		for (i = 0; i < st; ++i)
    			xseq[x] = s[0].seq[i], xqual[x++] = s[0].qual[i];
    		for (i = 0; i < l; ++i) {
    			int j = st + i, y;
    			y = merge_base(g->opt.max_qual, s[0].seq[j], s[0].qual[j], rseq[i], rqual[i]);
    			xseq[x] = (uint8_t)y, xqual[x++] = y>>8;
    		}
    		for (i = l; i < s[1].l_seq; ++i)
    			xseq[x] = rseq[i], xqual[x++] = rqual[i];
            //printf("%s\n%s\n%d\n",xseq,xqual,x);
    		xseq[x] = xqual[x] = 0;
    		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].seq[0] = 0;
    		s[1].l_seq = 0;
        } else {
            s[0].type = s[1].type = LT_NO_MERGE;
        }
	} else {
		s[0].type = s[1].type = LT_NO_MERGE;
	}
	
	// check whether read length is too short
    if (s[0].l_seq < g->opt.min_seq_len) {
        if (s[0].type == LT_MERGED) { // single-end
            s[0].type = s[1].type = LT_SHORT_SEQ;
        } else if (s[1].l_seq >= g->opt.min_seq_len) { // read 1 is short, but read 2 is not => swap
			char *tmp;
			tmp = s[0].seq, s[0].seq = s[1].seq, s[1].seq = tmp;
			tmp = s[0].qual, s[0].qual = s[1].qual, s[1].qual = tmp;
			tmp = bc[0], bc[0] = bc[1], bc[1] = tmp;
			i = olig_pos[0], olig_pos[0] = olig_pos[1], olig_pos[1] = i;
			i = s[0].l_seq, s[0].l_seq = s[1].l_seq, s[1].l_seq = i;
            s[0].type = s[1].type = LT_SHORT_PE_SWAP;
        } else {
            s[0].type = s[1].type = LT_SHORT_SEQ;
        }
    } else if (s[0].type != LT_MERGED && s[1].l_seq < g->opt.min_seq_len) { // read 2 is short, but read 1 is not
        s[0].type = s[1].type = LT_SHORT_PE;
    }
    
    // record the barcodes
	for (k = 0; k < 2; ++k) {
		s[k].olig_pos_f = olig_pos[0];
		s[k].olig_pos_r = olig_pos[1];
		s[k].bc_f = strdup(bc[0]);
		s[k].bc_r = strdup(bc[1]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, %rbx
movq %rdi, -0x58(%rbp)
movl (%rsi), %eax
movq %rax, -0x40(%rbp)
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
andl 0x38(%rsi), %eax
movl %eax, -0x38(%rbp)
movb $0x1, %r15b
xorl %edi, %edi
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %eax, %eax
movq %rsi, -0x30(%rbp)
imulq $0x38, %rax, %rax
leaq (%rbx,%rax), %r14
movl (%rbx,%rax), %eax
movl %eax, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
testq %rdx, %rdx
jle 0x3114
leaq -0x1(%rdx), %rcx
movq 0x18(%r14), %rsi
cmpb $0x4e, -0x1(%rsi,%rdx)
movq %rcx, %rdx
je 0x30f3
incl %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
jmp 0x3116
xorl %ecx, %ecx
andl $0x80000000, %eax       # imm = 0x80000000
orl %ecx, %eax
movl %eax, (%r14)
movq 0x20(%r14), %rax
movl %ecx, %ecx
movb %dil, (%rax,%rcx)
movq 0x18(%r14), %rax
movl (%r14), %ecx
andq %r13, %rcx
movb %dil, (%rax,%rcx)
movl (%r14), %eax
andq %r13, %rax
je 0x31c7
movq 0x18(%r14), %rcx
xorl %r12d, %r12d
cmpb $0x4e, (%rcx,%r12)
jne 0x315d
incq %r12
cmpq %r12, %rax
jne 0x314b
movl %eax, %r12d
testl %r12d, %r12d
je 0x31c7
movq 0x18(%r14), %rdi
movl %r12d, %ebx
leaq (%rdi,%rbx), %rsi
subl %r12d, %eax
movslq %eax, %rdx
callq 0x21d0
movq 0x20(%r14), %rdi
addq %rdi, %rbx
movl (%r14), %edx
andq %r13, %rdx
movslq %r12d, %rax
subq %rax, %rdx
movq %rbx, %rsi
movq -0x30(%rbp), %rbx
callq 0x21d0
xorl %edi, %edi
movl (%r14), %eax
movl %eax, %ecx
subl %r12d, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %eax       # imm = 0x80000000
orl %ecx, %eax
movl %eax, (%r14)
movq 0x20(%r14), %rax
movb %dil, (%rax,%rcx)
movq 0x18(%r14), %rax
movl (%r14), %ecx
andq %r13, %rcx
movb %dil, (%rax,%rcx)
movl $0x1, %eax
testb $0x1, %r15b
movl $0x0, %r15d
jne 0x30e0
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movq -0x40(%rbp), %rax
andl %r15d, %eax
movl -0x38(%rbp), %ecx
cmpl %ecx, %eax
cmovbel %ecx, %eax
movq %rax, -0x40(%rbp)
movq 0x3f54(%rip), %r13      # 0x7150
movq -0x58(%rbp), %rax
movl 0x18(%rax), %ecx
movq %rcx, -0x38(%rbp)
movl 0x1c(%rax), %r12d
movq %r13, %rdi
callq 0x20c0
movl (%rbx), %r14d
andl %r14d, %r15d
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
leaq -0x140(%rbp), %r10
movl %r15d, %edi
movq %rdx, -0x50(%rbp)
movl %eax, %ecx
movq %r13, %r8
xorl %r9d, %r9d
pushq %r10
pushq $0x4
pushq %r12
pushq -0x38(%rbp)
callq 0x29c5
addq $0x20, %rsp
testl %eax, %eax
jle 0x32ba
decl %eax
movq -0x140(%rbp,%rax,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
subl %eax, %r15d
cmpl %r12d, %r15d
jle 0x329e
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %r14d      # imm = 0x80000000
orl %ecx, %r14d
movq -0x30(%rbp), %rbx
movl %r14d, (%rbx)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andq %rcx, %rax
xorl %edx, %edx
movq -0x50(%rbp), %rsi
movb %dl, (%rsi,%rax)
movq 0x18(%rbx), %rax
movl (%rbx), %esi
andq %rcx, %rsi
movb %dl, (%rax,%rsi)
jmp 0x32ba
sarq $0x20, %rcx
movq -0x50(%rbp), %rdi
addq %rcx, %rdi
movslq %r15d, %rdx
movl $0x22, %esi
callq 0x2110
movq -0x30(%rbp), %rbx
movq 0x3e97(%rip), %r13      # 0x7158
movq -0x58(%rbp), %rax
movl 0x18(%rax), %ecx
movq %rcx, -0x38(%rbp)
movl 0x1c(%rax), %r15d
movq %r13, %rdi
callq 0x20c0
movl 0x38(%rbx), %r14d
movl %r14d, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movq 0x50(%rbx), %rsi
movq 0x58(%rbx), %rcx
movq %r15, %rbx
movq %rcx, %r15
movl %r12d, %edi
movq %rcx, %rdx
movl %eax, %ecx
movq %r13, %r8
xorl %r9d, %r9d
leaq -0x140(%rbp), %rax
pushq %rax
pushq $0x4
pushq %rbx
pushq -0x38(%rbp)
callq 0x29c5
addq $0x20, %rsp
testl %eax, %eax
jle 0x3384
decl %eax
movq -0x140(%rbp,%rax,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
subl %eax, %r12d
cmpl %ebx, %r12d
jle 0x336d
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %r14d      # imm = 0x80000000
orl %ecx, %r14d
movq -0x30(%rbp), %rsi
movl %r14d, 0x38(%rsi)
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andq %rcx, %rax
xorl %edx, %edx
movb %dl, (%r15,%rax)
movq 0x50(%rsi), %rax
movl 0x38(%rsi), %esi
andq %rcx, %rsi
movb %dl, (%rax,%rsi)
jmp 0x3384
sarq $0x20, %rcx
addq %rcx, %r15
movslq %r12d, %rdx
movq %r15, %rdi
movl $0x22, %esi
callq 0x2110
movq -0x40(%rbp), %rcx
incl %ecx
leaq -0x70(%rbp), %rsi
leaq -0xb0(%rbp), %rax
movb $0x1, %dl
movq %rcx, -0x40(%rbp)
addl $0xf, %ecx
andl $-0x10, %ecx
movq %rcx, -0x88(%rbp)
xorl %ecx, %ecx
movq -0x30(%rbp), %rbx
movl %edx, -0x50(%rbp)
movq %rsi, -0x98(%rbp)
movl $0x0, (%rsi)
movq %rsp, %r15
subq -0x88(%rbp), %r15
movq %r15, %rsp
movq %r15, (%rax)
movb $0x0, (%r15)
imulq $0x38, %rcx, %r13
leaq (%rbx,%r13), %rax
movq %rax, -0x38(%rbp)
movq 0x3d7b(%rip), %r14      # 0x7160
movq -0x58(%rbp), %rax
movl 0x20(%rax), %ecx
movq %rcx, -0x48(%rbp)
movl 0x24(%rax), %r12d
movq %r14, %rdi
callq 0x20c0
movq %rbx, %rcx
movl (%rbx,%r13), %ebx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl %edx, %ebx
movq 0x18(%rcx,%r13), %rsi
movq 0x20(%rcx,%r13), %r13
movl %ebx, %edi
movq %rsi, -0x90(%rbp)
movq %r13, %rdx
movl %eax, %ecx
movq %r14, %r8
xorl %r9d, %r9d
leaq -0x140(%rbp), %rax
pushq %rax
pushq $0x10
movq %r12, -0x68(%rbp)
pushq %r12
pushq -0x48(%rbp)
movq -0x38(%rbp), %r12
callq 0x2ab8
addq $0x20, %rsp
testl %eax, %eax
jle 0x350d
movq %r13, %rdi
decl %eax
movq -0x140(%rbp,%rax,8), %r14
movq %r14, %rax
shrq $0x20, %rax
subl %eax, %ebx
movslq %ebx, %r13
cmpl -0x68(%rbp), %ebx
jle 0x3500
movq %r15, %rdi
movq -0x90(%rbp), %rbx
movq %rbx, %rsi
movq %r13, %rdx
callq 0x2070
xorl %eax, %eax
movb %al, (%r15,%r13)
xorl %r15d, %r15d
movq -0x98(%rbp), %rax
movl %r13d, (%rax)
leaq (%rbx,%r13), %rsi
sarq $0x20, %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x21d0
movq 0x20(%r12), %rdi
leaq (%rdi,%r13), %rsi
movl (%r12), %edx
movl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
andq %r14, %rdx
subq %r13, %rdx
callq 0x21d0
movl (%r12), %eax
movl %eax, %ecx
subl %r13d, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %eax       # imm = 0x80000000
orl %ecx, %eax
movl %eax, (%r12)
movq 0x20(%r12), %rax
movb %r15b, (%rax,%rcx)
movq 0x18(%r12), %rax
movl (%r12), %ecx
andq %r14, %rcx
movb %r15b, (%rax,%rcx)
jmp 0x350d
movl $0x22, %esi
movq %r13, %rdx
callq 0x2110
movq 0x3c54(%rip), %rbx      # 0x7168
movq -0x58(%rbp), %rax
movl 0x20(%rax), %ecx
movq %rcx, -0x48(%rbp)
movl 0x24(%rax), %r15d
movq %rbx, %rdi
callq 0x20c0
movl (%r12), %r13d
movl %r13d, %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movq 0x18(%r12), %rsi
movq 0x20(%r12), %rdx
movl %r14d, %edi
movq %rdx, -0x68(%rbp)
movl %eax, %ecx
movq %rbx, %r8
xorl %r9d, %r9d
leaq -0x140(%rbp), %rax
pushq %rax
pushq $0x10
pushq %r15
pushq -0x48(%rbp)
callq 0x29c5
addq $0x20, %rsp
testl %eax, %eax
jle 0x35d7
decl %eax
movq -0x140(%rbp,%rax,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
subl %eax, %r14d
cmpl %r15d, %r14d
jle 0x35bf
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %r13d      # imm = 0x80000000
orl %ecx, %r13d
movl %r13d, (%r12)
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andq %rsi, %rax
xorl %edx, %edx
movq -0x68(%rbp), %rcx
movb %dl, (%rcx,%rax)
movq 0x18(%r12), %rax
movl (%r12), %ecx
andq %rsi, %rcx
movb %dl, (%rax,%rcx)
jmp 0x35d7
sarq $0x20, %rcx
movq -0x68(%rbp), %rdi
addq %rcx, %rdi
movslq %r14d, %rdx
movl $0x22, %esi
callq 0x2110
movq 0x3b8a(%rip), %rbx      # 0x7168
movq -0x58(%rbp), %rax
movl 0x18(%rax), %ecx
movq %rcx, -0x48(%rbp)
movl 0x1c(%rax), %r15d
movq %rbx, %rdi
callq 0x20c0
movl (%r12), %r13d
movl %r13d, %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movq 0x18(%r12), %rsi
movq 0x20(%r12), %rcx
movq %r15, %r12
movq %rcx, %r15
movl %r14d, %edi
movq %rcx, %rdx
movl %eax, %ecx
movq %rbx, %r8
xorl %r9d, %r9d
leaq -0x140(%rbp), %rax
pushq %rax
pushq $0x4
pushq %r12
pushq -0x48(%rbp)
callq 0x29c5
addq $0x20, %rsp
testl %eax, %eax
movq -0x30(%rbp), %rbx
jle 0x36a6
decl %eax
movq -0x140(%rbp,%rax,8), %rcx
movq %rcx, %rax
shrq $0x20, %rax
subl %eax, %r14d
cmpl %r12d, %r14d
jle 0x368f
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl $0x80000000, %r13d      # imm = 0x80000000
orl %ecx, %r13d
movq -0x38(%rbp), %rcx
movl %r13d, (%rcx)
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andq %rsi, %rax
xorl %edx, %edx
movb %dl, (%r15,%rax)
movq 0x18(%rcx), %rax
movl (%rcx), %ecx
andq %rsi, %rcx
movb %dl, (%rax,%rcx)
jmp 0x36a6
sarq $0x20, %rcx
addq %rcx, %r15
movslq %r14d, %rdx
movq %r15, %rdi
movl $0x22, %esi
callq 0x2110
movl $0x1, %ecx
leaq -0xa8(%rbp), %rax
leaq -0x6c(%rbp), %rsi
testb $0x1, -0x50(%rbp)
movl $0x0, %edx
jne 0x33ae
movq %rsp, %r15
movq -0x40(%rbp), %rax
addl $0xf, %eax
andl $-0x10, %eax
subq %rax, %r15
movq %r15, %rsp
movq %rsp, %r9
subq %rax, %r9
movq %r9, %rsp
movl (%rbx), %eax
movq %rbx, %rsi
movl 0x38(%rbx), %ebx
movl %eax, -0x48(%rbp)
movl %eax, %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movl %ebx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
leal (%r14,%rcx), %eax
addl $0x10, %eax
andl $-0x10, %eax
movq %rsp, %r13
subq %rax, %r13
movq %r13, %rsp
movq %rsp, %rdx
subq %rax, %rdx
movq %rdx, -0x40(%rbp)
movq %rdx, %rsp
testq %rcx, %rcx
je 0x3774
movq 0x50(%rsi), %rax
leaq 0x3a42(%rip), %r8       # 0x7170
movq %rcx, %rdx
movsbq (%rax), %rsi
testq %rsi, %rsi
js 0x3740
movb (%rsi,%r8), %sil
jmp 0x3743
movb $0x4e, %sil
movb %sil, -0x1(%r15,%rdx)
incq %rax
decq %rdx
jne 0x3731
movb $0x0, (%r15,%rcx)
movq -0x30(%rbp), %rax
movq 0x58(%rax), %rax
movq %rcx, %rsi
movb (%rax), %dl
movb %dl, -0x1(%r9,%rsi)
incq %rax
decq %rsi
jne 0x3760
movq %rcx, %rax
jmp 0x377a
movb $0x0, (%r15)
xorl %eax, %eax
movb $0x0, (%r9,%rax)
movq -0x30(%rbp), %r12
movq 0x18(%r12), %rsi
movq 0x20(%r12), %rdx
movq -0x58(%rbp), %r8
movl 0x10(%r8), %eax
movl 0x14(%r8), %r10d
movl %r14d, %edi
movq %rsi, -0x80(%rbp)
movq %rdx, -0x38(%rbp)
movq %rcx, -0xc0(%rbp)
movq %r15, %r8
movq %r9, -0x50(%rbp)
leaq -0x140(%rbp), %r11
pushq %r11
pushq $0x2
pushq %r10
pushq %rax
callq 0x29c5
addq $0x20, %rsp
cmpl $0x1, %eax
jne 0x3820
movq -0x140(%rbp), %rcx
movq %rcx, %r12
shrq $0x20, %r12
leal (%r12,%rcx), %eax
cmpl %r14d, %eax
jne 0x3827
movl $0x15, %eax
movq -0x30(%rbp), %rbx
movl %eax, 0x3c(%rbx)
movl %eax, 0x4(%rbx)
testl %r12d, %r12d
jle 0x383f
movq %r13, %rdi
movq -0x80(%rbp), %rsi
movq %r12, %rdx
movq %rcx, %r14
callq 0x2150
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %r12, %rdx
callq 0x2150
movq %r14, %rcx
jmp 0x3842
movl $0x16, %eax
jmp 0x3830
movl $0x16, %eax
movq -0x30(%rbp), %r12
movl %eax, 0x3c(%r12)
movl %eax, 0x4(%r12)
jmp 0x3aff
xorl %r12d, %r12d
movq -0x50(%rbp), %r8
testl %ecx, %ecx
jle 0x3988
movq %rcx, %rax
sarq $0x20, %rax
movl %r12d, %r12d
movq %rcx, -0x78(%rbp)
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq %rcx, -0x48(%rbp)
movq -0x40(%rbp), %rcx
addq %r12, %rcx
movq %rcx, -0x68(%rbp)
movq %r13, -0xb8(%rbp)
movq %r12, -0x60(%rbp)
leaq (%r13,%r12), %rcx
movq %rcx, -0x90(%rbp)
movq -0x80(%rbp), %rcx
addq %rax, %rcx
movq %rcx, -0x88(%rbp)
addq %rax, -0x38(%rbp)
xorl %ecx, %ecx
movq %r15, -0x98(%rbp)
movq -0x88(%rbp), %rax
movsbq (%rax,%rcx), %r12
movq -0x38(%rbp), %rax
movzbl (%rax,%rcx), %ebx
movsbq (%r15,%rcx), %r13
movq %rcx, %r15
movzbl (%r8,%rcx), %r14d
cmpb %r13b, %r12b
jne 0x3911
movq -0x58(%rbp), %rax
movl 0xc(%rax), %r13d
cmpb %r14b, %bl
movl %r14d, %eax
cmovgl %ebx, %eax
cmovll %ebx, %r14d
movsbl %al, %eax
movsbl %r14b, %ecx
leal -0x21(%rcx), %edx
movzwl %dx, %edx
shrl $0xf, %edx
addl %edx, %ecx
addl $-0x21, %ecx
sarl %ecx
leal (%rax,%rcx), %ebx
addl $-0x21, %ebx
callq 0x2030
cmpl %r13d, %ebx
jl 0x3908
movl %r13d, %ebx
shlq $0x2, %r12
addq (%rax), %r12
jmp 0x3931
callq 0x2030
movq (%rax), %rax
cmpb %r14b, %bl
jle 0x3927
leaq (%rax,%r12,4), %r12
subl %r14d, %ebx
jmp 0x3931
leaq (%rax,%r13,4), %r12
subl %ebx, %r14d
movl %r14d, %ebx
movq -0x50(%rbp), %r8
movq %r15, %rcx
movl (%r12), %eax
shll $0x8, %ebx
addl $0x2100, %ebx           # imm = 0x2100
orl %eax, %ebx
movq -0x90(%rbp), %rdx
movb %al, (%rdx,%r15)
movq -0x68(%rbp), %rax
movb %bh, (%rax,%rcx)
incq %rcx
cmpq %rcx, -0x48(%rbp)
movq -0x98(%rbp), %r15
jne 0x38a3
movq -0x60(%rbp), %rax
addl %ecx, %eax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rbx
movq -0xb8(%rbp), %r13
movq -0x78(%rbp), %rcx
jmp 0x398c
movq %r12, -0x60(%rbp)
movq -0xc0(%rbp), %r12
cmpl %ecx, %r12d
jle 0x3a84
movl -0x60(%rbp), %ebx
leaq (%rbx,%r13), %rdi
movslq %ecx, %r14
addq %r14, %r15
notl %ecx
addl %r12d, %ecx
incq %rcx
movq %rcx, -0x78(%rbp)
movq %r15, %rsi
movq %rcx, %rdx
movq %r8, %r15
callq 0x2150
addq -0x40(%rbp), %rbx
addq %r14, %r15
movq %rbx, %rdi
movq %r15, %rsi
movq -0x78(%rbp), %rdx
callq 0x2150
movl %r12d, %ecx
subq %r14, %rcx
leaq 0x1(%rcx), %rax
andq $-0x2, %rax
decq %rcx
movd -0x60(%rbp), %xmm0
movq %rcx, %xmm1
pshufd $0x44, %xmm1, %xmm2     # xmm2 = xmm1[0,1,0,1]
movl $0x2, %ecx
pcmpeqd %xmm3, %xmm3
movdqa %xmm0, %xmm1
psubq %xmm3, %xmm0
leaq (%rax,%rcx), %rdx
addq $-0x2, %rdx
addq $-0x2, %rcx
cmpq $0x2, %rdx
jne 0x3a02
negq %rcx
movq %rcx, %xmm3
pshufd $0x44, %xmm3, %xmm3     # xmm3 = xmm3[0,1,0,1]
por 0x160f(%rip), %xmm3     # 0x5040
movdqa 0x1617(%rip), %xmm4     # 0x5050
pxor %xmm4, %xmm2
pxor %xmm4, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm2, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
pcmpeqd %xmm2, %xmm3
pshufd $0xf5, %xmm3, %xmm2     # xmm2 = xmm3[1,1,3,3]
pand %xmm5, %xmm2
pshufd $0xf5, %xmm4, %xmm3     # xmm3 = xmm4[1,1,3,3]
por %xmm2, %xmm3
pand %xmm3, %xmm1
pandn %xmm0, %xmm3
por %xmm1, %xmm3
pshufd $0xee, %xmm3, %xmm0     # xmm0 = xmm3[2,3,2,3]
paddq %xmm3, %xmm0
movd %xmm0, %r12d
movq -0x30(%rbp), %rbx
jmp 0x3a88
movq -0x60(%rbp), %r12
movl %r12d, %eax
xorl %r14d, %r14d
movq -0x40(%rbp), %r15
movb %r14b, (%r15,%rax)
movb %r14b, (%r13,%rax)
movq -0x80(%rbp), %rdi
callq 0x2050
movq 0x20(%rbx), %rdi
callq 0x2050
movq %r13, %rdi
callq 0x2240
movq %rax, 0x18(%rbx)
movq %r15, %rdi
callq 0x2240
movq %rax, 0x20(%rbx)
movq %r12, %rcx
movq %rbx, %r12
movl $0x80000000, %ebx       # imm = 0x80000000
movl (%r12), %eax
andl %ebx, %eax
orl %ecx, %eax
movl %eax, (%r12)
movq 0x50(%r12), %rax
movb %r14b, (%rax)
andl 0x38(%r12), %ebx
movl %ebx, 0x38(%r12)
movl (%r12), %eax
movl %eax, -0x48(%rbp)
movl %eax, %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movq -0x58(%rbp), %rax
movl 0x8(%rax), %ecx
movl 0x4(%r12), %edx
cmpl %ecx, %r14d
jge 0x3b79
movl $0x2, %eax
cmpl $0x15, %edx
je 0x3b8d
movl %ebx, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
cmpl %ecx, %edx
jb 0x3b8d
movq -0x30(%rbp), %rcx
movups 0x18(%rcx), %xmm0
movdqu 0x50(%rcx), %xmm1
movdqu %xmm1, 0x18(%rcx)
movups %xmm0, 0x50(%rcx)
pshufd $0x4e, -0xb0(%rbp), %xmm0 # xmm0 = mem[2,3,0,1]
movdqa %xmm0, -0xb0(%rbp)
movq -0x70(%rbp), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, -0x70(%rbp)
movl $0x80000000, %eax       # imm = 0x80000000
movl -0x48(%rbp), %edi
andl %eax, %edi
orl %edi, %edx
movl %edx, (%rcx)
andl %eax, %ebx
orl %r14d, %ebx
movl %ebx, 0x38(%rcx)
movl $0x4, %eax
jmp 0x3b8d
cmpl $0x15, %edx
je 0x3b97
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movl $0x3, %eax
cmpl %ecx, %ebx
jge 0x3b97
movq -0x30(%rbp), %rcx
movl %eax, 0x3c(%rcx)
movl %eax, 0x4(%rcx)
movq -0x70(%rbp), %r15
movq -0xb0(%rbp), %rbx
movq -0xa8(%rbp), %r14
movq -0x30(%rbp), %r12
movq %r15, 0x8(%r12)
movq %rbx, %rdi
callq 0x2240
movq %rax, 0x28(%r12)
movq %r14, %rdi
callq 0x2240
movq %rax, 0x30(%r12)
movq %r15, 0x40(%r12)
movq %rbx, %rdi
callq 0x2240
movq %rax, 0x60(%r12)
movq %r14, %rdi
callq 0x2240
movq %rax, 0x68(%r12)
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq