The second edition of Philippine first lady Imelda Marcos' Manila International Film Festival--less star-studded than expected but buoyed by a message from President Reagan and the presence of several Hollywood personalities--finds itself embroiled in the country's long-running church-state tussle for its showing of previously banned sex movies.

Faced with a cutoff of government funds shortly before this year's extravaganza was set to open, Marcos and festival organizers scrambled to finance her pet project and justify its worthiness. They appear to have solved their money problems, at least, with a plan to farm out some of the festival's films to 150 commercial theaters in metro Manila.

In fact, they seem to have struck a gold mine. Censorship has been lifted for the duration of the festival, and the majority of the theaters are showing what Filipinos call "bold" movies. Despite prices two to four times higher than usual, thousands of the curious are jamming theaters to see such previously banned or censored soft-porn fare as the locally produced "Virgin People" and "Desire" as well as foreign titles such as "Lady Chatterley in Tokyo."

While some elements of the overwhelmingly Roman Catholic Philippine society find it all base and shocking, the festival organizers are citing loftier motives. Because of criticism that last year's gala was an extravagance that the economically strapped Philippines could ill afford, Marcos has dubbed the current two-week affair a "festival for a cause." The proceeds are supposed to go to charity, notably the Philippine Foundation for the Disabled.

Still, the festival has miffed the influential Catholic church, particularly the archbishop of Manila, Cardinal Jaime L. Sin.

"I am happy that the plight of these unfortunates will be relieved," he said in a speech last week. "But at what price? It could be at the cost of seeing an entire generation becoming morally crippled."

For her part, Marcos, who as governor of metro Manila launched a crackdown on pornographic movies several years ago, has been put in the position of defending the racy films.

She told a news conference at the opulent Malacanang presidential palace she regretted that uncensored movies had "upset some fragile senses," but that the Philippines had been "a very sheltered country" for too long and that the sexually explicit films would broaden people's minds and "elevate public taste."

Caught in the middle has been President Ferdinand Marcos, who often seems to have trouble reining in his powerful, independent-minded wife. Evidently irked by the porno controversy, he said he would act immediately to "prevent the MIFF from becoming an unwitting tool of certain producers" and threatened to have "some people" arrested.

Seeming to annoy him especially were reports that in addition to showing a previously banned local skinflick called "The Victim," some theaters were showing films with censored portions restored and, in at least one case, additional sexually explicit footage hastily shot for the occasion.

Most of the films in question are of the "sexploitation" variety, with heavy emphasis on rape scenes. So far, the major attraction has been "Virgin People," featuring 15-year-old "bold" star Pepsi Paloma. She also stars in "The Victim," whose plot is based on her own claim to have been raped by a local television variety-show host.

Ironically, the showing of these films for the first time coincides with a crackdown on Manila's rampant child-sex trade. In an apparent effort to clean up the city's image during the festival, authorities have rounded up a number of child prostitutes.

While the "bold" films have drawn most of the public attention and media play, the focus of the festival is a competition among 22 films from 21 countries for "Golden Eagle" awards in seven major categories. Among the competing films are Robert Benton's "Still of the Night," starring Roy Scheider and Meryl Streep, and the Australian film, "Man From Snowy River," starring Kirk Douglas and Jack Thompson. Nine of the films are from Asia, and socialist countries are also heavily represented.

The highlight of the festival will be the gala Philippine premiere of "Gandhi." More than 280 noncompeting exhibition films from 43 countries are also being shown during the 12-day fete, which ends tomorrow.

Festival organizers pronounce themselves pleased with the turnout of movie-goers and international film industry representatives, but concede disappointment with the number of no-shows among the invited celebrities. The biggest stars to turn up for the festival's first week were Tony Curtis, Virginia Mayo and George Hamilton. Director Richard Attenborough and star Ben Kingsley arrived for the showing of "Gandhi."

Lino Ventura of France also made it, and Robert Duvall was expected. But nothing more has been heard of a list of luminaries whose attendance was previously reported confirmed-- Jaclyn Smith, Margot Kidder, Kristy McNichol, Claudia Cardinale, Jack Lord, Robert Goulet and Zsa Zsa Gabor.

George Hamilton, who showed up at the first lady's press conference smartly dressed in a tan trench coat, stressed that the importance of the Manila festival " was in the buying and selling of films." Indeed, many of the more than 850 distributors, producers and promoters here representing 450 companies are chiefly interested in selling to the vast Asian market. Of particular interest is the Philippines, population nearly 50 million and the world's third largest English-speaking country.

According to festival director Johnny Litton, the Philippines produces about 150 films a year and imports 600 to 650. It is estimated about 50,000 Filipinos go to the movies every day.

"The sleeping giant that is Asia is awakening," Litton said. "We have a big market. But we want the trade to be two ways."

"We're trying to build a film export industry," added Elizabeth De La Fuente, the festival's secretary general. She said the effort, and its potential returns, justified the expense of the festival and such facilities as the $20 million-plus film center known as the "Concrete Parthenon," which Imelda Marcos had built for last year's inaugural festival.

De La Fuente, citing the Paris-based International Federation of Film Producers' Associations, said the Manila event, in just its second year, ranks fifth among the world's film festivals.

"A lot of people are complimenting us by comparing us to Cannes, which is 35 years old," Litton said.

At the opening of the Manila festival, Jack Valenti, president of the Motion Picture Export Association of America, read a letter from President Reagan to President and Mrs. Marcos commending the event.

"Actually, I don't have much to do with this festival," President Marcos said at the opening ceremony, as he went on to talk of the threat of nuclear war and express the hope that the "demons released with the control of the atom" could be exorcised.

"We live in two contrary and different worlds," he said. "One is a world of ghosts and terror. The other is the world of art, of beauty, of hope and vision."

The talk of ghosts struck a different chord with some of the Philippine government employes assigned to the festival, however.

Some of them believe the film center building is haunted and are reluctant to be there after dark. The superstition stems from the deaths of at least nine, and possibly as many as 20, workers in late 1981 when the roof collapsed as builders were rushing to complete the center before last year's festival.

Now, the stories go, the usual stillness around the imposing structure is sometimes broken by the ghostly sounds of hammering in the night.