// File: /workspace/github_c_makefile_star2_O2/lh3[P]minimap2/map.c
// Function: worker_pipeline
static void *worker_pipeline(void *shared, int step, void *in)
{
	int i, j, k;
    pipeline_t *p = (pipeline_t*)shared;
    if (step == 0) { // step 0: read sequences
		int with_qual = (!!(p->opt->flag & MM_F_OUT_SAM) && !(p->opt->flag & MM_F_NO_QUAL));
		int with_comment = !!(p->opt->flag & MM_F_COPY_COMMENT);
		int frag_mode = (p->n_fp > 1 || !!(p->opt->flag & MM_F_FRAG_MODE));
        step_t *s;
        s = (step_t*)calloc(1, sizeof(step_t));
		if (p->n_fp > 1) s->seq = mm_bseq_read_frag2(p->n_fp, p->fp, p->mini_batch_size, with_qual, with_comment, &s->n_seq);
		else s->seq = mm_bseq_read3(p->fp[0], p->mini_batch_size, with_qual, with_comment, frag_mode, &s->n_seq);
		if (s->seq) {
			s->p = p;
			for (i = 0; i < s->n_seq; ++i)
				s->seq[i].rid = p->n_processed++;
			s->buf = (mm_tbuf_t**)calloc(p->n_threads, sizeof(mm_tbuf_t*));
			for (i = 0; i < p->n_threads; ++i)
				s->buf[i] = mm_tbuf_init();
			s->n_reg = (int*)calloc(5 * s->n_seq, sizeof(int));
			s->seg_off = s->n_reg + s->n_seq; // seg_off, n_seg, rep_len and frag_gap are allocated together with n_reg
			s->n_seg = s->seg_off + s->n_seq;
			s->rep_len = s->n_seg + s->n_seq;
			s->frag_gap = s->rep_len + s->n_seq;
			s->reg = (mm_reg1_t**)calloc(s->n_seq, sizeof(mm_reg1_t*));
			for (i = 1, j = 0; i <= s->n_seq; ++i)
				if (i == s->n_seq || !frag_mode || !mm_qname_same(s->seq[i-1].name, s->seq[i].name)) {
					s->n_seg[s->n_frag] = i - j;
					s->seg_off[s->n_frag++] = j;
					j = i;
				}
			return s;
		} else free(s);
    } else if (step == 1) { // step 1: map
		if (p->n_parts > 0) merge_hits((step_t*)in);
		else kt_for(p->n_threads, worker_for, in, ((step_t*)in)->n_frag);
		return in;
    } else if (step == 2) { // step 2: output
		void *km = 0;
        step_t *s = (step_t*)in;
		const mm_idx_t *mi = p->mi;
		for (i = 0; i < p->n_threads; ++i) mm_tbuf_destroy(s->buf[i]);
		free(s->buf);
		if ((p->opt->flag & MM_F_OUT_CS) && !(mm_dbg_flag & MM_DBG_NO_KALLOC)) km = km_init();
		for (k = 0; k < s->n_frag; ++k) {
			int seg_st = s->seg_off[k], seg_en = s->seg_off[k] + s->n_seg[k];
			for (i = seg_st; i < seg_en; ++i) {
				mm_bseq1_t *t = &s->seq[i];
				if (p->opt->split_prefix && p->n_parts == 0) { // then write to temporary files
					mm_err_fwrite(&s->n_reg[i],    sizeof(int), 1, p->fp_split);
					mm_err_fwrite(&s->rep_len[i],  sizeof(int), 1, p->fp_split);
					mm_err_fwrite(&s->frag_gap[i], sizeof(int), 1, p->fp_split);
					for (j = 0; j < s->n_reg[i]; ++j) {
						mm_reg1_t *r = &s->reg[i][j];
						mm_err_fwrite(r, sizeof(mm_reg1_t), 1, p->fp_split);
						if (p->opt->flag & MM_F_CIGAR) {
							mm_err_fwrite(&r->p->capacity, 4, 1, p->fp_split);
							mm_err_fwrite(r->p, r->p->capacity, 4, p->fp_split);
						}
					}
				} else if (p->opt->flag & MM_F_OUT_JUNC) { // extra logic for --write-junc
					for (j = 0; j < s->n_reg[i]; ++j) {
						const mm_reg1_t *r = &s->reg[i][j];
						if (r->id != r->parent || r->mapq < 10) continue;
						mm_write_junc(&p->str, mi, t, r);
						if (p->str.l > 0) mm_err_puts(p->str.s);
					}
				} else if (s->n_reg[i] > 0) { // the query has at least one hit
					for (j = 0; j < s->n_reg[i]; ++j) {
						const mm_reg1_t *r = &s->reg[i][j];
						assert(!r->sam_pri || r->id == r->parent);
						if ((p->opt->flag & MM_F_NO_PRINT_2ND) && r->id != r->parent)
							continue;
						if (p->opt->flag & MM_F_OUT_SAM)
							mm_write_sam3(&p->str, mi, t, i - seg_st, j, s->n_seg[k], &s->n_reg[seg_st], (const mm_reg1_t*const*)&s->reg[seg_st], km, p->opt->flag, s->rep_len[i]);
						else
							mm_write_paf4(&p->str, mi, t, r, km, p->opt->flag, s->rep_len[i], s->n_seg[k], i - seg_st);
						mm_err_puts(p->str.s);
					}
				} else if ((p->opt->flag & MM_F_PAF_NO_HIT) || ((p->opt->flag & MM_F_OUT_SAM) && !(p->opt->flag & MM_F_SAM_HIT_ONLY))) { // output an empty hit, if requested
					if (p->opt->flag & MM_F_OUT_SAM)
						mm_write_sam3(&p->str, mi, t, i - seg_st, -1, s->n_seg[k], &s->n_reg[seg_st], (const mm_reg1_t*const*)&s->reg[seg_st], km, p->opt->flag, s->rep_len[i]);
					else
						mm_write_paf4(&p->str, mi, t, 0, 0, p->opt->flag, s->rep_len[i], s->n_seg[k], i - seg_st);
					mm_err_puts(p->str.s);
				}
			}
			for (i = seg_st; i < seg_en; ++i) {
				for (j = 0; j < s->n_reg[i]; ++j) free(s->reg[i][j].p);
				free(s->reg[i]);
				free(s->seq[i].seq); free(s->seq[i].name);
				if (s->seq[i].qual) free(s->seq[i].qual);
				if (s->seq[i].comment) free(s->seq[i].comment);
			}
		}
		free(s->reg); free(s->n_reg); free(s->seq); // seg_off, n_seg, rep_len and frag_gap were allocated with reg; no memory leak here
		km_destroy(km);
		if (mm_verbose >= 3)
			fprintf(stderr, "[M::%s::%.3f*%.2f] mapped %d sequences\n", __func__, realtime() - mm_realtime0, cputime() / (realtime() - mm_realtime0), s->n_seq);
		free(s);
	}
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, 0x8(%rsp)
movq %rdi, %r14
cmpl $0x2, %esi
je 0xb7df
cmpl $0x1, %esi
je 0xb782
testl %esi, %esi
jne 0xc25f
movq 0x18(%r14), %rax
movq (%rax), %r13
movl %r13d, %eax
andl $0x18, %eax
xorl %ebp, %ebp
cmpl $0x8, %eax
sete %bpl
movl %r13d, %r15d
shrl $0x19, %r15d
andl $0x1, %r15d
movl 0x8(%r14), %r12d
cmpl $0x2, %r12d
setge 0x10(%rsp)
andl $0x2000, %r13d          # imm = 0x2000
pushq $0x1
popq %rdi
pushq $0x50
popq %rsi
callq 0x2230
movq %rax, %rbx
cmpl $0x2, %r12d
jl 0xc1f4
movq 0x10(%r14), %rdx
movq 0x20(%r14), %rsi
movq %rbx, %r9
addq $0x8, %r9
movl %r12d, %edi
movl %ebp, %ecx
movl %r15d, %r8d
callq 0x1180e
jmp 0xc217
cmpl $0x0, 0x48(%r14)
jle 0xc3b9
movq 0x8(%rsp), %rbx
movq (%rbx), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x60(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x109c3
movl 0xc(%rbx), %r14d
xorl %esi, %esi
testl %r14d, %r14d
movl $0x0, %ecx
cmovgl %r14d, %ecx
xorl %ebx, %ebx
cmpq %rsi, %rcx
je 0xbd66
movq 0x8(%rsp), %rdx
movq 0x28(%rdx), %rdx
movl (%rdx,%rsi,4), %edx
cmpl %edx, %ebx
cmovlel %edx, %ebx
incq %rsi
jmp 0xb7c0
movq 0x28(%r14), %rax
movq %rax, 0x20(%rsp)
xorl %ebx, %ebx
movslq 0x4(%r14), %rax
movq 0x8(%rsp), %rcx
movq 0x48(%rcx), %rdi
cmpq %rax, %rbx
jge 0xb80a
movq (%rdi,%rbx,8), %rdi
callq 0x9a6c
incq %rbx
jmp 0xb7ea
callq 0x2040
movq 0x18(%r14), %rax
testb $0x40, (%rax)
je 0xb830
leaq 0x27109(%rip), %rax     # 0x32928
testb $0x1, (%rax)
jne 0xb830
callq 0x109c3
movq %rax, 0x30(%rsp)
jmp 0xb839
movq $0x0, 0x30(%rsp)
leaq 0x30(%r14), %rax
movq %rax, 0x18(%rsp)
xorl %edx, %edx
movq %r14, 0x28(%rsp)
movq 0x8(%rsp), %rbx
movslq 0xc(%rbx), %rax
cmpq %rax, %rdx
jge 0xbcc3
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
movslq (%rax,%rdx,4), %r13
movq %rdx, 0x38(%rsp)
movslq (%rcx,%rdx,4), %r12
addq %r13, %r12
movq %r13, %rbx
movq %r12, 0x58(%rsp)
cmpq %r12, %rbx
jge 0xbcad
imulq $0x28, %rbx, %rdx
movq 0x18(%r14), %rax
movq 0x8(%rsp), %rcx
addq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rsp)
cmpq $0x0, 0x100(%rax)
je 0xb8af
cmpl $0x0, 0x48(%r14)
je 0xba60
movq (%rax), %rax
btq $0x28, %rax
jb 0xb9ee
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rdx
movl (%rdx,%rbx,4), %esi
testl %esi, %esi
jle 0xbb4e
movl %ebx, %eax
subl %r13d, %eax
movq %rax, 0x40(%rsp)
xorl %ebp, %ebp
xorl %r15d, %r15d
movslq %esi, %rax
cmpq %rax, %r15
movq 0x8(%rsp), %rax
jge 0xbc20
movq 0x40(%rax), %rdi
movq (%rdi,%rbx,8), %rcx
testb $0x10, 0x3d(%rcx,%rbp)
je 0xb90d
movl (%rcx,%rbp), %eax
cmpl 0x20(%rcx,%rbp), %eax
jne 0xc3da
movq 0x18(%r14), %rax
movq (%rax), %rax
btl $0xe, %eax
jae 0xb929
movl (%rcx,%rbp), %r8d
cmpl 0x20(%rcx,%rbp), %r8d
jne 0xb9e2
testb $0x8, %al
jne 0xb978
addq %rbp, %rcx
movq 0x8(%rsp), %r14
movq 0x28(%r14), %rdx
movq 0x30(%r14), %rsi
movl (%rsi,%rbx,4), %r10d
movq 0x38(%rsp), %rsi
movl (%rdx,%rsi,4), %r11d
subq $0x8, %rsp
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x38(%rsp), %r8
movq %rax, %r9
pushq 0x48(%rsp)
pushq %r11
pushq %r10
callq 0xdee5
addq $0x20, %rsp
jmp 0xb9c9
movq 0x8(%rsp), %r14
movq 0x28(%r14), %rcx
movq 0x30(%r14), %rsi
movq 0x38(%rsp), %r8
movl (%rcx,%r8,4), %r9d
leaq (%rdx,%r13,4), %r10
leaq (%rdi,%r13,8), %r11
movl (%rsi,%rbx,4), %r12d
subq $0x8, %rsp
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x48(%rsp), %rcx
movl %r15d, %r8d
pushq %r12
pushq %rax
pushq 0x48(%rsp)
pushq %r11
pushq %r10
callq 0xe3c4
addq $0x30, %rsp
movq 0x28(%rsp), %r12
movq 0x40(%r12), %rdi
callq 0x4550
movq 0x18(%r14), %rdx
movq %r12, %r14
movl (%rdx,%rbx,4), %esi
incq %r15
addq $0x50, %rbp
jmp 0xb8e0
xorl %r15d, %r15d
xorl %ebp, %ebp
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rax
movslq (%rax,%rbx,4), %rax
cmpq %rax, %rbp
jge 0xbc20
movq 0x40(%rcx), %rax
movq (%rax,%rbx,8), %rcx
movl (%rcx,%r15), %eax
cmpl 0x20(%rcx,%r15), %eax
jne 0xba57
movl 0x3c(%rcx,%r15), %eax
movl $0xfe, %edx
andl %edx, %eax
cmpl $0xa, %eax
jb 0xba57
addq %r15, %rcx
movq 0x18(%rsp), %r12
movq %r12, %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0xd13d
cmpq $0x0, (%r12)
je 0xba57
movq 0x40(%r14), %rdi
callq 0x4550
incq %rbp
addq $0x50, %r15
jmp 0xb9f3
leaq (,%rbx,4), %r15
movq 0x8(%rsp), %r14
movq 0x18(%r14), %rdi
addq %r15, %rdi
movq 0x28(%rsp), %rax
movq 0x58(%rax), %rcx
pushq $0x4
popq %r12
movq %r12, %rsi
movq %rbx, 0x10(%rsp)
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x4571
movq 0x30(%r14), %rdi
addq %r15, %rdi
movq 0x28(%rsp), %rax
movq 0x58(%rax), %rcx
movq %r12, %rsi
movq %rbx, %rdx
callq 0x4571
addq 0x38(%r14), %r15
movq 0x28(%rsp), %r14
movq 0x58(%r14), %rcx
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq 0x10(%rsp), %rbx
callq 0x4571
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rax
movslq (%rax,%rbx,4), %rax
cmpq %rax, %r12
jge 0xbc20
movq 0x40(%rcx), %rax
movq (%rax,%rbx,8), %rbp
leaq (%r15,%rbp), %rdi
movq 0x58(%r14), %rcx
pushq $0x50
popq %rsi
pushq $0x1
popq %rdx
callq 0x4571
movq 0x18(%r14), %rax
testb $0x4, (%rax)
je 0xbb45
movq 0x48(%rbp,%r15), %rdi
movq 0x58(%r14), %rcx
movq %r14, %rbx
pushq $0x4
popq %r14
movq %r14, %rsi
pushq $0x1
popq %rdx
callq 0x4571
movq 0x48(%rbp,%r15), %rdi
movl (%rdi), %esi
movq 0x58(%rbx), %rcx
movq %r14, %rdx
movq %rbx, %r14
movq 0x10(%rsp), %rbx
callq 0x4571
incq %r12
addq $0x50, %r15
jmp 0xbad5
btl $0x1b, %eax
setae %cl
movl %eax, %esi
andl $0x40000008, %esi       # imm = 0x40000008
cmpl $0x8, %esi
setne %sil
testb %sil, %cl
jne 0xbc20
testb $0x8, %al
jne 0xbbbd
movq 0x8(%rsp), %rdx
movq 0x28(%rdx), %rcx
movq 0x30(%rdx), %rdx
movl (%rdx,%rbx,4), %r10d
movq 0x38(%rsp), %rdx
movl (%rcx,%rdx,4), %r11d
movl %ebx, %r15d
subl %r13d, %r15d
subq $0x8, %rsp
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
pushq %r15
pushq %r11
pushq %r10
callq 0xdee5
addq $0x20, %rsp
jmp 0xbc17
movq 0x8(%rsp), %rdi
movq 0x28(%rdi), %rcx
movq 0x30(%rdi), %rsi
movq 0x38(%rsp), %r8
movl (%rcx,%r8,4), %r9d
leaq (,%r13,8), %r10
addq 0x40(%rdi), %r10
leaq (%rdx,%r13,4), %r11
movl (%rsi,%rbx,4), %r15d
movl %ebx, %ecx
subl %r13d, %ecx
subq $0x8, %rsp
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
pushq $-0x1
popq %r8
pushq %r15
pushq %rax
pushq 0x48(%rsp)
pushq %r10
pushq %r11
callq 0xe3c4
addq $0x30, %rsp
movq 0x40(%r14), %rdi
callq 0x4550
incq %rbx
movq 0x58(%rsp), %r12
jmp 0xb87b
pushq $0x48
popq %rbx
xorl %r15d, %r15d
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rax
movq 0x40(%rcx), %rcx
movslq (%rax,%r13,4), %rax
movq (%rcx,%r13,8), %rdi
cmpq %rax, %r15
jge 0xbc5f
movq (%rdi,%rbx), %rdi
callq 0x2040
incq %r15
addq $0x50, %rbx
jmp 0xbc33
callq 0x2040
movq 0x8(%rsp), %r14
movq 0x10(%r14), %rax
imulq $0x28, %r13, %rbx
movq 0x10(%rax,%rbx), %rdi
callq 0x2040
movq 0x10(%r14), %rax
movq 0x8(%rax,%rbx), %rdi
callq 0x2040
movq 0x10(%r14), %rax
movq 0x18(%rax,%rbx), %rdi
callq 0x2040
movq 0x10(%r14), %rax
movq 0x28(%rsp), %r14
movq 0x20(%rax,%rbx), %rdi
callq 0x2040
incq %r13
cmpq %r12, %r13
jl 0xbc2d
movq 0x38(%rsp), %rdx
incq %rdx
jmp 0xb849
movq 0x40(%rbx), %rdi
callq 0x2040
movq 0x18(%rbx), %rdi
callq 0x2040
movq 0x10(%rbx), %rdi
callq 0x2040
movq 0x30(%rsp), %rdi
callq 0x109cc
leaq 0x26a11(%rip), %rax     # 0x32700
cmpl $0x3, (%rax)
jl 0xc257
movq 0x262f9(%rip), %rax     # 0x31ff8
movq (%rax), %r14
callq 0x4521
leaq 0x26c22(%rip), %rbx     # 0x32930
subsd (%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
callq 0x44b8
movsd %xmm0, 0x20(%rsp)
callq 0x4521
subsd (%rbx), %xmm0
movsd 0x20(%rsp), %xmm1
divsd %xmm0, %xmm1
movq 0x8(%rsp), %rax
movl 0x8(%rax), %ecx
leaq 0x1cbf4(%rip), %rsi     # 0x28939
leaq 0x1cc15(%rip), %rdx     # 0x28961
movq %r14, %rdi
movq 0x8(%rsp), %rbx
movsd 0x10(%rsp), %xmm0
movb $0x2, %al
callq 0x2260
jmp 0xc257
movq %rax, 0x50(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movslq 0x48(%rax), %r15
leaq (%r15,%r15,2), %rax
movslq %ebx, %rdi
addq %rax, %rdi
pushq $0x4
popq %rsi
callq 0x2230
movl %ebx, %ecx
movq %rax, 0x48(%rsp)
leaq (%rax,%rcx,4), %rbp
leaq (,%r15,4), %rax
addq %rbp, %rax
movq %rax, 0x58(%rsp)
leaq (%rax,%r15,4), %rax
movq %rax, 0x30(%rsp)
xorl %ebx, %ebx
xorl %r15d, %r15d
movq %rbp, 0x28(%rsp)
movslq %r14d, %rax
cmpq %rax, %rbx
jge 0xc1d9
movslq %r15d, %r15
xorl %edx, %edx
movq %r15, 0x68(%rsp)
movq 0x8(%rsp), %r14
movq %rbx, 0x70(%rsp)
movq 0x28(%r14), %rax
movslq (%rax,%rbx,4), %rax
cmpq %rax, %rdx
jge 0xc166
movq 0x10(%r14), %rax
imulq $0x28, %r15, %rcx
movq %rcx, 0x78(%rsp)
movl (%rax,%rcx), %eax
movq 0x48(%rsp), %rcx
movq %rdx, 0x80(%rsp)
movl %eax, (%rcx,%rdx,4)
movq 0x18(%r14), %rax
andl $0x0, (%rax,%r15,4)
xorl %ebx, %ebx
xorl %eax, %eax
xorl %edx, %edx
movl $0x0, 0x40(%rsp)
movq %r15, 0x20(%rsp)
movq (%r14), %rcx
movslq 0x48(%rcx), %rcx
cmpq %rcx, %rdx
jge 0xbec9
leaq (%rbx,%rbp), %rdi
movq 0x10(%rsp), %rbp
movq (%rbp,%rbx,2), %rcx
pushq $0x4
popq %r12
movq %r12, %rsi
pushq $0x1
popq %r15
movq %rdx, 0x38(%rsp)
movq %r15, %rdx
callq 0x4592
movq 0x58(%rsp), %r13
leaq (%rbx,%r13), %rdi
movq (%rbp,%rbx,2), %rcx
movq %r12, %rsi
movq %r15, %rdx
callq 0x4592
movq 0x30(%rsp), %rax
leaq (%rax,%rbx), %rdi
movq (%rbp,%rbx,2), %rcx
movq 0x28(%rsp), %rbp
movq %r12, %rsi
movq %r15, %rdx
movq 0x20(%rsp), %r15
callq 0x4592
movq 0x18(%r14), %rcx
movl (%rcx,%r15,4), %eax
addl (%rbp,%rbx), %eax
movl %eax, (%rcx,%r15,4)
movl (%r13,%rbx), %ecx
movl 0x40(%rsp), %edx
cmpl %ecx, %edx
cmovlel %ecx, %edx
movl %edx, 0x40(%rsp)
movq 0x38(%rsp), %rdx
incq %rdx
addq $0x4, %rbx
jmp 0xbe24
movslq %eax, %rdi
pushq $0x50
popq %rsi
callq 0x2230
movq 0x40(%r14), %rcx
movq %rax, (%rcx,%r15,8)
xorl %r13d, %r13d
xorl %ecx, %ecx
movq (%r14), %rax
movslq 0x48(%rax), %rax
cmpq %rax, %r13
jge 0xbfb5
movslq %ecx, %rcx
movq %rcx, 0x38(%rsp)
imulq $0x50, %rcx, %rbx
xorl %r12d, %r12d
cmpl (%rbp,%r13,4), %r12d
jge 0xbfa5
movq 0x40(%r14), %rax
movq (%rax,%r15,8), %r15
leaq (%r15,%rbx), %rdi
movq 0x10(%rsp), %rax
movq (%rax,%r13,8), %rcx
pushq $0x50
popq %rsi
pushq $0x1
popq %rdx
callq 0x4592
movq (%r14), %rax
movq 0x50(%rax), %rax
movl (%rax,%r13,4), %eax
addl %eax, 0x8(%r15,%rbx)
movq 0x18(%rsp), %rax
testb $0x4, (%rax)
je 0xbf94
movq 0x10(%rsp), %rbp
movq (%rbp,%r13,8), %rcx
leaq 0x64(%rsp), %rdi
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
callq 0x4592
movl 0x64(%rsp), %r14d
movq %r14, %rdi
pushq $0x4
popq %rsi
callq 0x2230
movq %rax, 0x48(%r15,%rbx)
movl %r14d, (%rax)
movq (%rbp,%r13,8), %rcx
movq 0x28(%rsp), %rbp
movq %rax, %rdi
movq %r14, %rsi
movq 0x8(%rsp), %r14
pushq $0x4
popq %rdx
callq 0x4592
incq %r12
addq $0x50, %rbx
movq 0x20(%rsp), %r15
jmp 0xbf00
incq %r13
movq 0x38(%rsp), %rcx
addq %r12, %rcx
jmp 0xbee1
movq 0x18(%rsp), %rbx
testb $0x10, 0x1(%rbx)
jne 0xbff8
movq 0x10(%r14), %rax
movq 0x78(%rsp), %rcx
movl (%rax,%rcx), %edi
cmpl 0xb0(%rbx), %edi
jl 0xbff8
movq 0x18(%r14), %rax
movq 0x40(%r14), %rcx
movl (%rax,%r15,4), %esi
movq (%rcx,%r15,8), %rdx
movss 0xb4(%rbx), %xmm0
movl 0x64(%rbx), %ecx
movl 0x68(%rbx), %r8d
callq 0x14f4d
leaq (,%r15,4), %rax
movq 0x18(%r14), %rsi
movq %rax, %rbx
addq %rax, %rsi
movq 0x40(%r14), %rax
movq (%rax,%r15,8), %rdx
leaq 0x24(%rdx), %rax
xorl %ecx, %ecx
movq 0x50(%rsp), %r13
movslq (%rsi), %rdi
cmpq %rdi, %rcx
jge 0xc042
movq 0x24(%rax), %rdi
testq %rdi, %rdi
je 0xc032
andl $0x0, 0xc(%rdi)
andl $0x0, (%rax)
andl $0x0, 0x10(%rax)
incq %rcx
addq $0x50, %rax
jmp 0xc01d
movq 0x18(%rsp), %r12
movss 0x60(%r12), %xmm0
movq %r13, %rdi
callq 0x19a6a
movss 0x50(%r12), %xmm0
movl 0x54(%r12), %esi
movq 0x18(%r14), %rax
movq 0x40(%r14), %rcx
movl (%rax,%r15,4), %edx
movl 0x64(%r12), %r8d
addl %r8d, %r8d
addl 0x68(%r12), %r8d
movq (%rcx,%r15,8), %rcx
movl (%r12), %r9d
movl $0x20000000, %eax       # imm = 0x20000000
andl %eax, %r9d
movss 0x60(%r12), %xmm1
movq %r13, %rdi
callq 0x19686
movq (%r12), %rax
btl $0x17, %eax
jb 0xc108
movss 0x58(%r12), %xmm0
movq (%r14), %rax
movq 0x40(%r14), %r10
movq 0x28(%rax), %rax
movl 0x8(%rax), %esi
addl %esi, %esi
movl 0x5c(%r12), %edx
cvtsi2sdl 0x1c(%r12), %xmm1
mulsd 0x1c6b1(%rip), %xmm1    # 0x28780
cvttsd2si %xmm1, %r8d
addq 0x18(%r14), %rbx
subq $0x8, %rsp
movq %r13, %rdi
xorl %ecx, %ecx
movq %rbx, %r9
pushq (%r10,%r15,8)
callq 0x19dbc
popq %rax
popq %rcx
movq 0x18(%r14), %rax
movq 0x40(%r14), %rcx
movl (%rax,%r15,4), %edi
movq (%rcx,%r15,8), %rsi
callq 0x19c90
movq (%r12), %rax
movq 0x18(%r14), %rcx
movq 0x40(%r14), %rdx
movl (%rcx,%r15,4), %esi
movq (%rdx,%r15,8), %rdx
movl 0x34(%r12), %ecx
movl 0x64(%r12), %r8d
xorl %r10d, %r10d
movabsq $0x8000001000, %rdi     # imm = 0x8000001000
testq %rdi, %rax
setne %r10b
shrl $0x7, %eax
andl $0x1, %eax
movq %r13, %rdi
movl 0x40(%rsp), %r9d
pushq %rax
pushq %r10
callq 0x1a59c
popq %rax
popq %rcx
movq 0x80(%rsp), %rdx
incq %rdx
incq %r15
movq 0x70(%rsp), %rbx
jmp 0xbdd7
cmpl $0x2, %eax
jne 0xc1cd
movq 0x18(%rsp), %rax
cmpl $0x0, 0xb8(%rax)
js 0xc1cd
movq 0x18(%rsp), %rax
testb $0x4, (%rax)
je 0xc1cd
movq 0x18(%rsp), %rdx
movl 0x64(%rdx), %r8d
leal (%r8,%r8), %ecx
addl 0x68(%rdx), %ecx
movq 0x30(%rsp), %rax
movl (%rax), %esi
movq 0x68(%rsp), %r10
leaq (,%r10,4), %rax
addq 0x18(%r14), %rax
movl 0xbc(%rdx), %edx
shlq $0x3, %r10
addq 0x40(%r14), %r10
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %r9
pushq %r10
pushq %rax
callq 0xf826
popq %rax
popq %rcx
incq %rbx
movl 0xc(%r14), %r14d
jmp 0xbdb7
movq 0x48(%rsp), %rdi
callq 0x2040
movq 0x50(%rsp), %rdi
callq 0x109cc
movq 0x8(%rsp), %rbx
jmp 0xc261
movl %r13d, %r8d
shrl $0xd, %r8d
movq 0x10(%r14), %rsi
movq 0x20(%r14), %rax
movq (%rax), %rdi
movq %rbx, %r9
addq $0x8, %r9
movl %ebp, %edx
movl %r15d, %ecx
callq 0x11439
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0xc257
shrl $0xd, %r13d
orb %r13b, 0x10(%rsp)
movq %r14, (%rbx)
movq %rbx, 0x8(%rsp)
movl 0x8(%rbx), %edx
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %edx
imulq $0x28, %rdx, %rdx
cmpq %rcx, %rdx
je 0xc276
movl (%r14), %esi
leal 0x1(%rsi), %edi
movl %edi, (%r14)
movl %esi, 0x4(%rax,%rcx)
addq $0x28, %rcx
jmp 0xc23f
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x4(%r14), %ebp
movslq %ebp, %rdi
pushq $0x8
popq %rsi
callq 0x2230
movq 0x8(%rsp), %rcx
movq %rax, 0x48(%rcx)
xorl %ebx, %ebx
movslq %ebp, %rax
cmpq %rax, %rbx
jge 0xc2b3
callq 0x9a44
movq 0x8(%rsp), %rcx
movq 0x48(%rcx), %rcx
movq %rax, (%rcx,%rbx,8)
incq %rbx
movl 0x4(%r14), %ebp
jmp 0xc290
movq 0x8(%rsp), %rbx
movl 0x8(%rbx), %r15d
movslq %r15d, %r14
leaq (%r14,%r14,4), %rdi
pushq $0x4
popq %rsi
callq 0x2230
movq %rax, 0x18(%rbx)
leaq (%rax,%r14,4), %rax
movq %rax, 0x20(%rbx)
movq %rax, 0x28(%rsp)
leaq (%rax,%r14,4), %rax
movq %rax, 0x28(%rbx)
movq %rax, 0x40(%rsp)
leaq (%rax,%r14,4), %rax
movq %rax, 0x30(%rbx)
leaq (%rax,%r14,4), %rax
movq %rax, 0x38(%rbx)
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x2230
movq %rax, 0x40(%rbx)
xorl %ebx, %ebx
testl %r14d, %r14d
cmovlel %ebx, %r14d
imulq $0x28, %r14, %rax
movq %rax, 0x20(%rsp)
imulq $0x28, %r15, %rax
addq $-0x28, %rax
movq %rax, 0x18(%rsp)
pushq $0x1
popq %r12
xorl %r13d, %r13d
cmpq %rbx, 0x20(%rsp)
je 0xc1ed
cmpq %rbx, 0x18(%rsp)
setne %al
andb 0x10(%rsp), %al
cmpb $0x1, %al
jne 0xc384
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax,%rbx), %r14
movq 0x30(%rax,%rbx), %r15
movq %r14, %rdi
callq 0xcac0
movl %eax, %ebp
movq %r15, %rdi
callq 0xcac0
cmpl %eax, %ebp
jne 0xc384
movslq %ebp, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2080
testl %eax, %eax
je 0xc3ad
movl %r12d, %eax
subl %r13d, %eax
movq 0x8(%rsp), %rdx
movslq 0xc(%rdx), %rcx
movq 0x40(%rsp), %rsi
movl %eax, (%rsi,%rcx,4)
leal 0x1(%rcx), %eax
movl %eax, 0xc(%rdx)
movq 0x28(%rsp), %rax
movl %r13d, (%rax,%rcx,4)
movl %r12d, %r13d
addq $0x28, %rbx
incl %r12d
jmp 0xc32e
movl 0x4(%r14), %edi
movq 0x8(%rsp), %rbx
movslq 0xc(%rbx), %rcx
leaq 0x31e(%rip), %rsi       # 0xc6eb
movq %rbx, %rdx
callq 0x10558
jmp 0xc261
leaq 0x1c536(%rip), %rdi     # 0x28917
leaq 0x1c423(%rip), %rsi     # 0x2880b
leaq 0x1c201(%rip), %rcx     # 0x285f0
movl $0x263, %edx            # imm = 0x263
callq 0x21a0