// File: chhylp123[P]hifiasm/Overlaps.cpp
// Function: init_hap_cov_t(ma_ug_t*, asg_t*, ma_hit_t_alloc*, R_to_U*, ma_hit_t_alloc*, ma_sub_t*, int, int, unsigned int)
hap_cov_t* init_hap_cov_t(ma_ug_t *ug, asg_t* read_g, ma_hit_t_alloc* sources, R_to_U* ruIndex, 
ma_hit_t_alloc* reverse_sources, ma_sub_t *coverage_cut, int max_hang, int min_ovlp, 
uint32_t is_collect_trans)
{
    uint32_t n_ux = ug->g->n_seq, i, k, j, v, rId, tn, is_Unitig, r_i, nv, w, C_bases;
    uint8_t *set = NULL; 
    hap_cov_t *x = NULL; CALLOC(x, 1);
    x->n = read_g->n_seq; 
    x->reverse_sources = reverse_sources;
    x->coverage_cut = coverage_cut;
    x->ruIndex = ruIndex;
    x->max_hang = max_hang;
    x->min_ovlp = min_ovlp;
    x->read_g = read_g;
    x->t_ch = NULL;
    kv_init(x->u_buffer.a);
    kv_init(x->tailIndex.a);
    kv_init(x->prevIndex.a);
    ma_utg_t* u = NULL;
    asg_arc_t *av = NULL;
    ma_hit_t *h = NULL;
    MALLOC(x->pos_idx, x->n); memset(x->pos_idx, -1, x->n*sizeof(uint64_t));
    CALLOC(set, read_g->n_seq<<1);
    CALLOC(x->cov, x->n); 
    for (i = 0; i < n_ux; i++)//get the coverage for each read
    {    
        if(ug->g->seq[i].del) continue;
        u = &(ug->u.a[i]);
        for (r_i = 0; r_i < u->n; r_i++) set[u->a[r_i]>>33] = 1;

        v = i<<1; 
        nv = asg_arc_n(ug->g, v);
        av = asg_arc_a(ug->g, v);
        for (k = 0; k < nv; k++)
        {
            w = av[k].v;
            if(av[k].del) continue;
            if(ug->g->seq[w>>1].del) continue;
            u = &(ug->u.a[w>>1]);
            for (r_i = 0; r_i < u->n; r_i++) set[u->a[r_i]>>33] = 1;
        }
        
        v = (i<<1)+1; 
        nv = asg_arc_n(ug->g, v);
        av = asg_arc_a(ug->g, v);
        for (k = 0; k < nv; k++)
        {
            w = av[k].v;
            if(av[k].del) continue;
            if(ug->g->seq[w>>1].del) continue;
            u = &(ug->u.a[w>>1]);
            for (r_i = 0; r_i < u->n; r_i++) set[u->a[r_i]>>33] = 1;
        }



        u = &(ug->u.a[i]); 
        for (k = 0; k < u->n; k++)
        {
            C_bases = 0;
            rId = u->a[k]>>33;
            for (j = 0; j < (uint64_t)(sources[rId].length); j++)
            {
                h = &(sources[rId].buffer[j]);
                tn = Get_tn((*h));
                if(read_g->seq[tn].del == 1)
                {
                    ///get the id of read that contains it 
                    // uint32_t tn0 = tn;
                    get_R_to_U(ruIndex, tn, &tn, &is_Unitig);
                    // if(tn != (uint32_t)-1 && is_Unitig != 1) {
                    //     fprintf(stderr, "[M::%s]\ttn::%u\tn_seq::%u\tis_Unitig::%u\ttn0::%u\n", __func__, tn, read_g->n_seq, is_Unitig, tn0); 
                    // }
                    if(tn == (uint32_t)-1 || is_Unitig == 1 || read_g->seq[tn].del == 1) continue;
                }
                if(read_g->seq[tn].del == 1) continue;
                if(!set[tn]) continue;
                C_bases += (Get_qe((*h)) - Get_qs((*h)));
            }
            x->cov[rId] = MAX(C_bases, x->cov[rId]);
        }
        

        
        u = &(ug->u.a[i]);
        for (r_i = 0; r_i < u->n; r_i++) set[u->a[r_i]>>33] = 0;

        v = i<<1; 
        nv = asg_arc_n(ug->g, v);
        av = asg_arc_a(ug->g, v);
        for (k = 0; k < nv; k++)
        {
            w = av[k].v;
            if(av[k].del) continue;
            if(ug->g->seq[w>>1].del) continue;
            u = &(ug->u.a[w>>1]);
            for (r_i = 0; r_i < u->n; r_i++) set[u->a[r_i]>>33] = 0;
        }
        
        v = (i<<1)+1; 
        nv = asg_arc_n(ug->g, v);
        av = asg_arc_a(ug->g, v);
        for (k = 0; k < nv; k++)
        {
            w = av[k].v;
            if(av[k].del) continue;
            if(ug->g->seq[w>>1].del) continue;
            u = &(ug->u.a[w>>1]);
            for (r_i = 0; r_i < u->n; r_i++) set[u->a[r_i]>>33] = 0;
        }
    }

    if(set) free(set);
    CALLOC(x->is_r_het, read_g->n_seq);
    set_r_het_flag(ug, read_g, coverage_cut, sources, ruIndex, x->is_r_het);

    x->t_ch = NULL;
    if(is_collect_trans) x->t_ch = init_trans_chain(ug, read_g->n_seq);
    
    return x;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x34(%rbp)
movq $0x0, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movl $0x1, %edi
movl $0xb0, %esi
callq 0x2140
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x70(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x28(%rax)
movl 0x10(%rbp), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x38(%rax)
movl 0x18(%rbp), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x3c(%rax)
movq -0x10(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x70(%rbp), %rax
movq $0x0, 0xa8(%rax)
movq -0x70(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x70(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x70(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x70(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x70(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x70(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x70(%rbp), %rax
movq $0x0, 0x88(%rax)
movq -0x70(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x70(%rbp), %rax
movq $0x0, 0x90(%rax)
movq $0x0, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x70(%rbp), %rax
movl (%rax), %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0x2270
movq %rax, %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x70(%rbp), %rax
movl (%rax), %eax
movl %eax, %edx
shlq $0x3, %rdx
movl $0xff, %esi
callq 0x2100
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shll %eax
movslq %eax, %rdi
movl $0x1, %esi
callq 0x2140
movq %rax, -0x68(%rbp)
movq -0x70(%rbp), %rax
movl (%rax), %eax
movl %eax, %edi
movl $0x4, %esi
callq 0x2140
movq %rax, %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0x12198a
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x38(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x121300
jmp 0x12197c
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x38(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x78(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x12134f
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x54(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movb $0x1, (%rax,%rcx)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x12131d
movl -0x38(%rbp), %eax
shll %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x44(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x44(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x121460
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1213dd
jmp 0x121452
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1213fd
jmp 0x121452
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x78(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x121450
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x54(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movb $0x1, (%rax,%rcx)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x12141e
jmp 0x121452
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1213a2
movl -0x38(%rbp), %eax
shll %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x44(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x44(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x121574
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1214f1
jmp 0x121566
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x121511
jmp 0x121566
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x78(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x121564
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x54(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movb $0x1, (%rax,%rcx)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x121532
jmp 0x121566
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1214b6
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x38(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x78(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x121706
movl $0x0, -0x60(%rbp)
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x3c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, -0x48(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x18(%rbp), %rcx
movl -0x48(%rbp), %edx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
jae 0x1216b2
movq -0x18(%rbp), %rax
movl -0x48(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0x40(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x1, %eax
jne 0x121661
movq -0x20(%rbp), %rdi
movl -0x4c(%rbp), %esi
leaq -0x4c(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0xd3d50
cmpl $-0x1, -0x4c(%rbp)
je 0x12165d
cmpl $0x1, -0x50(%rbp)
je 0x12165d
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x1, %eax
jne 0x12165f
jmp 0x1216a4
jmp 0x121661
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x4c(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x1, %eax
jne 0x121679
jmp 0x1216a4
movq -0x68(%rbp), %rax
movl -0x4c(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
jne 0x121688
jmp 0x1216a4
movq -0x88(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x88(%rbp), %rcx
movq (%rcx), %rcx
subl %ecx, %eax
addl -0x60(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1215c5
movl -0x60(%rbp), %eax
movq -0x70(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x48(%rbp), %edx
cmpl (%rcx,%rdx,4), %eax
jb 0x1216d0
movl -0x60(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0x1216e4
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x48(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %edx
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x48(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x121591
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x38(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x78(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x121755
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x54(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movb $0x0, (%rax,%rcx)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x121723
movl -0x38(%rbp), %eax
shll %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x44(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x44(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x121866
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1217e3
jmp 0x121858
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x121803
jmp 0x121858
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x78(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x121856
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x54(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movb $0x0, (%rax,%rcx)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x121824
jmp 0x121858
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1217a8
movl -0x38(%rbp), %eax
shll %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0x44(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0x44(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jae 0x12197a
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x80(%rbp), %rax
movl -0x3c(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x1218f7
jmp 0x12196c
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x121917
jmp 0x12196c
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x78(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x12196a
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl -0x54(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x21, %rcx
movb $0x0, (%rax,%rcx)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x121938
jmp 0x12196c
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1218bc
jmp 0x12197c
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x1212d5
cmpq $0x0, -0x68(%rbp)
je 0x12199a
movq -0x68(%rbp), %rdi
callq 0x2210
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edi
movl $0x1, %esi
callq 0x2140
movq %rax, %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x70(%rbp), %rax
movq 0xa0(%rax), %r9
callq 0xfc080
movq -0x70(%rbp), %rax
movq $0x0, 0xa8(%rax)
cmpl $0x0, 0x20(%rbp)
je 0x121a22
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %esi
callq 0xfc220
movq %rax, %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x70(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop