// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: push_direct_scaff_node(usc_t*, asg_t*, ug_opt_t*, unsigned long, unsigned long)
void push_direct_scaff_node(usc_t *psa, asg_t *ng, ug_opt_t *uopt, uint64_t vx, uint64_t wx)
{
    uint64_t uol, dif; int32_t r; asg_arc_t t, *p; ma_hit_t *rc0, *rc1;
    uol = psa->raw_sof - psa->raw_eof;
    assert(uol >= (uint64_t)uopt->min_ovlp);
    r = gen_spec_rc_edge(ng, uopt, vx, wx, &t, &rc0);
    if(r >= 0) {
        if(uol > t.ol) dif = uol - t.ol;
        else dif = t.ol - uol;
        if((dif > (uol*0.05)) || (dif > (t.ol*0.05))) {
            if(dif > 16) r = -1;
        }
    }
    if(r >= 0) {
        r = gen_spec_rc_edge(ng, uopt, wx^1, vx^1, &t, &rc1);
        if(uol > t.ol) dif = uol - t.ol;
        else dif = t.ol - uol;
        if((dif > (uol*0.05)) || (dif > (t.ol*0.05))) {
            if(dif > 16) r = -1;
        }
    }

    if(r >= 0) {
        r = gen_spec_rc_edge(ng, uopt, vx, wx, &t, &rc0); assert(r >= 0);
        p = asg_arc_pushp(ng); *p = t;

        r = gen_spec_rc_edge(ng, uopt, wx^1, vx^1, &t, &rc1); assert(r >= 0);
        p = asg_arc_pushp(ng); *p = t;

        add_ma_hit_t_alloc(&(R_INF.paf[Get_qn((*rc0))]), rc0);
        add_ma_hit_t_alloc(&(R_INF.paf[Get_qn((*rc1))]), rc1);
    } else {
        push_scaff_node(R_INF.paf, vx, wx, psa->raw_sof-psa->raw_eof, ng);

        r = gen_spec_edge(ng, uopt, vx, wx, &t);
        assert(r >= 0); p = asg_arc_pushp(ng); *p = t;
        r = gen_spec_edge(ng, uopt, wx^1, vx^1, &t);
        assert(r >= 0); p = asg_arc_pushp(ng); *p = t;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl 0x10(%rdi), %r12d
subl 0x14(%rdi), %r12d
movslq 0x44(%rdx), %rax
cmpq %rax, %r12
jb 0x2176c3
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rbp
movq %rsi, %rbx
movq %rdi, %r13
leaq 0x10(%rsp), %r8
leaq 0x30(%rsp), %r9
movq %rsi, %rdi
movq %rdx, %rsi
movl %r14d, %edx
movl %r15d, %ecx
callq 0x217147
testl %eax, %eax
js 0x21734b
movl 0x1c(%rsp), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq %r12, %rsi
subq %rcx, %rsi
movq %rcx, %rdx
subq %r12, %rdx
cmpl %ecx, %r12d
cmovaq %rsi, %rdx
movq %rdx, %xmm1
punpckldq 0xdf47(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xdf4f(%rip), %xmm1     # 0x225250
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r12, %xmm1
mulsd 0xe1ab(%rip), %xmm1     # 0x2254c8
ucomisd %xmm1, %xmm0
jbe 0x21732b
cmpq $0x11, %rdx
jae 0x217346
jmp 0x21734b
cmpq $0x11, %rdx
jb 0x21734b
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd 0xe188(%rip), %xmm1     # 0x2254c8
ucomisd %xmm1, %xmm0
jbe 0x21734b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x217405
movl %r15d, %edx
xorl $0x1, %edx
movl %r14d, %ecx
xorl $0x1, %ecx
movq %rbp, %rsi
leaq 0x10(%rsp), %rbp
leaq 0x28(%rsp), %r9
movq %rbx, %rdi
movq %rsi, 0x8(%rsp)
movq %rbp, %r8
callq 0x217147
movl 0xc(%rbp), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq %r12, %rsi
subq %rcx, %rsi
movq %rcx, %rdx
subq %r12, %rdx
cmpl %ecx, %r12d
cmovaq %rsi, %rdx
movq %rdx, %xmm1
punpckldq 0xde9b(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xdea3(%rip), %xmm1     # 0x225250
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r12, %xmm1
mulsd 0xe0ff(%rip), %xmm1     # 0x2254c8
ucomisd %xmm1, %xmm0
jbe 0x2173dc
cmpq $0x11, %rdx
movq 0x8(%rsp), %rbp
jae 0x217400
jmp 0x217405
cmpq $0x11, %rdx
jb 0x2176b9
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd 0xe0d3(%rip), %xmm1     # 0x2254c8
ucomisd %xmm1, %xmm0
movq 0x8(%rsp), %rbp
jbe 0x217405
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x21756f
leaq 0x10(%rsp), %r8
leaq 0x30(%rsp), %r9
movq %rbx, %rdi
movq %rbp, %rsi
movl %r14d, %edx
movl %r15d, %ecx
callq 0x217147
testl %eax, %eax
js 0x2176e2
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl 0x4(%rbx), %ecx
movl (%rbx), %eax
cmpl %eax, %ecx
jne 0x217462
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x10, %eax
cmovnel %ecx, %eax
movl %eax, (%rbx)
movq 0x8(%rbx), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2370
movq %rax, 0x8(%rbx)
movq 0x8(%rbx), %rax
movl 0x4(%rbx), %ecx
movl %ecx, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leal 0x1(%rcx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %esi, %ecx
movl %ecx, 0x4(%rbx)
leaq (%rdx,%rdx,2), %rcx
leaq 0x10(%rsp), %r8
movq 0x10(%r8), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups (%r8), %xmm0
movups %xmm0, (%rax,%rcx,8)
xorl $0x1, %r15d
xorl $0x1, %r14d
leaq 0x28(%rsp), %r9
movq %rbx, %rdi
movq %rbp, %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x217147
testl %eax, %eax
js 0x217701
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl 0x4(%rbx), %ecx
movl (%rbx), %eax
cmpl %eax, %ecx
jne 0x2174f7
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x10, %eax
cmovnel %ecx, %eax
movl %eax, (%rbx)
movq 0x8(%rbx), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2370
movq %rax, 0x8(%rbx)
movq 0x8(%rbx), %rax
movl 0x4(%rbx), %ecx
movl %ecx, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leal 0x1(%rcx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %esi, %ecx
movl %ecx, 0x4(%rbx)
leaq (%rdx,%rdx,2), %rcx
movq 0x20(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups 0x10(%rsp), %xmm0
movups %xmm0, (%rax,%rcx,8)
leaq 0x73cf8(%rip), %rbx     # 0x28b230
movq 0x30(%rsp), %rsi
movl 0x4(%rsi), %eax
leaq (%rax,%rax,2), %rdi
shlq $0x3, %rdi
addq 0x78(%rbx), %rdi
callq 0x9fdd9
movq 0x28(%rsp), %rsi
movl 0x4(%rsi), %eax
leaq (%rax,%rax,2), %rdi
shlq $0x3, %rdi
addq 0x78(%rbx), %rdi
callq 0x9fdd9
jmp 0x2176aa
leaq 0x73cba(%rip), %rax     # 0x28b230
movq 0x78(%rax), %rdi
movl 0x10(%r13), %ecx
subl 0x14(%r13), %ecx
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %r8
callq 0x21775e
leaq 0x10(%rsp), %r8
movq %rbx, %rdi
movq %rbp, %rsi
movl %r14d, %edx
movl %r15d, %ecx
callq 0x1ee341
testl %eax, %eax
js 0x217720
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl 0x4(%rbx), %ecx
movl (%rbx), %eax
cmpl %eax, %ecx
jne 0x2175e0
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x10, %eax
cmovnel %ecx, %eax
movl %eax, (%rbx)
movq 0x8(%rbx), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2370
movq %rax, 0x8(%rbx)
movq 0x8(%rbx), %rax
movl 0x4(%rbx), %ecx
movl %ecx, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leal 0x1(%rcx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %esi, %ecx
movl %ecx, 0x4(%rbx)
leaq (%rdx,%rdx,2), %rcx
leaq 0x10(%rsp), %r8
movq 0x10(%r8), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups (%r8), %xmm0
movups %xmm0, (%rax,%rcx,8)
xorl $0x1, %r15d
xorl $0x1, %r14d
movq %rbx, %rdi
movq %rbp, %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x1ee341
testl %eax, %eax
js 0x21773f
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
andl 0x4(%rbx), %ecx
movl (%rbx), %eax
cmpl %eax, %ecx
jne 0x217670
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x10, %eax
cmovnel %ecx, %eax
movl %eax, (%rbx)
movq 0x8(%rbx), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2370
movq %rax, 0x8(%rbx)
movq 0x8(%rbx), %rax
movl 0x4(%rbx), %ecx
movl %ecx, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leal 0x1(%rcx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %esi, %ecx
movl %ecx, 0x4(%rbx)
leaq (%rdx,%rdx,2), %rcx
movq 0x20(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups 0x10(%rsp), %xmm0
movups %xmm0, (%rax,%rcx,8)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rbp
jmp 0x217405
leaq 0x261cc(%rip), %rdi     # 0x23d896
leaq 0x21c54(%rip), %rsi     # 0x239325
leaq 0x261de(%rip), %rcx     # 0x23d8b6
movl $0x3aaf, %edx           # imm = 0x3AAF
callq 0x2110
leaq 0x10491(%rip), %rdi     # 0x227b7a
leaq 0x21c35(%rip), %rsi     # 0x239325
leaq 0x261bf(%rip), %rcx     # 0x23d8b6
movl $0x3ac2, %edx           # imm = 0x3AC2
callq 0x2110
leaq 0x10472(%rip), %rdi     # 0x227b7a
leaq 0x21c16(%rip), %rsi     # 0x239325
leaq 0x261a0(%rip), %rcx     # 0x23d8b6
movl $0x3ac5, %edx           # imm = 0x3AC5
callq 0x2110
leaq 0x10453(%rip), %rdi     # 0x227b7a
leaq 0x21bf7(%rip), %rsi     # 0x239325
leaq 0x26181(%rip), %rcx     # 0x23d8b6
movl $0x3ace, %edx           # imm = 0x3ACE
callq 0x2110
leaq 0x10434(%rip), %rdi     # 0x227b7a
leaq 0x21bd8(%rip), %rsi     # 0x239325
leaq 0x26162(%rip), %rcx     # 0x23d8b6
movl $0x3ad0, %edx           # imm = 0x3AD0
callq 0x2110