rearranged declarations in GeneratedTypes.h file a bit
simplify memread_manual