I'd take an AR any day. Have fired both.. in the full military version. Carried a Colt M16A2 in Iraq in 03, had that same rifle from 99-04 and zero misfires. Had an FN M-16A4 at Ft. Polk, seemed like a POS at first with random FTF's, found out it had a broken hammer spring, new hammer spring and it was pretty good after that, never deployed with it. Had a Colt M-4 later on at Polk, zero issues, had another Colt M-4 at Ft. Bragg from 06-09, carried it to Baghdad for 15 months, shot thousands of rounds out of it before, during, and after deployment, zero problems.
I have owned two Armalites, one since 2002, one since 2012, zero issues with either. Both are extremely accurate.
I have shot several AK's, mostly AKM's that were owned by the Iraqi National Police (we had a little "range" at our outpost), pretty much feels like the flimsy pos that it is.
For apples to apples comparison, I'll go M4 vs. AKM. The M4 is a rifle designed to be a semi-precision instrument carried by a trained, disciplined Soldier, Sailor, Airman, or Marine, and it does this very well. It does require a bit of maintenance in a combat environment. If you don't have the simple discipline to clean your rifle regularly, in a combat environment you will receive a harsh lesson in darwinism anyway regardless of what you're armed with.
The AKM/AK-47 was designed to be a cheap, easy, and fast to manufacture bullet slinger placed in the hands of a conscript. Like the M-4, it does what it was designed to do very well.