// File: /workspace/github_cpp_makefile_star2_O2/chhylp123[P]hifiasm/gfa_ut.cpp
// Function: update_thread_path(usg_t*, asg64_v*, asg64_v*, unsigned long, unsigned long, unsigned long*, unsigned int*, unsigned long*, unsigned char*, unsigned long, asg64_v*)
void update_thread_path(usg_t *g, asg64_v *b64, asg64_v *ub64, uint64_t g_s, uint64_t g_e, uint64_t *integer_seq, 
uint32_t *ng_occ, uint64_t *reliable_idx, uint8_t *f, uint64_t max_ext, asg64_v *res)
{
    uint64_t i, k, s, e; 
    for (i = g_s; i < g_e; i++) {///available intervals within the same cluster
        s = b64->a[((uint32_t)b64->a[i])]>>32; e = ((uint32_t)b64->a[((uint32_t)b64->a[i])]); assert(s < e);
        for (k = s + 1; k < e; k++) {///note: here is [s, e]
            f[integer_seq[k]] = f[integer_seq[k]^1] = 1;
        }
        f[integer_seq[s]] = f[integer_seq[e]^1] = 1;
    }

    for (i = g_s; i < g_e; i++) {///available intervals within the same cluster
        s = b64->a[((uint32_t)b64->a[i])]>>32; e = ((uint32_t)b64->a[((uint32_t)b64->a[i])]); assert(s < e);
        // fprintf(stderr, "[M::%s::] i::%lu, chain_id::%u\n", __func__, i, ((uint32_t)b64->a[i]));
        // select_unqiue_path_on_fly(g, s, e, b64, ub64, integer_seq, ng_occ, reliable_idx, f, max_ext, res);
        select_unqiue_path_on_fly_raw(g, s, e, b64, ub64, integer_seq, ng_occ, reliable_idx, f, max_ext, res);
    }

    for (i = g_s; i < g_e; i++) {///available intervals within the same cluster
        s = b64->a[((uint32_t)b64->a[i])]>>32; e = ((uint32_t)b64->a[((uint32_t)b64->a[i])]); assert(s < e);
        for (k = s + 1; k < e; k++) {///note: here is [s, e]
            f[integer_seq[k]] = f[integer_seq[k]^1] = 0;
        }
        f[integer_seq[s]] = f[integer_seq[e]^1] = 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %rbp
movq %rdx, 0x30(%rsp)
movq %rsi, %r12
movq %rdi, 0x28(%rsp)
movq 0x80(%rsp), %r13
movb $0x1, %al
cmpq %r14, %rcx
jae 0x1ccce1
movq 0x10(%r12), %rdx
movl (%rdx,%rcx,8), %esi
movq (%rdx,%rsi,8), %rdx
movl %edx, %esi
shrq $0x20, %rdx
cmpq %rsi, %rdx
jae 0x1ccdb7
leaq 0x1(%rdx), %rdi
cmpq %rsi, %rdi
jae 0x1cccc6
movq (%rbx,%rdi,8), %r8
xorq $0x1, %r8
movb %al, (%r13,%r8)
movq (%rbx,%rdi,8), %r8
movb %al, (%r13,%r8)
incq %rdi
jmp 0x1ccca6
movq (%rbx,%rsi,8), %rsi
xorq $0x1, %rsi
movb %al, (%r13,%rsi)
movq (%rbx,%rdx,8), %rdx
movb %al, (%r13,%rdx)
incq %rcx
jmp 0x1ccc82
movq %rbp, %r15
cmpq %r14, %r15
jae 0x1ccd47
movq 0x10(%r12), %rax
movl (%rax,%r15,8), %ecx
movq (%rax,%rcx,8), %rsi
movl %esi, %edx
shrq $0x20, %rsi
cmpq %rdx, %rsi
jae 0x1ccdd6
movq 0x90(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %r13, 0x10(%rsp)
movq 0x70(%rsp), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rdi
movq %r12, %rcx
movq 0x30(%rsp), %r8
movq %rbx, %r9
callq 0x1ccb5c
incq %r15
jmp 0x1ccce4
xorl %eax, %eax
cmpq %r14, %rbp
jae 0x1ccda8
movq 0x10(%r12), %rcx
movl (%rcx,%rbp,8), %edx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %edx
shrq $0x20, %rcx
cmpq %rdx, %rcx
jae 0x1ccdf5
leaq 0x1(%rcx), %rsi
cmpq %rdx, %rsi
jae 0x1ccd8d
movq (%rbx,%rsi,8), %rdi
xorq $0x1, %rdi
movb %al, (%r13,%rdi)
movq (%rbx,%rsi,8), %rdi
movb %al, (%r13,%rdi)
incq %rsi
jmp 0x1ccd6d
movq (%rbx,%rdx,8), %rdx
xorq $0x1, %rdx
movb %al, (%r13,%rdx)
movq (%rbx,%rcx,8), %rcx
movb %al, (%r13,%rcx)
incq %rbp
jmp 0x1ccd49
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2db89(%rip), %rdi     # 0x1fa947
leaq 0x2a714(%rip), %rsi     # 0x1f74d9
leaq 0x2dfd5(%rip), %rcx     # 0x1fada1
movl $0x32cf, %edx           # imm = 0x32CF
callq 0x2110
leaq 0x2db6a(%rip), %rdi     # 0x1fa947
leaq 0x2a6f5(%rip), %rsi     # 0x1f74d9
leaq 0x2dfb6(%rip), %rcx     # 0x1fada1
movl $0x32d7, %edx           # imm = 0x32D7
callq 0x2110
leaq 0x2db4b(%rip), %rdi     # 0x1fa947
leaq 0x2a6d6(%rip), %rsi     # 0x1f74d9
leaq 0x2df97(%rip), %rcx     # 0x1fada1
movl $0x32de, %edx           # imm = 0x32DE
callq 0x2110