John Dies at the End

David Wong recalls confronting a zombie skinhead whom he beheaded one year prior and wonders whether an axe that had its handle and head replaced over time is still the same axe. This is a play on the classic problem in philosophy and metaphysics known as the Ship of Theseus. He sits in a restaurant and recounts his story to reporter Arnie Blondestone.
David is at a party with his friend John. He and Fred Chu witness Justin White teasing Amy Sullivan, who has an amputated hand. David learns that Amy's dog, Bark Lee, has gone missing after biting a drug dealer named Robert Marley. As he leaves the party, David sees Bark next to his car, then suddenly feels sick and drives home. That night, David receives a frantic call from John, who seems delusional. At John's apartment, David recovers a syringe containing a black substance, oblivious to a bizarre creature only John can see. John tells David that the drug "Soy Sauce", given to him by Marley, causes him to slip in and out of the timeline and lets him perceive alternate dimensions. David then receives a call from John of the past.
As they drive off, David is accidentally stabbed by the syringe. The drug, which David notices is quivering like an organism, causes severe hallucination. An alien, Roger North, appears in the backseat, but retreats when David threatens him. Detective Lawrence Appleton takes John and David to the police station. As he is interrogated, David realizes that he can somehow predict Appleton's questions. Appleton reveals that John and White are the only survivors of a drug party at Marley's trailer. After being called out of the room, Appleton tells David that John has died and leaves. Arnie interrupts Dave's story, expressing his skepticism about the events. Dave then takes Arnie out to his car and shows him an empty cage in the back seat. When glimpsing at the cage from the corner of his eye, Arnie is able to see the same bizarre creature from John's apartment inside the cage. Dave convinces Arnie to listen to the rest of the story without his veil of skepticism clouding his judgement.
John telepathically talks to David, instructs him to escape and retrieve the Soy Sauce. In Marley's trailer, some of the drug forces itself into David, who falls unconscious. He wakes up to see Appleton preparing to burn down the trailer. Appleton tells David that John's body has disappeared, and that he believes evil things are happening because of the drug. Appleton shoots David, who survives by time-traveling and tampering with the round he was shot with. Bark, apparently controlled by John, drives David's car through the wall, allowing him to escape the burning trailer. In his house, David is subdued by a possessed White.
White kidnaps David, Fred, Amy, Bark and John, takes them to an abandoned mall and reveals a "ghost door". John manipulates White into going outside, where Appleton kills him. Appleton's body then explodes into a swarm of white flying insects, which enter Fred and possess him. David reluctantly kills Fred. Amy opens the ghost door with her phantom limb, then John and David go through it. They meet North and Albert Marconi, a celebrity psychic and exorcist. They have teamed up against Korrok, an evil organic supercomputer. Marconi gives David and John a bomb containing a hallucinogenic capable of crippling Korrok. The two step through a portal to an alternate Earth. Disciples of Korrok greet them and present a brutal utilitarian society under Korrok's merciless rule. The duo are brought before Korrok, who plans to devour them, absorb their knowledge to conquer their dimension. John activates the bomb, but fails to complete the sequence. Bark, who secretly follows them, successfully does, sacrificing himself.
Upon escaping, David and John meet Marconi and learn that Bark was meant to defeat Korrok all along. After biting Marley, the dog had Soy Sauce in his blood and became connected to Marconi and North. Amy becomes David's girlfriend. David and John begin working as exorcists and demon hunters. They occasionally request help from Marconi, who gave them his personal number.
When David concludes the story, Arnie decides to publish it, despite how it might harm his career. He recalls a story to David, which makes David realize that Arnie is only a figment of his imagination. The real Arnie was killed several days ago by people not wanting the story published. David reluctantly forces "Arnie" out of existence. During the end credits, David and John travel to another dimension and decline a request to save it.

Question: Who was Bark meant to defeat?
Answer: Korrok; Korrok