Manchester decoding 200hz

How would you code this, ive tried a bunch of times to do something like this butni cant get it to work for me