// File: /workspace/github_c_makefile_star2_O2/lh3[P]fermi2/sub.c
// Function: fm_sub
rld_t *fm_sub(rld_t *e, const uint64_t *sub, int n_threads, int is_comp, int is_both)
{
	shared_t d;
	rld_t *r;
	d.bits = calloc((e->mcnt[0] + 63) / 64, 8);
	d.sub = sub, d.e = e, d.n_threads = n_threads, d.is_both = is_both, d.n_ss = 0;
	kt_for(n_threads, worker, &d, n_threads);
	r = gen_idx(e, d.bits, is_comp);
	free(d.bits);
	if (is_both) fprintf(stderr, "[M::%s] # single-stranded: %ld\n", __func__, (long)d.n_ss);
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %r8d, %ebp
movl %ecx, 0x8(%rsp)
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq 0x28(%rdi), %rax
movq (%rax), %rdi
addq $0x3f, %rdi
shrq $0x6, %rdi
pushq $0x8
popq %rsi
callq 0x2190
leaq 0x68(%rsp), %r12
movq %rax, 0x10(%r12)
movq %r15, 0x8(%r12)
movq %r14, %r15
movq %r14, (%r12)
movl %ebx, 0x20(%r12)
movl %ebp, 0xc(%rsp)
movl %ebp, 0x24(%r12)
andq $0x0, 0x18(%r12)
movslq %ebx, %rcx
leaq 0x2b8(%rip), %rsi       # 0x4993
movl %ecx, %edi
movq %r12, %rdx
callq 0x247c
leaq 0x4(%rsp), %rax
andl $0x0, (%rax)
movq 0x10(%r12), %r13
movzbl (%r14), %edi
movsbl 0x3(%r14), %esi
callq 0x260c
xorl %ebp, %ebp
leaq 0x90(%rsp), %rsi
movq %rax, 0x10(%rsp)
movq %rax, %rdi
xorl %edx, %edx
callq 0x277d
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x277d
pushq $-0x1
popq %r14
xorl %r12d, %r12d
movq %r15, 0x18(%rsp)
movq %r15, %rdi
leaq 0x30(%rsp), %rsi
leaq 0x4(%rsp), %rdx
callq 0x4c45
testq %rax, %rax
je 0x4759
movzbl (%r15), %ecx
cmpl %ecx, 0x4(%rsp)
jle 0x483f
movq 0x10(%r15), %rbx
shrq $0x3, %rbx
movb 0x3(%r15), %cl
shrq %cl, %rbx
shlq %cl, %rbx
movq 0x40(%rsp), %rdx
movq 0x58(%rsp), %rax
movq (%rax), %rdi
subq %rdi, %rdx
sarq $0x3, %rdx
movslq 0x8(%r15), %rcx
movl $0x800000, %esi         # imm = 0x800000
subq %rcx, %rsi
cmpq %rsi, %rdx
jle 0x47b2
callq 0x2040
movq 0x58(%rsp), %rax
andq $0x0, (%rax)
movq 0x58(%rsp), %rcx
leaq 0x8(%rcx), %rax
movq %rax, 0x58(%rsp)
movq 0x8(%rcx), %rcx
jmp 0x47bb
shlq $0x3, %rcx
addq 0x48(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movq 0x18(%r15), %rdx
movq %rbx, %rsi
shrq $0x17, %rsi
andl $0x7fffff, %ebx         # imm = 0x7FFFFF
shll $0x3, %ebx
addq (%rdx,%rsi,8), %rbx
cmpq %rbx, %rcx
je 0x48e5
movq (%rcx), %rdx
shrq $0x3e, %rdx
movsbq 0x5(%r15,%rdx), %rdx
leaq (%rcx,%rdx,8), %rdx
movq %rdx, 0x40(%rsp)
movq %rdx, 0x60(%rsp)
movslq 0x8(%r15), %rdx
leaq (%rcx,%rdx,8), %rcx
movq %rcx, %rdx
subq (%rax), %rdx
xorl %eax, %eax
cmpq $0x4000000, %rdx        # imm = 0x4000000
setne %al
shll $0x3, %eax
orq $-0x10, %rax
addq %rcx, %rax
movq %rax, 0x50(%rsp)
movl $0x40, 0x30(%rsp)
movq %r15, %rdi
leaq 0x30(%rsp), %rsi
leaq 0x4(%rsp), %rdx
callq 0x4c45
testq %rax, %rax
js 0x48e5
movl 0x4(%rsp), %r15d
movq %rax, 0x20(%rsp)
movq %rax, %rbx
movq %rbp, 0x28(%rsp)
movl 0x8(%rsp), %edx
pushq $0x1
popq %rsi
subq $0x1, %rbx
jb 0x48d1
testl %edx, %edx
setne %al
movq %rbp, %rcx
sarq $0x6, %rcx
movq (%r13,%rcx,8), %rcx
btq %rbp, %rcx
sbbb $0x0, %al
je 0x488d
cmpl %r14d, %r15d
jne 0x4895
incq %r12
movq %r12, %rax
jmp 0x48c3
movq %r12, %rax
movl %r14d, %ecx
jmp 0x48c6
movq %rsi, %rax
movl %r15d, %ecx
testq %r12, %r12
je 0x48c6
movzbl %r14b, %ecx
movq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movq %r12, %rdx
callq 0x27f5
pushq $0x1
popq %rsi
movl 0x8(%rsp), %edx
movq %rsi, %rax
movl %r15d, %ecx
incq %rbp
movq %rax, %r12
movl %ecx, %r14d
jmp 0x4861
movq 0x28(%rsp), %rbp
addq 0x20(%rsp), %rbp
movq 0x18(%rsp), %r15
jmp 0x4734
testq %r12, %r12
movq 0x10(%rsp), %rbx
je 0x4906
movzbl %r14b, %ecx
leaq 0x90(%rsp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x27f5
movq 0x28(%r15), %rax
cmpq (%rax), %rbp
jne 0x4976
movq %r15, %rdi
callq 0x26e6
leaq 0x90(%rsp), %rsi
movq %rbx, %rdi
callq 0x2bd2
movq 0x78(%rsp), %rdi
callq 0x2040
cmpl $0x0, 0xc(%rsp)
jne 0x494d
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1d6a4(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
movq 0x80(%rsp), %rcx
leaq 0x1495e(%rip), %rsi     # 0x192c4
leaq 0x14977(%rip), %rdx     # 0x192e4
xorl %eax, %eax
callq 0x21c0
jmp 0x4938
leaq 0x149e7(%rip), %rdi     # 0x19364
leaq 0x149f1(%rip), %rsi     # 0x19375
leaq 0x149f0(%rip), %rcx     # 0x1937b
pushq $0x3d
popq %rdx
callq 0x2120