Simplified PERM end_stack generation