// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, 0xc(%rsp)
leaq 0x1c(%rsp), %r14
andl $0x0, (%r14)
movq %rsp, %rax
andl $0x0, (%rax)
leaq 0x8(%rsp), %rax
andl $0x0, (%rax)
leaq 0x4(%rsp), %rax
andl $0x0, (%rax)
movq %rsi, %r12
movq %rdi, %rbx
movq 0x150a63(%rip), %rbp    # 0x252fe0
xorl %r13d, %r13d
cmpq (%rbx), %r13
jae 0x1026a5
subq $0x8, %rsp
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %r15
movq %r14, %rcx
leaq 0x8(%rsp), %r8
leaq 0x30(%rsp), %r9
leaq 0xc(%rsp), %rax
pushq %rax
leaq 0x18(%rsp), %rax
pushq %rax
leaq 0x2c(%rsp), %rax
pushq %rax
leaq 0x40(%rsp), %rax
pushq %rax
leaq 0x40(%rsp), %rax
pushq %rax
callq 0x121585
addq $0x30, %rsp
movq (%rbp), %rdi
movl 0x1c(%rsp), %ecx
shrl %ecx
incl %ecx
movl (%rsp), %r8d
shrl %r8d
incl %r8d
movl 0x8(%rsp), %r9d
leaq 0xeb49a(%rip), %rsi     # 0x1eda89
movq %r13, %rdx
xorl %eax, %eax
callq 0x22b0
xorl %r14d, %r14d
movl 0x18(%rsp), %eax
cmpq %rax, %r14
jae 0x102627
movq (%rbp), %rdi
movq 0x28(%rsp), %rax
movl (%rax,%r14,4), %edx
incl %edx
leaq 0xeb49b(%rip), %rsi     # 0x1edab6
xorl %eax, %eax
callq 0x22b0
incq %r14
jmp 0x1025fc
xorl %r14d, %r14d
movl 0x14(%rsp), %eax
cmpq %rax, %r14
jae 0x102655
movq (%rbp), %rdi
movq 0x20(%rsp), %rax
movl (%rax,%r14,4), %edx
incl %edx
leaq 0xeb47b(%rip), %rsi     # 0x1edac4
xorl %eax, %eax
callq 0x22b0
incq %r14
jmp 0x10262a
movl 0x4(%rsp), %esi
subq $0x8, %rsp
movq %r12, %rdi
movq %r15, %r14
movq %r15, %rdx
leaq 0x8(%rsp), %rcx
leaq 0x38(%rsp), %r8
leaq 0x18(%rsp), %r9
pushq $0x0
callq 0xf6ab5
popq %rax
popq %rcx
cmpl $0x3, 0x10(%rsp)
jae 0x10268d
incq %r13
jmp 0x102580
movq (%rbp), %rcx
leaq 0xeb43a(%rip), %rdi     # 0x1edad2
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
jmp 0x102685
movl 0xc(%rsp), %r13d
xorl %r14d, %r14d
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
pushq $0x1
popq %r12
cmpq %r13, %r14
je 0x102713
movq 0x18(%rbx), %rax
movl (%rax,%r14,4), %eax
cmpq %r15, %rax
je 0x1026f6
movq 0x10(%rbx), %rdx
imulq $0x48, %rax, %rax
leaq (%rdx,%rax), %rcx
movq (%rdx,%rax), %rax
xorl %edx, %edx
cmpq %rdx, %rax
je 0x1026fb
movq 0x10(%rcx), %rsi
movl (%rsi,%rdx,4), %esi
cmpq %rsi, %r14
jne 0x1026f1
incq %rdx
jmp 0x1026db
cmpq %rdx, %rax
je 0x1026fb
incq %r14
jmp 0x1026b7
movq (%rbp), %rcx
leaq 0xe867e(%rip), %rdi     # 0x1ead84
pushq $0x6
popq %rsi
movq %r12, %rdx
callq 0x2410
jmp 0x1026f6
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq