The words of Jesus constitute about twenty two per cent of the Greek scripture, about thirty one thousand in total. Remarkably few. Yet these words circle the globe and his name is known, and spoken, everywhere, every day.
'Pearls before swine' has become an English idiom : I suppose many use it who do not realise they are speaking the words of Jesus of Nazareth.
Jesus gives two descriptions of what is being disseminated and two descriptions of those to whom it is being disseminated. The combination of the two together is very expressive and the imagery stays in the mind.
The wording is both very economical and very memorable. The two images are expertly 'dovetailed' into one statement.
What is being disseminated is, firstly, holy and, secondly, immensely valuable - 'that which is holy' and 'pearls'. Pearls are living things, or at least are produced by a living thing - unlike precious metals (gold, silver) or precious crystals (rubies, diamonds).
Pearl is the result of a living form (bacteria or virus) being isolated by the oyster within itself - it is not a matter, as commonly thought, of a grain of sand irritating the tissues. It is a layered form of chitinous material interspersed with laminate which, once hardened, is harder than bone and as strong as tooth enamel.
Thus it is the result of life - another life - within. And the result of that inner life is a structure that is enduring. And this result of life, and this strong material, and this precious object : is not to be wasted.
Pearl speaks to me of that which Paul conveys in Galatians 4:19 of Christ being formed within the saints by the ministering of the gospel.
Then, Jesus gives two analagous descriptions of the receivers of the disseminated gifts : they are like dogs and they are like pigs. The two characteristics are combined in Jesus' narrative, so the two responses are viewed together.
Two characteristics of the offered gift - two characteristics of the response; two exhortations not to do something and two predictions of what will happen if one heeds not the exhortation.
All packaged in a condensed statement that conveys memorable imagery.
Having fed pigs on a farm, I can say that they are dangerous beasts. Fall down in a pig pen full of hungry swine and one might not get out alive. So, too, with dogs. A recent report from North America told of a dog owner overcome by her two 'pets' on a walk and found, deceased, with parts of her body missing.
Despising the holiness and the value of the offered treasure, those who do not value such things will trample them into the mire, first. Having done so, they will then turn their attention on the offerer, and rip them apart.
This may be metaphorical, a description of a verbal response. Or it may be a factual description of what despirers do to those who express holy and valuable things. Foxe's 'Book of Martyrs' lists the gory details.
In summary, and to specifically answer the question, I think that the statement is composite in form and expresses imagery which conveys two distinct allusions but both are valid and, in fact, are interchangeable. The statement looks at two different aspects of the same thing, and does so simultaneously.
It is a very concise and condensed statement. Very memorable.