LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x4624
movq %rdi, %rbx
cmpq $0x0, 0x30(%rdi)
je 0x4643
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x460d
callq 0x1f45
movq 0x30(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1030
leaq 0x1e59(%rip), %rdi      # 0x6484
leaq 0x1e5f(%rip), %rsi      # 0x6491
leaq 0x1e63(%rip), %rcx      # 0x649c
movl $0x5f, %edx
callq 0x10c0
leaq 0x1e73(%rip), %rdi      # 0x64bd
leaq 0x1e40(%rip), %rsi      # 0x6491
leaq 0x1e44(%rip), %rcx      # 0x649c
movl $0x60, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O1/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 0x46df
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 0x46cd
imulq %r12, %rsi
addq %r15, %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x1140
movq $0x0, -0x28(%rbp)
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x46cd
leaq -0x28(%rbp), %rdx
movq %r15, %rsi
callq 0x1d8e
cmpq $0x2, (%r14)
jb 0x46e1
movq %r14, %rdi
xorl %esi, %esi
callq 0x46f1
jmp 0x46e1
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/heap.c
// Function: heap_heapify
void heap_heapify(struct _heap * heap, size_t i) {
    char * items = heap->items;
    size_t s = heap->item_size;

    size_t l, r, mx;
    int done = 0;

    assert( i < heap->n_items );

    while (!done) {
        l = HEAP_LEFT(i);
        r = HEAP_RIGHT(i);

        mx = ( l < heap->n_items && heap->cmp(items + l*s, items + i*s)) 
            ?  l : i;  
        mx = ( r < heap->n_items && heap->cmp(items + r*s, items + mx*s)) 
            ? r : mx;
        
        if (mx != i) {
            heap_items_swap(heap, i, mx);
            i = mx;
        } else {
            done=1;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq %rsi, (%rdi)
jbe 0x47b7
movq %rsi, %r12
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq %rax, -0x38(%rbp)
movq 0x10(%rdi), %r13
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
leaq 0x1(,%r12,2), %r14
cmpq (%rbx), %r14
jae 0x474e
movq %r14, %rdi
imulq %r13, %rdi
movq -0x38(%rbp), %rax
addq %rax, %rdi
movq %r12, %rsi
imulq %r13, %rsi
addq %rax, %rsi
callq *0x20(%rbx)
testl %eax, %eax
jne 0x4751
movq %r12, %r14
leaq 0x2(,%r12,2), %r15
cmpq (%rbx), %r15
jae 0x477d
movq %r15, %rdi
imulq %r13, %rdi
movq -0x38(%rbp), %rax
addq %rax, %rdi
movq %r14, %rsi
imulq %r13, %rsi
addq %rax, %rsi
callq *0x20(%rbx)
testl %eax, %eax
jne 0x4780
movq %r14, %r15
cmpq %r12, %r15
jne 0x478c
movl $0x1, %eax
jmp 0x47a0
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x47d6
movq %r15, %r12
movl -0x2c(%rbp), %eax
testl %eax, %eax
je 0x471f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d13(%rip), %rdi      # 0x64d1
leaq 0x1ccc(%rip), %rsi      # 0x6491
leaq 0x1d17(%rip), %rcx      # 0x64e3
movl $0x97, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/heap.c
// Function: heap_items_swap
static void heap_items_swap(struct _heap * heap, size_t i, size_t j) {
    char * items = heap->items;
    size_t s = heap->item_size;
    char * tmp = malloc(s);

    memcpy(tmp, items + i*s, s);
    memcpy(items + i*s, items + j*s, s);
    memcpy(items + j*s, tmp, s);

    // index
    if (heap->ht != NULL) {
        hash_add(heap->ht, items + i*s, &i);
        hash_add(heap->ht, items + j*s, &j);
    }
    
    free(tmp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movq %rsi, -0x40(%rbp)
movq %rdx, -0x30(%rbp)
movq 0x10(%rdi), %r14
movq 0x30(%rdi), %r15
movq %r14, %rdi
callq 0x1150
movq %rax, -0x38(%rbp)
imulq %r14, %r13
addq %r15, %r13
movq %rax, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1140
imulq %r14, %r12
addq %r15, %r12
movq %r13, %rdi
movq %r12, %rsi
movq -0x38(%rbp), %r12
movq %r14, %rdx
callq 0x1140
movq -0x30(%rbp), %rdi
imulq %r14, %rdi
addq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1140
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x4883
leaq -0x40(%rbp), %rdx
movq (%rdx), %rsi
imulq %r14, %rsi
addq %r15, %rsi
callq 0x1d8e
movq 0x28(%rbx), %rdi
leaq -0x30(%rbp), %rdx
imulq (%rdx), %r14
addq %r15, %r14
movq %r14, %rsi
callq 0x1d8e
movq %r12, %rdi
callq 0x1030
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/heap.c
// Function: heap_insert
void heap_insert(struct _heap * heap, void * item) {
    size_t s = heap->item_size;

    if (heap->limit == 0 && heap->n_max == heap->n_items) {
        heap->n_max *= HEAP_RESIZE_FACTOR;
        heap->items = realloc(heap->items, heap->n_max * s);
    }

    // move to tail
    memcpy(heap->items + heap->n_items * s, item, s);

    // index
    if (heap->ht != NULL) 
        hash_add(heap->ht, item, &heap->n_items);

    /* 

    A little trick here:
    we invoke heap_update with NULL to specify
    that we don't need an assignment and value check.

    */

    if (heap->limit == 0 || heap->n_items < heap->limit) {
        heap_update(heap, NULL, heap->n_items++);
    } else {
        heap_delete_max(heap);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %r15
cmpq $0x0, 0x18(%rdi)
jne 0x48da
movq 0x8(%rbx), %rsi
cmpq (%rbx), %rsi
jne 0x48da
addq %rsi, %rsi
movq %rsi, 0x8(%rbx)
movq 0x30(%rbx), %rdi
imulq %r15, %rsi
callq 0x1170
movq %rax, 0x30(%rbx)
movq (%rbx), %rdi
imulq %r15, %rdi
addq 0x30(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1140
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x4904
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1d8e
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x4915
movq (%rbx), %rsi
cmpq %rax, %rsi
jae 0x4937
movq (%rbx), %rdx
leaq 0x1(%rdx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x49de
movq 0x10(%rbx), %r15
movq 0x30(%rbx), %r14
movq $0x0, -0x30(%rbp)
leaq -0x1(%rsi), %rax
cmpq $-0x3, %rax
ja 0x4986
leaq (%r14,%r15), %r12
movl $0x1, %r13d
movq -0x30(%rbp), %rdi
imulq %r15, %rdi
addq %r14, %rdi
movq %r12, %rsi
callq *0x20(%rbx)
testl %eax, %eax
je 0x4974
movq %r13, -0x30(%rbp)
incq %r13
movq (%rbx), %rsi
leaq 0x1(%rsi), %rax
addq %r15, %r12
cmpq %rax, %r13
jb 0x495b
movq -0x30(%rbp), %rdi
cmpq %rsi, %rdi
je 0x49cf
imulq %r15, %rdi
addq %r14, %rdi
imulq %r15, %rsi
addq %r14, %rsi
movq %r15, %rdx
callq 0x1140
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x49c1
leaq -0x30(%rbp), %rdx
imulq (%rdx), %r15
addq %r15, %r14
movq %r14, %rsi
callq 0x1d8e
movq -0x30(%rbp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x49de
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/heap.c
// Function: heap_update
void heap_update(struct _heap * heap, void * item, size_t i) { 
    char * items = heap->items;
    size_t s = heap->item_size;
    size_t j;
    
    // remove assertion for equality
    assert ( i < heap->n_items );

    if (item != NULL) {  // if invoked directly
        // check if we reducing the priority and 
        // not increasing it
        assert( heap->cmp(item, items + i*s) );
        memcpy(items + i*s, item, s);

        // index
        if (heap->ht != NULL) 
            hash_add(heap->ht, item, &i);
    }

    while (i > 0 && heap->cmp(items + i*s, items + HEAP_PARENT(i)*s)) {
        j = HEAP_PARENT(i);
        heap_items_swap(heap, i, j);

        i = j;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, -0x28(%rbp)
cmpq %rdx, (%rdi)
jbe 0x4aaa
movq %rsi, %r15
movq %rdi, %rbx
movq 0x30(%rdi), %r12
movq 0x10(%rdi), %r14
testq %rsi, %rsi
je 0x4a50
imulq %r14, %rdx
addq %r12, %rdx
movq %r15, %rdi
movq %rdx, %rsi
callq *0x20(%rbx)
testl %eax, %eax
je 0x4ac9
movq -0x28(%rbp), %rdi
imulq %r14, %rdi
addq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1140
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x4a50
leaq -0x28(%rbp), %rdx
movq %r15, %rsi
callq 0x1d8e
movq -0x28(%rbp), %r15
testq %r15, %r15
je 0x4a9d
movq %r15, %rdi
imulq %r14, %rdi
addq %r12, %rdi
incq %r15
shrq %r15
decq %r15
imulq %r14, %r15
addq %r12, %r15
movq %r15, %rsi
callq *0x20(%rbx)
testl %eax, %eax
je 0x4a9d
movq -0x28(%rbp), %rsi
leaq 0x1(%rsi), %r15
shrq %r15
leaq -0x1(%r15), %rdx
movq %rbx, %rdi
callq 0x47d6
decq %r15
movq %r15, -0x28(%rbp)
jne 0x4a59
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1a20(%rip), %rdi      # 0x64d1
leaq 0x19d9(%rip), %rsi      # 0x6491
leaq 0x1a4e(%rip), %rcx      # 0x650d
movl $0xee, %edx
callq 0x10c0
leaq 0x1a6e(%rip), %rdi      # 0x653e
leaq 0x19ba(%rip), %rsi      # 0x6491
leaq 0x1a2f(%rip), %rcx      # 0x650d
movl $0xf3, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/iter.c
// Function: fst_iter_create
struct _fst_iter * fst_iter_create(const struct _fst * fst) {
    struct _fst_iter * iter;
    iter = malloc(sizeof(struct _fst_iter));
    iter->fst = fst;
    iter->state = fst->start;
    iter->marked = bitset_create(fst->n_states);
    iter->queue = queue_create(sizeof(state_t));

    queue_enque(iter->queue, &iter->state);
    bitset_set(iter->marked, iter->state);

    return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x20, %edi
callq 0x1150
movq %rax, %rbx
movq %r14, (%rax)
movl (%r14), %eax
leaq 0x18(%rbx), %r15
movl %eax, 0x18(%rbx)
movl 0x4(%r14), %edi
callq 0x2f3c
movq %rax, 0x8(%rbx)
movl $0x4, %edi
callq 0x2dc4
movq %rax, 0x10(%rbx)
movq %rax, %rdi
movq %r15, %rsi
callq 0x2df0
movq 0x8(%rbx), %rdi
movl 0x18(%rbx), %esi
callq 0x2fe3
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/iter.c
// Function: fst_iter_remove
void fst_iter_remove(struct _fst_iter * iter) {
    bitset_remove(iter->marked); 
    queue_remove(iter->queue);
    iter->fst = NULL;
    free(iter);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x2fc4
movq 0x10(%rbx), %rdi
callq 0x2f1e
movq $0x0, (%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/iter.c
// Function: fst_iter_next
state_t fst_iter_next(struct _fst_iter * iter) {
    struct _arc * arc;
    struct _state * state;
    state_t s;
    arc_t a;
    
    if((queue_deque(iter->queue, &s)) != NULL) {
        iter->state = s; 
        state = &iter->fst->states[s]; 
        for(a=0; a < state->n_arcs; ++a) {
            arc = &state->arcs[a];
            if (bitset_get(iter->marked, arc->state) == 0) {
                queue_enque(iter->queue, &arc->state);
                bitset_set(iter->marked, arc->state);
            }
        }
    } else {
        iter->state = -1;
    }

    return iter->state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2e74
testq %rax, %rax
je 0x4c34
movl -0x2c(%rbp), %ecx
movl %ecx, 0x18(%rbx)
movq (%rbx), %rax
movq 0x10(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
cmpl $0x0, (%rax,%rcx,8)
je 0x4c3b
leaq (%rax,%rcx,8), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x10(%r15), %r14
movq 0x8(%rbx), %rdi
movl (%r14,%r12), %esi
callq 0x3029
testl %eax, %eax
jne 0x4c23
addq %r12, %r14
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x2df0
movq 0x8(%rbx), %rdi
movl (%r14), %esi
callq 0x2fe3
incq %r13
movl (%r15), %eax
addq $0x10, %r12
cmpq %rax, %r13
jb 0x4bf3
jmp 0x4c3b
movl $0xffffffff, 0x18(%rbx) # imm = 0xFFFFFFFF
movl 0x18(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/test.c
// Function: assert_arc_equal
void assert_arc_equal(const struct _arc * arc_a, const struct _arc * arc_b) {
    assert ( arc_a->state == arc_b->state ); 
    assert ( arc_a->ilabel == arc_b->ilabel ); 
    assert ( arc_a->olabel == arc_b->olabel ); 
    assert ( arc_a->weight == arc_b->weight ); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %eax
cmpl (%rsi), %eax
jne 0x4c85
movl 0x8(%rdi), %eax
cmpl 0x8(%rsi), %eax
jne 0x4ca4
movl 0xc(%rdi), %eax
cmpl 0xc(%rsi), %eax
jne 0x4cc3
movss 0x4(%rdi), %xmm0
ucomiss 0x4(%rsi), %xmm0
jne 0x4ce2
jp 0x4ce2
popq %rbp
retq
leaq 0x1912(%rip), %rdi      # 0x659e
leaq 0x1928(%rip), %rsi      # 0x65bb
leaq 0x192c(%rip), %rcx      # 0x65c6
movl $0x7, %edx
callq 0x10c0
leaq 0x195b(%rip), %rdi      # 0x6606
leaq 0x1909(%rip), %rsi      # 0x65bb
leaq 0x190d(%rip), %rcx      # 0x65c6
movl $0x8, %edx
callq 0x10c0
leaq 0x195b(%rip), %rdi      # 0x6625
leaq 0x18ea(%rip), %rsi      # 0x65bb
leaq 0x18ee(%rip), %rcx      # 0x65c6
movl $0x9, %edx
callq 0x10c0
leaq 0x195b(%rip), %rdi      # 0x6644
leaq 0x18cb(%rip), %rsi      # 0x65bb
leaq 0x18cf(%rip), %rcx      # 0x65c6
movl $0xa, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/test.c
// Function: assert_fst_equal
void assert_fst_equal(const struct _fst * a, const struct _fst * b) {
    struct _state * state_a; 
    struct _state * state_b; 

    struct _arc * arc_a; 
    struct _arc * arc_b; 

    assert (a->start ==     b->start);
    assert (a->sr_type ==   b->sr_type);
    assert (a->n_states ==  b->n_states);
    
    for (state_t st = 0; st < a->n_states && st < b->n_states; ++st) {

        state_a = &a->states[st];
        state_b = &b->states[st];
        
        assert( state_a->n_arcs == state_b->n_arcs );
        assert_state_equal( state_a, state_b );

        for (arc_t arc = 0; 
                    arc < state_a->n_arcs && arc < state_b->n_arcs; 
                    ++arc) {
            arc_a = &state_a->arcs[arc];
            arc_b = &state_b->arcs[arc];

            assert_arc_equal( arc_a, arc_b );
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl (%rdi), %eax
cmpl (%rsi), %eax
jne 0x4e41
movb 0xc(%rdi), %al
cmpb 0xc(%rsi), %al
jne 0x4e60
movl 0x4(%rdi), %eax
cmpl 0x4(%rsi), %eax
jne 0x4e7f
cmpl $0x0, 0x4(%rdi)
je 0x4df4
xorl %r15d, %r15d
movq %rsi, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
cmpl 0x4(%rsi), %r15d
jae 0x4df4
movq 0x10(%rdi), %r12
movl %r15d, %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
movq 0x10(%rsi), %r13
movl (%r12,%rax), %ecx
cmpl (%r13,%rax), %ecx
jne 0x4e03
addq %rax, %r12
addq %rax, %r13
movl 0xc(%r12), %eax
cmpl 0xc(%r13), %eax
jne 0x4e22
cmpl $0x0, (%r12)
je 0x4de3
xorl %ebx, %ebx
xorl %r14d, %r14d
movl (%r13), %eax
cmpq %rax, %r14
jae 0x4de3
movq 0x10(%r12), %rdi
addq %rbx, %rdi
movq 0x10(%r13), %rsi
addq %rbx, %rsi
callq 0x4c5c
incq %r14
movl (%r12), %eax
addq $0x10, %rbx
cmpq %rax, %r14
jb 0x4db6
incl %r15d
movq -0x30(%rbp), %rdi
cmpl 0x4(%rdi), %r15d
movq -0x38(%rbp), %rsi
jb 0x4d75
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1949(%rip), %rdi      # 0x6753
leaq 0x17aa(%rip), %rsi      # 0x65bb
leaq 0x18c7(%rip), %rcx      # 0x66df
movl $0x23, %edx
callq 0x10c0
leaq 0x183a(%rip), %rdi      # 0x6663
leaq 0x178b(%rip), %rsi      # 0x65bb
leaq 0x184d(%rip), %rcx      # 0x6684
movl $0x10, %edx
callq 0x10c0
leaq 0x1882(%rip), %rdi      # 0x66ca
leaq 0x176c(%rip), %rsi      # 0x65bb
leaq 0x1889(%rip), %rcx      # 0x66df
movl $0x1a, %edx
callq 0x10c0
leaq 0x18b8(%rip), %rdi      # 0x671f
leaq 0x174d(%rip), %rsi      # 0x65bb
leaq 0x186a(%rip), %rcx      # 0x66df
movl $0x1b, %edx
callq 0x10c0
leaq 0x18b2(%rip), %rdi      # 0x6738
leaq 0x172e(%rip), %rsi      # 0x65bb
leaq 0x184b(%rip), %rcx      # 0x66df
movl $0x1c, %edx
callq 0x10c0
nop
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/trim.c
// Function: fst_close
void fst_close(struct _fst * fst, struct _queue * finals) {
    /*
    This methods replace multiple final states with
    a single final state. 

    */
    if ( finals->n_items < 2)
        return;    

    struct _state * state;
    struct _sr sr = sr_get(fst->sr_type); 
    state_t final;
    state_t s;

    final = fst_add_state(fst);
    fst_set_final(fst, final, sr.one);


    while(queue_deque(finals, &s) != NULL) {
        state = &fst->states[s];
        state->final = 0;
        fst_add_arc(    fst,
                        s,
                        final,
                        EPS,
                        EPS,
                        state->weight);
    }
}

// Assembly:
cmpq $0x2, 0x18(%rsi)
jb 0x4f49
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl 0xc(%rdi), %esi
leaq -0x40(%rbp), %r12
movq %r12, %rdi
callq 0x20d8
movq %r14, %rdi
callq 0x2131
movl %eax, %r15d
movss 0x14(%r12), %xmm0
movq %r14, %rdi
movl %eax, %esi
callq 0x2294
leaq -0x24(%rbp), %rsi
movq %rbx, %rdi
callq 0x2e74
testq %rax, %rax
je 0x4f3d
leaq -0x24(%rbp), %r12
movq 0x10(%r14), %rax
movl -0x24(%rbp), %ecx
leaq (%rcx,%rcx,2), %rcx
movl $0x0, 0xc(%rax,%rcx,8)
movl -0x24(%rbp), %esi
movss 0x8(%rax,%rcx,8), %xmm0
movq %r14, %rdi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2185
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2e74
testq %rax, %rax
jne 0x4f01
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/trim.c
// Function: fst_reverse
void fst_reverse(struct _fst * fst) {
    struct _sr sr = sr_get(fst->sr_type); 
    struct _state * state;
    struct _arc * arc;
    struct _fst * orig = fst_create();
    state_t s;
    state_t start_s = fst->start;

    fst_copy(fst, orig);

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

        // 'delete' arcs from each of the automaton states
        state->n_arcs = 0;
       
        // change start to final 
        // NOTE: fst should have only 1 start state
        if (state->final) {
            fst->start = s;
            state->final = 0;
        }
    }

    // set start as final
    fst_set_final(fst, start_s, sr.one);

    // add reversed arcs to the automaton
    for(s=0; s < orig->n_states; ++s) {
        state = &orig->states[s];         

        for(arc_t a=0; a < state->n_arcs; ++a) { 
            arc = &state->arcs[a];
            fst_add_arc(    fst, 
                            arc->state, 
                            s, 
                            arc->ilabel, 
                            arc->olabel, 
                            arc->weight);
        }
    }

    fst_remove(orig);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movzbl 0xc(%rdi), %esi
leaq -0x48(%rbp), %rdi
callq 0x20d8
xorl %eax, %eax
callq 0x2114
movq %rax, %r14
movl (%rbx), %r15d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x270b
movl 0x4(%rbx), %eax
testq %rax, %rax
je 0x4fb5
movq 0x10(%rbx), %rcx
addq $0xc, %rcx
xorl %edx, %edx
movl $0x0, -0xc(%rcx)
cmpl $0x0, (%rcx)
je 0x4fa9
movl %edx, (%rbx)
movl $0x0, (%rcx)
incq %rdx
addq $0x18, %rcx
cmpq %rdx, %rax
jne 0x4f95
movss -0x34(%rbp), %xmm0
movq %rbx, %rdi
movl %r15d, %esi
callq 0x2294
cmpl $0x0, 0x4(%r14)
je 0x5033
xorl %r15d, %r15d
movq %r14, -0x30(%rbp)
movq 0x10(%r14), %rax
leaq (%r15,%r15,2), %rcx
cmpl $0x0, (%rax,%rcx,8)
je 0x5023
leaq (%rax,%rcx,8), %r12
movl $0xc, %r13d
xorl %r14d, %r14d
movq 0x10(%r12), %rax
movl -0xc(%rax,%r13), %esi
movl -0x4(%rax,%r13), %ecx
movl (%rax,%r13), %r8d
movss -0x8(%rax,%r13), %xmm0
movq %rbx, %rdi
movl %r15d, %edx
callq 0x2185
incq %r14
movl (%r12), %eax
addq $0x10, %r13
cmpq %rax, %r14
jb 0x4fee
incq %r15
movq -0x30(%rbp), %r14
movl 0x4(%r14), %eax
cmpq %rax, %r15
jb 0x4fd3
movq %r14, %rdi
callq 0x2212
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/trim.c
// Function: fst_rm_states
struct _fst * fst_rm_states(struct _fst * fst, struct _bitset * mask) {
    struct _state * state;
    struct _arc * arc;

    state_t idx[sizeof(state_t) * fst->n_states];

    state_t shift = 0;

    for(state_t s=0; s < fst->n_states; ++s) {
        if (bitset_get(mask, s) ) {
            ++shift;
        }
        else {
            idx[s] = shift;
            fst->states[s - shift] = fst->states[s];
        }
    } 

    fst->n_states -= shift;

    // TODO: do not forget to clean up arcs of removed states

    // fix arc's destination state id
    for(state_t s=0; s < fst->n_states; ++s) {
        state = &fst->states[s];

        arc_t sh = 0;
        
        for(arc_t a=0; a < state->n_arcs; ++a) {
            arc = &state->arcs[a];
            arc->state -= idx[arc->state];

            // found link to non-existing state
            if (arc->state >= fst->n_states) {
                ++sh;
            } else {
                state->arcs[a - sh] = state->arcs[a];
            }
        }
        
        state->n_arcs -= sh;
    }

    return fst;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, -0x30(%rbp)
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movq %rsp, %r12
movq %rax, %rcx
shlq $0x4, %rcx
subq %rcx, %r12
movq %r12, %rsp
testq %rax, %rax
je 0x50cb
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %r13d, %r13d
movq -0x30(%rbp), %rdi
movl %r15d, %esi
callq 0x3029
testl %eax, %eax
je 0x5095
incl %r13d
jmp 0x50ba
movl %r13d, (%r12,%r15,4)
movq 0x10(%rbx), %rax
movl %r15d, %ecx
subl %r13d, %ecx
leaq (%rcx,%rcx,2), %rcx
movq 0x10(%rax,%r14), %rdx
movq %rdx, 0x10(%rax,%rcx,8)
movups (%rax,%r14), %xmm0
movups %xmm0, (%rax,%rcx,8)
incq %r15
movl 0x4(%rbx), %eax
addq $0x18, %r14
cmpq %rax, %r15
jb 0x5080
jmp 0x50ce
xorl %r13d, %r13d
subl %r13d, %eax
movl %eax, 0x4(%rbx)
je 0x514b
xorl %eax, %eax
movq 0x10(%rbx), %rcx
leaq (%rax,%rax,2), %rdx
leaq (%rcx,%rdx,8), %rcx
movl (%rcx), %r8d
movl $0x0, %edx
testl %r8d, %r8d
je 0x513a
xorl %esi, %esi
xorl %edi, %edi
xorl %edx, %edx
movq 0x10(%rcx), %r8
movl (%r8,%rsi), %r9d
movl (%r12,%r9,4), %r10d
subl %r10d, %r9d
movl %r9d, (%r8,%rsi)
cmpl 0x4(%rbx), %r9d
jae 0x5129
leaq (%r8,%rsi), %r9
movl %edi, %r10d
subl %edx, %r10d
shlq $0x4, %r10
movups (%r9), %xmm0
movups %xmm0, (%r8,%r10)
jmp 0x512b
incl %edx
incq %rdi
movl (%rcx), %r8d
addq $0x10, %rsi
cmpq %r8, %rdi
jb 0x50f7
subl %edx, %r8d
movl %r8d, (%rcx)
incq %rax
movl 0x4(%rbx), %ecx
cmpq %rcx, %rax
jb 0x50d8
movq %rbx, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c0stya[P]fslib/src/trim.c
// Function: fst_trim
struct _fst * fst_trim(struct _fst * fst) {
    struct _queue * finals = queue_create(sizeof(state_t));

    /*
    Before trimming check that we have at least one final states.
    If not then all the states are not co-accessible and
    there resulting automaton should be empty.
    */

    fst_get_finals(fst, finals);

    if (finals->n_items == 0) {
        fst_empty(fst);
         
    } else { 

        if (finals->n_items > 1) {
            fst_close(fst, finals);
        }

        /* 
        First lets traverse it directly and remove
        all the unreachable states    
        */

        struct _fst_iter * iter = fst_iter_create(fst);
        while ( fst_iter_next(iter) != -1 ) 
            ;
        
        /* 
        Then inverse the arcs and traverse starting
        from the final states of the original transducer
        
        NOTE: we should refresh finals queue
        */

        fst_reverse(fst);

        struct _fst_iter * iter_rev = fst_iter_create(fst);
        while ( fst_iter_next(iter_rev) != -1 ) 
            ;

        /* Reverse it back */
        fst_reverse(fst);

        /* Remove non accessible and non coacessible states */

        bitset_intersect(iter->marked, iter_rev->marked);

        bitset_toggle_all(iter->marked);

        //fst_rm_states(fst, bitset_toggle_all(iter->marked));
        fst_rm_states(fst, iter->marked);


        fst_iter_remove(iter_rev);
        fst_iter_remove(iter);
    }

    queue_remove(finals);

    return fst;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x4, %edi
callq 0x2dc4
movq %rax, %r14
movl $0x0, -0x24(%rbp)
cmpl $0x0, 0x4(%rbx)
je 0x51b8
xorl %eax, %eax
leaq -0x24(%rbp), %r15
movq 0x10(%rbx), %rcx
movl %eax, %eax
leaq (%rax,%rax,2), %rax
cmpl $0x0, 0xc(%rcx,%rax,8)
je 0x51ab
movq %r14, %rdi
movq %r15, %rsi
callq 0x2df0
movl -0x24(%rbp), %eax
incl %eax
movl %eax, -0x24(%rbp)
cmpl 0x4(%rbx), %eax
jb 0x518f
movq 0x18(%r14), %rax
cmpq $0x1, %rax
je 0x51d9
movq %rbx, %rdi
testq %rax, %rax
jne 0x51d1
callq 0x222e
jmp 0x524c
movq %r14, %rsi
callq 0x4ea0
movq %rbx, %rdi
callq 0x4b18
movq %rax, %r15
movq %r15, %rdi
callq 0x4baf
cmpl $-0x1, %eax
jne 0x51e4
movq %rbx, %rdi
callq 0x4f4a
movq %rbx, %rdi
callq 0x4b18
movq %rax, %r12
movq %r12, %rdi
callq 0x4baf
cmpl $-0x1, %eax
jne 0x5204
movq %rbx, %rdi
callq 0x4f4a
movq 0x8(%r15), %rdi
movq 0x8(%r12), %rsi
callq 0x30bb
movq 0x8(%r15), %rdi
callq 0x3108
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x504a
movq %r12, %rdi
callq 0x4b7f
movq %r15, %rdi
callq 0x4b7f
movq %r14, %rdi
callq 0x2f1e
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/kthread.c
// Function: kt_for
void kt_for(int n_threads, void (*func)(void*,long,int), void *data, long n)
{
	int i;
	kt_for_t t;
	pthread_t *tid;
	t.func = func, t.data = data, t.n_threads = n_threads, t.n = n;
	t.w = (ktf_worker_t*)alloca(n_threads * sizeof(ktf_worker_t));
	tid = (pthread_t*)alloca(n_threads * sizeof(pthread_t));
	for (i = 0; i < n_threads; ++i)
		t.w[i].t = &t, t.w[i].i = i;
	for (i = 0; i < n_threads; ++i) pthread_create(&tid[i], 0, ktf_worker, &t.w[i]);
	for (i = 0; i < n_threads; ++i) pthread_join(tid[i], 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movl %edi, -0x58(%rbp)
movq %rcx, -0x50(%rbp)
movslq %edi, %rcx
movq %rcx, %rdx
shlq $0x4, %rdx
movq %rsp, %rax
subq %rdx, %rax
movq %rax, %rsp
movq %rax, -0x48(%rbp)
movq %rsp, %r12
leaq 0xf(,%rcx,8), %rdx
andq $-0x10, %rdx
subq %rdx, %r12
movq %r12, %rsp
movl %edi, %ebx
testl %ecx, %ecx
jle 0x241b
addq $0x8, %rax
xorl %ecx, %ecx
leaq -0x58(%rbp), %rdx
movq %rdx, -0x8(%rax)
movq %rcx, (%rax)
incq %rcx
addq $0x10, %rax
cmpq %rcx, %rbx
jne 0x2408
movl %edi, -0x2c(%rbp)
testl %edi, %edi
jle 0x2454
movq %rbx, %r13
shlq $0x4, %r13
xorl %r14d, %r14d
movq %r12, %r15
movq -0x48(%rbp), %rcx
addq %r14, %rcx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x3d(%rip), %rdx        # 0x247f
callq 0x21f0
addq $0x10, %r14
addq $0x8, %r15
cmpq %r14, %r13
jne 0x242f
cmpl $0x0, -0x2c(%rbp)
jle 0x2470
xorl %r14d, %r14d
movq (%r12,%r14,8), %rdi
xorl %esi, %esi
callq 0x2260
incq %r14
cmpq %r14, %rbx
jne 0x245d
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/kthread.c
// Function: ktf_worker
static void *ktf_worker(void *data)
{
	ktf_worker_t *w = (ktf_worker_t*)data;
	long i;
	for (;;) {
		i = __sync_fetch_and_add(&w->i, w->t->n_threads);
		if (i >= w->t->n) break;
		w->t->func(w->t->data, i, w - w->t->w);
	}
	while ((i = steal_work(w->t)) >= 0)
		w->t->func(w->t->data, i, w - w->t->w);
	pthread_exit(0);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movslq (%rax), %rsi
lock
xaddq %rsi, 0x8(%rdi)
movq (%rdi), %rax
cmpq 0x8(%rax), %rsi
jge 0x24d0
movq 0x20(%rax), %rdi
movq %rbx, %rdx
subq 0x10(%rax), %rdx
shrq $0x4, %rdx
callq *0x18(%rax)
movq (%rbx), %rax
movslq (%rax), %rsi
lock
xaddq %rsi, 0x8(%rbx)
movq (%rbx), %rax
jmp 0x2492
movq (%rbx), %rax
movq 0x20(%rax), %rdi
movq %rbx, %rdx
subq 0x10(%rax), %rdx
shrq $0x4, %rdx
callq *0x18(%rax)
movq (%rbx), %rcx
movslq (%rcx), %rax
movq $-0x1, %rsi
movq $-0x1, %rdx
testq %rax, %rax
jle 0x2520
movq 0x10(%rcx), %rdx
addq $0x8, %rdx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movabsq $0x7fffffffffffffff, %r8 # imm = 0x7FFFFFFFFFFFFFFF
xorl %r9d, %r9d
movq (%rdx), %r10
cmpq %r10, %r8
cmovgl %r9d, %edi
cmovgeq %r10, %r8
incq %r9
addq $0x10, %rdx
cmpq %r9, %rax
jne 0x2503
movslq %edi, %rdx
movq 0x10(%rcx), %rdi
shlq $0x4, %rdx
lock
xaddq %rax, 0x8(%rdi,%rdx)
cmpq 0x8(%rcx), %rax
cmovlq %rax, %rsi
testq %rsi, %rsi
jns 0x24bb
xorl %edi, %edi
callq 0x21b0
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/kthread.c
// Function: kt_pipeline
void kt_pipeline(int n_threads, void *(*func)(void*, int, void*), void *shared_data, int n_steps)
{
	ktp_t aux;
	pthread_t *tid;
	int i;

	if (n_threads < 1) n_threads = 1;
	aux.n_workers = n_threads;
	aux.n_steps = n_steps;
	aux.func = func;
	aux.shared = shared_data;
	pthread_mutex_init(&aux.mutex, 0);
	pthread_cond_init(&aux.cv, 0);

	aux.workers = alloca(n_threads * sizeof(ktp_worker_t));
	for (i = 0; i < n_threads; ++i) {
		ktp_worker_t *w = &aux.workers[i];
		w->step = w->running = 0; w->pl = &aux; w->data = 0;
	}

	tid = alloca(n_threads * sizeof(pthread_t));
	for (i = 0; i < n_threads; ++i) pthread_create(&tid[i], 0, ktp_worker, &aux.workers[i]);
	for (i = 0; i < n_threads; ++i) pthread_join(tid[i], 0);

	pthread_mutex_destroy(&aux.mutex);
	pthread_cond_destroy(&aux.cv);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
cmpl $0x2, %edi
movl $0x1, %r15d
cmovgel %edi, %r15d
leaq -0x88(%rbp), %rdi
movl %r15d, -0x10(%rdi)
movl %ecx, -0xc(%rdi)
movq %rsi, -0x18(%rdi)
movq %rdx, -0x20(%rdi)
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x2280
leaq -0x60(%rbp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x2190
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %r14
leaq (%rax,%rax,2), %rax
addq $0xf, %rax
movabsq $0x1ffffffff0, %rcx     # imm = 0x1FFFFFFFF0
andq %rax, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x30(%r12)
xorps %xmm0, %xmm0
leaq -0xa8(%rbp), %rcx
movups %xmm0, 0x8(%rax,%rbx)
movq %rcx, (%rax,%rbx)
addq $0x18, %rbx
cmpq %rbx, %r14
jne 0x25ce
movq %rsp, %rbx
movq %r15, -0x30(%rbp)
leaq 0xf(,%r15,8), %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
xorl %r13d, %r13d
leaq 0x65(%rip), %r15        # 0x2668
movq %rbx, %r12
movq -0x90(%rbp), %rcx
addq %r13, %rcx
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x21f0
addq $0x18, %r13
addq $0x8, %r12
cmpq %r13, %r14
jne 0x2606
xorl %r14d, %r14d
movq -0x30(%rbp), %r15
movq (%rbx,%r14,8), %rdi
xorl %esi, %esi
callq 0x2260
incq %r14
cmpq %r14, %r15
jne 0x2631
leaq -0x88(%rbp), %rdi
callq 0x20f0
leaq -0x60(%rbp), %rdi
callq 0x2220
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/kthread.c
// Function: ktp_worker
static void *ktp_worker(void *data)
{
	ktp_worker_t *w = (ktp_worker_t*)data;
	ktp_t *p = w->pl;
	while (w->step < p->n_steps) {
		// test whether we can kick off the job with this worker
		pthread_mutex_lock(&p->mutex);
		for (;;) {
			int i;
			// test whether another worker is doing the same step
			for (i = 0; i < p->n_workers; ++i) {
				if (w == &p->workers[i]) continue; // ignore itself
				if (p->workers[i].running && p->workers[i].step == w->step)
					break;
			}
			if (i == p->n_workers) break; // no other workers doing w->step; then this worker will
			pthread_cond_wait(&p->cv, &p->mutex);
		}
		w->running = 1;
		pthread_mutex_unlock(&p->mutex);

		// working on w->step
		w->data = p->func(p->shared, w->step, w->step? w->data : 0); // for the first step, input is NULL

		// update step and let other workers know
		pthread_mutex_lock(&p->mutex);
		w->step = w->step == p->n_steps - 1 || w->data? (w->step + 1) % p->n_steps : p->n_steps;
		w->running = 0;
		pthread_cond_broadcast(&p->cv);
		pthread_mutex_unlock(&p->mutex);
	}
	pthread_exit(0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r12
movl 0x8(%rdi), %eax
cmpl 0x14(%r12), %eax
jge 0x2756
movq %rdi, %rbx
leaq 0x20(%r12), %r14
leaq 0x48(%r12), %r15
movq %r14, %rdi
callq 0x2290
movl 0x10(%r12), %eax
testl %eax, %eax
jle 0x26c9
movq 0x18(%r12), %rdx
xorl %ecx, %ecx
cmpq %rbx, %rdx
je 0x26b9
cmpl $0x0, 0xc(%rdx)
je 0x26b9
movl 0x8(%rdx), %esi
cmpl 0x8(%rbx), %esi
je 0x26cb
incq %rcx
addq $0x18, %rdx
cmpq %rcx, %rax
jne 0x26a6
movl %eax, %ecx
jmp 0x26cb
xorl %ecx, %ecx
cmpl %eax, %ecx
je 0x26dc
movq %r15, %rdi
movq %r14, %rsi
callq 0x20c0
jmp 0x2696
movl $0x1, 0xc(%rbx)
movq %r14, %rdi
callq 0x21a0
movq (%r12), %rdi
movq 0x8(%r12), %rax
movl 0x8(%rbx), %esi
testl %esi, %esi
je 0x2701
movq 0x10(%rbx), %rdx
jmp 0x2703
xorl %edx, %edx
callq *%rax
movq %rax, 0x10(%rbx)
movq %r14, %rdi
callq 0x2290
movl 0x8(%rbx), %eax
movl 0x14(%r12), %ecx
leal -0x1(%rcx), %edx
cmpl %edx, %eax
je 0x2727
cmpq $0x0, 0x10(%rbx)
je 0x272e
incl %eax
cltd
idivl %ecx
movl %edx, %ecx
movl %ecx, 0x8(%rbx)
movl $0x0, 0xc(%rbx)
movq %r15, %rdi
callq 0x2080
movq %r14, %rdi
callq 0x21a0
movl 0x8(%rbx), %eax
cmpl 0x14(%r12), %eax
jl 0x268e
xorl %edi, %edi
callq 0x21b0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/trim.c
// Function: lt_sc_add_core
void lt_sc_add_core(lt_seqcloud_t *sc, uint64_t s)
{
	int i, absent;
	sc->s = s = s & ((1ULL<<sc->l*2) - 1);
	for (i = 0; i < sc->l; ++i) {
		int i2 = i * 2, a, c = s>>i2&3;
		for (a = 1; a < 4; ++a) {
			uint64_t x = (s & ~(3ULL << i2)) | (uint64_t)((a+c)&3) << i2;
			kh_put(s64, sc->mm, x, &absent);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl (%rdi), %eax
leal (%rax,%rax), %ecx
movq $-0x1, %rdx
shlq %cl, %rdx
notq %rdx
andq %rsi, %rdx
movq %rdx, (%rsp)
movq %rdx, 0x8(%rdi)
testl %eax, %eax
jle 0x29ad
movq %rdi, %r14
xorl %ecx, %ecx
movq %rcx, 0x8(%rsp)
leaq (%rcx,%rcx), %r12
movq (%rsp), %rax
movq %rax, %rdx
movl %r12d, %ecx
shrq %cl, %rdx
movq %rdx, 0x20(%rsp)
movl $0x3, %edx
shlq %cl, %rdx
notq %rdx
andq %rax, %rdx
movq %rdx, 0x18(%rsp)
movl $0x1, %r13d
movq %r12, 0x10(%rsp)
movq 0x20(%rsp), %rax
leal (%rax,%r13), %ebx
andl $0x3, %ebx
movl %r12d, %ecx
shlq %cl, %rbx
movq 0x10(%r14), %r15
movl 0x8(%r15), %eax
cmpl 0xc(%r15), %eax
jb 0x2852
movl (%r15), %eax
movl 0x4(%r15), %ecx
addl %ecx, %ecx
cmpl %eax, %ecx
movl $0x0, %esi
sbbl %esi, %esi
orl $0x1, %esi
addl %eax, %esi
movq %r15, %rdi
callq 0x512a
orq 0x18(%rsp), %rbx
movl (%r15), %esi
leal -0x1(%rsi), %edi
movq %rbx, %r9
shrq $0x21, %r9
movl %ebx, %eax
shll $0xb, %eax
xorl %eax, %r9d
xorl %ebx, %r9d
movl %edi, %edx
andl %r9d, %edx
movq 0x10(%r15), %rax
movl %edx, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %r8d
leal (%rdx,%rdx), %ecx
shrl %cl, %r8d
testb $0x2, %r8b
jne 0x2926
movq %r14, %r12
movl %r9d, %ecx
shrl $0x3, %ecx
shll $0x3, %r9d
xorl %ecx, %r9d
orl $0x1, %r9d
andl %edi, %r9d
movl %esi, %r8d
movl %edx, %r10d
movl %r10d, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %r14d
leal (%r10,%r10), %ecx
andl $0x1e, %ecx
movl %r14d, %r11d
shrl %cl, %r11d
testb $0x2, %r11b
jne 0x28f6
testb $0x1, %r11b
jne 0x28de
movq 0x18(%r15), %r11
movl %r10d, %ebp
cmpq %rbx, (%r11,%rbp,8)
je 0x28f6
btl %ecx, %r14d
cmovbl %r10d, %r8d
addl %r9d, %r10d
andl %edi, %r10d
movl %r8d, %ecx
cmpl %edx, %r10d
jne 0x28ae
jmp 0x28f8
movl %esi, %ecx
movl %ecx, %edx
cmpl %esi, %ecx
movq %r12, %r14
movq 0x10(%rsp), %r12
jne 0x2926
movl %r10d, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %edx
leal (%r10,%r10), %ecx
shrl %cl, %edx
cmpl %esi, %r8d
cmovel %r10d, %r8d
testb $0x2, %dl
cmovel %r10d, %r8d
movl %r8d, %edx
movl %edx, %esi
shrl $0x4, %esi
movl (%rax,%rsi,4), %edi
leal (%rdx,%rdx), %ecx
andl $0x1e, %ecx
movl %edi, %r8d
shrl %cl, %r8d
testb $0x2, %r8b
jne 0x2968
testb $0x1, %r8b
je 0x298c
movq 0x18(%r15), %r8
movl $0x3, %r9d
shll %cl, %r9d
movl %edx, %ecx
movq %rbx, (%r8,%rcx,8)
notl %r9d
andl %r9d, %edi
movl %edi, (%rax,%rsi,4)
incl 0x4(%r15)
jmp 0x298c
movq 0x18(%r15), %r8
movl $0x3, %r9d
shll %cl, %r9d
movl %edx, %ecx
movq %rbx, (%r8,%rcx,8)
notl %r9d
andl %r9d, %edi
movl %edi, (%rax,%rsi,4)
incl 0x4(%r15)
incl 0x8(%r15)
incl %r13d
cmpl $0x4, %r13d
jne 0x2813
movq 0x8(%rsp), %rcx
incq %rcx
movslq (%r14), %rax
cmpq %rax, %rcx
jl 0x27da
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/trim.c
// Function: lt_sc_gen
lt_seqcloud_t *lt_sc_gen(const char *s)
{
	lt_seqcloud_t *sc;
	uint64_t x = 0;
	int i;
	sc = lt_sc_init();
	sc->l = strlen(s);
	for (i = 0; s[i] && i < sc->l; ++i) {
		int c = seq_nt4_table[(uint8_t)s[i]];
		if (c > 3) {
			lt_sc_destroy(sc);
			return 0;
		}
		x = x << 2 | c;
	}
	lt_sc_add_core(sc, x);
	return sc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %edi
movl $0x18, %esi
callq 0x2120
movq %rax, %rbx
movl $0x1, %edi
movl $0x28, %esi
callq 0x2120
movq %rax, 0x10(%rbx)
movq %r14, %rdi
callq 0x20d0
movl %eax, (%rbx)
movb (%r14), %al
testb %al, %al
je 0x2a4c
leaq 0x5779(%rip), %r12      # 0x8180
xorl %r13d, %r13d
xorl %r15d, %r15d
movslq (%rbx), %rcx
cmpq %rcx, %r13
jge 0x2a4f
movzbl %al, %eax
movzbl (%rax,%r12), %ebp
cmpq $0x4, %rbp
jae 0x2a30
leaq (,%r15,4), %r15
addq %rbp, %r15
jmp 0x2a38
movq %rbx, %rdi
callq 0x2760
cmpb $0x4, %bpl
jae 0x2a5c
movb 0x1(%r14,%r13), %al
incq %r13
testb %al, %al
jne 0x2a0d
jmp 0x2a4f
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x27a2
jmp 0x2a5e
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/trim.c
// Function: lt_sc_test
int lt_sc_test(const lt_seqcloud_t *sc, const char *seq, int max_hits, lt_sc_hit_t *hits)
{
	int i, l, n = 0;
	uint64_t x = 0, mask = (1ULL << sc->l*2) - 1;
	for (i = l = 0; seq[i]; ++i) {
		int c = seq_nt4_table[(uint8_t)seq[i]];
		if (c < 4) {
			x = (x << 2 | c) & mask;
			if (++l >= sc->l) {
				if (x == sc->s || kh_get(s64, sc->mm, x) != kh_end(sc->mm)) {
					hits[n].pos = i - (sc->l - 1);
					hits[n++].type = x == sc->s? 0 : 1;
					if (n == max_hits) return n;
				}
			}
		} else l = 0, x = 0;
	}
	return n;
}

// Assembly:
movq %rcx, %r8
movb (%rdi), %cl
addb %cl, %cl
movq $-0x1, %r9
shlq %cl, %r9
movb (%rsi), %al
testb %al, %al
je 0x2c2e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
notq %r9
xorl %r10d, %r10d
leaq 0x56de(%rip), %r15      # 0x8180
movl $0xc0000000, %ebp       # imm = 0xC0000000
xorl %r11d, %r11d
xorl %ecx, %ecx
xorl %r14d, %r14d
movq %r8, -0x10(%rsp)
movq %r9, -0x18(%rsp)
movl %edx, -0x34(%rsp)
movq %rsi, -0x20(%rsp)
movq %rdi, -0x28(%rsp)
movzbl %al, %eax
movzbl (%rax,%r15), %eax
movb $0x1, %r12b
cmpq $0x3, %rax
ja 0x2b87
leaq (%rax,%r11,4), %r11
andq %r9, %r11
incl %r14d
movl (%rdi), %r13d
cmpl %r13d, %r14d
jl 0x2c17
cmpq 0x8(%rdi), %r11
je 0x2bd0
movq 0x10(%rdi), %rbx
movl (%rbx), %eax
testl %eax, %eax
je 0x2bca
movl %ecx, -0x30(%rsp)
movq %rax, -0x8(%rsp)
leal -0x1(%rax), %r9d
movq %r11, %r15
shrq $0x21, %r15
movl %r11d, %eax
shll $0xb, %eax
xorl %eax, %r15d
xorl %r11d, %r15d
movl %r9d, %edx
andl %r15d, %edx
movl %r15d, %eax
shrl $0x3, %eax
shll $0x3, %r15d
xorl %eax, %r15d
orl $0x1, %r15d
andl %r9d, %r15d
movq %rbx, %rdi
movq 0x10(%rbx), %r8
movl %edx, %ebx
movl %ebx, %eax
shrl $0x4, %eax
movl (%r8,%rax,4), %ebp
leal (%rbx,%rbx), %ecx
andl $0x1e, %ecx
movl %ebp, %eax
shrl %cl, %eax
testb $0x2, %al
jne 0x2b92
testb $0x1, %al
jne 0x2b74
movq 0x18(%rdi), %rax
movl %ebx, %esi
cmpq %r11, (%rax,%rsi,8)
je 0x2b92
addl %r15d, %ebx
andl %r9d, %ebx
cmpl %edx, %ebx
jne 0x2b4d
movq -0x8(%rsp), %rax
movl %eax, %ebx
jmp 0x2ba0
xorl %r14d, %r14d
xorl %r11d, %r11d
jmp 0x2c17
shrl %cl, %ebp
testb $0x3, %bpl
movq -0x8(%rsp), %rax
cmovnel %eax, %ebx
movq -0x10(%rsp), %r8
movq -0x28(%rsp), %rdi
movq -0x18(%rsp), %r9
movl -0x34(%rsp), %edx
movq -0x20(%rsp), %rsi
leaq 0x55c1(%rip), %r15      # 0x8180
movl $0xc0000000, %ebp       # imm = 0xC0000000
movl -0x30(%rsp), %ecx
jmp 0x2bcc
xorl %ebx, %ebx
cmpl %eax, %ebx
je 0x2c17
movl %r10d, %eax
subl %r13d, %eax
incl %eax
movslq %ecx, %rcx
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl (%r8,%rcx,4), %ebx
andl %ebp, %ebx
orl %eax, %ebx
movl %ebx, (%r8,%rcx,4)
xorl %ebx, %ebx
cmpq 0x8(%rdi), %r11
setne %bl
leal 0x1(%rcx), %r12d
shll $0x1e, %ebx
orl %eax, %ebx
movl %ebx, (%r8,%rcx,4)
movl %r12d, %ecx
cmpl %edx, %r12d
setne %r12b
movl -0x2c(%rsp), %eax
cmovel %ecx, %eax
movl %eax, -0x2c(%rsp)
testb %r12b, %r12b
je 0x2c32
movb 0x1(%rsi,%r10), %al
incq %r10
testb %al, %al
jne 0x2ac7
jmp 0x2c36
xorl %ecx, %ecx
jmp 0x2c40
movl -0x2c(%rsp), %ecx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/trim.c
// Function: lt_seq_rev
void lt_seq_rev(int l, const char *f, char *r)
{
	int i;
	for (i = 0; i < l; ++i)
		r[l - i - 1] = f[i];
	r[l] = 0;
}

// Assembly:
testl %edi, %edi
jle 0x2c57
movl %edi, %eax
movb (%rsi), %cl
movb %cl, -0x1(%rdx,%rax)
incq %rsi
decq %rax
jne 0x2c49
movslq %edi, %rax
movb $0x0, (%rdx,%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/trim.c
// Function: lt_seq_revcomp
void lt_seq_revcomp(int l, const char *f, char *r)
{
	int i;
	for (i = 0; i < l; ++i)
		r[l - i - 1] = (uint8_t)f[i] >= 128? 'N' : comp_tab[(uint8_t)f[i]];
	r[l] = 0;
}

// Assembly:
testl %edi, %edi
jle 0x2c8b
movl %edi, %eax
leaq 0x5614(%rip), %rcx      # 0x8280
movsbq (%rsi), %r8
testq %r8, %r8
js 0x2c7b
movb (%r8,%rcx), %r8b
jmp 0x2c7e
movb $0x4e, %r8b
movb %r8b, -0x1(%rdx,%rax)
incq %rsi
decq %rax
jne 0x2c6c
movslq %edi, %rax
movb $0x0, (%rdx,%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/trim.c
// Function: lt_ue_for1
int lt_ue_for1(int l1, const char *s1, const char *q1, int l2, const char *s2, const char *q2, int min_len, int max_pen)
{
	int i, pen = 0;
	for (i = 0; i < l1 && i < l2; ++i) {
		if (s1[i] != s2[i]) {
			pen += q1[i] >= LT_QUAL_THRES && (q2 == 0 || q2[i] >= LT_QUAL_THRES)? LT_HIGH_PEN : LT_LOW_PEN;
			if (i <= min_len && pen > max_pen) break;
			if (i > min_len && pen * min_len > i * max_pen) break; // in effect: pen > max_pen * ((double)i / min_len)
		}
	}
	return i;
}

// Assembly:
movl %ecx, %eax
cmpl %ecx, %edi
cmovll %edi, %eax
testl %eax, %eax
jle 0x2d3d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x40(%rsp), %r10
movslq 0x38(%rsp), %r11
movl %eax, %ebx
xorl %r15d, %r15d
xorl %r14d, %r14d
xorl %ebp, %ebp
movb (%rsi,%r14), %r12b
cmpb (%r8,%r14), %r12b
jne 0x2ccf
movl %ebp, %r12d
jmp 0x2d2d
testq %r9, %r9
sete %dil
xorl %r12d, %r12d
cmpb $0x35, (%rdx,%r14)
setge %r13b
setl %cl
orb %dil, %cl
je 0x2cf7
movb %r13b, %r12b
leal 0x1(,%r12,2), %r12d
jmp 0x2d09
xorl %ecx, %ecx
cmpb $0x35, (%r9,%r14)
setge %cl
leal 0x1(,%rcx,2), %r12d
addl %ebp, %r12d
cmpq %r11, %r14
jg 0x2d18
cmpl 0x40(%rsp), %r12d
jg 0x2d40
cmpq %r11, %r14
jle 0x2d2d
movl %r12d, %ecx
imull 0x38(%rsp), %ecx
movslq %ecx, %rcx
cmpq %rcx, %r15
jl 0x2d40
incq %r14
addq %r10, %r15
movl %r12d, %ebp
cmpq %r14, %rbx
jne 0x2cc0
jmp 0x2d43
xorl %eax, %eax
retq
movl %r14d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/trim.c
// Function: lt_ue_rev1
int lt_ue_rev1(int l1, const char *s1, const char *q1, int l2, const char *s2, const char *q2, int min_len, int max_pen)
{
	int i, pen = 0;
	for (i = 0; i < l1 && i < l2; ++i) {
		if (s1[l1-1-i] != s2[l2-1-i]) {
			pen += q1[l1-1-i] >= LT_QUAL_THRES && (q2 == 0 || q2[l2-1-i] >= LT_QUAL_THRES)? LT_HIGH_PEN : LT_LOW_PEN;
			if (i <= min_len && pen > max_pen) break;
			if (i > min_len && pen * min_len > i * max_pen) break;
		}
	}
	return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, -0x8(%rsp)
movq %rdx, -0x10(%rsp)
cmpl %ecx, %edi
movl %ecx, %eax
cmovll %edi, %eax
testl %eax, %eax
jle 0x2e22
movslq 0x40(%rsp), %r8
movslq 0x38(%rsp), %r14
movl %eax, -0x14(%rsp)
movl %eax, %r15d
decl %ecx
decl %edi
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %ebp, %ebp
movslq %edi, %rbx
movb (%rsi,%rbx), %r10b
movslq %ecx, %r11
movq -0x8(%rsp), %rax
cmpb (%rax,%r11), %r10b
jne 0x2da8
movl %ebp, %r11d
jmp 0x2e06
testq %r9, %r9
sete %al
xorl %r10d, %r10d
movq -0x10(%rsp), %rdx
cmpb $0x35, (%rdx,%rbx)
setge %bl
setl %dl
orb %al, %dl
je 0x2dd1
movb %bl, %r10b
leal 0x1(,%r10,2), %r11d
jmp 0x2de3
xorl %eax, %eax
cmpb $0x35, (%r9,%r11)
setge %al
leal 0x1(,%rax,2), %r11d
addl %ebp, %r11d
cmpq %r14, %r13
jg 0x2df2
cmpl 0x40(%rsp), %r11d
jg 0x2e26
cmpq %r14, %r13
jle 0x2e06
movl %r11d, %eax
imull 0x38(%rsp), %eax
cltq
cmpq %rax, %r12
jl 0x2e26
incq %r13
addq %r8, %r12
decl %ecx
decl %edi
movl %r11d, %ebp
cmpq %r13, %r15
jne 0x2d8e
movl -0x14(%rsp), %eax
jmp 0x2e29
xorl %eax, %eax
jmp 0x2e29
movl %r13d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DReichLab[P]adna/trim.c
// Function: lt_ue_for
int lt_ue_for(int l1, const char *s1, const char *q1, int l2, const char *s2, const char *q2, int max_pen, int min_len, int max_pos, uint64_t *pos)
{
	int i, n = 0;
	for (i = min_len; i <= l1; ++i) {
		int l;
		l = lt_ue_for1(i, s1 + l1 - i, q1 + l1 - i, l2, s2, q2, min_len, max_pen);
		if (l >= min_len && (l == i || l == l2)) {
			pos[n++] = (uint64_t)(l1 - i) << 32 | l;
			if (n == max_pos) return n;
		}
	}
	return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movl 0x68(%rsp), %eax
movl $0x0, 0xc(%rsp)
cmpl %edi, %eax
jg 0x2f42
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %edx
movl 0x68(%rsp), %eax
movq %rax, %rsi
movslq %esi, %rax
movslq %edi, %rdi
incl %edx
movl %edx, 0x14(%rsp)
movq %rdi, %r13
shlq $0x20, %r13
subq %rax, %rdi
shlq $0x20, %rax
subq %rax, %r13
addq %rdi, %r15
addq %rdi, %r12
movl $0x0, 0xc(%rsp)
movl %esi, %r14d
movl %r14d, %edi
movq %r12, %rsi
movq %r15, %rdx
movl %ebx, %ecx
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %r9
movl 0x60(%rsp), %eax
pushq %rax
movl 0x70(%rsp), %ebp
pushq %rbp
callq 0x2c93
addq $0x10, %rsp
movb $0x1, %dil
cmpl %ebp, %eax
jl 0x2f12
cmpl %eax, %r14d
setne %dl
cmpl %ebx, %eax
setne %sil
testb %sil, %dl
jne 0x2f12
cltq
orq %r13, %rax
movl 0xc(%rsp), %r8d
movslq %r8d, %rdx
incl %r8d
movq 0x78(%rsp), %rsi
movq %rax, (%rsi,%rdx,8)
cmpl 0x70(%rsp), %r8d
setne %dil
movl %r8d, 0xc(%rsp)
movl 0x10(%rsp), %eax
cmovel %r8d, %eax
movl %eax, 0x10(%rsp)
testb %dil, %dil
je 0x2f3a
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %rax, %r13
incl %r14d
decq %r15
decq %r12
cmpl %r14d, 0x14(%rsp)
jne 0x2e9f
jmp 0x2f42
movl 0x10(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq