// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x12244
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rcx
andq $0x8, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0xa9(%rbp)
je 0x11f08
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
andq $0x10, %rax
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
movb %al, -0xa9(%rbp)
movb -0xa9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x54(%rbp)
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
andq $0x2000000, %rax        # imm = 0x2000000
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x58(%rbp)
movq -0x50(%rbp), %rcx
movb $0x1, %al
cmpl $0x1, 0x8(%rcx)
movb %al, -0xaa(%rbp)
jg 0x11f6e
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
andq $0x2000, %rax           # imm = 0x2000
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
movb %al, -0xaa(%rbp)
movb -0xaa(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x5c(%rbp)
movl $0x1, %edi
movl $0x50, %esi
callq 0x2220
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jle 0x11fd1
movq -0x50(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdx
movl -0x54(%rbp), %ecx
movl -0x58(%rbp), %r8d
movq -0x68(%rbp), %r9
addq $0x8, %r9
callq 0x1c2e0
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x12006
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rdi
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x54(%rbp), %edx
movl -0x58(%rbp), %ecx
movl -0x5c(%rbp), %r8d
movq -0x68(%rbp), %r9
addq $0x8, %r9
callq 0x1bc10
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x68(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x12236
movq -0x50(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x68(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x12061
movq -0x50(%rbp), %rax
movl (%rax), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, (%rax)
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x12027
movq -0x50(%rbp), %rax
movslq 0x4(%rax), %rdi
movl $0x8, %esi
callq 0x2220
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x48(%rax)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x50(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x120b4
callq 0xf000
movq %rax, %rdx
movq -0x68(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x12085
movq -0x68(%rbp), %rax
imull $0x5, 0x8(%rax), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x2220
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x68(%rbp), %rax
movslq 0x8(%rax), %rax
shlq $0x2, %rax
addq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x68(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x68(%rbp), %rax
movslq 0x8(%rax), %rax
shlq $0x2, %rax
addq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x68(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x68(%rbp), %rax
movslq 0x8(%rax), %rax
shlq $0x2, %rax
addq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x68(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x68(%rbp), %rax
movslq 0x8(%rax), %rax
shlq $0x2, %rax
addq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x68(%rbp), %rax
movslq 0x8(%rax), %rdi
movl $0x8, %esi
callq 0x2220
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x40(%rax)
movl $0x1, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x3c(%rbp), %eax
movq -0x68(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jg 0x12229
movl -0x3c(%rbp), %eax
movq -0x68(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x121da
cmpl $0x0, -0x5c(%rbp)
je 0x121da
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
callq 0x132b0
cmpl $0x0, %eax
jne 0x12219
movl -0x3c(%rbp), %edx
subl -0x40(%rbp), %edx
movq -0x68(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x68(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x40(%rbp), %edx
movq -0x68(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x68(%rbp), %rsi
movl 0xc(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0xc(%rsi)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x3c(%rbp), %eax
movl %eax, -0x40(%rbp)
jmp 0x1221b
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1217b
movq -0x68(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x12b8e
movq -0x68(%rbp), %rdi
callq 0x2040
jmp 0x12b86
cmpl $0x1, -0x2c(%rbp)
jne 0x1228b
movq -0x50(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jle 0x1225f
movq -0x38(%rbp), %rdi
callq 0x13310
jmp 0x1227e
movq -0x50(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x38(%rbp), %rdx
movq -0x38(%rbp), %rax
movslq 0xc(%rax), %rcx
leaq 0x1807(%rip), %rsi      # 0x13a80
callq 0x19fc0
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x12b8e
cmpl $0x2, -0x2c(%rbp)
jne 0x12b82
movq $0x0, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x80(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x50(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x122e4
movq -0x78(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xf050
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x122b8
movq -0x78(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x2040
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x12320
leaq 0x4c62b(%rip), %rax     # 0x5e938
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x12320
callq 0x1a820
movq %rax, -0x70(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x78(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x12ab9
movq -0x78(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x44(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x84(%rbp)
movq -0x78(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x44(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x78(%rbp), %rcx
movq 0x28(%rcx), %rcx
movslq -0x44(%rbp), %rdx
addl (%rcx,%rdx,4), %eax
movl %eax, -0x88(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x88(%rbp), %eax
jge 0x1297e
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0x100(%rax)
je 0x1251b
movq -0x50(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jne 0x1251b
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rdi
movslq -0x3c(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x50(%rbp), %rax
movq 0x58(%rax), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x5560
movq -0x78(%rbp), %rax
movq 0x30(%rax), %rdi
movslq -0x3c(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x50(%rbp), %rax
movq 0x58(%rax), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x5560
movq -0x78(%rbp), %rax
movq 0x38(%rax), %rdi
movslq -0x3c(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x50(%rbp), %rax
movq 0x58(%rax), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x5560
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x78(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq -0x3c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x12516
movq -0x78(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
movq -0x50(%rbp), %rax
movq 0x58(%rax), %rcx
movl $0x50, %esi
movl $0x1, %edx
callq 0x5560
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
andq $0x4, %rax
cmpq $0x0, %rax
je 0x12506
movq -0x98(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x50(%rbp), %rax
movq 0x58(%rax), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x5560
movq -0x98(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x98(%rbp), %rax
movq 0x48(%rax), %rax
movl (%rax), %eax
movl %eax, %esi
movq -0x50(%rbp), %rax
movq 0x58(%rax), %rcx
movl $0x4, %edx
callq 0x5560
jmp 0x12508
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1244b
jmp 0x1296e
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rcx
movabsq $0x10000000000, %rax    # imm = 0x10000000000
andq (%rcx), %rax
cmpq $0x0, %rax
je 0x125f2
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x78(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq -0x3c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x125ed
movq -0x78(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movl (%rax), %eax
movq -0xa0(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jne 0x125a4
movq -0xa0(%rbp), %rax
movl 0x3c(%rax), %eax
andl $0xff, %eax
cmpl $0xa, %eax
jge 0x125a6
jmp 0x125df
movq -0x50(%rbp), %rdi
addq $0x30, %rdi
movq -0x80(%rbp), %rsi
movq -0x90(%rbp), %rdx
movq -0xa0(%rbp), %rcx
callq 0x14c50
movq -0x50(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jbe 0x125dd
movq -0x50(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x5520
jmp 0x125df
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x12541
jmp 0x1296c
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x3c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jle 0x127fb
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x78(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq -0x3c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x127f6
movq -0x78(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movl 0x3c(%rax), %eax
shrl $0xc, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x12673
movq -0xa8(%rbp), %rax
movl (%rax), %eax
movq -0xa8(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jne 0x12675
jmp 0x12694
leaq 0x44e83(%rip), %rdi     # 0x574ff
leaq 0x44d70(%rip), %rsi     # 0x573f3
movl $0x263, %edx            # imm = 0x263
leaq 0x44b49(%rip), %rcx     # 0x571d8
callq 0x21a0
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
andq $0x4000, %rax           # imm = 0x4000
cmpq $0x0, %rax
je 0x126c5
movq -0xa8(%rbp), %rax
movl (%rax), %eax
movq -0xa8(%rbp), %rcx
cmpl 0x20(%rcx), %eax
je 0x126c5
jmp 0x127e8
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
andq $0x8, %rax
cmpq $0x0, %rax
je 0x12777
movq -0x50(%rbp), %rdi
addq $0x30, %rdi
movq -0x80(%rbp), %rsi
movq -0x90(%rbp), %rdx
movl -0x3c(%rbp), %ecx
subl -0x84(%rbp), %ecx
movl -0x40(%rbp), %r8d
movq -0x78(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x44(%rbp), %r9
movl (%rax,%r9,4), %r9d
movq -0x78(%rbp), %rax
movq 0x18(%rax), %r14
movslq -0x84(%rbp), %rax
shlq $0x2, %rax
addq %rax, %r14
movq -0x78(%rbp), %rax
movq 0x40(%rax), %rbx
movslq -0x84(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rbx
movq -0x70(%rbp), %r11
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %r10
movq -0x78(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x3c(%rbp), %r15
movl (%rax,%r15,4), %eax
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movl %eax, 0x20(%rsp)
callq 0x15c60
jmp 0x127db
movq -0x50(%rbp), %rdi
addq $0x30, %rdi
movq -0x80(%rbp), %rsi
movq -0x90(%rbp), %rdx
movq -0xa8(%rbp), %rcx
movq -0x70(%rbp), %r8
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %r9
movq -0x78(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x3c(%rbp), %r10
movl (%rax,%r10,4), %r11d
movq -0x78(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x44(%rbp), %r10
movl (%rax,%r10,4), %r10d
movl -0x3c(%rbp), %eax
subl -0x84(%rbp), %eax
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x154b0
movq -0x50(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x5520
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1260f
jmp 0x1296a
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
andq $0x8000000, %rax        # imm = 0x8000000
cmpq $0x0, %rax
jne 0x12846
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
andq $0x8, %rax
cmpq $0x0, %rax
je 0x12968
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
jne 0x12968
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
andq $0x8, %rax
cmpq $0x0, %rax
je 0x128fa
movq -0x50(%rbp), %rdi
addq $0x30, %rdi
movq -0x80(%rbp), %rsi
movq -0x90(%rbp), %rdx
movl -0x3c(%rbp), %ecx
subl -0x84(%rbp), %ecx
movq -0x78(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x44(%rbp), %r8
movl (%rax,%r8,4), %r9d
movq -0x78(%rbp), %rax
movq 0x18(%rax), %r14
movslq -0x84(%rbp), %rax
shlq $0x2, %rax
addq %rax, %r14
movq -0x78(%rbp), %rax
movq 0x40(%rax), %rbx
movslq -0x84(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rbx
movq -0x70(%rbp), %r11
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %r10
movq -0x78(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x3c(%rbp), %r8
movl (%rax,%r8,4), %eax
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movl %eax, 0x20(%rsp)
callq 0x15c60
jmp 0x1295b
movq -0x50(%rbp), %rdi
addq $0x30, %rdi
movq -0x80(%rbp), %rsi
movq -0x90(%rbp), %rdx
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %r9
movq -0x78(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x3c(%rbp), %rcx
movl (%rax,%rcx,4), %r11d
movq -0x78(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x44(%rbp), %rcx
movl (%rax,%rcx,4), %r10d
movl -0x3c(%rbp), %eax
subl -0x84(%rbp), %eax
xorl %ecx, %ecx
movl %ecx, %r8d
movq %r8, %rcx
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x154b0
movq -0x50(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x5520
jmp 0x1296a
jmp 0x1296c
jmp 0x1296e
jmp 0x12970
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x12379
movl -0x84(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x88(%rbp), %eax
jge 0x12aa9
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x78(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq -0x3c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x129e0
movq -0x78(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq 0x48(%rax), %rdi
callq 0x2040
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1299d
movq -0x78(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2040
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x2040
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x2040
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x18(%rax)
je 0x12a63
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
callq 0x2040
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x20(%rax)
je 0x12a99
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rdi
callq 0x2040
jmp 0x12a9b
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x12987
jmp 0x12aab
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x12327
movq -0x78(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x2040
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2040
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2040
movq -0x70(%rbp), %rdi
callq 0x1a840
leaq 0x4bc20(%rip), %rax     # 0x5e710
cmpl $0x3, (%rax)
jl 0x12b79
movq 0x4b4f8(%rip), %rax     # 0x5dff8
movq (%rax), %rax
movq %rax, -0xc0(%rbp)
callq 0x54e0
leaq 0x4be2a(%rip), %rax     # 0x5e940
subsd (%rax), %xmm0
movsd %xmm0, -0xb8(%rbp)
callq 0x5450
movsd %xmm0, -0xc8(%rbp)
callq 0x54e0
movsd -0xc8(%rbp), %xmm1
movq -0xc0(%rbp), %rdi
movaps %xmm0, %xmm2
movsd -0xb8(%rbp), %xmm0
leaq 0x4bdeb(%rip), %rax     # 0x5e940
subsd (%rax), %xmm2
divsd %xmm2, %xmm1
movq -0x78(%rbp), %rax
movl 0x8(%rax), %ecx
leaq 0x449b6(%rip), %rsi     # 0x57521
leaq 0x449d7(%rip), %rdx     # 0x57549
movb $0x2, %al
callq 0x2250
movq -0x78(%rbp), %rdi
callq 0x2040
jmp 0x12b84
jmp 0x12b86
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq