MANILA — AS the political and legal tangle over the United States military presence in the Philippines deepens, President Corazon Aquino is struggling to cut a deal for a lengthy American withdrawal.Philippine senators, who rejected a new 10-year lease for the US Subic Bay Naval Station, began meetings Sept. 30 to decide when the Americans should go. At the same time, Mrs. Aquino has pulled back from her hoped-for national referendum to reverse the Senate vote. To keep her options open, Aquino says the referendum continues to be "our main thrust" while she negotiates for a three-to-seven-year pullout period. Also at issue is continued US compensation during a withdrawal. Senators rejected a draft treaty that provided that the US return Clark Air Base next year but keep Subic for another decade in exchange for $203 million in annual aid. Worried about the loss of US assistance and thousands of base-related jobs, Aquino is grasping for a compromise. The referendum, aimed at gaining time until a new Senate takes office after national elections in May 1992, is politically risky, Philippine analysts say. Although bases backers hope to hold the vote in December, Election Commissioner Christian Monsod says the plebiscite is not feasible before February and could become the central issue in the 1992 national elections. Analysts also question the strength of majority pro-American public opinion polls made before the Sept. 16 Senate vote. Felipe Miranda, an analyst with Social Weather Stations, a public opinion research group, says backing is shaky, adding that "the Aquino administration stands to lose more of its already much-depreciated credibility to critical sectors of the public."