// File: chhylp123[P]hifiasm/hic.cpp
// Function: print_bubbles(ma_ug_t*, bubble_type*, kvec_pe_hit*, hc_links*, ha_ug_index*)
void print_bubbles(ma_ug_t* ug, bubble_type* bub, kvec_pe_hit* hits, hc_links* link, ha_ug_index* idx)
{
    uint64_t tLen, t_utg, i, k;
    uint32_t beg, sink, n, *a;
    for (i = 0, tLen = 0; i < bub->ug->u.n; i++) tLen += bub->ug->u.a[i].len;
    fprintf(stderr, "[M::%s] # unitigs: %lu, # bases: %lu\n",  __func__, bub->ug->u.n, tLen);
    for (i = 0, tLen = 0, t_utg = 0; i < bub->f_bub; i++)
    {
        get_bubbles(bub, i, &beg, &sink, &a, &n, NULL);
        t_utg += n;
        for (k = 0; k < n; k++)
        {
            tLen +=bub->ug->u.a[(a[k]>>1)].len;
        }
    }
    fprintf(stderr, "[M::%s] # bubbles: %lu, # unitigs: %lu, # bases: %lu\n",  __func__, 
    Get_bub_num(*bub), t_utg, tLen);


    for (i = 0, tLen = 0, t_utg = 0; i < ug->g->n_seq; i++)
    {
        if(IF_BUB(i, *bub))
        {
            t_utg++;
            tLen +=bub->ug->u.a[i].len;
        }
    }
    fprintf(stderr, "[M::%s] # bubbles: %lu, # unitigs: %lu, # bases: %lu\n",  __func__, 
    Get_bub_num(*bub), t_utg, tLen);

    for (i = 0, tLen = 0, t_utg = 0; i < ug->g->n_seq; i++)
    {
        if(IF_HET(i, *bub))
        {
            t_utg++;
            tLen +=bub->ug->u.a[i].len;
        }
    }
    fprintf(stderr, "[M::%s] # het unitigs: %lu, # het bases: %lu\n",  __func__, t_utg, tLen);

    uint8_t* flag; CALLOC(flag, ug->g->n_seq);
    uint64_t s_uid, e_uid, shif = 64 - idx->uID_bits;
    if(hits)
    {
        for (k = 0; k < hits->a.n; ++k) 
        {
            s_uid = ((hits->a.a[k].s<<1)>>shif);
            e_uid = ((hits->a.a[k].e<<1)>>shif);
            if(bub->index[s_uid] == (uint32_t)-1 || bub->index[e_uid] == (uint32_t)-1) continue;
            if(IF_BUB(s_uid, *bub) && IF_BUB(e_uid, *bub))
            {
                flag[s_uid] |= 1;
                flag[e_uid] |= 1;
                continue;
            }
            if(IF_HET(s_uid, *bub) && IF_HET(e_uid, *bub))
            {
                flag[s_uid] |= 4;
                flag[e_uid] |= 4;
                continue;
            }
            if(IF_BUB(s_uid, *bub)) flag[s_uid] |= 2, flag[e_uid] |= 2;
            if(IF_BUB(e_uid, *bub)) flag[e_uid] |= 2, flag[s_uid] |= 2;
        }
    }
    else if(link)
    {
        for (i = 0; i < link->a.n; i++)
        {
            for (k = 0; k < link->a.a[i].e.n; ++k) 
            {
                if(link->a.a[i].e.a[k].del) continue;
                s_uid = i;
                e_uid = link->a.a[i].e.a[k].uID;
                if(bub->index[s_uid] == (uint32_t)-1 || bub->index[e_uid] == (uint32_t)-1) continue;
                if(IF_BUB(s_uid, *bub) && IF_BUB(e_uid, *bub))
                {
                    flag[s_uid] |= 1;
                    flag[e_uid] |= 1;
                    continue;
                }
                if(IF_HET(s_uid, *bub) && IF_HET(e_uid, *bub))
                {
                    flag[s_uid] |= 4;
                    flag[e_uid] |= 4;
                    continue;
                }
                if(IF_BUB(s_uid, *bub)) flag[s_uid] |= 2, flag[e_uid] |= 2;
                if(IF_BUB(e_uid, *bub)) flag[e_uid] |= 2, flag[s_uid] |= 2;
            }
        }
    }
    



    for (i = 0, tLen = 0, t_utg = 0; i < ug->g->n_seq; i++)
    {
        if(flag[i] & (uint32_t)1)
        {
            t_utg++;
            tLen +=bub->ug->u.a[i].len;
        } 
    }
    fprintf(stderr, "[M::%s] # bubble-chained unitigs: %lu, # bubble-chained bases: %lu\n",  
                    __func__, t_utg, tLen);

    for (i = 0, tLen = 0, t_utg = 0; i < ug->g->n_seq; i++)
    {
        if((flag[i] & (uint32_t)1) || (flag[i] & (uint32_t)2))
        {
            t_utg++;
            tLen +=bub->ug->u.a[i].len;
        } 
    }
    fprintf(stderr, "[M::%s] # (bubble && het)-chained unitigs: %lu, # (bubble && het)-chained bases: %lu\n",  
                    __func__, t_utg, tLen);


    for (i = 0, tLen = 0, t_utg = 0; i < ug->g->n_seq; i++)
    {
        if((flag[i] & (uint32_t)1) || (flag[i] & (uint32_t)2) || (flag[i] & (uint32_t)4))
        {
            t_utg++;
            tLen +=bub->ug->u.a[i].len;
        } 
    }
    fprintf(stderr, "[M::%s] # (bubble || het)-chained unitigs: %lu, # (bubble || het)-chained bases: %lu\n",  
                    __func__, t_utg, tLen);
    free(flag);


    fprintf(stderr, "************bubble utgs************\n");
    uint64_t pathLen;
    for (i = 0, tLen = 0, t_utg = 0; i < bub->f_bub; i++)
    {
        get_bubbles(bub, i, &beg, &sink, &a, &n, &pathLen);
        t_utg += n;
        fprintf(stderr, "(full-%lu)\tbeg:utg%.6u\tsink:utg%.6u\tpathLen:%lu\t%s\n", 
        i, (beg>>1)+1, (sink>>1)+1, pathLen, i < bub->s_bub? "s-bub":(i<bub->f_bub?"f-bub":"b-bub"));
        for (k = 0; k < n; k++)
        {
            tLen +=bub->ug->u.a[(a[k]>>1)].len;
            fprintf(stderr, "utg%.6u,", (a[k]>>1)+1);
        }
        fprintf(stderr, "\n");
        ///if(i < bub->s_bub && (n != 4 && n != 2 && n != 1)) fprintf(stderr, "weird\n");
    }

    for (i = bub->f_bub, tLen = 0, t_utg = 0; i < bub->f_bub + bub->b_bub; i++)
    {
        get_bubbles(bub, i, &beg, &sink, &a, &n, &pathLen);
        t_utg += n;
        fprintf(stderr, "(broken-%lu)\tbeg:utg%.6u\tsink:utg%.6u\tpathLen:%lu\t%s\n", 
        i, (beg>>1)+1, (sink>>1)+1, pathLen, i < bub->s_bub? "s-bub":(i<bub->f_bub?"f-bub":"b-bub"));
        for (k = 0; k < n; k++)
        {
            tLen +=bub->ug->u.a[(a[k]>>1)].len;
            fprintf(stderr, "utg%.6u,", (a[k]>>1)+1);
        }
        fprintf(stderr, "\n");
    }

    // fprintf(stderr, "************het utgs************\n");
    // for (i = 0; i < ug->g->n_seq; i++)
    // {
    //     if(IF_HET(i, *bub)) fprintf(stderr, "utg%.6lu\n", i+1);
    // }
    // fprintf(stderr, "************het utgs************\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpq (%rcx), %rax
jae 0x1ca5d3
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1ca58f
movq 0x1f9a06(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rcx
movq -0x30(%rbp), %r8
leaq 0x1c1aff(%rip), %rsi    # 0x38c0f2
leaq 0x1c1b1e(%rip), %rdx    # 0x38c118
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x1ca6c8
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x4c(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq -0x60(%rbp), %r8
leaq -0x54(%rbp), %r9
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x1c4b20
movl -0x54(%rbp), %eax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl -0x54(%rbp), %ecx
cmpq %rcx, %rax
jae 0x1ca6b5
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
movq -0x48(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x1ca668
jmp 0x1ca6b7
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1ca619
movq 0x1f9911(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
subq $0x1, %rcx
movq -0x38(%rbp), %r8
movq -0x30(%rbp), %r9
leaq 0x1c1a39(%rip), %rsi    # 0x38c126
leaq 0x1c1a24(%rip), %rdx    # 0x38c118
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x1ca792
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1ca782
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x1ca784
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1ca713
movq 0x1f9847(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
subq $0x1, %rcx
movq -0x38(%rbp), %r8
movq -0x30(%rbp), %r9
leaq 0x1c196f(%rip), %rsi    # 0x38c126
leaq 0x1c195a(%rip), %rdx    # 0x38c118
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x1ca85c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x1ca84c
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x1ca84e
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1ca7dd
movq 0x1f977d(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %r8
leaq 0x1c18e7(%rip), %rsi    # 0x38c15c
leaq 0x1c189c(%rip), %rdx    # 0x38c118
movb $0x0, %al
callq 0x22a0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edi
movl $0x1, %esi
callq 0x2140
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rcx
movl $0x40, %eax
subq 0x18(%rcx), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1caac8
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1caac3
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x48(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
shlq %rax
movq -0x80(%rbp), %rcx
shrq %cl, %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x48(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shlq %rax
movq -0x80(%rbp), %rcx
shrq %cl, %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
je 0x1ca945
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x78(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jne 0x1ca94a
jmp 0x1caab2
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1ca9b7
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x78(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1ca9b7
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x1, %edx
movb %dl, (%rax,%rcx)
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x1, %edx
movb %dl, (%rax,%rcx)
jmp 0x1caab2
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x1caa24
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x78(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x1caa24
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x4, %edx
movb %dl, (%rax,%rcx)
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x4, %edx
movb %dl, (%rax,%rcx)
jmp 0x1caab2
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1caa6a
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x2, %edx
movb %dl, (%rax,%rcx)
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x2, %edx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x78(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1caab0
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x2, %edx
movb %dl, (%rax,%rcx)
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x2, %edx
movb %dl, (%rax,%rcx)
jmp 0x1caab2
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x1ca8c9
jmp 0x1cad1e
cmpq $0x0, -0x20(%rbp)
je 0x1cad1c
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1cad1a
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
imulq $0x30, -0x40(%rbp), %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
jae 0x1cad07
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x40(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x48(%rbp), %rcx
addq %rcx, %rax
movb 0x18(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x1cab3c
jmp 0x1cacf6
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
imulq $0x30, -0x40(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x48(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
je 0x1cab89
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x78(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jne 0x1cab8e
jmp 0x1cacf6
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1cabfb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x78(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1cabfb
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x1, %edx
movb %dl, (%rax,%rcx)
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x1, %edx
movb %dl, (%rax,%rcx)
jmp 0x1cacf6
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x1cac68
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x78(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x1cac68
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x4, %edx
movb %dl, (%rax,%rcx)
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x4, %edx
movb %dl, (%rax,%rcx)
jmp 0x1cacf6
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x70(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1cacae
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x2, %edx
movb %dl, (%rax,%rcx)
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x2, %edx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x78(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1cacf4
movq -0x68(%rbp), %rax
movq -0x78(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x2, %edx
movb %dl, (%rax,%rcx)
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl $0x2, %edx
movb %dl, (%rax,%rcx)
jmp 0x1cacf6
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x1caaf4
jmp 0x1cad09
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1caadb
jmp 0x1cad1c
jmp 0x1cad1e
movq $0x0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x1cada7
movq -0x68(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1cad97
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x1cad99
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1cad36
movq 0x1f9232(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %r8
leaq 0x1c13ca(%rip), %rsi    # 0x38c18a
leaq 0x1c1351(%rip), %rdx    # 0x38c118
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x1cae6e
movq -0x68(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x1cae2a
movq -0x68(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1cae5b
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x1cae5d
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1cade6
movq 0x1f916b(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %r8
leaq 0x1c1347(%rip), %rsi    # 0x38c1ce
leaq 0x1c128a(%rip), %rdx    # 0x38c118
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x1caf4d
movq -0x68(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x1caf09
movq -0x68(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x1caf09
movq -0x68(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x1caf3a
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
imulq $0x28, -0x40(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x1caf3c
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1caead
movq 0x1f908c(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %r8
leaq 0x1c12be(%rip), %rsi    # 0x38c224
leaq 0x1c11ab(%rip), %rdx    # 0x38c118
movb $0x0, %al
callq 0x22a0
movq -0x68(%rbp), %rdi
callq 0x2210
movq 0x1f905c(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x1c12ec(%rip), %rsi    # 0x38c27a
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x1cb179
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x4c(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq -0x60(%rbp), %r8
leaq -0x54(%rbp), %r9
leaq -0x88(%rbp), %rax
movq %rax, (%rsp)
callq 0x1c4b20
movl -0x54(%rbp), %eax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x1f8fe4(%rip), %rax    # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0x4c(%rbp), %eax
shrl %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
movl -0x50(%rbp), %eax
shrl %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
jae 0x1cb059
leaq 0x1c1283(%rip), %rax    # 0x38c2d3
movq %rax, -0xb0(%rbp)
jmp 0x1cb098
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x1cb07a
leaq 0x1c1268(%rip), %rax    # 0x38c2d9
movq %rax, -0xb8(%rbp)
jmp 0x1cb08a
leaq 0x1c125e(%rip), %rax    # 0x38c2df
movq %rax, -0xb8(%rbp)
jmp 0x1cb08a
movq -0xb8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x90(%rbp), %r9
movl -0x94(%rbp), %r8d
movl -0x98(%rbp), %ecx
movq -0xa0(%rbp), %rdx
movq -0xa8(%rbp), %rdi
movq -0xb0(%rbp), %rax
leaq 0x1c11d7(%rip), %rsi    # 0x38c29f
movq %rax, (%rsp)
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl -0x54(%rbp), %ecx
cmpq %rcx, %rax
jae 0x1cb150
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
movq -0x48(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x1f8ebf(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x60(%rbp), %rax
movq -0x48(%rbp), %rcx
movl (%rax,%rcx,4), %edx
shrl %edx
addl $0x1, %edx
leaq 0x1c11aa(%rip), %rsi    # 0x38c2e5
movb $0x0, %al
callq 0x22a0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x1cb0db
movq 0x1f8e89(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x1bb8c7(%rip), %rsi    # 0x386a28
movb $0x0, %al
callq 0x22a0
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1cafad
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x80(%rcx), %rcx
movq -0x10(%rbp), %rdx
addq 0x88(%rdx), %rcx
cmpq %rcx, %rax
jae 0x1cb372
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x4c(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq -0x60(%rbp), %r8
leaq -0x54(%rbp), %r9
leaq -0x88(%rbp), %rax
movq %rax, (%rsp)
callq 0x1c4b20
movl -0x54(%rbp), %eax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x1f8deb(%rip), %rax    # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0xd8(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl -0x4c(%rbp), %eax
shrl %eax
addl $0x1, %eax
movl %eax, -0xc8(%rbp)
movl -0x50(%rbp), %eax
shrl %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
jae 0x1cb252
leaq 0x1c108a(%rip), %rax    # 0x38c2d3
movq %rax, -0xe0(%rbp)
jmp 0x1cb291
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x1cb273
leaq 0x1c106f(%rip), %rax    # 0x38c2d9
movq %rax, -0xe8(%rbp)
jmp 0x1cb283
leaq 0x1c1065(%rip), %rax    # 0x38c2df
movq %rax, -0xe8(%rbp)
jmp 0x1cb283
movq -0xe8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xc0(%rbp), %r9
movl -0xc4(%rbp), %r8d
movl -0xc8(%rbp), %ecx
movq -0xd0(%rbp), %rdx
movq -0xd8(%rbp), %rdi
movq -0xe0(%rbp), %rax
leaq 0x1c102d(%rip), %rsi    # 0x38c2ee
movq %rax, (%rsp)
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl -0x54(%rbp), %ecx
cmpq %rcx, %rax
jae 0x1cb349
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq -0x60(%rbp), %rcx
movq -0x48(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x1f8cc6(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x60(%rbp), %rax
movq -0x48(%rbp), %rcx
movl (%rax,%rcx,4), %edx
shrl %edx
addl $0x1, %edx
leaq 0x1c0fb1(%rip), %rsi    # 0x38c2e5
movb $0x0, %al
callq 0x22a0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x1cb2d4
movq 0x1f8c90(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x1bb6ce(%rip), %rsi    # 0x386a28
movb $0x0, %al
callq 0x22a0
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1cb198
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax,%rax)