// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl $0x68, %edi
callq 0x95b0
movq %rax, %rbx
movl $0x0, 0x60(%rax)
movq %r15, 0x30(%rax)
movl %r14d, 0x48(%rax)
movl %ebp, 0x4c(%rax)
movl %ebp, %eax
imull %r14d, %eax
testl %eax, %eax
je 0xa252
movl %eax, %eax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
addsd (%r15,%rcx,8), %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0xa22a
xorl %ecx, %ecx
movsd (%r15,%rcx,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%r15,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0xa23a
movabsq $0x1fffffffe, %r12      # imm = 0x1FFFFFFFE
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x9c97
movq %rax, 0x38(%rbx)
movq 0x30(%rbx), %rdi
movl 0x48(%rbx), %esi
movl 0x4c(%rbx), %edx
callq 0x9cf8
movq %rax, 0x40(%rbx)
movl 0x48(%rbx), %r14d
movl %r14d, 0x8(%rbx)
leaq (,%r14,4), %rdi
callq 0x95b0
testq %r14, %r14
je 0xa32c
leaq 0x1(%r14), %rcx
andq %r12, %rcx
decq %r14
movq %r14, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x27d46(%rip), %xmm1    # 0x32000
xorl %edx, %edx
movdqa 0x27d4c(%rip), %xmm2    # 0x32010
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x27d4c(%rip), %xmm4    # 0x32020
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0xa309
movl %edx, (%rax,%rdx,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0xa31f
leal 0x1(%rdx), %esi
movl %esi, 0x4(%rax,%rdx,4)
addq $0x2, %rdx
paddq %xmm4, %xmm1
cmpq %rdx, %rcx
jne 0xa2d4
movq %rax, (%rbx)
movl 0x8(%rbx), %edi
shlq $0x3, %rdi
callq 0x95b0
movq %rax, 0x10(%rbx)
movl 0x8(%rbx), %edi
shlq $0x2, %rdi
callq 0x95b0
movq %rax, 0x18(%rbx)
movl 0x8(%rbx), %ecx
testq %rcx, %rcx
je 0xa3fc
movq 0x10(%rbx), %rax
leaq -0x1(%rcx), %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq 0x8(,%rcx,8), %rcx
andq $-0x10, %rcx
movdqa 0x27c7f(%rip), %xmm1    # 0x32000
xorl %edx, %edx
movdqa 0x27c85(%rip), %xmm2    # 0x32010
pxor %xmm2, %xmm0
movabsq $0x7fefffffffffffff, %rsi # imm = 0x7FEFFFFFFFFFFFFF
pcmpeqd %xmm3, %xmm3
movdqa 0x27c7b(%rip), %xmm4    # 0x32020
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %edi
notl %edi
testb $0x1, %dil
je 0xa3db
movq %rsi, (%rax,%rdx)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %edi
testb $0x1, %dil
je 0xa3ef
movq %rsi, 0x8(%rax,%rdx)
paddq %xmm4, %xmm1
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0xa3a5
movl 0x48(%rbx), %r14d
movl %r14d, 0x28(%rbx)
leaq (,%r14,4), %rdi
callq 0x95b0
testq %r14, %r14
je 0xa4a8
leaq 0x1(%r14), %rcx
andq %r12, %rcx
decq %r14
movq %r14, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x27bca(%rip), %xmm1    # 0x32000
xorl %edx, %edx
movdqa 0x27bd0(%rip), %xmm2    # 0x32010
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x27bd0(%rip), %xmm4    # 0x32020
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0xa485
movl %edx, (%rax,%rdx,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0xa49b
leal 0x1(%rdx), %esi
movl %esi, 0x4(%rax,%rdx,4)
addq $0x2, %rdx
paddq %xmm4, %xmm1
cmpq %rdx, %rcx
jne 0xa450
movq %rax, 0x20(%rbx)
movl 0x48(%rbx), %eax
leal -0x1(,%rax,2), %edi
shlq $0x2, %rdi
callq 0x95b0
movq %rax, 0x50(%rbx)
movl 0x48(%rbx), %edx
addl %edx, %edx
xorl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
incq %rcx
movl 0x48(%rbx), %edi
leal (%rdi,%rdi), %edx
leal -0x1(,%rdi,2), %esi
cmpq %rsi, %rcx
jb 0xa4ca
shlq $0x3, %rdi
callq 0x95b0
movq %rax, 0x58(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq