Private detective Philip Marlowe (Humphrey Bogart) is summoned to the mansion of his new client General Sternwood (Charles Waldron). The wealthy retired general wants to resolve gambling debts his daughter, Carmen Sternwood (Martha Vickers), owes to bookseller Arthur Gwynn Geiger. As Marlowe is leaving, General Sternwood's older daughter, Mrs. Vivian Rutledge (Lauren Bacall), stops him. She suspects her father's true motive for calling in a detective is to find his young friend Sean Regan, who had mysteriously disappeared a month earlier.Philip Marlowe (Bogart) and Vivian Rutledge (Bacall) square up to each other.Marlowe goes to Geiger's rare book shop. Agnes Louzier (Sonia Darrin), Geiger's assistant, minds the shop, which is the front for an illegal operation. Marlowe follows Geiger to his house, where he hears a gunshot and a woman scream. Breaking in, he finds Geiger's body and a drugged Carmen, as well as a hidden camera with an empty cartridge. Marlowe picks up Carmen and takes her home. He goes back to the house, but discovers the body is no longer there. Marlowe later learns that the Sternwoods' driver (Owen Taylor) has been found dead, with his car driven off a pier.Vivian comes to Marlowe's office the next morning with scandalous pictures of Carmen she received with a blackmail demand for the negatives. Marlowe returns to Geiger's bookstore, where they are packing up the store. Marlowe follows a car to the apartment of Joe Brody (Louis Jean Heydt), a gambler who previously blackmailed General Sternwood. He returns to Geiger's house and finds Carmen there. She initially claims ignorance about the murder, then insists Brody killed Geiger. They are interrupted by the owner of the home, small-time gangster Eddie Mars (John Ridgely).Marlowe follows Vivian to the apartment of Joe Brody, where he finds Brody armed, and Agnes and Vivian initially hiding. They are interrupted by Carmen, who wants her photos. Marlowe keeps the pictures and sends Vivian and Carmen home. Brody admits he was blackmailing both General Sternwood and Vivian, then he is suddenly shot and killed; the assailant flees. Marlowe chases and apprehends Carol Lundgren, Geiger's former driver, who has killed Brody in revenge for Geiger's death, not knowing the chauffeur killed Geiger. He takes Lundgren back to Geiger's house, where Lundgren has returned the body. He calls the police to the house to clear up both the Geiger and Brody murders.Marlowe visits Mars' casino, where he asks about Regan, who is supposed to have run off with Mars' wife. Mars is evasive and tells Marlowe that Vivian is running up gambling debts. Vivian wins a big wager and then wants Marlowe to take her home. A stooge of Mars' attempts to rob Vivian, but Marlowe intervenes and knocks him out.While driving home, Marlowe unsuccessfully presses Vivian on her connection with Mars, saying he knew the money she won and subsequent robbery were staged for Marlowe's benefit. Vivian admits to nothing. Marlowe returns home to find a flirtatious Carmen waiting for him. She admits she did not like Regan and mentions that Mars calls Vivian frequently. She attempts to seduce Marlowe, who throws her out of his apartment. The next day, Vivian tells him he can stop looking for Regan; he has been found in Mexico, and she is going to see him. Mars has Marlowe beaten up to emphasize the point.Harry Jones (Cook), an associate of Brody's who wants to marry Agnes, conveys an offer from her to reveal the location of Mars' wife for $200. When Marlowe goes to meet Jones, Canino, a killer hired by Mars, is there attempting to find Agnes himself. Canino poisons Jones after he discloses Agnes' location (which turns out to be false). Agnes telephones the office where Jones was killed while Marlowe is still there. He arranges to meet her anyway.Agnes reveals that she has seen Mona Mars near a town called Realito behind an auto repair shop. When he gets there, Marlowe is attacked by Canino. He wakes to find himself tied up, with Mona watching over him. Vivian then comes in. Mona angrily leaves after Marlowe tells her that Mars is a gangster and a killer. Vivian fears for Marlowe's life and frees him, allowing him to get to his car and his gun. She distracts Canino, who is shot by Marlowe. During the drive back to Geiger's bungalow, Vivian unconvincingly tries to claim she killed Sean Regan.When they arrive, Marlowe calls Mars and lies that he is still in Realito. They arrange to meet at Geiger's house, giving Marlowe ten minutes to prepare. Mars arrives with four men, who set up an ambush outside. Mars enters and is surprised by Marlowe, who holds him at gunpoint. Marlowe reveals he has discerned the truth: Mars has been blackmailing Vivian, claiming that her sister Carmen had killed Regan. As soon as Mars threatens Marlowe with his men outside, Marlowe retaliates by firing shots that just miss Mars, causing him to run outside, where he is mistakenly shot by his own men.Marlowe then calls the police, telling them that Mars is the one who killed Regan. In the process, he tells them that Vivian helped him with Eddie Mars, exempting her from criminal prosecution, and tells Vivian that her sister Carmen needs psychiatric care.
Output: Question: What does Mars do when he arrives at geiger's house?, Answer: set up an ambush