LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_02/var_group.c
// Function: add_to_list
struct list_node *add_to_list(struct list_node *list_node_p, char *word)
{
  if (list_node_p == NULL)
  {
    list_node_p = (struct list_node *)malloc(sizeof(struct list_node));
    list_node_p->var_group = add_to_tree(list_node_p->var_group, word);
  }
  else if (strncmp(list_node_p->var_group->word, word, var_name_str_cmp_len) == 0)
  {
    list_node_p->var_group = add_to_tree(list_node_p->var_group, word);
  }
  else
  {
    list_node_p->next = add_to_list(list_node_p->next, word);
  }

  return list_node_p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
testq %rdi, %rdi
je 0x14a8
movq %rdi, %rbx
movq (%rdi), %r15
movq (%r15), %rdi
movslq 0x2c2e(%rip), %rdx      # 0x40b8
movq %r14, %rsi
callq 0x1040
testl %eax, %eax
je 0x14ba
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x146d
movq %rax, 0x8(%rbx)
jmp 0x14c8
movl $0x10, %edi
callq 0x1090
movq %rax, %rbx
movq (%rax), %rdi
jmp 0x14bd
movq %r15, %rdi
movq %r14, %rsi
callq 0x1637
movq %rax, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_02/var_group.c
// Function: print_list
void print_list(struct list_node *node_p)
{
  if (node_p != NULL)
  {
    print_tree(node_p->var_group);
    putchar('\n');
    print_list(node_p->next);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rbx, %rbx
je 0x14f2
movq (%rbx), %rdi
callq 0x16a5
movl $0xa, %edi
callq 0x1030
movq 0x8(%rbx), %rbx
jmp 0x14d5
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_02/var_group.c
// Function: skip_chars_between
void skip_chars_between(char start, char end)
{
  int c = getc(stdin);
  if (c == start)
  {
    while ((c = getc(stdin)) != EOF)
    {
      if (c == '\\')
      {
        if ((c = getc(stdin)) == EOF)
        {
          break;
        }
      }
      else if (c == end)
      {
        return;
      }
    }
  }
  ungetc(c, stdin);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
movq 0x2a13(%rip), %r14      # 0x3fe0
movq (%r14), %rdi
callq 0x10c0
cmpl %ebp, %eax
jne 0x1606
movsbl %bl, %ebx
movq (%r14), %rdi
callq 0x10c0
cmpl $0x5c, %eax
je 0x15f4
cmpl $-0x1, %eax
je 0x1606
cmpl %ebx, %eax
jne 0x15dc
jmp 0x1614
movq (%r14), %rdi
callq 0x10c0
cmpl $-0x1, %eax
jne 0x15dc
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq (%r14), %rsi
movl %eax, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x10a0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_02/var_group.c
// Function: print_tree
void print_tree(struct tree_node *node_p)
{
  if (node_p != NULL)
  {
    print_tree(node_p->left);
    puts(node_p->word);
    print_tree(node_p->right);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rbx, %rbx
je 0x16c5
movq 0x8(%rbx), %rdi
callq 0x16a5
movq (%rbx), %rdi
callq 0x1060
movq 0x10(%rbx), %rbx
jmp 0x16a9
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: lalloc
void *lalloc(size_t n) {
    void *dat = malloc(n);
    if(dat != NULL) {
        bzero(dat, n);
    }
    return dat;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1150
testq %rax, %rax
je 0x1b28
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0x10d0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: setNotify
bool setNotify(struct service* s, struct conn *c) {
    struct conn **onot = s->notify;
    size_t onot_n = s->notify_n;
    size_t nnot_n = onot_n + 1;
    struct conn **nnot = arralloc(struct conn*, nnot_n);
    if(nnot == NULL) {
        return false;
    }
    memcpy(nnot, onot, sizeof(struct notify*) * onot_n);
    nnot[onot_n] = c;
    ref(c);
    free(onot);
    s->notify = nnot;
    s->notify_n++;
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movq 0x18(%rdi), %rbp
leaq 0x8(,%rbp,8), %r13
movq %r13, %rdi
callq 0x1150
movq %rax, %r12
testq %rax, %rax
je 0x1b83
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x10d0
testq %r12, %r12
je 0x1bb3
leaq (,%rbp,8), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x1140
movq %r15, (%r12,%rbp,8)
incl 0x10(%r15)
movq %r14, %rdi
callq 0x1030
movq %r12, 0x10(%rbx)
incq 0x18(%rbx)
testq %r12, %r12
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: notify
enum{ notify_fail, notify_success, notify_gone } notify(struct conn *c, struct service* s, struct buf msg) {
    if(c->closed == true) {
        deref(c);   //get rid of reference so the conn can be freed
        return notify_gone;
    }
    byte* ndat = realloc(c->tx.dat, c->tx.len + msg.len);
    if(ndat == NULL) {
        return notify_fail;
    }
    memcpy(ndat + c->tx.len, msg.dat, msg.len);
    c->tx.dat = ndat;
    c->tx.len += msg.len;
    if(c->txoff && (c->tx.len > 0)) {  //tx buffer was just populated
        //enable write in epoll
        struct epoll_event ev = {.events = EPOLLIN | EPOLLOUT, .data = {.ptr = &c->e}};
        if(epoll_ctl(epollfd, EPOLL_CTL_MOD, c->fd, &ev) == -1) {   //failed to enable - close and forget
            fprintf(stderr, "[ERROR] Failed to enable writing on conn %d\n", c->fd);
            close_conn(c);
        } else {
            c->txoff = false;
        }
    }
    return notify_success;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x18(%rdi)
jne 0x1bf8
movl $0x2, %ebp
subl $0x1, 0x10(%rbx)
jae 0x1c74
movq %rbx, %rdi
callq 0x1030
jmp 0x1c74
movq %rcx, %r14
movq %rdx, %r15
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rsi
addq %rcx, %rsi
callq 0x1170
testq %rax, %rax
je 0x1c72
movq %rax, %r12
movq 0x38(%rbx), %r13
movq %rax, %rdi
addq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1140
movq %r12, 0x30(%rbx)
addq %r14, %r13
movq %r13, 0x38(%rbx)
setne %al
andb 0x19(%rbx), %al
movl $0x1, %ebp
cmpb $0x1, %al
jne 0x1c74
leaq 0xc(%rsp), %rcx
movl $0x5, (%rcx)
movq %rbx, 0x4(%rcx)
movl 0x54f6(%rip), %edi      # 0x7150
movl 0x14(%rbx), %edx
movl $0x3, %esi
callq 0x10f0
cmpl $-0x1, %eax
je 0x1c85
movb $0x0, 0x19(%rbx)
jmp 0x1c74
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x14(%rbx), %rdi
movq %rbx, %rsi
callq 0x1270
jmp 0x1c74
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: close_conn
void close_conn(struct conn *c) {   //close a connection
    printf("[INFO] Disconnecting connection %d\n", c->fd);
    if(epoll_ctl(epollfd, EPOLL_CTL_DEL, c->fd, NULL) == -1) {  //not compat before Linux 2.6.9
        fprintf(stderr, "[FATAL] Failed to deregister conn with epoll\n");
        exit(65);
    }
    if(close(c->fd) == -1) {
        fprintf(stderr, "[FATAL] Failed to close fd %d: %s\n", c->fd, strerror(errno));
        exit(65);
    }
    c->closed = true;
    c->fd = -1;
    //wipe rx/tx buffers
    free(c->rx.dat);
    free(c->tx.dat);
    bzero(&c->rx, sizeof(c->rx));
    bzero(&c->tx, sizeof(c->tx));
    deref(c);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x14(%rdi), %esi
leaq 0x25f8(%rip), %rdi      # 0x429c
xorl %eax, %eax
callq 0x10c0
movl 0x549f(%rip), %edi      # 0x7150
movl 0x14(%rbx), %edx
movl $0x2, %esi
xorl %ecx, %ecx
callq 0x10f0
cmpl $-0x1, %eax
je 0x1d1b
leaq 0x14(%rbx), %r14
movl (%r14), %edi
callq 0x10e0
cmpl $-0x1, %eax
je 0x1d20
movb $0x1, 0x18(%rbx)
movl $0xffffffff, 0x14(%rbx) # imm = 0xFFFFFFFF
movq 0x20(%rbx), %rdi
callq 0x1030
movq 0x30(%rbx), %rdi
callq 0x1030
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
subl $0x1, 0x10(%rbx)
jae 0x1d13
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x12d4
movq %r14, %rdi
callq 0x129b
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: notifyAll
bool notifyAll(struct service* s) {
    char *cmds = NULL;
    if(asprintf(&cmds, "notify %s %s", s->name, statestr(s->state)) == -1) {
        return false;
    }
    struct buf cmdb = { .dat = cmds, .len = strlen(cmds) + 1 };
    bool oks[s->notify_n];
    size_t nok = 0;
    for(size_t i = 0; i < s->notify_n; i++) {
        switch(notify(s->notify[i], s, cmdb)) {
        case notify_success:
            oks[i] = true;
            nok++;
            break;
        case notify_gone:
            oks[i] = false;
            break;
        case notify_fail:
            free(cmds);
            return false;
        }
    }
    if(nok != s->notify_n) {
        //compact the buffer
        struct conn **not = s->notify;
        for(size_t i = 0; i < s->notify_n; i++) {
            if(oks[i]) { *(not++) = s->notify[i]; }
        }
        //shrink memory allocation with realloc
        not = realloc(s->notify, sizeof(struct conn *) * nok);
        if(not == NULL) {   //reallocation failed - just change the notify_n
            s->notify_n = nok;
        } else {
            s->notify = not;
            s->notify_n = nok;
        }
    }
    free(cmds);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq $0x0, -0x40(%rbp)
movq (%rdi), %rdx
movl 0x8(%rdi), %eax
cmpq $0x5, %rax
ja 0x1d5d
leaq 0x5061(%rip), %rcx      # 0x6db8
movq (%rcx,%rax,8), %rcx
jmp 0x1d64
leaq 0x22de(%rip), %rcx      # 0x4042
leaq 0x2308(%rip), %rsi      # 0x4073
xorl %r14d, %r14d
leaq -0x40(%rbp), %rdi
xorl %eax, %eax
callq 0x1180
cmpl $-0x1, %eax
je 0x1e76
movq -0x40(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x10a0
movq %rsp, -0x30(%rbp)
movq 0x18(%rbx), %rcx
movq %rsp, %rdx
addq $0xf, %rcx
andq $-0x10, %rcx
subq %rcx, %rdx
movq %rdx, -0x38(%rbp)
movq %rdx, %rsp
cmpq $0x0, 0x18(%rbx)
sete %r14b
je 0x1e0a
incq %rax
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%rbx), %rcx
movq (%rcx,%r15,8), %rdi
movq -0x48(%rbp), %rdx
movq %rax, %r13
movq %rax, %rcx
callq 0x1bc8
cmpl $0x1, %eax
je 0x1dec
cmpl $0x2, %eax
jne 0x1e16
movq -0x38(%rbp), %rax
movb $0x0, (%rax,%r15)
jmp 0x1df8
movq -0x38(%rbp), %rax
movb $0x1, (%rax,%r15)
incq %r12
incq %r15
cmpq 0x18(%rbx), %r15
setae %r14b
movq %r13, %rax
jb 0x1dc0
jmp 0x1e0d
xorl %r12d, %r12d
movq 0x18(%rbx), %rax
cmpq %rax, %r12
jne 0x1e1c
movq -0x30(%rbp), %r15
jmp 0x1e6a
testq %rax, %rax
movq -0x30(%rbp), %r15
je 0x1e4c
movq 0x10(%rbx), %rcx
xorl %edx, %edx
movq -0x38(%rbp), %rsi
cmpb $0x1, (%rsi,%rdx)
jne 0x1e44
movq 0x10(%rbx), %rsi
movq (%rsi,%rdx,8), %rsi
movq %rsi, (%rcx)
addq $0x8, %rcx
incq %rdx
cmpq %rdx, %rax
jne 0x1e2b
movq 0x10(%rbx), %rdi
leaq (,%r12,8), %rsi
callq 0x1170
testq %rax, %rax
je 0x1e66
movq %rax, 0x10(%rbx)
movq %r12, 0x18(%rbx)
movq -0x40(%rbp), %rdi
callq 0x1030
movq %r15, %rsp
andb $0x1, %r14b
movl %r14d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: findService
struct service* findService(char* name) {
    struct service *s;
    for(s = services.first; s != NULL; s = s->next) {
        if(streq(s->name, name)) {
            return s;
        }
    }
    return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x52c1(%rip), %rbx      # 0x7158
testq %rbx, %rbx
je 0x1eb7
movq %rdi, %r14
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x1120
testl %eax, %eax
je 0x1eb7
movq 0x20(%rbx), %rbx
testq %rbx, %rbx
jne 0x1e9f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: newService
struct service* newService() {
    struct service* new = alalloc(struct service);
    if(new == NULL) {
        return NULL;
    }
    if(services.first == NULL) {
        services.first = new;
        return new;
    }
    struct service *s, *n;
    for(s = n = services.first; n != NULL; n = n->next) { s = n; }
    s->next = new;
    return new;
}

// Assembly:
pushq %rax
movl $0x28, %edi
callq 0x1150
testq %rax, %rax
je 0x1f02
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x20(%rax)
movq 0x526d(%rip), %rdx      # 0x7158
testq %rdx, %rdx
je 0x1f06
movq %rdx, %rcx
movq 0x20(%rdx), %rdx
testq %rdx, %rdx
jne 0x1ef0
addq $0x20, %rcx
jmp 0x1f0d
xorl %eax, %eax
jmp 0x1f10
leaq 0x524b(%rip), %rcx      # 0x7158
movq %rax, (%rcx)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: rmService
void rmService(char* name) {
    struct service *s, *n;
    for(s = n = services.first; (n != NULL) && (!streq(n->name, name)); n = n->next) { s = n; }
    if(n == NULL) {
        fprintf(stderr, "[FATAL] Service %s does not exist\n", name);
        exit(65);
    }
    s->next = n->next;
    //notifications should already have been dealt with
    free(n->name);
    free(n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x5234(%rip), %rbx      # 0x7158
testq %rbx, %rbx
je 0x1f82
movq (%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1120
testl %eax, %eax
je 0x1f5b
movq %rbx, %r12
movq 0x20(%rbx), %rbx
testq %rbx, %rbx
je 0x1f82
movq (%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1120
testl %eax, %eax
jne 0x1f3b
jmp 0x1f5e
movq %rbx, %r12
movq 0x20(%rbx), %rax
movq %rax, 0x20(%r12)
movq %r15, %rdi
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1030
movq %r14, %rdi
callq 0x12f9
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: readBuf
bool readBuf(struct buf *b, int fd) {  //read data from fd into the buffer
    byte dat[1024];
    size_t n = read(fd, dat, 1024);
    if(n < 0) {
        return false;
    } else if(n == 0) {
        return true;
    }
    byte* nd = arralloc(byte, n + b->len);
    if(nd == NULL) {
        return false;
    }
    memcpy(nd, b->dat, b->len);
    memcpy(nd + b->len, dat, n);
    free(b->dat);
    b->dat = nd;
    b->len += n;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movl %esi, %eax
movq %rdi, %rbx
movq %rsp, %rsi
movl $0x400, %edx            # imm = 0x400
movl %eax, %edi
callq 0x1100
movq %rax, %r14
movb $0x1, %al
testq %r14, %r14
je 0x2018
movq 0x8(%rbx), %r12
leaq (%r12,%r14), %r13
movq %r13, %rdi
callq 0x1150
movq %rax, %r15
testq %rax, %rax
je 0x1fdd
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x10d0
testq %r15, %r15
setne %al
je 0x2018
movq (%rbx), %r13
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1140
movq %r15, %rdi
addq %r12, %rdi
movq %rsp, %rsi
movq %r14, %rdx
callq 0x1140
movq %r13, %rdi
callq 0x1030
movq %r15, (%rbx)
addq %r14, 0x8(%rbx)
movb $0x1, %al
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: writeBuf
bool writeBuf(struct buf* b, int fd) { //write data from buffer into fd
    size_t n = write(fd, b->dat, b->len);
    if(n < 1) {
        return false;
    }
    byte* nd = arralloc(byte, n - b->len);
    if(nd == NULL) {
        return false;
    }
    memcpy(nd, b->dat + n, b->len - n);
    free(b->dat);
    b->dat = nd;
    b->len -= n;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, %eax
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
movl %eax, %edi
callq 0x1090
testq %rax, %rax
je 0x20a4
movq %rax, %r14
movq 0x8(%rbx), %r12
movq %rax, %r13
subq %r12, %r13
movq %r13, %rdi
callq 0x1150
movq %rax, %r15
testq %rax, %rax
je 0x2074
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x10d0
testq %r15, %r15
setne %al
je 0x20a6
movq (%rbx), %r13
leaq (%r14,%r13), %rsi
subq %r14, %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x1140
movq %r13, %rdi
callq 0x1030
movq %r15, (%rbx)
subq %r14, 0x8(%rbx)
movb $0x1, %al
jmp 0x20a6
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: set_noblock
void set_noblock(int fd) {
    int flags = fcntl(fd, F_GETFL, 0);
    if(flags < 0) {
        goto fail;
    }
    flags |= O_NONBLOCK;
    if(fcntl(fd, F_SETFL, flags) == -1) {
        goto fail;
    }
    return;
fail:
    fprintf(stderr, "[FATAL] Failed to SET O_NONBLOCK on %d: %s\n", fd, strerror(errno));
    exit(65);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl $0x3, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x1080
testl %eax, %eax
js 0x20e1
orl $0x800, %eax            # imm = 0x800
movl %ebx, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x1080
cmpl $-0x1, %eax
je 0x20e1
popq %rbx
retq
movl %ebx, %edi
callq 0x131d
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: addSock
void addSock(int fd) {  //add a socket to epoll
    printf("Sock: %d\n", fd);
    if(listen(fd, backlog) == -1) {
        fprintf(stderr, "[FATAL] Failed to run listen on %d: %s\n", fd, strerror(errno));
        exit(65);
    }
    struct epolldat *d = alalloc(struct epolldat);
    if(d == NULL) {
        fprintf(stderr, "[FATAL] Failed to allocate epolldat for %d: %s\n", fd, strerror(errno));
        exit(65);
    }
    d->typecode = epoll_socket;
    d->sockfd = fd;
    //register with epoll
    struct epoll_event ev = {.events = EPOLLIN, .data = {.ptr = d}};
    if(epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &ev) == -1) {
        fprintf(stderr, "[FATAL] Failed to register with epoll: %s\n", strerror(errno));
        exit(65);
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x1fd9(%rip), %rdi      # 0x40cf
movl %ebx, %esi
xorl %eax, %eax
callq 0x10c0
movl 0x503b(%rip), %esi      # 0x7140
movl %ebx, %edi
callq 0x1160
cmpl $-0x1, %eax
je 0x2158
movl $0x10, %edi
callq 0x1150
testq %rax, %rax
je 0x215f
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl $0x1, %edx
movl %edx, (%rax)
movl %ebx, 0x8(%rax)
leaq 0x4(%rsp), %rcx
movl %edx, (%rcx)
movq %rax, 0x4(%rcx)
movl 0x500f(%rip), %edi      # 0x7150
movl $0x1, %esi
movl %ebx, %edx
callq 0x10f0
cmpl $-0x1, %eax
je 0x2166
addq $0x10, %rsp
popq %rbx
retq
movl %ebx, %edi
callq 0x13c4
movl %ebx, %edi
callq 0x138a
callq 0x1357
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: handle_epoll
void handle_epoll(struct epoll_event ev) {  //handle an epoll event
    struct epolldat d = *((struct epolldat*)ev.data.ptr);
    switch(d.typecode) {
    case epoll_conn:
        handle_conn(d.c, ev.events);
        break;
    case epoll_socket:
        handle_socket(d.sockfd, ev.events);
        break;
    }
}

// Assembly:
leaq 0x8(%rsp), %rax
movq 0x4(%rax), %rdx
movl (%rdx), %ecx
movq 0x8(%rdx), %rdi
cmpl $0x1, %ecx
je 0x218a
testl %ecx, %ecx
jne 0x2191
movl (%rax), %esi
jmp 0x2192
movl (%rax), %esi
jmp 0x22ec
retq
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: handle_socket
void handle_socket(int sockfd, uint32_t events) {
    if(EPOLL_MODE(events, EPOLLIN)) {
        int fd = accept(sockfd, NULL, NULL);
        if(fd == -1) {
            fprintf(stderr, "[ERROR] Failed to accept connection: %s\n", strerror(errno));
            return;
        }
        struct conn *c = newConn(fd);
        if(c == NULL) {
            fprintf(stderr, "[ERROR] Failed to create conn with fd %d\n", fd);
            if(close(fd) == -1) {
                fprintf(stderr, "[FATAL] Failed to close fd %d\n", fd);
                exit(65);
            }
            return;
        }
    } else if(EPOLL_MODE(events, EPOLLPRI)) {
        fprintf(stderr, "[FATAL] Recieved EPOLLPRI on socket fd %d\n", sockfd);
        exit(65);
    } else if(EPOLL_MODE(events, EPOLLERR)) {
        fprintf(stderr, "[FATAL] Recieved EPOLLERR on socket fd %d\n", sockfd);
        exit(65);
    } else {
        fprintf(stderr, "[FATAL] Recieved unrecognized epoll event %d on socket fd %d\n", events, sockfd);
        exit(65);
    }
}

// Assembly:
pushq %rbx
movl %esi, %edx
movl %edi, %ecx
testb $0x1, %dl
je 0x2326
movl %ecx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x11d0
cmpl $-0x1, %eax
je 0x2316
movl %eax, %ebx
movl %eax, %edi
callq 0x23dd
testq %rax, %rax
je 0x231d
popq %rbx
retq
callq 0x1520
jmp 0x2314
movl %ebx, %edi
callq 0x14d1
jmp 0x2314
testb $0x2, %dl
jne 0x234a
movq 0x4cc6(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
testb $0x8, %dl
jne 0x2351
leaq 0x1f1d(%rip), %rsi      # 0x425e
xorl %eax, %eax
callq 0x1130
jmp 0x2361
movl %ecx, %edi
callq 0x154c
leaq 0x1edb(%rip), %rsi      # 0x4233
movl %ecx, %edx
xorl %eax, %eax
callq 0x1130
movl $0x41, %edi
callq 0x1200
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: epoll_cycle
void epoll_cycle() {    //run epoll wait with a timeout and handle the events
    struct epoll_event ev[4];
    int n = epoll_wait(epollfd, ev, 4, 50);
    if(n == -1) {
        fprintf(stderr, "[FATAL] epoll_wait failed: %s\n", strerror(errno));
        exit(65);
        return;
    }
    for(int i = 0; i < n; i++) {
        handle_epoll(ev[i]);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl 0x4dd8(%rip), %edi      # 0x7150
leaq 0x10(%rsp), %rsi
movl $0x4, %edx
movl $0x32, %ecx
callq 0x1190
cmpl $-0x1, %eax
je 0x23d8
testl %eax, %eax
jle 0x23d0
movl %eax, %eax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rbx
xorl %r14d, %r14d
movl 0x18(%rsp,%r14), %eax
movl %eax, 0x8(%rsp)
movq 0x10(%rsp,%r14), %rax
movq %rax, (%rsp)
movl 0x8(%rsp), %eax
movq (%rsp), %rcx
pushq %rax
pushq %rcx
callq 0x216b
addq $0x10, %rsp
addq $0xc, %r14
cmpq %r14, %rbx
jne 0x23a2
addq $0x48, %rsp
popq %rbx
popq %r14
retq
callq 0x156f
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: newConn
struct conn *newConn(int fd) { //create a new conn with fd
    printf("[INFO] New connection: %d\n", fd);
    //set up conn data
    struct conn *c = alalloc(struct conn);
    if(c == NULL) {
        return NULL;
    }
    c->e.typecode = epoll_conn;
    c->e.c = c;
    c->fd = fd;
    c->txoff = true;
    //register with epoll
    struct epoll_event ev = {.events = EPOLLIN, .data = {.ptr = &c->e}};
    if(epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &ev) == -1) {
        fprintf(stderr, "[FATAL] Failed to register with epoll: %s\n", strerror(errno));
        exit(65);
    }
    ref(c); //referenced by epoll
    //tell read and write not to block
    set_noblock(fd);
    return c;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
leaq 0x1d8e(%rip), %rdi      # 0x417b
movl %ebx, %esi
xorl %eax, %eax
callq 0x10c0
movl $0x40, %edi
callq 0x1150
testq %rax, %rax
je 0x2458
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movq %rax, 0x8(%rax)
movl %ebx, 0x14(%rax)
movb $0x1, 0x19(%rax)
leaq 0xc(%rsp), %rcx
movl $0x1, (%rcx)
movq %rax, 0x4(%rcx)
movl 0x4d16(%rip), %edi      # 0x7150
movl $0x1, %esi
movl %ebx, %edx
callq 0x10f0
cmpl $-0x1, %eax
je 0x2466
incl 0x10(%r14)
movl %ebx, %edi
callq 0x20b0
jmp 0x245b
xorl %r14d, %r14d
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
callq 0x15a2
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: conn_has_cmd
bool conn_has_cmd(struct conn *c) { //is there is a full command in the buffer?
    if(c->closed) { return false; }
    struct buf b = c->rx;
    for(size_t i = 0; i < b.len; i++) {
        switch(b.dat[i]) {
        case '\n':
            b.dat[i] = '\0';
        case '\0':
            return true;
        }
    }
    return false;
}

// Assembly:
cmpb $0x0, 0x18(%rdi)
je 0x2474
xorl %eax, %eax
retq
movq 0x28(%rdi), %rcx
testq %rcx, %rcx
setne %al
je 0x2473
movq 0x20(%rdi), %rdx
xorl %esi, %esi
movzbl (%rdx,%rsi), %edi
movb $0x1, %al
testl %edi, %edi
je 0x2473
cmpl $0xa, %edi
je 0x249f
incq %rsi
cmpq %rsi, %rcx
jne 0x2486
jmp 0x2471
movb $0x0, (%rdx,%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: handle_scmd
void handle_scmd(struct conn *c) {
    ref(c);
    //extract command from rx buffer
    char *cmds = strdup(c->rx.dat);
    if(cmds == NULL) {
        fprintf(stderr, "[ERROR] Failed to extract command from conn %d\n", c->fd);
        close_conn(c);
        goto end;
    }
    //slide & shrink rx buffer
    memmove(c->rx.dat, c->rx.dat + strlen(cmds) + 1, c->rx.len - (strlen(cmds) + 1));
    c->rx.len -= strlen(cmds) + 1;
    byte *ndat = realloc(c->rx.dat, c->rx.len);
    if(ndat != NULL) {
        c->rx.dat = ndat;
    }
    //split command and args
    if(!hasSpace(cmds)) {
        fprintf(stderr, "[ERROR] Invalid command syntax (sent by conn %d): \"%s\"\n", c->fd, cmds);
        free(cmds);
        close_conn(c);
        goto end;
    }
    char *cmd, *args;
    for(cmd = args = cmds; *args != ' '; args++) {}
    *args = '\0';
    args++;
    //run handler
    if(streq(cmd, "start")) {
        cmd_start(c, args);
    } else if(streq(cmd, "stop")) {
        cmd_stop(c, args);
    } else if(streq(cmd, "state")) {
        cmd_state(c, args);
    } else {
        fprintf(stderr, "[ERROR] Unrecognized command \"%s\" sent on conn %d\n", cmd, c->fd);
        free(cmds);
        close_conn(c);
        goto end;
    }
    //cleanup
    free(cmds);
end:
    deref(c);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
incl 0x10(%rdi)
movq 0x20(%rdi), %r15
movq %r15, %rdi
callq 0x1220
testq %rax, %rax
je 0x25b9
movq %rax, %r14
movq %rax, %rdi
callq 0x10a0
leaq (%r15,%rax), %rsi
incq %rsi
notq %rax
addq 0x28(%rbx), %rax
movq %r15, %rdi
movq %rax, %rdx
callq 0x11b0
movq %r14, %rdi
callq 0x10a0
notq %rax
addq 0x28(%rbx), %rax
movq %rax, 0x28(%rbx)
movq 0x20(%rbx), %rdi
movq %rax, %rsi
callq 0x1170
testq %rax, %rax
je 0x2510
movq %rax, 0x20(%rbx)
movq %r14, %rax
movzbl (%rax), %ecx
cmpl $0x20, %ecx
je 0x2528
testl %ecx, %ecx
je 0x25c3
incq %rax
jmp 0x2513
movq %r14, %r15
cmpb $0x20, (%r15)
leaq 0x1(%r15), %r15
jne 0x252b
movb $0x0, -0x1(%r15)
leaq 0x1ec5(%rip), %rsi      # 0x4406
movq %r14, %rdi
callq 0x1120
testl %eax, %eax
je 0x2580
leaq 0x1ebe(%rip), %rsi      # 0x4412
movq %r14, %rdi
callq 0x1120
testl %eax, %eax
je 0x258d
leaq 0x21d9(%rip), %rsi      # 0x4740
movq %r14, %rdi
callq 0x1120
movq %rbx, %rdi
testl %eax, %eax
jne 0x25d0
movq %r15, %rsi
callq 0x2b2d
jmp 0x2598
movq %rbx, %rdi
movq %r15, %rsi
callq 0x26c2
jmp 0x2598
movq %rbx, %rdi
movq %r15, %rsi
callq 0x292e
movq %r14, %rdi
callq 0x1030
subl $0x1, 0x10(%rbx)
jae 0x25b3
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x1655
jmp 0x25a0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1615
jmp 0x25a0
movq %r14, %rsi
callq 0x15d5
jmp 0x25a0
// File: /workspace/github_c_makefile_star2_O1/panux[P]linit/src/linitd.c
// Function: fexec
bool fexec(int argc, char **argv) { //forks and exec's
    switch(fork()) {
    case -1:    //failure
        return false;
    case 0:;    //child
        char *args[argc + 1];
        for(int i = 0; i < argc; i++) {
            args[i] = argv[i];
        }
        args[argc] = NULL;
        if(execvpe(args[0], args, environ) == -1) {
            fprintf(stderr, "[FATAL] exec failed: %s\n", strerror(errno));
            exit(65);
        }
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movl %edi, %ebx
callq 0x1240
cmpl $-0x1, %eax
je 0x2654
testl %eax, %eax
jne 0x2650
movq %rsp, %r12
leal 0x1(%rbx), %eax
movq %rsp, %r15
leaq 0xf(,%rax,8), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
testl %ebx, %ebx
jle 0x2628
movl %ebx, %edx
shlq $0x3, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1140
movslq %ebx, %rax
movq $0x0, (%r15,%rax,8)
movq (%r15), %rdi
movq 0x49a3(%rip), %rax      # 0x6fe0
movq (%rax), %rdx
movq %r15, %rsi
callq 0x10b0
cmpl $-0x1, %eax
je 0x2663
movq %r12, %rsp
movb $0x1, %al
jmp 0x2656
xorl %eax, %eax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x167d
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/test_itemsim.c
// Function: main
int main(int argc, char** argv) {
    FILE* user_data;
    FILE* item_data;
    int N_users;
    int N_items;
    int N_prefs;
    int binary;
    recdata_t* recdata;
    recdata_t* cerdata;
    int iid;
    int i;
    similarity_t* similarity;
    idpairs_t* pairs;

    if (!read_args(argc, argv, &user_data, &item_data, &N_users, &N_items, &N_prefs, &binary)) {
        return EXIT_FAILURE;
    }

    recdata = recdata_simple_create(user_data, item_data, N_users, N_items, N_prefs, binary);
    cerdata = recdata_transposed_create(recdata);
    
    fclose(user_data);
    fclose(item_data);

    if (!binary) {
        similarity = similarity_veccosine_create(cerdata);
    } else {
        similarity = similarity_setcosine_create(cerdata);
    }

    for (iid = 0; iid < recdata->N_items; iid++) {
        pairs = similarity_calculate(similarity, iid, 10);

        for (i = 0; i < idpairs_size(pairs); i++) {
            printf("%d\t%d\t%.4f\n", iid, idpairs_keys(pairs)[i], idpairs_values(pairs)[i]);
        }
        
        idpairs_close_deep(pairs);
    }
 
    similarity_close(similarity);
    
    recdata_close(recdata);
    recdata_close(cerdata);
   
    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x4(%rsp), %rax
leaq 0x14(%rsp), %r10
leaq 0x28(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x1c(%rsp), %r8
leaq 0x18(%rsp), %r9
pushq %rax
pushq %r10
callq 0x2638
addq $0x10, %rsp
testl %eax, %eax
je 0x12a3
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl 0x1c(%rsp), %edx
movl 0x18(%rsp), %ecx
movl 0x14(%rsp), %r8d
movl 0x4(%rsp), %r9d
callq 0x169e
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x1781
movq %rax, %rbx
movq 0x28(%rsp), %rdi
callq 0x1060
movq 0x20(%rsp), %rdi
callq 0x1060
cmpl $0x0, 0x4(%rsp)
movq %rbx, 0x30(%rsp)
movq %rbx, %rdi
je 0x12ad
callq 0x1958
jmp 0x12b2
movl $0x1, %eax
jmp 0x135a
callq 0x1c11
movq %rax, %r15
movq 0x8(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jle 0x133c
xorl %r12d, %r12d
leaq 0x1d3a(%rip), %r13      # 0x3004
movq %r15, %rdi
movl %r12d, %esi
movl $0xa, %edx
callq 0x17d4
movq %rax, %rbp
movq %rax, %rdi
callq 0x2555
testl %eax, %eax
jle 0x1326
xorl %ebx, %ebx
movq %rbp, %rdi
callq 0x2558
movl (%rax,%rbx,4), %r14d
movq %rbp, %rdi
callq 0x255d
movsd (%rax,%rbx,8), %xmm0
movq %r13, %rdi
movl %r12d, %esi
movl %r14d, %edx
movb $0x1, %al
callq 0x1080
incq %rbx
movq %rbp, %rdi
callq 0x2555
cltq
cmpq %rax, %rbx
jl 0x12eb
movq %rbp, %rdi
callq 0x2531
incl %r12d
movq 0x8(%rsp), %rax
cmpl 0x4(%rax), %r12d
jl 0x12ca
movq %r15, %rdi
callq 0x17e4
movq 0x8(%rsp), %rdi
callq 0x13a4
movq 0x30(%rsp), %rdi
callq 0x13a4
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/pavel-demin[P]ft8d-c/pffft.c
// Function: pffft_aligned_malloc
void *pffft_aligned_malloc(size_t nb_bytes) {
  void *p, *p0 = malloc(nb_bytes + MALLOC_V4SF_ALIGNMENT);
  if (!p0) return (void *) 0;
  p = (void *) (((size_t) p0 + MALLOC_V4SF_ALIGNMENT) & (~((size_t) (MALLOC_V4SF_ALIGNMENT-1))));
  *((void **) p - 1) = p0;
  return p;
}

// Assembly:
pushq %rax
addq $0x40, %rdi
callq 0x10f0
testq %rax, %rax
je 0x14d5
movq %rax, %rcx
andq $-0x40, %rax
movq %rcx, 0x38(%rax)
addq $0x40, %rax
jmp 0x14d7
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/pavel-demin[P]ft8d-c/pffft.c
// Function: cffti1_ps
void cffti1_ps(int n, float *wa, int *ifac)
{
  static const int ntryh[] = { 5,3,4,2,0 };
  int k1, j, ii;

  int nf = decompose(n,ifac,ntryh);
  float argh = (2*M_PI)/(float)n;
  int i = 1;
  int l1 = 1;
  for (k1=1; k1<=nf; k1++) {
    int ip = ifac[k1+1];
    int ld = 0;
    int l2 = l1*ip;
    int ido = n / l2;
    int idot = ido + ido + 2;
    int ipm = ip - 1;
    for (j=1; j<=ipm; j++) {
      float argld;
      int i1 = i, fi = 0;
      wa[i-1] = 1;
      wa[i] = 0;
      ld += l1;
      argld = ld*argh;
      for (ii = 4; ii <= idot; ii += 2) {
        i += 2;
        fi += 1;
        wa[i-1] = cos(fi*argld);
        wa[i] = sin(fi*argld);
      }
      if (ip > 5) {
        wa[i1-1] = wa[i-1];
        wa[i1] = wa[i];
      }
    }
    l1 = l2;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rax
movq %rsi, %r14
leaq 0x6bf7(%rip), %rdx      # 0x8100
movl %edi, 0x4(%rsp)
movq %rax, 0x28(%rsp)
movq %rax, %rsi
callq 0x16a2
movq %rax, 0x8(%rsp)
testl %eax, %eax
jle 0x1693
cvtsi2ssl 0x4(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x6b7f(%rip), %xmm1     # 0x80b8
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movss %xmm0, 0x14(%rsp)
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
movl $0x1, %r13d
movl $0x1, %ecx
movl $0x1, %eax
movq %r14, 0x38(%rsp)
movl %eax, %edx
movq 0x28(%rsp), %rax
movq %rcx, 0x30(%rsp)
movl 0x4(%rax,%rcx,4), %esi
movl %esi, %ecx
movl %edx, 0x1c(%rsp)
imull %edx, %ecx
movl 0x4(%rsp), %eax
cltd
movl %ecx, 0x10(%rsp)
idivl %ecx
cmpl $0x2, %esi
jl 0x167c
leal (%rax,%rax), %ebx
xorl %ecx, %ecx
movl $0x1, %r12d
movl %esi, 0x18(%rsp)
movq %rax, 0x40(%rsp)
addl 0x1c(%rsp), %ecx
movslq %r13d, %rdx
movq $0x3f800000, -0x4(%r14,%rdx,4) # imm = 0x3F800000
testl %eax, %eax
movl %ecx, 0x20(%rsp)
movq %rdx, 0x48(%rsp)
jle 0x1637
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
mulss 0x14(%rsp), %xmm0
movss %xmm0, 0x24(%rsp)
leaq (%r14,%rdx,4), %r14
movl $0x2, %ebp
movl $0x1, %r15d
xorps %xmm0, %xmm0
cvtsi2ss %r15d, %xmm0
mulss 0x24(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
callq 0x10b0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%r14,%rbp,4)
movsd 0x50(%rsp), %xmm0
callq 0x1120
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r14,%rbp,4)
addq $0x2, %rbp
addl $0x2, %r13d
incl %r15d
cmpl %ebx, %ebp
jle 0x15eb
movl 0x18(%rsp), %esi
cmpl $0x6, %esi
movq 0x38(%rsp), %r14
jl 0x1667
movslq %r13d, %rax
movss -0x4(%r14,%rax,4), %xmm0
movq 0x48(%rsp), %rcx
movss %xmm0, -0x4(%r14,%rcx,4)
movss (%r14,%rax,4), %xmm0
movss %xmm0, (%r14,%rcx,4)
incl %r12d
cmpl %esi, %r12d
movq 0x40(%rsp), %rax
movl 0x20(%rsp), %ecx
jne 0x15ac
movq 0x30(%rsp), %rcx
incq %rcx
cmpq 0x8(%rsp), %rcx
movl 0x10(%rsp), %eax
jne 0x156b
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pavel-demin[P]ft8d-c/pffft.c
// Function: decompose
static int decompose(int n, int *ifac, const int *ntryh) {
  int nl = n, nf = 0, i, j = 0;
  for (j=0; ntryh[j]; ++j) {
    int ntry = ntryh[j];
    while (nl != 1) {
      int nq = nl / ntry;
      int nr = nl - ntry * nq;
      if (nr == 0) {
        ifac[2+nf++] = ntry;
        nl = nq;
        if (ntry == 2 && nf != 1) {
          for (i = 2; i <= nf; ++i) {
            int ib = nf - i + 2;
            ifac[ib + 1] = ifac[ib];
          }
          ifac[2] = 2;
        }
      } else break;
    }
  }
  ifac[0] = n;
  ifac[1] = nf;
  return nf;
}

// Assembly:
movl (%rdx), %r11d
testl %r11d, %r11d
je 0x177a
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rcx
leaq 0x4(%rsi), %r9
xorl %r10d, %r10d
movl %edi, %eax
xorl %edx, %edx
movl %edx, %r14d
movl %eax, %r8d
cmpl $0x1, %r8d
je 0x1757
movl %r8d, %eax
cltd
idivl %r11d
movl %eax, %ebx
imull %r11d, %ebx
cmpl %ebx, %r8d
jne 0x1740
cmpl $0x2, %r11d
sete %bpl
leal 0x1(%r14), %edx
movslq %r14d, %r15
movl %r11d, 0x8(%rsi,%r15,4)
testl %r15d, %r15d
setne %r15b
andb %bpl, %r15b
cmpb $0x1, %r15b
jne 0x1746
testl %r14d, %r14d
jle 0x1737
movl %edx, %r12d
addl $0x2, %r14d
movl $0x2, %r15d
subq %r14, %r15
leaq (%r9,%r12,4), %r14
xorl %r12d, %r12d
movl -0x4(%r14,%r12,4), %ebp
movl %ebp, (%r14,%r12,4)
decq %r12
cmpq %r12, %r15
jne 0x1726
movl $0x2, 0x8(%rsi)
jmp 0x1746
movl %r14d, %edx
movl %r8d, %eax
movl %edx, %r14d
cmpl %ebx, %r8d
movl %eax, %r8d
je 0x16ca
jmp 0x175f
movl $0x1, %eax
movl %r14d, %edx
movl 0x4(%rcx,%r10,4), %r11d
incq %r10
testl %r11d, %r11d
jne 0x16c4
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x177c
xorl %edx, %edx
movl %edi, (%rsi)
movl %edx, 0x4(%rsi)
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/pavel-demin[P]ft8d-c/pffft.c
// Function: passf2_ps
static NEVER_INLINE(void) passf2_ps(int ido, int l1, const v4sf *cc, v4sf *ch, const float *wa1, float fsign) {
  int k, i;
  int l1ido = l1*ido;
  if (ido <= 2) {
    for (k=0; k < l1ido; k += ido, ch += ido, cc+= 2*ido) {
      ch[0]         = VADD(cc[0], cc[ido+0]);
      ch[l1ido]     = VSUB(cc[0], cc[ido+0]);
      ch[1]         = VADD(cc[1], cc[ido+1]);
      ch[l1ido + 1] = VSUB(cc[1], cc[ido+1]);
    }
  } else {
    for (k=0; k < l1ido; k += ido, ch += ido, cc += 2*ido) {
      for (i=0; i<ido-1; i+=2) {
        v4sf tr2 = VSUB(cc[i+0], cc[i+ido+0]);
        v4sf ti2 = VSUB(cc[i+1], cc[i+ido+1]);
        v4sf wr = LD_PS1(wa1[i]), wi = VMUL(LD_PS1(fsign), LD_PS1(wa1[i+1]));
        ch[i]   = VADD(cc[i+0], cc[i+ido+0]);
        ch[i+1] = VADD(cc[i+1], cc[i+ido+1]);
        VCPLXMUL(tr2, ti2, wr, wi);
        ch[i+l1ido]   = tr2;
        ch[i+l1ido+1] = ti2;
      }
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
imull %edi, %esi
cmpl $0x3, %edi
jge 0x220b
testl %esi, %esi
jle 0x22da
movslq %edi, %rax
movl %esi, %r8d
shlq $0x4, %rax
leaq 0x10(%rax), %r9
leal (%rdi,%rdi), %r10d
movslq %r10d, %r10
shlq $0x4, %r10
shlq $0x4, %r8
leaq 0x10(%r8), %r11
xorl %ebx, %ebx
movaps (%rdx), %xmm0
addps (%rdx,%rax), %xmm0
movaps %xmm0, (%rcx)
movaps (%rdx), %xmm0
subps (%rdx,%rax), %xmm0
movaps %xmm0, (%rcx,%r8)
movaps 0x10(%rdx), %xmm0
addps (%rdx,%r9), %xmm0
movaps %xmm0, 0x10(%rcx)
movaps 0x10(%rdx), %xmm0
subps (%rdx,%r9), %xmm0
movaps %xmm0, (%rcx,%r11)
addl %edi, %ebx
addq %r10, %rdx
addq %rax, %rcx
cmpl %esi, %ebx
jl 0x21c9
jmp 0x22da
testl %esi, %esi
jle 0x22da
leal -0x1(%rdi), %r10d
movl %edi, %eax
leal (%rdi,%rdi), %r9d
movl %esi, %r11d
movslq %r10d, %r10
shlq $0x4, %r11
addq %rcx, %r11
addq $0x10, %r11
shlq $0x4, %rax
leaq (%rax,%rdx), %rbx
addq $0x10, %rbx
shlq $0x4, %r9
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %r12d, %r12d
movaps -0x10(%rbx,%r15,4), %xmm1
movaps (%rdx,%r15,4), %xmm2
movaps 0x10(%rdx,%r15,4), %xmm3
movaps %xmm2, %xmm4
subps (%rbx,%r15,4), %xmm3
subps %xmm1, %xmm4
movss (%r8,%r15), %xmm5
shufps $0x0, %xmm5, %xmm5      # xmm5 = xmm5[0,0,0,0]
movss 0x4(%r8,%r15), %xmm6
mulss %xmm0, %xmm6
shufps $0x0, %xmm6, %xmm6      # xmm6 = xmm6[0,0,0,0]
addps %xmm1, %xmm2
movaps %xmm2, (%rcx,%r15,4)
movaps 0x10(%rdx,%r15,4), %xmm1
addps (%rbx,%r15,4), %xmm1
movaps %xmm1, 0x10(%rcx,%r15,4)
movaps %xmm4, %xmm1
mulps %xmm6, %xmm1
mulps %xmm5, %xmm4
mulps %xmm3, %xmm6
subps %xmm6, %xmm4
mulps %xmm3, %xmm5
addps %xmm1, %xmm5
movaps %xmm4, -0x10(%r11,%r15,4)
movaps %xmm5, (%r11,%r15,4)
addq $0x2, %r12
addq $0x8, %r15
cmpq %r10, %r12
jl 0x2247
addl %edi, %r14d
addq %rax, %r11
addq %r9, %rbx
addq %rax, %rcx
addq %r9, %rdx
cmpl %esi, %r14d
jl 0x2241
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pavel-demin[P]ft8d-c/ft8d.c
// Function: check
int check()
{
  int i, j;
  uint8_t poly[15] = {1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1 };
  uint8_t data[96] = {0};

  memcpy(data, message, 77);

  for(i = 0; i < 82; ++i)
  {
    if(data[i])
    {
      for(j = 0; j < 15; ++j)
      {
        data[i + j] ^= poly[j];
      }
    }
  }

  for(i = 0; i < 14; ++i)
  {
    if(data[82 + i] != message[77 + i]) return 0;
  }

  return 1;
}

// Assembly:
xorps %xmm0, %xmm0
leaq -0x68(%rsp), %rdx
movups %xmm0, 0x4d(%rdx)
movl $0x0, 0x5c(%rdx)
leaq 0x6c0b(%rip), %rax      # 0xd4b0
movl $0x9, %ecx
movq %rdx, %rdi
movq %rax, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl 0x6c3f(%rip), %ecx      # 0xd4f8
movl %ecx, 0x48(%rdx)
movb 0x6c3a(%rip), %cl       # 0xd4fc
movb %cl, 0x4c(%rdx)
xorl %ecx, %ecx
leaq 0x206a(%rip), %rsi      # 0x8938
cmpb $0x0, -0x68(%rsp,%rcx)
je 0x68e8
xorl %edi, %edi
movb (%rdi,%rsi), %r8b
xorb %r8b, (%rdx,%rdi)
incq %rdi
cmpq $0xf, %rdi
jne 0x68d7
incq %rcx
incq %rdx
cmpq $0x52, %rcx
jne 0x68ce
movl $0x4d, %ecx
movb -0x63(%rsp,%rcx), %dl
cmpb (%rcx,%rax), %dl
jne 0x6911
incq %rcx
cmpq $0x5b, %rcx
jne 0x68f9
movl $0x1, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/pavel-demin[P]ft8d-c/ft8d.c
// Function: trim
void trim(char *s)
{
  char *p = s;
  int l = strlen(p);

  while(isspace(p[l - 1])) p[--l] = 0;
  while(*p && isspace(*p)) ++p, --l;

  memmove(s, p, l + 1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1060
movq %rax, %r14
callq 0x1150
movq (%rax), %rcx
movslq %r14d, %rdx
movsbq -0x1(%rbx,%rdx), %rdx
testb $0x20, 0x1(%rcx,%rdx,2)
je 0x6dc9
movslq %r14d, %rdx
leaq -0x1(%rdx), %r14
movb $0x0, -0x1(%rbx,%rdx)
movq (%rax), %rcx
movsbq -0x2(%rbx,%rdx), %rdx
testb $0x20, 0x1(%rcx,%rdx,2)
movq %r14, %rdx
jne 0x6dad
movb (%rbx), %al
movq %rbx, %rsi
testb %al, %al
je 0x6de8
movsbq %al, %rax
testb $0x20, 0x1(%rcx,%rax,2)
je 0x6de8
decl %r14d
movb 0x1(%rsi), %al
incq %rsi
jmp 0x6dce
incl %r14d
movslq %r14d, %rdx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1100
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_11/detab.c
// Function: main
int main(int argc, char *argv[])
{
  if (!is_tab_stop_arg_list_valid(argc, argv))
  {
    puts("Error: invalid tab stop list.\n");
    return EXIT_FAILURE;
  }

  int c;
  size_t arg_pos = 1;
  size_t line_pos = 0;
  size_t tab_stop = DEFAULT_TAB_LENGTH;
  size_t nr_of_spaces;
  size_t nr_of_custom_tab_stops = argc - 1;

  while ((c = getchar()) != EOF)
  {
    if (c == '\t')
    {
      if (nr_of_custom_tab_stops)
      {
        tab_stop = atoi(argv[arg_pos++]);
        --nr_of_custom_tab_stops;
      }
      else if (argc > 1)
      {
        tab_stop = 1;
      }

      nr_of_spaces = tab_stop - line_pos % tab_stop;

      while (nr_of_spaces)
      {
        putchar(' ');
        ++line_pos;
        --nr_of_spaces;
      }
    }
    else
    {
      putchar(c);
      ++line_pos;

      if (c == '\n')
      {
        arg_pos = 1;
        line_pos = 0;
        nr_of_custom_tab_stops = argc - 1;
      }
    }
  }

  return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %r14d
callq 0x126f
testl %eax, %eax
je 0x124f
movq %r14, 0x8(%rsp)
leal -0x1(%r14), %eax
movslq %eax, %r12
movl $0x8, %r14d
xorl %r15d, %r15d
movl $0x1, %r13d
movq %r12, 0x10(%rsp)
callq 0x1060
cmpl $0x9, %eax
je 0x11fd
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x124b
movl %ebp, %edi
callq 0x1030
incq %r15
cmpl $0xa, %ebp
jne 0x11cd
movl $0x1, %r13d
xorl %r15d, %r15d
movq 0x10(%rsp), %r12
jmp 0x11cd
testq %r12, %r12
je 0x1216
movq (%rbx,%r13,8), %rdi
incq %r13
callq 0x1070
movslq %eax, %r14
decq %r12
jmp 0x1227
cmpl $0x2, 0x8(%rsp)
movl $0x1, %eax
cmovgeq %rax, %r14
xorl %r12d, %r12d
movq %r15, %rax
xorl %edx, %edx
divq %r14
movq %r14, %rbp
subq %rdx, %rbp
je 0x11cd
movl $0x20, %edi
callq 0x1030
incq %r15
decq %rbp
jne 0x1237
jmp 0x11cd
xorl %eax, %eax
jmp 0x1260
leaq 0xdae(%rip), %rdi       # 0x2004
callq 0x1040
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/programs/fibonacci/fibonacci_test.c
// Function: syllables_no
int syllables_no(char* s) {
	int num = 1;
	for (; *s != '\0'; s++)
		if (*s == ' ' || *s == '-')
			num++;

	return num;
}

// Assembly:
movl $0x1, %eax
movzbl (%rdi), %ecx
cmpl $0x20, %ecx
je 0x3ce1
cmpl $0x2d, %ecx
je 0x3ce1
testl %ecx, %ecx
jne 0x3ce3
jmp 0x3ce8
incl %eax
incq %rdi
jmp 0x3cce
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/programs/fibonacci/fibonacci.c
// Function: fibonacci
int fibonacci(int n) {
	if (memory == NULL) {
		// Αρχικοποίηση της μνήμης με τα πρώτα 2 στοιχεία της ακολουθίας
		memory = int_vector_create(0);
		int_vector_insert_last(memory, 0);
		int_vector_insert_last(memory, 1);
	}

	// Αν δεν έχουμε ήδη το αποτέλεσμα το υπολογίζουμε και το αποθηκεύουμε
	if (n >= int_vector_size(memory)) {
		int res = fibonacci(n-2) + fibonacci(n-1);
		int_vector_insert_last(memory, res);
	}

	return int_vector_get_at(memory, n);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpq $0x0, 0x5547(%rip)      # 0xa438
jne 0x4f1c
xorl %edi, %edi
callq 0x4f70
movq %rax, 0x5537(%rip)      # 0xa438
movq %rax, %rdi
xorl %esi, %esi
callq 0x4fcb
movq 0x5526(%rip), %rdi      # 0xa438
movl $0x1, %esi
callq 0x4fcb
movq 0x5515(%rip), %rdi      # 0xa438
callq 0x4fb0
cmpl %ebx, %eax
jg 0x4f4e
leal -0x2(%rbx), %edi
callq 0x4ee4
movl %eax, %ebp
leal -0x1(%rbx), %edi
callq 0x4ee4
addl %eax, %ebp
movq 0x54f1(%rip), %rdi      # 0xa438
movl %ebp, %esi
callq 0x4fcb
movq 0x54e3(%rip), %rdi      # 0xa438
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4fc1
// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/tools/mergelcp.c
// Function: file_open
FILE* file_open(char *c_file, const char * c_mode){
  
  FILE* f_in;
  f_in = fopen(c_file, c_mode);
  if (!f_in) {perror (__func__); exit(EXIT_FAILURE);}
  fseek(f_in, 0, SEEK_SET);
  
return f_in;
}

// Assembly:
pushq %rbx
callq 0x1160
testq %rax, %rax
je 0x14eb
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1140
movq %rbx, %rax
popq %rbx
retq
callq 0x1200
// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/tools/mergelcp.c
// Function: usage
void usage(char *name){
  printf("\n\tUsage: %s [options] FILE POS_SIZE LCP_SIZE \n\n",name);
  puts("Multiway k-merge sort for the lists of pairs <pos, lcp>.");
  puts("Input:\tFILE.pair.lcp with the lists and FILE.size.lcp");
  puts("with their start positions in FILE.pair.lcp");
  puts("Output:\tFILE.lcp contains <lcp> sorted by <pos>.\n");
  puts("Available options:");
  puts("\t-h\tthis help message");
  puts("\t-s\tHEAP_SIZE");
  puts("\t-t\ttime");
  puts("\t-k\tk-truncated LCP merging");
  puts("\t-v\tverbose\n");
  exit(EXIT_FAILURE);
}

// Assembly:
pushq %rax
movq %rdi, %rsi
leaq 0x29b1(%rip), %rdi      # 0x4133
xorl %eax, %eax
callq 0x10d0
leaq 0x29d3(%rip), %rdi      # 0x4163
callq 0x1080
leaq 0x2a00(%rip), %rdi      # 0x419c
callq 0x1080
leaq 0x2a2a(%rip), %rdi      # 0x41d2
callq 0x1080
leaq 0x2a4a(%rip), %rdi      # 0x41fe
callq 0x1080
leaq 0x2a70(%rip), %rdi      # 0x4230
callq 0x1080
leaq 0x2a77(%rip), %rdi      # 0x4243
callq 0x1080
leaq 0x2a81(%rip), %rdi      # 0x4259
callq 0x1080
leaq 0x2a83(%rip), %rdi      # 0x4267
callq 0x1080
leaq 0x2a80(%rip), %rdi      # 0x4270
callq 0x1080
leaq 0x2a90(%rip), %rdi      # 0x428c
callq 0x1080
movl $0x1, %edi
callq 0x11c0
// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/tools/heap.c
// Function: write_buffer
void write_buffer(heap *h, FILE *f_out, int level) {

  int i;
  if(level){
    for(i=0; i<h->out_idx; i++){
      fwrite(&h->out_buffer[i], h->pos_size+h->lcp_size, 1, f_out);
    }
  }
  else{
    for(i=0; i<h->out_idx; i++){
      uint64_t lcp = lcp(h->out_buffer[i]);
      fwrite(&lcp, h->lcp_size, 1, f_out);
    }
  }
  h->out_idx = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x210(%rdi), %eax
testl %edx, %edx
je 0x2a5c
testl %eax, %eax
jle 0x2ab3
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x208(%rbx), %rdi
addq %r15, %rdi
movslq 0x214(%rbx), %rax
movslq 0x218(%rbx), %rsi
addq %rax, %rsi
movl $0x1, %edx
movq %r14, %rcx
callq 0x11d0
incq %r12
movslq 0x210(%rbx), %rax
addq $0x10, %r15
cmpq %rax, %r12
jl 0x2a1f
jmp 0x2ab3
testl %eax, %eax
jle 0x2ab3
xorl %r12d, %r12d
leaq 0x1b16(%rip), %r13      # 0x4580
movq %rsp, %r15
xorl %ebp, %ebp
movq 0x208(%rbx), %rax
movslq 0x218(%rbx), %rsi
movq %rsi, %rcx
shlq $0x4, %rcx
movq (%rcx,%r13), %rcx
andq (%rax,%r12), %rcx
movq %rcx, (%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rcx
callq 0x11d0
incq %rbp
movslq 0x210(%rbx), %rax
addq $0x10, %r12
cmpq %rax, %rbp
jl 0x2a6f
movl $0x0, 0x210(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq