LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/fst.c
// Function: fst_read
void fst_read(struct _fst * fst, FILE * fin) {
    struct _state * state;
    uint32_t header = 0;

    fread( &header, sizeof(header), 1, fin);
    if (header != _fst_header) {
        printf("Wrong file format\n");
        exit(EXIT_FAILURE);
    }

    fread( &fst->start, sizeof(state_t), 1, fin);
    fread( &fst->n_states, sizeof(state_t), 1, fin);
    fread( &fst->sr_type, sizeof(uint8_t), 1, fin);
    fread( &fst->flags, sizeof(uint8_t), 1, fin);

    fst->n_max = fst->n_states;

    fst->states = malloc(sizeof(struct _state) * fst->n_states);

    for (int s=0; s < fst->n_states; ++s) {
        state = &fst->states[s];

        fread ( &state->weight, sizeof(weight_t), 1, fin);
        fread ( &state->n_arcs, sizeof(arc_t), 1, fin);
        fread ( &state->final, sizeof(int), 1, fin);

        state->n_max = state->n_arcs;

        state->arcs = malloc(sizeof(struct _arc) * state->n_arcs);
        fread ( state->arcs, sizeof(struct _arc), state->n_arcs, fin);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r13
leaq -0x44(%rbp), %r15
andl $0x0, (%r15)
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1080
cmpl $0x66733031, (%r15)     # imm = 0x66733031
jne 0x2392
pushq $0x4
popq %r14
pushq $0x1
popq %r15
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1080
leaq 0x4(%r13), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1080
leaq 0xc(%r13), %rdi
movq %r15, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1080
leaq 0xd(%r13), %rdi
movq %r15, %rsi
movq %r15, %rdx
movq %rbx, -0x30(%rbp)
movq %rbx, %rcx
callq 0x1080
movl 0x4(%r13), %r15d
movl %r15d, 0x8(%r13)
imulq $0x18, %r15, %rdi
callq 0x1150
movq %rax, 0x10(%r13)
xorl %r12d, %r12d
xorl %ecx, %ecx
movq %r13, -0x38(%rbp)
movq -0x30(%rbp), %rbx
movl %r15d, %eax
cmpq %rax, %rcx
jae 0x2383
movq 0x10(%r13), %r15
leaq (%r15,%r12), %r13
leaq (%r15,%r12), %rdi
addq $0x8, %rdi
movq %r14, %rsi
pushq $0x1
popq %rdx
movq %rcx, -0x40(%rbp)
movq %rbx, %rcx
callq 0x1080
movq %r13, %rdi
movq %r14, %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1080
leaq (%r15,%r12), %r13
addq $0xc, %r13
movq %r13, %rdi
movq %r14, %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1080
movl -0xc(%r13), %r15d
movl %r15d, -0x8(%r13)
movq %r15, %rdi
shlq $0x4, %rdi
callq 0x1150
movq %rax, 0x4(%r13)
movq -0x38(%rbp), %r13
movq %rax, %rdi
pushq $0x10
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1080
movq -0x40(%rbp), %rcx
incq %rcx
movl 0x4(%r13), %r15d
addq $0x18, %r12
jmp 0x22ea
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3d38(%rip), %rdi      # 0x60d1
callq 0x1060
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/fst.c
// Function: fst_fwrite
void fst_fwrite(const struct _fst * fst, const char * filename) {
    FILE * fout = NULL;

    if (( fout = fopen(filename, "wb")) == NULL ) {
        fprintf(stderr, "Error opening file: %s", filename);
        exit(EXIT_FAILURE);
    }
    fst_write(fst, fout);
    fclose(fout); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x3cf7(%rip), %rsi      # 0x60b4
movq %rbx, %rdi
callq 0x1180
testq %rax, %rax
je 0x23ea
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x2129
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1090
movq 0x6c07(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x3cbc(%rip), %rsi      # 0x60b7
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1120
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/fst.c
// Function: fst_fread
void fst_fread(struct _fst * fst, const char * filename) {
    FILE * fin = NULL;

    if (( fin = fopen(filename, "rb")) == NULL ) {
        fprintf(stderr, "Error opening file: %s", filename);
        exit(EXIT_FAILURE);
    }
    fst_read(fst, fin);
    fclose(fin); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x3caa(%rip), %rsi      # 0x60ce
movq %rbx, %rdi
callq 0x1180
testq %rax, %rax
je 0x2451
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x2238
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1090
movq 0x6ba0(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x3c55(%rip), %rsi      # 0x60b7
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1120
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/fst.c
// Function: fst_get_n_arcs
arc_t fst_get_n_arcs(const struct _fst * fst) {
    arc_t n = 0;
    for (state_t s = 0; s < fst->n_states; ++s) {
        n += fst->states[s].n_arcs; 
    }
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x4(%rdi), %eax
imulq $0x18, %rax, %rcx
xorl %edx, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x2495
movq 0x10(%rdi), %rsi
addl (%rsi,%rdx), %eax
addq $0x18, %rdx
jmp 0x2483
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/fst.c
// Function: fst_stack
void fst_stack(struct _fst * a, const struct _fst * b) {
    struct _state * state;
    struct _arc * arc_tmp;

    state_t offset = a->n_states; 
    a->n_states = a->n_states + b->n_states; 

    /*
    Check if there is enough space for stacking.
    If not then allocate additional space.

    */

    if (a->n_max < a->n_states) {
        a->n_max = a->n_states; 
        a->states = realloc(a->states, a->n_max * sizeof(struct _state));
    }

    memcpy(&a->states[offset], b->states, b->n_states * sizeof(struct _state));

    for(state_t i=offset; i < a->n_states; ++i) {
        state = &a->states[i];
        arc_tmp = state->arcs;
        state->arcs = malloc(state->n_max * sizeof(struct _arc));
        memcpy(state->arcs, arc_tmp, state->n_arcs * sizeof(struct _arc));
        for (arc_t j=0; j < state->n_arcs; ++j)
            (&state->arcs[j])->state += offset;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdi), %r15d
movl 0x8(%rdi), %ecx
movl 0x4(%rsi), %eax
addl %r15d, %eax
movl %eax, 0x4(%rdi)
cmpl %eax, %ecx
jae 0x24da
movl %eax, 0x8(%rbx)
movq 0x10(%rbx), %rdi
movl %eax, %eax
imulq $0x18, %rax, %rsi
callq 0x1170
movq %rax, 0x10(%rbx)
jmp 0x24de
movq 0x10(%rbx), %rax
imulq $0x18, %r15, %rdi
addq %rax, %rdi
movq 0x10(%r14), %rsi
movl 0x4(%r14), %eax
imulq $0x18, %rax, %rdx
callq 0x1140
movl 0x4(%rbx), %eax
movq %rax, -0x38(%rbp)
movq %r15, %r13
movq %rbx, -0x30(%rbp)
cmpq -0x38(%rbp), %r13
jae 0x256d
movq 0x10(%rbx), %r12
imulq $0x18, %r13, %r14
leaq (%r12,%r14), %rbx
movq 0x10(%r12,%r14), %rax
movq %rax, -0x40(%rbp)
movl 0x4(%r12,%r14), %edi
shlq $0x4, %rdi
callq 0x1150
movq %rax, 0x10(%r12,%r14)
movl (%r12,%r14), %edx
shlq $0x4, %rdx
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0x1140
movl (%r12,%r14), %eax
xorl %ecx, %ecx
xorl %edx, %edx
cmpq %rax, %rdx
jae 0x2564
movq 0x10(%rbx), %rsi
addl %r15d, (%rsi,%rcx)
incq %rdx
addq $0x10, %rcx
jmp 0x254e
incq %r13
movq -0x30(%rbp), %rbx
jmp 0x2504
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/fst.c
// Function: fst_copy
void fst_copy(const struct _fst * orig, struct _fst * copy) {
    struct _state * so, * sc;

    memcpy(copy, orig, sizeof(struct _fst));
    
    copy->states = malloc(sizeof(struct _state) * orig->n_max);
    memcpy(copy->states, orig->states, sizeof(struct _state) * orig->n_states);
    
    for(state_t s=0; s < copy->n_states; ++s) {
        sc = &copy->states[s];
        so = &orig->states[s];
        sc->arcs = malloc(sizeof(struct _arc) * sc->n_max);
        memcpy(sc->arcs, so->arcs, sizeof(struct _arc) * sc->n_arcs);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r12
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rsi)
movups (%rdi), %xmm0
movups %xmm0, (%rsi)
movl 0x8(%rdi), %eax
imulq $0x18, %rax, %rdi
callq 0x1150
movq %rax, %rbx
movq %rax, 0x10(%r15)
movq 0x10(%r12), %r14
movl 0x4(%r12), %eax
imulq $0x18, %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1140
movl 0x4(%r15), %r15d
pushq $0x10
popq %r12
xorl %r13d, %r13d
cmpq %r15, %r13
jae 0x260a
movl -0xc(%rbx,%r12), %edi
shlq $0x4, %rdi
callq 0x1150
movq %rax, (%rbx,%r12)
movq (%r14,%r12), %rsi
movl -0x10(%rbx,%r12), %edx
shlq $0x4, %rdx
movq %rax, %rdi
callq 0x1140
incq %r13
addq $0x18, %r12
jmp 0x25d5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/fst.c
// Function: fst_relabel
void fst_relabel(struct _fst * fst, label_t old, label_t new, int dir) {
    // change labels through the whole automaton:
    // 0 - input 
    // 1 - output 
    
    struct _state * state;
    struct _arc * arc;

    for (state_t s = 0; s < fst->n_states; ++s) {
        state = &fst->states[s];
        for (arc_t a = 0; a < state->n_arcs; ++a) {
            arc = &state->arcs[a];

            if (dir == 0) {
                if (arc->ilabel == old) arc->ilabel = new; 
            } else {
                if (arc->olabel == old) arc->olabel = new; 
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x4(%rdi), %eax
xorl %r8d, %r8d
movabsq $0x8, %r9
cmpq %rax, %r8
jae 0x268d
movq 0x10(%rdi), %r11
imulq $0x18, %r8, %rbx
leaq (%r11,%rbx), %r10
movl (%r11,%rbx), %r11d
movq %r9, %rbx
xorl %r14d, %r14d
cmpq %r11, %r14
jae 0x2688
movq 0x10(%r10), %r15
testl %ecx, %ecx
je 0x2673
cmpl %esi, 0x4(%r15,%rbx)
jne 0x267f
movq %r14, %r12
shlq $0x4, %r12
addq %r12, %r15
addq $0xc, %r15
jmp 0x267c
cmpl %esi, (%r15,%rbx)
jne 0x267f
addq %rbx, %r15
movl %edx, (%r15)
incq %r14
addq $0x10, %rbx
jmp 0x264f
incq %r8
jmp 0x2634
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/symt.c
// Function: symt_read
struct _symt * symt_read(struct _symt * st, FILE * fin) {
    char p[0xffff];
    char token[TOKEN_SIZE];
    size_t line = 1;
    size_t token_id;

    while (fgets(p, sizeof(p), fin) != NULL) {
        if (sscanf(p, "%s\t%zu", token, &token_id) == 2) {
            symt_add(st, token_id, token);
        }
        else {
                printf("Invalid input line %zd: %s", line, p);
                exit(EXIT_FAILURE);
        }
        ++line;
    }
    return st;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10408, %rsp          # imm = 0x10408
movq %rsi, %r15
movq %rdi, %r14
pushq $0x1
popq %rbx
leaq -0x10430(%rbp), %r12
leaq -0x430(%rbp), %r13
movq %r12, %rdi
movl $0xffff, %esi           # imm = 0xFFFF
movq %r15, %rdx
callq 0x1100
testq %rax, %rax
je 0x2709
movq %r12, %rdi
leaq 0x3a01(%rip), %rsi      # 0x60e3
movq %r13, %rdx
leaq -0x30(%rbp), %rcx
xorl %eax, %eax
callq 0x1160
cmpl $0x2, %eax
jne 0x271e
movq -0x30(%rbp), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x273e
incq %rbx
jmp 0x26c3
movq %r14, %rax
addq $0x10408, %rsp          # imm = 0x10408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x38df(%rip), %rdi      # 0x6004
leaq -0x10430(%rbp), %rdx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10b0
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/symt.c
// Function: symt_add
char * symt_add(
                        struct _symt * st, 
                        size_t id, 
                        const char * token) {

    // Token should be a C-string
    size_t s = st->n_max;
    char ** p;

    assert(st->sym != NULL);
    assert(st->n_max != 0);

    while (st->n_max <= id) {
        st->n_max *= 2;
    }

    if( st->n_max > s) {
        p = realloc(st->sym, st->n_max * sizeof(char *)); 
        st->sym = p;
    }

    for(size_t i = s; i < st->n_max; ++i)
        st->sym[i] = NULL;

    char * t = malloc(strlen(token) + 1);
    //strncpy(t, token, TOKEN_SIZE);
    strcpy(t, token);
    st->sym[id] = t;
    ++st->n_items;

    return st->sym[id];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x27e1
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x27fa
movq %rdx, %r15
movq %rsi, %rbx
movq %r12, %rsi
cmpq %rbx, %rsi
ja 0x277d
addq %rsi, %rsi
movq %rsi, 0x8(%r14)
jmp 0x276f
cmpq %r12, %rsi
jbe 0x27a1
shlq $0x3, %rsi
callq 0x1170
movq %rax, 0x10(%r14)
movq 0x8(%r14), %rsi
jmp 0x27a1
movq 0x10(%r14), %rax
andq $0x0, (%rax,%r12,8)
incq %r12
cmpq %rsi, %r12
jb 0x2795
movq %r15, %rdi
callq 0x10a0
leaq 0x1(%rax), %rdi
callq 0x1150
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x1050
movq 0x10(%r14), %rax
movq %r12, (%rax,%rbx,8)
incq (%r14)
movq 0x10(%r14), %rax
movq (%rax,%rbx,8), %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3923(%rip), %rdi      # 0x610b
leaq 0x392c(%rip), %rsi      # 0x611b
leaq 0x3930(%rip), %rcx      # 0x6126
pushq $0x7d
jmp 0x2811
leaq 0x395a(%rip), %rdi      # 0x615b
leaq 0x3913(%rip), %rsi      # 0x611b
leaq 0x3917(%rip), %rcx      # 0x6126
pushq $0x7e
popq %rdx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/symt.c
// Function: symt_compile
struct _symt * symt_compile(struct _symt * st, const char * str) {
    char p[0xffff];
    char token[TOKEN_SIZE];
    char * tok;
    size_t line = 1;
    size_t token_id;

    strcpy(p, str);

    do {
        if (line == 1)
            tok = strtok(p, "\n");
        else {
            tok = strtok(NULL, "\n");
        }

        if (tok) {
            if (sscanf(p, "%s\t%zd", token, &token_id) == 2) {
                symt_add(st, token_id, token);
            }
            else {
                    printf("Invalid input line %zd: %s", line, p);
                    exit(EXIT_FAILURE);
            }
        }
        ++line;
    } while (tok);

    return st;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10408, %rsp          # imm = 0x10408
movq %rdi, %rbx
leaq -0x10430(%rbp), %r15
movq %r15, %rdi
callq 0x1050
pushq $0x1
popq %r14
leaq -0x430(%rbp), %r13
leaq -0x30(%rbp), %r12
cmpq $0x1, %r14
jne 0x2857
movq %r15, %rdi
jmp 0x2859
xorl %edi, %edi
leaq 0x3b80(%rip), %rsi      # 0x63e0
callq 0x1190
testq %rax, %rax
je 0x289a
movq %r15, %rdi
leaq 0x3876(%rip), %rsi      # 0x60ea
movq %r13, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x1160
cmpl $0x2, %eax
jne 0x28af
movq -0x30(%rbp), %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x273e
incq %r14
jmp 0x284c
movq %rbx, %rax
addq $0x10408, %rsp          # imm = 0x10408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x374e(%rip), %rdi      # 0x6004
leaq -0x10430(%rbp), %rdx
movq %r14, %rsi
xorl %eax, %eax
callq 0x10b0
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/symt.c
// Function: symt_fread
struct _symt * symt_fread(struct _symt * st, const char * filename) {
    FILE * fin = NULL;
    if (( fin = fopen(filename, "r")) == NULL ) {
        fprintf(stderr, "Error opening file: %s\n", filename);
        exit(EXIT_FAILURE);
    }

    st = symt_read(st, fin);
    if (fin != NULL)
        fclose(fin);
    return st;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x380b(%rip), %rsi      # 0x60f1
movq %r14, %rdi
callq 0x1180
testq %rax, %rax
je 0x2917
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2698
movq %r15, %rdi
callq 0x1090
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x66da(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x37cb(%rip), %rsi      # 0x60f3
movq %r14, %rdx
xorl %eax, %eax
callq 0x1120
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/symt.c
// Function: symt_create
struct _symt * symt_create() {
    struct _symt * st = malloc(sizeof(struct _symt));

    st->rev = NULL;
    st->sym = malloc(SYM_INIT_SIZE * sizeof(char *));

    st->n_items = 0;
    st->n_max = SYM_INIT_SIZE;

    for(size_t i=0; i < st->n_max; ++i)
        st->sym[i] = NULL;

    return st;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
pushq $0x20
popq %rdi
callq 0x1150
movq %rax, %rbx
andq $0x0, 0x18(%rax)
movl $0x2000, %edi           # imm = 0x2000
callq 0x1150
movq %rax, 0x10(%rbx)
andq $0x0, (%rbx)
movq $0x400, 0x8(%rbx)       # imm = 0x400
xorl %ecx, %ecx
cmpq $0x400, %rcx            # imm = 0x400
je 0x297f
andq $0x0, (%rax,%rcx,8)
incq %rcx
jmp 0x296c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/symt.c
// Function: symt_remove
void symt_remove(struct _symt * st) {
    for(size_t i=0; i < st->n_max; ++i) 
        if(st->sym[i] != NULL)  
            free(st->sym[i]);

    if (st->rev != NULL)
        hash_remove(st->rev);

    free(st->sym);
    free(st);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq 0x8(%rbx), %r14
jae 0x29ae
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1030
incq %r14
jmp 0x2996
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x29bc
callq 0x1ddc
movq 0x10(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/symt.c
// Function: symt_reverse
struct _hash * symt_reverse(struct _symt * st) {
    if(st->rev != NULL)
        hash_remove(st->rev);

    st->rev = hash_create(
                    fnv32,
                    str_cmp,
                    TOKEN_SIZE,
                    sizeof(size_t),
                    st->n_items * 2);

    char token[TOKEN_SIZE] = {0};

    for(size_t i=0; i < st->n_max; ++i) {
        if ( st->sym[i] != NULL ) {
            strncpy(token, st->sym[i], TOKEN_SIZE - 1);
            //strcpy(token, st->sym[i]);
            hash_add(st->rev, token, &i);
            //hash_add(st->rev, st->sym[i], &i);
        }
    } 

    return st->rev;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x410, %rsp            # imm = 0x410
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x2a3b
callq 0x1ddc
movq (%rbx), %r8
addq %r8, %r8
leaq 0x85(%rip), %rdi        # 0x2acd
leaq 0xb3(%rip), %rsi        # 0x2b02
pushq $0x8
popq %rcx
movl $0x400, %edx            # imm = 0x400
callq 0x1b14
movq %rax, 0x18(%rbx)
leaq -0x430(%rbp), %r14
xorl %r12d, %r12d
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x10e0
leaq -0x28(%rbp), %r15
movq %r12, -0x28(%rbp)
cmpq 0x8(%rbx), %r12
jae 0x2ab9
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %rsi
testq %rsi, %rsi
je 0x2ab4
movl $0x3ff, %edx            # imm = 0x3FF
movq %r14, %rdi
callq 0x1040
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1c3c
movq -0x28(%rbp), %r12
incq %r12
jmp 0x2a7d
movq 0x18(%rbx), %rax
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/symt.c
// Function: fnv32
static size_t fnv32(void * str) {

    const char * s = str;
    uint32_t hsh = FNV_OFFSET_32, i;

    for(i = 0; i < strlen(s); i++) {
        // xor next byte into the bottom of the hash
        hsh = hsh ^ (s[i]); 
        // Multiply by prime number found to work well
        hsh = hsh * FNV_PRIME_32; 
    }
    return hsh;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x10a0
xorl %edx, %edx
movl $0x811c9dc5, %ecx       # imm = 0x811C9DC5
movl %edx, %edx
cmpq %rdx, %rax
jbe 0x2af9
movsbl (%rbx,%rdx), %esi
xorl %esi, %ecx
imull $0x1000193, %ecx, %ecx  # imm = 0x1000193
incl %edx
jmp 0x2ae2
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/symt.c
// Function: symt_getr
size_t symt_getr(struct _symt * st, char * token) {
    size_t id = -1;
    if (st->rev == NULL)
       symt_reverse(st); 

    hash_get(st->rev, token, &id); 

    return id; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
orq $-0x1, -0x18(%rbp)
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
jne 0x2b41
movq %r14, %rdi
callq 0x2a18
movq 0x18(%r14), %rdi
leaq -0x18(%rbp), %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1e21
movq (%r14), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/sort.c
// Function: fst_arc_sort
void fst_arc_sort(struct _fst * fst, int sort_outer) {
    struct _state * state;

    int (*comp)(const void *, const void *);

    if (sort_outer == 0)    {
        comp=icomp;
        fst->flags |= ISORT;
    } else {
        comp=ocomp;
        fst->flags |= OSORT;
    }
    
    for(state_t s = 0; s < fst->n_states; ++s) {
        state = &fst->states[s];
        qsort(  state->arcs, 
                state->n_arcs,
                sizeof(struct _arc),
                comp );
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
sete %al
leaq 0x54(%rip), %rcx        # 0x2be5
leaq 0x59(%rip), %r14        # 0x2bf1
cmoveq %rcx, %r14
movb $0x2, %cl
subb %al, %cl
orb %cl, 0xd(%rdi)
pushq $0x10
popq %r15
xorl %r12d, %r12d
movq %r15, %r13
movl 0x4(%rbx), %eax
cmpq %rax, %r12
jae 0x2bd6
movq 0x10(%rbx), %rax
movq (%rax,%r13), %rdi
movl -0x10(%rax,%r13), %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1070
incq %r12
addq $0x18, %r13
jmp 0x2bad
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/queue.c
// Function: queue_create
struct _queue * queue_create(size_t item_size) {
    struct _queue * q;

    q = (struct _queue *) malloc(sizeof(struct _queue));
    q->item_size = item_size;

    q->n_items = 0;

    q->head = NULL;
    q->tail = NULL;

    return q;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x20
popq %rdi
callq 0x1150
movq %rbx, 0x10(%rax)
andq $0x0, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/queue.c
// Function: queue_enque
void queue_enque(struct _queue * q, void * item) {
    struct _qnode * node;

    assert ( q != NULL);

    node = (struct _qnode *)malloc(sizeof(struct _qnode) - 1 + q->item_size);
    node->next = NULL;

    memcpy(node->item, item, q->item_size);

    if (q->head == NULL)
        q->head = q->tail = node;
    else {
        q->tail->next = node;  
        q->tail = node;
    }

    ++q->n_items;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x2c89
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %r12
leaq 0xf(%r12), %rdi
callq 0x1150
movq %rax, %r14
andq $0x0, (%rax)
leaq 0x8(%rax), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1140
leaq 0x8(%rbx), %rax
cmpq $0x0, (%rbx)
je 0x2c70
movq (%rax), %rcx
jmp 0x2c76
movq %rax, %rcx
movq %rbx, %rax
movq %r14, (%rcx)
movq %r14, (%rax)
incq 0x18(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x34e2(%rip), %rdi      # 0x6172
leaq 0x34e5(%rip), %rsi      # 0x617c
leaq 0x34ea(%rip), %rcx      # 0x6188
pushq $0x1c
popq %rdx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/queue.c
// Function: queue_deque
void * queue_deque(struct _queue * q, void * item) {
    struct _qnode * t_node;

    assert ( q != NULL );

    if (q->head == NULL)
        return NULL;    // Return NULL in case of empty queue
    
    t_node = q->head; 
    memcpy(item, t_node->item, q->item_size);

    q->head = t_node->next;
    free(t_node);

    --q->n_items;

    return item;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2cf7
movq %rdi, %r14
movq (%rdi), %r15
testq %r15, %r15
je 0x2ce7
movq %rsi, %rbx
leaq 0x8(%r15), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x1140
movq (%r15), %rax
movq %rax, (%r14)
movq %r15, %rdi
callq 0x1030
decq 0x18(%r14)
jmp 0x2ce9
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3474(%rip), %rdi      # 0x6172
leaq 0x3477(%rip), %rsi      # 0x617c
leaq 0x34a6(%rip), %rcx      # 0x61b2
pushq $0x30
popq %rdx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/queue.c
// Function: queue_empty
void queue_empty(struct _queue * q) {
    void * item = malloc(q->item_size);

    while( queue_deque(q, item) != NULL );

    q->n_items = 0;
    free (item);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x1150
movq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2ca6
testq %rax, %rax
jne 0x2d2a
andq $0x0, 0x18(%rbx)
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/bitset.c
// Function: bitset_create
struct _bitset * bitset_create(int nbits) {
    struct _bitset * bitset;

    bitset = malloc(sizeof(struct _bitset));
    bitset->n_words = (nbits / WORD_SIZE + 1);
    bitset->words = malloc(sizeof(*bitset->words) * bitset->n_words);
    bitset_clear_all(bitset);

    return bitset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
pushq $0x10
popq %rdi
callq 0x1150
movq %rax, %r14
pushq $0x20
popq %rcx
movl %ebx, %eax
cltd
idivl %ecx
leal 0x1(%rax), %ecx
movl %ecx, 0x8(%r14)
cltq
leaq 0x4(,%rax,4), %rdi
callq 0x1150
movq %rax, (%r14)
movq %r14, %rdi
callq 0x2dad
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/print.c
// Function: fst_print
void fst_print(const struct _fst * fst) {
    struct _state state;
    struct _arc arc;

    state_t s;
    arc_t   a;
    
    struct _queue *finals = queue_create(sizeof(state_t));
    
    for(s=0; s < fst->n_states; ++s) {
        state = fst->states[s];
        for(a=0; a < state.n_arcs; ++a) {
            arc = state.arcs[a];

            printf("%"PRIu32"\t%"PRIu32"\t%"PRIu32"\t%"PRIu32"\t%.5f\n",
                s,
                arc.state,
                arc.ilabel,
                arc.olabel,
                arc.weight);
        }

        if(state.final == 1) {
            queue_enque(finals, &s);
        }
    }

    while(queue_deque(finals, &s) != NULL) {
        state = fst->states[s];
        printf("%"PRIu32"\t%f\n", s, state.weight);
    }

    queue_remove(finals);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x4
popq %rdi
callq 0x2c00
movq %rax, -0x38(%rbp)
xorl %eax, %eax
leaq 0x333a(%rip), %r12      # 0x627f
movq %rbx, -0x40(%rbp)
movl %eax, -0x2c(%rbp)
cmpl 0x4(%rbx), %eax
jae 0x2fba
movq 0x10(%rbx), %rcx
movl %eax, %eax
imulq $0x18, %rax, %rax
movl (%rcx,%rax), %r15d
movl 0xc(%rcx,%rax), %r13d
movq 0x10(%rcx,%rax), %r14
shlq $0x4, %r15
xorl %ebx, %ebx
cmpq %rbx, %r15
je 0x2f9c
movl (%r14,%rbx), %edx
movl 0x8(%r14,%rbx), %ecx
movl 0xc(%r14,%rbx), %r8d
movl -0x2c(%rbp), %esi
cvtss2sd 0x4(%r14,%rbx), %xmm0
movq %r12, %rdi
movb $0x1, %al
callq 0x10b0
addq $0x10, %rbx
jmp 0x2f6f
cmpl $0x1, %r13d
jne 0x2faf
movq -0x38(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2c27
movl -0x2c(%rbp), %eax
incl %eax
movq -0x40(%rbp), %rbx
jmp 0x2f49
leaq -0x2c(%rbp), %r15
leaq 0x32cc(%rip), %r12      # 0x6291
movq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x2ca6
testq %rax, %rax
je 0x2ff3
movq 0x10(%rbx), %rax
movl -0x2c(%rbp), %esi
imulq $0x18, %rsi, %rcx
cvtss2sd 0x8(%rax,%rcx), %xmm0
movq %r12, %rdi
movb $0x1, %al
callq 0x10b0
jmp 0x2fc5
movq -0x38(%rbp), %rdi
callq 0x2d4b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/print.c
// Function: trt
static char * trt(struct _symt * st, size_t id, char * token) {
    char * t = symt_get(st, id);
    if (t == NULL) {
        token = NULL;
        fprintf(stderr, "Unknown token: %s\n", token);
    } else {
        strcpy(token, t);
    }
    return token;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
callq 0x2b5c
testq %rax, %rax
je 0x3242
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1050
movq 0x5daf(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x2e20(%rip), %rsi      # 0x6073
xorl %edx, %edx
xorl %eax, %eax
callq 0x1120
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/draw.c
// Function: fst_draw
int fst_draw(const struct _fst * fst, FILE * fout) {
    struct _state * state;
    struct _arc * arc;

    fprintf(fout, "%s", header);

    for(state_t s=0; s < fst->n_states; ++s) {
        state = &fst->states[s];

        if (!state->final) {
            fprintf(fout, "\t%"PRIu32" [label = \"%"PRIu32"\", shape = circle, style = %s ];\n", 
                s, s, s == fst->start ? "filled" : "solid");
        } else { 
            fprintf(fout, "\t%"PRIu32" [label = \"%"PRIu32"\", shape = doublecircle, style = filled ];\n", 
                s, s);
        }

        for(arc_t a=0; a < state->n_arcs; ++a) {
            arc = &state->arcs[a];
            fprintf(fout,
                "\t\t%"PRIu32" -> %"PRIu32" [ label = \"%"PRIu32":%"PRIu32"/%g\" ];\n",
                s, arc->state, 
                arc->ilabel, arc->olabel, 
                arc->weight);
        } 
    }

    fprintf(fout, "%s", footer);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x315f(%rip), %rdi      # 0x63e2
callq 0x10d0
xorl %r15d, %r15d
movq %r12, -0x30(%rbp)
movl 0x4(%r12), %eax
cmpq %rax, %r15
jae 0x334c
movq 0x10(%r12), %r13
imulq $0x18, %r15, %r14
cmpl $0x0, 0xc(%r13,%r14)
je 0x32c7
movq %rbx, %rdi
leaq 0x3038(%rip), %rsi      # 0x62f0
movl %r15d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x1120
jmp 0x32f7
movl (%r12), %eax
cmpq %rax, %r15
leaq 0x3015(%rip), %r8       # 0x62ea
leaq 0x3007(%rip), %rax      # 0x62e3
cmoveq %rax, %r8
movq %rbx, %rdi
leaq 0x2fc7(%rip), %rsi      # 0x62b1
movl %r15d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x1120
addq %r14, %r13
pushq $0xc
popq %r14
xorl %r12d, %r12d
movl (%r13), %eax
cmpq %rax, %r12
jae 0x3340
movq 0x10(%r13), %rax
movl -0xc(%rax,%r14), %ecx
movl -0x4(%rax,%r14), %r8d
movl (%rax,%r14), %r9d
cvtss2sd -0x8(%rax,%r14), %xmm0
movq %rbx, %rdi
leaq 0x2fff(%rip), %rsi      # 0x632c
movl %r15d, %edx
movb $0x1, %al
callq 0x1120
incq %r12
addq $0x10, %r14
jmp 0x3301
incq %r15
movq -0x30(%rbp), %r12
jmp 0x328f
leaq 0x30c5(%rip), %rdi      # 0x6418
movq %rbx, %rsi
callq 0x10d0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/compose.c
// Function: hash_pair
static size_t hash_pair(void * p) {
    size_t hash = 17;
    hash = hash*31 + ((struct _spair *)p)->a;
    hash = hash*31 + ((struct _spair *)p)->b;
    return hash;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %eax
movl 0x4(%rdi), %ecx
imulq $0x1f, %rax, %rax
addq %rcx, %rax
addq $0x3fd1, %rax           # imm = 0x3FD1
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/shortest.c
// Function: states_cmp
static int states_cmp(const void * a, const void * b) {
    return W[*(state_t*)a] == sr.sum(
                    W[*(state_t*)a],
                    W[*(state_t*)b]
    ) ? 1:0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x5424(%rip), %rax      # 0x9118
movl (%rdi), %ecx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x4(%rbp)
movl (%rsi), %ecx
movss (%rax,%rcx,4), %xmm1
callq *0x53f3(%rip)           # 0x9100
cmpeqss -0x4(%rbp), %xmm0
movd %xmm0, %eax
andl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/match.c
// Function: match_unsorted
void match_unsorted(
                struct _arc * a,
                struct _arc * b,
                arc_t M,
                arc_t N,
                struct _queue * q) 
{
    struct _match_item mi;

    for (arc_t i = 0; i < M; ++i)
        for (arc_t j = 0; j < N; ++j)
            if ( a[i].olabel == b[j].ilabel && _match(a, b, i, j)) {
                mi.a = a[i];
                mi.b = b[j];
                queue_enque(q, &mi);
            }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x48(%rbp)
movq %rdi, -0x30(%rbp)
movl %edx, %eax
movq %rax, -0x40(%rbp)
movl %ecx, %r13d
addq $0x8, %rsi
movq %rsi, -0x38(%rbp)
xorl %ebx, %ebx
cmpq -0x40(%rbp), %rbx
je 0x3dcf
movq %rbx, %r12
shlq $0x4, %r12
addq -0x30(%rbp), %r12
movq -0x38(%rbp), %r15
xorl %r14d, %r14d
cmpq %r14, %r13
je 0x3dca
movl 0xc(%r12), %eax
cmpl (%r15), %eax
jne 0x3dc1
movq -0x30(%rbp), %rdi
movl %ebx, %esi
movl %r14d, %edx
callq 0x3dde
testl %eax, %eax
je 0x3dc1
leaq -0x8(%r15), %rax
movups (%r12), %xmm0
movaps %xmm0, -0x70(%rbp)
movups (%rax), %xmm0
leaq -0x60(%rbp), %rax
movups %xmm0, (%rax)
movq -0x48(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x2c27
incq %r14
addq $0x10, %r15
jmp 0x3d7c
incq %rbx
jmp 0x3d64
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/match.c
// Function: match
static int _match(struct _arc * a, struct _arc * b, arc_t i, arc_t j) {
    label_t al = a[i].olabel; 

    if (al == EPS)
        if ( (i != 0 && j != 0) || (i == 0 && j == 0)) {
            return 0;
        }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
shlq $0x4, %rax
cmpl $0x0, 0xc(%rdi,%rax)
jne 0x3e06
testl %esi, %esi
setne %al
testl %edx, %edx
setne %cl
andb %al, %cl
orl %esi, %edx
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x3e0b
movl $0x1, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/match.c
// Function: match_half_sorted
void match_half_sorted(
                struct _arc * a,
                struct _arc * b,
                arc_t M,
                arc_t N,
                struct _queue * q) 
{
    arc_t l, h, ll, hh;
    arc_t i,m;

    struct _match_item mi;

    for (i=0; i < M; ++i) {
        l = 0;
        h = N-1;
        while ( l <= h ) {
            m = (l + h) >> 1;
            if (a[i].olabel > b[m].ilabel) l = m + 1; 
            else  
                if (a[i].olabel < b[m].ilabel) {
                    if (m == 0) break;  // sentinel for unsigned index h
                    h = m - 1;
                }
                else {
                    ll = hh = m;
                    
                    while ((ll > l) && (a[i].olabel == b[ll-1].ilabel)) --ll;
                    while ((hh < h) && (a[i].olabel == b[hh+1].ilabel)) ++hh;

                    while (ll <= hh ) {
                        mi.a = a[i]; 
                        mi.b = b[ll];
                        if (_match(a, b, i, ll))
                            queue_enque(q, &mi);
                        ++ll;
                    }
                    break;
                }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, -0x50(%rbp)
movl %ecx, -0x2c(%rbp)
movq %rsi, %r15
movl %edx, %eax
movq %rax, -0x58(%rbp)
leaq -0x8(%rsi), %rax
movq %rax, -0x48(%rbp)
leaq 0x18(%rsi), %rax
movq %rax, -0x40(%rbp)
xorl %esi, %esi
cmpq -0x58(%rbp), %rsi
je 0x3f37
movq %rsi, %r13
shlq $0x4, %r13
addq %rdi, %r13
xorl %eax, %eax
movl -0x2c(%rbp), %ecx
movl %ecx, %r9d
movl %r9d, %edx
decl %edx
cmpl %edx, %eax
ja 0x3f2f
leal (%rax,%rdx), %r14d
movl %r14d, %r9d
shrl %r9d
movl 0xc(%r13), %ecx
movq %r9, %r8
shlq $0x4, %r8
cmpl 0x8(%r15,%r8), %ecx
jbe 0x3e8d
incl %r9d
movl %r9d, %eax
jmp 0x3e61
jae 0x3e9a
cmpl $0x2, %r14d
jae 0x3e5c
jmp 0x3f2f
movq %rsi, -0x38(%rbp)
shrl %r14d
movq %r14, %r11
shlq $0x4, %r11
movq -0x48(%rbp), %r8
addq %r11, %r8
movl %r14d, %r9d
movl %r9d, %ebx
cmpl %r9d, %eax
jae 0x3eca
leaq -0x10(%r8), %r10
leal -0x1(%rbx), %r9d
cmpl (%r8), %ecx
movq %r10, %r8
je 0x3eb2
movl %edx, %eax
addq -0x40(%rbp), %r11
movq %r14, %r12
cmpq %rax, %r14
jae 0x3f26
leaq 0x1(%r12), %r14
leaq 0x10(%r11), %rdx
cmpl (%r11), %ecx
movq %rdx, %r11
je 0x3ed0
jmp 0x3f26
movups (%r13), %xmm0
movaps %xmm0, -0x80(%rbp)
movl %ebx, %eax
shlq $0x4, %rax
movups (%r15,%rax), %xmm0
leaq -0x70(%rbp), %rax
movups %xmm0, (%rax)
movq %rdi, %r14
movl %ebx, %edx
callq 0x3dde
testl %eax, %eax
je 0x3f21
movq -0x50(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x2c27
incl %ebx
movq %r14, %rdi
movq -0x38(%rbp), %rsi
cmpl %r12d, %ebx
jbe 0x3eeb
incq %rsi
jmp 0x3e40
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/match.c
// Function: match_half_sorted_rev
void match_half_sorted_rev(
                struct _arc * a,
                struct _arc * b,
                arc_t M,
                arc_t N,
                struct _queue * q) 
{
    arc_t l, h, ll, hh;
    arc_t i,m;

    struct _match_item mi;

    for (i=0; i < N; ++i) {
        l = 0;
        h = M-1;
        while ( l <= h ) {
            m = (l + h) >> 1;
            if (b[i].ilabel > a[m].olabel) l = m + 1; 
            else  
                if (b[i].ilabel < a[m].olabel) {
                    if (m == 0) break;  // sentinel for unsigned index h
                    h = m - 1;
                }
                else {
                    ll = hh = m;
                    
                    while ((ll > l) && (b[i].ilabel == a[ll-1].olabel)) --ll;
                    while ((hh < h) && (b[i].ilabel == a[hh+1].olabel)) ++hh;

                    while (ll <= hh ) {
                        mi.a = a[ll];
                        mi.b = b[i]; 
                        if (_match(a, b, ll, i))
                            queue_enque(q, &mi);
                        ++ll;
                    }
                    break;
                }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, -0x48(%rbp)
movl %edx, -0x2c(%rbp)
movq %rsi, -0x50(%rbp)
movq %rdi, %r12
movl %ecx, %eax
movq %rax, -0x58(%rbp)
leaq -0x4(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq 0x1c(%rdi), %rax
movq %rax, -0x38(%rbp)
xorl %r15d, %r15d
cmpq -0x58(%rbp), %r15
je 0x4063
movq %r15, %r13
shlq $0x4, %r13
addq -0x50(%rbp), %r13
xorl %eax, %eax
movl -0x2c(%rbp), %ecx
movl %ecx, %edi
movl %edi, %edx
decl %edx
cmpl %edx, %eax
ja 0x405b
leal (%rax,%rdx), %esi
movl %esi, %edi
shrl %edi
movl 0x8(%r13), %ecx
movq %rdi, %r8
shlq $0x4, %r8
cmpl 0xc(%r12,%r8), %ecx
jbe 0x3fc5
incl %edi
movl %edi, %eax
jmp 0x3f9e
jae 0x3fd1
cmpl $0x2, %esi
jae 0x3f9a
jmp 0x405b
shrl %esi
movq %rsi, %rdi
shlq $0x4, %rdi
movq -0x40(%rbp), %r8
addq %rdi, %r8
movl %esi, %r9d
movl %r9d, %ebx
cmpl %r9d, %eax
jae 0x3ffc
leaq -0x10(%r8), %r10
leal -0x1(%rbx), %r9d
cmpl (%r8), %ecx
movq %r10, %r8
je 0x3fe4
movl %edx, %eax
addq -0x38(%rbp), %rdi
movq %rsi, %r14
cmpq %rax, %rsi
jae 0x4056
leaq 0x1(%r14), %rsi
leaq 0x10(%rdi), %rdx
cmpl (%rdi), %ecx
movq %rdx, %rdi
je 0x4002
jmp 0x4056
movl %ebx, %eax
shlq $0x4, %rax
movups (%r12,%rax), %xmm0
movaps %xmm0, -0x80(%rbp)
movups (%r13), %xmm0
leaq -0x70(%rbp), %rax
movups %xmm0, (%rax)
movq %r12, %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x3dde
testl %eax, %eax
je 0x4054
movq -0x48(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x2c27
incl %ebx
cmpl %r14d, %ebx
jbe 0x401b
incq %r15
jmp 0x3f7e
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/match.c
// Function: match_full_sorted
void match_full_sorted(
                struct _arc * a,
                struct _arc * b,
                arc_t M,
                arc_t N,
                struct _queue *   q) 
{
    arc_t i = 0; 
    arc_t j = 0; 
    arc_t t;

    struct _match_item mi;

    while (i < M && j < N) {
        if ( a[i].olabel <  b[j].ilabel ) ++i;
        else
            if ( a[i].olabel > b[j].ilabel ) ++j;
            else {
                for (t=j; a[i].olabel == b[t].ilabel; ++t ) {
                    mi.a = a[i]; 
                    mi.b = b[t]; 
                    if (_match(a, b, i, t))
                        queue_enque(q, &mi);
                }
                ++i;
            }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x40(%rbp)
movl %ecx, -0x30(%rbp)
movl %edx, -0x34(%rbp)
leaq 0x8(%rsi), %rcx
xorl %edx, %edx
xorl %r8d, %r8d
movl %edx, %ebx
shlq $0x4, %rbx
addq %rdi, %rbx
movl %r8d, %eax
shlq $0x4, %rax
addq %rcx, %rax
cmpl -0x34(%rbp), %edx
jae 0x4144
cmpl -0x30(%rbp), %r8d
jae 0x4144
movl 0xc(%rbx), %r12d
cmpl (%rax), %r12d
jb 0x413d
jbe 0x40d0
incl %r8d
addq $0x10, %rax
jmp 0x40a9
movl %r8d, %r14d
movq %rcx, -0x50(%rbp)
movl %r8d, -0x2c(%rbp)
movq %rsi, -0x48(%rbp)
movl %r14d, %eax
shlq $0x4, %rax
cmpl 0x8(%rsi,%rax), %r12d
jne 0x413d
addq %rsi, %rax
movups (%rbx), %xmm0
movaps %xmm0, -0x70(%rbp)
movups (%rax), %xmm0
leaq -0x60(%rbp), %rax
movups %xmm0, (%rax)
movq %rdi, %r15
movl %edx, %r13d
movl %edx, %esi
movl %r14d, %edx
callq 0x3dde
testl %eax, %eax
je 0x4126
movq -0x40(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x2c27
movl 0xc(%rbx), %r12d
incl %r14d
movq -0x48(%rbp), %rsi
movq %r15, %rdi
movq -0x50(%rbp), %rcx
movl %r13d, %edx
movl -0x2c(%rbp), %r8d
jmp 0x40df
incl %edx
jmp 0x4096
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/heap.c
// Function: heap_create
struct _heap * heap_create(         heap_cmp cmp, 
                                    size_t item_size, 
                                    size_t init_size,
                                    size_t limit) {
    struct _heap * heap;

    heap = malloc(sizeof(struct _heap));
    heap->n_items = 0;
    heap->item_size = item_size;
    heap->limit = limit;

    heap->cmp = cmp;

    if (limit != 0) {
        heap->n_max = limit + 1; 
    } else {
        if (init_size == 0) 
            heap->n_max = HEAP_INIT_SIZE;
        else 
            heap->n_max = init_size;    
    }

    heap->items = malloc(heap->item_size * heap->n_max); 

    // create lookup hash table to track indexes
    heap->ht = NULL;
    
    return heap;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
pushq $0x38
popq %rdi
callq 0x1150
movq %rax, %r13
andq $0x0, (%rax)
movq %r15, 0x10(%rax)
movq %rbx, 0x18(%rax)
movq %r12, 0x20(%rax)
leaq 0x1(%rbx), %rax
testq %r14, %r14
movl $0xff, %edi
cmovneq %r14, %rdi
testq %rbx, %rbx
cmovneq %rax, %rdi
movq %rdi, 0x8(%r13)
imulq %r15, %rdi
callq 0x1150
movq %rax, 0x30(%r13)
andq $0x0, 0x28(%r13)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/heap.c
// Function: heap_index
struct _hash * heap_index(struct _heap * heap, hash_func hsh, cmp_func hcmp) {
    if (heap->ht != NULL)
        hash_remove(heap->ht);
    
    heap->ht = hash_create( hsh, 
                            hcmp, 
                            heap->item_size,    // key size
                            sizeof(size_t),     // item size
                            heap->n_max         // init size
                        ); 
    
    // lets index all the items 
    for (size_t i = 0;  i < heap->n_items; ++i)
        hash_add(heap->ht, heap->items + i*heap->item_size, &i);
    
    return heap->ht;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x41e9
callq 0x1ddc
movq 0x8(%rbx), %r8
movq 0x10(%rbx), %rdx
pushq $0x8
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1b14
movq %rax, 0x28(%rbx)
xorl %esi, %esi
leaq -0x20(%rbp), %r14
movq %rsi, -0x20(%rbp)
cmpq (%rbx), %rsi
jae 0x4230
movq 0x28(%rbx), %rdi
imulq 0x10(%rbx), %rsi
addq 0x30(%rbx), %rsi
movq %r14, %rdx
callq 0x1c3c
movq -0x20(%rbp), %rsi
incq %rsi
jmp 0x4209
movq 0x28(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/heap.c
// Function: heap_remove
void heap_remove(struct _heap * heap) {
    assert( heap != NULL ); 
    assert( heap->items != NULL );

    if (heap->ht != NULL) {
        hash_remove(heap->ht);
    }

    free(heap->items);
    free(heap); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x427e
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x4297
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x426b
movq %rax, %rdi
callq 0x1ddc
movq 0x30(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1030
leaq 0x21ff(%rip), %rdi      # 0x6484
leaq 0x2205(%rip), %rsi      # 0x6491
leaq 0x2209(%rip), %rcx      # 0x649c
pushq $0x5f
jmp 0x42ae
leaq 0x221f(%rip), %rdi      # 0x64bd
leaq 0x21ec(%rip), %rsi      # 0x6491
leaq 0x21f0(%rip), %rcx      # 0x649c
pushq $0x60
popq %rdx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/c0stya[P]fslib/src/heap.c
// Function: heap_pop
void * heap_pop(struct _heap * heap, void * item) {
    char * items = heap->items;
    size_t s = heap->item_size;

    if (heap->n_items == 0)
        return NULL; 

    // get top node 
    memcpy(item, items, s);
    --heap->n_items;

    // if still not empty - move tail to head
    if (heap->n_items > 0) {
        memcpy(items, items + heap->n_items * s, s);
        // index
        size_t i=0;
        if (heap->ht != NULL)  
            hash_add(heap->ht, items, &i);
    }

    // heapify if more than 1
    if (heap->n_items > 1)
        heap_heapify(heap, 0);

    return item;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, (%rdi)
je 0x432e
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %r12
movq 0x30(%rdi), %r15
movq %rsi, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1140
movq (%r14), %rsi
decq %rsi
movq %rsi, (%r14)
je 0x4330
imulq %r12, %rsi
addq %r15, %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x1140
andq $0x0, -0x28(%rbp)
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x431c
leaq -0x28(%rbp), %rdx
movq %r15, %rsi
callq 0x1c3c
cmpq $0x2, (%r14)
jb 0x4330
movq %r14, %rdi
xorl %esi, %esi
callq 0x4340
jmp 0x4330
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq