// File: /workspace/github_cpp_makefile_star2_O3/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), %r13d
subl 0x14(%rdi), %r13d
movslq 0x44(%rdx), %rax
cmpq %rax, %r13
jb 0x222bbc
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x8(%rsp), %r8
leaq 0x28(%rsp), %r9
movq %rsi, %rdi
movq %rdx, %rsi
movl %r12d, %edx
movl %r15d, %ecx
callq 0x2224e5
testl %eax, %eax
js 0x222852
movl 0x14(%rsp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %r13, %rdx
subq %rax, %rdx
movq %rax, %rcx
subq %r13, %rcx
cmpl %eax, %r13d
cmovaq %rdx, %rcx
movq %rcx, %xmm1
punpckldq 0xea83(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xea8b(%rip), %xmm1     # 0x231290
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
cvtsi2sd %r13, %xmm2
mulsd 0xedaa(%rip), %xmm2     # 0x2315c8
ucomisd %xmm2, %xmm0
jbe 0x22282f
cmpq $0x10, %rcx
ja 0x222852
jmp 0x2229a1
cmpq $0x11, %rcx
jb 0x2229a1
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd 0xed80(%rip), %xmm1     # 0x2315c8
ucomisd %xmm1, %xmm0
jbe 0x2229a1
leaq 0x739d7(%rip), %rax     # 0x296230
movq 0x78(%rax), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %rbx, %r8
callq 0x222c57
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
movl %r15d, %ecx
callq 0x1f94d8
testl %eax, %eax
js 0x222bdb
movl 0x4(%rbx), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl (%rbx), %ecx
jne 0x2228cc
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
movl $0x10, %ecx
cmovnel %eax, %ecx
movl %ecx, (%rbx)
movq 0x8(%rbx), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0x8(%rbx)
movl 0x4(%rbx), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
jmp 0x2228d0
movq 0x8(%rbx), %rax
leal 0x1(%rdx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %edx       # imm = 0x80000000
orl %esi, %edx
movl %edx, 0x4(%rbx)
movl %ecx, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq 0x8(%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, %r12d
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x1f94d8
testl %eax, %eax
js 0x222bfa
movl 0x4(%rbx), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl (%rbx), %ecx
jne 0x222961
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
movl $0x10, %ecx
cmovnel %eax, %ecx
movl %ecx, (%rbx)
movq 0x8(%rbx), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0x8(%rbx)
movl 0x4(%rbx), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
jmp 0x222965
movq 0x8(%rbx), %rax
leal 0x1(%rdx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %edx       # imm = 0x80000000
orl %esi, %edx
movl %edx, 0x4(%rbx)
movl %ecx, %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0x18(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rax,%rcx,8)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, %edx
xorl $0x1, %edx
movl %r12d, %ecx
xorl $0x1, %ecx
leaq 0x8(%rsp), %rbp
leaq 0x20(%rsp), %r9
movq %rbx, %rdi
movq %r14, %rsi
movl %edx, 0x4(%rsp)
movl %ecx, (%rsp)
movq %rbp, %r8
movsd %xmm2, 0x30(%rsp)
callq 0x2224e5
movl 0xc(%rbp), %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq %r13, %rsi
subq %rdx, %rsi
movq %rdx, %rcx
subq %r13, %rcx
cmpl %edx, %r13d
cmovaq %rsi, %rcx
movq %rcx, %xmm1
punpckldq 0xe885(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xe88d(%rip), %xmm1     # 0x231290
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
ucomisd 0x30(%rsp), %xmm0
jbe 0x222a2a
testl %eax, %eax
js 0x222852
cmpq $0x10, %rcx
jbe 0x222a57
jmp 0x222852
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
mulsd 0xeb8f(%rip), %xmm1     # 0x2315c8
ucomisd %xmm1, %xmm0
setbe %dl
cmpq $0x11, %rcx
setb %cl
testl %eax, %eax
js 0x222852
orb %dl, %cl
je 0x222852
leaq 0x8(%rsp), %r8
leaq 0x28(%rsp), %r9
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
movl %r15d, %ecx
callq 0x2224e5
testl %eax, %eax
js 0x222c19
movl 0x4(%rbx), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl (%rbx), %ecx
jne 0x222aba
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
movl $0x10, %ecx
cmovnel %eax, %ecx
movl %ecx, (%rbx)
movq 0x8(%rbx), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0x8(%rbx)
movl 0x4(%rbx), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
jmp 0x222abe
movq 0x8(%rbx), %rax
leal 0x1(%rdx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %edx       # imm = 0x80000000
orl %esi, %edx
movl %edx, 0x4(%rbx)
movl %ecx, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq 0x8(%rsp), %r8
movq 0x10(%r8), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups (%r8), %xmm0
movups %xmm0, (%rax,%rcx,8)
leaq 0x20(%rsp), %r9
movq %rbx, %rdi
movq %r14, %rsi
movl 0x4(%rsp), %edx
movl (%rsp), %ecx
callq 0x2224e5
testl %eax, %eax
js 0x222c38
movl 0x4(%rbx), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl (%rbx), %ecx
jne 0x222b4d
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
movl $0x10, %ecx
cmovnel %eax, %ecx
movl %ecx, (%rbx)
movq 0x8(%rbx), %rdi
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x2370
movq %rax, 0x8(%rbx)
movl 0x4(%rbx), %edx
movl %edx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
jmp 0x222b51
movq 0x8(%rbx), %rax
leal 0x1(%rdx), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
andl $0x80000000, %edx       # imm = 0x80000000
orl %esi, %edx
movl %edx, 0x4(%rbx)
movl %ecx, %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0x18(%rsp), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rax,%rcx,8)
leaq 0x736ab(%rip), %rbx     # 0x296230
movq 0x28(%rsp), %rsi
movl 0x4(%rsi), %eax
leaq (%rax,%rax,2), %rdi
shlq $0x3, %rdi
addq 0x78(%rbx), %rdi
callq 0xa058c
movq 0x20(%rsp), %rsi
movl 0x4(%rsi), %eax
leaq (%rax,%rax,2), %rdi
shlq $0x3, %rdi
addq 0x78(%rbx), %rdi
callq 0xa058c
jmp 0x222992
leaq 0x26fb7(%rip), %rdi     # 0x249b7a
leaq 0x22a3f(%rip), %rsi     # 0x245609
leaq 0x26fc9(%rip), %rcx     # 0x249b9a
movl $0x3aaf, %edx           # imm = 0x3AAF
callq 0x2110
leaq 0x110a8(%rip), %rdi     # 0x233c8a
leaq 0x22a20(%rip), %rsi     # 0x245609
leaq 0x26faa(%rip), %rcx     # 0x249b9a
movl $0x3ace, %edx           # imm = 0x3ACE
callq 0x2110
leaq 0x11089(%rip), %rdi     # 0x233c8a
leaq 0x22a01(%rip), %rsi     # 0x245609
leaq 0x26f8b(%rip), %rcx     # 0x249b9a
movl $0x3ad0, %edx           # imm = 0x3AD0
callq 0x2110
leaq 0x1106a(%rip), %rdi     # 0x233c8a
leaq 0x229e2(%rip), %rsi     # 0x245609
leaq 0x26f6c(%rip), %rcx     # 0x249b9a
movl $0x3ac2, %edx           # imm = 0x3AC2
callq 0x2110
leaq 0x1104b(%rip), %rdi     # 0x233c8a
leaq 0x229c3(%rip), %rsi     # 0x245609
leaq 0x26f4d(%rip), %rcx     # 0x249b9a
movl $0x3ac5, %edx           # imm = 0x3AC5
callq 0x2110