// Wyverncult (NBDS) - 2.26.2025. Current working theory, all is subject to change
// Text references: Meteorology (Aristotle); Hermetic writings (Paracelsus); Emerald Tablet (Hermes). Working off of C programming, not C++.

// "dHJpc21lZ2lzdHVz" - "Trismegistus". From Hermes Trismegistus, a combination of Hermes and Thoth, pseudepigraphic author of Hermetic writings.
// "cHJpbmNpcGxl" - "Principle". Refers to the fundamental Prima Matter of the universe; Salt, mercury and sulphur; Body, spirit and mind; Combinations of earth, water, air and fire. Earth and fire do not combine, as they are opposites.
// "d29tYg==" - "Womb". Refers to a chamber that fosters life. Could refer to a heart, the compartment in which "blood" is created, the "fruit" of the Tree of Life, or the vessel of the fruit's nectar (ie. Mankind or any other fresh blood source).

// Working off of the understanding that some part of, if not all of, this process is the Magnum Opus; Utilizing the Prima to create the Philosopher's Stone. This means that crude materials can be turned into wealthy materials, or otherwise an elixir to immortality or life can be created. Great Work!
// Additional notes: The depiction of V1 on the menu screen is in the pose of da Vinci's Vitruvian Man, depicting the perfect proportions of a human figure, which we know in life to be an impossible ideal. V1 either was created to be or is a perfect being.

// Main theory: The code refers to the process in which crude materials are transformed to create an internal Elixir of Life for machinery. This would make the machine a type of homunculus; An alchemical abomination against God and nature.

// Theory 2: The code refers to the process in which V1 is able to transform crude materials to repair itself. OR, the process in which crude fresh blood is transformed into usable blood by all machines.
// Theory 3: Is this pseudo-code a translation of Hermes' Emerald Tablet?



#INCLUDE { above, so } FROM "dHJpc21lZ2lzdHVz";
#INCLUDE { permutation, transmutation, exhalation } FROM "cHJpbmNpcGxl";

// Group of pre-processor directives. These are initially defined in separate locations.
// The objects "Above" and "So" are taken from Trismegistus, referenced in the next line. "As above, so below"; What happens in the heavens will happen on the earth, what happens in body will happen in soul.
// The concepts "permutation", "transmutation", "exhalation" are taken from Principles, referenced above. Permutation refers to the arranging of matter, transmutation refers to the complete transformation of one material into another, and exhalation refers to the creation of a complete new material.

void* below = x => compose(so, () => above)(x);
void* reify = partial_apply(below, transmutation);
void* deify = #MACRO_INVERT(x) partial_apply(reify, x);

// A collection of generic "void*" pointers.
// A continuation of "As above, so below". The arguments "x", "so" and "above" are composed, with "above" related to an empty parameter. "x" is related to this statement, as well as itself, which is ultimately equated to "below".
// Firstly, reify and deify are opposing arguments; To reify is to create something physical out of the abstract, to deify is to create the abstract out of something physical. Additionally, reification refers to mortality while deification refers to godhood.
// "Reify" is defined, affixing the "below" and "transmutation" into a new function that can be called later.
// "Deify" is then defined, which inverts the (x) from "below" and affixes "reify" and "x" to new functions.
// As deify is defined, what happens above happens below. The physical has been nested into the abstract.

typedef matter(t_form) = #DERIVE reify(t_form);

// The matter "t_form", possibly tree_form, is defined as something new. The "matter" inherits the properties from the physical "reify".

#INCLUDE { blood, formal_blood } FROM "d29tYg==";

// Another pre-processor; Blood and formal_blood are now included in the process from the womb location.

typedef leaf = matter(blood);
struct branch {
	leaf* leafptr;
};

// This begins the references to the "Tree of Life", the tree that God planted and used to fill man with life. Mankind is said to be filled with the dew of the Tree's leaves.
// "Leaf" is defined as the matter "blood". Leaves are structured into branches and established as pointers.

struct tree {
	branch* branch_arr;
};

// Branches are structured into trees and arrayed, creating multiple variations of similar information that can be adjusted all at once.

// Below is the beginning of a full function. Heckteck mentioned that there were 2 typos in this pseudo-code, I am working off of the thought that "ex" is intended to be "x".

matter ex(matter* input) => {
	void* prima = deify(input);
	
// Prima is finally assigned to the deify definition from earlier.


	tree sprout;

	unsafe { #SUPPRESS warning FORBIDDEN
		for(var i = 0; i < permutation(prima); i++) {
			sprout.branch_arr[i] = alloc(branch, kALLOCATOR_OVERWRITER);
		}
	}

// The Tree of Life is planted. An unsafe function, either impossible or taboo, is then run. Firstly the "FORBIDDEN" warning is suppressed so that the function is not interrupted.
// The branch variables are looped until the permutation value for the prima is found. The value then increases to indicate that another loop begins.
// Each branch array value is then allocated elsewhere in the function, and pre-existing k values are overwritten with new values.
// This allocation may be similar to the "nigredo" phase of magnum opus; The prima is being converted into a pure, workable form.

	for (var j = 0; j < length(sprout.branch_arr); j++) {
		void* alter = j % 2 == 0 ? transmutation(prima[j]) : prima[j];

// The next loop begins until the proper arrayed branch length is found. 
// "Alter" is defined. The function checks whether the branch length is equal to an even number, and if so the transmutation of prima will occur, converting the prima into something else. If not, the process is repeated.
// This step may be similar to the "albedo" stage of magnum opus; The purpose to the prima matter is being made clear.

		formal_blood* bf = exhalation(alter); #SUPPRESS warning FORBIDDEN
		blood* b = reify(*bf); #SUPPRESS warning DEREF_ETHIC

// "Formal_blood" (bf), the raw material being the catalyst for this process, is defined as the exhalation of the alter. Something new is being created using the transmutation result, and another "FORBIDDEN" warning is suppressed.
// "Blood" (b) is defined. The formal_blood is then reified, and made below as so above.
// The dereference call to ethics is suppressed. "Ethics" in this context could refer to the transmutation of the formal_blood into blood being impossible in the laws of physics. It could also refer to a moral code of ethics, if the formal_blood is being taken from a separate vessel.
// "Rubedo" is found, the red blood is now prepared to enter the physical world.

		#ASSERT univocity(*prima);

// A final call-back to the deification process; What is made above is so made below, all must be the same.

		#MAP(tree) (k) => tree.branch_arr[k] + input[k];
	}

// The arranged branches have already overwritten their initial values, and the Tree of Life is thus mapped.

	return *((matter*) reify(prima));
}

// The process ends, we are returned with the product and the abstract is turned into something real.

// A man-made Tree of Life is created, mankind has broken the laws of physics, played God and created something new from the prima material of the universe using the formal_blood as its catalyst.
// What was created? Usable blood? Self-repairing armour? Life itself? As previously mentioned, this code could also simply be a translation of Hermes' "Emerald Tablet".