/* ------------------------------------------------------------
copyright: "Copyright (c) 2024 Punk Labs LLC"
license: "GPLv3 (or later)"
name: "OneTrick B-BOI DSP"
Code generated with Faust 2.74.6 (https://faust.grame.fr)
Compilation options: -a arch.rs -lang rust -ct 0 -cn DSP_VoiceChanger -dtl 65536 -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0
------------------------------------------------------------ */
use faust_types::*;
use onetrick::faust::FaustDspExtended;



fn DSP_VoiceChanger_faustpower2_f(value: F32) -> F32 {
	return value * value;
}
mod ffi {
	use std::os::raw::{c_float};
	// Conditionally compile the link attribute only on non-Windows platforms
	#[cfg_attr(not(target_os="windows"), link(name="m"))]
	extern {
		pub fn remainderf(from: c_float, to: c_float) -> c_float;
		pub fn rintf(val: c_float) -> c_float;
	}
}
fn remainder_f32(from: f32, to: f32) -> f32 {
	unsafe { ffi::remainderf(from, to) }
}
fn rint_f32(val: f32) -> f32 {
	unsafe { ffi::rintf(val) }
}

#[cfg_attr(feature = "default-boxed", derive(default_boxed::DefaultBoxed))]
#[repr(C)]
pub struct DSP_VoiceChanger {
	fButton0: F32,
	fVec0: [F32;2],
	fSampleRate: i32,
	fConst0: F32,
	fConst1: F32,
	fConst2: F32,
	fHslider0: F32,
	fRec0: [F32;2],
	fConst3: F32,
	fHslider1: F32,
	fRec1: [F32;2],
	fEntry0: F32,
	fEntry1: F32,
	fHslider2: F32,
	fRec4: [F32;2],
	fConst4: F32,
	fRec3: [F32;2],
	fConst5: F32,
	fConst6: F32,
	iConst7: i32,
	iRec8: [i32;2],
	fConst8: F32,
	fConst9: F32,
	fConst10: F32,
	fConst11: F32,
	fConst12: F32,
	fConst13: F32,
	fConst14: F32,
	fRec9: [F32;3],
	fConst15: F32,
	fRec7: [F32;2],
	fRec5: [F32;2],
	IOTA0: i32,
	fRec6: [F32;16384],
	fRec2: [F32;3],
	fHslider3: F32,
	fConst16: F32,
	fHslider4: F32,
	fConst17: F32,
	fHslider5: F32,
	fRec11: [F32;3],
	fRec10_widx: i32,
	fRec10: [F32;96002],
	fHslider6: F32,
	fRec12: [F32;2],
}

impl FaustDsp for DSP_VoiceChanger {
	type T = F32;
		
