// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/vl/aib.c
// Function: vl_aib_new
VlAIB * vl_aib_new(double * Pcx, vl_uint nvalues, vl_uint nlabels)
{
    VlAIB * aib = vl_malloc(sizeof(VlAIB));
    vl_uint i ;

    aib->verbosity = 0 ;
    aib->Pcx   = Pcx ;
    aib->nvalues = nvalues ;
    aib->nlabels = nlabels ;

    vl_aib_normalize_P (aib->Pcx, aib->nvalues * aib->nlabels) ;

    aib->Px = vl_aib_new_Px (aib->Pcx, aib->nvalues, aib->nlabels) ;
    aib->Pc = vl_aib_new_Pc (aib->Pcx, aib->nvalues, aib->nlabels) ;

    aib->nentries = aib->nvalues ;
    aib->nodes    = vl_aib_new_nodelist(aib->nentries) ;
    aib->beta     = vl_malloc(sizeof(double) * aib->nentries) ;
    aib->bidx     = vl_malloc(sizeof(vl_uint)   * aib->nentries) ;

    for(i = 0 ; i < aib->nentries ; i++)
      aib->beta [i] = BETA_MAX ;

    /* Initially we must consider all nodes */
    aib->nwhich = aib->nvalues;
    aib->which  = vl_aib_new_nodelist (aib->nwhich) ;

    aib->parents = vl_malloc(sizeof(vl_uint)*(aib->nvalues*2-1));
    /* Initially, all parents point to a nonexistent node */
    for (i = 0 ; i < 2 * aib->nvalues - 1 ; i++)
      aib->parents [i] = 2 * aib->nvalues ;

    /* Allocate cost output vector */
    aib->costs = vl_malloc (sizeof(double) * (aib->nvalues - 1 + 1)) ;


    return aib ;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movl $0x68, %edi
callq 0x9660
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl $0x0, 0x60(%rax)
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x30(%rax)
movl 0x1c(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x48(%rax)
movl 0x18(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x4c(%rax)
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x10(%rsp), %rax
movl 0x48(%rax), %esi
movq 0x10(%rsp), %rax
imull 0x4c(%rax), %esi
callq 0x9d50
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x10(%rsp), %rax
movl 0x48(%rax), %esi
movq 0x10(%rsp), %rax
movl 0x4c(%rax), %edx
callq 0x9e40
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x10(%rsp), %rax
movl 0x48(%rax), %esi
movq 0x10(%rsp), %rax
movl 0x4c(%rax), %edx
callq 0x9ef0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x10(%rsp), %rax
movl 0x48(%rax), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x10(%rsp), %rax
movl 0x8(%rax), %edi
callq 0x9de0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0x9660
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x9660
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rax)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jae 0xaa78
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movl 0xc(%rsp), %ecx
movsd 0x4e59a(%rip), %xmm0    # 0x59000
movsd %xmm0, (%rax,%rcx,8)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xaa43
movq 0x10(%rsp), %rax
movl 0x48(%rax), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x28(%rax)
movq 0x10(%rsp), %rax
movl 0x28(%rax), %edi
callq 0x9de0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rax
movl 0x48(%rax), %eax
shll %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x9660
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x50(%rax)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rcx
movl 0x48(%rcx), %ecx
shll %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0xab0b
movq 0x10(%rsp), %rax
movl 0x48(%rax), %edx
shll %edx
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
movl 0xc(%rsp), %ecx
movl %edx, (%rax,%rcx,4)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xaacf
movq 0x10(%rsp), %rax
movl 0x48(%rax), %eax
subl $0x1, %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0x9660
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x58(%rax)
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)