// File: /workspace/github_c_makefile_star2_O1/sc932[P]ALE/src/ALElike.c
// Function: realign
void realign(bam1_t *thisRead, assemblyT *theAssembly) {
	assert(realignParameters != NULL && realignParameters->scoringMatrix != NULL);
	int i;

	if ((thisRead->core.flag & BAM_FUNMAP) == BAM_FUNMAP)
		return;

	bam1_core_t *core = &thisRead->core;
	if (core->n_cigar == 1)
		return; // no need to realign such a simple match

	//fprintf(stderr, "Realigning %s %d %d\n", bam1_qname(thisRead), thisRead->core.flag, thisRead->core.pos);

	uint32_t *cigar = bam1_cigar(thisRead);
	uint32_t cigarLen = core->n_cigar;
	int32_t seqLen = core->l_qseq;

	uint8_t *seq = bam1_seq(thisRead);
	STACK_OR_MALLOC(int8_t, seqNum, seqLen);

	// translate sequence to seqNum (which is BAM 4-bit encoding)
	for(i=0; i < seqLen; i++) {
		seqNum[i] = bam1_seqi(seq, i);
	}
	s_profile *profile = ssw_init(seqNum, seqLen, realignParameters->scoringMatrix, NUM_NT_CHARACTERS, 2);
	contig_t *contig = theAssembly->contigs[ core->tid ];
	assert(contig->seqNum != NULL);

	int32_t refAlnLen = bam_calend(core, cigar) - core->pos;
	assert(refAlnLen > 0);
	int32_t maskLen = seqLen / 2;
	if (maskLen < 15)
		maskLen = 15;

	// allow left and right soft clip to re-align upto edges of reference (if there is any)
	int32_t offset = core->pos;
	if (cigarLen > 1 && bam_cigar_op(*cigar) == BAM_CSOFT_CLIP) {
		offset -= bam_cigar_oplen(*cigar);
		refAlnLen += bam_cigar_oplen(*cigar);
		if (offset < 0) {
			refAlnLen += offset; // subtract overhanging fraction
			offset = 0;
		}
		//fprintf(stderr, "extended left soft clip of %s %d pos %d to offset: %d, refAlnLen: %d\n", bam1_qname(thisRead), thisRead->core.flag, thisRead->core.pos, offset, refAlnLen);
	}
	if (cigarLen > 1 && bam_cigar_op(*(cigar + cigarLen - 1)) == BAM_CSOFT_CLIP) {
		refAlnLen += bam_cigar_oplen(*(cigar + cigarLen - 1));
		if (offset + refAlnLen > contig->seqLen) {
			refAlnLen = contig->seqLen - offset;
		}
		//fprintf(stderr, "extended right soft clip of %s %d pos %d to offset: %d refAlnLen: %d\n", bam1_qname(thisRead), thisRead->core.flag, thisRead->core.pos, offset, refAlnLen);
	}
	assert(refAlnLen + offset <= contig->seqLen);

	s_align *result = ssw_align(profile, contig->seqNum + offset, refAlnLen, realignParameters->gapOpenPenalty, realignParameters->gapExtendPenalty, 1, 0, 0, maskLen);
	init_destroy( profile );

	if (result == NULL) {
		fprintf(stderr, "Could not realign %s %d\n", bam1_qname(thisRead), thisRead->core.flag);
	} else {

		// fix softclipping (if needed)
		if (result->read_begin1 != 0 || result->read_end1 != seqLen) {
			// prepare and allocate 4 new cigar operation (all may not be needed)
			result->cigar = realloc(result->cigar, sizeof(int32_t) * (result->cigarLen + 4));
			if (result->cigar == NULL) {
				fprintf(stderr, "Could not allocate 4 more cigar operations!\n");
				abort();
			}

			// handle left side of read / ref
			if (result->read_begin1 != 0) {
				int32_t overlap = result->read_begin1;
				if (overlap > result->ref_begin1)
					overlap = result->ref_begin1;
				assert(overlap >= 0);
				uint32_t c = result->cigar[0];
				if (overlap >= realignParameters->minSoftClip || overlap == 0) {
					// prepend new softclip
					result->cigarLen += 1;
					for(i = result->cigarLen; i > 0 ; i--) {
						result->cigar[i] = result->cigar[i-1];
					}
					// softclip the entire unmapped region of the read
					result->cigar[0] = (result->read_begin1 << 4) | BAM_CSOFT_CLIP;
				} else {
					if (bam_cigar_op(c) == BAM_CMATCH || bam_cigar_op(c) == BAM_CDIFF) {
						// extend existing match/diff length: overlap + existing
						result->cigar[0] = ((bam_cigar_oplen(c) + overlap) << 4) | bam_cigar_op(c);
					} else {
						// prepend new match length: overlap
						result->cigarLen += 1;
						for(i = result->cigarLen; i > 0 ; i--) {
							result->cigar[i] = result->cigar[i-1];
						}
						result->cigar[0] = (overlap << 4) | BAM_CMATCH;
					}
					if (overlap != result->read_begin1) {
						assert(overlap < result->read_begin1);
						// prepend a new softclip (too)
						result->cigarLen += 1;
						for(i = result->cigarLen; i > 0 ; i--) {
							result->cigar[i] = result->cigar[i-1];
						}
						result->cigar[0] = ((result->read_begin1 - overlap) << 4) | BAM_CSOFT_CLIP;
					}
					// match was added or extended, adjust the alignment parameters
					result->read_begin1 -= overlap;
					result->ref_begin1 -= overlap;
				}
			}

			// handle right side of read / ref
			if (result->read_end1 != seqLen - 1) {
				int32_t oplen = seqLen - result->read_end1 - 1;
				int32_t overlap = oplen;
				if (oplen + result->ref_end1 >= refAlnLen ) {
					overlap = refAlnLen - result->ref_end1 - 1;
				}
				assert(overlap >= 0);
				//fprintf(stderr, "Right soft clip fix: oplen %d overlap %d refAlnLen %d read_end %d ref_end %d\n", oplen, overlap, refAlnLen, result->read_end1, result->ref_end1);
				uint32_t c = result->cigar[ result->cigarLen - 1 ];
				if (overlap >= realignParameters->minSoftClip || overlap == 0) {
					// append new softclip for entire remainder of the read
					result->cigar[ result->cigarLen ] = (oplen << 4) | BAM_CSOFT_CLIP;
					result->cigarLen += 1;
				} else {
					if (bam_cigar_op(c) == BAM_CMATCH || bam_cigar_op(c) == BAM_CDIFF) {
						// extend existing match/diff length: overlap + existing
						result->cigar[ result->cigarLen - 1 ] = ((overlap + bam_cigar_oplen(c)) << 4) | bam_cigar_op(c);
					} else {
						// add new match
						result->cigar[ result->cigarLen ] = (oplen << 4) | BAM_CMATCH;
						result->cigarLen += 1;
					}
					if (oplen != overlap) {
						// append a new softclip (too) for the remainder of the read after the reference ends
						assert(oplen > overlap);
						result->cigar[ result->cigarLen ] = ((oplen - overlap) << 4) | BAM_CSOFT_CLIP;
						result->cigarLen += 1;
					} else {
						assert(overlap == oplen);
					}
					// match was added or extended, adjust the alignment parameters
					result->read_end1 += overlap;
					result->ref_end1 += overlap;
				}
			}
		}

		if (result->ref_begin1 != core->pos - offset || result->cigarLen != core->n_cigar || memcmp(result->cigar, cigar, result->cigarLen) != 0) {
			// alignment has changed.  Replace with new alignment
			int printit = 0;
			if (printit) {
				int len = (result->cigarLen + core->n_cigar) * 5;
				char buf[len];
				buildCigarString(buf, cigar, thisRead->core.n_cigar);
				fprintf(stderr, "new alignment for %s %d. old %d-%d qlen %d, %s", bam1_qname(thisRead), core->flag, core->pos, bam_calend(core, cigar), bam_cigar2qlen(core, cigar), buf);

				buildCigarString(buf, result->cigar, result->cigarLen);
				fprintf(stderr, "\tnew %d, %s ", result->ref_begin1 + offset, buf);
			}
			// assign new cigar to this bam record
			int deltaCigarLen = result->cigarLen - thisRead->core.n_cigar;
			assert(thisRead->core.n_cigar + deltaCigarLen >= 1);
			int remainderLen = thisRead->data_len - ((uint8_t*) (bam1_cigar(thisRead) + thisRead->core.n_cigar) - thisRead->data);
			assert(remainderLen >= 0);
			assert(remainderLen ==  thisRead->core.l_qseq + (thisRead->core.l_qseq+1)/2 + thisRead->l_aux);
			if (deltaCigarLen > 0) {
				int deltaDatalen = deltaCigarLen*sizeof(uint32_t);
				if (thisRead->data_len + deltaDatalen > thisRead->m_data) {
					// allocate a new data and copy
					thisRead->m_data = thisRead->data_len + deltaDatalen;
					kroundup32(thisRead->m_data);
					thisRead->data = (uint8_t*) realloc(thisRead->data, thisRead->m_data);
					fprintf(stderr, "reallocated thisread to %d bytes\n", thisRead->m_data);
				}
			}
			// calculate pointers to memory that needs shifting
			cigar = bam1_cigar(thisRead);
			uint8_t *src  = (uint8_t*) (cigar + thisRead->core.n_cigar);
			uint8_t *dest = (uint8_t*) (cigar + (thisRead->core.n_cigar + deltaCigarLen));

			// shift right or left seq, qual, aux
			memmove(dest, src, remainderLen);
			// replace cigar
			memcpy(bam1_cigar(thisRead), result->cigar, result->cigarLen * sizeof(uint32_t));
			// change data_len
			thisRead->data_len += deltaCigarLen * sizeof(uint32_t);
			// change alignment parameters
			thisRead->core.n_cigar = result->cigarLen;
			thisRead->core.pos = result->ref_begin1 + offset;
			bam_fillmd1_core_ALE(thisRead, contig->seq);
			cigar = bam1_cigar(thisRead);
			if (printit) {
				fprintf(stderr, "new pos %d endcoord %d qlen: %d\n", thisRead->core.pos, bam_calend(&thisRead->core, cigar), bam_cigar2qlen(&thisRead->core, cigar));
			}
		}
		align_destroy( result );
	}
	STACK_OR_FREE(seqNum);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x22b20(%rip), %rax     # 0x2ca48
testq %rax, %rax
je 0xa48a
cmpq $0x0, (%rax)
je 0xa48a
movq %rdi, %rbx
movq 0x8(%rdi), %r13
btq $0x22, %r13
jb 0xa45a
movq %r13, %r12
shrq $0x30, %r12
cmpq $0x1, %r12
je 0xa45a
movq %rsi, -0x30(%rbp)
movl %r13d, %eax
shrl $0x18, %eax
addq 0x30(%rbx), %rax
movq %rax, -0x38(%rbp)
movq %rsp, -0x60(%rbp)
movslq 0x10(%rbx), %r14
xorl %eax, %eax
cmpq $0x401, %r14            # imm = 0x401
cmovbl %r14d, %eax
addq $0xf, %rax
andq $-0x10, %rax
movq %rsp, %r15
subq %rax, %r15
movq %r15, %rsp
cmpq $0x401, %r14            # imm = 0x401
jb 0x9faa
movq %r14, %rdi
callq 0x3420
movq %rax, %r15
testl %r14d, %r14d
jle 0x9fe0
movq -0x38(%rbp), %rax
leaq (%rax,%r12,4), %rax
xorl %edx, %edx
xorl %esi, %esi
movl %esi, %ecx
shrl %ecx
movb (%rax,%rcx), %dil
movl %edx, %ecx
notb %cl
andb $0x4, %cl
shrb %cl, %dil
andb $0xf, %dil
movb %dil, (%r15,%rsi)
incq %rsi
addb $0x4, %dl
cmpq %rsi, %r14
jne 0x9fbb
movq 0x22a61(%rip), %rax     # 0x2ca48
movq (%rax), %rdx
movq %r15, %rdi
movl %r14d, %esi
movl $0x10, %ecx
movl $0x2, %r8d
callq 0xd0d4
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq 0xa0(%rax), %rax
movslq (%rbx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, 0x18(%rax)
je 0xa4a9
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
callq 0xf2c0
movl 0x4(%rbx), %ecx
movl %eax, %r9d
movq %rcx, -0x30(%rbp)
subl %ecx, %r9d
testl %r9d, %r9d
jle 0xa4c8
movabsq $0xffffffffffff, %rdx   # imm = 0xFFFFFFFFFFFF
movl %r14d, %ecx
shrl $0x1f, %ecx
addl %r14d, %ecx
sarl %ecx
cmpl $0x10, %ecx
movl $0xf, %r10d
cmovgel %ecx, %r10d
leaq 0x1(%rdx), %rcx
cmpq %rcx, %r13
jb 0xa0a1
movq -0x38(%rbp), %rdx
movl (%rdx), %edx
movl %edx, %esi
andl $0xf, %esi
cmpl $0x4, %esi
jne 0xa0a1
shrl $0x4, %edx
movq -0x30(%rbp), %rdi
subl %edx, %edi
addl %r9d, %edx
xorl %esi, %esi
testl %edi, %edi
cmovgl %edi, %esi
cmovsl %eax, %edx
movl %esi, %eax
movq %rax, -0x30(%rbp)
movl %edx, %r9d
cmpq %rcx, %r13
jb 0xa0db
movq -0x38(%rbp), %rax
movl -0x4(%rax,%r12,4), %eax
movl %eax, %ecx
andl $0xf, %ecx
cmpl $0x4, %ecx
jne 0xa0db
shrl $0x4, %eax
addl %r9d, %eax
movq -0x30(%rbp), %rsi
leal (%rax,%rsi), %ecx
movq -0x40(%rbp), %rdi
movl 0x8(%rdi), %edx
movl %edx, %r9d
subl %esi, %r9d
cmpl %edx, %ecx
cmovlel %eax, %r9d
jmp 0xa0e3
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
leal (%r9,%rsi), %eax
cmpl 0x8(%rdi), %eax
jg 0xa4e7
leaq 0x8(%rbx), %rax
movq %rax, -0x48(%rbp)
movq %rsi, -0x30(%rbp)
movslq %esi, %rsi
addq 0x18(%rdi), %rsi
leaq 0x30(%rbx), %rax
movq %rax, -0x50(%rbp)
movq 0x22936(%rip), %rax     # 0x2ca48
movzbl 0xa(%rax), %ecx
movzbl 0xb(%rax), %r8d
subq $0x8, %rsp
xorl %eax, %eax
movq -0x68(%rbp), %r12
movq %r12, %rdi
movq %r9, -0x58(%rbp)
movl %r9d, %edx
movl $0x1, %r9d
pushq %r10
pushq %rax
pushq %rax
callq 0xd1c0
addq $0x20, %rsp
movq %rax, %r13
movq %r12, %rdi
callq 0xd1a2
testq %r13, %r13
je 0xa469
cmpl $0x0, 0xc(%r13)
jne 0xa167
cmpl %r14d, 0x10(%r13)
je 0xa31a
movq 0x18(%r13), %rdi
movslq 0x20(%r13), %rax
leaq 0x10(,%rax,4), %rsi
callq 0x3480
movq %rax, 0x18(%r13)
testq %rax, %rax
je 0xa563
leaq 0x20(%r13), %rcx
movl 0xc(%r13), %esi
testl %esi, %esi
je 0xa273
movl 0x4(%r13), %edx
cmpl %edx, %esi
cmovll %esi, %edx
testl %edx, %edx
js 0xa568
je 0xa1cc
movq 0x22895(%rip), %rsi     # 0x2ca48
movsbl 0xc(%rsi), %esi
cmpl %esi, %edx
jge 0xa1cc
movl (%rax), %esi
testb $0x7, %sil
jne 0xa1fe
movl %edx, %edi
shll $0x4, %edi
addl %edi, %esi
jmp 0xa229
movl (%rcx), %edx
leal 0x1(%rdx), %esi
movl %esi, (%rcx)
testl %edx, %edx
js 0xa1f0
movl %esi, %esi
addl $0x2, %edx
leaq (%rax,%rsi,4), %rsi
movl -0x4(%rsi), %edi
movl %edi, (%rsi)
addq $-0x4, %rsi
decl %edx
cmpl $0x1, %edx
jg 0xa1e0
movl 0xc(%r13), %edx
shll $0x4, %edx
orl $0x4, %edx
movl %edx, (%rax)
jmp 0xa273
movl (%rcx), %esi
leal 0x1(%rsi), %edi
movl %edi, (%rcx)
testl %esi, %esi
js 0xa224
movl %edi, %edi
addl $0x2, %esi
leaq (%rax,%rdi,4), %rdi
movl -0x4(%rdi), %r8d
movl %r8d, (%rdi)
addq $-0x4, %rdi
decl %esi
cmpl $0x1, %esi
jg 0xa212
movl %edx, %esi
shll $0x4, %esi
movl %esi, (%rax)
cmpl 0xc(%r13), %edx
je 0xa26b
jge 0xa5a6
movl (%rcx), %esi
leal 0x1(%rsi), %edi
movl %edi, (%rcx)
testl %esi, %esi
js 0xa25d
movl %edi, %edi
addl $0x2, %esi
leaq (%rax,%rdi,4), %rdi
movl -0x4(%rdi), %r8d
movl %r8d, (%rdi)
addq $-0x4, %rdi
decl %esi
cmpl $0x1, %esi
jg 0xa24b
movl 0xc(%r13), %esi
subl %edx, %esi
shll $0x4, %esi
orl $0x4, %esi
movl %esi, (%rax)
subl %edx, 0xc(%r13)
subl %edx, 0x4(%r13)
movl 0x10(%r13), %edx
leal -0x1(%r14), %esi
cmpl %esi, %edx
je 0xa31a
notl %edx
addl %r14d, %edx
movl 0x8(%r13), %esi
leal (%rsi,%rdx), %edi
notl %esi
movq -0x58(%rbp), %r8
addl %r8d, %esi
cmpl %r8d, %edi
cmovll %edx, %esi
testl %esi, %esi
js 0xa587
movslq (%rcx), %rdi
je 0xa2d8
movq 0x22796(%rip), %r8      # 0x2ca48
movsbl 0xc(%r8), %r8d
cmpl %r8d, %esi
jge 0xa2d8
movl -0x4(%rax,%rdi,4), %r8d
testb $0x7, %r8b
jne 0xa2e8
movl %esi, %r9d
shll $0x4, %r9d
addl %r9d, %r8d
movl %r8d, -0x4(%rax,%rdi,4)
jmp 0xa2f5
shll $0x4, %edx
orl $0x4, %edx
movl %edx, (%rax,%rdi,4)
movl $0x1, %esi
jmp 0xa318
movl %edx, %r8d
shll $0x4, %r8d
movl %r8d, (%rax,%rdi,4)
incl (%rcx)
subl %esi, %edx
je 0xa30d
jle 0xa5c5
shll $0x4, %edx
orl $0x4, %edx
movslq (%rcx), %rdi
movl %edx, (%rax,%rdi,4)
incl (%rcx)
movq %r13, %rcx
addq $0x8, %rcx
addl %esi, 0x10(%r13)
addl %esi, (%rcx)
movl 0x4(%rbx), %eax
subl -0x30(%rbp), %eax
cmpl %eax, 0x4(%r13)
jne 0xa34b
movl 0x20(%r13), %edx
movq -0x48(%rbp), %rax
movzwl 0x6(%rax), %eax
cmpl %eax, %edx
jne 0xa34b
movq 0x18(%r13), %rdi
movq -0x38(%rbp), %rsi
callq 0x3460
testl %eax, %eax
je 0xa43d
movq %r13, -0x38(%rbp)
movl 0x20(%r13), %r12d
testl %r12d, %r12d
jle 0xa506
movq -0x48(%rbp), %rax
movq (%rax), %rsi
movq %rsi, %rcx
shrq $0x30, %rcx
movl 0x24(%rbx), %eax
movq 0x30(%rbx), %rdx
shrl $0x18, %esi
addl %edx, %esi
leal (%rsi,%rcx,4), %esi
movl %edx, %r13d
subl %esi, %r13d
addl %eax, %r13d
js 0xa525
movl 0x10(%rbx), %esi
leal 0x1(%rsi), %edi
shrl $0x1f, %edi
addl %esi, %edi
incl %edi
sarl %edi
addl 0x20(%rbx), %esi
addl %edi, %esi
cmpl %esi, %r13d
jne 0xa544
subl %ecx, %r12d
testl %r12d, %r12d
jle 0xa3ba
leal (%rax,%r12,4), %edi
cmpl 0x28(%rbx), %edi
jg 0xa478
movq 0x8(%rbx), %rax
movl %eax, %ecx
shrl $0x18, %ecx
addq 0x30(%rbx), %rcx
shrq $0x30, %rax
leaq (%rcx,%rax,4), %rsi
addl %r12d, %eax
cltq
leaq (%rcx,%rax,4), %rdi
movl %r13d, %edx
callq 0x34d0
movzbl 0xb(%rbx), %edi
addq 0x30(%rbx), %rdi
movq -0x38(%rbp), %r13
movq 0x18(%r13), %rsi
movslq 0x20(%r13), %rdx
shlq $0x2, %rdx
callq 0x33b0
shll $0x2, %r12d
addl %r12d, 0x24(%rbx)
movl 0x20(%r13), %eax
shlq $0x30, %rax
movabsq $0xffffffffffff, %rcx   # imm = 0xFFFFFFFFFFFF
andq 0x8(%rbx), %rcx
orq %rax, %rcx
movq %rcx, 0x8(%rbx)
movq -0x30(%rbp), %rax
addl 0x4(%r13), %eax
movl %eax, 0x4(%rbx)
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0x1c264
movq %r13, %rdi
callq 0xdde3
cmpl $0x401, %r14d           # imm = 0x401
jb 0xa456
movq %r15, %rdi
callq 0x3070
movq -0x60(%rbp), %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x383f
jmp 0xa445
leaq 0x28(%rbx), %rsi
movq -0x50(%rbp), %rcx
callq 0x37dd
jmp 0xa3ba
leaq 0x1899b(%rip), %rdi     # 0x22e2c
leaq 0x1786d(%rip), %rsi     # 0x21d05
leaq 0x189d3(%rip), %rcx     # 0x22e72
movl $0x966, %edx            # imm = 0x966
callq 0x3230
leaq 0x189e6(%rip), %rdi     # 0x22e96
leaq 0x1784e(%rip), %rsi     # 0x21d05
leaq 0x189b4(%rip), %rcx     # 0x22e72
movl $0x97f, %edx            # imm = 0x97F
callq 0x3230
leaq 0x189de(%rip), %rdi     # 0x22ead
leaq 0x1782f(%rip), %rsi     # 0x21d05
leaq 0x18995(%rip), %rcx     # 0x22e72
movl $0x982, %edx            # imm = 0x982
callq 0x3230
leaq 0x189cd(%rip), %rdi     # 0x22ebb
leaq 0x17810(%rip), %rsi     # 0x21d05
leaq 0x18976(%rip), %rcx     # 0x22e72
movl $0x999, %edx            # imm = 0x999
callq 0x3230
leaq 0x18a54(%rip), %rdi     # 0x22f61
leaq 0x177f1(%rip), %rsi     # 0x21d05
leaq 0x18957(%rip), %rcx     # 0x22e72
movl $0xa09, %edx            # imm = 0xA09
callq 0x3230
leaq 0x18a61(%rip), %rdi     # 0x22f8d
leaq 0x177d2(%rip), %rsi     # 0x21d05
leaq 0x18938(%rip), %rcx     # 0x22e72
movl $0xa0b, %edx            # imm = 0xA0B
callq 0x3230
leaq 0x18a54(%rip), %rdi     # 0x22f9f
leaq 0x177b3(%rip), %rsi     # 0x21d05
leaq 0x18919(%rip), %rcx     # 0x22e72
movl $0xa0c, %edx            # imm = 0xA0C
callq 0x3230
callq 0x37bb
leaq 0x189b7(%rip), %rdi     # 0x22f26
leaq 0x1778f(%rip), %rsi     # 0x21d05
leaq 0x188f5(%rip), %rcx     # 0x22e72
movl $0x9b0, %edx            # imm = 0x9B0
callq 0x3230
leaq 0x18998(%rip), %rdi     # 0x22f26
leaq 0x17770(%rip), %rsi     # 0x21d05
leaq 0x188d6(%rip), %rcx     # 0x22e72
movl $0x9dc, %edx            # imm = 0x9DC
callq 0x3230
leaq 0x18986(%rip), %rdi     # 0x22f33
leaq 0x17751(%rip), %rsi     # 0x21d05
leaq 0x188b7(%rip), %rcx     # 0x22e72
movl $0x9c7, %edx            # imm = 0x9C7
callq 0x3230
leaq 0x18985(%rip), %rdi     # 0x22f51
leaq 0x17732(%rip), %rsi     # 0x21d05
leaq 0x18898(%rip), %rcx     # 0x22e72
movl $0x9ee, %edx            # imm = 0x9EE
callq 0x3230