	fn new() -> DSP_VoiceChanger { 
		DSP_VoiceChanger {
			fButton0: 0.0,
			fVec0: [0.0;2],
			fSampleRate: 0,
			fConst0: 0.0,
			fConst1: 0.0,
			fConst2: 0.0,
			fHslider0: 0.0,
			fRec0: [0.0;2],
			fConst3: 0.0,
			fHslider1: 0.0,
			fRec1: [0.0;2],
			fEntry0: 0.0,
			fEntry1: 0.0,
			fHslider2: 0.0,
			fRec4: [0.0;2],
			fConst4: 0.0,
			fRec3: [0.0;2],
			fConst5: 0.0,
			fConst6: 0.0,
			iConst7: 0,
			iRec8: [0;2],
			fConst8: 0.0,
			fConst9: 0.0,
			fConst10: 0.0,
			fConst11: 0.0,
			fConst12: 0.0,
			fConst13: 0.0,
			fConst14: 0.0,
			fRec9: [0.0;3],
			fConst15: 0.0,
			fRec7: [0.0;2],
			fRec5: [0.0;2],
			IOTA0: 0,
			fRec6: [0.0;16384],
			fRec2: [0.0;3],
			fHslider3: 0.0,
			fConst16: 0.0,
			fHslider4: 0.0,
			fConst17: 0.0,
			fHslider5: 0.0,
			fRec11: [0.0;3],
			fRec10_widx: 0,
			fRec10: [0.0;96002],
			fHslider6: 0.0,
			fRec12: [0.0;2],
		}
	}
	fn metadata(&self, m: &mut dyn Meta) { 
		m.declare("basics.lib/bitcrusher:author", r"Julius O. Smith III, revised by Stephane Letz");
		m.declare("basics.lib/downSample:author", r"Romain Michon");
		m.declare("basics.lib/name", r"Faust Basic Element Library");
		m.declare("basics.lib/sAndH:author", r"Romain Michon");
		m.declare("basics.lib/tabulateNd", r"Copyright (C) 2023 Bart Brouns <bart@magnetophon.nl>");
		m.declare("basics.lib/version", r"1.18.0");
		m.declare("compile_options", r"-a arch.rs -lang rust -ct 0 -cn DSP_VoiceChanger -dtl 65536 -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0");
		m.declare("copyright", r"Copyright (c) 2024 Punk Labs LLC");
		m.declare("delays.lib/name", r"Faust Delay Library");
		m.declare("delays.lib/version", r"1.1.0");
		m.declare("filename", r"voicechanger.dsp");
		m.declare("filters.lib/fir:author", r"Julius O. Smith III");
		m.declare("filters.lib/fir:copyright", r"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>");
		m.declare("filters.lib/fir:license", r"MIT-style STK-4.3 license");
		m.declare("filters.lib/highpass:author", r"Julius O. Smith III");
		m.declare("filters.lib/highpass:copyright", r"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>");
		m.declare("filters.lib/iir:author", r"Julius O. Smith III");
		m.declare("filters.lib/iir:copyright", r"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>");
		m.declare("filters.lib/iir:license", r"MIT-style STK-4.3 license");
		m.declare("filters.lib/lowpass0_highpass1", r"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>");
		m.declare("filters.lib/lowpass0_highpass1:author", r"Julius O. Smith III");
		m.declare("filters.lib/lowpass:author", r"Julius O. Smith III");
		m.declare("filters.lib/lowpass:copyright", r"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>");
		m.declare("filters.lib/lowpass:license", r"MIT-style STK-4.3 license");
		m.declare("filters.lib/name", r"Faust Filters Library");
		m.declare("filters.lib/resonlp:author", r"Julius O. Smith III");
		m.declare("filters.lib/resonlp:copyright", r"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>");
		m.declare("filters.lib/resonlp:license", r"MIT-style STK-4.3 license");
		m.declare("filters.lib/tf2:author", r"Julius O. Smith III");
		m.declare("filters.lib/tf2:copyright", r"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>");
		m.declare("filters.lib/tf2:license", r"MIT-style STK-4.3 license");
		m.declare("filters.lib/tf2s:author", r"Julius O. Smith III");
		m.declare("filters.lib/tf2s:copyright", r"Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>");
		m.declare("filters.lib/tf2s:license", r"MIT-style STK-4.3 license");
		m.declare("filters.lib/version", r"1.3.0");
		m.declare("license", r"GPLv3 (or later)");
		m.declare("maths.lib/author", r"GRAME");
		m.declare("maths.lib/copyright", r"GRAME");
		m.declare("maths.lib/license", r"LGPL with exception");
		m.declare("maths.lib/name", r"Faust Math Library");
		m.declare("maths.lib/version", r"2.8.0");
		m.declare("misceffects.lib/dryWetMixer:author", r"David Braun, revised by Stéphane Letz");
		m.declare("misceffects.lib/name", r"Misc Effects Library");
		m.declare("misceffects.lib/version", r"2.5.0");
		m.declare("name", r"OneTrick B-BOI DSP");
		m.declare("onetrick.lib/copyright", r"Copyright (c) 2023 Punk Labs LLC");
		m.declare("onetrick.lib/license", r"GPLv3 (or later)");
		m.declare("onetrick.lib/name", r"OneTrick DSP Library");
		m.declare("params.lib/copyright", r"Copyright (c) 2023 Punk Labs LLC");
		m.declare("params.lib/license", r"GPLv3 (or later)");
		m.declare("params.lib/name", r"OneTrick B-BOI DSP");
		m.declare("platform.lib/name", r"Generic Platform Library");
		m.declare("platform.lib/version", r"1.3.0");
		m.declare("shared.lib/copyright", r"Copyright (c) 2024 Punk Labs LLC");
		m.declare("shared.lib/license", r"GPLv3 (or later)");
		m.declare("shared.lib/name", r"OneTrick B-BOI DSP");
		m.declare("signals.lib/name", r"Faust Signal Routing Library");
		m.declare("signals.lib/version", r"1.5.0");
	}

	fn get_sample_rate(&self) -> i32 {
		return self.fSampleRate;
	}
	fn get_num_inputs(&self) -> i32 {
		return 1;
	}
	fn get_num_outputs(&self) -> i32 {
		return 2;
	}
	
