VERSION = 117;

!The maximum distance between signal ports or anchors connected via wire.
!Warning: wires much longer than 16 blocks may have visual chunk clipping glitches.
max_wire_length = 16;

block_plug_range = 8; !maximum range for Block Access Plugs

max_split_links = 8; !maximum number of connections for Splitter Plugs

block_select_range = 64; !maximum distance a Block Selector will scan for Frame Blocks in each direction.
teleporter_range = 64; !maximum distance a Block Teleporter will scan for Frame Blocks in each direction.
chunk_loader_range = 64; !maximum distance a Chunk Loader will scan for Frame Blocks in each direction.

chunkload_time_cap = 48.0; !maximum time in hours a Chunk Loader can store internally. 
chunkload_item_time = 4.0; !how many hours are recharged per Time Essence item.
!When a Chunk Loader is loading more than one chunk, it will always consume time at twice the rate, even if it loads more than two chunks.
!The chunk limit per ticket in Forge chunk loading config also defines the limit per device.

blockref_livespan = 16; !how long a Block Reference stays valid after creation. This is to prevent long term storage of Block Reference Signals using delay loop contraptions. 

panel_text_render_dst = 12.0; !Distance from Control Panel in which text labels are rendered. [Client side]
panel_sync_dst_min = 16.0; !Distance from Control Panel below which it starts sending state updates to client. [Client side]
panel_sync_dst_max = 18.0; !Distance from Control Panel above which it stops sending state updates to client, must be greater than dst_min. [Server side]

