// File: chhylp123[P]hifiasm/hic.cpp
// Function: phase_bubble(unsigned long, bub_p_t_warp*, bubble_type*, unsigned char*, ma_ug_t const*, min_cut_t*, hc_links*, G_partition*)
void phase_bubble(uint64_t bid, bub_p_t_warp *b, bubble_type* bub, uint8_t* flag, const ma_ug_t *ug, 
min_cut_t* m, hc_links* link, G_partition* x)
{
    #define HAP1_LAB 1
    #define HAP2_LAB 2

    partition_warp* res = NULL;
    kv_pushp(partition_warp, *x, &res);
    memset(flag, 0, ug->g->n_seq);
    uint32_t beg, sink, n, *a, i, k;
    get_bubbles(bub, bid, &beg, &sink, &a, &n, NULL);
    res->full_bub = 0;
    trace_phase_path((ma_ug_t *)ug, beg, sink, b, m, flag, HAP1_LAB);
    trace_phase_path((ma_ug_t *)ug, beg, sink, b, m, flag, HAP2_LAB);
    kv_init(res->a);
    for (i = 0; i < ug->g->n_seq; i++)
    {
        if(flag[i] & (uint8_t)HAP1_LAB) kv_push(uint32_t, res->a, i);
    }
    res->h[0] = res->a.n;
    for (i = 0; i < ug->g->n_seq; i++)
    {
        if(flag[i] & (uint8_t)HAP2_LAB) kv_push(uint32_t, res->a, i);
    }
    res->h[1] = res->a.n - res->h[0];
    if(n == 2) res->full_bub = 1;
    if(res->full_bub == 0)
    {
        double self = 0, intersec = 0;
        uint32_t *h0 = NULL, *h1 = NULL;
        h0 = res->a.a; h1 = res->a.a + res->h[0];
        self += get_co_weight(h0, res->h[0], h0, res->h[0], m);
        self += get_co_weight(h1, res->h[1], h1, res->h[1], m);

        intersec += get_co_weight(h0, res->h[0], h1, res->h[1], m);
        intersec = intersec * 2;

        if(self > intersec) res->full_bub = 1;
    }

    if(res->full_bub == 0)
    {
        res->a.n = 0;
        uint32_t v, u = 0, uv, k_n, pre_n = x->n;
        hc_linkeage* t = NULL;
        x->n--;
        for (i = 0; i < n; i++)
        {
            v = a[i]>>1;
            t = &(link->a.a[v]);
            for (k = k_n = 0; k < t->f.n; k++)
            {
                if(t->f.a[k].del) continue;
                k_n++;
                u = t->f.a[k].uID;
            }
            if(k_n != 1) continue;

            t = &(link->a.a[u]);
            for (k = k_n = 0; k < t->f.n; k++)
            {
                if(t->f.a[k].del) continue;
                k_n++;
                uv = t->f.a[k].uID;
            }
            if(k_n != 1) continue;
            if(uv != v) continue;
            
            ///avoid dups
            for (k = 0; k < i; k++)
            {
                if((a[k]>>1) == u) break;
            }
            if(k < i) continue;
            

            kv_pushp(partition_warp, *x, &res);
            if(x->n > pre_n) kv_init(res->a);
            res->full_bub = 0;
            res->h[0] = res->h[1] = 1;
            kv_push(uint32_t, res->a, v);
            kv_push(uint32_t, res->a, u);

            for (k = 0; k < res->a.n; k++)
            {
                x->index[res->a.a[k]] = x->n-1;
            }
        }
    }
    else
    {
        for (k = 0; k < res->a.n; k++)
        {
            x->index[res->a.a[k]] = x->n-1;
        }
    }
    
    /*******************************for debug************************************/
    // for (i = 0; i < ug->g->n_seq; i++)
    // {
    //     if(flag[i] & (uint8_t)3)
    //     {
    //         uint32_t k;
    //         for (k = 0; k < n; k++)
    //         {
    //             if((a[k]>>1) == i)
    //             {
    //                 break;
    //             }
    //         }

    //         if(k == n) fprintf(stderr, "ERROR5\n");
    //     }
    // }
    /*******************************for debug************************************/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
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 $0x0, -0x38(%rbp)
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1daa81
movq 0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1daa43
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xa0(%rbp)
jmp 0x1daa51
movl $0x2, %eax
movq %rax, -0xa0(%rbp)
jmp 0x1daa51
movq -0xa0(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x18(%rbp), %rax
imulq $0x48, 0x8(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x14(%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2100
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
leaq -0x40(%rbp), %rcx
leaq -0x50(%rbp), %r8
leaq -0x44(%rbp), %r9
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x1c4b20
movq -0x38(%rbp), %rax
movb $0x0, 0x20(%rax)
movq -0x28(%rbp), %rdi
movl -0x3c(%rbp), %esi
movl -0x40(%rbp), %edx
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x20(%rbp), %r9
movl $0x1, (%rsp)
callq 0x1d9cf0
movq -0x28(%rbp), %rdi
movl -0x3c(%rbp), %esi
movl -0x40(%rbp), %edx
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x20(%rbp), %r9
movl $0x2, (%rsp)
callq 0x1d9cf0
movq -0x38(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x38(%rbp), %rax
movq $0x0, (%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x10(%rax)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x28(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x1dac38
movq -0x20(%rbp), %rax
movl -0x54(%rbp), %ecx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1dac28
jmp 0x1dab96
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1dac07
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1dabc6
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xa8(%rbp)
jmp 0x1dabd4
movl $0x2, %eax
movq %rax, -0xa8(%rbp)
jmp 0x1dabd4
movq -0xa8(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x54(%rbp), %edx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movl %edx, (%rax,%rcx,4)
jmp 0x1dac28
jmp 0x1dac2a
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x1dab61
movq -0x38(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x18(%rax)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x28(%rbp), %rcx
movq 0x18(%rcx), %rcx
movl 0x14(%rcx), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jae 0x1dad26
movq -0x20(%rbp), %rax
movl -0x54(%rbp), %ecx
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1dad16
jmp 0x1dac84
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1dacf5
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1dacb4
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xb0(%rbp)
jmp 0x1dacc2
movl $0x2, %eax
movq %rax, -0xb0(%rbp)
jmp 0x1dacc2
movq -0xb0(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x54(%rbp), %edx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movl %edx, (%rax,%rcx,4)
jmp 0x1dad16
jmp 0x1dad18
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x1dac4f
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
movl 0x18(%rcx), %ecx
subq %rcx, %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x1c(%rax)
cmpl $0x2, -0x44(%rbp)
jne 0x1dad4e
movq -0x38(%rbp), %rax
movb $0x1, 0x20(%rax)
movq -0x38(%rbp), %rax
movzbl 0x20(%rax), %eax
cmpl $0x0, %eax
jne 0x1dae48
xorps %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movl 0x18(%rcx), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x18(%rax), %esi
movq -0x70(%rbp), %rdx
movq -0x38(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x30(%rbp), %r8
callq 0x1da930
addsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x78(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x1c(%rax), %esi
movq -0x78(%rbp), %rdx
movq -0x38(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x30(%rbp), %r8
callq 0x1da930
addsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x70(%rbp), %rdi
movq -0x38(%rbp), %rax
movl 0x18(%rax), %esi
movq -0x78(%rbp), %rdx
movq -0x38(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x30(%rbp), %r8
callq 0x1da930
addsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd 0x1a74c0(%rip), %xmm0   # 0x3822e8
mulsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x60(%rbp), %xmm0
ucomisd -0x68(%rbp), %xmm0
jbe 0x1dae46
movq -0x38(%rbp), %rax
movb $0x1, 0x20(%rax)
jmp 0x1dae48
movq -0x38(%rbp), %rax
movzbl 0x20(%rax), %eax
cmpl $0x0, %eax
jne 0x1db29d
movq -0x38(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x80(%rbp)
movq 0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x8c(%rbp)
movq $0x0, -0x98(%rbp)
movq 0x18(%rbp), %rax
movq (%rax), %rcx
addq $-0x1, %rcx
movq %rcx, (%rax)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x44(%rbp), %eax
jae 0x1db29b
movq -0x50(%rbp), %rax
movl -0x54(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl %eax
movl %eax, -0x7c(%rbp)
movq 0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x7c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movl $0x0, -0x88(%rbp)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
movq -0x98(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x1daf43
movq -0x98(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x58(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movb 0x18(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x1daf0e
jmp 0x1daf38
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
movq -0x98(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x58(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x80(%rbp)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1daedd
cmpl $0x1, -0x88(%rbp)
je 0x1daf51
jmp 0x1db28d
movq 0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x80(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movl $0x0, -0x88(%rbp)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
movq -0x98(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x1dafe4
movq -0x98(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x58(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movb 0x18(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x1dafac
jmp 0x1dafd9
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
movq -0x98(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x58(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x84(%rbp)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1daf7b
cmpl $0x1, -0x88(%rbp)
je 0x1daff2
jmp 0x1db28d
movl -0x84(%rbp), %eax
cmpl -0x7c(%rbp), %eax
je 0x1db002
jmp 0x1db28d
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x54(%rbp), %eax
jae 0x1db031
movq -0x50(%rbp), %rax
movl -0x58(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shrl %eax
cmpl -0x80(%rbp), %eax
jne 0x1db024
jmp 0x1db031
jmp 0x1db026
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1db009
movl -0x58(%rbp), %eax
cmpl -0x54(%rbp), %eax
jae 0x1db03e
jmp 0x1db28d
jmp 0x1db040
movq 0x18(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1db0ae
movq 0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1db070
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xb8(%rbp)
jmp 0x1db07e
movl $0x2, %eax
movq %rax, -0xb8(%rbp)
jmp 0x1db07e
movq -0xb8(%rbp), %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq 0x18(%rbp), %rax
imulq $0x48, 0x8(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq 0x18(%rbp), %rax
movq (%rax), %rax
movl -0x8c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x1db107
movq -0x38(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x38(%rbp), %rax
movq $0x0, (%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x38(%rbp), %rax
movb $0x0, 0x20(%rax)
movq -0x38(%rbp), %rax
movl $0x1, 0x1c(%rax)
movq -0x38(%rbp), %rax
movl $0x1, 0x18(%rax)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1db196
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1db155
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xc0(%rbp)
jmp 0x1db163
movl $0x2, %eax
movq %rax, -0xc0(%rbp)
jmp 0x1db163
movq -0xc0(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x7c(%rbp), %edx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movl %edx, (%rax,%rcx,4)
jmp 0x1db1b7
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1db228
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1db1e7
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xc8(%rbp)
jmp 0x1db1f5
movl $0x2, %eax
movq %rax, -0xc8(%rbp)
jmp 0x1db1f5
movq -0xc8(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
shlq $0x2, %rsi
callq 0x2360
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x80(%rbp), %edx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movl %edx, (%rax,%rcx,4)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1db28b
movq 0x18(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
movl %eax, %edx
movq 0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x58(%rbp), %esi
movl (%rcx,%rsi,4), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1db24e
jmp 0x1db28d
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x1dae98
jmp 0x1db2e3
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1db2e1
movq 0x18(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
movl %eax, %edx
movq 0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x58(%rbp), %esi
movl (%rcx,%rsi,4), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1db2a4
jmp 0x1db2e3
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)