	fn class_init(sample_rate: i32) {
	}
	fn instance_reset_params(&mut self) {
		self.fButton0 = 0.0;
		self.fHslider0 = 2e+01;
		self.fHslider1 = 0.0;
		self.fEntry0 = 0.0;
		self.fEntry1 = 0.0;
		self.fHslider2 = 0.0;
		self.fHslider3 = 2.5;
		self.fHslider4 = 2e+02;
		self.fHslider5 = 0.0;
		self.fHslider6 = 0.0;
	}
	fn instance_clear(&mut self) {
		for l0 in 0..2 {
			self.fVec0[l0 as usize] = 0.0;
		}
		for l1 in 0..2 {
			self.fRec0[l1 as usize] = 0.0;
		}
		for l2 in 0..2 {
			self.fRec1[l2 as usize] = 0.0;
		}
		for l3 in 0..2 {
			self.fRec4[l3 as usize] = 0.0;
		}
		for l4 in 0..2 {
			self.fRec3[l4 as usize] = 0.0;
		}
		for l5 in 0..2 {
			self.iRec8[l5 as usize] = 0;
		}
		for l6 in 0..3 {
			self.fRec9[l6 as usize] = 0.0;
		}
		for l7 in 0..2 {
			self.fRec7[l7 as usize] = 0.0;
		}
		for l8 in 0..2 {
			self.fRec5[l8 as usize] = 0.0;
		}
		self.IOTA0 = 0;
		for l9 in 0..16384 {
			self.fRec6[l9 as usize] = 0.0;
		}
		for l10 in 0..3 {
			self.fRec2[l10 as usize] = 0.0;
		}
		for l11 in 0..3 {
			self.fRec11[l11 as usize] = 0.0;
		}
		for l12 in 0..96002 {
			self.fRec10[l12 as usize] = 0.0;
		}
		for l13 in 0..2 {
			self.fRec12[l13 as usize] = 0.0;
		}
	}
	fn instance_constants(&mut self, sample_rate: i32) {
		self.fSampleRate = sample_rate;
		self.fConst0 = F32::min(1.92e+05, F32::max(1.0, (self.fSampleRate) as F32));
		self.fConst1 = F32::exp(-(1e+02 / self.fConst0));
		self.fConst2 = 0.5 * self.fConst0;
		self.fConst3 = 3.1415927 / self.fConst0;
		self.fConst4 = 0.01 * self.fConst0;
		self.fConst5 = 4e+02 / self.fConst0;
		self.fConst6 = self.fConst0 / F32::min(9.38e+03, self.fConst0);
		self.iConst7 = (self.fConst6) as i32;
		self.fConst8 = F32::tan(1570.7964 / self.fConst0);
		self.fConst9 = DSP_VoiceChanger_faustpower2_f(self.fConst8);
		self.fConst10 = 2.0 * (1.0 - 1.0 / self.fConst9);
		self.fConst11 = 1.0 / self.fConst8;
		self.fConst12 = (self.fConst11 + -1.4142135) / self.fConst8 + 1.0;
		self.fConst13 = (self.fConst11 + 1.4142135) / self.fConst8 + 1.0;
		self.fConst14 = 1.0 / self.fConst13;
		self.fConst15 = 255.0 / (self.fConst9 * self.fConst13);
		self.fConst16 = 3141.5928 / self.fConst0;
		self.fConst17 = 0.001 * self.fConst0;
		self.fRec10_widx = 0;
	}
	fn instance_init(&mut self, sample_rate: i32) {
		self.instance_constants(sample_rate);
		self.instance_reset_params();
		self.instance_clear();
	}
	fn init(&mut self, sample_rate: i32) {
		DSP_VoiceChanger::class_init(sample_rate);
		self.instance_init(sample_rate);
	}
	
	fn build_user_interface(&self, ui_interface: &mut dyn UI<Self::T>) {
		Self::build_user_interface_static(ui_interface);
	}
	
