Code 46

Code 46 is a 2003 British film directed by Michael Winterbottom, written by Frank Cottrell Boyce, and starring Tim Robbins and Samantha Morton. Produced by BBC Films and Revolution Films, the film is a dystopian sci-fi love story, exploring the implications of current trends in biotechnology.

The soundtrack was composed by David Holmes and Stephen Hilton under the name "Free Association". Filmed on location in Shanghai, Dubai and Rajasthan, with interiors done onstage in London, the mesh of foreign locations was chosen due to the juxtaposition of elements in these cities offering a believable futuristic setting.

Plot
In the future, the world is divided between those who live "inside", in high-density cities, and the underclass who live "outside." Access to the cities is highly restricted and regulated through the use of health documents, known as "papeles" in the global pidgin language of the day.

William Geld, an insurance fraud investigator, is sent to Shanghai to interview employees at a company known as "The Sphinx", which manufactures the papeles. William's assignment is to identify employees who are suspected of forging "covers". After interviewing numerous Sphinx employees, he identifies a young worker named Maria Gonzalez as the forger. William is captivated by her, and instead of turning her over to security, he identifies another employee as the forger. William then meets up with Maria and they begin an affair. As Maria sleeps, William finds a forged cover in her room and takes it.

William is reprimanded for not discovering the true Sphinx forger. He requests that someone else be sent, as there may have been an accomplice to the innocent man he fingered. However, he is ordered to deal with the problem and to return to Shanghai.

Upon his return, William discovers that Maria's apartment is abandoned and the only clue is a medical clinic appointment. He visits the clinic and learns that Maria was pregnant and that the pregnancy was terminated due to a violation of Code 46. William knows that this means Maria is somehow genetically related to him, but he has no idea how.

William discovers that Maria has been taken to have her memory of the episode erased. He gets the clinic to release Maria into his care by telling them she is a witness in his fraud investigation. After she is released, William tells her about the memory erasure and about how he didn't report her for fraud. Maria is disturbed by this information and becomes very distressed. William gives her a sleeping pill and, while she is sleeping, he cuts some hair from her head and takes it to a facility providing instant DNA analysis. He discovers that Maria is a biological clone of his mother. William decides to go home to his family, but is not allowed to do so, as his 24-hour cover has expired.

William then realises that his only hope of returning home is to get a papel from Maria. She goes to work to obtain a papel, but is unable to forge one herself, as she was moved to another area of work, so a co-worker makes the cover for her. While taking a train to meet William, her memory returns and she recalls her feelings for William. He decides not to leave her.

William and Maria then travel to Jebel Ali in the UAE, which does not require special travel clearance. The two hide out in the old city where they book a room. William reveals to Maria that, in addition to the memory wiping, she has been given a virus that induces an adrenaline rush in response to physical contact with the person who brought about the Code 46 violation. He refrains from telling her the virus will also force her to report the further Code 46 violation to the authorities. They rent an old car and travel away to escape the authorities who are tracking them. William crashes the car while avoiding a collision with camels and pedestrians and they are both knocked unconscious.

William awakes in the hospital in Seattle with his wife and child. He has no memory of Maria or the Code 46 violation, as all memories of her and their time together have been replaced with memories of a successful investigation. Maria is more severely punished by being exiled "outside," to the desert. Her memories of William are altered to make them stronger, even as she is forced to live without him.