// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: clean_ul_re_correct_buf(ul_resolve_t*, unsigned long, unsigned long*)
uint64_t clean_ul_re_correct_buf(ul_resolve_t *uidx, uint64_t clean_dump, uint64_t *tot_circle)
{
    uint64_t k, occ, n_circle;
    for (k = occ = n_circle = 0; k < uidx->str_b.n_thread; k++) {
        occ += uidx->str_b.buf[k].n_correct; 
        n_circle += uidx->str_b.buf[k].n_circle;
        uidx->str_b.buf[k].n_correct = 0;
        uidx->str_b.buf[k].n_circle = 0;
        if(clean_dump) uidx->str_b.buf[k].res_dump.n = 0;
        uidx->str_b.buf[k].q.n = 0;
        uidx->str_b.buf[k].t.n = 0;
        uidx->str_b.buf[k].b.n = 0;
        uidx->str_b.buf[k].f.n = 0;
        uidx->str_b.buf[k].p.n = 0;
        uidx->str_b.buf[k].o.n = 0;
        uidx->str_b.buf[k].u.n = 0;
        uidx->str_b.buf[k].vis.n = 0;
        uidx->str_b.buf[k].sc.n = 0;
        uidx->str_b.buf[k].snp.n = 0;
    }
    (*tot_circle) = n_circle;
    return occ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x1e0(%rcx), %rax
jae 0x33d1a9
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq 0x318(%rax), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq 0x320(%rax), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, 0x318(%rax)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, 0x320(%rax)
cmpq $0x0, -0x10(%rbp)
je 0x33d061
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, 0x300(%rax)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, 0x60(%rax)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, 0x78(%rax)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, 0x90(%rax)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, 0xa8(%rax)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, 0xc0(%rax)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rax
imulq $0x328, -0x20(%rbp), %rcx # imm = 0x328
addq %rcx, %rax
movq $0x0, 0xd8(%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x33cf98
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)