	fn build_user_interface_static(ui_interface: &mut dyn UI<Self::T>) {
		ui_interface.open_vertical_box("OneTrick B-BOI DSP");
		ui_interface.add_num_entry("PitchWheel", ParamIndex(0), 0.0, -1.0, 1.0, 0.001);
		ui_interface.add_num_entry("Transpose", ParamIndex(1), 0.0, -48.0, 48.0, 0.001);
		ui_interface.add_button("WakeUp", ParamIndex(2));
		ui_interface.declare(Some(ParamIndex(3)), "1010", "");
		ui_interface.declare(Some(ParamIndex(3)), "export", "Lowpass");
		ui_interface.declare(Some(ParamIndex(3)), "group", "Voice");
		ui_interface.declare(Some(ParamIndex(3)), "unit", "kHz");
		ui_interface.add_horizontal_slider("Voice_Lowpass", ParamIndex(3), 2e+01, 1.0, 2e+01, 0.01);
		ui_interface.declare(Some(ParamIndex(4)), "1020", "");
		ui_interface.declare(Some(ParamIndex(4)), "export", "Transpose");
		ui_interface.declare(Some(ParamIndex(4)), "group", "Voice");
		ui_interface.declare(Some(ParamIndex(4)), "unit", "st");
		ui_interface.add_horizontal_slider("Voice_Transpose", ParamIndex(4), 0.0, -24.0, 24.0, 0.01);
		ui_interface.declare(Some(ParamIndex(5)), "1030", "");
		ui_interface.declare(Some(ParamIndex(5)), "export", "Delay Amount");
		ui_interface.declare(Some(ParamIndex(5)), "group", "Voice");
		ui_interface.declare(Some(ParamIndex(5)), "unit", "%");
		ui_interface.add_horizontal_slider("Voice_DelayAmount", ParamIndex(5), 0.0, 0.0, 9e+01, 0.01);
		ui_interface.declare(Some(ParamIndex(6)), "1040", "");
		ui_interface.declare(Some(ParamIndex(6)), "export", "Delay MS");
		ui_interface.declare(Some(ParamIndex(6)), "group", "Voice");
		ui_interface.declare(Some(ParamIndex(6)), "unit", "ms");
		ui_interface.add_horizontal_slider("Voice_DelayMS", ParamIndex(6), 2e+02, 5e+01, 5e+02, 0.01);
		ui_interface.declare(Some(ParamIndex(7)), "1050", "");
		ui_interface.declare(Some(ParamIndex(7)), "export", "Delay Lowpass");
		ui_interface.declare(Some(ParamIndex(7)), "group", "Voice");
		ui_interface.declare(Some(ParamIndex(7)), "unit", "kHz");
		ui_interface.add_horizontal_slider("Voice_DelayCutoff", ParamIndex(7), 2.5, 1.0, 5.0, 0.01);
		ui_interface.declare(Some(ParamIndex(8)), "110", "");
		ui_interface.declare(Some(ParamIndex(8)), "export", "Gain");
		ui_interface.declare(Some(ParamIndex(8)), "group", "Mix");
		ui_interface.declare(Some(ParamIndex(8)), "unit", "dB");
		ui_interface.add_horizontal_slider("Mix_Gain", ParamIndex(8), 0.0, -1e+02, 6.0, 0.1);
		ui_interface.declare(Some(ParamIndex(9)), "120", "");
		ui_interface.declare(Some(ParamIndex(9)), "export", "Pan");
		ui_interface.declare(Some(ParamIndex(9)), "group", "Mix");
		ui_interface.declare(Some(ParamIndex(9)), "unit", "%");
		ui_interface.add_horizontal_slider("Mix_Pan", ParamIndex(9), 0.0, -1e+02, 1e+02, 0.01);
		ui_interface.close_box();
	}
	
	fn get_param(&self, param: ParamIndex) -> Option<Self::T> {
		match param.0 {
			2 => Some(self.fButton0),
			0 => Some(self.fEntry0),
			1 => Some(self.fEntry1),
			3 => Some(self.fHslider0),
			8 => Some(self.fHslider1),
			4 => Some(self.fHslider2),
			7 => Some(self.fHslider3),
			6 => Some(self.fHslider4),
			5 => Some(self.fHslider5),
			9 => Some(self.fHslider6),
			_ => None,
		}
	}
	
	fn set_param(&mut self, param: ParamIndex, value: Self::T) {
		match param.0 {
			2 => { self.fButton0 = value }
			0 => { self.fEntry0 = value }
			1 => { self.fEntry1 = value }
			3 => { self.fHslider0 = value }
			8 => { self.fHslider1 = value }
			4 => { self.fHslider2 = value }
			7 => { self.fHslider3 = value }
			6 => { self.fHslider4 = value }
			5 => { self.fHslider5 = value }
			9 => { self.fHslider6 = value }
			_ => {}
		}
	}
	