!Energy conversions (this mod's energy system operates integer based in quite small scale units):
energy_unit_FE = 100; !Forge Energy 
energy_unit_EU = 400; !Industrialcraft
energy_unit_OC = 1000; !OpenComputers

!All energy values in internal units:
energy_item_translocator_op = 100; !energy consumed by the Item Translocator per clock pulse.
energy_item_translocator_ps = 400; !energy consumed by the Item Translocator per stack (64 items) transferred.
energy_fluid_translocator_op = 100; !energy consumed by the Fluid Translocator per clock pulse.
energy_fluid_translocator_pb = 500; !energy consumed by the Fluid Translocator per bucket (1000 mB) transferred.
energy_fluid_translocator_world = 500; !additional energy consumed by the Fluid Translocator when placing/pumping fluid blocks in the world
energy_solar = 100; !energy generated by Solar Cell per tick under full sunlight.
energy_breaker_op = 2000; !base energy consumed by the Block Breaker per block mined.
energy_breaker_hard = 4000; !additional energy consumed by the Block Breaker per block hardness unit (Stone = 1.5).
energy_breaker_byhand = 0.5; !total energy consumption multiplier for blocks that can be harvested without tool.
energy_breaker_speed = 8.0; !energy consumption increase when running the Block Breaker at max clock speed.
!total_energy_cost = (energy_breaker_op + energy_breaker_hard * block_hardness) * (1 + energy_breaker_speed / ticks_since_last_op)
energy_placer_op = 1000; !base energy consumed by the Item User per operation.
energy_placer_speed = 8.0; !energy consumption increase when running the Item User at max clock speed.
!total_energy_cost = energy_placer_op * (1 + energy_placer_speed / ticks_since_last_op)
energy_teleport_pb = 2000; !energy consumed by the Block Teleporter per hypercube volume (width * height * length * distance)
teleport_dist_cap = 512; !upper limit for the distance used in energy cost computation (also the distance used when moving between dimensions)

{
	!Teleporter white/blacklist entry format:
	!specific blockstate: "modid:blockid@meta"
	!all states of block: "modid:blockid"
	!all blocks from mod: "modid:"
	
	!By default all breakable blocks can be moved by a teleporter. Blocks that should NOT be movable must be added here.
	teleport_blacklist = [
	];
	!By default unbreakable blocks can't be moved by a teleporter. Blocks that should be movable anyway must be added here.
	teleport_whitelist = [
		"draconicevolution:reactor_core" !prevent dangerous situations where the stabilizers would move without the core.
	];
}

PRE_INIT() {
	add("item", 400, "battery", "rs_ctr:battery");
	add("item", 401, "actuator");
	add("item", 402, "telekin_alloy");
	add("item", 403, "corerope");
	add("item", 404, "corerope1");
	add("item", 405, "corerope2");
}

INIT() {
	!items that can be used as capacitors in Power Distribution Hub (all Forge Energy compatible items already work without need for registration)
	add("battery", it("minecraft:command_block"), -1); !creative power
	add("battery", it("m.battery"), 2000000);
	add("shaped", it("m.battery"), "010/232/010", "nuggetGold", it("item.wire_e"), "dustRedstone", it("minecraft:coal"):1);
	
	!processor assembly materials
	!add("circuitMat", <item>, baseCmp, advCmp, memory, -size, gain, cap);
	add("circuitMat", ore("dustRedstone"),   2,  0,  0,  -2,  1,  8); !1.0  cmp/size, 0.5 gain/cmp, 2.0  cmp/it
	add("circuitMat", ore("blockRedstone"), 16,  0,  0, -24, 16, 64); !0.67 cmp/size, 1.0 gain/cmp, 1.78 cmp/it
	add("circuitMat", ore("gemQuartz"),      0,  4,  0,  -4,  2,  8); !1.0  cmp/size, 0.5 gain/cmp, 4.0  cmp/it
	add("circuitMat", ore("blockQuartz"),    0, 12,  0, -16, 12, 24); !0.75 cmp/size, 1.0 gain/cmp, 3.0  cmp/it
	add("circuitMat", ore("nuggetIron"),     0,  0,  1,  -1,  0,  0); !1.0  mem/size, 9.0  mem/ing
	add("circuitMat", ore("ingotIron"),      0,  0,  8,  -6,  0,  0); !1.33 mem/size, 8.0  mem/ing
	add("circuitMat", ore("blockIron"),      0,  0, 48, -30,  0,  0); !1.6  mem/size, 5.33 mem/ing
	add("circuitMat", ore("dustGlowstone"),  0,  0,  0,  -1,  2,  1); !2.0 gain/size, 2.0  gain/it
	add("circuitMat", it("minecraft:glowstone"),0,0, 0,  -2,  5,  2); !2.5 gain/size, 1.25 gain/it
	add("circuitMat", it("minecraft:redstone_torch"),3,0,0,-2,1,  4); !1.5 cmp/size, 0.33 gain/cmp, 3.0 cmp/it
	add("circuitMat", it("minecraft:repeater"),8,0,  1,  -4,  2,  8); !2.0 cmp/size, 0.25 gain/cmp, 2.67 cmp/it(rs)
	add("circuitMat", it("minecraft:comparator"),0,8,0,  -4,  2,  8); !2.0 cmp/size, 0.25 gain/cmp, 8.0 cmp/it(qu)
	add("circuitMat", it("tile.logic_comb"),24,  0,  0,  -8,  4, 16); !3.0 cmp/size, 0.17 gain/cmp, 3.4 cmp/it(rs)
	add("circuitMat", it("tile.num_comb"),   0, 24,  0,  -8,  4, 16); !3.0 cmp/size, 0.17 gain/cmp, 8.0 cmp/it(qu)
	
	!crafting recipes
	Loc slab = it("minecraft:stone_slab");
	add("shaped", it("tile.editor"), "0/1/2", it("item.wire"), it("minecraft:crafting_table"), it("minecraft:bookshelf"));
	add("shaped", it("tile.assembler"), "0/1/2", it("item.wire"), it("minecraft:anvil"), it("minecraft:chest"));
	add("shaped", 2 * it("tile.rs_port"):0, "0/1", "dustRedstone", slab);
	add("shaped", 2 * it("tile.rs_port"):1, "0/1", it("minecraft:redstone_torch"), slab);
	add("shaped", 2 * it("tile.rs_port"):2, "0/1", "gemLapis", slab);
	add("shaped", 2 * it("tile.rs_port"):3, "010/ 2 ", it("m.telekin_alloy"), it("minecraft:ender_eye"), slab);
	add("shaped", 8 * it("tile.wire_anchor"), "0/0", it("minecraft:iron_bars"));
	add("shaped", it("tile.splitter"), " 0/10/ 0", it("tile.rs_port"):0, it("tile.rs_port"):1);
	add("shaped", it("tile.splitter_b"), " 0/10/ 0", it("tile.rs_port"):2, it("item.block_wire"));
	add("shaped", it("tile.multiplex_b"), "12/13/10", it("tile.rs_port"):2, it("item.block_wire"), it("tile.rs_port"):1, it("minecraft:sticky_piston"));
	add("shaped", it("tile.delay"), "0 1/021/0 1", it("tile.rs_port"):1, it("tile.rs_port"):0, it("minecraft:repeater"));
	add("shaped", it("tile.delay_b"), "0 1/021/0 1", it("item.block_wire"), it("tile.rs_port"):2, it("minecraft:soul_sand"));
	add("shaped", it("tile.analog_comb"), "02/01/02", it("tile.rs_port"):1, it("tile.rs_port"):0, "dustRedstone");
	add("shaped", it("tile.logic_comb"), "023/021/023", it("tile.rs_port"):1, it("tile.rs_port"):0, it("minecraft:redstone_torch"), "dustRedstone");
	add("shaped", it("tile.xor_gate"), "01/ 0/01", it("tile.logic_comb"), it("item.wire"));
	add("shaped", it("tile.num_comb"), "023/021/023", it("tile.rs_port"):1, it("tile.rs_port"):0, "gemQuartz", "dustRedstone");
	add("shaped", it("tile.bin_comb"), "02/01/02", it("tile.rs_port"):1, it("tile.rs_port"):0, "gemQuartz");
	add("shaped", it("tile.bin_split"), "20/10/20", it("tile.rs_port"):0, it("tile.rs_port"):1, "gemQuartz");
	add("shaped", it("tile.counter"), "021/ 34/021", it("tile.rs_port"):1, it("tile.rs_port"):0, "gemQuartz", it("minecraft:redstone_torch"), "dustRedstone");
	add("shaped", it("tile.comparator"), "0 /31/2 ", it("tile.rs_port"):1, it("tile.rs_port"):0, it("item.block_wire"), it("minecraft:comparator"));
	add("shaped", it("tile.block_deserializer"), "012", it("tile.comparator"), it("minecraft:compass"), it("tile.num_comb"));
	add("shaped", it("tile.block_reorienter"), "01", it("item.wrench"), it("tile.multiplex_b"));
	add("shaped", it("tile.power_hub"), "010/020", it("item.wire_e"), "ingotGold", slab);
	add("shaped", it("tile.solar_cell"), "222/010", it("item.wire_e"), it("minecraft:daylight_detector"), "gemLapis");
	add("shaped", it("tile.panel"), "0/1", "paper", slab);
	add("shapeless", 4 * it("m.telekin_alloy"), "gemDiamond", "gemLapis", "gemLapis", "gemLapis", "gemLapis");
	add("shaped", 2 * it("m.actuator"), "010/232/454", it("m.telekin_alloy"), "enderpearl", slab:7, it("minecraft:piston"), "dustRedstone", it("item.wire_e"));
	add("shaped", it("tile.item_translocator"), "020/ 3 /001", it("tile.rs_port"):1, it("tile.rs_port"):0, it("minecraft:chest"), it("m.actuator"));
	add("shaped", it("tile.fluid_translocator"), " 2 / 3 /001", it("tile.rs_port"):1, it("tile.rs_port"):0, it("minecraft:bucket"), it("m.actuator"));
	add("shaped", it("tile.energy_valve"), "202/031/242", it("tile.rs_port"):1, it("tile.rs_port"):0, "ingotGold", "blockRedstone", slab:7);
	add("shaped", 4 * it("tile.frame"), " 0 /010/ 0 ", it("minecraft:obsidian"), it("m.telekin_alloy"));
	add("shaped", it("tile.block_selector"), "010/222", it("m.telekin_alloy"), it("tile.frame"), it("tile.multiplex_b"));
	add("shaped", it("tile.block_breaker1"), "254/535/0 1", it("tile.rs_port"):1, it("tile.rs_port"):0, it("minecraft:golden_pickaxe"), it("m.actuator"), it("minecraft:hopper"), "ingotIron");
	add("shapedNBT", "#ench", it("tile.block_breaker"), "01", it("tile.block_breaker1"), it("minecraft:diamond_pickaxe"));
	add("shaped", it("tile.item_placer"), "254/535/001", it("tile.rs_port"):1, it("tile.rs_port"):0, it("minecraft:skull"):2, it("m.actuator"), it("minecraft:dispenser"), "ingotIron");
	add("shaped", it("tile.chunk_loader"), "202/010/304", it("item.cl_fuel"), it("tile.frame"), it("minecraft:clock"), it("tile.rs_port"):1, it("tile.rs_port"):0);
	add("shaped", it("tile.teleporter1"), "343/525/0 1", it("tile.rs_port"):1, it("tile.rs_port"):0, it("m.actuator"), it("minecraft:obsidian"), "blockDiamond", it("minecraft:ender_eye"));
	add("shaped", it("tile.teleporter"), " 2 / 0 / 1 ", it("tile.frame"), it("tile.teleporter1"), it("minecraft:dragon_egg"));
	add("shaped", it("tile.ram"), "021", it("tile.bin_comb"), it("tile.bin_split"), it("tile.logic_comb"));
	add("shaped", it("tile.ram"):5, "1/0", it("tile.ram"), it("m.corerope1"));
	add("shaped", it("tile.ram"):7, "101", it("tile.ram"):5, it("m.corerope1"));
	add("shaped", it("tile.ram"):9, "1/0", it("tile.ram"):7, it("m.corerope2"));
	add("shaped", it("tile.ram"):11, "101", it("tile.ram"):9, it("m.corerope2"));
	add("shaped", it("tile.ram"):13, " 1 /101/ 1 ", it("tile.ram"):11, it("m.corerope2"));
	add("shaped", it("tile.ram"):5, "0", it("tile.ram"):5);
	add("shaped", it("tile.ram"):7, "0", it("tile.ram"):7);
	add("shaped", it("tile.ram"):9, "0", it("tile.ram"):9);
	add("shaped", it("tile.ram"):11, "0", it("tile.ram"):11);
	add("shaped", it("tile.ram"):13, "0", it("tile.ram"):13);
	add("shaped", 8 * it("item.wire"), "010", "dustRedstone", it("minecraft:string"));
	add("shaped", 8 * it("item.wire_e"), "000/010/000", it("item.wire"), "ingotGold");
	add("shaped", 8 * it("item.block_wire"), "000/010/000", it("item.wire"), it("m.telekin_alloy"));
	add("shapeless", 4 * it("item.split_s"), it("tile.splitter"));
	add("shapeless", 4 * it("item.split_b"), it("tile.splitter_b"));
	add("shaped", it("item.wireless"), "000/010/000", it("item.wire"), "enderpearl");
	add("shaped", it("item.wireless_b"), " 1 /020/ 1 ", it("item.wireless"), it("m.telekin_alloy"), it("minecraft:nether_star"));
	add("shaped", it("item.constant"), "1/0", it("item.wire"), it("minecraft:redstone_torch"));
	add("shaped", it("item.block_plug"), "000/010/000", it("item.block_wire"), it("tile.rs_port"):2);
	add("shaped", it("item.lamp"), "1/0", it("item.wire"), "dustGlowstone");
	add("shaped", it("item.tag"), "1/0", it("item.wire"), it("minecraft:name_tag"));
	add("shaped", 3 * it("item.clock"), " 1 /000", it("item.wire"), it("minecraft:clock"));
	add("shaped", it("item.edge_trigger"), " 4 / 3 /102", it("item.wire"), it("minecraft:redstone_torch"), it("minecraft:repeater"), it("minecraft:lever"), it("tile.rs_port"):0);
	add("shaped", it("item.pulse_gen"), " 4 / 3 /102", it("item.wire"), it("minecraft:redstone_torch"), it("minecraft:repeater"), "dustRedstone", it("tile.rs_port"):0);
	add("shaped", it("item.wrench"), "0/0/1", "nuggetIron", "plankWood");
	add("shaped", it("item.signal_probe"), "0 0/121/343", it("item.wrench"), it("item.wire"), "paneGlass", it("minecraft:stone_button"), "dustGlowstone");
	add("shaped", it("item.pointer_dsp"), "0/1", it("minecraft:compass"), it("item.wire"));
	add("shaped", it("item.seg7"), "000/121", it("item.lamp"), "gemQuartz", "dustRedstone");
	add("shaped", it("item.slider"), "1 2/000", it("minecraft:coal"):1, it("minecraft:redstone_torch"), it("item.wire"));
	add("shaped", it("item.lever"):0, "0/1", it("minecraft:lever"), it("item.constant"));
	add("shaped", it("item.lever"):1, "0/1/2", it("item.lamp"), it("minecraft:lever"), it("item.constant"));
	add("shaped", it("item.lever"):1, "0/1", it("item.lamp"), it("item.lever"):0);
	add("shaped", it("item.lever"):2, "0/1/2", it("item.lamp"), it("minecraft:stone_button"), it("item.constant"));
	add("shaped", it("item.offset"), "0/1", it("item.constant"), it("tile.num_comb"));
	add("shaped", it("item.scale"), "02/11", it("item.constant"), it("tile.num_comb"), it("item.wire"));
	add("shaped", it("item.trigger"), "20/1 /20", it("item.constant"), it("tile.logic_comb"), it("minecraft:comparator"));
	add("shaped", it("item.oscilloscope"), "000/000/111", it("item.lamp"), it("tile.delay"));
	add("shaped", it("item.socket_s"), "01", it("tile.rs_port"):0, it("tile.rs_port"):1);
	add("shaped", it("item.socket_b"), "01", it("tile.rs_port"):2, it("item.block_wire"));
	add("shaped", it("m.corerope"), " 01/0 0/10 ", "nuggetIron", it("item.wire"));
	add("shaped", it("m.corerope1"), "000/010/000", it("m.corerope"), "ingotIron");
	add("shaped", it("m.corerope2"), " 0 /0 0/ 0 ", it("m.corerope1"));
	add("shaped", 4 * it("item.cl_fuel"), "010/ 2 /0 0", "blockGlass", it("m.telekin_alloy"), it("minecraft:ender_eye"));
	add("shaped", it("item.text"):4, "0/1", "paper", it("minecraft:sign"));
	add("shaped", it("item.remote"), "01 /222/222", it("tile.bin_comb"), it("item.wireless"), it("minecraft:stone_button"));
	
	Loc tag = nbt(); tag:"Istats" = [16, 12, 8, 72, 28, 88]#; !prototype processor (eqivalent to assembly with same materials except less remaining space)
	add("shaped", it("tile.processor2") + tag, "021/041/031", it("tile.rs_port"):1, it("tile.rs_port"):0, "blockQuartz", "blockRedstone", "ingotIron");
	tag = nbt(); tag:"Istats" = [0, 0, 0, 128, 0, 0]#; !empty processor (128 component space)
	add("shaped", it("tile.processor2") + tag, "0 1/0 1/0 1", it("tile.rs_port"):1, it("tile.rs_port"):0);
	tag = nbt(); tag:"Istats" = [0, 0, 0, 64, 0, 0]#; !empty processor (64 component space)
	add("shaped", it("tile.processor") + tag, "001/0 1/011", it("tile.rs_port"):1, it("tile.rs_port"):0);
	tag = nbt(); tag:"Istats" = [0, 0, 0, 128, -16, 64]#; !empty processor (128 component space)
	add("shaped", it("tile.processor3") + tag, "010", it("tile.processor2"), "gemEmerald");
	tag = nbt(); tag:"Istats" = [0, 0, 0, 96, 0, 0]#; !empty processor (96 component space)
	add("shaped", it("tile.int_panel") + tag, "011", it("tile.panel"), it("tile.processor"));
	moddedRecipes();
}

moddedRecipes() {
	!sensor augments
	sensors_item = [it("minecraft:chest")];
	sensors_fluid = [it("minecraft:bucket")];
	sensors_EU = [it("ic2:meter")];
	sensors_FE = [];
	for (item : [it("immersiveengineering:tool"):2, it("thermalfoundation:meter"), it("opencomputers:tool")]) {
		if (item) {sensors_FE = sensors_FE + item;}
	}
	if (#sensors_FE == 0) {sensors_FE = [it("minecraft:piston")];}
	sensors_draconic = [it("draconicevolution:chaos_shard"):3];
	sensors_hard = [it("minecraft:wooden_pickaxe")];
	sensors_light = [it("minecraft:daylight_detector")];
	sensors_grow = [it("minecraft:wooden_hoe")];
	
	if (hasmod("immersiveengineering")) {
		add("shaped", it("tile.comparator"), "0/1", it("immersiveengineering:connector"):13, it("minecraft:stone_slab"));
		add("shapeless", 8 * it("item.wire"), it("immersiveengineering:wirecoil"):5);
		add("battery", it("immersiveengineering:metal_device0"):3, -1);
	}
	if (hasmod("appliedenergistics2")) {
		add("shapeless", 4 * it("tile.wire_anchor"), it("appliedenergistics2:part"):120);
		add("shaped", it("item.tag"), "0/1/2", it("appliedenergistics2:material"):21, "paper", it("item.wire"));
		add("shaped", it("item.wireless_b"), "132/0 0/231", it("item.wireless"), it("m.telekin_alloy"), it("appliedenergistics2:material"):48, it("appliedenergistics2:quantum_link")); !quantum entangled singularity
		add("battery", it("appliedenergistics2:creative_energy_cell"), -1);
	}
	if (hasmod("opencomputers")) {
		add("shaped", it("tile.oc_adapter"), "5 3/014/523", it("opencomputers:card"):6, it("opencomputers:material"):11, it("opencomputers:component"):6, it("tile.processor2"), it("opencomputers:card"):4, it("item.wire_e"));
		add("battery", it("opencomputers:capacitor"), 1600 * energy_unit_OC); !CAPACITOR
		add("circuitMat", it("opencomputers:material"):6, 3, 0, 0, -2, 1, 3); !transistor
		add("circuitMat", it("opencomputers:material"):7, 1, 3, 0, -1, 0, 4); !chip T1
		add("circuitMat", it("opencomputers:material"):8, 3, 7, 0, -2, 0, 10); !chip T2
		add("circuitMat", it("opencomputers:material"):9, 12, 16, 0, -4, 0, 28); !chip T3
		add("circuitMat", it("opencomputers:material"):10, 12, 8, 0, -4, 0, 20); !ALU
		add("circuitMat", it("opencomputers:storage"):0, 0, 0, 16, -8, -2, 0); !EEPROM
		add("circuitMat", it("opencomputers:component"):6, 0, 0, 32, -8, -8, 16); !RAM T1
		add("circuitMat", it("opencomputers:component"):7, 0, 0, 48, -8, -16, 32); !RAM T1.5
		add("circuitMat", it("opencomputers:capacitor"), 0, 0, 0, -8, 1, 160000); !CAPACITOR (only 1/10 cap here)
	}
	if (hasmod("mekanism")) {
		add("shaped", it("item.wireless_b"), "121/020", it("item.wireless"), it("m.telekin_alloy"), it("mekanism:machineblock3"));
	}
	if (hasmod("enderio")) {
		add("shaped", it("item.wireless_b"), " 1 /020/ 1 ", it("item.wireless"), it("m.telekin_alloy"), it("enderio:block_transceiver"));
		add("battery", it("enderio:item_basic_capacitor"):0, 50e3 * energy_unit_FE);
		add("battery", it("enderio:item_basic_capacitor"):1, 150e3 * energy_unit_FE);
		add("battery", it("enderio:item_basic_capacitor"):2, 500e3 * energy_unit_FE);
	}
	if (hasmod("draconicevolution")) {
		add("battery", it("draconicevolution:wyvern_energy_core"), 8e6 * energy_unit_FE);
		add("battery", it("draconicevolution:draconic_energy_core"), 32e6 * energy_unit_FE);
	}
}

POST_INIT() {
	!gate complexity costs: gate_cost:"gateId" = [basic, advanced]#;
	Loc c = gate_cost;
	Loc base = [1, 0]#, adv = [0, 1]#;
	!variables & IO tab:
	c:"in" = base;
	c:"out" = base;
	c:"clock_out" = 3*base;
	c:"read_b" = base;
	c:"read_s" = base;
	c:"read" = base;
	c:"read_f" = base;
	c:"write_b" = 2*base;
	c:"write_s" = 2*base;
	c:"write" = 2*base;
	c:"write_f" = 2*base;
	c:"feedback_b" = 2*base;
	c:"feedback_s" = 2*base;
	c:"feedback" = 2*base;
	c:"feedback_f" = 2*base;
	c:"array_b" = base;
	c:"array_s" = 2*base;
	c:"array_i" = 3*base;
	c:"array_f" = 3*base;
	c:"aget" = base;
	c:"aset" = 4*base;
	!logic tab:
	c:"not" = base;
	c:"or" = 2*base;
	c:"nor" = 2*base;
	c:"and" = 2*base;
	c:"nand" = 2*base;
	c:"xor" = 3*base;
	c:"xnor" = 3*base;
	c:"swt" = 3*base;
	c:"fswt" = 3*base;
	c:"branch" = 3*base;
	c:"update" = adv;
	!comparator tab:
	c:"ne0" = base;
	c:"eq0" = base;
	c:"ge0" = base;
	c:"lt0" = base;
	c:"gt0" = base;
	c:"le0" = base;
	c:"eq" = adv;
	c:"ne" = adv;
	c:"lt" = adv;
	c:"ge" = adv;
	c:"feq0" = 2*base;
	c:"flt0" = 2*base;
	c:"fgt0" = 2*base;
	c:"finf" = 2*base;
	c:"fnan" = 2*base;
	c:"fcmp" = 2*adv;
	!arithmetic tab:
	c:"cst" = base;
	c:"inc" = adv;
	c:"dec" = adv;
	c:"neg" = adv;
	c:"abs" = [1, 1]#;
	c:"add" = 2*adv;
	c:"sub" = 2*adv;
	c:"mul" = 4*adv;
	c:"div" = 4*adv;
	c:"mod" = 4*adv;
	c:"max" = [2, 1]#;
	c:"min" = [2, 1]#;
	c:"rand" = [3, 3]#;
	c:"time" = 5*adv;
	!bits & bytes tab:
	c:"bsl" = 2*adv;
	c:"bsr" = 2*adv;
	c:"bitspl" = 4*adv;
	c:"bitcom" = 4*adv;
	c:"bytespl" = 4*adv;
	c:"bytecom" = 4*adv;
	c:"lobp" = 3*adv;
	c:"hobp" = 3*adv;
	c:"obcnt" = 3*adv;
	c:"bmask" = base;
	c:"bin_i2f" = base;
	c:"bin_f2i" = base;
	!floating pointer
	c:"fcst" = base;
	c:"fneg" = base;
	c:"finv" = [1, 4]#;
	c:"fabs" = base;
	c:"fadd" = [1, 3]#;
	c:"fsub" = [1, 3]#;
	c:"fmul" = [1, 5]#;
	c:"fdiv" = [1, 5]#;
	c:"fmod" = [1, 5]#;
	c:"fmax" = [2, 1]#;
	c:"fmin" = [2, 1]#;
	c:"floor" = adv;
	c:"ceil" = adv;
}
