<commit_before>package Modules {
	import Values.Value;
	import Values.NumericValue;
	import Values.OpcodeValue;
	import Components.Port;
	/**
	 * ...
	 * @author Nicholas "PleasingFungus" Feinberg
	 */
	public class ASU extends Module {
		
		public function ASU(X:int, Y:int) {
			super(X, Y, "+-", Module.CAT_ARITH, 2, 1, 1);
			delay = 4;
		}
		
		override public function drive(port:Port):Value {<commit_msg>ASU internals<commit_after>package Modules {
	import Values.Value;
	import Values.NumericValue;
	import Values.OpcodeValue;
	import Components.Port;
	
	import Layouts.*;
	import flash.geom.Point;
	/**
	 * ...
	 * @author Nicholas "PleasingFungus" Feinberg
	 */
	public class ASU extends Module {
		
		public function ASU(X:int, Y:int) {
			super(X, Y, "+-", Module.CAT_ARITH, 2, 1, 1);
			delay = 4;
		}
		
		override protected function generateLayout():ModuleLayout {
			var layout:ModuleLayout = super.generateLayout();
			layout.dim.x -= 2;
			layout.dim.y -= 2;
			layout.ports[3].offset.y += 2;
			layout.ports[3].offset.x -= 2;
			return layout;
		}
		
		override protected function generateInternalLayout():InternalLayout {
			var controlport:PortLayout = layout.ports[2];
			var outport:PortLayout = layout.ports[3];
			return new InternalLayout([new InternalNode(this, new Point(outport.offset.x - layout.dim.x / 2 - 1 / 2, outport.offset.y),
														[layout.ports[0], layout.ports[1], outport], [],
														function getValue():Value { return drive(outputs[0]); } ),
									   new InternalNode(this, new Point(controlport.offset.x, controlport.offset.y + 3),
														[controlport], [],
														function getValue():Value {
															switch (controls[0].getValue().toNumber()) {
																case OpcodeValue.OP_ADD.toNumber(): return OpcodeValue.OP_ADD;
																case OpcodeValue.OP_SUB.toNumber(): return OpcodeValue.OP_SUB;
																default: return U.V_UNKNOWN;
															}
														})]);
		}
		
		override public function drive(port:Port):Value {
{'fraction_non_alphanumeric': 0.13228035538005922, 'fraction_numerical': 0.011846001974333662, 'mean_word_length': 2.890595009596929, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3054236', 'n_tokens_mistral': 854, 'n_tokens_neox': 634, 'n_words': 142}