// File: /workspace/github_c_makefile_star2_O2/sc932[P]ALE/src/ssw.c
// Function: ssw_align
s_align* ssw_align (const s_profile* prof,
					const int8_t* ref,
				  	int32_t refLen,
				  	const uint8_t weight_gapO,
				  	const uint8_t weight_gapE,
					const uint8_t flag,	//  (from high to low) bit 5: return the best alignment beginning position; 6: if (ref_end1 - ref_begin1 <= filterd) && (read_end1 - read_begin1 <= filterd), return cigar; 7: if max score >= filters, return cigar; 8: always return cigar; if 6 & 7 are both setted, only return cigar when both filter fulfilled
					const uint16_t filters,
					const int32_t filterd,
					const int32_t maskLen) {

	alignment_end* bests = 0, *bests_reverse = 0;
	__m128i* vP = 0;
	int32_t word = 0, band_width = 0, readLen = prof->readLen;
	int8_t* read_reverse = 0;
	cigar* path;
	s_align* r = (s_align*)calloc(1, sizeof(s_align));
	r->ref_begin1 = -1;
	r->read_begin1 = -1;
	r->cigar = 0;
	r->cigarLen = 0;
    r->flag = 0;
	if (maskLen < 15) {
		fprintf(stderr, "When maskLen < 15, the function ssw_align doesn't return 2nd best alignment information.\n");
	}

	// Find the alignment scores and ending positions
	if (prof->profile_byte) {
		bests = sw_sse2_byte(ref, 0, refLen, readLen, weight_gapO, weight_gapE, prof->profile_byte, -1, prof->bias, maskLen);
		if (prof->profile_word && bests[0].score == 255) {
			free(bests);
			bests = sw_sse2_word(ref, 0, refLen, readLen, weight_gapO, weight_gapE, prof->profile_word, -1, maskLen);
			word = 1;
		} else if (bests[0].score == 255) {
			fprintf(stderr, "Please set 2 to the score_size parameter of the function ssw_init, otherwise the alignment results will be incorrect.\n");
			free(r);
			return NULL;
		}
	}else if (prof->profile_word) {
		bests = sw_sse2_word(ref, 0, refLen, readLen, weight_gapO, weight_gapE, prof->profile_word, -1, maskLen);
		word = 1;
	}else {
		fprintf(stderr, "Please call the function ssw_init before ssw_align.\n");
		free(r);
		return NULL;
	}
	r->score1 = bests[0].score;
	r->ref_end1 = bests[0].ref; // 0_based, always count from the input seq begin
	r->read_end1 = bests[0].read;   // 0_based, count from the alignment begin (aligned length of the read)
	if (maskLen >= 15) {
		r->score2 = bests[1].score;
		r->ref_end2 = bests[1].ref;
	} else {
		r->score2 = 0;
		r->ref_end2 = -1;
	}
	free(bests);
	if (flag == 0 || (flag == 2 && r->score1 < filters)) goto end;

	// Find the beginning position of the best alignment.
	read_reverse = seq_reverse(prof->read, r->read_end1);
	if (word == 0) {
		vP = qP_byte(read_reverse, prof->mat, r->read_end1 + 1, prof->n, prof->bias);
		bests_reverse = sw_sse2_byte(ref, 1, r->ref_end1 + 1, r->read_end1 + 1, weight_gapO, weight_gapE, vP, r->score1, prof->bias, maskLen);
	} else {
		vP = qP_word(read_reverse, prof->mat, r->read_end1 + 1, prof->n);
		bests_reverse = sw_sse2_word(ref, 1, r->ref_end1 + 1, r->read_end1 + 1, weight_gapO, weight_gapE, vP, r->score1, maskLen);
	}
	free(vP);
	free(read_reverse);
	r->ref_begin1 = bests_reverse[0].ref;
	r->read_begin1 = r->read_end1 - bests_reverse[0].read;

    if (UNLIKELY(r->score1 > bests_reverse[0].score)) { // banded_sw result will miss a small part
		fprintf(stderr, "Warning: The alignment path of one pair of sequences may miss a small part. [ssw.c ssw_align]\n");
        r->flag = 2;  
    }
    free(bests_reverse);

//    fprintf(stderr, "1: %d, ref_end: %d, read_end: %d\n 2: %d, ref_end: %d, read_end: %d\n", r->score1, r->ref_end1, r->read_end1, bests_reverse[0].score, bests_reverse[0].ref, bests_reverse[0].read);
	if ((7&flag) == 0 || ((2&flag) != 0 && r->score1 < filters) || ((4&flag) != 0 && (r->ref_end1 - r->ref_begin1 > filterd || r->read_end1 - r->read_begin1 > filterd))) goto end;

	// Generate cigar.
	refLen = r->ref_end1 - r->ref_begin1 + 1;
	readLen = r->read_end1 - r->read_begin1 + 1;
	band_width = abs(refLen - readLen) + 1;
	path = banded_sw(ref + r->ref_begin1, prof->read + r->read_begin1, refLen, readLen, r->score1, weight_gapO, weight_gapE, band_width, prof->mat, prof->n);
	
    if (path == 0) r->flag = 1;    // banded_sw is failed.
    else {
		r->cigar = path->seq;
		r->cigarLen = path->length;
		free(path);
	}

end:
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl %r9d, 0x8(%rsp)
movl %r8d, %ebp
movl %ecx, %ebx
movl %edx, (%rsp)
movq %rsi, 0x38(%rsp)
movq %rdi, %r12
movl 0x140(%rsp), %r14d
movl 0x20(%rdi), %r13d
pushq $0x1
popq %rdi
pushq $0x28
popq %rsi
callq 0x3310
movq %rax, %r15
orl $-0x1, 0x4(%rax)
orl $-0x1, 0xc(%rax)
cmpl $0xe, %r14d
jle 0xbb7b
movq %r15, 0x28(%rsp)
movq (%r12), %rax
movzbl %bl, %ebx
movzbl %bpl, %r9d
testq %rax, %rax
movl %r9d, 0x14(%rsp)
movq %r12, %r14
je 0xb2d7
movzbl 0x28(%r14), %r10d
movq 0x38(%rsp), %rdi
xorl %esi, %esi
movl (%rsp), %edx
movl %r13d, %ecx
movl %ebx, %r8d
movl 0x140(%rsp), %ebp
pushq %rbp
pushq %r10
pushq $0xff
pushq %rax
callq 0xbd88
addq $0x20, %rsp
movq 0x8(%r14), %r15
movzwl (%rax), %ecx
movb $0x1, %r12b
testq %r15, %r15
je 0xb316
cmpw $0xff, %cx
jne 0xb321
movq %rax, %rdi
callq 0x3070
movl 0x14(%rsp), %r9d
jmp 0xb2eb
movq 0x8(%r14), %r15
testq %r15, %r15
movl 0x140(%rsp), %ebp
je 0xbd0d
subq $0x8, %rsp
xorl %r12d, %r12d
movq 0x40(%rsp), %rdi
xorl %esi, %esi
movl 0x8(%rsp), %edx
movl %r13d, %ecx
movl %ebx, %r8d
pushq %rbp
pushq $0xffff                 # imm = 0xFFFF
pushq %r15
callq 0xc1cd
addq $0x20, %rsp
jmp 0xb321
cmpw $0xff, %cx
je 0xbd22
movl %ebx, 0x34(%rsp)
movzwl (%rax), %ecx
movq %rcx, 0x50(%rsp)
movq 0x28(%rsp), %r15
movw %cx, (%r15)
movl 0x4(%rax), %ebx
movl %ebx, 0x8(%r15)
movslq 0x8(%rax), %r13
movl %r13d, 0x10(%r15)
cmpl $0xf, %ebp
movq %rbx, 0x18(%rsp)
jl 0xb358
movzwl 0xc(%rax), %edx
movl 0x10(%rax), %ecx
jmp 0xb35d
pushq $-0x1
popq %rcx
xorl %edx, %edx
movw %dx, 0x2(%r15)
movl %ecx, 0x14(%r15)
movq %rax, %rdi
callq 0x3070
movl 0x8(%rsp), %eax
testb %al, %al
je 0xbd4b
movzwl 0x130(%rsp), %ecx
movzbl %al, %eax
cmpl $0x2, %eax
jne 0xb395
cmpw %cx, 0x50(%rsp)
jb 0xbd4b
movl %r12d, %ebx
movl %eax, 0x8(%rsp)
movq 0x10(%r14), %r15
leaq 0x1(%r13), %r12
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0x3310
movq %r13, %rcx
movq %rax, %r13
xorl %eax, %eax
movq %rcx, (%rsp)
cmpq %rcx, %rax
jg 0xb3da
movb (%r15,%rcx), %dl
movb %dl, (%r13,%rax)
movb (%r15,%rax), %dl
movb %dl, (%r13,%rcx)
incq %rax
decq %rcx
jmp 0xb3bb
movq 0x18(%r14), %rsi
movl 0x24(%r14), %ecx
testb %bl, %bl
je 0xb434
movzbl 0x28(%r14), %r8d
movq %r13, %rdi
movl %r12d, %edx
callq 0xb083
movq %rax, %rbx
movq 0x18(%rsp), %rax
leal 0x1(%rax), %edx
movzbl 0x28(%r14), %eax
movq %rbp, %r11
movq 0x50(%rsp), %rbp
movzbl %bpl, %r10d
pushq $0x1
popq %rsi
movq 0x38(%rsp), %rdi
movl %r12d, %ecx
movl 0x34(%rsp), %r8d
movl 0x14(%rsp), %r9d
pushq %r11
pushq %rax
pushq %r10
pushq %rbx
callq 0xbd88
jmp 0xb470
movq %r13, %rdi
movl %r12d, %edx
callq 0xb142
movq %rax, %rbx
movq 0x18(%rsp), %rax
leal 0x1(%rax), %edx
subq $0x8, %rsp
pushq $0x1
popq %rsi
movq 0x40(%rsp), %rdi
movl %r12d, %ecx
movl 0x3c(%rsp), %r8d
movl 0x1c(%rsp), %r9d
pushq %rbp
movq 0x60(%rsp), %rbp
pushq %rbp
pushq %rbx
callq 0xc1cd
addq $0x20, %rsp
movq %rax, %r12
movq 0x28(%rsp), %r15
movq %rbx, %rdi
callq 0x3070
movq %r13, %rdi
callq 0x3070
movslq 0x4(%r12), %rax
movq %rax, 0x20(%rsp)
movl %eax, 0x4(%r15)
movl 0x8(%r12), %eax
movq %rax, 0x58(%rsp)
movq (%rsp), %r13
subl %eax, %r13d
movl %r13d, 0xc(%r15)
cmpw (%r12), %bp
ja 0xbd60
movq %r12, %rdi
callq 0x3070
movl 0x8(%rsp), %ecx
testb $0x7, %cl
je 0xbd4b
testb $0x2, %cl
movq 0x50(%rsp), %rax
je 0xb4e7
cmpw 0x130(%rsp), %ax
jb 0xbd4b
movq 0x18(%rsp), %rbx
subl 0x20(%rsp), %ebx
testb $0x4, %cl
je 0xb50e
movl 0x138(%rsp), %eax
cmpl %eax, %ebx
jg 0xbd4b
cmpl %eax, 0x58(%rsp)
jg 0xbd4b
leal 0x1(%rbx), %ebp
movq 0x58(%rsp), %rcx
leal 0x1(%rcx), %r12d
movq %rbx, 0x18(%rsp)
movl %ebx, %eax
subl %ecx, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
incl %ecx
movq %rcx, 0x60(%rsp)
movslq %r13d, %rax
addq 0x10(%r14), %rax
movq %rax, 0xf0(%rsp)
movq 0x18(%r14), %rax
movq %rax, 0xe8(%rsp)
movslq 0x24(%r14), %rax
movq %rax, 0xe0(%rsp)
pushq $0x40
popq %rdi
callq 0x3420
movq %rax, 0xa8(%rsp)
cmpl %r12d, %ebp
cmovlel %r12d, %ebp
movl %ebp, 0x8c(%rsp)
pushq $0x10
popq %rdi
callq 0x3420
movq %rax, 0x68(%rsp)
pushq $0x20
popq %r14
movq %r14, %rdi
callq 0x3420
movq %rax, %rbx
movq %r14, %rdi
callq 0x3420
movq %rax, 0x48(%rsp)
movq %r14, %rdi
callq 0x3420
movq %rax, (%rsp)
movl $0x400, %eax            # imm = 0x400
movq %rax, 0xa0(%rsp)
movl $0x400, %edi            # imm = 0x400
callq 0x3420
leal (%r12,%r12,2), %ecx
movl %ecx, 0x88(%rsp)
xorl %r15d, %r15d
testl %r12d, %r12d
cmovlel %r15d, %r12d
movq %r12, 0xc8(%rsp)
movq %rax, 0x40(%rsp)
movq 0x20(%rsp), %rax
addq %rax, 0x38(%rsp)
pushq $0x8
popq %rdx
movq 0x60(%rsp), %rax
leal (%rax,%rax), %ecx
movq %rcx, 0x60(%rsp)
movq %rax, 0x80(%rsp)
leal 0x3(,%rax,2), %r12d
cmpl %edx, %r12d
jl 0xb676
movl %edx, %eax
sarl %eax
orl %edx, %eax
movl %eax, %ecx
sarl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %ebp
sarl $0x10, %ebp
orl %ecx, %ebp
movslq %ebp, %rax
incl %ebp
leaq 0x4(,%rax,4), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3480
movq %rax, %rbx
movq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x3480
movq %rax, 0x48(%rsp)
movq (%rsp), %rdi
movq %r14, %rsi
callq 0x3480
movl %ebp, %edx
movq %rax, (%rsp)
jmp 0xb60e
movl %edx, 0x90(%rsp)
movq 0x60(%rsp), %r12
orl $0x1, %r12d
movl 0x88(%rsp), %eax
imull %r12d, %eax
movslq %eax, %r13
movq 0xa0(%rsp), %r14
cmpq %r13, %r14
jg 0xb6e9
movq %r14, %rax
sarq %rax
orq %r14, %rax
movq %rax, %rcx
sarq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
sarq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
sarq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %r14
sarq $0x10, %r14
orq %rcx, %r14
incq %r14
movq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x3480
movq %rax, 0x40(%rsp)
jmp 0xb69c
movq 0x60(%rsp), %rax
leal 0x2(%rax), %edi
pushq $0x1
popq %rax
cmpq %rdi, %rax
jae 0xb702
andl $0x0, (%rbx,%rax,4)
incq %rax
jmp 0xb6f4
movq %r14, 0xa0(%rsp)
leal (%r12,%r12,2), %r9d
movq 0x80(%rsp), %rax
movl %eax, %ecx
notl %ecx
movl %eax, %edx
negl %edx
leaq 0x4(%rbx), %rax
movq %rax, 0xb8(%rsp)
movq 0x48(%rsp), %rax
leaq 0x4(%rax), %r8
movq 0x40(%rsp), %rax
leaq 0x1(%rax), %rsi
movq %rsi, 0xb0(%rsp)
xorl %esi, %esi
xorl %r11d, %r11d
movq %rax, 0x78(%rsp)
movq %rbx, 0x70(%rsp)
movl %r9d, 0x94(%rsp)
movq %rdi, 0xc0(%rsp)
testl %edx, %edx
movl $0x0, %r14d
cmovgl %edx, %r14d
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
cmpq 0xc8(%rsp), %r11
je 0xb9a7
movl %edx, 0x98(%rsp)
movl %ecx, 0x9c(%rsp)
leaq (,%r14,4), %rcx
shlq $0x2, %rax
subq %rax, %rcx
movq 0xb8(%rsp), %rax
addq %rcx, %rax
addq %r8, %rcx
movq %rcx, 0xd8(%rsp)
movq %rsi, 0xd0(%rsp)
movl %esi, %ecx
addq 0xb0(%rsp), %rcx
movq 0x80(%rsp), %rdx
leal (%rdx,%r11), %esi
movq 0x18(%rsp), %rdx
cmpl %esi, %edx
cmovll %edx, %esi
leal 0x1(%rsi), %edx
cmpl %edi, %edx
cmovgel %edi, %edx
movq (%rsp), %rdi
andl $0x0, (%rdi)
movslq %edx, %rdx
movq 0x48(%rsp), %rdi
andl $0x0, (%rdi,%rdx,4)
andl $0x0, (%rbx,%rdx,4)
andl $0x0, (%rdi)
andl $0x0, (%rbx)
movq 0x38(%rsp), %rdx
addq %r14, %rdx
movq %rdx, 0x20(%rsp)
movl %r9d, %edx
imull %r11d, %edx
addq 0x40(%rsp), %rdx
movq %rdx, 0x78(%rsp)
movslq %esi, %rdx
movq %rdx, 0x8(%rsp)
xorl %r10d, %r10d
xorl %r13d, %r13d
xorl %ebx, %ebx
leaq (%r14,%r13), %r9
cmpq 0x8(%rsp), %r9
jg 0xb952
movq %r14, %rsi
movl $0x0, %ebp
movl $0x0, %r14d
testq %r11, %r11
je 0xb867
movl (%rax,%r13,4), %ebp
movq 0xd8(%rsp), %rdx
movl (%rdx,%r13,4), %r14d
movl 0x34(%rsp), %edi
subl %edi, %ebp
movl 0x14(%rsp), %r12d
subl %r12d, %r14d
cmpl %r14d, %ebp
cmovgl %ebp, %r14d
setg %r9b
movl %r14d, (%r8,%r13,4)
orb $0x2, %r9b
movb %r9b, -0x1(%rcx)
movq (%rsp), %rdx
movl (%rdx,%r13,4), %r9d
subl %edi, %r9d
subl %r12d, %ebx
cmpl %ebx, %r9d
setg %bpl
cmovgl %r9d, %ebx
orb $0x4, %bpl
movb %bpl, (%rcx)
movl (%r8,%r13,4), %r14d
testl %r14d, %r14d
movl $0x0, %ebp
cmovgl %r14d, %ebp
movl %ebx, %r12d
testl %ebx, %ebx
jg 0xb8c6
xorl %r12d, %r12d
cmpl %r12d, %ebp
cmovbel %r12d, %ebp
movq 0x20(%rsp), %rdx
movsbq (%rdx,%r13), %r9
imulq 0xe0(%rsp), %r9
movq 0xf0(%rsp), %rdx
movsbq (%rdx,%r11), %rdi
addq %r9, %rdi
movq 0xe8(%rsp), %rdx
movsbl (%rdx,%rdi), %edi
addl -0x4(%rax,%r13,4), %edi
cmpl %edi, %ebp
movl %edi, %r9d
cmovgl %ebp, %r9d
cmpl %r15d, %r9d
cmovgl %r9d, %r15d
movq (%rsp), %rdx
movl %r9d, 0x4(%rdx,%r13,4)
movb $0x1, %r9b
cmpl %edi, %ebp
jle 0xb932
cmpl %r12d, %r14d
jg 0xb92b
movq %rcx, %r9
jmp 0xb92f
leaq -0x1(%rcx), %r9
movb (%r9), %r9b
movb %r9b, 0x1(%rcx)
incq %r13
addq $0x3, %rcx
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %rdx, %r10
movq %rsi, %r14
jmp 0xb835
sarq $0x20, %r10
pushq $0x1
popq %rax
movq 0x70(%rsp), %rbx
movl 0x94(%rsp), %r9d
movq 0xc0(%rsp), %rdi
movl 0x98(%rsp), %edx
movq 0xd0(%rsp), %rsi
cmpq %r10, %rax
jg 0xb991
movq (%rsp), %rcx
movl (%rcx,%rax,4), %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
jmp 0xb97d
incq %r11
incl %edx
movl 0x9c(%rsp), %ecx
incl %ecx
addl %r9d, %esi
jmp 0xb763
movq 0x60(%rsp), %rax
cmpl 0x8c(%rsp), %eax
movl 0x90(%rsp), %edx
jg 0xb9c7
cmpl 0x50(%rsp), %r15d
jl 0xb5f1
movl %r9d, %eax
negq %rax
movq %rax, 0x20(%rsp)
pushq $0x2
popq %rbx
pushq $0x10
popq %r15
movb $0x4d, 0x8(%rsp)
xorl %r10d, %r10d
xorl %ebp, %ebp
movb $0x4d, %r12b
movq 0x18(%rsp), %rdx
movq 0xa8(%rsp), %rdi
movq 0x58(%rsp), %rsi
shll $0x4, %ebp
pushq $0x1
popq %r8
movq 0x78(%rsp), %r9
movl %r10d, %r13d
testl %esi, %esi
jle 0xbb1a
movl %esi, %eax
subl 0x80(%rsp), %eax
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
movl %edx, %ecx
subl %eax, %ecx
leal (%rcx,%rcx,2), %eax
addl %ebx, %eax
cltq
movzbl (%r9,%rax), %ecx
decl %ecx
cmpl $0x4, %ecx
ja 0xbb9c
leaq 0x1495c(%rip), %r11     # 0x203a0
movslq (%r11,%rcx,4), %rax
addq %r11, %rax
jmpq *%rax
decl %esi
decl %edx
addq 0x20(%rsp), %r9
movb $0x4d, %r12b
jmp 0xba6c
decl %edx
movb $0x44, %r12b
jmp 0xba6c
decl %esi
addq 0x20(%rsp), %r9
movb $0x49, %r12b
pushq $0x2
popq %rbx
jmp 0xba87
decl %edx
movb $0x44, %r12b
movl %r8d, %ebx
jmp 0xba87
decl %esi
addq 0x20(%rsp), %r9
xorl %ebx, %ebx
movb $0x49, %r12b
cmpb 0x8(%rsp), %r12b
jne 0xba96
addl $0x10, %ebp
jmp 0xba04
movq %r9, 0x78(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x18(%rsp)
incl %r10d
cmpl %r15d, %r10d
jl 0xbaf2
movl %r15d, %eax
sarl %eax
orl %r15d, %eax
movl %eax, %ecx
sarl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %r15d
sarl $0x10, %r15d
orl %ecx, %r15d
movslq %r15d, %rax
incl %r15d
leaq 0x4(,%rax,4), %rsi
movq %r10, %r14
callq 0x3480
movq %r14, %r10
movq %rax, %rdi
jmp 0xbaa8
movzbl 0x8(%rsp), %eax
leaq 0x148c2(%rip), %rcx     # 0x203c0
movzbl (%rax,%rcx), %eax
orl %eax, %ebp
movl %ebp, (%rdi,%r13,4)
movb %r12b, 0x8(%rsp)
pushq $0x1
popq %rbp
movq 0x18(%rsp), %rdx
jmp 0xb9f3
cmpb $0x4d, %r12b
movq %r10, %r14
jne 0xbc07
leal 0x1(%r10), %ebx
movq 0x68(%rsp), %r12
cmpl %r15d, %ebx
jl 0xbc52
movl %r15d, %eax
sarl %eax
orl %r15d, %eax
movl %eax, %ecx
sarl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %r15d
sarl $0x10, %r15d
orl %ecx, %r15d
movslq %r15d, %rax
incl %r15d
leaq 0x4(,%rax,4), %rsi
callq 0x3480
movq %r14, %r10
movq %rax, %rdi
jmp 0xbb30
movq 0x1d476(%rip), %rax     # 0x28ff8
movq (%rax), %rcx
leaq 0x148b4(%rip), %rdi     # 0x20440
pushq $0x59
popq %rsi
pushq $0x1
popq %rdx
callq 0x35e0
jmp 0xb267
movq 0x1d455(%rip), %rcx     # 0x28ff8
movq %rdi, %rbx
movq (%rcx), %rdi
movsbl -0x1(%rax,%r9), %edx
leaq 0x149ef(%rip), %rsi     # 0x205a5
xorl %eax, %eax
callq 0x3350
movq 0x40(%rsp), %rdi
callq 0x3070
movq (%rsp), %rdi
callq 0x3070
movq 0x48(%rsp), %rdi
callq 0x3070
movq 0x70(%rsp), %rdi
callq 0x3070
movq %rbx, %rdi
callq 0x3070
movq 0x68(%rsp), %rdi
callq 0x3070
movq 0x28(%rsp), %r15
movw $0x1, 0x24(%r15)
jmp 0xbd4b
leal 0x2(%r10), %ebx
cmpl %r15d, %ebx
jl 0xbc57
movl %r15d, %eax
sarl %eax
orl %r15d, %eax
movl %eax, %ecx
sarl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %r15d
sarl $0x10, %r15d
orl %ecx, %r15d
movslq %r15d, %rax
incl %r15d
leaq 0x4(,%rax,4), %rsi
callq 0x3480
movq %r14, %r10
movq %rax, %rdi
jmp 0xbc0b
addl $0x10, %ebp
jmp 0xbc77
movzbl %r12b, %eax
leaq 0x1475e(%rip), %rcx     # 0x203c0
movzbl (%rax,%rcx), %eax
orl %eax, %ebp
movl %ebp, (%rdi,%r13,4)
incl %r10d
pushq $0x10
popq %rbp
movq 0x68(%rsp), %r12
movslq %r10d, %rax
movl %ebp, (%rdi,%rax,4)
movslq %ebx, %r14
movq %rdi, %r15
leaq (,%r14,4), %rdi
callq 0x3420
movq %r15, %rsi
xorl %ecx, %ecx
movq 0x28(%rsp), %r15
cmpq %r14, %rcx
jge 0xbcb7
movl -0x4(%rsi,%r14,4), %edx
movl %edx, (%rax,%rcx,4)
movl (%rsi,%rcx,4), %edx
movl %edx, -0x4(%rax,%r14,4)
decq %r14
incq %rcx
jmp 0xbc9a
movq %rax, (%r12)
movl %ebx, 0x8(%r12)
movq %rsi, %rbx
movq 0x40(%rsp), %rdi
callq 0x3070
movq (%rsp), %rdi
callq 0x3070
movq 0x48(%rsp), %rdi
callq 0x3070
movq 0x70(%rsp), %rdi
callq 0x3070
movq %rbx, %rdi
callq 0x3070
movq (%r12), %rax
movq %rax, 0x18(%r15)
movl 0x8(%r12), %eax
movl %eax, 0x20(%r15)
movq %r12, %rdi
callq 0x3070
jmp 0xbd4b
movq 0x1d2e4(%rip), %rax     # 0x28ff8
movq (%rax), %rcx
leaq 0x147f3(%rip), %rdi     # 0x20511
pushq $0x34
jmp 0xbd35
movq 0x1d2cf(%rip), %rax     # 0x28ff8
movq (%rax), %rcx
leaq 0x14767(%rip), %rdi     # 0x2049a
pushq $0x76
popq %rsi
pushq $0x1
popq %rdx
callq 0x35e0
movq 0x28(%rsp), %rdi
callq 0x3070
xorl %r15d, %r15d
movq %r15, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1d291(%rip), %rax     # 0x28ff8
movq (%rax), %rcx
leaq 0x147d5(%rip), %rdi     # 0x20546
pushq $0x5e
popq %rsi
pushq $0x1
popq %rdx
callq 0x35e0
movw $0x2, 0x24(%r15)
jmp 0xb4ba