Bifunctional enzyme; part of the gene cluster that mediates the biosynthesis of flavunoidine, an alkaloidal terpenoid with a tetracyclic cage-like core connected to dimethylcadaverine via a C-N bond and acylated with 5,5-dimethyl-L-pipecolate (PubMed:31885262). The tetracyclic core is synthesized by the terpene cyclase flvE and the cytochrome P450 monooxygenase flvD (PubMed:31885262). The terpene cyclase flvE catalyzes the cyclization of farnesyl pyrophosphate (FPP) to form (1R,4R,5S)-(+)-acoradiene and the cytochrome P450 monooxygenase flvD is then responsible for oxidative conversion of (1R,4R,5S)-(+)-acoradiene into the tetracyclic cage present in the final product flavunoidine (PubMed:31885262). The cytochrome monooxygenase flvC then hydroxylates the C-10 position (PubMed:31885262). The second terpene cyclase flvF is required for attachment of the C-7 axial dimethylcadaverine which is itself produced by the N-methyltransferase flvH and the decarboxylase flvG via methylation of L-lysine to give N,N-dimethyl-L-Lysine, and decarboxylation to afford dimethylcadaverine, respectively (PubMed:31885262). The NRPS flvI acylates the terpenoid core at the hydroxylated C-10 with dimethylpipecolate to yield final flavunoidine (PubMed:31885262). The bifunctional enzyme flvA and the dehydrogenase flvB are responsible for the synthesis of the dimethylpipecolate precursor (PubMed:31885262). The PLP-dependent lyase domain of flvA might use L-O-acetyl-homoserine and alpha-keto-isovalerate to form an intermediary ketone that can cyclize intramolecularly to yield an imine (PubMed:31885262). The imine can be reduced by flvB to yield the 6-carboxylated pipecolate (PubMed:31885262). The C-terminal alpha-KG-dependent oxygenase domain of flvA is then proposed to catalyze the decarboxylation to yield dimethylpipecolate (PubMed:31885262). Secondary metabolite biosynthesis; terpenoid biosynthesis. In the N-terminal section; belongs to the trans-sulfuration enzymes family. In the C-terminal section; belongs to the iron/ascorbate-dependent oxidoreductase family.