// File: chhylp123[P]hifiasm/hic.cpp
// Function: print_bubble_chain(bubble_type*)
void print_bubble_chain(bubble_type* bub)
{
    uint32_t m, i, k;
    uint32_t beg, sink, *a = NULL, n;
    uint64_t bid;
    ma_utg_t *u = NULL; 
    for (m = 0; m < bub->chain_weight.n; m++)
    {
        if(bub->chain_weight.a[m].del) continue;
        u = &(bub->b_ug->u.a[bub->chain_weight.a[m].id]);
        fprintf(stderr, "\nChain_id=%lu\n", bub->chain_weight.a[m].id);
        for (i = 0; i < u->n; i++)
        {
            bid = u->a[i]>>33;
            get_bubbles(bub, bid, &beg, &sink, &a, &n, NULL);
            fprintf(stderr, "btg%.6lu%c, beg-utg%.6ul, sink-utg%.6ul\n", 
                        bid, "fb"[bid<bub->f_bub?0:1], (beg>>1)+1, (sink>>1)+1);
            for (k = 0; k < n; k++)
            {
                if(k != 0 && (k%5)==0) fprintf(stderr, "\n");
                fprintf(stderr, "m-utg%.6ul\t", (a[k]>>1)+1);
            }
            fprintf(stderr, "\n");
            
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x40(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0xc8(%rcx), %rax
jae 0x20063f
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
cmpb $0x0, 0x18(%rax)
je 0x200487
jmp 0x200631
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0xd8(%rcx), %rcx
movl -0xc(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rcx
imulq $0x28, 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq 0x1c3b22(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rax
movl -0xc(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdx
leaq 0x18cbab(%rip), %rsi    # 0x38d08c
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x20062f
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x10(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
leaq -0x18(%rbp), %rdx
leaq -0x1c(%rbp), %rcx
leaq -0x28(%rbp), %r8
leaq -0x2c(%rbp), %r9
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x1c4b20
movq 0x1c3a9c(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x38(%rbp), %rdx
movq -0x38(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x80(%rax), %r8
movl $0x1, %eax
xorl %ecx, %ecx
cmpq %r8, %rsi
cmovbl %ecx, %eax
movslq %eax, %rcx
leaq 0x18c07e(%rip), %rax    # 0x38c5ef
movsbl (%rax,%rcx), %ecx
movl -0x18(%rbp), %r8d
shrl %r8d
addl $0x1, %r8d
movl -0x1c(%rbp), %r9d
shrl %r9d
addl $0x1, %r9d
leaq 0x18cb09(%rip), %rsi    # 0x38d09b
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0x200609
cmpl $0x0, -0x14(%rbp)
je 0x2005d7
movl -0x14(%rbp), %eax
movl $0x5, %ecx
xorl %edx, %edx
divl %ecx
cmpl $0x0, %edx
jne 0x2005d7
movq 0x1c3a1a(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x186458(%rip), %rsi    # 0x386a28
movb $0x0, %al
callq 0x22a0
movq 0x1c3a02(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %edx
shrl %edx
addl $0x1, %edx
leaq 0x18cacd(%rip), %rsi    # 0x38d0c4
movb $0x0, %al
callq 0x22a0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2005a0
movq 0x1c39d0(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x18640e(%rip), %rsi    # 0x386a28
movb $0x0, %al
callq 0x22a0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2004ef
jmp 0x200631
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x200453
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)