// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: append_notrans_e(flex_asg_t*, unsigned long*, unsigned long, asg64_v*)
void append_notrans_e(flex_asg_t *fg, uint64_t *a, uint64_t a_n, asg64_v *b)
{
    ma_hit_t_alloc* src = fg->src; int32_t idx, r; 
    uint32_t i, k, v, w; ma_hit_t_alloc *z; asg_arc_t t0, t1; 
    for (i = 0; i < a_n; i++) {
        v = a[i]; 
        z = &(src[v>>1]);
        for (k = i + 1; k < a_n; k++) {
            w = a[k]^1;
            idx = get_specific_overlap(z, v>>1, w>>1);
            if(idx < 0 || z->buffer[idx].del) continue;
            r = ma_hit2arc(&(z->buffer[idx]), Get_READ_LENGTH(R_INF, v>>1), Get_READ_LENGTH(R_INF, w>>1),
						fg->max_hang, fg->max_hang_rate, fg->min_ovlp, &t0);
			if(r < 0) continue;
            if((t0.ul>>32) != v || t0.v != w) continue;
            t0.ou = ((z->buffer[idx].bl>OU_MASK)?OU_MASK:z->buffer[idx].bl);
            // if((v>>1) == 8340 && (w>>1) == 8352) {
            //     fprintf(stderr, "[M::%s] v>>1::%u(%c), w>>1::%u(%c), t0.ou::%u\n", 
            //     __func__, (v>>1), "+-"[v&1], (w>>1), "+-"[w&1], t0.ou);
            // }


            idx = get_specific_overlap(&(src[w>>1]), w>>1, v>>1);
            if(idx < 0 || src[w>>1].buffer[idx].del) continue;
            r = ma_hit2arc(&(src[w>>1].buffer[idx]), Get_READ_LENGTH(R_INF, w>>1), Get_READ_LENGTH(R_INF, v>>1),
						fg->max_hang, fg->max_hang_rate, fg->min_ovlp, &t1);
            if(r < 0) continue;
            if((t1.ul>>32) != (w^1) || t1.v != (v^1)) continue;
            t1.ou = ((src[w>>1].buffer[idx].bl>OU_MASK)?OU_MASK:src[w>>1].buffer[idx].bl);
            // if((v>>1) == 8340 && (w>>1) == 8352) {
            //     fprintf(stderr, "[M::%s] v>>1::%u(%c), w>>1::%u(%c), t1.ou::%u\n", 
            //     __func__, (v>>1), "+-"[v&1], (w>>1), "+-"[w&1], t1.ou);
            // }

            if(trans_check(fg, &t0, b) && trans_check(fg, &t1, b)) {
                push_flex_asg_t(fg, &t0); push_flex_asg_t(fg, &t1);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, 0x18(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdi, (%rsp)
testq %rdx, %rdx
je 0x1eb209
movq %rdx, %r14
movq (%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
xorl %eax, %eax
movl $0x2, 0xc(%rsp)
xorl %ecx, %ecx
incl %ecx
movq %rcx, 0x28(%rsp)
cmpq %r14, %rcx
jae 0x1eb1f4
movq 0x38(%rsp), %rcx
movq (%rcx,%rax,8), %rax
movl %eax, %ecx
movq %rcx, 0x80(%rsp)
movq %rax, 0x78(%rsp)
shrl %eax
movq %rax, 0x10(%rsp)
leaq (%rax,%rax,2), %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, 0x40(%rsp)
movl 0xc(%rsp), %r12d
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rcx
movq (%rcx,%rax,8), %r15
movl %r15d, %r13d
shrl %r13d
movq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl %r13d, %edx
callq 0xa04f9
testl %eax, %eax
js 0x1eb1e5
movq 0x40(%rsp), %rcx
movq (%rcx), %rbx
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq (%rax,%rax,4), %rbp
cmpq $0x0, 0x18(%rbx,%rbp,8)
js 0x1eb1e5
leaq (%rbx,%rbp,8), %rdi
leaq 0xa020c(%rip), %rax     # 0x28b230
movq 0x18(%rax), %rax
movq 0x10(%rsp), %rcx
movl (%rax,%rcx,8), %esi
movl %r13d, %ecx
movq %rcx, 0x30(%rsp)
movl (%rax,%rcx,8), %edx
movq (%rsp), %rax
movl 0x8(%rax), %r8d
movl 0x10(%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2ssq 0x18(%rax), %xmm0
leaq 0x60(%rsp), %r9
callq 0x1eb21b
testl %eax, %eax
js 0x1eb1e5
movq 0x80(%rsp), %rax
cmpl %eax, 0x64(%rsp)
jne 0x1eb1e5
movl 0x68(%rsp), %eax
xorl %r15d, %eax
cmpl $0x1, %eax
jne 0x1eb1e5
movq 0x18(%rbx,%rbp,8), %rax
movq %rax, %rcx
shrq $0x20, %rcx
movl $0x3fff, %esi           # imm = 0x3FFF
andl %esi, %ecx
movabsq $0x7fffc00000000000, %rdx # imm = 0x7FFFC00000000000
testq %rdx, %rax
cmovnel %esi, %ecx
movl 0x70(%rsp), %eax
movl $0xffffc000, %edx       # imm = 0xFFFFC000
andl %edx, %eax
orl %ecx, %eax
movw %ax, 0x70(%rsp)
movq 0x30(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax,8), %rbx
movq %rbx, %rdi
movl %r13d, %esi
movq 0x10(%rsp), %rdx
callq 0xa04f9
testl %eax, %eax
js 0x1eb1e5
movq (%rbx), %r13
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq (%rax,%rax,4), %rbx
cmpq $0x0, 0x18(%r13,%rbx,8)
js 0x1eb1e5
leaq (,%rbx,8), %rdi
addq %r13, %rdi
leaq 0xa0124(%rip), %rax     # 0x28b230
movq 0x18(%rax), %rax
movq 0x30(%rsp), %rcx
movl (%rax,%rcx,8), %esi
movq 0x10(%rsp), %rcx
movl (%rax,%rcx,8), %edx
movq (%rsp), %rax
movl 0x8(%rax), %r8d
movl 0x10(%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2ssq 0x18(%rax), %xmm0
leaq 0x48(%rsp), %r9
callq 0x1eb21b
testl %eax, %eax
js 0x1eb1e5
movl %r15d, %eax
cmpl %eax, 0x4c(%rsp)
jne 0x1eb1e5
movl 0x50(%rsp), %eax
xorl 0x78(%rsp), %eax
cmpl $0x1, %eax
jne 0x1eb1e5
movq 0x18(%r13,%rbx,8), %rax
movq %rax, %rcx
shrq $0x20, %rcx
movl $0x3fff, %esi           # imm = 0x3FFF
andl %esi, %ecx
movabsq $0x7fffc00000000000, %rdx # imm = 0x7FFFC00000000000
testq %rdx, %rax
cmovnel %esi, %ecx
movl 0x58(%rsp), %eax
movl $0xffffc000, %edx       # imm = 0xFFFFC000
andl %edx, %eax
orl %ecx, %eax
movw %ax, 0x58(%rsp)
movq (%rsp), %rdi
leaq 0x60(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x1eaba1
testl %eax, %eax
je 0x1eb1e5
movq (%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x1eaba1
testl %eax, %eax
je 0x1eb1e5
movq (%rsp), %rbx
movq %rbx, %rdi
leaq 0x60(%rsp), %rsi
callq 0x1eaddc
movq %rbx, %rdi
leaq 0x48(%rsp), %rsi
callq 0x1eaddc
movl %r12d, %eax
incl %r12d
cmpq %r14, %rax
jb 0x1eafd3
incl 0xc(%rsp)
movq 0x28(%rsp), %rcx
movq %rcx, %rax
cmpq %r14, %rcx
jb 0x1eaf88
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq