Implemented c_code for AdvancedSubtensor1

See gh-1169.