// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: init_ug_clean_t(ug_opt_t*, asg_t*, unsigned char, unsigned char, long, double, double, long)
ug_clean_t *init_ug_clean_t(ug_opt_t *uopt, asg_t *sg, uint8_t is_ou, uint8_t is_trio, int64_t max_ext, double len_rat, double ou_rat, int64_t min_ou)
{
    uint64_t i;
    ug_clean_t *sl; CALLOC(sl, 1);
    ma_ug_t *ug = ma_ug_gen(sg);
    for (i = 0; i < ug->g->n_seq; ++i) {
        if(ug->g->seq[i].del) continue;
        ug->g->seq[i].c = PRIMARY_LABLE;
    }
    MALLOC(sl->idx, (ug->g->n_seq<<1)); memset(sl->idx, -1, sizeof((*(sl->idx)))*(ug->g->n_seq<<1));
    MALLOC(sl->bid, (ug->g->n_seq<<1)); memset(sl->bid, -1, sizeof((*(sl->bid)))*(ug->g->n_seq<<1));
    sl->uopt = uopt; sl->sg = sg; sl->ug = ug; sl->idx_n = sl->bid_n = ug->g->n_seq<<1;
    memset(&(sl->b), 0, sizeof(sl->b)); CALLOC(sl->b.a, (ug->g->n_seq<<1));
    sl->is_ou = is_ou;
    sl->is_trio = is_trio;
    sl->max_ext = max_ext;
    sl->len_rat = len_rat;
    sl->ou_rat = ou_rat;
    sl->min_ou = min_ou;
    if(is_ou) update_ug_ou(sl->ug, sl->sg);
    return sl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %cl, %al
movb %dl, %cl
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %cl, -0x11(%rbp)
movb %al, -0x12(%rbp)
movq %r8, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movsd %xmm1, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x1, %edi
movl $0xc8, %esi
callq 0x2140
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0xe5910
movq %rax, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x50(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x379910
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0x40(%rbp), %rcx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x3798ed
jmp 0x379902
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq -0x40(%rbp), %rcx
movb $0x0, 0x4(%rax,%rcx,8)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3798b4
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x48(%rbp), %rax
movq 0x80(%rax), %rdi
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movslq %eax, %rdx
shlq $0x2, %rdx
movl $0xff, %esi
callq 0x2100
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x48(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movslq %eax, %rdx
shlq $0x2, %rdx
movl $0xff, %esi
callq 0x2100
movq -0x8(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
shll %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x94(%rax)
movq -0x48(%rbp), %rax
movl %ecx, 0x90(%rax)
movq -0x48(%rbp), %rdi
addq $0x18, %rdi
xorl %esi, %esi
movl $0x68, %edx
callq 0x2100
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movslq %eax, %rdi
movl $0x1c, %esi
callq 0x2140
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x18(%rax)
movb -0x11(%rbp), %cl
movq -0x48(%rbp), %rax
movb %cl, 0x98(%rax)
movb -0x12(%rbp), %cl
movq -0x48(%rbp), %rax
movb %cl, 0x99(%rax)
movq -0x20(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0xa0(%rax)
movsd -0x28(%rbp), %xmm0
movq -0x48(%rbp), %rax
movsd %xmm0, 0xb0(%rax)
movsd -0x30(%rbp), %xmm0
movq -0x48(%rbp), %rax
movsd %xmm0, 0xb8(%rax)
movq -0x38(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0xc0(%rax)
cmpb $0x0, -0x11(%rbp)
je 0x379ac1
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0xe5720
movq -0x48(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)