diff options
-rw-r--r-- | src/a5.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -35,6 +35,8 @@ void a5_loop(uint64_t x0,uint64_t x1){ for(uint32_t x = x0;x < x1_32;x++){ uint32_t next; + + /* uint64_t *index_ptr; int index_bit; @@ -47,11 +49,30 @@ void a5_loop(uint64_t x0,uint64_t x1){ next = 0; *index_ptr |= 1ULL<<index_bit; } + */ + + if(t < filled){ + next = x-lastp[t]; + }else{ + uint64_t *index_ptr; + uint64_t index_bit; + + index_ptr = index+(t>>6); + index_bit = 1ULL<<(t & 63); + if(*index_ptr & index_bit){ + next = x-lastp[t]; + }else{ + next = 0; + *index_ptr |= index_bit; + } + } lastp[t] = x; + if(t == filled){ while(lastp[++filled]); } + t = next; } } |