// File: chhylp123[P]hifiasm/hic.cpp
// Function: assign_per_unitig_G_partition(G_partition*, unsigned long, hc_links*, bubble_type*, unsigned int)
void assign_per_unitig_G_partition(G_partition* g_p, uint64_t hap_n, hc_links* link, bubble_type* bub,
uint32_t bubble_first)
{
    double index_time = yak_realtime();
    reset_G_partition(g_p, hap_n);

    partition_warp* res = NULL;
    hc_edge *a = NULL;
    uint32_t i, a_n, v, u, uv = (uint32_t)-1, k, k_n, k_nv, k_nu, beg, sink, *b_a = NULL, b_a_n;
    
    if(bubble_first)
    {
        int c;
        kvec_t_u32_warp stack; kv_init(stack.a);
        uint8_t *color = NULL; CALLOC(color, hap_n);
        uint32_t n_bub = bub->f_bub + bub->b_bub;
        for (i = 0; i < n_bub; i++)
        {
            get_bubbles(bub, i, &beg, &sink, &b_a, &b_a_n, NULL);
            if(b_a_n == 2 && i < bub->f_bub)
            {
                continue;
            }
            ///full bubble do not overlap with any others
            ///broken bubbles might be, but should do nothing
            c = graph_bipartiteness(b_a, b_a_n, color, link, &stack);

            if(c == 0)
            {
                fprintf(stderr, "too good: s-utg%.6ul && e-utg%.6ul && %s\n",(beg>>1)+1, (sink>>1)+1, b_a_n != 4? "abnormal" : "normal");
            }
            if(c == -1)
            {
                fprintf(stderr, "too bad: s-utg%.6ul && e-utg%.6ul\n",(beg>>1)+1, (sink>>1)+1);
            }
            if(c == 1)
            {
                fprintf(stderr, "\nprefect=%u: s-utg%.6ul && e-utg%.6ul\n", b_a_n, (beg>>1)+1, (sink>>1)+1);
                
                
                for (k = 0; k < b_a_n; k++)
                {
                    if((color[b_a[k]>>1] & 2) == 0) fprintf(stderr, "ERROR\n");
                    if((color[b_a[k]>>1] & 4) == 0) fprintf(stderr, "0: utg%.6ul\n", (b_a[k]>>1)+1);
                }

                for (k = 0; k < b_a_n; k++)
                {
                    if((color[b_a[k]>>1] & 2) == 0) fprintf(stderr, "ERROR\n");
                    if((color[b_a[k]>>1] & 4) != 0) fprintf(stderr, "1: utg%.6ul\n", (b_a[k]>>1)+1);
                }

                for (k = 0; k < b_a_n; k++) color[b_a[k]>>1] = 0;
            }
        }
        free(color);
        kv_destroy(stack.a);
    }

    for (i = 0; i < hap_n; i++)
    {
        v = i;
        a = link->a.a[v].f.a;
        a_n = link->a.a[v].f.n;
        for (k = k_n = 0; k < a_n; k++)
        {
            if(a[k].del) continue;
            if(a[k].dis != RC_0) break;
            u = a[k].uID;
            k_n++;
        }
        if(k_n != 1)
        {   
            u = (uint32_t)-1;
            goto push_uv;
        } 
        
        a = link->a.a[u].f.a;
        a_n = link->a.a[u].f.n;
        for (k = k_n = 0; k < a_n; k++)
        {
            if(a[k].del) continue;
            if(a[k].dis != RC_0) break;
            uv = a[k].uID;
            k_n++;
        }
        if(k_n != 1 || uv != v)
        {
            u = (uint32_t)-1;
            goto push_uv;
        } 

        push_uv:
        k_nv = 0;k_nu = 0;

        // not such easy. need to deal with here very carefully
        // if(g_p->index[v] != (uint32_t)-1) continue; 
        // if(u != (uint32_t)-1 && g_p->index[u] != (uint32_t)-1) u = (uint32_t)-1;

        a = link->a.a[v].e.a;
        a_n = link->a.a[v].e.n;
        for (k = 0; k < a_n; k++)
        {
            if(a[k].del) continue;
            k_nv++;
        }
                
        if(u != (uint32_t)-1)
        {
            a = link->a.a[u].e.a;
            a_n = link->a.a[u].e.n;
            for (k = 0; k < a_n; k++)
            {
                if(a[k].del) continue;
                k_nu++;
            }
        }
        if(k_nv == 0) continue;
        if(k_nv > 0 && k_nu > 0 && v > u) continue;

        kv_pushp(partition_warp, *g_p, &res);
        kv_init(res->a);
        res->full_bub = 0;
        res->h[0] = 1; res->h[1] = 0;
        kv_push(uint32_t, res->a, v);
        if(u != (uint32_t)-1)
        {
            res->h[1] = 1;
            kv_push(uint32_t, res->a, u);
        }

        for (k = 0; k < res->h[0]; k++)
        {
            g_p->index[res->a.a[k]] = g_p->n-1;
            g_p->index[res->a.a[k]] = g_p->index[res->a.a[k]] << 1;
        } 

        for (; k < res->a.n; k++)
        {
            g_p->index[res->a.a[k]] = g_p->n-1;
            g_p->index[res->a.a[k]] = (g_p->index[res->a.a[k]] << 1) + 1;
        } 
    }
    fprintf(stderr, "[M::%s::%.3f]\n", __func__, yak_realtime()-index_time);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
callq 0x1b7ca0
movsd %xmm0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1d9af0
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movl $0xffffffff, -0x54(%rbp) # imm = 0xFFFFFFFF
movq $0x0, -0x78(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x1f42d7
movq $0x0, -0x98(%rbp)
movq $0x0, -0xa0(%rbp)
movq $0x0, -0x90(%rbp)
movq $0x0, -0xa8(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x2140
movq %rax, -0xa8(%rbp)
movq -0x20(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x20(%rbp), %rcx
addq 0x88(%rcx), %rax
movl %eax, -0xac(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0xac(%rbp), %eax
jae 0x1f42bf
movq -0x20(%rbp), %rdi
movl -0x44(%rbp), %eax
movl %eax, %esi
leaq -0x68(%rbp), %rdx
leaq -0x6c(%rbp), %rcx
leaq -0x78(%rbp), %r8
leaq -0x7c(%rbp), %r9
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x1c4b20
cmpl $0x2, -0x7c(%rbp)
jne 0x1f4065
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x1f4065
jmp 0x1f42b1
movq -0x78(%rbp), %rdi
movl -0x7c(%rbp), %esi
movq -0xa8(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0xa0(%rbp), %r8
callq 0x1f3900
movl %eax, -0x80(%rbp)
cmpl $0x0, -0x80(%rbp)
jne 0x1f40cc
movq 0x1cff4d(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x68(%rbp), %edx
shrl %edx
addl $0x1, %edx
movl -0x6c(%rbp), %ecx
shrl %ecx
addl $0x1, %ecx
movl -0x7c(%rbp), %esi
leaq 0x198d3e(%rip), %r8     # 0x38cdee
leaq 0x198d35(%rip), %rax    # 0x38cdec
cmpl $0x4, %esi
cmovneq %rax, %r8
leaq 0x198cfd(%rip), %rsi    # 0x38cdc2
movb $0x0, %al
callq 0x22a0
cmpl $-0x1, -0x80(%rbp)
jne 0x1f40fa
movq 0x1cff07(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x68(%rbp), %edx
shrl %edx
addl $0x1, %edx
movl -0x6c(%rbp), %ecx
shrl %ecx
addl $0x1, %ecx
leaq 0x198d02(%rip), %rsi    # 0x38cdf5
movb $0x0, %al
callq 0x22a0
cmpl $0x1, -0x80(%rbp)
jne 0x1f42af
movq 0x1cfed5(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movl -0x7c(%rbp), %edx
movl -0x68(%rbp), %ecx
shrl %ecx
addl $0x1, %ecx
movl -0x6c(%rbp), %r8d
shrl %r8d
addl $0x1, %r8d
leaq 0x198ced(%rip), %rsi    # 0x38ce18
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jae 0x1f41d6
movq -0xa8(%rbp), %rax
movq -0x78(%rbp), %rcx
movl -0x58(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x1f417e
movq 0x1cfe73(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x195938(%rip), %rsi    # 0x389aaf
movb $0x0, %al
callq 0x22a0
movq -0xa8(%rbp), %rax
movq -0x78(%rbp), %rcx
movl -0x58(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x1f41c6
movq 0x1cfe3a(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x78(%rbp), %rax
movl -0x58(%rbp), %ecx
movl (%rax,%rcx,4), %edx
shrl %edx
addl $0x1, %edx
leaq 0x198c80(%rip), %rsi    # 0x38ce3f
movb $0x0, %al
callq 0x22a0
jmp 0x1f41c8
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1f4139
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jae 0x1f427a
movq -0xa8(%rbp), %rax
movq -0x78(%rbp), %rcx
movl -0x58(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x1f4222
movq 0x1cfdcf(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x195894(%rip), %rsi    # 0x389aaf
movb $0x0, %al
callq 0x22a0
movq -0xa8(%rbp), %rax
movq -0x78(%rbp), %rcx
movl -0x58(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x1f426a
movq 0x1cfd96(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x78(%rbp), %rax
movl -0x58(%rbp), %ecx
movl (%rax,%rcx,4), %edx
shrl %edx
addl $0x1, %edx
leaq 0x198be9(%rip), %rsi    # 0x38ce4c
movb $0x0, %al
callq 0x22a0
jmp 0x1f426c
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1f41dd
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jae 0x1f42ad
movq -0xa8(%rbp), %rax
movq -0x78(%rbp), %rcx
movl -0x58(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
shrl %ecx
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1f4281
jmp 0x1f42af
jmp 0x1f42b1
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x1f4013
movq -0xa8(%rbp), %rdi
callq 0x2210
movq -0x90(%rbp), %rdi
callq 0x2210
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpq -0x10(%rbp), %rax
jae 0x1f4882
movl -0x44(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movl %eax, -0x48(%rbp)
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x48(%rbp), %eax
jae 0x1f4393
movq -0x40(%rbp), %rax
movl -0x58(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movb 0x18(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x1f4354
jmp 0x1f4388
movq -0x40(%rbp), %rax
movl -0x58(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x1f436b
jmp 0x1f4393
movq -0x40(%rbp), %rax
movl -0x58(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x50(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1f4332
cmpl $0x1, -0x5c(%rbp)
je 0x1f43a5
movl $0xffffffff, -0x50(%rbp) # imm = 0xFFFFFFFF
jmp 0x1f4460
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movl %eax, -0x48(%rbp)
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x48(%rbp), %eax
jae 0x1f4447
movq -0x40(%rbp), %rax
movl -0x58(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movb 0x18(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x1f4408
jmp 0x1f443c
movq -0x40(%rbp), %rax
movl -0x58(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x1f441f
jmp 0x1f4447
movq -0x40(%rbp), %rax
movl -0x58(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1f43e6
cmpl $0x1, -0x5c(%rbp)
jne 0x1f4455
movl -0x54(%rbp), %eax
cmpl -0x4c(%rbp), %eax
je 0x1f445e
movl $0xffffffff, -0x50(%rbp) # imm = 0xFFFFFFFF
jmp 0x1f4460
jmp 0x1f4460
movl $0x0, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x4c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, -0x48(%rbp)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x48(%rbp), %eax
jae 0x1f44dd
movq -0x40(%rbp), %rax
movl -0x58(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movb 0x18(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x1f44c9
jmp 0x1f44d2
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1f44a7
cmpl $-0x1, -0x50(%rbp)
je 0x1f4554
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl %eax, -0x48(%rbp)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x48(%rbp), %eax
jae 0x1f4552
movq -0x40(%rbp), %rax
movl -0x58(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movb 0x18(%rax), %al
shrb $0x7, %al
cmpb $0x0, %al
je 0x1f453e
jmp 0x1f4547
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x1f451c
jmp 0x1f4554
cmpl $0x0, -0x60(%rbp)
jne 0x1f455f
jmp 0x1f4874
cmpl $0x0, -0x60(%rbp)
jbe 0x1f4578
cmpl $0x0, -0x64(%rbp)
jbe 0x1f4578
movl -0x4c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jbe 0x1f4578
jmp 0x1f4874
jmp 0x1f457a
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1f45e8
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1f45aa
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xb8(%rbp)
jmp 0x1f45b8
movl $0x2, %eax
movq %rax, -0xb8(%rbp)
jmp 0x1f45b8
movq -0xb8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
imulq $0x48, 0x8(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%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 -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, 0x18(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1f46be
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1f467d
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xc0(%rbp)
jmp 0x1f468b
movl $0x2, %eax
movq %rax, -0xc0(%rbp)
jmp 0x1f468b
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 -0x4c(%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)
cmpl $-0x1, -0x50(%rbp)
je 0x1f4784
movq -0x38(%rbp), %rax
movl $0x1, 0x1c(%rax)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1f4763
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1f4722
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0xc8(%rbp)
jmp 0x1f4730
movl $0x2, %eax
movq %rax, -0xc8(%rbp)
jmp 0x1f4730
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 -0x50(%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 0x1f4784
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0x1f47fc
movq -0x8(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
movl %eax, %edx
movq -0x8(%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)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x58(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
movl (%rax,%rcx,4), %edx
shll %edx
movq -0x8(%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 0x1f478b
jmp 0x1f47fe
movl -0x58(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1f4872
movq -0x8(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
movl %eax, %edx
movq -0x8(%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)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl -0x58(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
movl (%rax,%rcx,4), %edx
shll %edx
addl $0x1, %edx
movq -0x8(%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 0x1f47fe
jmp 0x1f4874
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x1f42de
movq 0x1cf757(%rip), %rax    # 0x3c3fe0
movq (%rax), %rax
movq %rax, -0xd0(%rbp)
callq 0x1b7ca0
movq -0xd0(%rbp), %rdi
subsd -0x30(%rbp), %xmm0
leaq 0x197f5d(%rip), %rsi    # 0x38c808
leaq 0x1985a7(%rip), %rdx    # 0x38ce59
movb $0x1, %al
callq 0x22a0
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)