// File: /workspace/github_c_makefile_star2_O3/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, %r13
movq %rdi, %rbx
cmpl $0x2, %esi
movq %rdx, 0x8(%rsp)
je 0xcdf1
cmpl $0x1, %esi
je 0xcd9d
testl %esi, %esi
jne 0xd443
movq 0x18(%rbx), %rax
movq (%rax), %r14
movl %r14d, %eax
andl $0x18, %eax
xorl %ebp, %ebp
cmpl $0x8, %eax
sete %bpl
movl %r14d, %r15d
shrl $0x19, %r15d
andl $0x1, %r15d
movl 0x8(%rbx), %r12d
cmpl $0x2, %r12d
setge 0x10(%rsp)
andl $0x2000, %r14d          # imm = 0x2000
movl $0x1, %edi
movl $0x50, %esi
callq 0x2230
movq %rax, %r13
cmpl $0x2, %r12d
jl 0xd396
movq 0x10(%rbx), %rdx
movq 0x20(%rbx), %rsi
movq %r13, %r9
addq $0x8, %r9
movl %r12d, %edi
movl %ebp, %ecx
movl %r15d, %r8d
callq 0x13569
jmp 0xd3b9
cmpl $0x0, 0x48(%rbx)
jle 0xd44b
movq (%r13), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x28(%rsp)
movq 0x60(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x1252f
movq %rax, 0x70(%rsp)
movslq 0xc(%r13), %rbx
testq %rbx, %rbx
jle 0xd466
movq 0x28(%r13), %rax
xorl %ecx, %ecx
xorl %ebp, %ebp
movl (%rax,%rcx,4), %edx
cmpl %edx, %ebp
cmovlel %edx, %ebp
incq %rcx
cmpq %rcx, %rbx
jne 0xcddc
jmp 0xd468
movq 0x28(%rbx), %rax
movq %rax, 0x28(%rsp)
cmpl $0x0, 0x4(%rbx)
movq %rbx, %r14
jle 0xce1e
xorl %ebx, %ebx
movq 0x48(%r13), %rax
movq (%rax,%rbx,8), %rdi
callq 0xad00
incq %rbx
movslq 0x4(%r14), %rax
cmpq %rax, %rbx
jl 0xce05
movq 0x48(%r13), %rdi
callq 0x2040
movq 0x18(%r14), %rax
testb $0x40, (%rax)
movq %r14, %rbx
je 0xce4b
leaq 0x29aee(%rip), %rax     # 0x36928
testb $0x1, (%rax)
jne 0xce4b
callq 0x1252f
movq %rax, 0x38(%rsp)
jmp 0xce54
movq $0x0, 0x38(%rsp)
cmpl $0x0, 0xc(%r13)
jle 0xd354
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rsp)
xorl %r12d, %r12d
movq %rbx, 0x10(%rsp)
movq 0x28(%r13), %rax
movslq (%rax,%r12,4), %rcx
testq %rcx, %rcx
jle 0xd33f
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
movq %r12, 0x40(%rsp)
movslq (%rax,%r12,4), %r13
movq %rcx, %rax
movq %rcx, 0x58(%rsp)
addq %r13, %rax
movq %rax, 0x50(%rsp)
cltq
movq %rax, 0x60(%rsp)
movq %r13, %r12
leaq (%r12,%r12,4), %rdx
shlq $0x3, %rdx
movq 0x18(%rbx), %rax
movq 0x8(%rsp), %rcx
addq 0x10(%rcx), %rdx
movq %rdx, 0x18(%rsp)
cmpq $0x0, 0x100(%rax)
je 0xcedb
cmpl $0x0, 0x48(%rbx)
je 0xd0a2
movq (%rax), %rax
btq $0x28, %rax
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rdx
movl (%rdx,%r12,4), %ecx
jb 0xd023
testl %ecx, %ecx
jle 0xd18e
movl %r12d, %eax
subl %r13d, %eax
movq %rax, 0x30(%rsp)
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rsi
movq (%rsi,%r12,8), %rcx
testb $0x10, 0x3d(%rcx,%r14)
je 0xcf33
movl (%rcx,%r14), %eax
cmpl 0x20(%rcx,%r14), %eax
jne 0xdaa4
movq 0x10(%rsp), %rbx
movq 0x18(%rbx), %rax
movq (%rax), %rax
btl $0xe, %eax
jae 0xcf54
movl (%rcx,%r14), %edi
cmpl 0x20(%rcx,%r14), %edi
jne 0xd005
testb $0x8, %al
jne 0xcfa3
addq %r14, %rcx
movq 0x8(%rsp), %rbp
movq 0x28(%rbp), %rdx
movq 0x30(%rbp), %rsi
movl (%rsi,%r12,4), %r10d
movq 0x40(%rsp), %rsi
movl (%rdx,%rsi,4), %r11d
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x40(%rsp), %r8
movq %rax, %r9
pushq 0x38(%rsp)
pushq %r11
pushq %r10
callq 0xf8c5
addq $0x20, %rsp
jmp 0xcff8
movq 0x8(%rsp), %rbp
movq 0x28(%rbp), %rcx
movq 0x30(%rbp), %rdi
movq 0x40(%rsp), %r8
movl (%rcx,%r8,4), %r9d
leaq (%rdx,%r13,4), %r10
leaq (%rsi,%r13,8), %r11
movl (%rdi,%r12,4), %ebx
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x38(%rsp), %rcx
movl %r15d, %r8d
pushq %rbx
movq 0x20(%rsp), %rbx
pushq %rax
pushq 0x50(%rsp)
pushq %r11
pushq %r10
callq 0xfdc7
addq $0x30, %rsp
movq 0x40(%rbx), %rdi
callq 0x5804
movq 0x18(%rbp), %rdx
incq %r15
movslq (%rdx,%r12,4), %rax
addq $0x50, %r14
cmpq %rax, %r15
movq 0x8(%rsp), %rax
jl 0xcf14
jmp 0xd266
testl %ecx, %ecx
movq 0x8(%rsp), %rcx
jle 0xd266
xorl %ebx, %ebx
xorl %r14d, %r14d
movq 0x40(%rcx), %rax
movq (%rax,%r12,8), %rcx
movl (%rcx,%rbx), %eax
cmpl 0x20(%rcx,%rbx), %eax
jne 0xd084
movl 0x3c(%rcx,%rbx), %eax
movl $0xfe, %edx
andl %edx, %eax
cmpl $0xa, %eax
jb 0xd084
addq %rbx, %rcx
movq 0x20(%rsp), %r15
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0xea93
cmpq $0x0, (%r15)
je 0xd084
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x5804
incq %r14
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rax
movslq (%rax,%r12,4), %rax
addq $0x50, %rbx
cmpq %rax, %r14
jl 0xd035
jmp 0xd266
leaq (,%r12,4), %r15
movq 0x8(%rsp), %rbp
movq 0x18(%rbp), %rdi
addq %r15, %rdi
movq 0x58(%rbx), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x5816
movq 0x30(%rbp), %rdi
addq %r15, %rdi
movq 0x58(%rbx), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x5816
addq 0x38(%rbp), %r15
movq 0x58(%rbx), %rcx
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rdi
callq 0x5816
movq 0x18(%rbp), %rax
cmpl $0x0, (%rax,%r12,4)
jle 0xd266
xorl %ebx, %ebx
xorl %r14d, %r14d
movq 0x40(%rbp), %rax
movq (%rax,%r12,8), %r15
leaq (%r15,%rbx), %rdi
movq 0x10(%rsp), %rbp
movq 0x58(%rbp), %rcx
movl $0x50, %esi
movl $0x1, %edx
callq 0x5816
movq 0x18(%rbp), %rax
testb $0x4, (%rax)
je 0xd170
movq 0x48(%r15,%rbx), %rdi
movq 0x10(%rsp), %rbp
movq 0x58(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x5816
movq 0x48(%r15,%rbx), %rdi
movl (%rdi), %esi
movq 0x58(%rbp), %rcx
movl $0x4, %edx
callq 0x5816
incq %r14
movq 0x8(%rsp), %rbp
movq 0x18(%rbp), %rax
movslq (%rax,%r12,4), %rax
addq $0x50, %rbx
cmpq %rax, %r14
jl 0xd111
jmp 0xd266
btl $0x1b, %eax
setae %cl
movl %eax, %esi
andl $0x40000008, %esi       # imm = 0x40000008
cmpl $0x8, %esi
setne %sil
testb %sil, %cl
jne 0xd266
testb $0x8, %al
jne 0xd1fc
movq 0x8(%rsp), %rdx
movq 0x28(%rdx), %rcx
movq 0x30(%rdx), %rdx
movl (%rdx,%r12,4), %r10d
movq 0x40(%rsp), %rdx
movl (%rcx,%rdx,4), %r11d
movl %r12d, %ebx
subl %r13d, %ebx
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x20(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
pushq %rbx
pushq %r11
pushq %r10
callq 0xf8c5
addq $0x20, %rsp
jmp 0xd258
movq 0x8(%rsp), %rdi
movq 0x28(%rdi), %rcx
movq 0x30(%rdi), %rsi
movq 0x40(%rsp), %r8
movl (%rcx,%r8,4), %r9d
leaq (,%r13,8), %r10
addq 0x40(%rdi), %r10
leaq (%rdx,%r13,4), %r11
movl (%rsi,%r12,4), %ebx
movl %r12d, %ecx
subl %r13d, %ecx
subq $0x8, %rsp
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x20(%rsp), %rdx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
pushq %rbx
pushq %rax
pushq 0x50(%rsp)
pushq %r10
pushq %r11
callq 0xfdc7
addq $0x30, %rsp
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x5804
incq %r12
cmpq 0x60(%rsp), %r12
movq 0x10(%rsp), %rbx
jl 0xcead
cmpl $0x0, 0x58(%rsp)
movq 0x40(%rsp), %r12
jle 0xd33f
movq 0x8(%rsp), %r15
movq 0x18(%r15), %rax
cmpl $0x0, (%rax,%r13,4)
jle 0xd2c6
movl $0x48, %ebx
xorl %r14d, %r14d
movq 0x40(%r15), %rax
movq (%rax,%r13,8), %rax
movq (%rax,%rbx), %rdi
callq 0x2040
incq %r14
movq 0x18(%r15), %rax
movslq (%rax,%r13,4), %rax
addq $0x50, %rbx
cmpq %rax, %r14
jl 0xd2a1
movq 0x40(%r15), %rax
movq (%rax,%r13,8), %rdi
callq 0x2040
movq 0x10(%r15), %rax
leaq (,%r13,8), %rcx
leaq (%rcx,%rcx,4), %rbx
movq 0x10(%rax,%rbx), %rdi
callq 0x2040
movq 0x10(%r15), %rax
movq 0x8(%rax,%rbx), %rdi
callq 0x2040
movq 0x10(%r15), %rax
movq 0x18(%rax,%rbx), %rdi
testq %rdi, %rdi
je 0xd312
callq 0x2040
movq 0x10(%r15), %rax
leaq (,%r13,4), %rcx
addq %r13, %rcx
movq 0x20(%rax,%rcx,8), %rdi
testq %rdi, %rdi
movq 0x10(%rsp), %rbx
je 0xd331
callq 0x2040
incq %r13
cmpq 0x50(%rsp), %r13
jl 0xd289
incq %r12
movq 0x8(%rsp), %r13
movslq 0xc(%r13), %rax
cmpq %rax, %r12
jl 0xce70
movq 0x40(%r13), %rdi
callq 0x2040
movq 0x18(%r13), %rdi
callq 0x2040
movq 0x10(%r13), %rdi
callq 0x2040
movq 0x38(%rsp), %rdi
callq 0x12549
leaq 0x29380(%rip), %rax     # 0x36700
cmpl $0x3, (%rax)
jl 0xd43b
movq %r13, %rdi
callq 0x2fbf
jmp 0xd43b
movl %r14d, %r8d
shrl $0xd, %r8d
movq 0x10(%rbx), %rsi
movq 0x20(%rbx), %rax
movq (%rax), %rdi
movq %r13, %r9
addq $0x8, %r9
movl %ebp, %edx
movl %r15d, %ecx
callq 0x1307e
movq %rax, 0x10(%r13)
testq %rax, %rax
je 0xd43b
movq %rbx, (%r13)
movslq 0x8(%r13), %rdi
testq %rdi, %rdi
jle 0xd3f0
movl (%rbx), %ecx
leaq (,%rdi,8), %rdx
leaq (%rdx,%rdx,4), %rdx
xorl %esi, %esi
movl %ecx, 0x4(%rax,%rsi)
incl %ecx
addq $0x28, %rsi
cmpq %rsi, %rdx
jne 0xd3df
movl %ecx, (%rbx)
movq %r14, %r12
movq %rdi, %r14
movslq 0x4(%rbx), %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x2230
movq %rax, 0x48(%r13)
testq %r15, %r15
jle 0xd920
movq %rbx, %r14
xorl %ebx, %ebx
callq 0xacd4
movq 0x48(%r13), %rcx
movq %rax, (%rcx,%rbx,8)
incq %rbx
movslq 0x4(%r14), %rax
cmpq %rax, %rbx
jl 0xd419
movl 0x8(%r13), %r15d
jmp 0xd923
movq %r13, %rdi
callq 0x2040
xorl %r13d, %r13d
jmp 0xda8f
movl 0x4(%rbx), %edi
movslq 0xc(%r13), %rcx
leaq 0x8ac(%rip), %rsi       # 0xdd05
movq %r13, %rdx
callq 0x120b0
jmp 0xda8f
xorl %ebp, %ebp
movq (%r13), %rax
movslq 0x48(%rax), %r15
leaq (%r15,%r15,2), %rax
movslq %ebp, %rdi
addq %rax, %rdi
movl $0x4, %esi
callq 0x2230
movq %rax, 0x48(%rsp)
testl %ebx, %ebx
jle 0xd907
movl %ebp, %eax
movq 0x48(%rsp), %rcx
leaq (%rcx,%rax,4), %rcx
leaq (%rcx,%r15,4), %rdx
leaq (%rdx,%r15,4), %rax
movq %rax, 0x40(%rsp)
xorl %r12d, %r12d
xorl %ebp, %ebp
movq %rcx, 0x20(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x28(%r13), %rax
cmpl $0x0, (%rax,%r12,4)
jle 0xd8f7
movslq %ebp, %rbp
movq %rbp, 0x78(%rsp)
xorl %edx, %edx
movq %r12, 0x80(%rsp)
movq 0x10(%r13), %rax
leaq (,%rbp,4), %rcx
addq %rbp, %rcx
movq %rcx, 0x58(%rsp)
movl (%rax,%rcx,8), %eax
movq 0x48(%rsp), %rcx
movq %rdx, 0x60(%rsp)
movl %eax, (%rcx,%rdx,4)
movq 0x18(%r13), %rax
movl $0x0, (%rax,%rbp,4)
movq (%r13), %rax
cmpl $0x0, 0x48(%rax)
movq %rbp, 0x18(%rsp)
jle 0xd5ca
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %ecx, %ecx
movq 0x20(%rsp), %rbx
movl %ecx, 0x30(%rsp)
leaq (%rbx,%r15), %rdi
movq 0x10(%rsp), %rbp
movq (%rbp,%r15,2), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x5828
movq 0x38(%rsp), %r14
leaq (%r14,%r15), %rdi
movq (%rbp,%r15,2), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x5828
movq 0x40(%rsp), %rax
leaq (%rax,%r15), %rdi
movq (%rbp,%r15,2), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x5828
movslq (%rbx,%r15), %rax
movq 0x18(%r13), %rcx
movq 0x18(%rsp), %rdx
movslq (%rcx,%rdx,4), %rdi
addq %rax, %rdi
movl %edi, (%rcx,%rdx,4)
movl (%r14,%r15), %ecx
movl 0x30(%rsp), %eax
cmpl %ecx, %eax
cmovgl %eax, %ecx
incq %r12
movq (%r13), %rax
movslq 0x48(%rax), %rax
addq $0x4, %r15
cmpq %rax, %r12
jl 0xd528
movl %ecx, 0x50(%rsp)
movq 0x18(%rsp), %rbp
jmp 0xd5d9
xorl %edi, %edi
movl $0x0, 0x50(%rsp)
movq 0x20(%rsp), %rbx
movl $0x50, %esi
callq 0x2230
movq 0x40(%r13), %rcx
movq %rax, (%rcx,%rbp,8)
movq (%r13), %rax
cmpl $0x0, 0x48(%rax)
jle 0xd6dd
xorl %ebp, %ebp
xorl %edx, %edx
cmpl $0x0, (%rbx,%rbp,4)
jle 0xd6cd
movl %edx, 0x30(%rsp)
movslq %edx, %rax
shlq $0x4, %rax
leaq (%rax,%rax,4), %r12
xorl %r15d, %r15d
movq 0x40(%r13), %rax
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rbx
leaq (%rbx,%r12), %rdi
movq 0x10(%rsp), %rax
movq (%rax,%rbp,8), %rcx
movl $0x50, %esi
movl $0x1, %edx
callq 0x5828
movq (%r13), %rax
movq 0x50(%rax), %rax
movl (%rax,%rbp,4), %eax
addl %eax, 0x8(%rbx,%r12)
movq 0x28(%rsp), %rax
testb $0x4, (%rax)
je 0xd6ac
movq 0x10(%rsp), %r14
movq (%r14,%rbp,8), %rcx
movl $0x4, %esi
movl $0x1, %edx
leaq 0x6c(%rsp), %rdi
callq 0x5828
movl 0x6c(%rsp), %r13d
movl $0x4, %esi
movq %r13, %rdi
callq 0x2230
movq %rax, 0x48(%rbx,%r12)
movl %r13d, (%rax)
movq (%r14,%rbp,8), %rcx
movl $0x4, %edx
movq %rax, %rdi
movq %r13, %rsi
movq 0x8(%rsp), %r13
callq 0x5828
incl %r15d
addq $0x50, %r12
movq 0x20(%rsp), %rbx
cmpl (%rbx,%rbp,4), %r15d
jl 0xd619
movl 0x30(%rsp), %edx
addl %r15d, %edx
movq (%r13), %rax
incq %rbp
movslq 0x48(%rax), %rcx
cmpq %rcx, %rbp
jl 0xd5fd
movq 0x28(%rsp), %r15
testb $0x10, 0x1(%r15)
movq 0x18(%rsp), %rbp
jne 0xd728
movq 0x10(%r13), %rax
movq 0x58(%rsp), %rcx
movl (%rax,%rcx,8), %edi
cmpl 0xb0(%r15), %edi
jl 0xd728
movq 0x18(%r13), %rax
movq 0x40(%r13), %rcx
movl (%rax,%rbp,4), %esi
movq (%rcx,%rbp,8), %rdx
movss 0xb4(%r15), %xmm0
movl 0x64(%r15), %ecx
movl 0x68(%r15), %r8d
callq 0x17273
movq 0x18(%r13), %rax
movq 0x40(%r13), %rcx
leaq (%rax,%rbp,4), %rsi
cmpl $0x0, (%rsi)
movq (%rcx,%rbp,8), %rdx
movq 0x70(%rsp), %rbx
movl $0x0, %r8d
movq 0x80(%rsp), %r12
jle 0xd77c
leaq 0x48(%rdx), %rax
xorl %ecx, %ecx
movq (%rax), %rdi
testq %rdi, %rdi
je 0xd765
movl $0x0, 0xc(%rdi)
movl %r8d, -0x24(%rax)
movl %r8d, -0x14(%rax)
incq %rcx
movslq (%rsi), %rdi
addq $0x50, %rax
cmpq %rdi, %rcx
jl 0xd756
movss 0x60(%r15), %xmm0
movq %rbx, %rdi
callq 0x1c493
movss 0x50(%r15), %xmm0
movl 0x54(%r15), %esi
movq 0x18(%r13), %rax
movq 0x40(%r13), %rcx
movl (%rax,%rbp,4), %edx
movl 0x64(%r15), %r8d
addl %r8d, %r8d
addl 0x68(%r15), %r8d
movq (%rcx,%rbp,8), %rcx
movl (%r15), %r9d
movl $0x20000000, %eax       # imm = 0x20000000
andl %eax, %r9d
movss 0x60(%r15), %xmm1
movq %rbx, %rdi
callq 0x1bfdc
movq (%r15), %rax
btl $0x17, %eax
jb 0xd83a
movss 0x58(%r15), %xmm0
movq (%r13), %rax
movq 0x40(%r13), %r10
movq 0x28(%rax), %rax
movl 0x8(%rax), %esi
xorps %xmm1, %xmm1
cvtsi2sdl 0x1c(%r15), %xmm1
addl %esi, %esi
mulsd 0x1ff88(%rip), %xmm1    # 0x2d780
cvttsd2si %xmm1, %r8d
movl 0x5c(%r15), %edx
leaq (,%rbp,4), %r9
addq 0x18(%r13), %r9
subq $0x8, %rsp
movq %rbx, %rdi
xorl %ecx, %ecx
pushq (%r10,%rbp,8)
callq 0x1c811
addq $0x10, %rsp
movq 0x18(%r13), %rax
movq 0x40(%r13), %rcx
movl (%rax,%rbp,4), %edi
movq (%rcx,%rbp,8), %rsi
callq 0x1c6d6
movq (%r15), %rax
movq 0x18(%r13), %rcx
movq 0x40(%r13), %rdx
movl (%rcx,%rbp,4), %esi
movq (%rdx,%rbp,8), %rdx
movl 0x34(%r15), %ecx
movl 0x64(%r15), %r8d
xorl %r10d, %r10d
movabsq $0x8000001000, %rdi     # imm = 0x8000001000
testq %rdi, %rax
setne %r10b
shrl $0x7, %eax
andl $0x1, %eax
movq %rbx, %rdi
movl 0x50(%rsp), %r9d
pushq %rax
pushq %r10
callq 0x1d0a4
addq $0x10, %rsp
movq 0x60(%rsp), %rdx
incq %rdx
incq %rbp
movq 0x28(%r13), %rax
movslq (%rax,%r12,4), %rax
cmpq %rax, %rdx
jl 0xd4d9
cmpl $0x2, %eax
jne 0xd8f7
cmpl $0x0, 0xb8(%r15)
movq 0x40(%rsp), %rax
js 0xd8f7
testb $0x4, (%r15)
je 0xd8f7
movl 0x64(%r15), %r8d
leal (%r8,%r8), %ecx
addl 0x68(%r15), %ecx
movl (%rax), %esi
movq 0x78(%rsp), %r10
leaq (,%r10,4), %rax
addq 0x18(%r13), %rax
movl 0xbc(%r15), %edx
shlq $0x3, %r10
addq 0x40(%r13), %r10
movq %rbx, %rdi
movq 0x48(%rsp), %r9
pushq %r10
pushq %rax
callq 0x1130e
addq $0x10, %rsp
incq %r12
movslq 0xc(%r13), %rax
cmpq %rax, %r12
jl 0xd4b8
movq 0x48(%rsp), %rdi
callq 0x2040
movq 0x70(%rsp), %rdi
callq 0x12549
jmp 0xda8f
movq %r14, %r15
leal (%r15,%r15,4), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x2230
movq %rax, 0x18(%r13)
movslq %r15d, %r14
leaq (%rax,%r14,4), %rax
movq %rax, 0x20(%r13)
movq %rax, 0x28(%rsp)
leaq (%rax,%r14,4), %rax
movq %rax, 0x28(%r13)
movq %rax, 0x20(%rsp)
leaq (%rax,%r14,4), %rax
movq %rax, 0x30(%r13)
leaq (%rax,%r14,4), %rax
movq %rax, 0x38(%r13)
movl $0x8, %ebx
movl $0x8, %esi
movq %r14, %rdi
callq 0x2230
movq %rax, 0x40(%r13)
testl %r14d, %r14d
jle 0xda8f
movq %r13, 0x8(%rsp)
shrl $0xd, %r12d
orb %r12b, 0x10(%rsp)
movl %r15d, %eax
movq %rax, 0x18(%rsp)
incl %r15d
xorl %r13d, %r13d
movl $0x1, %ebp
movq %r15, %rsi
movq %r15, 0x30(%rsp)
cmpq %rbp, 0x18(%rsp)
setne %al
andb 0x10(%rsp), %al
cmpb $0x1, %al
jne 0xda52
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax,%rbx), %r14
movq 0x28(%rax,%rbx), %r15
movq %r14, %rdi
callq 0x2130
cmpl $0x3, %eax
jl 0xda00
movl %eax, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
addl %edx, %ecx
movb (%r14,%rcx), %cl
addb $-0x30, %cl
cmpb $0x9, %cl
ja 0xda00
leal -0x2(%rax), %r12d
cmpb $0x2f, (%r14,%r12)
je 0xda03
movl %eax, %r12d
movq %r15, %rdi
callq 0x2130
cmpl $0x3, %eax
jl 0xda2f
movl %eax, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
addl %edx, %ecx
movb (%r15,%rcx), %cl
addb $-0x30, %cl
cmpb $0x9, %cl
ja 0xda2f
leal -0x2(%rax), %ecx
cmpb $0x2f, (%r15,%rcx)
je 0xda31
movl %eax, %ecx
cmpl %ecx, %r12d
movq 0x30(%rsp), %rsi
jne 0xda52
movslq %r12d, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2080
movq 0x30(%rsp), %rsi
testl %eax, %eax
je 0xda7a
movl %ebp, %eax
subl %r13d, %eax
movq 0x8(%rsp), %rdx
movslq 0xc(%rdx), %rcx
movq 0x20(%rsp), %rdi
movl %eax, (%rdi,%rcx,4)
leal 0x1(%rcx), %eax
movl %eax, 0xc(%rdx)
movq 0x28(%rsp), %rax
movl %r13d, (%rax,%rcx,4)
movl %ebp, %r13d
incq %rbp
addq $0x28, %rbx
cmpq %rbp, %rsi
jne 0xd9ad
movq 0x8(%rsp), %r13
movq %r13, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1fe6c(%rip), %rdi     # 0x2d917
leaq 0x1fd59(%rip), %rsi     # 0x2d80b
leaq 0x1fb37(%rip), %rcx     # 0x2d5f0
movl $0x263, %edx            # imm = 0x263
callq 0x21a0