// File: 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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x14(%rcx), %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x44(%rcx), %rcx
cmpq %rcx, %rax
jb 0x368073
jmp 0x368092
leaq 0x327f0(%rip), %rdi     # 0x39a86a
leaq 0x2e138(%rip), %rsi     # 0x3961b9
movl $0x3aaf, %edx           # imm = 0x3AAF
leaq 0x327fd(%rip), %rcx     # 0x39a88a
callq 0x2130
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movl %eax, %ecx
leaq -0x58(%rbp), %r8
leaq -0x68(%rbp), %r9
callq 0x367ea0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x3681a6
movq -0x30(%rbp), %rax
movl -0x4c(%rbp), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x3680ec
movq -0x30(%rbp), %rax
movl -0x4c(%rbp), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x3680fe
movl -0x4c(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
subq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %xmm0
movaps 0x19f06(%rip), %xmm3    # 0x382010
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x19f0a(%rip), %xmm2    # 0x382020
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x30(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
movsd 0x1a0fb(%rip), %xmm2    # 0x382240
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
ja 0x368194
movaps 0x19eba(%rip), %xmm1    # 0x382010
movq -0x38(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x19eb9(%rip), %xmm1    # 0x382020
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movl -0x4c(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cvtsi2sd %eax, %xmm1
movsd 0x1a0b6(%rip), %xmm2    # 0x382240
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x3681a4
cmpq $0x10, -0x38(%rbp)
jbe 0x3681a2
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
jmp 0x3681a4
jmp 0x3681a6
cmpl $0x0, -0x3c(%rbp)
jl 0x3682c2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
xorq $0x1, %rax
movl %eax, %edx
movq -0x20(%rbp), %rax
xorq $0x1, %rax
movl %eax, %ecx
leaq -0x58(%rbp), %r8
leaq -0x70(%rbp), %r9
callq 0x367ea0
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movl -0x4c(%rbp), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x368208
movq -0x30(%rbp), %rax
movl -0x4c(%rbp), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x36821a
movl -0x4c(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
subq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %xmm0
movaps 0x19dea(%rip), %xmm3    # 0x382010
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x19dee(%rip), %xmm2    # 0x382020
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x30(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
movsd 0x19fdf(%rip), %xmm2    # 0x382240
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
ja 0x3682b0
movaps 0x19d9e(%rip), %xmm1    # 0x382010
movq -0x38(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x19d9d(%rip), %xmm1    # 0x382020
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movl -0x4c(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cvtsi2sd %eax, %xmm1
movsd 0x19f9a(%rip), %xmm2    # 0x382240
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x3682c0
cmpq $0x10, -0x38(%rbp)
jbe 0x3682be
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
jmp 0x3682c0
jmp 0x3682c2
cmpl $0x0, -0x3c(%rbp)
jl 0x36840f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movl %eax, %ecx
leaq -0x58(%rbp), %r8
leaq -0x68(%rbp), %r9
callq 0x367ea0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x3682f8
jmp 0x368317
leaq 0x1c553(%rip), %rdi     # 0x384852
leaq 0x2deb3(%rip), %rsi     # 0x3961b9
movl $0x3ac2, %edx           # imm = 0x3AC2
leaq 0x32578(%rip), %rcx     # 0x39a88a
callq 0x2130
movq -0x10(%rbp), %rdi
callq 0x31b110
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, (%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
xorq $0x1, %rax
movl %eax, %edx
movq -0x20(%rbp), %rax
xorq $0x1, %rax
movl %eax, %ecx
leaq -0x58(%rbp), %r8
leaq -0x70(%rbp), %r9
callq 0x367ea0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x368373
jmp 0x368392
leaq 0x1c4d8(%rip), %rdi     # 0x384852
leaq 0x2de38(%rip), %rsi     # 0x3961b9
movl $0x3ac5, %edx           # imm = 0x3AC5
leaq 0x324fd(%rip), %rcx     # 0x39a88a
callq 0x2130
movq -0x10(%rbp), %rdi
callq 0x31b110
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, (%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x5cf0f(%rip), %rax     # 0x3c52d0
movq 0x78(%rax), %rdi
movq -0x68(%rbp), %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, %eax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq -0x68(%rbp), %rsi
callq 0xcd340
leaq 0x5cee7(%rip), %rax     # 0x3c52d0
movq 0x78(%rax), %rdi
movq -0x70(%rbp), %rax
movq (%rax), %rax
shrq $0x20, %rax
movl %eax, %eax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq -0x70(%rbp), %rsi
callq 0xcd340
jmp 0x368523
leaq 0x5ceba(%rip), %rax     # 0x3c52d0
movq 0x78(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x10(%rbp), %r8
callq 0x368530
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rax
movl %eax, %ecx
leaq -0x58(%rbp), %r8
callq 0x31f5d0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x368465
jmp 0x368484
leaq 0x1c3e6(%rip), %rdi     # 0x384852
leaq 0x2dd46(%rip), %rsi     # 0x3961b9
movl $0x3ace, %edx           # imm = 0x3ACE
leaq 0x3240b(%rip), %rcx     # 0x39a88a
callq 0x2130
movq -0x10(%rbp), %rdi
callq 0x31b110
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, (%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
xorq $0x1, %rax
movl %eax, %edx
movq -0x20(%rbp), %rax
xorq $0x1, %rax
movl %eax, %ecx
leaq -0x58(%rbp), %r8
callq 0x31f5d0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x3684dc
jmp 0x3684fb
leaq 0x1c36f(%rip), %rdi     # 0x384852
leaq 0x2dccf(%rip), %rsi     # 0x3961b9
movl $0x3ad0, %edx           # imm = 0x3AD0
leaq 0x32394(%rip), %rcx     # 0x39a88a
callq 0x2130
movq -0x10(%rbp), %rdi
callq 0x31b110
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, (%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x10(%rax)
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)