LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/tee.c
// Function: parse_arg
struct tee_args *parse_arg(struct tee_args *args, int argc, char **argv){
    args->files = calloc(1, sizeof(char*) * argc);
    args->fcount = 0;
    for(int i = 1; i < argc; i++){
        if(argv[i][0] == '-'){
            if(!strcmp(argv[i], "-a")){
                args->append = true;
            }
            else if(!strcmp(argv[i], "-i")){
                args->ignore_interrupts = true;
            }
            else if(!strcmp(argv[i], "-p")){
                args->diagnose = true;
            }
            else {
                fprintf(stderr, "%s: invalid argument '%s'\n", argv[0], argv[i]);
                exit(1);
            }
        }
        else {
            args->files[args->fcount++] = argv[i];
        }
    }
    return args;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movslq %esi, %r12
leaq (,%r12,8), %rsi
pushq $0x1
popq %r15
movq %r15, %rdi
callq 0x1060
movq %rax, 0x8(%r14)
andl $0x0, 0x10(%r14)
xorl %eax, %eax
cmpq %r12, %r15
jge 0x123b
movq (%rbx,%r15,8), %rcx
cmpb $0x2d, (%rcx)
jne 0x1218
cmpb $0x61, 0x1(%rcx)
jne 0x11f9
cmpb $0x0, 0x2(%rcx)
je 0x122e
cmpb $0x69, 0x1(%rcx)
jne 0x1205
cmpb $0x0, 0x2(%rcx)
je 0x1234
cmpb $0x70, 0x1(%rcx)
jne 0x1247
cmpb $0x0, 0x2(%rcx)
jne 0x1247
movb $0x1, 0x2(%r14)
jmp 0x1229
movq 0x8(%r14), %rdx
movslq %eax, %rsi
incl %eax
movl %eax, 0x10(%r14)
movq %rcx, (%rdx,%rsi,8)
incq %r15
jmp 0x11df
movb $0x1, (%r14)
jmp 0x1229
movb $0x1, 0x1(%r14)
jmp 0x1229
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x2daa(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0xda9(%rip), %rsi       # 0x2004
xorl %eax, %eax
callq 0x1070
pushq $0x1
popq %rdi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/tee.c
// Function: main
int main(int argc, char **argv){
    struct tee_args *args = calloc(1, sizeof(struct tee_args));
    args = parse_arg(args, argc, argv);
    int *fds = calloc(1, sizeof(int) * args->fcount);
    for(int i = 0; i < args->fcount; i++){
        if(!strcmp(args->files[i], "-")){
            fds[i] = STDIN_FILENO;
            continue;
        }
        fds[i] = open(args->files[i], O_WRONLY);
        if(fds[i] == -1){
            fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
            return 1;
        }
    }
    char *buf = calloc(1, 4096 * sizeof(char));
    if(buf == NULL){
        fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
        return 1;
    }
    int buf_len = read(STDIN_FILENO, buf, 4096);
    while(buf_len != 0){
        for(int i = 0; i < args->fcount; i++){
            write(fds[i], buf, buf_len);
        }
        write(STDOUT_FILENO, buf, buf_len);
        buf_len = read(STDIN_FILENO, buf, 4096);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movl %edi, %ebx
pushq $0x1
popq %r15
pushq $0x18
popq %rsi
movq %r15, %rdi
callq 0x1060
movq %rax, %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x11ac
movslq 0x10(%r14), %rbx
movq %rbx, %rsi
shlq $0x2, %rsi
movq %r15, %rdi
callq 0x1060
movq %rax, %r15
pushq $0x1
popq %rax
movq %rax, -0x30(%rbp)
xorl %r13d, %r13d
movslq %ebx, %rax
cmpq %rax, %r13
jge 0x12fa
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x12d7
cmpb $0x0, 0x1(%rdi)
je 0x12f3
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x1080
movl %eax, (%r15,%r13,4)
cmpl $-0x1, %eax
je 0x135d
movl 0x10(%r14), %ebx
incq %r13
jmp 0x12bc
andl $0x0, (%r15,%r13,4)
jmp 0x12ee
pushq $0x1
popq %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x1060
testq %rax, %rax
je 0x135d
movq %rax, %r13
movq $0x0, -0x30(%rbp)
movl $0x1000, %edx           # imm = 0x1000
xorl %edi, %edi
movq %r13, %rsi
callq 0x1050
testl %eax, %eax
je 0x138e
movslq %eax, %rbx
xorl %r12d, %r12d
movslq 0x10(%r14), %rax
cmpq %rax, %r12
jge 0x134d
movl (%r15,%r12,4), %edi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1040
incq %r12
jmp 0x1330
pushq $0x1
popq %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1040
jmp 0x1317
movq 0x2c94(%rip), %rax      # 0x3ff8
movq (%rax), %rbx
movq (%r12), %r14
callq 0x1030
movl (%rax), %edi
callq 0x10a0
leaq 0xca1(%rip), %rsi       # 0x201f
movq %rbx, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1070
movq -0x30(%rbp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/aib.c
// Function: vl_aib_normalize_P
void vl_aib_normalize_P (double * P, vl_uint nelem)
{
    vl_uint i;
    double sum = 0;
    for(i=0; i<nelem; i++)
        sum += P[i];
    for(i=0; i<nelem; i++)
        P[i] /= sum;
}

// Assembly:
movl %esi, %eax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x9c43
addsd (%rdi,%rcx,8), %xmm0
incq %rcx
jmp 0x9c34
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x9c5d
movsd (%rdi,%rcx,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rdi,%rcx,8)
incq %rcx
jmp 0x9c45
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/aib.c
// Function: vl_aib_new_nodelist
vl_uint *vl_aib_new_nodelist (vl_uint nentries)
{
    vl_uint * nodelist = vl_malloc(sizeof(vl_uint)*nentries);
    vl_uint n;
    for(n=0; n<nentries; n++)
        nodelist[n] = n;

    return nodelist;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq (,%rbx,4), %rdi
callq 0x95e0
xorl %ecx, %ecx
cmpq %rcx, %rbx
je 0x9c7d
movl %ecx, (%rax,%rcx,4)
incq %rcx
jmp 0x9c70
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/aib.c
// Function: vl_aib_new_Px
double * vl_aib_new_Px(double * Pcx, vl_uint nvalues, vl_uint nlabels)
{
    double * Px = vl_malloc(sizeof(double)*nvalues);
    vl_uint r,c;
    for(r=0; r<nvalues; r++)
    {
        double sum = 0;
        for(c=0; c<nlabels; c++)
            sum += Pcx[r*nlabels+c];
        Px[r] = sum;
    }
    return Px;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
movl %esi, %r15d
leaq (,%r15,8), %rdi
callq 0x95e0
movl %ebx, %ecx
xorl %edx, %edx
xorl %esi, %esi
cmpq %r15, %rsi
je 0x9ccc
xorpd %xmm0, %xmm0
movl %edx, %edi
movq %rcx, %r8
subq $0x1, %r8
jb 0x9cc0
movl %edi, %r9d
addsd (%r14,%r9,8), %xmm0
incl %edi
jmp 0x9cad
movsd %xmm0, (%rax,%rsi,8)
incq %rsi
addl %ebx, %edx
jmp 0x9c9f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/aib.c
// Function: vl_aib_new_Pc
double * vl_aib_new_Pc(double * Pcx, vl_uint nvalues, vl_uint nlabels)
{
    double * Pc = vl_malloc(sizeof(double)*nlabels);
    vl_uint r, c;
    for(c=0; c<nlabels; c++)
    {
        double sum = 0;
        for(r=0; r<nvalues; r++)
            sum += Pcx[r*nlabels+c];
        Pc[c] = sum;
    }
    return Pc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %edx, %r15d
leaq (,%r15,8), %rdi
callq 0x95e0
movl %ebp, %ecx
xorl %edx, %edx
cmpq %r15, %rdx
je 0x9d1f
xorpd %xmm0, %xmm0
movl %edx, %esi
movq %rcx, %rdi
subq $0x1, %rdi
jb 0x9d15
movl %esi, %r8d
addsd (%r14,%r8,8), %xmm0
addl %ebx, %esi
jmp 0x9d02
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
jmp 0x9cf4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/aib.c
// Function: vl_aib_min_beta
void vl_aib_min_beta
(VlAIB * aib, vl_uint * besti, vl_uint * bestj, double * minbeta)
{
    vl_uint i;
    *minbeta = aib->beta[0];
    *besti   = 0;
    *bestj   = aib->bidx[0];

    for(i=0; i<aib->nentries; i++)
    {
        if(aib->beta[i] < *minbeta)
        {
            *minbeta = aib->beta[i];
            *besti = i;
            *bestj = aib->bidx[i];
        }
    }
}

// Assembly:
movq 0x10(%rdi), %rax
movsd (%rax), %xmm0
movsd %xmm0, (%rcx)
andl $0x0, (%rsi)
movq 0x18(%rdi), %r8
movl (%r8), %r9d
movl %r9d, (%rdx)
xorl %r9d, %r9d
movl 0x8(%rdi), %r10d
cmpq %r10, %r9
jae 0x9d72
movsd (%rax,%r9,8), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x9d6d
movsd %xmm1, (%rcx)
movl %r9d, (%rsi)
movl (%r8,%r9,4), %r10d
movl %r10d, (%rdx)
movapd %xmm1, %xmm0
incq %r9
jmp 0x9d46
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/aib.c
// Function: vl_aib_calculate_information
void vl_aib_calculate_information(VlAIB * aib, double * I, double * H)
{
    vl_uint r, c;
    *H = 0;
    *I = 0;

    /*
     * H(x)   = - sum_x p(x)    \ log p(x)
     * I(x,c) =   sum_xc p(x,c) \ log (p(x,c) / p(x)p(c))
     */

    /* for each entry */
    for(r = 0 ; r< aib->nentries ; r++) {

      if (aib->Px[r] == 0) continue ;
      *H += -log(aib->Px[r]) * aib->Px[r] ;

      for(c=0; c<aib->nlabels; c++) {
        if (aib->Pcx[r*aib->nlabels+c] == 0) continue;
        *I += aib->Pcx[r*aib->nlabels+c] *
          log (aib->Pcx[r*aib->nlabels+c] / (aib->Px[r]*aib->Pc[c])) ;
      }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
andq $0x0, (%rdx)
movq %rsi, %r14
andq $0x0, (%rsi)
movq %rdi, %r15
xorl %r12d, %r12d
xorpd %xmm1, %xmm1
movl 0x8(%r15), %eax
cmpq %rax, %r12
jae 0xa164
movq 0x38(%r15), %rax
movsd (%rax,%r12,8), %xmm0
ucomisd %xmm1, %xmm0
jne 0xa0e5
jp 0xa0e5
incq %r12
jmp 0xa0c1
callq 0x9450
movq 0x38(%r15), %rax
mulsd (%rax,%r12,8), %xmm0
movsd (%rbx), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
xorpd %xmm1, %xmm1
xorl %r13d, %r13d
movl 0x4c(%r15), %eax
cmpq %rax, %r13
jae 0xa0e0
movq 0x30(%r15), %rcx
imull %r12d, %eax
addl %r13d, %eax
movsd (%rcx,%rax,8), %xmm0
ucomisd %xmm1, %xmm0
jne 0xa128
jnp 0xa15f
movq 0x38(%r15), %rax
movq 0x40(%r15), %rcx
movsd (%rax,%r12,8), %xmm1
mulsd (%rcx,%r13,8), %xmm1
movsd %xmm0, 0x8(%rsp)
divsd %xmm1, %xmm0
callq 0x9450
xorpd %xmm1, %xmm1
mulsd 0x8(%rsp), %xmm0
addsd (%r14), %xmm0
movsd %xmm0, (%r14)
incq %r13
jmp 0xa107
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
pushq $0x68
popq %rdi
callq 0x95e0
movq %rax, %rbx
andl $0x0, 0x60(%rax)
movq %r15, 0x30(%rax)
movl %r14d, 0x48(%rax)
movl %ebp, 0x4c(%rax)
imull %r14d, %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x9c2c
movq 0x30(%rbx), %rdi
movl 0x48(%rbx), %esi
movl 0x4c(%rbx), %edx
callq 0x9c7f
movq %rax, 0x38(%rbx)
movq 0x30(%rbx), %rdi
movl 0x48(%rbx), %esi
movl 0x4c(%rbx), %edx
callq 0x9cd2
movq %rax, 0x40(%rbx)
movl 0x48(%rbx), %edi
movl %edi, 0x8(%rbx)
callq 0x9c5e
movq %rax, (%rbx)
movl 0x8(%rbx), %edi
shlq $0x3, %rdi
callq 0x95e0
movq %rax, 0x10(%rbx)
movl 0x8(%rbx), %edi
shlq $0x2, %rdi
callq 0x95e0
movq %rax, 0x18(%rbx)
movl 0x8(%rbx), %eax
xorl %ecx, %ecx
movabsq $0x7fefffffffffffff, %rdx # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rcx, %rax
je 0xa21e
movq 0x10(%rbx), %rsi
movq %rdx, (%rsi,%rcx,8)
incq %rcx
jmp 0xa20c
movl 0x48(%rbx), %edi
movl %edi, 0x28(%rbx)
callq 0x9c5e
movq %rax, 0x20(%rbx)
movl 0x48(%rbx), %eax
leal -0x1(,%rax,2), %edi
shlq $0x2, %rdi
callq 0x95e0
movq %rax, 0x50(%rbx)
xorl %ecx, %ecx
movl 0x48(%rbx), %edi
leal -0x1(,%rdi,2), %edx
cmpq %rdx, %rcx
jae 0xa260
leal (%rdi,%rdi), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
jmp 0xa246
shlq $0x3, %rdi
callq 0x95e0
movq %rax, 0x58(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/aib.c
// Function: vl_aib_delete
void
vl_aib_delete (VlAIB * aib)
{
  if (aib) {
    if (aib-> nodes)   vl_free (aib-> nodes);
    if (aib-> beta)    vl_free (aib-> beta);
    if (aib-> bidx)    vl_free (aib-> bidx);
    if (aib-> which)   vl_free (aib-> which);
    if (aib-> Px)      vl_free (aib-> Px);
    if (aib-> Pc)      vl_free (aib-> Pc);
    if (aib-> parents) vl_free (aib-> parents);
    if (aib-> costs)   vl_free (aib-> costs);

    vl_free (aib) ;
  }
}

// Assembly:
testq %rdi, %rdi
je 0xa2fc
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xa291
callq 0x95b0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xa29f
callq 0x95b0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xa2ad
callq 0x95b0
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xa2bb
callq 0x95b0
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0xa2c9
callq 0x95b0
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0xa2d7
callq 0x95b0
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0xa2e5
callq 0x95b0
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0xa2f3
callq 0x95b0
movq %rbx, %rdi
popq %rbx
jmp 0x95b0
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/array.c
// Function: vl_array_get_num_elements
VL_EXPORT vl_size
vl_array_get_num_elements (VlArray const * self)
{
  vl_size numElements = 1 ;
  vl_uindex k ;
  if (self->numDimensions == 0) {
    return 0 ;
  }
  for (k = 0 ; k < self->numDimensions ; ++k) {
    numElements *= self->dimensions[k] ;
  }
  return numElements ;
}

// Assembly:
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0xa47a
pushq $0x1
popq %rax
xorl %edx, %edx
cmpq %rdx, %rcx
je 0xa47c
imulq 0x18(%rdi,%rdx,8), %rax
incq %rdx
jmp 0xa46a
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/array.c
// Function: vl_array_init
VL_EXPORT VlArray *
vl_array_init (VlArray* self, vl_type type,
               vl_size numDimensions, vl_size const * dimensions)
{
  assert (numDimensions <= VL_ARRAY_MAX_NUM_DIMENSIONS) ;
  self->type = type ;
  self->numDimensions = numDimensions ;
  memcpy(self->dimensions, dimensions, sizeof(vl_size) * numDimensions) ;
  self->data = vl_malloc(vl_get_type_size(type) * vl_array_get_num_elements (self)) ;
  self->isEnvelope = VL_FALSE ;
  self->isSparse = VL_FALSE ;
  return self ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, (%rdi)
movq %rdx, 0x10(%rdi)
addq $0x18, %rdi
shlq $0x3, %rdx
movq %rcx, %rsi
callq 0x95d0
decl %ebp
cmpl $0xa, %ebp
jae 0xa4df
movl %ebp, %r14d
leaq 0x22ba0(%rip), %r15     # 0x2d050
movq %rbx, %rdi
callq 0x9240
imulq (%r15,%r14,8), %rax
movq %rax, %rdi
callq 0x95e0
movq %rax, 0x98(%rbx)
andq $0x0, 0x4(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x90b0
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/array.c
// Function: vl_array_dealloc
VL_EXPORT void
vl_array_dealloc (VlArray * self)
{
  if (! self->isEnvelope) {
    if (self->data) {
      vl_free(self->data) ;
      self->data = NULL ;
    }
  }
}

// Assembly:
cmpl $0x0, 0x4(%rdi)
je 0xa574
retq
pushq %rbx
movq %rdi, %rbx
movq 0x98(%rdi), %rdi
testq %rdi, %rdi
je 0xa591
callq 0x95b0
andq $0x0, 0x98(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/covdet.c
// Function: vl_resize_buffer
static int
_vl_resize_buffer (void ** buffer, vl_size * bufferSize, vl_size targetSize) {
  void * newBuffer ;
  if (*buffer == NULL) {
    *buffer = vl_malloc(targetSize) ;
    if (*buffer) {
      *bufferSize = targetSize ;
      return VL_ERR_OK ;
    } else {
      *bufferSize = 0 ;
      return VL_ERR_ALLOC ;
    }
  }
  newBuffer = vl_realloc(*buffer, targetSize) ;
  if (newBuffer) {
    *buffer = newBuffer ;
    *bufferSize = targetSize ;
    return VL_ERR_OK ;
  } else {
    return VL_ERR_ALLOC ;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xac23
movq %rbx, %rsi
callq 0x9400
testq %rax, %rax
je 0xac44
movq %rax, (%r15)
xorl %eax, %eax
jmp 0xac3f
movq %rbx, %rdi
callq 0x95e0
movq %rax, %rcx
movq %rax, (%r15)
xorl %eax, %eax
testq %rcx, %rcx
sete %al
cmoveq %rcx, %rbx
addl %eax, %eax
movq %rbx, (%r14)
jmp 0xac47
pushq $0x2
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/covdet.c
// Function: vl_covdet_reset
void
vl_covdet_reset (VlCovDet * self)
{
  if (self->features) {
    vl_free(self->features) ;
    self->features = NULL ;
  }
  if (self->css) {
    vl_scalespace_delete(self->css) ;
    self->css = NULL ;
  }
  if (self->gss) {
    vl_scalespace_delete(self->gss) ;
    self->gss = NULL ;
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
testq %rdi, %rdi
je 0xb86e
callq 0x95b0
andq $0x0, 0x50(%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xb881
callq 0x9880
andq $0x0, 0x8(%rbx)
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xb892
callq 0x9880
andq $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/covdet.c
// Function: vl_covdet_append_feature
int
vl_covdet_append_feature (VlCovDet * self, VlCovDetFeature const * feature)
{
  vl_size requiredSize ;
  assert(self) ;
  assert(feature) ;
  self->numFeatures ++ ;
  requiredSize = self->numFeatures * sizeof(VlCovDetFeature) ;
  if (requiredSize > self->numFeatureBufferSize) {
    int err = _vl_resize_buffer((void**)&self->features, &self->numFeatureBufferSize,
                                (self->numFeatures + 1000) * sizeof(VlCovDetFeature)) ;
    if (err) {
      self->numFeatures -- ;
      return err ;
    }
  }
  self->features[self->numFeatures - 1] = *feature ;
  return VL_ERR_OK ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x58(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x58(%rdi)
imulq $0x28, %rcx, %rdx
cmpq 0x60(%rdi), %rdx
jbe 0xb8fd
leaq 0x60(%r14), %rsi
leaq 0x50(%r14), %rdi
imulq $0x28, %rax, %rdx
addq $0x9c68, %rdx           # imm = 0x9C68
callq 0xabf9
movq 0x58(%r14), %rcx
testl %eax, %eax
je 0xb8fd
decq %rcx
movq %rcx, 0x58(%r14)
jmp 0xb921
movq 0x50(%r14), %rax
imulq $0x28, %rcx, %rcx
movq 0x20(%rbx), %rdx
movq %rdx, -0x8(%rax,%rcx)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, -0x18(%rax,%rcx)
movups %xmm0, -0x28(%rax,%rcx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/covdet.c
// Function: vl_covdet_extract_affine_shape
void
vl_covdet_extract_affine_shape (VlCovDet * self)
{
  vl_index i, j = 0 ;
  vl_size numFeatures = vl_covdet_get_num_features(self) ;
  VlCovDetFeature * feature = vl_covdet_get_features(self);
  for (i = 0 ; i < (signed)numFeatures ; ++i) {
    int status ;
    VlFrameOrientedEllipse adapted ;
    status = vl_covdet_extract_affine_shape_for_frame(self, &adapted, feature[i].frame) ;
    if (status == VL_ERR_OK) {
      feature[j] = feature[i] ;
      feature[j].frame = adapted ;
      ++ j ;
    }
  }
  self->numFeatures = j ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movslq 0x58(%rdi), %rax
xorl %r15d, %r15d
testq %rax, %rax
cmovleq %r15, %rax
movq 0x50(%rdi), %r12
imulq $0x28, %rax, %r13
leaq 0x40(%rsp), %r14
xorl %ebp, %ebp
cmpq %r15, %r13
je 0xda21
movq 0x10(%r12,%r15), %rax
movq %rax, 0x30(%rsp)
movups (%r12,%r15), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x97b0
testl %eax, %eax
jne 0xda1b
leaq (%r12,%r15), %rax
imulq $0x28, %rbp, %rcx
movq 0x20(%rax), %rdx
movq %rdx, 0x20(%r12,%rcx)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x10(%r12,%rcx)
movups %xmm0, (%r12,%rcx)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%r12,%rcx)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%r12,%rcx)
incq %rbp
addq $0x28, %r15
jmp 0xd9a6
movq %rbp, 0x58(%rbx)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/covdet.c
// Function: vl_covdet_check_frame_inside
vl_bool
_vl_covdet_check_frame_inside (VlCovDet * self, VlFrameOrientedEllipse frame, double margin)
{
  double extent = margin ;
  double A [2*2] = {frame.a11, frame.a21, frame.a12, frame.a22} ;
  double T[2] = {frame.x, frame.y} ;
  double x0 = +VL_INFINITY_D ;
  double x1 = -VL_INFINITY_D ;
  double y0 = +VL_INFINITY_D ;
  double y1 = -VL_INFINITY_D ;
  double boxx [4] = {extent, extent, -extent, -extent} ;
  double boxy [4] = {-extent, extent, extent, -extent} ;
  VlScaleSpaceGeometry geom = vl_scalespace_get_geometry(self->gss) ;
  int i ;
  for (i = 0 ; i < 4 ; ++i) {
    double x = A[0] * boxx[i] + A[2] * boxy[i] + T[0] ;
    double y = A[1] * boxx[i] + A[3] * boxy[i] + T[1] ;
    x0 = VL_MIN(x0, x) ;
    x1 = VL_MAX(x1, x) ;
    y0 = VL_MIN(y0, y) ;
    y1 = VL_MAX(y1, y) ;
  }

  return
  0 <= x0 && x1 <= geom.width-1 &&
  0 <= y0 && y1 <= geom.height-1 ;
}

// Assembly:
subq $0xb8, %rsp
movups 0xc8(%rsp), %xmm1
movss 0xd0(%rsp), %xmm2
movlhps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm2     # xmm2 = xmm2[2,0],xmm1[2,3]
cvtps2pd %xmm2, %xmm1
movaps %xmm1, 0x40(%rsp)
movaps 0xc0(%rsp), %xmm1
movss 0xd4(%rsp), %xmm2
shufps $0xf4, %xmm1, %xmm2     # xmm2 = xmm2[0,1],xmm1[3,3]
shufps $0xf2, %xmm1, %xmm2     # xmm2 = xmm2[2,0],xmm1[3,3]
cvtps2pd %xmm2, %xmm1
movaps %xmm1, 0x30(%rsp)
cvtps2pd 0xc0(%rsp), %xmm1
movaps %xmm1, 0x20(%rsp)
movq %xmm0, 0x50(%rsp)
movq %xmm0, 0x58(%rsp)
movdqa 0x1ecb3(%rip), %xmm1    # 0x2d0a0
pxor %xmm0, %xmm1
pshufd $0x44, %xmm1, %xmm2     # xmm2 = xmm1[0,1,0,1]
movdqa %xmm2, 0x60(%rsp)
movq %xmm1, (%rsp)
movq %xmm0, 0x8(%rsp)
movq %xmm0, 0x10(%rsp)
movq %xmm1, 0x18(%rsp)
movq (%rdi), %rsi
leaq 0x70(%rsp), %rdi
callq 0x9930
movapd 0x20(%rsp), %xmm6
movapd 0x30(%rsp), %xmm5
movapd 0x40(%rsp), %xmm4
movapd 0x1ed46(%rip), %xmm0    # 0x2d180
movapd 0x1ed4e(%rip), %xmm1    # 0x2d190
xorl %eax, %eax
cmpq $0x4, %rax
je 0xe47a
movsd (%rsp,%rax,8), %xmm2
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm5, %xmm2
movsd 0x50(%rsp,%rax,8), %xmm3
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
mulpd %xmm4, %xmm3
addpd %xmm2, %xmm3
addpd %xmm6, %xmm3
minpd %xmm3, %xmm1
maxpd %xmm3, %xmm0
incq %rax
jmp 0xe444
xorl %eax, %eax
pxor %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jb 0xe4f9
movq 0x70(%rsp), %rcx
decq %rcx
movq %rcx, %xmm2
punpckldq 0x1ecc5(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x1eccd(%rip), %xmm2    # 0x2d170
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
ucomisd %xmm0, %xmm3
jb 0xe4f9
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jb 0xe4f9
movq 0x78(%rsp), %rax
decq %rax
movq %rax, %xmm1
punpckldq 0x1ec88(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1ec90(%rip), %xmm1    # 0x2d170
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
xorl %eax, %eax
ucomisd %xmm0, %xmm2
setae %al
addq $0xb8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/covdet.c
// Function: vl_covdet_drop_features_outside
void
vl_covdet_drop_features_outside (VlCovDet * self, double margin)
{
  vl_index i, j = 0 ;
  vl_size numFeatures = vl_covdet_get_num_features(self) ;
  for (i = 0 ; i < (signed)numFeatures ; ++i) {
    vl_bool inside =
    _vl_covdet_check_frame_inside (self, self->features[i].frame, margin) ;
    if (inside) {
      self->features[j] = self->features[i] ;
      ++j ;
    }
  }
  self->numFeatures = j ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movsd %xmm0, 0x18(%rsp)
movq %rdi, %rbx
movslq 0x58(%rdi), %rax
xorl %r14d, %r14d
testq %rax, %rax
cmovleq %r14, %rax
imulq $0x28, %rax, %r15
xorl %r12d, %r12d
cmpq %r14, %r15
je 0xe59b
movq 0x50(%rbx), %rax
movq 0x10(%rax,%r14), %rcx
movq %rcx, 0x30(%rsp)
movups (%rax,%r14), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movsd 0x18(%rsp), %xmm0
callq 0xe384
testl %eax, %eax
je 0xe595
movq 0x50(%rbx), %rax
imulq $0x28, %r12, %rcx
movq 0x20(%rax,%r14), %rdx
movq %rdx, 0x20(%rax,%rcx)
movups (%rax,%r14), %xmm0
movups 0x10(%rax,%r14), %xmm1
movups %xmm1, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
incq %r12
addq $0x28, %r14
jmp 0xe52a
movq %r12, 0x58(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/dsift.c
// Function: vl_dsift_new_kernel
float *
_vl_dsift_new_kernel (int binSize, int numBins, int binIndex, double windowSize)
{
  int filtLen = 2 * binSize - 1 ;
  float * ker = vl_malloc (sizeof(float) * filtLen) ;
  float * kerIter = ker ;
  float delta = binSize * (binIndex - 0.5F * (numBins - 1)) ;
  /*
  float sigma = 0.5F * ((numBins - 1) * binSize + 1) ;
  float sigma = 0.5F * ((numBins) * binSize) ;
  */
  float sigma = (float) binSize * (float) windowSize ;
  int x ;

  for (x = - binSize + 1 ; x <= + binSize - 1 ; ++ x) {
    float z = (x - delta) / sigma ;
    *kerIter++ = (1.0F - fabsf(x) / binSize) *
      ((binIndex >= 0) ? expf(- 0.5F * z*z) : 1.0F) ;
  }
  return ker ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, 0x10(%rsp)
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
leal (%r14,%r14), %eax
cltq
leaq -0x4(,%rax,4), %rdi
callq 0x95e0
cvtsi2ss %r14d, %xmm1
cvtsi2ss %ebx, %xmm0
decl %ebp
cvtsi2ss %ebp, %xmm2
mulss 0x1ecaf(%rip), %xmm2    # 0x2d320
movq %rax, %r15
addss %xmm0, %xmm2
cvtsd2ss 0x10(%rsp), %xmm0
mulss %xmm1, %xmm2
movss %xmm2, 0x8(%rsp)
movss %xmm1, 0xc(%rsp)
mulss %xmm1, %xmm0
movss %xmm0, 0x4(%rsp)
pushq $0x1
popq %r12
subl %r14d, %r12d
xorl %r13d, %r13d
movss 0x1ec7a(%rip), %xmm2    # 0x2d324
leaq (%r12,%r13), %rax
cmpl %r14d, %eax
jge 0xe716
cvtsi2ss %eax, %xmm3
movaps %xmm2, %xmm0
testl %ebx, %ebx
js 0xe6f3
movaps %xmm3, %xmm1
subss 0x8(%rsp), %xmm1
divss 0x4(%rsp), %xmm1
movaps %xmm1, %xmm0
mulss 0x1ec48(%rip), %xmm0    # 0x2d320
mulss %xmm1, %xmm0
movaps %xmm3, 0x10(%rsp)
callq 0x91a0
movaps 0x10(%rsp), %xmm3
movss 0x1ec31(%rip), %xmm2    # 0x2d324
andps 0x1ea56(%rip), %xmm3    # 0x2d150
divss 0xc(%rsp), %xmm3
movaps %xmm2, %xmm1
subss %xmm3, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%r15,%r13,4)
incq %r13
jmp 0xe6aa
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/dsift.c
// Function: vl_dsift_update_buffers
VL_EXPORT void
_vl_dsift_update_buffers (VlDsiftFilter * self)
{
  int x1 = self->boundMinX ;
  int x2 = self->boundMaxX ;
  int y1 = self->boundMinY ;
  int y2 = self->boundMaxY ;

  int rangeX = x2 - x1 - (self->geom.numBinX - 1) * self->geom.binSizeX ;
  int rangeY = y2 - y1 - (self->geom.numBinY - 1) * self->geom.binSizeY ;

  int numFramesX = (rangeX >= 0) ? rangeX / self->stepX + 1 : 0 ;
  int numFramesY = (rangeY >= 0) ? rangeY / self->stepY + 1 : 0 ;

  self->numFrames = numFramesX * numFramesY ;
  self->descrSize = self->geom.numBinT *
                    self->geom.numBinX *
                    self->geom.numBinY ;
}

// Assembly:
movl 0x18(%rdi), %eax
movl 0x1c(%rdi), %ecx
movl 0x24(%rdi), %r9d
pushq $0x1
popq %rdx
movl %edx, %r8d
subl %r9d, %r8d
imull 0x2c(%rdi), %r8d
subl 0x10(%rdi), %eax
movl 0x28(%rdi), %r10d
subl %r10d, %edx
imull 0x30(%rdi), %edx
subl 0x14(%rdi), %ecx
addl %edx, %ecx
xorl %esi, %esi
addl %r8d, %eax
movl $0x0, %r8d
js 0xe76a
cltd
idivl 0x8(%rdi)
movl %eax, %r8d
incl %r8d
testl %ecx, %ecx
js 0xe778
movl %ecx, %eax
cltd
idivl 0xc(%rdi)
movl %eax, %esi
incl %esi
imull %r8d, %esi
movl %esi, 0x40(%rdi)
imull %r9d, %r10d
imull 0x20(%rdi), %r10d
movl %r10d, 0x44(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/dsift.c
// Function: vl_dsift_new
VL_EXPORT VlDsiftFilter *
vl_dsift_new (int imWidth, int imHeight)
{
  VlDsiftFilter * self = vl_malloc (sizeof(VlDsiftFilter)) ;
  self->imWidth  = imWidth ;
  self->imHeight = imHeight ;

  self->stepX = 5 ;
  self->stepY = 5 ;

  self->boundMinX = 0 ;
  self->boundMinY = 0 ;
  self->boundMaxX = imWidth - 1 ;
  self->boundMaxY = imHeight - 1 ;

  self->geom.numBinX = 4 ;
  self->geom.numBinY = 4 ;
  self->geom.numBinT = 8 ;
  self->geom.binSizeX = 5 ;
  self->geom.binSizeY = 5 ;

  self->useFlatWindow = VL_FALSE ;
  self->windowSize = 2.0 ;

  self->convTmp1 = vl_malloc(sizeof(float) * self->imWidth * self->imHeight) ;
  self->convTmp2 = vl_malloc(sizeof(float) * self->imWidth * self->imHeight) ;

  self->numBinAlloc = 0 ;
  self->numFrameAlloc = 0 ;
  self->numGradAlloc = 0 ;

  self->descrSize = 0 ;
  self->numFrames = 0 ;
  self->grads = NULL ;
  self->frames = NULL ;
  self->descrs = NULL ;

  _vl_dsift_update_buffers(self) ;
  return self ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %r14d
movl %edi, %r15d
movl $0x80, %edi
callq 0x95e0
movq %rax, %rbx
movl %r15d, (%rax)
movl %r14d, 0x4(%rax)
movsd 0x1eb9c(%rip), %xmm0    # 0x2d350
movups %xmm0, 0x8(%rax)
leal -0x1(%r15), %eax
movl %eax, 0x18(%rbx)
leal -0x1(%r14), %eax
movl %eax, 0x1c(%rbx)
movaps 0x1eb93(%rip), %xmm0    # 0x2d360
movups %xmm0, 0x20(%rbx)
movq $0x5, 0x30(%rbx)
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x38(%rbx)
movslq %r15d, %rax
movslq %r14d, %rdi
imulq %rax, %rdi
shlq $0x2, %rdi
callq 0x95e0
movq %rax, 0x70(%rbx)
movslq (%rbx), %rax
movslq 0x4(%rbx), %rdi
imulq %rax, %rdi
shlq $0x2, %rdi
callq 0x95e0
movq %rax, 0x78(%rbx)
andq $0x0, 0x68(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
andl $0x0, 0x60(%rbx)
movq %rbx, %rdi
callq 0x97f0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/dsift.c
// Function: vl_dsift_new_basic
VL_EXPORT VlDsiftFilter *
vl_dsift_new_basic (int imWidth, int imHeight, int step, int binSize)
{
  VlDsiftFilter* self = vl_dsift_new(imWidth, imHeight) ;
  VlDsiftDescriptorGeometry geom = *vl_dsift_get_geometry(self) ;
  geom.binSizeX = binSize ;
  geom.binSizeY = binSize ;
  vl_dsift_set_geometry(self, &geom) ;
  vl_dsift_set_steps(self, step, step) ;
  return self ;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
callq 0x99d0
movq %rax, %r14
movl %ebx, 0x2c(%rax)
movl %ebx, 0x30(%rax)
movq %rax, %rdi
callq 0x97f0
movl %ebp, 0x8(%r14)
movl %ebp, 0xc(%r14)
movq %r14, %rdi
callq 0x97f0
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/dsift.c
// Function: vl_dsift_delete
VL_EXPORT void
vl_dsift_delete (VlDsiftFilter * self)
{
  _vl_dsift_free_buffers (self) ;
  if (self->convTmp2) vl_free (self->convTmp2) ;
  if (self->convTmp1) vl_free (self->convTmp1) ;
  vl_free (self) ;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xe89f
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0xe888
callq 0x95b0
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0xe896
callq 0x95b0
movq %rbx, %rdi
popq %rbx
jmp 0x95b0
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/dsift.c
// Function: vl_dsift_free_buffers
static void
_vl_dsift_free_buffers (VlDsiftFilter* self)
{
  if (self->frames) {
    vl_free(self->frames) ;
    self->frames = NULL ;
  }
  if (self->descrs) {
    vl_free(self->descrs) ;
    self->descrs = NULL ;
  }
  if (self->grads) {
    int t ;
    for (t = 0 ; t < self->numGradAlloc ; ++t)
      if (self->grads[t]) vl_free(self->grads[t]) ;
    vl_free(self->grads) ;
    self->grads = NULL ;
  }
  self->numFrameAlloc = 0 ;
  self->numBinAlloc = 0 ;
  self->numGradAlloc = 0 ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
testq %rdi, %rdi
je 0xe8b9
callq 0x95b0
andq $0x0, 0x48(%rbx)
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0xe8cc
callq 0x95b0
andq $0x0, 0x50(%rbx)
cmpq $0x0, 0x68(%rbx)
je 0xe900
xorl %r14d, %r14d
movslq 0x60(%rbx), %rax
movq 0x68(%rbx), %rdi
cmpq %rax, %r14
jge 0xe8f6
movq (%rdi,%r14,8), %rdi
testq %rdi, %rdi
je 0xe8f1
callq 0x95b0
incq %r14
jmp 0xe8d6
callq 0x95b0
andq $0x0, 0x68(%rbx)
andq $0x0, 0x58(%rbx)
andl $0x0, 0x60(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/dsift.c
// Function: vl_dsift_normalize_histogram
VL_INLINE float
_vl_dsift_normalize_histogram (float * begin, float * end)
{
  float * iter ;
  float  norm = 0.0F ;

  for (iter = begin ; iter < end ; ++ iter) {
    norm += (*iter) * (*iter) ;
  }
  norm = vl_fast_sqrt_f (norm) + VL_EPSILON_F ;

  for (iter = begin; iter < end ; ++ iter) {
    *iter /= norm ;
  }
  return norm ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movq %rdi, %rax
cmpq %rbx, %rax
jae 0xf2a7
movss (%rax), %xmm1
mulss %xmm1, %xmm1
addss %xmm1, %xmm0
addq $0x4, %rax
jmp 0xf290
callq 0xf21b
addss 0x1e078(%rip), %xmm0    # 0x2d32c
cmpq %rbx, %r14
jae 0xf2cd
movss (%r14), %xmm1
divss %xmm0, %xmm1
movss %xmm1, (%r14)
addq $0x4, %r14
jmp 0xf2b4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/dsift.c
// Function: vl_dsift_get_bin_window_mean
static float
_vl_dsift_get_bin_window_mean
(int binSize, int numBins, int binIndex, double windowSize)
{
  float delta = binSize * (binIndex - 0.5F * (numBins - 1)) ;
  /*float sigma = 0.5F * ((numBins - 1) * binSize + 1) ;*/
  float sigma = (float) binSize * (float) windowSize ;
  int x ;

  float acc = 0.0 ;
  for (x = - binSize + 1 ; x <= + binSize - 1 ; ++ x) {
    float z = (x - delta) / sigma ;
    acc += ((binIndex >= 0) ? expf(- 0.5F * z*z) : 1.0F) ;
  }
  return acc /= (2 * binSize - 1) ;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movl %edi, %ebx
cvtsi2ss %edi, %xmm1
cvtsi2ss %edx, %xmm2
decl %esi
cvtsi2ss %esi, %xmm3
mulss 0x1e029(%rip), %xmm3    # 0x2d320
addss %xmm2, %xmm3
mulss %xmm1, %xmm3
movss %xmm3, 0x8(%rsp)
cvtsd2ss %xmm0, %xmm0
mulss %xmm1, %xmm0
movss %xmm0, 0x4(%rsp)
pushq $0x1
popq %r14
subl %edi, %r14d
xorps %xmm1, %xmm1
cmpl %ebx, %r14d
jge 0xf368
movss 0x1dffa(%rip), %xmm0    # 0x2d324
testl %ebp, %ebp
js 0xf35f
movss %xmm1, 0xc(%rsp)
cvtsi2ss %r14d, %xmm1
subss 0x8(%rsp), %xmm1
divss 0x4(%rsp), %xmm1
movaps %xmm1, %xmm0
mulss 0x1dfd0(%rip), %xmm0    # 0x2d320
mulss %xmm1, %xmm0
callq 0x91a0
movss 0xc(%rsp), %xmm1
addss %xmm0, %xmm1
incl %r14d
jmp 0xf31d
leal -0x1(,%rbx,2), %eax
cvtsi2ss %eax, %xmm0
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/generic.c
// Function: vl_configuration_to_string_copy
char *
vl_configuration_to_string_copy ()
{
  char * string = 0 ;
  int length = 0 ;
  char * staticString = vl_static_configuration_to_string_copy() ;
  char * cpuString =
#if defined(VL_ARCH_IX86) || defined(VL_ARCH_X64) || defined(VL_ARCH_IA64)
  _vl_x86cpu_info_to_string_copy(&vl_get_state()->cpuInfo) ;
#else
  "Generic CPU" ;
#endif
#if defined(DEBUG)
  int const debug = 1 ;
#else
  int const debug = 0 ;
#endif

  while (string == 0) {
    if (length > 0) {
      string = vl_malloc(sizeof(char) * length) ;
      if (string == NULL) break ;
    }
    length = snprintf(string, length,
                      "VLFeat version %s\n"
                      "    Static config: %s\n"
                      "    %" VL_FMT_SIZE " CPU(s): %s\n"
#if defined(_OPENMP)
                      "    OpenMP: max threads: %d (library: %" VL_FMT_SIZE ")\n"
#endif
                      "    Debug: %s\n",
                      vl_get_version_string (),
                      staticString,
                      vl_get_num_cpus(), cpuString,
#if defined(_OPENMP)
                      omp_get_max_threads(), vl_get_max_threads(),
#endif
                      VL_YESNO(debug)) ;
    length += 1 ;
  }

  if (staticString) vl_free(staticString) ;
  if (cpuString) vl_free(cpuString) ;
  return string ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %eax, %eax
callq 0x93d0
movq %rax, %r14
leaq 0x27910(%rip), %rdi     # 0x376e0
callq 0x15af9
movq %rax, %rbx
leaq 0x1d5e1(%rip), %r12     # 0x2d3c0
xorl %ebp, %ebp
xorl %r15d, %r15d
testq %r15, %r15
jne 0xfe38
testl %ebp, %ebp
jle 0xfdff
movl %ebp, %edi
callq *0x278cb(%rip)          # 0x376c0
movq %rax, %r13
testq %rax, %rax
jne 0xfe02
jmp 0xfe38
xorl %r13d, %r13d
movslq %ebp, %rsi
movq 0x27914(%rip), %r9      # 0x37720
movq %r13, %rdi
leaq 0x1d5b1(%rip), %rdx     # 0x2d3c7
movq %r12, %rcx
movq %r14, %r8
xorl %eax, %eax
leaq 0x1d5ed(%rip), %r10     # 0x2d412
pushq %r10
pushq %rbx
callq 0x93b0
popq %rcx
popq %rdx
movl %eax, %ebp
incl %ebp
movq %r13, %r15
jmp 0xfde4
testq %r14, %r14
je 0xfe46
movq %r14, %rdi
callq *0x27892(%rip)          # 0x376d8
testq %rbx, %rbx
je 0xfe54
movq %rbx, %rdi
callq *0x27884(%rip)          # 0x376d8
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/generic.c
// Function: vl_set_last_error
int
vl_set_last_error (int error, char const * errorMessage, ...)
{
  VlThreadState * state = vl_get_thread_specific_state() ;
  va_list args;
  va_start(args, errorMessage) ;
  if (errorMessage) {
#ifdef VL_COMPILER_LCC
    vsprintf(state->lastErrorMessage, errorMessage, args) ;
#else
    vsnprintf(state->lastErrorMessage,
              sizeof(state->lastErrorMessage)/sizeof(char),
              errorMessage, args) ;
#endif
  } else {
    state->lastErrorMessage[0] = 0 ;
  }
  state->lastError = error ;
  va_end(args) ;
  return error ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movl %edi, %ebx
leaq 0x20(%rsp), %r12
movq %rdx, 0x10(%r12)
movq %rcx, 0x18(%r12)
movq %r8, 0x20(%r12)
movq %r9, 0x28(%r12)
testb %al, %al
je 0xff0d
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
callq 0xff6a
movq %rax, %r15
movq %r12, 0x10(%rsp)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
movq %r15, %rdi
addq $0x4, %rdi
testq %r14, %r14
je 0xff53
movq %rsp, %rcx
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x91e0
jmp 0xff56
movb $0x0, (%rdi)
movl %ebx, (%r15)
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/generic.c
// Function: vl_set_alloc_func
void
vl_set_alloc_func (void *(*malloc_func)  (size_t),
                   void *(*realloc_func) (void*, size_t),
                   void *(*calloc_func)  (size_t, size_t),
                   void  (*free_func)    (void*))
{
  VlState * state ;
  vl_lock_state () ;
  state = vl_get_state() ;
  state->malloc_func  = malloc_func ;
  state->realloc_func = realloc_func ;
  state->calloc_func  = calloc_func ;
  state->free_func    = free_func ;
  vl_unlock_state () ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0x1001e
movq %r12, 0x276c7(%rip)     # 0x376c0
movq %r15, 0x276c8(%rip)     # 0x376c8
movq %r14, 0x276c9(%rip)     # 0x376d0
movq %rbx, 0x276ca(%rip)     # 0x376d8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x100b2
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/generic.c
// Function: vl_lock_state
static void
vl_lock_state (void)
{
#if ! defined(VL_DISABLE_THREADS)
#if   defined(VL_THREADS_POSIX)
  VlState * state = vl_get_state () ;
  pthread_t thisThread = pthread_self () ;
  pthread_mutex_lock (&state->mutex) ;
  if (state->mutexCount >= 1 &&
      pthread_equal (state->mutexOwner, thisThread)) {
    state->mutexCount ++ ;
  } else {
    while (state->mutexCount >= 1) {
      pthread_cond_wait (&state->mutexCondition, &state->mutex) ;
    }
    state->mutexOwner = thisThread ;
    state->mutexCount = 1 ;
  }
  pthread_mutex_unlock (&state->mutex) ;
#elif defined(VL_THREADS_WIN)
  EnterCriticalSection (&vl_get_state()->mutex) ;
#endif
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
callq 0x9800
movq %rax, %rbx
leaq 0x2761b(%rip), %rdi     # 0x37650
callq 0x9ac0
movq 0x2766f(%rip), %r12     # 0x376b0
testq %r12, %r12
je 0x10062
movq 0x2762b(%rip), %rdi     # 0x37678
movq %rbx, %rsi
callq 0x97e0
testl %eax, %eax
je 0x1005e
incq %r12
jmp 0x10094
pushq $0x1
popq %r12
leaq 0x27617(%rip), %r14     # 0x37680
leaq 0x275e0(%rip), %r15     # 0x37650
testq %r12, %r12
je 0x10089
movq %r14, %rdi
movq %r15, %rsi
callq 0x9270
movq 0x27629(%rip), %r12     # 0x376b0
jmp 0x10070
movq %rbx, 0x275e8(%rip)     # 0x37678
pushq $0x1
popq %r12
movq %r12, 0x27615(%rip)     # 0x376b0
leaq 0x275ae(%rip), %rdi     # 0x37650
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x9670
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/gmm.c
// Function: vl_gmm_new
VlGMM *
vl_gmm_new (vl_type dataType, vl_size dimension, vl_size numComponents)
{
  vl_index i ;
  vl_size size = vl_get_type_size(dataType) ;
  VlGMM * self = vl_calloc(1, sizeof(VlGMM)) ;
  self->dataType = dataType;
  self->numClusters = numComponents ;
  self->numData = 0;
  self->dimension = dimension ;
  self->initialization = VlGMMRand;
  self->verbosity = 0 ;
  self->maxNumIterations = 50;
  self->numRepetitions = 1;
  self->sigmaLowBound =  NULL ;
  self->priors = NULL ;
  self->covariances = NULL ;
  self->means = NULL ;
  self->posteriors = NULL ;
  self->kmeansInit = NULL ;
  self->kmeansInitIsOwner = VL_FALSE;

  self->priors = vl_calloc (numComponents, size) ;
  self->means = vl_calloc (numComponents * dimension, size) ;
  self->covariances = vl_calloc (numComponents * dimension, size) ;
  self->sigmaLowBound = vl_calloc (dimension, sizeof(double)) ;

  for (i = 0 ; i < (unsigned)self->dimension ; ++i)  { self->sigmaLowBound[i] = 1e-4 ; }
  return self ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movl %edi, %ebp
callq 0x10760
movq %rax, %r12
pushq $0x1
popq %rdi
movl $0x80, %esi
callq 0x9960
movq %rax, %rbx
movl %ebp, (%rax)
movq %r15, 0x10(%rax)
andq $0x0, 0x18(%rax)
movq %r14, 0x8(%rax)
movl $0x1, 0x60(%rax)
andl $0x0, 0x30(%rax)
movq $0x32, 0x20(%rax)
movq $0x1, 0x28(%rax)
andq $0x0, 0x68(%rax)
andl $0x0, 0x78(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rax)
movups %xmm0, 0x48(%rax)
andq $0x0, 0x58(%rax)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9960
movq %rax, 0x48(%rbx)
imulq %r14, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x9960
movq %rax, 0x38(%rbx)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9960
movq %rax, 0x40(%rbx)
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x9960
movq %rax, 0x58(%rbx)
movl 0x8(%rbx), %ecx
xorl %edx, %edx
movabsq $0x3f1a36e2eb1c432d, %rsi # imm = 0x3F1A36E2EB1C432D
cmpq %rcx, %rdx
jae 0x10754
movq %rsi, (%rax,%rdx,8)
incq %rdx
jmp 0x10746
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/gmm.c
// Function: vl_gmm_reset
void
vl_gmm_reset (VlGMM * self)
{
  if (self->posteriors) {
    vl_free(self->posteriors) ;
    self->posteriors = NULL ;
    self->numData = 0 ;
  }
  if (self->kmeansInit && self->kmeansInitIsOwner) {
    vl_kmeans_delete(self->kmeansInit) ;
    self->kmeansInit = NULL ;
    self->kmeansInitIsOwner = VL_FALSE ;
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
testq %rdi, %rdi
je 0x10797
callq 0x95b0
andq $0x0, 0x50(%rbx)
andq $0x0, 0x18(%rbx)
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x107b4
cmpl $0x0, 0x78(%rbx)
je 0x107b4
callq 0x9260
andq $0x0, 0x68(%rbx)
andl $0x0, 0x78(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/gmm.c
// Function: vl_gmm_delete
void
vl_gmm_delete (VlGMM * self)
{
  if(self->means) vl_free(self->means);
  if(self->covariances) vl_free(self->covariances);
  if(self->priors) vl_free(self->priors);
  if(self->posteriors) vl_free(self->posteriors);
  if(self->kmeansInit && self->kmeansInitIsOwner) {
    vl_kmeans_delete(self->kmeansInit);
  }
  vl_free(self);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x107c8
callq 0x95b0
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x107d6
callq 0x95b0
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x107e4
callq 0x95b0
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x107f2
callq 0x95b0
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x10806
cmpl $0x0, 0x78(%rbx)
je 0x10806
callq 0x9260
movq %rbx, %rdi
popq %rbx
jmp 0x95b0
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/gmm.c
// Function: vl_gmm_set_kmeans_init_object
void vl_gmm_set_kmeans_init_object (VlGMM * self, VlKMeans * kmeans)
{
  if (self->kmeansInit && self->kmeansInitIsOwner) {
    vl_kmeans_delete(self->kmeansInit) ;
  }
  self->kmeansInit = kmeans;
  self->kmeansInitIsOwner = VL_FALSE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x68(%rdi), %rdi
testq %rdi, %rdi
je 0x10882
cmpl $0x0, 0x78(%rbx)
je 0x10882
callq 0x9260
movq %r14, 0x68(%rbx)
andl $0x0, 0x78(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/gmm.c
// Function: vl_gmm_new_copy
VlGMM *
vl_gmm_new_copy (VlGMM const * self)
{
  vl_size size = vl_get_type_size(self->dataType) ;
  VlGMM * gmm = vl_gmm_new(self->dataType, self->dimension, self->numClusters);
  gmm->initialization = self->initialization;
  gmm->maxNumIterations = self->maxNumIterations;
  gmm->numRepetitions = self->numRepetitions;
  gmm->verbosity = self->verbosity;
  gmm->LL = self->LL;

  memcpy(gmm->means, self->means, size*self->numClusters*self->dimension);
  memcpy(gmm->covariances, self->covariances, size*self->numClusters*self->dimension);
  memcpy(gmm->priors, self->priors, size*self->numClusters);
  return gmm ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
callq 0x10760
movq %rax, %r14
movl (%rbx), %edi
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
callq 0x9750
movq %rax, %r15
movl 0x60(%rbx), %eax
movl %eax, 0x60(%r15)
movups 0x20(%rbx), %xmm0
movups %xmm0, 0x20(%r15)
movl 0x30(%rbx), %eax
movl %eax, 0x30(%r15)
movsd 0x70(%rbx), %xmm0
movsd %xmm0, 0x70(%r15)
movq 0x38(%r15), %rdi
movq 0x38(%rbx), %rsi
movq 0x10(%rbx), %rdx
imulq %r14, %rdx
imulq 0x8(%rbx), %rdx
callq 0x95d0
movq 0x40(%r15), %rdi
movq 0x40(%rbx), %rsi
movq 0x10(%rbx), %rdx
imulq %r14, %rdx
imulq 0x8(%rbx), %rdx
callq 0x95d0
movq 0x48(%r15), %rdi
movq 0x48(%rbx), %rsi
imulq 0x10(%rbx), %r14
movq %r14, %rdx
callq 0x95d0
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/vl/gmm.c
// Function: vl_gmm_prepare_for_data
static void
_vl_gmm_prepare_for_data (VlGMM* self, vl_size numData)
{
  if (self->numData < numData) {
    vl_free(self->posteriors) ;
    self->posteriors = vl_malloc(vl_get_type_size(self->dataType) * numData * self->numClusters) ;
  }
  self->numData = numData ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rsi, 0x18(%rdi)
jae 0x126e7
movq 0x50(%r14), %rdi
callq 0x95b0
movl (%r14), %edi
callq 0x10760
imulq %rbx, %rax
imulq 0x10(%r14), %rax
movq %rax, %rdi
callq 0x95e0
movq %rax, 0x50(%r14)
movq %rbx, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq