// File: /workspace/github_cpp_makefile_star2_O3/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:
testq %rdx, %rdx
je 0x1f6052
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movq (%rdi), %rax
movq %rax, 0x40(%rsp)
xorl %eax, %eax
movl $0x2, %r12d
movl %edx, 0x28(%rsp)
movl %edx, 0x2c(%rsp)
xorl %edx, %edx
movq %rcx, 0x80(%rsp)
movq %r14, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
incl %edx
cmpq %r14, %rdx
jae 0x1f6041
movq (%r15,%rax,8), %rax
movl %eax, %ecx
movq %rcx, 0x90(%rsp)
movq %rax, 0x88(%rsp)
shrl %eax
movq %rax, 0x30(%rsp)
leaq (%rax,%rax,2), %rax
movq 0x40(%rsp), %rcx
leaq (%rcx,%rax,8), %rbp
movl %r12d, 0x3c(%rsp)
movq %rdx, 0x98(%rsp)
movq %rdx, %rax
movq %rbp, 0x20(%rsp)
movq (%r15,%rax,8), %rcx
movq %rcx, 0x48(%rsp)
movl %ecx, %ebx
shrl %ebx
movq %rbp, %rdi
movq 0x30(%rsp), %rsi
movl %ebx, %edx
callq 0xa0c99
testl %eax, %eax
js 0x1f5c42
movq (%rbp), %rcx
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq (%rax,%rax,4), %rdx
movq 0x18(%rcx,%rdx,8), %rax
testq %rax, %rax
js 0x1f5c42
leaq (%rcx,%rdx,8), %rcx
leaq 0xa06bb(%rip), %rdx     # 0x296230
movq 0x18(%rdx), %rdx
movl %ebx, %esi
movl (%rdx,%rsi,8), %edi
testl %eax, %eax
movq %rsi, 0xa0(%rsp)
js 0x1f5b9b
movl 0x10(%rcx), %ebp
movl 0x14(%rcx), %r10d
subl %r10d, %edi
movl %edi, %r8d
movl %ebp, %edi
jmp 0x1f5ba8
movl 0x10(%rcx), %ebp
movl 0x14(%rcx), %r10d
subl %r10d, %edi
movl %ebp, %r8d
movq 0x30(%rsp), %rsi
movl (%rdx,%rsi,8), %r14d
movl 0x10(%r13), %r13d
movq (%rcx), %rdx
cmpl %edx, %edi
movl %edx, %r15d
cmovll %edi, %r15d
movl 0x8(%rcx), %r9d
movl %r14d, %esi
subl %r9d, %esi
cmpl %r8d, %esi
movl %r8d, %r11d
cmovll %esi, %r11d
cmpl %r13d, %r15d
jg 0x1f5c2e
cmpl %r13d, %r11d
jg 0x1f5c2e
movq 0x8(%rsp), %r13
xorps %xmm0, %xmm0
cvtsi2ssq 0x18(%r13), %xmm0
movl %r9d, %r13d
subl %edx, %r13d
cvtsi2ss %r13, %xmm1
addl %r15d, %r13d
addl %r11d, %r13d
cvtsi2ss %r13, %xmm2
mulss %xmm0, %xmm2
ucomiss %xmm1, %xmm2
ja 0x1f5c2e
subl %ebp, %r10d
xorps %xmm1, %xmm1
cvtsi2ss %r10, %xmm1
addl %r15d, %r11d
addl %r10d, %r11d
xorps %xmm2, %xmm2
cvtsi2ss %r11, %xmm2
mulss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1f5c56
movq 0x18(%rsp), %r14
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %r13
movq 0x20(%rsp), %rbp
movl %r12d, %eax
incl %r12d
cmpq %r14, %rax
jb 0x1f5b2b
jmp 0x1f6025
cmpl %r8d, %esi
setl %sil
setg %bpl
cmpl %edi, %edx
setg %r15b
setl %r10b
orb %bpl, %r15b
cmpb $0x1, %r15b
jne 0x1f5c2e
orb %sil, %r10b
je 0x1f5c2e
movq 0x8(%rsp), %rsi
movl 0x8(%rsi), %esi
cmpl %esi, %r13d
jl 0x1f5c2e
cmpl %esi, %r11d
movq 0x80(%rsp), %r13
jl 0x1f5c2e
testl %eax, %eax
setns %sil
addl %r9d, %r8d
movl %r14d, %r9d
subl %r8d, %r9d
xorl %r10d, %r10d
movl %edx, %r8d
subl %edi, %r8d
setle %r10b
cmovlel %r9d, %r8d
setg %dil
xorb %sil, %dil
movzbl %dil, %esi
shrq $0x1f, %rdx
andl $-0x2, %edx
orq %r10, %rdx
movl 0xc(%rcx), %edi
leal (%rsi,%rdi,2), %edi
movq %rdx, %rsi
shlq $0x20, %rsi
addq %r8, %rsi
movq %rsi, 0x50(%rsp)
movl %edi, 0x58(%rsp)
subl %r8d, %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movl %r14d, 0x5c(%rsp)
movl %eax, %esi
shrl $0x10, %esi
andl $0x4000, %esi           # imm = 0x4000
movl 0x2c(%rsp), %r10d
andl $0x3fff, %r10d          # imm = 0x3FFF
orl %esi, %r10d
movb 0x20(%rcx), %r9b
movb %r9b, 0x62(%rsp)
movzbl 0x21(%rcx), %ecx
shll $0xf, %ecx
orl %ecx, %r10d
movw %r10w, 0x60(%rsp)
testl %r8d, %r8d
js 0x1f5deb
cmpl 0x90(%rsp), %edx
jne 0x1f5deb
xorl 0x48(%rsp), %edi
cmpl $0x1, %edi
jne 0x1f5deb
movq %rax, %rdx
shrq $0x20, %rdx
movl $0x3fff, %r8d           # imm = 0x3FFF
andl %r8d, %edx
movabsq $0x400000000000, %rdi   # imm = 0x400000000000
cmpq %rdi, %rax
cmovael %r8d, %edx
movzwl %si, %eax
orl %eax, %ecx
orl %edx, %ecx
movl %ecx, %ebp
movw %cx, 0x60(%rsp)
movq 0xa0(%rsp), %r14
leaq (%r14,%r14,2), %rax
movq 0x40(%rsp), %rcx
leaq (%rcx,%rax,8), %r15
movq %r15, %rdi
movl %ebx, %esi
movq 0x30(%rsp), %rdx
callq 0xa0c99
testl %eax, %eax
movl %ebp, 0x2c(%rsp)
js 0x1f5c2e
movq (%r15), %rcx
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq (%rax,%rax,4), %rdx
movq 0x18(%rcx,%rdx,8), %rax
testq %rax, %rax
js 0x1f5c2e
leaq (%rcx,%rdx,8), %rcx
leaq 0xa0466(%rip), %rdx     # 0x296230
movq 0x18(%rdx), %rdx
movq 0x30(%rsp), %rsi
movl (%rdx,%rsi,8), %edi
testl %eax, %eax
js 0x1f5df5
movl 0x10(%rcx), %ebx
movl 0x14(%rcx), %r10d
subl %r10d, %edi
movl %edi, %r8d
movl %ebx, %edi
jmp 0x1f5e02
movl %r10d, 0x2c(%rsp)
jmp 0x1f5c2e
movl 0x10(%rcx), %ebx
movl 0x14(%rcx), %r10d
subl %r10d, %edi
movl %ebx, %r8d
movl (%rdx,%r14,8), %esi
movq 0x8(%rsp), %rdx
movl 0x10(%rdx), %r14d
movq (%rcx), %rdx
cmpl %edx, %edi
movl %edx, %r15d
cmovll %edi, %r15d
movl 0x8(%rcx), %r9d
movl %esi, %ebp
subl %r9d, %ebp
cmpl %r8d, %ebp
movl %r8d, %r11d
cmovll %ebp, %r11d
cmpl %r14d, %r15d
jg 0x1f5c2e
cmpl %r14d, %r11d
jg 0x1f5c2e
movq 0x8(%rsp), %r14
cvtsi2ssq 0x18(%r14), %xmm0
movl %r9d, %r14d
subl %edx, %r14d
cvtsi2ss %r14, %xmm1
addl %r15d, %r14d
addl %r11d, %r14d
cvtsi2ss %r14, %xmm2
mulss %xmm0, %xmm2
ucomiss %xmm1, %xmm2
ja 0x1f5c2e
subl %ebx, %r10d
xorps %xmm1, %xmm1
cvtsi2ss %r10, %xmm1
addl %r15d, %r11d
addl %r10d, %r11d
xorps %xmm2, %xmm2
cvtsi2ss %r11, %xmm2
mulss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
ja 0x1f5c2e
cmpl %r8d, %ebp
setl %r10b
setg %bpl
cmpl %edi, %edx
setg %r15b
setl %bl
orb %bpl, %r15b
cmpb $0x1, %r15b
jne 0x1f5c2e
orb %r10b, %bl
je 0x1f5c2e
movq 0x8(%rsp), %r10
movl 0x8(%r10), %r10d
cmpl %r10d, %r14d
jl 0x1f5c2e
cmpl %r10d, %r11d
jl 0x1f5c2e
testl %eax, %eax
setns %r10b
addl %r9d, %r8d
movl %esi, %r9d
subl %r8d, %r9d
xorl %r11d, %r11d
movl %edx, %r8d
subl %edi, %r8d
setle %r11b
cmovlel %r9d, %r8d
setg %dil
xorb %r10b, %dil
movzbl %dil, %edi
shrq $0x1f, %rdx
andl $-0x2, %edx
orq %r11, %rdx
movl 0xc(%rcx), %r9d
leal (%rdi,%r9,2), %edi
movq %rdx, %r9
shlq $0x20, %r9
addq %r8, %r9
movq %r9, 0x68(%rsp)
movl %edi, 0x70(%rsp)
subl %r8d, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl %esi, 0x74(%rsp)
movl %eax, %esi
shrl $0x10, %esi
andl $0x4000, %esi           # imm = 0x4000
movl 0x28(%rsp), %r10d
andl $0x3fff, %r10d          # imm = 0x3FFF
orl %esi, %r10d
movb 0x20(%rcx), %r9b
movb %r9b, 0x7a(%rsp)
movzbl 0x21(%rcx), %ecx
shll $0xf, %ecx
orl %ecx, %r10d
movw %r10w, 0x78(%rsp)
testl %r8d, %r8d
js 0x1f601b
movl 0x48(%rsp), %r8d
cmpl %r8d, %edx
jne 0x1f601b
xorl 0x88(%rsp), %edi
cmpl $0x1, %edi
jne 0x1f601b
movq %rax, %rdx
shrq $0x20, %rdx
movl $0x3fff, %r8d           # imm = 0x3FFF
andl %r8d, %edx
movabsq $0x400000000000, %rdi   # imm = 0x400000000000
cmpq %rdi, %rax
cmovael %r8d, %edx
movzwl %si, %eax
orl %eax, %ecx
orl %edx, %ecx
movl %ecx, 0x28(%rsp)
movw %cx, 0x78(%rsp)
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x50(%rsp), %rsi
movq %r13, %rdx
callq 0x1f56b9
testl %eax, %eax
je 0x1f6009
movq %rbx, %rdi
leaq 0x68(%rsp), %r14
movq %r14, %rsi
movq %r13, %rdx
callq 0x1f56b9
testl %eax, %eax
je 0x1f6009
movq %rbx, %rdi
leaq 0x50(%rsp), %rsi
callq 0x1f5920
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1f5920
movq 0x18(%rsp), %r14
movq 0x10(%rsp), %r15
movq %rbx, %r13
jmp 0x1f5c3d
movl %r10d, 0x28(%rsp)
jmp 0x1f5c2e
movl 0x3c(%rsp), %r12d
incl %r12d
movq 0x98(%rsp), %rdx
movq %rdx, %rax
cmpq %r14, %rdx
jb 0x1f5ae1
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq