// File: /workspace/github_c_makefile_star2_O0/lh3[P]minigraph/ggen.c
// Function: ggen_map
static maprst_t *ggen_map(const mg_idx_t *gi, const mg_mapopt_t *opt, const char *fn, int n_threads)
{
	mg_bseq_file_t *fp;
	maprst_t *r;
	step_t s;
	int i;

	fp = mg_bseq_open(fn);
	if (fp == 0) return 0;

	KCALLOC(0, r, 1);
	r->seq = mg_bseq_read(fp, 1ULL<<62, 0, 0, 0, &r->n_seq);
	mg_bseq_close(fp);
	if (mg_verbose >= 3)
		fprintf(stderr, "[M::%s::%.3f*%.2f] loaded file \"%s\"\n", __func__,
				realtime() - mg_realtime0, cputime() / (realtime() - mg_realtime0), fn);
	for (i = 0; i < r->n_seq; ++i) {
		r->seq[i].rid = i;
		mg_toupper(r->seq[i].l_seq, r->seq[i].seq);
	}
	KCALLOC(0, r->gcs, r->n_seq);

	s.gi = gi, s.opt = opt, s.r = r;
	KCALLOC(0, s.buf, n_threads);
	for (i = 0; i < n_threads; ++i) s.buf[i] = mg_tbuf_init();
	kt_for(n_threads, worker_for, &s, r->n_seq);
	if (mg_verbose >= 3)
		fprintf(stderr, "[M::%s::%.3f*%.2f] mapped %d sequence(s) to the graph\n", __func__,
				realtime() - mg_realtime0, cputime() / (realtime() - mg_realtime0), r->n_seq);
	for (i = 0; i < n_threads; ++i) mg_tbuf_destroy(s.buf[i]);
	free(s.buf);
	return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0x16390
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x37f1b
movq $0x0, -0x8(%rbp)
jmp 0x3819b
xorl %eax, %eax
movl %eax, %edi
movl $0x1, %esi
movl $0x18, %edx
callq 0x2540
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %r9
movabsq $0x4000000000000000, %rsi # imm = 0x4000000000000000
xorl %r8d, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x16530
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x16480
leaq 0xd483(%rip), %rax      # 0x453f0
cmpl $0x3, (%rax)
jl 0x37fdd
movq 0xd07f(%rip), %rax      # 0x44ff8
movq (%rax), %rax
movq %rax, -0x70(%rbp)
callq 0x48e0
leaq 0xd704(%rip), %rax      # 0x45690
subsd (%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
callq 0x4850
movsd %xmm0, -0x78(%rbp)
callq 0x48e0
movsd -0x78(%rbp), %xmm1
movq -0x70(%rbp), %rdi
movaps %xmm0, %xmm2
movsd -0x68(%rbp), %xmm0
leaq 0xd6d4(%rip), %rax      # 0x45690
subsd (%rax), %xmm2
divsd %xmm2, %xmm1
movq -0x20(%rbp), %rcx
leaq 0x65d7(%rip), %rsi      # 0x3e5a6
leaq 0x65f5(%rip), %rdx      # 0x3e5cb
movb $0x2, %al
callq 0x2210
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x38044
movl -0x5c(%rbp), %ecx
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x5c(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x5c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %edi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x5c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rsi
callq 0x38930
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x37fe4
movq -0x38(%rbp), %rax
movslq (%rax), %rsi
xorl %eax, %eax
movl %eax, %edi
movl $0x8, %edx
callq 0x2540
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movslq -0x24(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
movl $0x8, %edx
callq 0x2540
movq %rax, -0x48(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x380c0
callq 0x2c460
movq %rax, %rdx
movq -0x48(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x38099
movl -0x24(%rbp), %edi
movq -0x38(%rbp), %rax
movslq (%rax), %rcx
leaq 0x8df(%rip), %rsi       # 0x389b0
leaq -0x58(%rbp), %rdx
callq 0x2df0
leaq 0xd30f(%rip), %rax      # 0x453f0
cmpl $0x3, (%rax)
jl 0x3815f
movq 0xcf0b(%rip), %rax      # 0x44ff8
movq (%rax), %rax
movq %rax, -0x88(%rbp)
callq 0x48e0
leaq 0xd58d(%rip), %rax      # 0x45690
subsd (%rax), %xmm0
movsd %xmm0, -0x80(%rbp)
callq 0x4850
movsd %xmm0, -0x90(%rbp)
callq 0x48e0
movsd -0x90(%rbp), %xmm1
movq -0x88(%rbp), %rdi
movaps %xmm0, %xmm2
movsd -0x80(%rbp), %xmm0
leaq 0xd554(%rip), %rax      # 0x45690
subsd (%rax), %xmm2
divsd %xmm2, %xmm1
movq -0x38(%rbp), %rax
movl (%rax), %ecx
leaq 0x6483(%rip), %rsi      # 0x3e5d4
leaq 0x6473(%rip), %rdx      # 0x3e5cb
movb $0x2, %al
callq 0x2210
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x3818a
movq -0x48(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2c4b0
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x38166
movq -0x48(%rbp), %rdi
callq 0x2040
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)