Ba'al's chief rival for kingship among the gods was Yamm, meaning "Sea", who also sometimes took the guise of a storm-god. His personal name was Yaw or, in some texts, Yawu. For instance, in the Epic of Ba'al, El, speaking to Athirat (Asherah) about their son Yamm says, "The name of my son is Yaw, Oh Goddess. . ."
"Yamm was the Canaanite god of the sea who also represented Chaos in the yearly nature saga that the Canaanite religion was based on, i.e., the death of crops at winter and their rebirth at spring represented by God or God's lieutenant being taken down into the Abyss or hell there to be rescued (Spring resurrection)by a Savior god or goddess, Baal and Anath for Canaanites, Marduk and Ishtar for Babylonians. This pagan mythology became incorporated in the Easter resurrection tradition of Jesus Christ. According to the Canaanite myths, Baal seized the throne of El with a surprise attack in the palace of El on Mount Sapan. Baal then claimed Asherah and Anath as his wives. Yamm formed an alliance with his father, El, and attempted to drive Baal from the throne. However, Baal defeated Yamm, who had taken the
form of a sea dwelling dragon.
This archetypal myth finds what is believed to be its earliest fully intact version in Canaanite mythology. In the beginning, the people of Canaan taught, there was a rivalry between two great primordial deities, `Yamm' and `Baal'. Yamm, known also as `Prince Sea', was "identified with or accompanied by two fearsome sea monsters, Litan (the Biblical Leviathan) and Tunnan (the Biblical Tannin)". This sea-god Yamm was itself thought to be a sea-monster, being variously referred to as `the dragon', `the twisting serpent', and `the seven-headed monster'. Since this Canaanite sea-god may be an ancient symbol for the Primordial Soul, which would have functioned as a controlling `judge' over its partner the Spirit, it is worth noting that the other name commonly used for Yamm was `Judge River'.
And Baal, in the role of the young storm-god, was variously called `Lord of the Storm', `Rider of the Clouds', and `Conqueror'. Again, at first this sea-god Yamm was master over Baal, holding power and control over him. But Baal ultimately overthrew Yamm."
I have this reference note and no source for it. But here's another indication of Yamm as the pre-Yahweh, the name of the tribe of Benjamin which is not the given Hebrew meaning, "Son of my right hand' but means "Sons of Yamm".
Is Judaism about Yamm's revenge on Baal as Yahweh?
Btw, the seven-headed beast from the sea with the wound that did not heal? The seven heads symbolize the seven planetary rulers with the moon being the one with a mortal wound that healed, i.e., the phases of the moon where it disappears and reappears again.