So long story short I saw a E60 M5 for sale for crazy cheap and bought it sight unseen like an idiot 😂. The car had been sitting for like a year so the battery was way dead so I got that charged up and the car started right up. First thing I noticed was a really loud ticking noise coming from the engine so I shut if off right away and did some research and figured it could just be the vanos so I let the car warm up and the ticking did not go away. While it was warming up I got 4 engine codes for the camshaft position being retarded in bay 1 and 2. The ticking noice may have gotten a little quieter but definitely is still very loud. Is it possible that the two problems are related?