// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/contrib/ssw/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;
	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) {
            r->saturated = 1;
			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;
	r->read_end1 = bests[0].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;
	free(bests_reverse);
	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) {
		free(r);
		r = NULL;
	}
	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 $0x108, %rsp            # imm = 0x108
movl %r9d, %r12d
movl %r8d, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
movl %edx, %r13d
movq %rsi, 0x50(%rsp)
movq %rdi, %r14
movl 0x150(%rsp), %ebx
movl 0x20(%rdi), %ebp
movl $0x1, %edi
movl $0x28, %esi
callq 0x29b0e0
movq %rax, %r15
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x4(%r15)
movl %eax, 0xc(%r15)
cmpl $0xe, %ebx
jg 0x2f9e25
callq 0x29be06
movq %r15, 0x8(%rsp)
movq (%r14), %rax
testq %rax, %rax
jne 0x2f9e4d
movq 0x8(%r14), %r15
testq %r15, %r15
jne 0x2f9ead
movq 0x8(%rsp), %rdi
callq 0x29be67
xorl %r15d, %r15d
jmp 0x2f9f5d
movzbl 0x28(%r14), %r10d
movzbl 0x18(%rsp), %r8d
movzbl 0x10(%rsp), %r9d
movq 0x50(%rsp), %rdi
xorl %esi, %esi
movl %r13d, %edx
movl %ebp, %ecx
pushq %rbx
pushq %r10
pushq $0xff
pushq %rax
callq 0x29b580
addq $0x20, %rsp
movq 0x8(%r14), %r15
movzwl (%rax), %ecx
movzwl %cx, %ecx
movb $0x1, %dl
testq %r15, %r15
je 0x2f9ee4
movl %edx, 0x40(%rsp)
cmpl $0xff, %ecx
jne 0x2f9ef4
movq 0x8(%rsp), %rcx
movl $0x1, 0x24(%rcx)
movq %rax, %rdi
callq 0x29b170
subq $0x8, %rsp
movzbl 0x20(%rsp), %r8d
movzbl 0x18(%rsp), %r9d
movl $0x0, 0x48(%rsp)
movq 0x58(%rsp), %rdi
xorl %esi, %esi
movl %r13d, %edx
movl %ebp, %ecx
pushq %rbx
pushq $0xffff                 # imm = 0xFFFF
pushq %r15
callq 0x29ba20
addq $0x20, %rsp
jmp 0x2f9ef4
movl %edx, 0x40(%rsp)
cmpl $0xff, %ecx
je 0x2fa628
movzwl (%rax), %ecx
movq 0x8(%rsp), %r15
movq %rcx, 0x70(%rsp)
movw %cx, (%r15)
movl 0x4(%rax), %ecx
movq %rcx, 0x30(%rsp)
movl %ecx, 0x8(%r15)
movslq 0x8(%rax), %rbp
movl %ebp, 0x10(%r15)
cmpl $0xf, %ebx
jl 0x2f9f27
movzwl 0xc(%rax), %edx
movl 0x10(%rax), %ecx
jmp 0x2f9f2e
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %edx, %edx
movw %dx, 0x2(%r15)
movl %ecx, 0x14(%r15)
movq %rax, %rdi
callq 0x29b170
testb %r12b, %r12b
je 0x2f9f5d
movzwl 0x140(%rsp), %eax
movzbl %r12b, %r13d
cmpl $0x2, %r13d
jne 0x2f9f72
cmpw %ax, 0x70(%rsp)
jae 0x2f9f72
movq %r15, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r14), %r15
leaq 0x1(%rbp), %rdi
movl $0x1, %esi
movq %rdi, 0x20(%rsp)
callq 0x29b0e0
movq %rax, %r12
testl %ebp, %ebp
js 0x2f9fb4
xorl %ecx, %ecx
movq %rbp, %rax
movb (%r15,%rax), %dl
movb %dl, (%r12,%rcx)
movb (%r15,%rcx), %dl
movb %dl, (%r12,%rax)
leaq 0x1(%rcx), %rdx
decq %rax
cmpq %rax, %rcx
movq %rdx, %rcx
jl 0x2f9f95
movq 0x18(%r14), %rsi
movl 0x24(%r14), %ecx
cmpb $0x0, 0x40(%rsp)
je 0x2fa017
movzbl 0x28(%r14), %r8d
movq %r12, %rdi
movq 0x20(%rsp), %r15
movl %r15d, %edx
callq 0x29b420
movq %rax, %r11
movq 0x30(%rsp), %rax
leal 0x1(%rax), %edx
movzbl 0x28(%r14), %eax
movzbl 0x70(%rsp), %r10d
movzbl 0x18(%rsp), %r8d
movzbl 0x10(%rsp), %r9d
movq 0x50(%rsp), %rdi
movl $0x1, %esi
movl %r15d, %ecx
movq %r11, %r15
pushq %rbx
pushq %rax
pushq %r10
pushq %r11
callq 0x29b580
jmp 0x2fa061
movq %r12, %rdi
movq 0x20(%rsp), %r15
movl %r15d, %edx
callq 0x29b4d3
movq %rax, %r10
movq 0x30(%rsp), %rax
leal 0x1(%rax), %edx
subq $0x8, %rsp
movzbl 0x20(%rsp), %r8d
movzbl 0x18(%rsp), %r9d
movq 0x58(%rsp), %rdi
movl $0x1, %esi
movl %r15d, %ecx
movq %r10, %r15
pushq %rbx
pushq 0x80(%rsp)
pushq %r10
callq 0x29ba20
addq $0x20, %rsp
movq %rax, %rbx
movq %r15, %rdi
callq 0x29b170
movq %r12, %rdi
callq 0x29b170
movslq 0x4(%rbx), %r15
movq 0x8(%rsp), %rax
movl %r15d, 0x4(%rax)
movl 0x8(%rbx), %ecx
movq %rcx, 0x68(%rsp)
subl %ecx, %ebp
movl %ebp, 0xc(%rax)
movq %rbx, %rdi
callq 0x29b170
testb $0x7, %r13b
je 0x2fa0b5
testb $0x2, %r13b
je 0x2fa0bf
movzwl 0x140(%rsp), %eax
cmpw %ax, 0x70(%rsp)
jae 0x2fa0bf
movq 0x8(%rsp), %r15
jmp 0x2f9f5d
movq 0x30(%rsp), %r12
subl %r15d, %r12d
testb $0x4, %r13b
movq 0x68(%rsp), %rcx
je 0x2fa0e2
movl 0x148(%rsp), %eax
cmpl %eax, %r12d
jg 0x2fa0b5
cmpl %eax, %ecx
jg 0x2fa0b5
leal 0x1(%rcx), %eax
movq %rax, 0xc8(%rsp)
movl %r12d, %eax
subl %ecx, %eax
movl %eax, %r13d
negl %r13d
cmovsl %eax, %r13d
incl %r13d
movslq %ebp, %rax
addq 0x10(%r14), %rax
movq %rax, 0x40(%rsp)
movzbl 0x18(%rsp), %eax
movl %eax, 0x20(%rsp)
movzbl 0x10(%rsp), %eax
movl %eax, 0xac(%rsp)
movq 0x18(%r14), %rax
movq %rax, 0x100(%rsp)
movslq 0x24(%r14), %rax
movq %rax, 0xf8(%rsp)
movl $0x40, %edi
callq 0x29b190
movq %rax, 0x48(%rsp)
movl $0x10, %edi
callq 0x29b190
movq %rax, 0xb0(%rsp)
movl $0x20, %edi
callq 0x29b190
movq %rax, %rbx
movl $0x20, %edi
callq 0x29b190
movq %rax, 0x60(%rsp)
movl $0x20, %edi
callq 0x29b190
movq %rax, %r14
movl $0x400, %eax            # imm = 0x400
movq %rax, 0xc0(%rsp)
movl $0x400, %edi            # imm = 0x400
callq 0x29b190
movq %r14, %rcx
movq %r13, %r14
movq %rbx, %rdi
movq %rax, 0x28(%rsp)
movq 0xc8(%rsp), %rax
leal (%rax,%rax,2), %eax
movl %eax, 0x94(%rsp)
addq %r15, 0x50(%rsp)
movl $0x8, %ebx
xorl %ebp, %ebp
movq %r12, 0x30(%rsp)
movl %r14d, %eax
movq %rax, 0x78(%rsp)
leal 0x3(,%rax,2), %eax
movl %eax, 0x10(%rsp)
cmpl %ebx, %eax
movq %rcx, %rax
jl 0x2fa24c
movq %rax, 0x38(%rsp)
movl %ebx, %eax
sarl %eax
orl %ebx, %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, %ebx
sarl $0x10, %ebx
orl %ecx, %ebx
movslq %ebx, %r14
incl %ebx
leaq 0x4(,%r14,4), %r15
movq %r15, %rsi
callq 0x29b1e0
movq %rax, %r13
movq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0x29b1e0
movq %rax, 0x60(%rsp)
movq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x29b1e0
movq %r13, %rdi
cmpl %r14d, 0x10(%rsp)
jg 0x2fa1e4
movl %ebx, 0x98(%rsp)
movq %rax, 0x38(%rsp)
movq 0x78(%rsp), %rcx
leal 0x1(,%rcx,2), %esi
movl 0x94(%rsp), %eax
movq %rsi, 0xb8(%rsp)
imull %esi, %eax
movslq %eax, %rbx
movq 0xc0(%rsp), %r13
cmpq %rbx, %r13
movq 0x8(%rsp), %r15
movq %rdi, 0x58(%rsp)
movq 0x28(%rsp), %rax
jg 0x2fa2ee
movq %r13, %rdx
sarq %rdx
orq %r13, %rdx
movq %rdx, %rcx
sarq $0x2, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
sarq $0x4, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
sarq $0x8, %rcx
orq %rdx, %rcx
movq %rcx, %r14
sarq $0x10, %r14
orq %rcx, %r14
cmpq $-0x2, %r14
jle 0x2fa637
leaq 0x1(%r14), %r13
movq %rax, %rdi
movq %r13, %rsi
callq 0x29b1e0
movq 0x78(%rsp), %rcx
movq 0x58(%rsp), %rdi
cmpq %rbx, %r14
jl 0x2fa295
movq %r13, 0xc0(%rsp)
movq %rax, 0x28(%rsp)
leal (%rcx,%rcx), %r14d
addq $0x4, %rdi
movl %r14d, %eax
leaq 0x4(,%rax,4), %rdx
movq %rdi, 0xd0(%rsp)
xorl %esi, %esi
movq %rcx, %r13
callq 0x29b0d0
cmpl $0x0, 0x68(%rsp)
js 0x2fa619
movq %r14, 0xd8(%rsp)
leal 0x2(%r14), %eax
movl %eax, 0xa0(%rsp)
movq 0xb8(%rsp), %rax
leal (%rax,%rax,2), %eax
movq %rax, 0x80(%rsp)
movl %r13d, %ecx
notl %ecx
movl %r13d, %edx
negl %edx
movq 0x38(%rsp), %rax
leaq 0x4(%rax), %r15
movq 0x60(%rsp), %r8
leaq 0x4(%r8), %rbx
movq 0x28(%rsp), %rax
incq %rax
movq %rax, 0xe0(%rsp)
leal (%r13,%r13,2), %eax
leal 0x3(,%rax,2), %eax
movl %eax, 0x9c(%rsp)
movq $0x0, 0x88(%rsp)
xorl %r14d, %r14d
movq 0x58(%rsp), %rdi
movq %r13, %r10
testl %edx, %edx
movl $0x0, %r9d
movl %edx, 0xa4(%rsp)
cmovgl %edx, %r9d
testl %ecx, %ecx
movl $0x0, %edx
movl %ecx, 0xa8(%rsp)
cmovgl %ecx, %edx
movl %r14d, %ecx
movl %r14d, %eax
subl %r10d, %eax
testl %eax, %eax
movl $0x0, %r11d
cmovlel %r11d, %eax
movq %rcx, 0xe8(%rsp)
leal (%r10,%rcx), %esi
cmpl %esi, %r12d
cmovll %r12d, %esi
leal 0x1(%rsi), %ecx
movl 0xa0(%rsp), %r13d
cmpl %r13d, %ecx
cmovgel %r13d, %ecx
movslq %ecx, %rcx
movl %r11d, (%r8,%rcx,4)
movl %r11d, (%rdi,%rcx,4)
movq 0x38(%rsp), %rcx
movl %r11d, (%rcx)
movl %r11d, (%r8)
movl %r11d, (%rdi)
cmpl %esi, %eax
jg 0x2fa5aa
movq 0x50(%rsp), %rax
addq %r9, %rax
movq %rax, 0x10(%rsp)
leaq (,%r9,4), %rcx
shlq $0x2, %rdx
subq %rdx, %rcx
movq 0xd0(%rsp), %rax
leaq (%rax,%rcx), %rdi
addq %rbx, %rcx
movq %rcx, 0xf0(%rsp)
movl 0x88(%rsp), %r8d
addq 0xe0(%rsp), %r8
movl %esi, %eax
movq %rax, 0x18(%rsp)
xorl %edx, %edx
xorl %r10d, %r10d
xorl %r12d, %r12d
movl $0x0, %esi
movl $0x0, %r11d
testq %r14, %r14
je 0x2fa498
movl (%rdi,%r10,4), %esi
movq 0xf0(%rsp), %rax
movl (%rax,%r10,4), %r11d
movl 0x20(%rsp), %ecx
subl %ecx, %esi
movl 0xac(%rsp), %r13d
subl %r13d, %r11d
cmpl %r11d, %esi
cmovgl %esi, %r11d
setg %al
movl %r11d, (%rbx,%r10,4)
orb $0x2, %al
movb %al, -0x1(%r8)
movl -0x4(%r15,%r10,4), %eax
subl %ecx, %eax
subl %r13d, %r12d
cmpl %r12d, %eax
setg %sil
cmovgl %eax, %r12d
orb $0x4, %sil
movb %sil, (%r8)
movl (%rbx,%r10,4), %esi
testl %esi, %esi
movl $0x0, %r13d
cmovgl %esi, %r13d
movl %r12d, %r11d
testl %r12d, %r12d
jg 0x2fa4f4
xorl %r11d, %r11d
cmpl %r11d, %r13d
cmovbel %r11d, %r13d
movq 0x10(%rsp), %rax
movsbq (%rax,%r10), %rax
imulq 0xf8(%rsp), %rax
movq 0x40(%rsp), %rcx
movsbq (%rcx,%r14), %rcx
addq %rax, %rcx
movq 0x100(%rsp), %rax
movsbl (%rax,%rcx), %ecx
addl -0x4(%rdi,%r10,4), %ecx
cmpl %ecx, %r13d
movl %ecx, %eax
cmovgl %r13d, %eax
cmpl %ebp, %eax
cmovgl %eax, %ebp
movl %eax, (%r15,%r10,4)
movb $0x1, %al
cmpl %ecx, %r13d
jle 0x2fa555
cmpl %r11d, %esi
jg 0x2fa54f
movq %r8, %rax
jmp 0x2fa553
leaq -0x1(%r8), %rax
movb (%rax), %al
movb %al, 0x1(%r8)
leaq (%r9,%r10), %rax
incq %rax
incq %r10
decq %rax
addq $0x3, %r8
addq $0x4, %rdx
cmpq 0x18(%rsp), %rax
jb 0x2fa478
movabsq $0x3fffffffc, %rax      # imm = 0x3FFFFFFFC
andq %rax, %rdx
movq 0xd0(%rsp), %rdi
movq %r15, %rsi
callq 0x29b100
movq 0x30(%rsp), %r12
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %r8
movq 0x78(%rsp), %r10
incq %r14
movl 0xa4(%rsp), %edx
incl %edx
movl 0xa8(%rsp), %ecx
incl %ecx
movq 0x88(%rsp), %rax
addl 0x9c(%rsp), %eax
movq %rax, 0x88(%rsp)
cmpq 0xc8(%rsp), %r14
jne 0x2fa3a7
movq 0x80(%rsp), %rsi
imull 0xe8(%rsp), %esi
addq 0x28(%rsp), %rsi
movq 0xd8(%rsp), %r14
cmpl 0x70(%rsp), %ebp
movl 0x98(%rsp), %ebx
movq 0x38(%rsp), %rcx
jl 0x2fa1ca
jmp 0x2fa649
movq 0x28(%rsp), %rsi
movq 0x58(%rsp), %rdi
movq %r13, %r10
jmp 0x2fa601
movq 0x8(%rsp), %rdi
callq 0x29be22
jmp 0x2f9e45
callq 0x29be4b
movq %r15, %rdi
callq 0x29b170
jmp 0x2f9e45
movq 0x68(%rsp), %rdx
testl %edx, %edx
jle 0x2fa9cc
movq 0xb8(%rsp), %rax
leal (%rax,%rax,2), %eax
negq %rax
movq %rax, 0x20(%rsp)
movb $0x4d, %r13b
movl $0x10, %ebp
movl $0x2, %r15d
xorl %r11d, %r11d
leaq 0x3c0c6f(%rip), %rbx    # 0x6bb2f0
xorl %r8d, %r8d
xorl %r14d, %r14d
movq 0x48(%rsp), %rdi
movl %edx, %eax
subl %r10d, %eax
testl %eax, %eax
cmovlel %r11d, %eax
movl %r12d, %ecx
subl %eax, %ecx
leal (%rcx,%rcx,2), %eax
addl %r15d, %eax
cltq
movzbl (%rsi,%rax), %ecx
decl %ecx
cmpl $0x4, %ecx
ja 0x2fa806
movslq (%rbx,%rcx,4), %rax
addq %rbx, %rax
jmpq *%rax
decl %edx
decl %r12d
addq 0x20(%rsp), %rsi
movl $0x2, %r15d
movb $0x4d, %al
movb $0x1, %cl
jmp 0x2fa70b
decl %edx
addq 0x20(%rsp), %rsi
xorl %ecx, %ecx
movb $0x49, %al
xorl %r15d, %r15d
jmp 0x2fa70b
decl %edx
addq 0x20(%rsp), %rsi
movl $0x2, %r15d
movb $0x49, %al
jmp 0x2fa709
decl %r12d
movl $0x1, %r15d
jmp 0x2fa707
decl %r12d
movl $0x2, %r15d
movb $0x44, %al
xorl %ecx, %ecx
cmpb %r13b, %al
jne 0x2fa718
incl %r8d
jmp 0x2fa7d7
movl %r15d, 0x18(%rsp)
movl %r13d, %r15d
movl %r8d, %r13d
movq %rsi, 0x80(%rsp)
movq %rdx, 0x68(%rsp)
movq %r12, 0x30(%rsp)
leal 0x1(%r14), %ebx
cmpl %ebp, %ebx
movb %al, 0x10(%rsp)
movl %ecx, 0x40(%rsp)
jl 0x2fa781
movl %ebp, %eax
sarl %eax
orl %ebp, %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, %r12
incl %ebp
leaq 0x4(,%r12,4), %rsi
callq 0x29b1e0
movq %rax, %rdi
cmpl %r12d, %r14d
jge 0x2fa745
shll $0x4, %r13d
movzbl %r15b, %eax
leaq 0x3c0b80(%rip), %rcx    # 0x6bb310
movzbl (%rax,%rcx), %eax
orl %r13d, %eax
movslq %r14d, %rcx
movl %eax, (%rdi,%rcx,4)
movl $0x1, %r8d
movb 0x10(%rsp), %al
movl %eax, %r13d
movl %ebx, %r14d
movq 0x30(%rsp), %r12
movq 0x68(%rsp), %rdx
movq 0x78(%rsp), %r10
movq 0x80(%rsp), %rsi
xorl %r11d, %r11d
leaq 0x3c0b22(%rip), %rbx    # 0x6bb2f0
movl 0x18(%rsp), %r15d
movl 0x40(%rsp), %ecx
testl %edx, %edx
jg 0x2fa68c
movq %rdi, 0x48(%rsp)
shll $0x4, %r8d
movl %r8d, %r12d
testb %cl, %cl
je 0x2fa86d
leal 0x1(%r14), %r15d
cmpl %ebp, %r15d
jge 0x2fa883
movq 0x48(%rsp), %rdi
jmp 0x2fa8c4
movq 0x5f57cb(%rip), %rcx    # 0x8effd8
movq %rdi, %rbx
movq (%rcx), %rdi
movsbl -0x1(%rax,%rsi), %edx
leaq 0x3c0ca8(%rip), %rsi    # 0x6bb4c7
xorl %eax, %eax
callq 0x29b1c0
movq 0x28(%rsp), %rdi
callq 0x29b170
movq 0x38(%rsp), %rdi
callq 0x29b170
movq 0x60(%rsp), %rdi
callq 0x29b170
movq 0x58(%rsp), %rdi
callq 0x29b170
movq %rbx, %rdi
callq 0x29b170
movq 0xb0(%rsp), %rdi
callq 0x29b170
movq 0x8(%rsp), %r15
jmp 0x2fa63c
movl %eax, %r13d
leal 0x2(%r14), %r15d
cmpl %ebp, %r15d
jge 0x2fa8ca
movq 0x48(%rsp), %rdi
jmp 0x2fa90b
movq 0x48(%rsp), %rdi
movl %ebp, %eax
sarl %eax
orl %ebp, %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, %rbx
incl %ebp
leaq 0x4(,%rbx,4), %rsi
callq 0x29b1e0
movq %rax, %rdi
cmpl %ebx, %r14d
jge 0x2fa888
addl $0x10, %r12d
jmp 0x2fa92d
movq 0x48(%rsp), %rdi
movl %ebp, %eax
sarl %eax
orl %ebp, %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, %rbx
incl %ebp
leaq 0x4(,%rbx,4), %rsi
callq 0x29b1e0
movq %rax, %rdi
cmpl %ebx, %r15d
jg 0x2fa8cf
movzbl %r13b, %eax
leaq 0x3c09fa(%rip), %rcx    # 0x6bb310
movzbl (%rax,%rcx), %eax
orl %eax, %r12d
movslq %r14d, %rax
movl %r12d, (%rdi,%rax,4)
incl %r14d
movl $0x10, %r12d
movslq %r14d, %rax
movl %r12d, (%rdi,%rax,4)
movslq %r15d, %rbx
movq %rdi, %r14
leaq (,%rbx,4), %rdi
callq 0x29b190
testl %ebx, %ebx
jle 0x2fa96d
decq %rbx
xorl %ecx, %ecx
movl (%r14,%rbx,4), %edx
movl %edx, (%rax,%rcx,4)
movl (%r14,%rcx,4), %edx
movl %edx, (%rax,%rbx,4)
incq %rcx
leaq -0x1(%rbx), %rdx
cmpq %rbx, %rcx
movq %rdx, %rbx
jl 0x2fa950
movq 0xb0(%rsp), %rbx
movq %rax, (%rbx)
movl %r15d, 0x8(%rbx)
movq 0x28(%rsp), %rdi
callq 0x29b170
movq 0x38(%rsp), %rdi
callq 0x29b170
movq 0x60(%rsp), %rdi
callq 0x29b170
movq 0x58(%rsp), %rdi
callq 0x29b170
movq %r14, %rdi
callq 0x29b170
movq (%rbx), %rax
movq 0x8(%rsp), %r15
movq %rax, 0x18(%r15)
movl 0x8(%rbx), %eax
movl %eax, 0x20(%r15)
movq %rbx, %rdi
callq 0x29b170
jmp 0x2f9f5d
movl $0x10, %ebp
xorl %r12d, %r12d
xorl %r14d, %r14d
jmp 0x2fa7ef