// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi2/unitig.c
// Function: fm6_unitig
int fm6_unitig(const rld_t *e, int min_match, int min_merge_len, int n_threads)
{
	extern void kt_for(int n_threads, void (*func)(void*,long,int), void *data, long n);
	worker_t w;
	int j;
	w.used    = (uint64_t*)calloc((e->mcnt[1] + 63)/64, 8);
	w.bend    = (uint64_t*)calloc((e->mcnt[1] + 63)/64, 8);
	w.visited = (uint64_t*)calloc((e->mcnt[1] + 63)/64, 8);
	w.e       = e;
	assert(e->mcnt[1] >= n_threads * 2);
	w.d = calloc(n_threads, sizeof(thrdat_t));
	w.prime = 0;
	for (j = 0; utg_primes[j] > 0; ++j)
		if (e->mcnt[1] % utg_primes[j] != 0) {
			w.prime = utg_primes[j];
			break;
		}
	assert(w.prime);
	if (fm_verbose >= 3) fprintf(stderr, "[M::%s] choose prime %llu\n", __func__, (unsigned long long)w.prime);
	for (j = 0; j < n_threads; ++j) {
		w.d[j].a.e = e; w.d[j].a.min_match = min_match; w.d[j].a.min_merge_len = min_merge_len;
		w.d[j].a.used = w.used; w.d[j].a.bend = w.bend;
	}
	kt_for(n_threads, worker, &w, e->mcnt[1]);
	for (j = 0; j < n_threads; ++j) {
		free(w.d[j].a.a[0].a); free(w.d[j].a.a[1].a); free(w.d[j].a.nei.a); free(w.d[j].a.cat.a);
		free(w.d[j].z.nei[0].a); free(w.d[j].z.nei[1].a); free(w.d[j].z.seq); free(w.d[j].z.cov);
		free(w.d[j].a.str.s); free(w.d[j].str.s); free(w.d[j].cov.s); free(w.d[j].out.s);
	}
	free(w.used); free(w.bend); free(w.visited);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rdi
addq $0x3f, %rdi
shrq $0x6, %rdi
movl $0x8, %esi
callq 0x21a0
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rdi
addq $0x3f, %rdi
shrq $0x6, %rdi
movl $0x8, %esi
callq 0x21a0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rdi
addq $0x3f, %rdi
shrq $0x6, %rdi
movl $0x8, %esi
callq 0x21a0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movl -0x14(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jb 0x2344e
jmp 0x2346d
leaq 0xa5cb(%rip), %rdi      # 0x2da20
leaq 0xa4bd(%rip), %rsi      # 0x2d919
movl $0x19e, %edx            # imm = 0x19E
leaq 0xa5d4(%rip), %rcx      # 0x2da3c
callq 0x2140
movslq -0x14(%rbp), %rdi
movl $0x150, %esi            # imm = 0x150
callq 0x21a0
movq %rax, -0x20(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movslq -0x4c(%rbp), %rcx
leaq 0xfdd7(%rip), %rax      # 0x33270
cmpq $0x0, (%rax,%rcx,8)
jbe 0x234e5
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x4c(%rbp), %rsi
leaq 0xfdb9(%rip), %rcx      # 0x33270
xorl %edx, %edx
divq (%rcx,%rsi,8)
cmpq $0x0, %rdx
je 0x234d8
movslq -0x4c(%rbp), %rcx
leaq 0xfda2(%rip), %rax      # 0x33270
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
jmp 0x234e5
jmp 0x234da
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2348e
cmpq $0x0, -0x48(%rbp)
je 0x234ee
jmp 0x2350d
leaq 0xa574(%rip), %rdi      # 0x2da69
leaq 0xa41d(%rip), %rsi      # 0x2d919
movl $0x1a6, %edx            # imm = 0x1A6
leaq 0xa534(%rip), %rcx      # 0x2da3c
callq 0x2140
leaq 0xfdac(%rip), %rax      # 0x332c0
cmpl $0x3, (%rax)
jl 0x2353c
movq 0xfad8(%rip), %rax      # 0x32ff8
movq (%rax), %rdi
movq -0x48(%rbp), %rcx
leaq 0xa543(%rip), %rsi      # 0x2da71
leaq 0xa557(%rip), %rdx      # 0x2da8c
movb $0x0, %al
callq 0x21d0
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x235de
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rdx
imulq $0x150, %rdx, %rdx      # imm = 0x150
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rdx
imulq $0x150, %rdx, %rdx      # imm = 0x150
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movl -0x10(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rdx
imulq $0x150, %rdx, %rdx      # imm = 0x150
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rdx
imulq $0x150, %rdx, %rdx      # imm = 0x150
addq %rdx, %rax
movq %rcx, 0x78(%rax)
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rdx
imulq $0x150, %rdx, %rdx      # imm = 0x150
addq %rdx, %rax
movq %rcx, 0x80(%rax)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x23543
movl -0x14(%rbp), %edi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rcx
leaq 0x1ac(%rip), %rsi       # 0x237a0
leaq -0x48(%rbp), %rdx
callq 0x2490
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x2377a
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x150, %rcx, %rcx      # imm = 0x150
addq %rcx, %rax
movq 0x28(%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x150, %rcx, %rcx      # imm = 0x150
addq %rcx, %rax
movq 0x40(%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x150, %rcx, %rcx      # imm = 0x150
addq %rcx, %rax
movq 0x58(%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x150, %rcx, %rcx      # imm = 0x150
addq %rcx, %rax
movq 0x70(%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x150, %rcx, %rcx      # imm = 0x150
addq %rcx, %rax
movq 0x118(%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x150, %rcx, %rcx      # imm = 0x150
addq %rcx, %rax
movq 0x130(%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x150, %rcx, %rcx      # imm = 0x150
addq %rcx, %rax
movq 0x138(%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x150, %rcx, %rcx      # imm = 0x150
addq %rcx, %rax
movq 0x140(%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x150, %rcx, %rcx      # imm = 0x150
addq %rcx, %rax
movq 0x90(%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x150, %rcx, %rcx      # imm = 0x150
addq %rcx, %rax
movq 0xc0(%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x150, %rcx, %rcx      # imm = 0x150
addq %rcx, %rax
movq 0xd0(%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
imulq $0x150, %rcx, %rcx      # imm = 0x150
addq %rcx, %rax
movq 0xe0(%rax), %rdi
callq 0x2040
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x23604
movq -0x40(%rbp), %rdi
callq 0x2040
movq -0x38(%rbp), %rdi
callq 0x2040
movq -0x30(%rbp), %rdi
callq 0x2040
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)