// File: /workspace/github_cpp_makefile_star2_O3/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 0x1811e5
movl %r12d, %ebx
jmp 0x18151e
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
movq 0x10(%rdi), %rcx
movl %r12d, %r13d
leaq (,%r13,4), %rax
addq %r13, %rax
movl 0x18(%rcx,%rax,8), %edx
testq %rdx, %rdx
je 0x181293
movq 0x20(%rcx,%rax,8), %rsi
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movl (%rsi), %r10d
andl %edi, %r10d
cmpl %ebx, %r10d
jne 0x181228
addl %r8d, 0x4(%rsi)
jmp 0x181253
leaq -0x1(%rdx), %rbp
xorl %r11d, %r11d
cmpq %r11, %rbp
je 0x18124b
movl 0x8(%rsi,%r11,8), %r10d
andl %edi, %r10d
incq %r11
cmpl %ebx, %r10d
jne 0x18122f
addl %r8d, 0x4(%rsi,%r11,8)
jmp 0x18124e
incq %r11
cmpq %rdx, %r11
jae 0x181293
movl %ebx, %eax
leaq (%rax,%rax,4), %rdi
movq 0x8(%rcx,%rdi,8), %rsi
movq 0x18(%rcx,%rdi,8), %rax
movl %eax, %edx
subl %esi, %edx
jae 0x18156d
movl %eax, %eax
movq 0x20(%rcx,%rdi,8), %r10
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movl (%r10,%rax,8), %r9d
andl %edi, %r9d
cmpl %r12d, %r9d
jne 0x1813ea
addl %r8d, 0x4(%r10,%rax,8)
jmp 0x181428
movq (%r15), %rdx
cmpq %r13, %rdx
jbe 0x18158c
movq 0x8(%rcx,%rax,8), %rdx
cmpq 0x10(%rcx,%rax,8), %rdx
movl %r8d, 0x10(%rsp)
movl %r9d, 0x14(%rsp)
jne 0x1812fe
leaq (%rcx,%rax,8), %rax
addq $0x8, %rax
leaq (%rdx,%rdx), %rdi
testq %rdx, %rdx
movl $0x2, %esi
cmovneq %rdi, %rsi
leaq (,%r13,8), %rdx
leaq (%rdx,%rdx,4), %rbp
movq %rsi, 0x10(%rcx,%rbp)
movq 0x18(%rax), %rdi
shlq $0x3, %rsi
callq 0x2370
movl 0x10(%rsp), %r8d
movq 0x10(%r15), %rcx
movq %rax, 0x20(%rcx,%rbp)
movq 0x8(%rcx,%rbp), %rdx
shlq $0x3, %r13
leaq (,%r13,4), %rsi
addq %r13, %rsi
movq 0x20(%rcx,%rsi), %rax
leaq 0x1(%rdx), %rdi
movq %rdi, 0x8(%rcx,%rsi)
movl %r8d, 0x4(%rax,%rdx,8)
movl %ebx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, (%rax,%rdx,8)
movq 0x10(%r15), %rdi
movq 0x18(%rdi,%rsi), %rcx
leaq 0x1(%rcx), %r9
movq %r9, 0x18(%rdi,%rsi)
cmpq 0x8(%rdi,%rsi), %r9
jae 0x18135f
addq %rdi, %rsi
addq $0x8, %rsi
movq 0x18(%rsi), %rsi
movq (%rsi,%rcx,8), %rdi
movq (%rax,%rdx,8), %r9
movq %r9, (%rsi,%rcx,8)
movq %rdi, (%rax,%rdx,8)
movl %ebx, %edx
movq (%r15), %rax
cmpq %rdx, %rax
jbe 0x1815b2
movq 0x10(%r15), %rcx
leaq (%rdx,%rdx,4), %r13
movq 0x8(%rcx,%r13,8), %rax
cmpq 0x10(%rcx,%r13,8), %rax
jne 0x1813c6
leaq (%rcx,%r13,8), %rdi
addq $0x8, %rdi
leaq (%rax,%rax), %r9
testq %rax, %rax
movl $0x2, %esi
cmovneq %r9, %rsi
shlq $0x3, %rdx
leaq (%rdx,%rdx,4), %rbp
movq %rsi, 0x10(%rcx,%rbp)
movq 0x18(%rdi), %rdi
shlq $0x3, %rsi
callq 0x2370
movl 0x10(%rsp), %r8d
movq 0x10(%r15), %rcx
movq %rax, 0x20(%rcx,%rbp)
movq 0x8(%rcx,%rbp), %rax
movq 0x20(%rcx,%r13,8), %rdx
leaq 0x1(%rax), %rsi
movq %rsi, 0x8(%rcx,%r13,8)
movl %r8d, 0x4(%rdx,%rax,8)
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl %r12d, (%rdx,%rax,8)
movq 0x10(%r15), %rcx
jmp 0x181428
movl %esi, %esi
leaq (%r10,%rax,8), %r11
addq $0x4, %r11
incl %edx
xorl %r9d, %r9d
cmpl %r9d, %edx
je 0x181419
movl 0x4(%r11), %r10d
andl %edi, %r10d
decq %r9
addq $0x8, %r11
cmpl %r12d, %r10d
jne 0x1813f9
subq %r9, %rax
addl %r8d, (%r11)
jmp 0x18141f
subq %r9, %rax
incq %rax
cmpq %rsi, %rax
jae 0x18156d
leaq (%rbx,%rbx,4), %rax
addl $0x8, (%rcx,%rax,8)
leal 0x1(%rbx), %esi
cmpq %r14, %rsi
jae 0x18151e
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %ebx, %edx
movq 0x10(%r15), %rcx
leaq (%rdx,%rdx,4), %r8
movl 0x18(%rcx,%r8,8), %edi
testq %rdi, %rdi
je 0x18152f
movl %esi, %ebx
movq 0x20(%rcx,%r8,8), %r8
movl (%r8), %r9d
andl %eax, %r9d
cmpl %esi, %r9d
jne 0x181471
incl 0x4(%r8)
jmp 0x1814a0
leaq -0x1(%rdi), %r10
xorl %r9d, %r9d
cmpq %r9, %r10
je 0x181494
movl 0x8(%r8,%r9,8), %r11d
andl %eax, %r11d
incq %r9
cmpl %ebx, %r11d
jne 0x181478
incl 0x4(%r8,%r9,8)
jmp 0x181497
incq %r9
cmpq %rdi, %r9
jae 0x18152f
leaq (%rsi,%rsi,4), %rsi
movq 0x8(%rcx,%rsi,8), %r9
movq 0x18(%rcx,%rsi,8), %rdi
movl %edi, %r8d
subl %r9d, %r8d
jae 0x18154e
movl %edi, %edi
movq 0x20(%rcx,%rsi,8), %r10
movl (%r10,%rdi,8), %r11d
andl %eax, %r11d
cmpl %edx, %r11d
jne 0x1814d4
incl 0x4(%r10,%rdi,8)
jmp 0x18150e
movl %r9d, %r9d
leaq (%r10,%rdi,8), %r10
addq $0x4, %r10
incl %r8d
xorl %r11d, %r11d
cmpl %r11d, %r8d
je 0x181503
movl 0x4(%r10), %ebp
andl %eax, %ebp
decq %r11
addq $0x8, %r10
cmpl %edx, %ebp
jne 0x1814e5
subq %r11, %rdi
incl (%r10)
jmp 0x181509
subq %r11, %rdi
incq %rdi
cmpq %r9, %rdi
jae 0x18154e
addl $0x8, (%rcx,%rsi,8)
leal 0x1(%rbx), %esi
cmpq %r14, %rsi
jb 0x181441
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb29e8(%rip), %rdi     # 0x233f1e
leaq 0xbcafe(%rip), %rsi     # 0x23e03b
leaq 0xbcb02(%rip), %rcx     # 0x23e046
movl $0x2b4, %edx            # imm = 0x2B4
callq 0x2110
leaq 0xb29c9(%rip), %rdi     # 0x233f1e
leaq 0xbcadf(%rip), %rsi     # 0x23e03b
leaq 0xbcae3(%rip), %rcx     # 0x23e046
movl $0x2b8, %edx            # imm = 0x2B8
callq 0x2110
leaq 0xb29aa(%rip), %rdi     # 0x233f1e
leaq 0xbcac0(%rip), %rsi     # 0x23e03b
leaq 0xbcac4(%rip), %rcx     # 0x23e046
movl $0x2aa, %edx            # imm = 0x2AA
callq 0x2110
movq 0x113a4d(%rip), %rax    # 0x294fe0
movq (%rax), %rdi
movl %edx, (%rsp)
leaq 0xbe2a0(%rip), %rsi     # 0x23f840
leaq 0xbe2ca(%rip), %rdx     # 0x23f871
movl %r9d, %ecx
movl %r12d, %r8d
movl %ebx, %r9d
jmp 0x1815d7
movq 0x113a27(%rip), %rcx    # 0x294fe0
movq (%rcx), %rdi
movl %eax, (%rsp)
leaq 0xbe27a(%rip), %rsi     # 0x23f840
leaq 0xbe2a4(%rip), %rdx     # 0x23f871
movl 0x14(%rsp), %ecx
movl %ebx, %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0x22b0
movl $0x1, %edi
callq 0x2250