LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/anet.c
// Function: anetTcpAccept
int anetTcpAccept(char *err, int s, char *ip, int *port) {
    int fd;
    struct sockaddr_in sa;
    socklen_t salen = sizeof(sa);
    if ((fd = anetGenericAccept(err,s,(struct sockaddr*)&sa,&salen)) == ANET_ERR)
        return ANET_ERR;

    if (ip) strcpy(ip,inet_ntoa(sa.sin_addr));
    if (port) *port = ntohs(sa.sin_port);
    return fd;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movq %rdx, %r14
leaq 0xc(%rsp), %rcx
movl $0x10, (%rcx)
leaq 0x10(%rsp), %rdx
callq 0x5772
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x5767
testq %r14, %r14
je 0x5754
movl 0x14(%rsp), %edi
callq 0x4110
movq %r14, %rdi
movq %rax, %rsi
callq 0x40a0
testq %rbx, %rbx
je 0x5767
movzwl 0x12(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, (%rbx)
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/anet.c
// Function: anetPeerToString
int anetPeerToString(int fd, char *ip, int *port) {
    struct sockaddr_in sa;
    socklen_t salen = sizeof(sa);

    if (getpeername(fd,(struct sockaddr*)&sa,&salen) == -1) {
        *port = 0;
        ip[0] = '?';
        ip[1] = '\0';
        return -1;
    }
    if (ip) strcpy(ip,inet_ntoa(sa.sin_addr));
    if (port) *port = ntohs(sa.sin_port);
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x4(%rsp), %rdx
movl $0x10, (%rdx)
leaq 0x8(%rsp), %rsi
callq 0x4120
cmpl $-0x1, %eax
je 0x583e
testq %r14, %r14
je 0x5827
movl 0xc(%rsp), %edi
callq 0x4110
movq %r14, %rdi
movq %rax, %rsi
callq 0x40a0
xorl %eax, %eax
testq %rbx, %rbx
je 0x584a
movzwl 0xa(%rsp), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
movl %ecx, (%rbx)
jmp 0x584a
andl $0x0, (%rbx)
movw $0x3f, (%r14)
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/anet.c
// Function: anetSockName
int anetSockName(int fd, char *ip, int *port) {
    struct sockaddr_in sa;
    socklen_t salen = sizeof(sa);

    if (getsockname(fd,(struct sockaddr*)&sa,&salen) == -1) {
        *port = 0;
        ip[0] = '?';
        ip[1] = '\0';
        return -1;
    }
    if (ip) strcpy(ip,inet_ntoa(sa.sin_addr));
    if (port) *port = ntohs(sa.sin_port);
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x4(%rsp), %rdx
movl $0x10, (%rdx)
leaq 0x8(%rsp), %rsi
callq 0x4370
cmpl $-0x1, %eax
je 0x58a9
testq %r14, %r14
je 0x5892
movl 0xc(%rsp), %edi
callq 0x4110
movq %r14, %rdi
movq %rax, %rsi
callq 0x40a0
xorl %eax, %eax
testq %rbx, %rbx
je 0x58b5
movzwl 0xa(%rsp), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
movl %ecx, (%rbx)
jmp 0x58b5
andl $0x0, (%rbx)
movw $0x3f, (%r14)
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/dict.c
// Function: dictGenHashFunction
unsigned int dictGenHashFunction(const unsigned char *buf, int len) {
    unsigned int hash = dict_hash_function_seed;

    while (len--)
        hash = ((hash << 5) + hash) + (*buf++); /* hash * 33 + c */
    return hash;
}

// Assembly:
movl 0xa8e2(%rip), %eax      # 0x10210
movl %esi, %ecx
xorl %edx, %edx
cmpl %edx, %ecx
je 0x5944
imull $0x21, %eax, %esi
movzbl (%rdi,%rdx), %eax
addl %esi, %eax
incq %rdx
jmp 0x5932
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/dict.c
// Function: dictGenCaseHashFunction
unsigned int dictGenCaseHashFunction(const unsigned char *buf, int len) {
    unsigned int hash = dict_hash_function_seed;

    while (len--)
        hash = ((hash << 5) + hash) + (tolower(*buf++)); /* hash * 33 + c */
    return hash;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0xa8ba(%rip), %ebx      # 0x10210
movl %esi, %r15d
xorl %r12d, %r12d
cmpl %r12d, %r15d
je 0x5979
imull $0x21, %ebx, %ebx
callq 0x43d0
movq (%rax), %rax
movzbl (%r14,%r12), %ecx
addl (%rax,%rcx,4), %ebx
incq %r12
jmp 0x595c
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/dict.c
// Function: dictRehash
int dictRehash(dict *d, int n) {
    if (!dictIsRehashing(d)) return 0;

    while(n--) {
        dictEntry *de, *nextde;

        /* Check if we already rehashed the whole table... */
        if (d->ht[0].used == 0) {
            zfree(d->ht[0].table);
            d->ht[0] = d->ht[1];
            _dictReset(&d->ht[1]);
            d->rehashidx = -1;
            return 0;
        }

        /* Note that rehashidx can't overflow as we are sure there are more
         * elements because ht[0].used != 0 */
        assert(d->ht[0].size > (unsigned)d->rehashidx);
        while(d->ht[0].table[d->rehashidx] == NULL) d->rehashidx++;
        de = d->ht[0].table[d->rehashidx];
        /* Move all the keys in this bucket from the old to the new hash HT */
        while(de) {
            unsigned int h;

            nextde = de->next;
            /* Get the index in the new hash table */
            h = dictHashKey(d, de->key) & d->ht[1].sizemask;
            de->next = d->ht[1].table[h];
            d->ht[1].table[h] = de;
            d->ht[0].used--;
            d->ht[1].used++;
            de = nextde;
        }
        d->ht[0].table[d->rehashidx] = NULL;
        d->rehashidx++;
    }
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x50(%rdi), %eax
xorl %ebx, %ebx
cmpl $-0x1, %eax
je 0x5b44
movl %esi, %ebp
movq %rdi, %r14
leaq 0x10(%rdi), %r12
leaq 0x30(%rdi), %rcx
movq %rcx, (%rsp)
subl $0x1, %ebp
jb 0x5b11
cmpq $0x0, 0x28(%r14)
je 0x5b16
movl %eax, %ecx
cmpq %rcx, 0x18(%r14)
jbe 0x5b55
movslq %eax, %rcx
shlq $0x3, %rcx
addq (%r12), %rcx
incl %eax
movq (%rcx), %r13
testq %r13, %r13
jne 0x5af6
movl %eax, 0x50(%r14)
addq $0x8, %rcx
jmp 0x5ab6
movq (%r13), %rdi
movq 0x10(%r13), %r15
movq (%r14), %rax
callq *(%rax)
andl 0x40(%r14), %eax
movq 0x30(%r14), %rcx
movq (%rcx,%rax,8), %rdx
movq %rdx, 0x10(%r13)
movq %r13, (%rcx,%rax,8)
decq 0x28(%r14)
incq 0x48(%r14)
movq %r15, %r13
testq %r13, %r13
jne 0x5aca
movq 0x10(%r14), %rax
movslq 0x50(%r14), %rcx
andq $0x0, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x50(%r14)
jmp 0x5a93
pushq $0x1
popq %rbx
jmp 0x5b44
movq 0x10(%r14), %rdi
callq 0xabbb
movq (%rsp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x10(%r12)
movups %xmm0, (%r12)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
orl $-0x1, 0x50(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5db4(%rip), %rdi      # 0xb910
leaq 0x5dd4(%rip), %rsi      # 0xb937
leaq 0x5dd4(%rip), %rcx      # 0xb93e
movl $0xd8, %edx
callq 0x4190
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/dict.c
// Function: dictAddRaw
dictEntry *dictAddRaw(dict *d, void *key)
{
    int index;
    dictEntry *entry;
    dictht *ht;

    if (dictIsRehashing(d)) _dictRehashStep(d);

    /* Get the index of the new element, or -1 if
     * the element already exists. */
    if ((index = _dictKeyIndex(d, key)) == -1)
        return NULL;

    /* Allocate the memory and store the new entry */
    ht = dictIsRehashing(d) ? &d->ht[1] : &d->ht[0];
    entry = zmalloc(sizeof(*entry));
    entry->next = ht->table[index];
    ht->table[index] = entry;
    ht->used++;

    /* Set the hash entry fields. */
    dictSetKey(d, entry, key);
    return entry;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $-0x1, 0x50(%rdi)
je 0x5c53
movq %r14, %rdi
callq 0x5d7b
cmpl $-0x1, 0x50(%r14)
jne 0x5ca5
movq 0x18(%r14), %rcx
testq %rcx, %rcx
je 0x5c81
movq 0x28(%r14), %rsi
cmpq %rcx, %rsi
jb 0x5ca5
cmpb $0x1, 0xa5c0(%rip)      # 0x1022c
jne 0x5c7c
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
cmpq $0x6, %rax
jb 0x5ca5
addq %rsi, %rsi
jmp 0x5c84
pushq $0x4
popq %rsi
movq %r14, %rdi
callq 0x59e8
testl %eax, %eax
je 0x5ca5
xorl %r13d, %r13d
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rax
movq %rbx, %rdi
callq *(%rax)
leaq 0x10(%r14), %r13
xorl %r15d, %r15d
movl %eax, 0x4(%rsp)
cmpq $0x2, %r15
je 0x5d1c
movq %r15, %rcx
shlq $0x5, %rcx
movl 0x10(%r13,%rcx), %r12d
andl %eax, %r12d
leaq (,%r12,8), %rbp
addq (%r13,%rcx), %rbp
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x5d0e
movq (%r14), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x5d02
movq 0x8(%r14), %rdi
movq (%rbp), %rdx
movq %rbx, %rsi
callq *%rax
testl %eax, %eax
je 0x5d08
jmp 0x5c90
cmpq %rbx, (%rbp)
je 0x5c90
addq $0x10, %rbp
jmp 0x5cda
incq %r15
cmpl $-0x1, 0x50(%r14)
movl 0x4(%rsp), %eax
jne 0x5cb8
cmpl $-0x1, %r12d
je 0x5c90
xorl %r15d, %r15d
cmpl $-0x1, 0x50(%r14)
setne %r15b
shll $0x5, %r15d
pushq $0x18
popq %rdi
callq 0xaa4d
movq %rax, %r13
movq 0x10(%r14,%r15), %rax
movslq %r12d, %rcx
movq (%rax,%rcx,8), %rdx
movq %rdx, 0x10(%r13)
movq %r13, (%rax,%rcx,8)
incq 0x28(%r14,%r15)
movq (%r14), %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x5d72
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq *%rax
movq %rax, %rbx
movq %rbx, (%r13)
jmp 0x5c93
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/dict.c
// Function: dictFind
dictEntry *dictFind(dict *d, const void *key)
{
    dictEntry *he;
    unsigned int h, idx, table;

    if (d->ht[0].size == 0) return NULL; /* We don't have a table at all */
    if (dictIsRehashing(d)) _dictRehashStep(d);
    h = dictHashKey(d, key);
    for (table = 0; table <= 1; table++) {
        idx = h & d->ht[table].sizemask;
        he = d->ht[table].table[idx];
        while(he) {
            if (dictCompareKeys(d, key, he->key))
                return he;
            he = he->next;
        }
        if (!dictIsRehashing(d)) return NULL;
    }
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x18(%rdi)
je 0x5e89
movq %rsi, %rbx
movq %rdi, %r14
cmpl $-0x1, 0x50(%rdi)
je 0x5e20
movq %r14, %rdi
callq 0x5d7b
leaq 0x10(%r14), %r12
movq (%r14), %rax
movq %rbx, %rdi
callq *(%rax)
movl %eax, %ebp
xorl %r13d, %r13d
cmpq $0x2, %r13
je 0x5e89
movq %r13, %rax
shlq $0x5, %rax
movl 0x10(%r12,%rax), %r15d
andl %ebp, %r15d
shlq $0x3, %r15
addq (%r12,%rax), %r15
movq (%r15), %r15
testq %r15, %r15
je 0x5e7f
movq (%r14), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x5e74
movq 0x8(%r14), %rdi
movq (%r15), %rdx
movq %rbx, %rsi
callq *%rax
testl %eax, %eax
je 0x5e79
jmp 0x5e8c
cmpq %rbx, (%r15)
je 0x5e8c
addq $0x10, %r15
jmp 0x5e4e
incq %r13
cmpl $-0x1, 0x50(%r14)
jne 0x5e31
xorl %r15d, %r15d
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/srned[P]baselib/dict.c
// Function: dictClear
int _dictClear(dict *d, dictht *ht)
{
    unsigned long i;

    /* Free all the elements */
    for (i = 0; i < ht->size && ht->used > 0; i++) {
        dictEntry *he, *nextHe;

        if ((he = ht->table[i]) == NULL) continue;
        while(he) {
            nextHe = he->next;
            dictFreeKey(d, he);
            dictFreeVal(d, he);
            zfree(he);
            ht->used--;
            he = nextHe;
        }
    }
    /* Free the table and the allocated cache structure */
    zfree(ht->table);
    /* Re-initialize the table */
    _dictReset(ht);
    return DICT_OK; /* never fails */
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
cmpq 0x8(%rbx), %r12
jae 0x6084
cmpq $0x0, 0x18(%rbx)
movq (%rbx), %rdi
je 0x6087
movq (%rdi,%r12,8), %r15
testq %r15, %r15
jne 0x607a
jmp 0x607f
movq 0x10(%r15), %r13
movq (%r14), %rcx
movq 0x20(%rcx), %rax
testq %rax, %rax
je 0x6058
movq 0x8(%r14), %rdi
movq (%r15), %rsi
callq *%rax
movq (%r14), %rcx
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x606b
movq 0x8(%r14), %rdi
movq 0x8(%r15), %rsi
callq *%rax
movq %r15, %rdi
callq 0xabbb
decq 0x18(%rbx)
movq %r13, %r15
testq %r15, %r15
jne 0x603c
incq %r12
jmp 0x6021
movq (%rbx), %rdi
callq 0xabbb
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/dict.c
// Function: dictNext
dictEntry *dictNext(dictIterator *iter)
{
    while (1) {
        if (iter->entry == NULL) {
            dictht *ht = &iter->d->ht[iter->table];
            if (iter->safe && iter->index == -1 && iter->table == 0)
                iter->d->iterators++;
            iter->index++;
            if (iter->index >= (signed) ht->size) {
                if (dictIsRehashing(iter->d) && iter->table == 0) {
                    iter->table++;
                    iter->index = 0;
                    ht = &iter->d->ht[1];
                } else {
                    break;
                }
            }
            iter->entry = ht->table[iter->index];
        } else {
            iter->entry = iter->nextEntry;
        }
        if (iter->entry) {
            /* We need to save the 'next' here, the iterator user
             * may delete the entry we are returning. */
            iter->nextEntry = iter->entry->next;
            return iter->entry;
        }
    }
    return NULL;
}

// Assembly:
leaq 0x20(%rdi), %rcx
cmpq $0x0, 0x18(%rdi)
movq %rcx, %rdx
jne 0x6182
movq (%rdi), %rdx
movslq 0x8(%rdi), %rsi
movq %rsi, %rax
shlq $0x5, %rax
addq %rdx, %rax
addq $0x10, %rax
cmpl $0x0, 0x10(%rdi)
movl 0xc(%rdi), %r8d
je 0x614d
movl %r8d, %r9d
notl %r9d
orl %esi, %r9d
jne 0x614d
incl 0x54(%rdx)
incl %r8d
movl %r8d, 0xc(%rdi)
cmpl 0x8(%rax), %r8d
jl 0x6178
xorl %eax, %eax
cmpl $-0x1, 0x50(%rdx)
je 0x6195
testl %esi, %esi
jne 0x6195
movq $0x1, 0x8(%rdi)
addq $0x30, %rdx
xorl %r8d, %r8d
movq %rdx, %rax
movslq %r8d, %rdx
shlq $0x3, %rdx
addq (%rax), %rdx
movq (%rdx), %rax
movq %rax, 0x18(%rdi)
testq %rax, %rax
je 0x6120
movq 0x10(%rax), %rdx
movq %rdx, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/dict.c
// Function: dictGetRandomKey
dictEntry *dictGetRandomKey(dict *d)
{
    dictEntry *he, *orighe;
    unsigned int h;
    int listlen, listele;

    if (dictSize(d) == 0) return NULL;
    if (dictIsRehashing(d)) _dictRehashStep(d);
    if (dictIsRehashing(d)) {
        do {
            h = random() % (d->ht[0].size+d->ht[1].size);
            he = (h >= d->ht[0].size) ? d->ht[1].table[h - d->ht[0].size] :
                                      d->ht[0].table[h];
        } while(he == NULL);
    } else {
        do {
            h = random() & d->ht[0].sizemask;
            he = d->ht[0].table[h];
        } while(he == NULL);
    }

    /* Now we found a non empty bucket, but it is a linked
     * list and we need to get a random element from the list.
     * The only sane way to do so is counting the elements and
     * select a random index. */
    listlen = 0;
    orighe = he;
    while(he) {
        he = he->next;
        listlen++;
    }
    listele = random() % listlen;
    he = orighe;
    while(listele--) he = he->next;
    return he;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x28(%rdi), %rax
addq 0x48(%rdi), %rax
jne 0x61d7
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdi, %rbx
cmpl $-0x1, 0x50(%rdi)
je 0x622c
movq %rbx, %rdi
callq 0x5d7b
cmpl $-0x1, 0x50(%rbx)
je 0x622c
callq 0x4260
movq 0x18(%rbx), %rsi
movq 0x38(%rbx), %rcx
addq %rsi, %rcx
xorl %edx, %edx
divq %rcx
movl %edx, %ecx
movq %rcx, %rax
subq %rsi, %rax
jae 0x621a
shlq $0x3, %rcx
addq 0x10(%rbx), %rcx
movq %rcx, %rax
jmp 0x6222
shlq $0x3, %rax
addq 0x30(%rbx), %rax
movq (%rax), %r14
testq %r14, %r14
je 0x61ee
jmp 0x6241
callq 0x4260
movq 0x10(%rbx), %rcx
andl 0x20(%rbx), %eax
movq (%rcx,%rax,8), %r14
testq %r14, %r14
je 0x622c
xorl %ebx, %ebx
movq %r14, %rax
testq %rax, %rax
je 0x6254
movq 0x10(%rax), %rax
incq %rbx
jmp 0x6246
callq 0x4260
cqto
idivq %rbx
subl $0x1, %edx
jb 0x61cc
movq 0x10(%r14), %r14
jmp 0x625e
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/dict.c
// Function: dictEmpty
void dictEmpty(dict *d) {
    _dictClear(d,&d->ht[0]);
    _dictClear(d,&d->ht[1]);
    d->rehashidx = -1;
    d->iterators = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rsi
callq 0x600f
leaq 0x30(%rbx), %rsi
movq %rbx, %rdi
callq 0x600f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x50(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/sds.c
// Function: sdsnewlen
sds sdsnewlen(const void *init, size_t initlen) {
    struct sdshdr *sh;

    if (init) {
        sh = zmalloc(sizeof(struct sdshdr)+initlen+1);
    } else {
        sh = zcalloc(sizeof(struct sdshdr)+initlen+1);
    }
    if (sh == NULL) return NULL;
    sh->len = initlen;
    sh->free = 0;
    if (initlen && init)
        memcpy(sh->buf, init, initlen);
    sh->buf[initlen] = '\0';
    return (char*)sh->buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x9(%rsi), %rdi
testq %r14, %r14
je 0x6e83
callq 0xaa4d
jmp 0x6e88
callq 0xaaaf
movq %rax, %r15
testq %rax, %rax
je 0x6ec3
testq %r14, %r14
sete %al
movl %ebx, (%r15)
andl $0x0, 0x4(%r15)
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x6eb7
leaq 0x8(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4240
movb $0x0, 0x8(%r15,%rbx)
addq $0x8, %r15
jmp 0x6ec6
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/sds.c
// Function: sdsMakeRoomFor
sds sdsMakeRoomFor(sds s, size_t addlen) {
    struct sdshdr *sh, *newsh;
    size_t free = sdsavail(s);
    size_t len, newlen;

    if (free >= addlen) return s;
    len = sdslen(s);
    sh = (void*) (s-(sizeof(struct sdshdr)));
    newlen = (len+addlen);
    if (newlen < SDS_MAX_PREALLOC)
        newlen *= 2;
    else
        newlen += SDS_MAX_PREALLOC;
    newsh = zrealloc(sh, sizeof(struct sdshdr)+newlen+1);
    if (newsh == NULL) return NULL;

    newsh->free = newlen - len;
    return newsh->buf;
}

// Assembly:
movq %rdi, %rax
movslq -0x4(%rdi), %rcx
cmpq %rsi, %rcx
jae 0x6f90
pushq %r14
pushq %rbx
pushq %rax
movslq -0x8(%rax), %rbx
addq $-0x8, %rax
addq %rbx, %rsi
leaq (%rsi,%rsi), %rcx
movl $0x100000, %edx         # imm = 0x100000
leaq (%rsi,%rdx), %r14
cmpq %rdx, %rsi
cmovbq %rcx, %r14
leaq 0x9(%r14), %rsi
movq %rax, %rdi
callq 0xab14
testq %rax, %rax
je 0x6f87
subl %ebx, %r14d
movl %r14d, 0x4(%rax)
addq $0x8, %rax
jmp 0x6f89
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/sds.c
// Function: sdsRemoveFreeSpace
sds sdsRemoveFreeSpace(sds s) {
    struct sdshdr *sh;

    sh = (void*) (s-(sizeof(struct sdshdr)));
    sh = zrealloc(sh, sizeof(struct sdshdr)+sh->len+1);
    sh->free = 0;
    return sh->buf;
}

// Assembly:
pushq %rax
movslq -0x8(%rdi), %rsi
addq $-0x8, %rdi
addq $0x9, %rsi
callq 0xab14
andl $0x0, 0x4(%rax)
addq $0x8, %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/sds.c
// Function: sdsIncrLen
void sdsIncrLen(sds s, int incr) {
    struct sdshdr *sh = (void*) (s-(sizeof(struct sdshdr)));

    assert(sh->free >= incr);
    sh->len += incr;
    sh->free -= incr;
    assert(sh->free >= 0);
    s[sh->len] = '\0';
}

// Assembly:
pushq %rax
movl -0x4(%rdi), %eax
cmpl %esi, %eax
jl 0x6fdf
movslq -0x8(%rdi), %rdx
movslq %esi, %rcx
addq %rdx, %rcx
movl %ecx, -0x8(%rdi)
subl %esi, %eax
movl %eax, -0x4(%rdi)
js 0x6ffe
movb $0x0, (%rdi,%rcx)
popq %rax
retq
leaq 0x4a02(%rip), %rdi      # 0xb9e8
leaq 0x4a0c(%rip), %rsi      # 0xb9f9
leaq 0x4a0b(%rip), %rcx      # 0xb9ff
movl $0x9c, %edx
callq 0x4190
leaq 0x4a14(%rip), %rdi      # 0xba19
leaq 0x49ed(%rip), %rsi      # 0xb9f9
leaq 0x49ec(%rip), %rcx      # 0xb9ff
movl $0x9f, %edx
callq 0x4190
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/ziplist.c
// Function: ziplistIndex
unsigned char *ziplistIndex(unsigned char *zl, int index) {
    unsigned char *p;
    zlentry entry;
    if (index < 0) {
        index = (-index)-1;
        p = ZIPLIST_ENTRY_TAIL(zl);
        if (p[0] != ZIP_END) {
            entry = zipEntry(p);
            while (entry.prevrawlen > 0 && index--) {
                p -= entry.prevrawlen;
                entry = zipEntry(p);
            }
        }
    } else {
        p = ZIPLIST_ENTRY_HEAD(zl);
        while (p[0] != ZIP_END && index--) {
            p += zipRawEntryLength(p);
        }
    }
    return (p[0] == ZIP_END || index > 0) ? NULL : p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
testl %esi, %esi
js 0x99b8
addq $0xa, %rdi
pushq $-0x1
popq %rbp
movq %rdi, %r14
cmpb $-0x1, (%r14)
sete %al
je 0x9a0e
subl $0x1, %ebx
jb 0x99fd
movq %r14, %rdi
callq 0x9b05
movl %eax, %eax
addq %rax, %r14
jmp 0x999b
notl %ebx
movl 0x4(%rdi), %eax
leaq (%rdi,%rax), %r14
cmpb $-0x1, (%rdi,%rax)
je 0x9a01
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x9a2a
movl 0x4(%r15), %eax
pushq $-0x1
popq %rbp
testl %eax, %eax
je 0x9a07
subl $0x1, %ebx
jb 0x9a05
movl %eax, %eax
subq %rax, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x9a2a
movl 0xc(%rsp), %eax
jmp 0x99de
movl %ebp, %ebx
jmp 0x9a0e
movb $0x1, %al
jmp 0x9a0e
movl %ebp, %ebx
cmpb $-0x1, (%r14)
sete %al
xorl %ecx, %ecx
testl %ebx, %ebx
cmovgq %rcx, %r14
testb %al, %al
cmovneq %rcx, %r14
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/ziplist.c
// Function: zipEntry
static zlentry zipEntry(unsigned char *p) {
    zlentry e;

    ZIP_DECODE_PREVLEN(p, e.prevrawlensize, e.prevrawlen);
    ZIP_DECODE_LENGTH(p + e.prevrawlensize, e.encoding, e.lensize, e.len);
    e.headersize = e.prevrawlensize + e.lensize;
    e.p = p;
    return e;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movzbl (%rsi), %eax
xorl %ecx, %ecx
cmpl $0xfe, %eax
setae %cl
leal 0x1(,%rcx,4), %ebp
movl %ebp, (%rdi)
jb 0x9a50
movl 0x1(%r14), %eax
movl %eax, 0x4(%rbx)
movl %ebp, %ecx
movzbl (%r14,%rcx), %eax
movl %eax, %edx
andb $-0x40, %dl
movzbl %dl, %edx
cmpl $0xc0, %eax
cmovael %eax, %edx
movb %dl, 0x14(%rbx)
jae 0x9a9c
movl %eax, %edx
shrb $0x6, %dl
xorb $0x2, %dl
movzbl %dl, %edx
leaq 0x2033(%rip), %rsi      # 0xbab4
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movl $0x5, 0x8(%rbx)
movl 0x1(%r14,%rcx), %eax
bswapl %eax
pushq $0x5
jmp 0x9ab8
movl $0x1, 0x8(%rbx)
movl %eax, %edi
callq 0xa1b1
jmp 0x9ab6
movl $0x1, 0x8(%rbx)
andl $0x3f, %eax
pushq $0x1
popq %rcx
movl %eax, 0xc(%rbx)
addl %ebp, %ecx
movl %ecx, 0x10(%rbx)
movq %r14, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movl $0x2, 0x8(%rbx)
andl $0x3f, %eax
shll $0x8, %eax
movzbl 0x1(%r14,%rcx), %ecx
orl %ecx, %eax
pushq $0x2
jmp 0x9ab8
leaq 0x2033(%rip), %rdi      # 0xbb20
leaq 0x1fe5(%rip), %rsi      # 0xbad9
leaq 0x2162(%rip), %rcx      # 0xbc5d
movl $0x17d, %edx            # imm = 0x17D
callq 0x4190
// File: /workspace/github_c_makefile_star2_O2/srned[P]baselib/ziplist.c
// Function: ziplistGet
unsigned int ziplistGet(unsigned char *p, unsigned char **sstr, unsigned int *slen, long long *sval) {
    zlentry entry;
    if (p == NULL || p[0] == ZIP_END) return 0;
    if (sstr) *sstr = NULL;

    entry = zipEntry(p);
    if (ZIP_IS_STR(entry.encoding)) {
        if (sstr) {
            *slen = entry.len;
            *sstr = p+entry.headersize;
        }
    } else {
        if (sval) {
            *sval = zipLoadInteger(p+entry.headersize,entry.encoding);
        }
    }
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x9ca6
movq %rdi, %rbx
cmpb $-0x1, (%rdi)
je 0x9ca6
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
testq %rsi, %rsi
je 0x9c5b
andq $0x0, (%r15)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x9a2a
movl 0x10(%r13), %eax
movb 0x14(%r13), %cl
pushq $0x1
popq %rbp
cmpb $-0x41, %cl
jbe 0x9c93
testq %r14, %r14
je 0x9ca6
addq %rax, %rbx
movzbl %cl, %esi
movq %rbx, %rdi
callq 0x9cb7
movq %rax, (%r14)
jmp 0x9ca6
testq %r15, %r15
je 0x9ca6
movl 0x14(%rsp), %ecx
movl %ecx, (%r12)
addq %rax, %rbx
movq %rbx, (%r15)
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv4/ref/blake2b.c
// Function: blake2b_init
int blake2b_init(blake2b_ctx *ctx, size_t outlen,
    const void *key, size_t keylen)        // (keylen=0: no key)
{
    size_t i;

    if (outlen == 0 || outlen > 64 || keylen > 64)
        return -1;                      // illegal parameters

    for (i = 0; i < 8; i++)             // state, "param block"
        ctx->h[i] = blake2b_iv[i];
    ctx->h[0] ^= 0x01010000 ^ (keylen << 8) ^ outlen;

    ctx->t[0] = 0;                      // input count low word
    ctx->t[1] = 0;                      // input count high word
    ctx->c = 0;                         // pointer within buffer
    ctx->outlen = outlen;

    for (i = keylen; i < 128; i++)      // zero input block
        ctx->b[i] = 0;
    if (keylen > 0) {
        blake2b_update(ctx, key, keylen);
        ctx->c = 128;                   // at the end
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x41(%rsi), %rax
cmpq $-0x40, %rax
setb %al
cmpq $0x41, %rcx
setae %dil
orb %al, %dil
je 0x1222
pushq $-0x1
popq %rbp
jmp 0x12a9
xorl %eax, %eax
leaq 0x3dd5(%rip), %rdi      # 0x5000
cmpq $0x40, %rax
je 0x1243
movq (%rax,%rdi), %r8
movq %r8, 0x80(%rbx,%rax)
addq $0x8, %rax
jmp 0x122b
movq %rcx, %rax
shlq $0x8, %rax
addq %rsi, %rax
addq $0x1010000, %rax        # imm = 0x1010000
xorq %rax, 0x80(%rbx)
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, 0xc0(%rbx)
andq $0x0, 0xd0(%rbx)
movq %rsi, 0xd8(%rbx)
movq %rcx, %rax
cmpq $0x80, %rax
je 0x1289
movb $0x0, (%rbx,%rax)
incq %rax
jmp 0x1278
xorl %ebp, %ebp
testq %rcx, %rcx
je 0x12a9
movq %rbx, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x1050
movq $0x80, 0xd0(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv4/ref/blake2b.c
// Function: blake2b_update
void blake2b_update(blake2b_ctx *ctx,
    const void *in, size_t inlen)       // data bytes
{
    size_t i;

    for (i = 0; i < inlen; i++) {
        if (ctx->c == 128) {            // buffer full ?
            ctx->t[0] += ctx->c;        // add counters
            if (ctx->t[0] < ctx->c)     // carry overflow ?
                ctx->t[1]++;            // high word
            blake2b_compress(ctx, 0);   // compress (not last)
            ctx->c = 0;                 // counter to zero
        }
        ctx->b[ctx->c++] = ((const uint8_t *) in)[i];
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x1321
movq 0xd0(%r15), %rax
cmpq $0x80, %rax
jne 0x1309
movq 0xc0(%r15), %rax
subq $-0x80, %rax
movq %rax, 0xc0(%r15)
jb 0x12f5
incq 0xc8(%r15)
movq %r15, %rdi
xorl %esi, %esi
callq 0x132d
andq $0x0, 0xd0(%r15)
xorl %eax, %eax
movb (%r14,%r12), %cl
leaq 0x1(%rax), %rdx
movq %rdx, 0xd0(%r15)
movb %cl, (%r15,%rax)
incq %r12
jmp 0x12c6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv4/ref/blake2b.c
// Function: blake2b_final
void blake2b_final(blake2b_ctx *ctx, void *out)
{
    size_t i;

    ctx->t[0] += ctx->c;                // mark last block offset
    if (ctx->t[0] < ctx->c)             // carry overflow
        ctx->t[1]++;                    // high word

    while (ctx->c < 128)                // fill up with zeros
        ctx->b[ctx->c++] = 0;
    blake2b_compress(ctx, 1);           // final block flag = 1

    // little endian convert and store
    for (i = 0; i < ctx->outlen; i++) {
        ((uint8_t *) out)[i] =
            (ctx->h[i >> 3] >> (8 * (i & 7))) & 0xFF;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0xd0(%rdi), %rax
addq %rax, 0xc0(%rdi)
jae 0x17f0
incq 0xc8(%r14)
jmp 0x17f0
leaq 0x1(%rax), %rcx
movq %rcx, 0xd0(%r14)
movb $0x0, (%r14,%rax)
movq 0xd0(%r14), %rax
cmpq $0x7f, %rax
jbe 0x17d9
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x132d
xorl %eax, %eax
xorl %ecx, %ecx
cmpq 0xd8(%r14), %rcx
jae 0x1831
movq %rcx, %rdx
andq $-0x8, %rdx
movl %eax, %esi
andb $0x38, %sil
shrxq %rsi, 0x80(%r14,%rdx), %rdx
movb %dl, (%rbx,%rcx)
incq %rcx
addq $0x8, %rax
jmp 0x1805
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv4/ref/blake2b.c
// Function: blake2b
int blake2b(void *out, size_t outlen,
    const void *key, size_t keylen,
    const void *in, size_t inlen)
{
    blake2b_ctx ctx;

    if (blake2b_init(&ctx, outlen, key, keylen))
        return -1;
    blake2b_update(&ctx, in, inlen);
    blake2b_final(&ctx, out);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x10f0
testl %eax, %eax
je 0x1863
pushq $-0x1
popq %rax
jmp 0x1883
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1050
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1060
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv4/ref/encrypt.c
// Function: crypto_aead_encrypt
int crypto_aead_encrypt(
    unsigned char *c,unsigned long long *clen,
    const unsigned char *m,unsigned long long mlen,
    const unsigned char *ad,unsigned long long adlen,
    const unsigned char *nsec,
    const unsigned char *npub,
    const unsigned char *k
)
{
    byte *AD[] = {(byte*)ad};
    unsigned adbytes[] = {(unsigned)adlen};
    (void)nsec;
    if (clen) *clen = mlen+16;
    Encrypt((byte*)k, 48, (byte*)npub, 12, AD,
                adbytes, 1, 16, (byte*)m, mlen, (byte*)c);
    return 0;
}

// Assembly:
subq $0x18, %rsp
movq %rcx, %r10
movq %rdx, %rax
movq %rdi, %r11
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq %r8, 0x10(%rsp)
movl %r9d, 0xc(%rsp)
testq %rsi, %rsi
je 0x1e00
leaq 0x10(%r10), %rcx
movq %rcx, (%rsi)
subq $0x8, %rsp
pushq $0x30
popq %rsi
pushq $0xc
popq %rcx
leaq 0x18(%rsp), %r8
leaq 0x14(%rsp), %r9
pushq %r11
pushq %r10
pushq %rax
pushq $0x10
pushq $0x1
callq 0x10d0
addq $0x30, %rsp
xorl %eax, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv4/ref/encrypt.c
// Function: crypto_aead_decrypt
int crypto_aead_decrypt(
    unsigned char *m,unsigned long long *mlen,
    unsigned char *nsec,
    const unsigned char *c,unsigned long long clen,
    const unsigned char *ad,unsigned long long adlen,
    const unsigned char *npub,
    const unsigned char *k
)
{
    byte *AD[] = {(byte*)ad};
    unsigned adbytes[] = {(unsigned)adlen};
    (void)nsec;
    if (mlen) *mlen = clen-16;
    return Decrypt((byte*)k, 48, (byte*)npub, 12, AD,
                    adbytes, 1, 16, (byte*)c, clen, (byte*)m);
}

// Assembly:
subq $0x18, %rsp
movq %r8, %r10
movq %rcx, %rax
movq %rdi, %r11
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rdx
movl 0x20(%rsp), %ecx
movq %r9, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
testq %rsi, %rsi
je 0x1e5d
leaq -0x10(%r10), %rcx
movq %rcx, (%rsi)
subq $0x8, %rsp
pushq $0x30
popq %rsi
pushq $0xc
popq %rcx
leaq 0x18(%rsp), %r8
leaq 0x14(%rsp), %r9
pushq %r11
pushq %r10
pushq %rax
pushq $0x10
pushq $0x1
callq 0x1030
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv4/ref/encrypt.c
// Function: mult_block
static void mult_block(unsigned x, byte *src, byte *dst) {
    byte t[16], r[16];
    memcpy(t,src,16); memset(r,0,16);
    while (x != 0) {
        if (x&1) xor_bytes(r,t,16,r);
        double_block(t);
        x>>=1;
    }
    memcpy(dst,r,16);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
vmovups (%rsi), %xmm0
movq %rsp, %r14
vmovaps %xmm0, (%r14)
movq %rdx, %rbx
movl %edi, %ebp
vxorps %xmm0, %xmm0, %xmm0
leaq 0x10(%rsp), %r15
vmovaps %xmm0, (%r15)
pushq $0x10
popq %r12
testl %ebp, %ebp
je 0x2295
testb $0x1, %bpl
je 0x225c
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0x21da
movb (%rsp), %al
xorl %ecx, %ecx
cmpq $0xf, %rcx
je 0x2280
movb (%rsp,%rcx), %dl
movb 0x1(%rsp,%rcx), %sil
shrb $0x7, %sil
addb %dl, %dl
orb %sil, %dl
movb %dl, (%rsp,%rcx)
incq %rcx
jmp 0x2261
movb 0xf(%rsp), %cl
addb %cl, %cl
sarb $0x7, %al
andb $-0x79, %al
xorb %cl, %al
movb %al, 0xf(%rsp)
shrl %ebp
jmp 0x2241
vmovaps 0x10(%rsp), %xmm0
vmovups %xmm0, (%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/YunyiQian[P]multitel3/multisyn.c
// Function: trapezoid
float *trapezoid(float dura, float rise, float dt, int *ns) {
   int i, nr;
   float amp, *src;
   *ns = rint(dura/dt); if (*ns<2) *ns = 2;
   src = malloc((1+*ns)*sizeof(float));
   if (src == NULL) {*ns=0; return src;}
   nr = rint(rise*(*ns)); if (nr<1) nr = 1; if (2*nr>*ns) nr=*ns/2;
   amp = 1./(nr*(*ns-nr));
   for(i=0;i<nr;i++) src[i] = i*amp;
   for(;i<*ns-nr;i++) src[i] = nr*amp;
   for(;i<=*ns;i++)   src[i] = (*ns-i)*amp;
   (*ns)++;
   return src;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movss %xmm1, 0x4(%rsp)
divss %xmm2, %xmm0
callq 0x1160
cvttss2si %xmm0, %eax
cmpl $0x3, %eax
pushq $0x2
popq %r15
cmovgel %eax, %r15d
leaq 0x4(,%r15,4), %rdi
callq 0x1150
movq %rax, %r14
testq %rax, %rax
je 0x206d
leal 0x1(%r15), %ebp
cvtsi2ss %r15d, %xmm0
mulss 0x4(%rsp), %xmm0
callq 0x1160
cvttss2si %xmm0, %eax
cmpl $0x2, %eax
pushq $0x1
popq %rcx
cmovgel %eax, %ecx
leal (%rcx,%rcx), %edx
movl %r15d, %eax
shrl %eax
cmpl %r15d, %edx
cmovbel %ecx, %eax
movl %r15d, %ecx
subl %eax, %ecx
movl %eax, %edx
imull %ecx, %edx
cvtsi2sd %edx, %xmm0
movsd 0x402a(%rip), %xmm1     # 0x6038
divsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
xorl %edx, %edx
cmpq %rdx, %rax
je 0x2030
cvtsi2ss %edx, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%r14,%rdx,4)
incq %rdx
jmp 0x2018
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x204b
movss %xmm1, (%r14,%rax,4)
incq %rax
jmp 0x203b
movl %r15d, %ecx
subl %eax, %r15d
cmpq %rcx, %rax
ja 0x206f
cvtsi2ss %r15d, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%r14,%rax,4)
incq %rax
decl %r15d
jmp 0x2051
xorl %ebp, %ebp
movl %ebp, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/YunyiQian[P]multitel3/fft.c
// Function: fft
void	fft(complex *a, int n, float dt) {
  int i, j, k, step, m;
  complex u, w, t;
  double pi;
  pi = -PI;
  if (dt<0.) pi = PI;
  for (m=n/2,j=0,i=1; i<n-1; i++) {
    for (k=m; k<=j; k/=2) j -= k;
    j += k;
    if(i<j) {
      t = a[i];
      a[i] = a[j];
      a[j] = t;
    }
  }
  for (m=1,step=2; m<n; m=step, step*=2) {
    for (u=One,w=cmplx(cos(pi/m),sin(pi/m)),j=0; j<m; j++) {
      for (i=j; i<n; i+=step) {
	k = i+m;
	t = cmltp(a[k], u);
	a[k] = cplus(a[i], cngtv(t));
	a[i] = cplus(a[i], t);
      }
      u = cmltp(u, w);
    }
  }
  if (dt<0.) dt=-1./(n*dt);
  for (i=0; i<n; i++) a[i] = dmltp(dt, a[i]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movaps %xmm0, 0x50(%rsp)
movl %esi, %r15d
movq %rdi, %r14
leal -0x1(%r15), %eax
movslq %eax, %rcx
xorl %edi, %edi
pushq $0x1
popq %rsi
pushq $0x2
popq %r13
movl %r15d, %eax
movl %edi, %r8d
cmpq %rcx, %rsi
jge 0x20e3
movl %r8d, %edi
cltd
idivl %r13d
subl %eax, %r8d
jge 0x20b4
addl %eax, %edi
movslq %edi, %rax
cmpq %rax, %rsi
jge 0x20de
movsd (%r14,%rsi,8), %xmm0
movq (%r14,%rax,8), %rdx
movq %rdx, (%r14,%rsi,8)
movsd %xmm0, (%r14,%rax,8)
incq %rsi
jmp 0x20a9
xorps %xmm0, %xmm0
xorl %eax, %eax
ucomiss 0x50(%rsp), %xmm0
seta %al
leaq 0x48c9(%rip), %rcx      # 0x69c0
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x38(%rsp)
movslq %r15d, %r12
pushq $0x1
popq %rbx
movq %r15, 0x40(%rsp)
cmpl %r15d, %ebx
jge 0x220a
xorps %xmm1, %xmm1
movss 0x48c3(%rip), %xmm0     # 0x69e4
callq 0x3596
movaps %xmm0, 0x20(%rsp)
cvtsi2sd %ebx, %xmm1
movsd 0x38(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x10d0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x11d0
cvtsd2ss %xmm0, %xmm1
movss 0x10(%rsp), %xmm0
callq 0x3596
movaps %xmm0, 0x60(%rsp)
movq %r13, 0x48(%rsp)
movslq %r13d, %r13
movslq %ebx, %rax
movl %ebx, %ecx
movq %rcx, 0x8(%rsp)
leaq (%r14,%rax,8), %rbx
xorl %ebp, %ebp
cmpq 0x8(%rsp), %rbp
je 0x21f4
movq %rbp, %r15
cmpq %r12, %r15
jge 0x21db
movsd (%rbx,%r15,8), %xmm0
movaps 0x20(%rsp), %xmm1
callq 0x3478
movaps %xmm0, 0x10(%rsp)
callq 0x349f
movaps %xmm0, %xmm1
movsd (%r14,%r15,8), %xmm0
callq 0x3474
movlps %xmm0, (%rbx,%r15,8)
movsd (%r14,%r15,8), %xmm0
movaps 0x10(%rsp), %xmm1
callq 0x3474
movlps %xmm0, (%r14,%r15,8)
addq %r13, %r15
jmp 0x218f
movaps 0x20(%rsp), %xmm0
movaps 0x60(%rsp), %xmm1
callq 0x3478
movaps %xmm0, 0x20(%rsp)
incq %rbp
jmp 0x2185
movq 0x48(%rsp), %rax
movl %eax, %ebx
addl %eax, %eax
movl %eax, %r13d
movq 0x40(%rsp), %r15
jmp 0x210d
cvtsi2ss %r15d, %xmm0
movaps 0x50(%rsp), %xmm2
mulss %xmm2, %xmm0
movss 0x47c0(%rip), %xmm1     # 0x69e0
divss %xmm0, %xmm1
xorps %xmm0, %xmm0
movaps %xmm2, %xmm3
cmpltss %xmm0, %xmm3
andps %xmm3, %xmm1
andnps %xmm2, %xmm3
orps %xmm1, %xmm3
movaps %xmm3, 0x10(%rsp)
xorl %ebx, %ebx
testl %r15d, %r15d
cmovlel %ebx, %r15d
cmpq %rbx, %r15
je 0x2265
movsd (%r14,%rbx,8), %xmm1
movaps 0x10(%rsp), %xmm0
callq 0x34df
movlps %xmm0, (%r14,%rbx,8)
incq %rbx
jmp 0x2246
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/YunyiQian[P]multitel3/fft.c
// Function: cor
void	cor(
	    complex	*src,		/* In: source function */
	    complex     *data,		/* In: data */
	                                /* Out: cross-correlation */
	    float	dt,		/* In: dt */
	    int 	nft		/* In: number of pts */
	    )
{
  int	j;
  float	aa;

  data[0]=cmplx(data[0].x*src[0].x, data[0].y*src[0].y);
  for (aa=-1.,j=1; j<nft; j++) {
    data[j]=cmltp(data[j], conjg(src[j]));
    data[j]=dmltp(aa, data[j]);
    aa = -aa;
  }
  fftr(data, nft, -dt);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebx
movaps %xmm0, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movss (%rsi), %xmm0
movss 0x4(%rsi), %xmm1
mulss (%rdi), %xmm0
mulss 0x4(%rdi), %xmm1
callq 0x3596
movlps %xmm0, (%r14)
movslq %ebx, %r12
movss 0x44d3(%rip), %xmm0     # 0x69e0
movaps %xmm0, (%rsp)
pushq $0x1
popq %r13
cmpq %r12, %r13
jge 0x255d
movsd (%r15,%r13,8), %xmm0
callq 0x34e7
movaps %xmm0, %xmm1
movsd (%r14,%r13,8), %xmm0
callq 0x3478
movaps %xmm0, %xmm1
movlps %xmm0, (%r14,%r13,8)
movaps (%rsp), %xmm0
callq 0x34df
movlps %xmm0, (%r14,%r13,8)
movaps (%rsp), %xmm0
xorps 0x3b1c(%rip), %xmm0     # 0x6070
movaps %xmm0, (%rsp)
incq %r13
jmp 0x2515
movaps 0x10(%rsp), %xmm0
xorps 0x3b07(%rip), %xmm0     # 0x6070
movq %r14, %rdi
movl %ebx, %esi
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2274
// File: /workspace/github_c_makefile_star2_O2/YunyiQian[P]multitel3/fft.c
// Function: conv
void    conv(float *s, int ns, float *f, int n) {
  int   i,j,k,m;
  float *g,*pt;
  m = n+ns;
  if ( (g=(float *) malloc(m*sizeof(float))) == NULL ) {
     fprintf(stderr, "fail to malloc in conv()\n");
     exit(-1);
  }
  for(i=0;i<ns;i++) g[i] = 0.;
  for(pt=f,k=0;k<n;k++,i++,pt++){
     g[i] = *pt;
     for(*pt=0.,j=0;j<ns;j++) *pt += g[i-j]*s[j];
  }
  free(g);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r12d
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
leal (%r12,%r14), %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1150
testq %rax, %rax
je 0x2635
xorl %edx, %edx
testl %r14d, %r14d
cmovlel %edx, %r14d
testl %r12d, %r12d
cmovlel %edx, %r12d
cmpq %rdx, %r14
je 0x25cb
andl $0x0, (%rax,%rdx,4)
incq %rdx
jmp 0x25bd
movl %r12d, %ecx
addq %rdx, %rcx
movq %rax, %rdx
movq %r14, %rsi
cmpq %rsi, %rcx
je 0x2622
movss (%rbx), %xmm0
movss %xmm0, (%rax,%rsi,4)
andl $0x0, (%rbx)
xorps %xmm0, %xmm0
movq %r15, %rdi
movq %r14, %r9
movq %r14, %r8
subq $0x1, %r8
jb 0x2615
movss (%rdx,%r9,4), %xmm1
mulss (%rdi), %xmm1
addss %xmm1, %xmm0
movss %xmm0, (%rbx)
addq $0x4, %rdi
movq %r8, %r9
jmp 0x25f4
incq %rsi
addq $0x4, %rbx
addq $0x4, %rdx
jmp 0x25d7
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1040
movq 0x79bc(%rip), %rax      # 0x9ff8
movq (%rax), %rcx
leaq 0x43ca(%rip), %rdi      # 0x6a10
pushq $0x19
popq %rsi
pushq $0x1
popq %rdx
callq 0x1200
pushq $-0x1
popq %rdi
callq 0x11f0
// File: /workspace/github_c_makefile_star2_O2/YunyiQian[P]multitel3/fft.c
// Function: crscrl
float	*crscrl(int npt,float *rec,float *syn,int m) {
  int	i,nft,nft2;
  float	*ss1,*ss2;
  nft=2;while(nft<npt)nft*=2;nft2=nft;nft*=2;
  ss1=(float *)calloc(nft, sizeof(float));
  ss2=(float *)calloc(nft, sizeof(float));
  memcpy((char *)ss1, (char *) rec, npt*sizeof(float));
  memcpy((char *)ss2, (char *) syn, npt*sizeof(float));
  for(i=npt;i<nft;i++) {ss1[i]=0.;ss2[i]=0.;}
  fftr((complex *) ss1,nft2,1.);
  fftr((complex *) ss2,nft2,1.);

  cor((complex *) ss2, (complex *) ss1, 1., nft2);

  nft2 -= m/2;
  i = (m+1)*sizeof(float);
  ss2=(float *)realloc(ss2, i);
  memcpy(ss2, ss1+nft2, i);
  free(ss1);
  return(ss2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, (%rsp)
movl %edi, %ebx
pushq $0x2
popq %rbp
movl %ebp, %r15d
leal (%r15,%r15), %ebp
cmpl %ebx, %r15d
jl 0x2683
movl %ebp, %r12d
pushq $0x4
popq %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x1100
movq %rax, %r14
movq %r12, %rdi
movq %r13, %rsi
callq 0x1100
movq %rax, %r12
movslq %ebx, %r13
leaq (,%r13,4), %rbx
movq %r14, %rdi
movq (%rsp), %rsi
movq %rbx, %rdx
callq 0x1120
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x1120
movslq %ebp, %rax
cmpq %rax, %r13
jge 0x26f3
andl $0x0, (%r14,%r13,4)
andl $0x0, (%r12,%r13,4)
incq %r13
jmp 0x26df
movss 0x42e9(%rip), %xmm0     # 0x69e4
movq %r14, %rdi
movl %r15d, %esi
callq 0x2274
movq %r12, %rdi
movl %r15d, %esi
movss 0x42d0(%rip), %xmm0     # 0x69e4
callq 0x2274
movq %r12, %rdi
movq %r14, %rsi
movss 0x42bd(%rip), %xmm0     # 0x69e4
movl %r15d, %edx
callq 0x24cd
pushq $-0x2
popq %rcx
movq 0x10(%rsp), %rsi
movl %esi, %eax
cltd
idivl %ecx
movl %eax, %ebx
addl %r15d, %ebx
leal 0x4(,%rsi,4), %eax
movslq %eax, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x11a0
movq %rax, %r12
movslq %ebx, %rax
leaq (%r14,%rax,4), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x1120
movq %r14, %rdi
callq 0x1040
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/YunyiQian[P]multitel3/fft.c
// Function: maxCor
float maxCor(float *data, float *syn, int n, int max_shift, int *delay, float *amp) {
  int	i;
  float	*crs,c,dataAuto,synAuto;
  for(dataAuto=0.,synAuto=0.,i=0;i<n;i++) {
     dataAuto += data[i]*data[i];
     synAuto += syn[i]*syn[i];
  }
  if (max_shift<0) max_shift = n;
  crs = crscrl(n,data,syn,2*max_shift);
  for(c=-FLT_MAX,i=0;i<=2*max_shift;i++) {
     if (c<crs[i]) {
        c=crs[i];
        *delay=i;
     }
  }
  free(crs);
  *delay -= max_shift;
  *amp = c/synAuto;
  return(c/sqrt(dataAuto*synAuto));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %r9, %rbx
movq %r8, %r14
movl %ecx, %r15d
movl %edx, %eax
movq %rsi, %rdx
movq %rdi, %rsi
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edi
cmovgl %eax, %edi
xorps %xmm2, %xmm2
cmpq %rcx, %rdi
je 0x27cb
movss (%rdx,%rcx,4), %xmm0
movss (%rsi,%rcx,4), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
mulps %xmm1, %xmm1
addps %xmm1, %xmm2
incq %rcx
jmp 0x27ae
movaps %xmm2, 0x10(%rsp)
testl %r15d, %r15d
cmovsl %eax, %r15d
leal (%r15,%r15), %ecx
movl %eax, %edi
callq 0x2662
leal 0x1(,%r15,2), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
movss 0x41f3(%rip), %xmm1     # 0x69ec
cmpq %rdx, %rcx
je 0x2813
movss (%rax,%rdx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x280e
movl %edx, (%r14)
movaps %xmm0, %xmm1
incq %rdx
jmp 0x27f9
movq %rax, %rdi
movss %xmm1, 0xc(%rsp)
callq 0x1040
subl %r15d, (%r14)
movaps 0x10(%rsp), %xmm1
movaps %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm0     # xmm0 = xmm0[1,1],xmm1[1,1]
movss 0xc(%rsp), %xmm3
cvtss2sd %xmm3, %xmm2
divss %xmm0, %xmm3
movss %xmm3, (%rbx)
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2859
sqrtsd %xmm0, %xmm0
jmp 0x286a
movsd %xmm2, 0x10(%rsp)
callq 0x1210
movsd 0x10(%rsp), %xmm2
divsd %xmm0, %xmm2
cvtsd2ss %xmm2, %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/YunyiQian[P]multitel3/fft.c
// Function: maxCorSlide
float maxCorSlide(float *data, float *syn, int n, int lw, float overlap,int *delay, float *amp) {
  int	i, j, max_shift, delay0;
  float	cc, cc_best, amp0;
  max_shift = (int) rint(lw*(1.-overlap));
  cc_best = -FLT_MAX;
  for(i=0;i+lw<n;i+=max_shift) {
     for(j=0;j+lw<n;j+=max_shift) {
        cc = maxCor(data+i,syn+j,lw,max_shift,&delay0,&amp0);
	if (cc>cc_best) {
	   cc_best = cc;
	   *delay = delay0 + i-j;
	   *amp = amp0;
	}
     }
  }
  return cc_best;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
cvtsi2sd %ecx, %xmm1
cvtss2sd %xmm0, %xmm2
movsd 0x3786(%rip), %xmm0     # 0x6038
subsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
callq 0x1140
cvttsd2si %xmm0, %r13d
movslq %r13d, %rcx
movl %ebp, 0x4(%rsp)
movslq %ebp, %rax
movslq %ebx, %r12
subq %rax, %r12
movq %rcx, 0x10(%rsp)
leaq (,%rcx,4), %rax
movq %rax, 0x40(%rsp)
movss 0x40fe(%rip), %xmm0     # 0x69ec
movss %xmm0, (%rsp)
xorl %ecx, %ecx
cmpq %r12, %rcx
jge 0x2979
movq 0x18(%rsp), %rax
leaq (%rax,%rcx,4), %rbx
movq 0x20(%rsp), %r14
movq %rcx, 0x28(%rsp)
movl %ecx, %r15d
xorl %ebp, %ebp
cmpq %r12, %rbp
jge 0x296a
movq %rbx, %rdi
movq %r14, %rsi
movl 0x4(%rsp), %edx
movl %r13d, %ecx
leaq 0xc(%rsp), %r8
leaq 0x8(%rsp), %r9
callq 0x2785
ucomiss (%rsp), %xmm0
jbe 0x295b
movl 0xc(%rsp), %eax
addl %r15d, %eax
movq 0x30(%rsp), %rcx
movl %eax, (%rcx)
movss 0x8(%rsp), %xmm1
movq 0x38(%rsp), %rax
movss %xmm1, (%rax)
movss %xmm0, (%rsp)
addq 0x10(%rsp), %rbp
subl %r13d, %r15d
addq 0x40(%rsp), %r14
jmp 0x2912
movq 0x28(%rsp), %rcx
addq 0x10(%rsp), %rcx
jmp 0x28f5
movss (%rsp), %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq