// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/ecovlp.cpp
// Function: push_cns_c0(cns_gfa*, unsigned long, unsigned long, unsigned long, unsigned int, unsigned int)
uint32_t push_cns_c0(cns_gfa *cns, uint64_t s0, uint64_t s, uint64_t e, uint32_t plus0, uint32_t rid)
{
    if(s > e) return s0;///it is possible that s == e
    uint32_t rr, k, re; 
    
    // rr = add_cns_arc(cns, s0, s, 1, plus0); assert(rr);
    // rr = add_cns_arc(cns, s, s0, 0, plus0); assert(rr);
    if(!add_cns_arc(cns, s0, s, 1, plus0)) {
        insert_cns_arc(cns, s0, s, 1, plus0, rid);
        insert_cns_arc(cns, s, s0, 0, plus0, rid);
    } else {
        rr = add_cns_arc(cns, s, s0, 0, plus0); assert(rr);
    }
    (*cns).a[s].sc++; re = s;

    for (k = s + 1; k < e; k++) {
        rr = add_cns_arc(cns, k-1, k, 1, 1); 
        // if(!rr) {
        //     fprintf(stderr, "[M::%s] s0::%u, s::%u\n", __func__, k-1, k);
        //     prt_cns_arc(cns, k-1, __func__); prt_cns_arc(cns, k, __func__);
        // }
        assert(rr);



        rr = add_cns_arc(cns, k, k-1, 0, 1); assert(rr);
        (*cns).a[k].sc++; re = k;
    }
    
    return re;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
cmpq %rcx, %rdx
jbe 0x17a516
movl %r12d, %ebx
jmp 0x17a866
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
movq 0x10(%rdi), %rax
movl %r12d, %r13d
leaq (,%r13,4), %rcx
addq %r13, %rcx
movl 0x18(%rax,%rcx,8), %esi
testq %rsi, %rsi
setne %r10b
je 0x17a587
movq 0x20(%rax,%rcx,8), %rdx
movl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
movl (%rdx), %edi
andl %r10d, %edi
cmpl %ebx, %edi
jne 0x17a559
movb $0x1, %r10b
xorl %edi, %edi
jmp 0x17a57c
movl $0x1, %edi
cmpq %rdi, %rsi
je 0x17a583
movl (%rdx,%rdi,8), %r11d
andl %r10d, %r11d
incq %rdi
cmpl %ebx, %r11d
jne 0x17a55e
decq %rdi
cmpq %rsi, %rdi
setb %r10b
addl %r8d, 0x4(%rdx,%rdi,8)
jmp 0x17a587
seta %r10b
testb %r10b, %r10b
je 0x17a5f2
movl %ebx, %ecx
leaq (%rcx,%rcx,4), %rdx
movq 0x8(%rax,%rdx,8), %rdi
movq 0x18(%rax,%rdx,8), %rcx
cmpl %edi, %ecx
setb %sil
jae 0x17a765
movl %ecx, %ecx
movq 0x20(%rax,%rdx,8), %rax
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl (%rax,%rcx,8), %r9d
andl %edx, %r9d
movb $0x1, %sil
cmpl %r12d, %r9d
je 0x17a5e8
movl %edi, %esi
incq %rcx
cmpq %rcx, %rsi
je 0x17a761
movl (%rax,%rcx,8), %edi
andl %edx, %edi
incq %rcx
cmpl %r12d, %edi
jne 0x17a5c8
decq %rcx
cmpq %rsi, %rcx
setb %sil
addl %r8d, 0x4(%rax,%rcx,8)
jmp 0x17a765
movq (%r15), %rdx
cmpq %r13, %rdx
jbe 0x17a8b5
movq 0x10(%rax,%rcx,8), %rdx
cmpq %rdx, 0x8(%rax,%rcx,8)
movl %r8d, 0xc(%rsp)
jne 0x17a667
leaq (%rax,%rcx,8), %rcx
addq $0x8, %rcx
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x2, %edx
cmovneq %rsi, %rdx
leaq (,%r13,8), %rsi
leaq (%rsi,%rsi,4), %rsi
movq %rsi, 0x10(%rsp)
movq %rdx, 0x10(%rax,%rsi)
movq 0x8(%rcx), %rsi
movq 0x18(%rcx), %rdi
shlq $0x3, %rsi
movl %r9d, %ebp
callq 0x2370
movl %ebp, %r9d
movl 0xc(%rsp), %r8d
movq 0x10(%r15), %rcx
movq 0x10(%rsp), %rdx
movq %rax, 0x20(%rcx,%rdx)
movq 0x10(%r15), %rsi
shlq $0x3, %r13
leaq (,%r13,4), %rdx
addq %r13, %rdx
movq 0x8(%rsi,%rdx), %rax
movq 0x20(%rsi,%rdx), %rcx
leaq 0x1(%rax), %rdi
movq %rdi, 0x8(%rsi,%rdx)
movl %r8d, 0x4(%rcx,%rax,8)
movl %ebx, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl %esi, (%rcx,%rax,8)
movq 0x10(%r15), %rdi
movq 0x18(%rdi,%rdx), %rsi
incq %rsi
movq %rsi, 0x18(%rdi,%rdx)
cmpq 0x8(%rdi,%rdx), %rsi
jae 0x17a6d2
addq %rdi, %rdx
addq $0x8, %rdx
movq 0x18(%rdx), %rdx
movq -0x8(%rdx,%rsi,8), %rdi
movq (%rcx,%rax,8), %r10
movq %r10, -0x8(%rdx,%rsi,8)
movq %rdi, (%rcx,%rax,8)
movl %ebx, %eax
movq (%r15), %rcx
cmpq %rax, %rcx
jbe 0x17a8fa
movq 0x10(%r15), %rcx
leaq (%rax,%rax,4), %r13
movq 0x10(%rcx,%r13,8), %rdx
cmpq %rdx, 0x8(%rcx,%r13,8)
jne 0x17a738
leaq (%rcx,%r13,8), %rdi
addq $0x8, %rdi
leaq (%rdx,%rdx), %rsi
testq %rdx, %rdx
movl $0x2, %edx
cmovneq %rsi, %rdx
shlq $0x3, %rax
leaq (%rax,%rax,4), %rbp
movq %rdx, 0x10(%rcx,%rbp)
movq 0x8(%rdi), %rsi
movq 0x18(%rdi), %rdi
shlq $0x3, %rsi
callq 0x2370
movl 0xc(%rsp), %r8d
movq 0x10(%r15), %rcx
movq %rax, 0x20(%rcx,%rbp)
movq 0x10(%r15), %rax
movq 0x8(%rax,%r13,8), %rcx
movq 0x20(%rax,%r13,8), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x8(%rax,%r13,8)
movl %r8d, 0x4(%rdx,%rcx,8)
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl %r12d, (%rdx,%rcx,8)
jmp 0x17a76e
seta %sil
testb %sil, %sil
je 0x17a8db
movq 0x10(%r15), %rax
leaq (%rbx,%rbx,4), %rcx
addl $0x8, (%rax,%rcx,8)
leal 0x1(%rbx), %esi
cmpq %r14, %rsi
jae 0x17a866
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %ebx, %edx
movl %esi, %ebx
movq 0x10(%r15), %rcx
leaq (%rdx,%rdx,4), %rdi
movl 0x18(%rcx,%rdi,8), %r8d
testq %r8, %r8
setne %r10b
je 0x17a7ec
movq 0x20(%rcx,%rdi,8), %rdi
movl (%rdi), %r9d
andl %eax, %r9d
cmpl %ebx, %r9d
jne 0x17a7bd
movb $0x1, %r10b
xorl %r9d, %r9d
jmp 0x17a7e1
movl $0x1, %r9d
cmpq %r9, %r8
je 0x17a7e8
movl (%rdi,%r9,8), %r10d
andl %eax, %r10d
incq %r9
cmpl %ebx, %r10d
jne 0x17a7c3
decq %r9
cmpq %r8, %r9
setb %r10b
incl 0x4(%rdi,%r9,8)
jmp 0x17a7ec
seta %r10b
testb %r10b, %r10b
je 0x17a896
leaq (%rsi,%rsi,4), %rsi
movq 0x8(%rcx,%rsi,8), %r10
movq 0x18(%rcx,%rsi,8), %rdi
cmpl %r10d, %edi
setb %r9b
jae 0x17a851
movl %edi, %edi
movq 0x20(%rcx,%rsi,8), %r8
movl (%r8,%rdi,8), %r11d
andl %eax, %r11d
movb $0x1, %r9b
cmpl %edx, %r11d
je 0x17a846
movl %r10d, %r9d
incq %rdi
cmpq %rdi, %r9
je 0x17a84d
movl (%r8,%rdi,8), %r10d
andl %eax, %r10d
incq %rdi
cmpl %edx, %r10d
jne 0x17a828
decq %rdi
cmpq %r9, %rdi
setb %r9b
incl 0x4(%r8,%rdi,8)
jmp 0x17a851
seta %r9b
testb %r9b, %r9b
je 0x17a877
addl $0x8, (%rcx,%rsi,8)
leal 0x1(%rbx), %esi
cmpq %r14, %rsi
jb 0x17a78b
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xad590(%rip), %rdi     # 0x227e0e
leaq 0xb7566(%rip), %rsi     # 0x231deb
leaq 0xb756a(%rip), %rcx     # 0x231df6
movl $0x2b8, %edx            # imm = 0x2B8
callq 0x2110
leaq 0xad571(%rip), %rdi     # 0x227e0e
leaq 0xb7547(%rip), %rsi     # 0x231deb
leaq 0xb754b(%rip), %rcx     # 0x231df6
movl $0x2b4, %edx            # imm = 0x2B4
callq 0x2110
movq 0x10f724(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
movl %edx, (%rsp)
leaq 0xb8d27(%rip), %rsi     # 0x2335f0
leaq 0xb8d51(%rip), %rdx     # 0x233621
movl %r9d, %ecx
movl %r12d, %r8d
movl %ebx, %r9d
jmp 0x17a91e
leaq 0xad52c(%rip), %rdi     # 0x227e0e
leaq 0xb7502(%rip), %rsi     # 0x231deb
leaq 0xb7506(%rip), %rcx     # 0x231df6
movl $0x2aa, %edx            # imm = 0x2AA
callq 0x2110
movq 0x10f6df(%rip), %rax    # 0x289fe0
movq (%rax), %rdi
movl %ecx, (%rsp)
leaq 0xb8ce2(%rip), %rsi     # 0x2335f0
leaq 0xb8d0c(%rip), %rdx     # 0x233621
movl %r9d, %ecx
movl %ebx, %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0x22b0
movl $0x1, %edi
callq 0x2250