	fn compute(&mut self, count: i32, inputs: &[&[Self::T]], outputs: &mut[&mut[Self::T]]) {
		let (inputs0) = if let [inputs0, ..] = inputs {
			let inputs0 = inputs0[..count as usize].iter();
			(inputs0)
		} else {
			panic!("wrong number of inputs");
		};
		let (outputs0, outputs1) = if let [outputs0, outputs1, ..] = outputs {
			let outputs0 = outputs0[..count as usize].iter_mut();
			let outputs1 = outputs1[..count as usize].iter_mut();
			(outputs0, outputs1)
		} else {
			panic!("wrong number of outputs");
		};
		let mut fSlow0: F32 = self.fButton0;
		let mut fSlow1: F32 = F32::min(self.fConst2, 1e+03 * self.fHslider0);
		let mut fSlow2: F32 = F32::max(-1e+02, self.fHslider1);
		let mut fSlow3: F32 = self.fHslider2 + self.fEntry1 + 12.0 * self.fEntry0;
		let mut fSlow4: F32 = F32::tan(self.fConst16 * self.fHslider3);
		let mut fSlow5: F32 = 2.0 * (1.0 - 1.0 / DSP_VoiceChanger_faustpower2_f(fSlow4));
		let mut fSlow6: F32 = 1.0 / fSlow4;
		let mut fSlow7: F32 = (fSlow6 + -1.4142135) / fSlow4 + 1.0;
		let mut fSlow8: F32 = 1.0 / ((fSlow6 + 1.4142135) / fSlow4 + 1.0);
		let mut iSlow9: i32 = i32::wrapping_add((F32::min(9.6e+04, F32::max(0.0, self.fConst17 * self.fHslider4))) as i32, 1);
		let mut fSlow10: F32 = 0.01 * self.fHslider5;
		let mut fSlow11: F32 = 0.01 * self.fHslider6;
		let zipped_iterators = inputs0.zip(outputs0).zip(outputs1);
		for ((input0, output0), output1) in zipped_iterators {
			self.fVec0[0] = fSlow0;
			let mut fTemp0: F32 = ((fSlow0 <= self.fVec0[1]) as i32) as u32 as F32;
			let mut fTemp1: F32 = 1.0 - self.fConst1 * fTemp0;
			self.fRec0[0] = fSlow1 * fTemp1 + self.fConst1 * fTemp0 * self.fRec0[1];
			let mut fTemp2: F32 = F32::tan(self.fConst3 * self.fRec0[0]);
			let mut fTemp3: F32 = 1.0 / fTemp2;
			let mut fTemp4: F32 = (fTemp3 + 0.8333333) / fTemp2 + 1.0;
			self.fRec1[0] = fSlow2 * fTemp1 + self.fConst1 * fTemp0 * self.fRec1[1];
			self.fRec4[0] = fSlow3 * fTemp1 + self.fConst1 * fTemp0 * self.fRec4[1];
			self.fRec3[0] = (self.fConst4 + self.fRec3[1] + (1.0 - F32::powf(2.0, 0.083333336 * self.fRec4[0]))) % self.fConst4;
			let mut fTemp5: F32 = F32::min(self.fConst5 * self.fRec3[0], 1.0);
			self.iRec8[0] = i32::wrapping_add(self.iRec8[1], 1);
			self.fRec9[0] = *input0 - self.fConst14 * (self.fConst12 * self.fRec9[2] + self.fConst10 * self.fRec9[1]);
			self.fRec7[0] = if (((i32::wrapping_add(self.iRec8[0], -1)) % self.iConst7) == 0) as i32 != 0 {0.003921569 * F32::round(self.fConst15 * (self.fRec9[2] + (self.fRec9[0] - 2.0 * self.fRec9[1])))} else {self.fRec7[1]};
			let mut fTemp6: F32 = if (self.fRec7[0] != self.fRec7[1]) as i32 != 0 {self.fConst6} else {self.fRec5[1] + -1.0};
			self.fRec5[0] = fTemp6;
			let mut fTemp7: F32 = self.fRec6[((i32::wrapping_sub(self.IOTA0, 1)) & 16383) as usize];
			self.fRec6[(self.IOTA0 & 16383) as usize] = if (fTemp6 > 0.0) as i32 != 0 {fTemp7 + (self.fRec7[0] - fTemp7) / fTemp6} else {self.fRec7[0]};
			let mut fTemp8: F32 = self.fConst4 + self.fRec3[0];
			let mut iTemp9: i32 = (fTemp8) as i32;
			let mut fTemp10: F32 = F32::floor(fTemp8);
			let mut fTemp11: F32 = 1.0 - self.fRec3[0];
			let mut iTemp12: i32 = (self.fRec3[0]) as i32;
			let mut fTemp13: F32 = F32::floor(self.fRec3[0]);
			self.fRec2[0] = (self.fRec6[((i32::wrapping_sub(self.IOTA0, std::cmp::min(16383, std::cmp::max(0, iTemp12)))) & 16383) as usize] * (fTemp13 + fTemp11) + (self.fRec3[0] - fTemp13) * self.fRec6[((i32::wrapping_sub(self.IOTA0, std::cmp::min(16383, std::cmp::max(0, i32::wrapping_add(iTemp12, 1))))) & 16383) as usize]) * fTemp5 + (self.fRec6[((i32::wrapping_sub(self.IOTA0, std::cmp::min(16383, std::cmp::max(0, iTemp9)))) & 16383) as usize] * (fTemp10 + fTemp11 - self.fConst4) + (self.fConst4 + (self.fRec3[0] - fTemp10)) * self.fRec6[((i32::wrapping_sub(self.IOTA0, std::cmp::min(16383, std::cmp::max(0, i32::wrapping_add(iTemp9, 1))))) & 16383) as usize]) * (1.0 - fTemp5) - (self.fRec2[2] * ((fTemp3 + -0.8333333) / fTemp2 + 1.0) + 2.0 * self.fRec2[1] * (1.0 - 1.0 / DSP_VoiceChanger_faustpower2_f(fTemp2))) / fTemp4;
			let mut fTemp14: F32 = (self.fRec2[2] + self.fRec2[0] + 2.0 * self.fRec2[1]) * F32::powf(1e+01, 0.05 * self.fRec1[0]) / fTemp4;
			let mut fRec10_ridx_tmp0: i32 = i32::wrapping_sub(self.fRec10_widx, iSlow9);
			self.fRec11[0] = fSlow10 * self.fRec10[(if (fRec10_ridx_tmp0 < 0) as i32 != 0 {i32::wrapping_add(fRec10_ridx_tmp0, 96002)} else {fRec10_ridx_tmp0}) as usize] - fSlow8 * (fSlow7 * self.fRec11[2] + fSlow5 * self.fRec11[1]);
			let mut fRec10_widx_tmp: i32 = self.fRec10_widx;
			self.fRec10[fRec10_widx_tmp as usize] = fTemp14 + fSlow8 * (self.fRec11[2] + self.fRec11[0] + 2.0 * self.fRec11[1]);
			let mut fRec10_ridx_tmp1: i32 = self.fRec10_widx;
			let mut fTemp15: F32 = self.fRec10[(if (fRec10_ridx_tmp1 < 0) as i32 != 0 {i32::wrapping_add(fRec10_ridx_tmp1, 96002)} else {fRec10_ridx_tmp1}) as usize] + fTemp14;
			self.fRec12[0] = fSlow11 * fTemp1 + self.fConst1 * fTemp0 * self.fRec12[1];
			*output0 = F32::min(1.0, 1.0 - self.fRec12[0]) * fTemp15;
			*output1 = F32::min(1.0, self.fRec12[0] + 1.0) * fTemp15;
			self.fVec0[1] = self.fVec0[0];
			self.fRec0[1] = self.fRec0[0];
			self.fRec1[1] = self.fRec1[0];
			self.fRec4[1] = self.fRec4[0];
			self.fRec3[1] = self.fRec3[0];
			self.iRec8[1] = self.iRec8[0];
			self.fRec9[2] = self.fRec9[1];
			self.fRec9[1] = self.fRec9[0];
			self.fRec7[1] = self.fRec7[0];
			self.fRec5[1] = self.fRec5[0];
			self.IOTA0 = i32::wrapping_add(self.IOTA0, 1);
			self.fRec2[2] = self.fRec2[1];
			self.fRec2[1] = self.fRec2[0];
			self.fRec11[2] = self.fRec11[1];
			self.fRec11[1] = self.fRec11[0];
			fRec10_widx_tmp = i32::wrapping_add(fRec10_widx_tmp, 1);
			fRec10_widx_tmp = if (fRec10_widx_tmp == 96002) as i32 != 0 {0} else {fRec10_widx_tmp};
			self.fRec10_widx = fRec10_widx_tmp;
			self.fRec12[1] = self.fRec12[0];
		}
	}

}

