// File: chhylp123[P]hifiasm/hic.cpp
// Function: print_phased_bubble(G_partition*, bubble_type*, unsigned int)
void print_phased_bubble(G_partition* x, bubble_type* bub, uint32_t utg_n)
{
    uint64_t i, k;
    uint32_t beg = 0, sink = 0, h0_n, h1_n, *h0, *h1, full_bub = 0, bubID = 0;

    for (i = 0; i < x->n; i++)
    {
        get_phased_block(x, bub, i, &beg, &sink, &h0, &h0_n, &h1, &h1_n, &full_bub, &bubID);

        fprintf(stderr, "\n[%lu]\tbeg:utg%.6ul\tsink:utg%.6ul\tphased=%u\n", i, (beg>>1)+1, (sink>>1)+1, full_bub);
        for (k = 0; k < h0_n; k++)
        {
            fprintf(stderr, "(0) utg%.6ul\n", h0[k] + 1);
        }

        for (k = 0; k < h1_n; k++)
        {
            fprintf(stderr, "(1) utg%.6ul\n", h1[k] + 1);
        }

        uint32_t n, *a;
        get_bubbles(bub, bubID, &beg, &sink, &a, &n, NULL);
        if(n > 2) fprintf(stderr, "complex\n");
    }

    /*******************************for debug************************************/
    for (i = 0; i < utg_n; i++)
    {
        if(x->index[i] == (uint32_t)-1) continue;
        partition_warp* p = &(x->a[x->index[i]]);
        for (k = 0; k < p->a.n; k++)
        {
            if(p->a.a[k] != i) break;
        }

        if(k == p->a.n) fprintf(stderr, "ERROR\n");
    }
    /*******************************for debug************************************/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x60(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1db4a3
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
leaq -0x40(%rbp), %r8
leaq -0x50(%rbp), %r9
leaq -0x44(%rbp), %r14
leaq -0x58(%rbp), %rbx
leaq -0x48(%rbp), %r11
leaq -0x5c(%rbp), %r10
leaq -0x60(%rbp), %rax
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
callq 0x214690
movq 0x1e8c52(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x30(%rbp), %rdx
movl -0x3c(%rbp), %ecx
shrl %ecx
addl $0x1, %ecx
movl -0x40(%rbp), %r8d
shrl %r8d
addl $0x1, %r8d
movl -0x5c(%rbp), %r9d
leaq 0x1b1403(%rip), %rsi    # 0x38c7b6
movb $0x0, %al
callq 0x22a0
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl -0x44(%rbp), %ecx
cmpq %rcx, %rax
jae 0x1db402
movq 0x1e8c0b(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x1b13f6(%rip), %rsi    # 0x38c7e3
movb $0x0, %al
callq 0x22a0
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1db3c2
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl -0x48(%rbp), %ecx
cmpq %rcx, %rax
jae 0x1db44a
movq 0x1e8bc3(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
movq -0x58(%rbp), %rax
movq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x1b13bc(%rip), %rsi    # 0x38c7f1
movb $0x0, %al
callq 0x22a0
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1db40a
movq -0x20(%rbp), %rdi
movl -0x60(%rbp), %eax
movl %eax, %esi
leaq -0x3c(%rbp), %rdx
leaq -0x40(%rbp), %rcx
leaq -0x70(%rbp), %r8
leaq -0x64(%rbp), %r9
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x1c4b20
cmpl $0x2, -0x64(%rbp)
jbe 0x1db490
movq 0x1e8b61(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x1b1376(%rip), %rsi    # 0x38c7ff
movb $0x0, %al
callq 0x22a0
jmp 0x1db492
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1db32d
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl -0x24(%rbp), %ecx
cmpq %rcx, %rax
jae 0x1db568
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jne 0x1db4d2
jmp 0x1db557
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x30(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x78(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x1db530
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpq -0x30(%rbp), %rax
je 0x1db520
jmp 0x1db530
jmp 0x1db522
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1db4fc
movq -0x38(%rbp), %rax
movq -0x78(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x1db555
movq 0x1e8a9c(%rip), %rax    # 0x3c3fe0
movq (%rax), %rdi
leaq 0x1ae561(%rip), %rsi    # 0x389aaf
movb $0x0, %al
callq 0x22a0
jmp 0x1db557
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1db4ab
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)