interplane.Get Omega
Read in your language

aienos.com

Source of www.aienos.com, served from my own hardware

Brought by drakestapleton

branch main Branches Tags History

aienos.com / om / allen-scene / scene.om

1116 lines · 33687 bytes Raw Blame History
1note Browser controller for native Allen. See provenance.txt for temporary C-WASM boundary.
2note Text literals are emitted verbatim; public JS is never edited.
3global out uchar 16384
4global used ulong 1
5fn flush to void
6off = ulong 0
7while lt off get used 0
8n = write int 1 out off sub get used 0 off
9if le n 0
10exit 2
11end
12off = add off ulong n
13end
14put used 0 0
15end
16fn byteput c uchar to void
17if eq get used 0 len out
18flush
19end
20put out get used 0 c
21put used 0 add get used 0 1
22end
23text j0 "/* Generated from om/allen-scene/scene.om by pinned seeded Omega.\n"
24text j1 " * Controller: Omega-generated JavaScript. Rendering/audio: unchanged native C,\n"
25text j2 " * aien-dev/aienux@da55660ea7337f2b6a42095fcd1fb6ddebe1cc7c, compiled to WASM.\n"
26text j3 " * This source pin was staged, not hardware-confirmed by the available report.\n"
27text j4 " * Web opening reuses native dusk; enter('birth') is the original binary merger.\n"
28text j5 " * Catalogue/licences and native dependency boundary: om/allen-scene/provenance.txt.\n"
29text j6 " * WolframLanguageEvaluator: 1000/60 -> 50/3 ms; (1000/60)/2 -> 25/3 ms;\n"
30text j7 " * 48000 (12300-11360)/1000 -> 45120 frames (native chirp non-silent window).\n"
31text j8 " */\n"
32text j9 "(() => {\n"
33text j10 " 'use strict';\n"
34text j11 " const PIN = 'da55660ea7337f2b6a42095fcd1fb6ddebe1cc7c';\n"
35text j12 " const mounted = new WeakMap();\n"
36text j13 " let compiled;\n"
37text j14 " function module() {\n"
38text j15 " if (!compiled) compiled = fetch('/allen/scene.wasm', {credentials:'omit'})\n"
39text j16 " .then(response => { if (!response.ok) throw new Error('Native scene unavailable'); return response.arrayBuffer(); })\n"
40text j17 " .then(bytes => WebAssembly.compile(bytes)).catch(error => { compiled = null; throw error; });\n"
41text j18 " return compiled;\n"
42text j19 " }\n"
43text j20 " function mount(canvas, options = {}) {\n"
44text j21 " if (!(canvas instanceof HTMLCanvasElement)) throw new TypeError('AllenScene requires a canvas');\n"
45text j22 " if (mounted.has(canvas)) return mounted.get(canvas);\n"
46text j23 " const compact = Boolean(options.compact), interactive = Boolean(options.interactive) && !compact;\n const opening = options.opening === undefined ? (compact ? 'idle' : 'dusk') : options.opening;\n if(opening !== 'idle' && opening !== 'dusk' && opening !== 'birth') throw new RangeError('Invalid Allen scene opening');\n"
47text j24 " const ctx = canvas.getContext('2d', {alpha:false});\n"
48text j25 " if (!ctx) throw new Error('Canvas rendering unavailable');\n"
49text j26 " const motion = matchMedia('(prefers-reduced-motion: reduce)');\n"
50text j27 " const cleanup = [], letters = Array.from({length:64}, () => ({char:0,start:0,slot:0}));\n"
51text j28 " const wordTimes = new Float64Array(256);\n"
52text j29 " let ex, image, width = 0, height = 0, disposed = false, failed = false;\n"
53text j30 " let raf = 0, lastWall = 0, clock = 20000, kind = 0, modeValue = 0;\n"
54text j31 " let visible = true, reduced = motion.matches, dirty = true, resizePending = true;\n const connection = typeof navigator === 'object' ? navigator.connection : null;\n let calm = options.calm === undefined ? Boolean(connection && connection.saveData) : Boolean(options.calm);\n let quality = 0, overBudget = 0, underBudget = 0, qualityHold = 0, samples = 0;\n const renderScales = [1, 3/4, 9/16, 9/16];\n const qualityNames = ['full-60','balanced-60','small-60','small-30'];\n const frameBudget = 1000/60;\n // Wolfram: 1000/60 -> 50/3 ms; budget/2 -> 25/3; 1280*{1,3/4,9/16} -> {1280,960,720}.\n function still() { return reduced || compact || calm; }\n function qualityLabel() { canvas.dataset.sceneQuality = reduced ? 'reduced' : compact ? 'compact' : calm ? 'calm' : qualityNames[quality]; }\n function measureDraw(cost) {\n samples++;\n if(samples % 60 === 0) canvas.dataset.sceneDrawMs=String(cost);\n if(qualityHold) { qualityHold--; return; }\n overBudget=cost>frameBudget?overBudget+1:0;\n underBudget=cost<frameBudget/2?underBudget+1:0;\n const next=overBudget>=8?Math.min(3,quality+1):underBudget>=180?Math.max(0,quality-1):quality;\n if(next!==quality) {\n quality=next;qualityHold=60;overBudget=underBudget=0;\n resizePending=dirty=true;canvas.dataset.sceneDrawMs=String(cost);qualityLabel();\n }\n }\n"
55text j32 " let letterHead = 0, wordRead = 0, wordWrite = 0, lastWord = -1000, speakUntil = 0, keyUntil = 0;\n"
56text j33 " let ra = 113697000, dec = -72757000, fov = 80000, viewPending = false;\n"
57text j34 " let dragId = null, dragX = 0, dragY = 0, pinchDistance = 0;\n const touches = [{id:null,x:0,y:0},{id:null,x:0,y:0}];\n"
58text j35 " let ownsAudio = false, completeSent = false, resolveSize, rejectSize;\n"
59text j36 " let pendingEnter = compact || opening === 'idle' ? 0 : opening === 'birth' ? 2 : 1, pendingStatic = false;\n"
60text j37 " canvas.dataset.sceneSource = PIN;\n"
61text j38 " canvas.dataset.sceneEngine = 'loading';\n qualityLabel();\n"
62text j39 " function listen(target, name, fn, opts) {\n"
63text j40 " target.addEventListener(name, fn, opts);\n"
64text j41 " cleanup.push(() => target.removeEventListener(name, fn, opts));\n"
65text j42 " }\n"
66text j43 " function stopAudio() {\n"
67text j44 " if (ownsAudio && window.AllenAudio) window.AllenAudio.stop();\n"
68text j45 " ownsAudio=false;\n"
69text j46 " }\n"
70text j47 " function awake() { return !disposed && !failed && !document.hidden && visible; }\n"
71text j48 " function request() {\n"
72text j49 " if (!raf && ex && awake() && (!still() || dirty)) raf = requestAnimationFrame(tick);\n"
73text j50 " }\n"
74text j51 " function size() {\n"
75text j52 " const box = canvas.getBoundingClientRect();\n"
76text j53 " if (box.width <= 0 || box.height <= 0) return false;\n"
77text j54 " // Policy bound, not a physical-resolution claim. Same aspect ratio, native design scaling.\n"
78text j55 " const scale = Math.min(devicePixelRatio || 1, 1280 / Math.max(box.width,box.height))*renderScales[quality];\n"
79text j56 " const w = Math.max(64,Math.round(box.width*scale)), h = Math.max(64,Math.round(box.height*scale));\n"
80text j57 " resizePending = false;\n"
81text j58 " if (w === width && h === height) return true;\n"
82text j59 " width=w; height=h; canvas.width=w; canvas.height=h;\n"
83text j60 " if (!ex.scene_init(w,h,compact?1:0)) throw new Error('Native scene size refused');\n"
84text j61 " image = new ImageData(new Uint8ClampedArray(ex.memory.buffer,ex.scene_pixels(),w*h*4),w,h);\n"
85text j62 " ex.scene_enter(kind);\n"
86text j63 " // Resize keeps phase and mode but does not manufacture the old frame history.\n"
87text j64 " ex.scene_step(Math.floor(clock),modeValue,0);\n"
88text j65 " viewPending=true;\n if(resolveSize) {resolveSize();resolveSize=null;rejectSize=null;}\n"
89text j66 " return true;\n"
90text j67 " }\n"
91text j68 " function reset(kindValue) {\n"
92text j69 " kind=kindValue; clock=kind===0?20000:0; lastWall=0;completeSent=false;\n"
93text j70 " wordRead=wordWrite=0; lastWord=-1000; speakUntil=keyUntil=0; modeValue=0;\n"
94text j71 " for (const letter of letters) letter.char=0;\n"
95text j72 " stopAudio();\n"
96text j73 " if (ex && width) ex.scene_enter(kind);\n"
97text j74 " dirty=true; request();\n"
98text j75 " }\n"
99text j76 " function render() {\n"
100text j77 " if (!ex || !awake()) return;\n"
101text j78 " if (resizePending && !size()) return;\n"
102text j79 " if (!image) return;\n"
103text j80 " if (viewPending && !(kind===1 && clock<4200)) {\n"
104text j81 " if (!ex.scene_view(Math.round(ra),Math.round(dec),Math.round(fov))) throw new Error('Native sky view refused');\n"
105text j82 " viewPending=false;\n"
106text j83 " }\n"
107text j84 " const time=Math.floor(clock);\n"
108text j85 " while(wordRead!==wordWrite && wordTimes[wordRead]<=clock) {\n"
109text j86 " lastWord=wordTimes[wordRead];ex.scene_word(Math.floor(lastWord));wordRead=(wordRead+1)%wordTimes.length;\n"
110text j87 " }\n"
111text j88 " let currentMode=modeValue;\n"
112text j89 " if(clock<speakUntil) currentMode=3;\n"
113text j90 " else if(currentMode===3) currentMode=0;\n"
114text j91 " if(currentMode===0 && clock<keyUntil) currentMode=1;\n"
115text j92 " // Native allen_ui.c voice envelope (per-word exp decay, 200 ms).\n"
116text j93 " const voice=clock<speakUntil && lastWord>=0?ex.scene_voice(time,Math.floor(lastWord)):0;\n"
117text j94 " const shimmer=clock<speakUntil?256:0;\n"
118text j95 " ex.scene_step(time,currentMode,reduced?0:voice);\n"
119text j96 " ex.scene_draw(reduced?0:shimmer,reduced?0:voice);\n"
120text j97 " if(!reduced && !compact) for(const letter of letters) {\n"
121text j98 " if(!letter.char || clock<letter.start) continue;\n"
122text j99 " const u=Math.min(1,(clock-letter.start)/900);\n"
123text j100 " if(u>=1) {letter.char=0;continue;}\n"
124text j101 " // Web enhancement: native glyphs lift from input to Allen. No HTML/text injection.\n"
125text j102 " const ease=1-(1-u)*(1-u)*(1-u);\n"
126text j103 " const x=width/2+(letter.slot-4)*width/90*(1-ease);\n"
127text j104 " const y=height*(0.86+(0.4-0.86)*ease);\n"
128text j105 " ex.scene_glyph(letter.char,Math.round(x),Math.round(y),Math.round(256*(1-u)));\n"
129text j106 " }\n"
130text j107 " ctx.putImageData(image,0,0);\n"
131text j108 " canvas.dataset.scenePhase=kind===1 && clock<4200?'tube':kind===2 && clock<12300?'merger':clock<(kind===1?7200:15300)?'forming':'presence';\n"
132text j109 " canvas.dataset.sceneTime=String(time);\n"
133text j110 " canvas.dataset.sceneEngine='native-wasm';\n"
134text j111 " dirty=false;\n if(!completeSent && (kind===0 || clock>=(kind===1?7200:15300))) {\n completeSent=true;\n canvas.dispatchEvent(new CustomEvent('allen-scene-complete',{bubbles:true,detail:{kind:kind===2?'birth':kind===1?'dusk':'idle',time}}));\n }\n return true;\n"
135text j112 " }\n"
136text j113 " function error(err) {\n"
137text j114 " failed=true;cancelAnimationFrame(raf);raf=0;stopAudio();\n if(rejectSize) {rejectSize(err);resolveSize=null;rejectSize=null;}\n"
138text j115 " canvas.dataset.sceneEngine='unavailable';\n"
139text j116 " canvas.dispatchEvent(new CustomEvent('allen-scene-error',{bubbles:true,detail:{message:String(err.message||err)}}));\n"
140text j117 " }\n"
141text j118 " function tick(wall) {\n"
142text j119 " raf=0;\n"
143text j120 " if(!awake()) {lastWall=0;return;}\n"
144text j121 " const dt=lastWall?wall-lastWall:0;\n"
145text j122 " // Lowest level skips alternate 60 Hz callbacks; 25 ms tolerates timestamp jitter around 50/3 and 100/3 ms.\n if(!still() && quality===3 && dt<25 && !dirty) {request();return;}\n"
146text j123 " lastWall=wall;\n"
147text j124 " if(!still()) clock+=dt; // source clock advances; native integrators bound their own catch-up\n"
148text j125 " const sample=!still() && !resizePending && !viewPending;\n const began=sample?performance.now():0;\n let drawn=false;\n try { drawn=render(); } catch(err) { error(err); }\n if(sample && drawn) measureDraw(performance.now()-began);\n"
149text j126 " if(drawn && !still()) request();\n"
150text j127 " }\n"
151text j128 " function motionChanged() {\n"
152text j129 " reduced=motion.matches;lastWall=0;cancelAnimationFrame(raf);raf=0;stopAudio();\n"
153text j130 " if(still()) { reset(0); pendingStatic=true; }\n overBudget=underBudget=0;qualityLabel();\n"
154text j131 " dirty=true;request();\n"
155text j132 " }\n"
156text j133 " function visibility() {\n"
157text j134 " lastWall=0;\n"
158text j135 " if(!awake()) {cancelAnimationFrame(raf);raf=0;if(ownsAudio && window.AllenAudio) window.AllenAudio.pause();}\n"
159text j136 " else {if(ownsAudio && !still() && window.AllenAudio) void window.AllenAudio.resume();overBudget=underBudget=0;dirty=true;request();}\n"
160text j137 " }\n"
161text j138 " function changeView(dx,dy,zoom) {\n"
162text j139 " if(!interactive || kind===1 && clock<4200) return;\n"
163text j140 " ra=((ra+dx)%360000000+360000000)%360000000;\n"
164text j141 " dec=Math.max(-89000000,Math.min(89000000,dec+dy));\n"
165text j142 " fov=Math.max(10000,Math.min(120000,fov*zoom));\n"
166text j143 " viewPending=dirty=true;request();\n"
167text j144 " }\n"
168text j145 " function home() {ra=113697000;dec=-72757000;fov=80000;viewPending=dirty=true;request();}\n"
169text j146 " const api = {\n"
170text j147 " key(text) {\n"
171text j148 " if(disposed) return;\n"
172text j149 " text=String(text).slice(-64);keyUntil=clock+4000;\n"
173text j150 " if(ex) ex.scene_key(Math.floor(clock));\n"
174text j151 " if(!reduced && !compact) for(let i=0;i<text.length;i++) {\n"
175text j152 " const c=text.charCodeAt(i);if(c<32 || c>126) continue;\n"
176text j153 " const letter=letters[letterHead];letterHead=(letterHead+1)%letters.length;\n"
177text j154 " letter.char=c;letter.start=clock+i*35;letter.slot=i%9;\n"
178text j155 " }\n"
179text j156 " dirty=true;request();\n"
180text j157 " },\n"
181text j158 " speak(text) {\n"
182text j159 " if(disposed) return;\n"
183text j160 " text=String(text).slice(0,4096);\n"
184text j161 " let offset=0;const start=Math.max(clock,speakUntil-300);\n"
185text j162 " for(let i=0;i<text.length;i++) {\n"
186text j163 " if(!/\\s/.test(text[i]) && (i===0 || /\\s/.test(text[i-1]))) {\n"
187text j164 " const next=(wordWrite+1)%wordTimes.length;\n"
188text j165 " if(next===wordRead) break;\n"
189text j166 " wordTimes[wordWrite]=start+offset;wordWrite=next;\n"
190text j167 " }\n"
191text j168 " offset+=35;\n"
192text j169 " }\n"
193text j170 " speakUntil=Math.min(clock+30000,start+offset+300);dirty=true;request();\n"
194text j171 " },\n"
195text j172 " mode(name) {\n"
196text j173 " const modes={idle:0,listening:1,listen:1,thinking:2,think:2,speaking:3,speak:3};\n"
197text j174 " if(Object.prototype.hasOwnProperty.call(modes,name)) {modeValue=modes[name];dirty=true;request();}\n"
198text j175 " },\n"
199text j176 " enter(name='dusk') {\n"
200text j177 " if(disposed) return;\n"
201text j178 " const next=still() || name==='idle'?0:(name==='birth' || name==='boot' || name==='night')?2:1;\n"
202text j179 " if(next===2) ownsAudio=false; // caller starts audio in this same gesture before entering\n pendingEnter=next;reset(next);\n"
203text j180 " if(next===2 && window.AllenAudio) {\n"
204text j181 " ownsAudio=true;\n"
205text j182 " // AudioPort is invoked by the caller's gesture; this instance only owns its pause/stop lifecycle.\n"
206text j183 " }\n"
207text j184 " if(ex && width) pendingEnter=null;\n"
208text j185 " request();\n"
209text j186 " },\n"
210text j187 " home,\n zoom(direction) {\n if(direction!=='in' && direction!=='out') throw new RangeError('Scene zoom must be in or out');\n changeView(0,0,direction==='in'?1/1.1:1.1);\n },\n calm(enabled) {\n if(disposed) return;\n calm=Boolean(enabled);lastWall=0;cancelAnimationFrame(raf);raf=0;\n if(calm) reset(0);\n overBudget=underBudget=0;qualityLabel();dirty=true;request();\n },\n"
211text j188 " frame(ms) {\n"
212text j189 " if(!Number.isFinite(ms) || ms<0 || ms>86400000) throw new RangeError('Scene time outside one day');\n"
213text j190 " cancelAnimationFrame(raf);raf=0;lastWall=0;\n"
214text j191 " if(reduced) clock=20000;else clock=ms;\n"
215text j192 " dirty=true;\n"
216text j193 " if(ex) {try {render();} catch(err) {error(err);}}\n"
217text j194 " },\n"
218text j195 " destroy() {\n"
219text j196 " if(disposed) return;\n"
220text j197 " disposed=true;cancelAnimationFrame(raf);raf=0;stopAudio();\n if(rejectSize) {rejectSize(new Error('Scene destroyed before initialization'));resolveSize=null;rejectSize=null;}\n"
221text j198 " for(const fn of cleanup) fn();\n"
222text j199 " mounted.delete(canvas);image=null;ex=null;\n"
223text j200 " canvas.dataset.sceneEngine='destroyed';\n"
224text j201 " }\n"
225text j202 " };\n"
226text j203 " mounted.set(canvas,api);\n"
227text j204 " listen(document,'visibilitychange',visibility);\n"
228text j205 " listen(motion,'change',motionChanged);\n"
229text j206 " if(typeof ResizeObserver==='function') {\n"
230text j207 " const resize=new ResizeObserver(() => {resizePending=dirty=true;request();});resize.observe(canvas);cleanup.push(() => resize.disconnect());\n"
231text j208 " } else listen(window,'resize',() => {resizePending=dirty=true;request();});\n"
232text j209 " if(typeof IntersectionObserver==='function') {\n"
233text j210 " const observer=new IntersectionObserver(entries => {visible=entries[0].isIntersecting;visibility();});observer.observe(canvas);cleanup.push(() => observer.disconnect());\n"
234text j211 " }\n"
235text j212 " if(interactive) {\n"
236text j213 " const oldTouch=canvas.style.touchAction;canvas.style.touchAction='pinch-zoom';cleanup.push(() => {canvas.style.touchAction=oldTouch;});\n"
237text j214 " listen(canvas,'pointerdown',event => {\n"
238text j215 " if(event.button!==0) return;\n if(event.pointerType==='touch') {\n const slot=touches.find(touch => touch.id===null);\n if(!slot) return;\n slot.id=event.pointerId;slot.x=event.clientX;slot.y=event.clientY;\n if(touches[0].id!==null && touches[1].id!==null) pinchDistance=Math.hypot(touches[0].x-touches[1].x,touches[0].y-touches[1].y);\n }\n"
239text j216 " dragId=event.pointerId;dragX=event.clientX;dragY=event.clientY;\n"
240text j217 " canvas.setPointerCapture(dragId);canvas.focus({preventScroll:true});\n"
241text j218 " });\n"
242text j219 " listen(canvas,'pointermove',event => {\n"
243text j220 " if(event.pointerType==='touch') {\n const touch=touches.find(touch => touch.id===event.pointerId);\n if(!touch) return;\n touch.x=event.clientX;touch.y=event.clientY;\n if(touches[0].id!==null && touches[1].id!==null) {\n const distance=Math.hypot(touches[0].x-touches[1].x,touches[0].y-touches[1].y);\n if(distance>0 && pinchDistance>0) changeView(0,0,pinchDistance/distance);\n pinchDistance=distance;return;\n }\n }\n if(event.pointerId!==dragId) return;\n"
244text j221 " const box=canvas.getBoundingClientRect();\n"
245text j222 " changeView(-(event.clientX-dragX)*fov*1000/Math.max(1,box.width),(event.clientY-dragY)*fov*1000/Math.max(1,box.width),1);\n"
246text j223 " dragX=event.clientX;dragY=event.clientY;\n"
247text j224 " });\n"
248text j225 " const release=event => {\n for(const touch of touches) if(touch.id===event.pointerId) touch.id=null;\n pinchDistance=0;\n if(event.pointerId===dragId) {\n dragId=null;\n if(canvas.hasPointerCapture(event.pointerId)) canvas.releasePointerCapture(event.pointerId);\n const remaining=touches.find(touch => touch.id!==null);\n if(remaining) {dragId=remaining.id;dragX=remaining.x;dragY=remaining.y;}\n }\n };\n"
249text j226 " listen(canvas,'pointerup',release);listen(canvas,'pointercancel',release);listen(canvas,'lostpointercapture',release);\n"
250text j227 " listen(canvas,'wheel',event => {if(event.ctrlKey || event.metaKey) return;event.preventDefault();changeView(0,0,Math.pow(2,Math.max(-600,Math.min(600,event.deltaY))/600));},{passive:false});\n"
251text j228 " listen(canvas,'keydown',event => {\n"
252text j229 " const step=fov*1000/20;\n"
253text j230 " switch(event.key) {\n"
254text j231 " case 'ArrowLeft':changeView(-step,0,1);break;\n"
255text j232 " case 'ArrowRight':changeView(step,0,1);break;\n"
256text j233 " case 'ArrowUp':changeView(0,step,1);break;\n"
257text j234 " case 'ArrowDown':changeView(0,-step,1);break;\n"
258text j235 " case '+':case '=':changeView(0,0,1/1.1);break;\n"
259text j236 " case '-':changeView(0,0,1.1);break;\n"
260text j237 " case 'Home':home();break;\n"
261text j238 " default:return;\n"
262text j239 " }\n"
263text j240 " event.preventDefault();\n"
264text j241 " });\n"
265text j242 " }\n"
266text j243 " api.ready=module().then(module => WebAssembly.instantiate(module,{})).then(async instance => {\n"
267text j244 " if(disposed) return api;\n"
268text j245 " ex=instance.exports;\n"
269text j246 " const initial=still()?0:pendingEnter===null?0:pendingEnter;\n"
270text j247 " // Preserve an audio gesture made before compilation completes.\n"
271text j248 " const audioOwner=ownsAudio;ownsAudio=false;reset(initial);ownsAudio=audioOwner;\n"
272text j249 " pendingEnter=null;\n"
273text j250 " if(!size()) await new Promise((resolve,reject) => {resolveSize=resolve;rejectSize=reject;});\n if(disposed) return api;\n"
274text j251 " if(still() || pendingStatic) {clock=20000;ex.scene_step(20000,0,0);pendingStatic=false;}\n"
275text j252 " render();request();\n canvas.dispatchEvent(new CustomEvent('allen-scene-initialized',{bubbles:true,detail:{source:PIN}}));\n"
276text j253 " return api;\n"
277text j254 " }).catch(err => {if(!disposed) error(err);throw err;});\n"
278text j255 " // Expose the rejection to callers while avoiding an unhandled rejection for decorative mounts.\n"
279text j256 " api.ready.catch(() => {});\n"
280text j257 " return api;\n"
281text j258 " }\n"
282text j259 " window.AllenScene=Object.freeze({mount,source:PIN});\n"
283text j260 " document.dispatchEvent(new CustomEvent('allen-scene-ready'));\n"
284text j261 "})();\n"
285fn part0 to void
286for i ulong len j0
287byteput get j0 i
288end
289for i ulong len j1
290byteput get j1 i
291end
292for i ulong len j2
293byteput get j2 i
294end
295for i ulong len j3
296byteput get j3 i
297end
298for i ulong len j4
299byteput get j4 i
300end
301for i ulong len j5
302byteput get j5 i
303end
304for i ulong len j6
305byteput get j6 i
306end
307for i ulong len j7
308byteput get j7 i
309end
310for i ulong len j8
311byteput get j8 i
312end
313for i ulong len j9
314byteput get j9 i
315end
316for i ulong len j10
317byteput get j10 i
318end
319for i ulong len j11
320byteput get j11 i
321end
322for i ulong len j12
323byteput get j12 i
324end
325for i ulong len j13
326byteput get j13 i
327end
328for i ulong len j14
329byteput get j14 i
330end
331for i ulong len j15
332byteput get j15 i
333end
334for i ulong len j16
335byteput get j16 i
336end
337for i ulong len j17
338byteput get j17 i
339end
340for i ulong len j18
341byteput get j18 i
342end
343for i ulong len j19
344byteput get j19 i
345end
346end
347fn part20 to void
348for i ulong len j20
349byteput get j20 i
350end
351for i ulong len j21
352byteput get j21 i
353end
354for i ulong len j22
355byteput get j22 i
356end
357for i ulong len j23
358byteput get j23 i
359end
360for i ulong len j24
361byteput get j24 i
362end
363for i ulong len j25
364byteput get j25 i
365end
366for i ulong len j26
367byteput get j26 i
368end
369for i ulong len j27
370byteput get j27 i
371end
372for i ulong len j28
373byteput get j28 i
374end
375for i ulong len j29
376byteput get j29 i
377end
378for i ulong len j30
379byteput get j30 i
380end
381for i ulong len j31
382byteput get j31 i
383end
384for i ulong len j32
385byteput get j32 i
386end
387for i ulong len j33
388byteput get j33 i
389end
390for i ulong len j34
391byteput get j34 i
392end
393for i ulong len j35
394byteput get j35 i
395end
396for i ulong len j36
397byteput get j36 i
398end
399for i ulong len j37
400byteput get j37 i
401end
402for i ulong len j38
403byteput get j38 i
404end
405for i ulong len j39
406byteput get j39 i
407end
408end
409fn part40 to void
410for i ulong len j40
411byteput get j40 i
412end
413for i ulong len j41
414byteput get j41 i
415end
416for i ulong len j42
417byteput get j42 i
418end
419for i ulong len j43
420byteput get j43 i
421end
422for i ulong len j44
423byteput get j44 i
424end
425for i ulong len j45
426byteput get j45 i
427end
428for i ulong len j46
429byteput get j46 i
430end
431for i ulong len j47
432byteput get j47 i
433end
434for i ulong len j48
435byteput get j48 i
436end
437for i ulong len j49
438byteput get j49 i
439end
440for i ulong len j50
441byteput get j50 i
442end
443for i ulong len j51
444byteput get j51 i
445end
446for i ulong len j52
447byteput get j52 i
448end
449for i ulong len j53
450byteput get j53 i
451end
452for i ulong len j54
453byteput get j54 i
454end
455for i ulong len j55
456byteput get j55 i
457end
458for i ulong len j56
459byteput get j56 i
460end
461for i ulong len j57
462byteput get j57 i
463end
464for i ulong len j58
465byteput get j58 i
466end
467for i ulong len j59
468byteput get j59 i
469end
470end
471fn part60 to void
472for i ulong len j60
473byteput get j60 i
474end
475for i ulong len j61
476byteput get j61 i
477end
478for i ulong len j62
479byteput get j62 i
480end
481for i ulong len j63
482byteput get j63 i
483end
484for i ulong len j64
485byteput get j64 i
486end
487for i ulong len j65
488byteput get j65 i
489end
490for i ulong len j66
491byteput get j66 i
492end
493for i ulong len j67
494byteput get j67 i
495end
496for i ulong len j68
497byteput get j68 i
498end
499for i ulong len j69
500byteput get j69 i
501end
502for i ulong len j70
503byteput get j70 i
504end
505for i ulong len j71
506byteput get j71 i
507end
508for i ulong len j72
509byteput get j72 i
510end
511for i ulong len j73
512byteput get j73 i
513end
514for i ulong len j74
515byteput get j74 i
516end
517for i ulong len j75
518byteput get j75 i
519end
520for i ulong len j76
521byteput get j76 i
522end
523for i ulong len j77
524byteput get j77 i
525end
526for i ulong len j78
527byteput get j78 i
528end
529for i ulong len j79
530byteput get j79 i
531end
532end
533fn part80 to void
534for i ulong len j80
535byteput get j80 i
536end
537for i ulong len j81
538byteput get j81 i
539end
540for i ulong len j82
541byteput get j82 i
542end
543for i ulong len j83
544byteput get j83 i
545end
546for i ulong len j84
547byteput get j84 i
548end
549for i ulong len j85
550byteput get j85 i
551end
552for i ulong len j86
553byteput get j86 i
554end
555for i ulong len j87
556byteput get j87 i
557end
558for i ulong len j88
559byteput get j88 i
560end
561for i ulong len j89
562byteput get j89 i
563end
564for i ulong len j90
565byteput get j90 i
566end
567for i ulong len j91
568byteput get j91 i
569end
570for i ulong len j92
571byteput get j92 i
572end
573for i ulong len j93
574byteput get j93 i
575end
576for i ulong len j94
577byteput get j94 i
578end
579for i ulong len j95
580byteput get j95 i
581end
582for i ulong len j96
583byteput get j96 i
584end
585for i ulong len j97
586byteput get j97 i
587end
588for i ulong len j98
589byteput get j98 i
590end
591for i ulong len j99
592byteput get j99 i
593end
594end
595fn part100 to void
596for i ulong len j100
597byteput get j100 i
598end
599for i ulong len j101
600byteput get j101 i
601end
602for i ulong len j102
603byteput get j102 i
604end
605for i ulong len j103
606byteput get j103 i
607end
608for i ulong len j104
609byteput get j104 i
610end
611for i ulong len j105
612byteput get j105 i
613end
614for i ulong len j106
615byteput get j106 i
616end
617for i ulong len j107
618byteput get j107 i
619end
620for i ulong len j108
621byteput get j108 i
622end
623for i ulong len j109
624byteput get j109 i
625end
626for i ulong len j110
627byteput get j110 i
628end
629for i ulong len j111
630byteput get j111 i
631end
632for i ulong len j112
633byteput get j112 i
634end
635for i ulong len j113
636byteput get j113 i
637end
638for i ulong len j114
639byteput get j114 i
640end
641for i ulong len j115
642byteput get j115 i
643end
644for i ulong len j116
645byteput get j116 i
646end
647for i ulong len j117
648byteput get j117 i
649end
650for i ulong len j118
651byteput get j118 i
652end
653for i ulong len j119
654byteput get j119 i
655end
656end
657fn part120 to void
658for i ulong len j120
659byteput get j120 i
660end
661for i ulong len j121
662byteput get j121 i
663end
664for i ulong len j122
665byteput get j122 i
666end
667for i ulong len j123
668byteput get j123 i
669end
670for i ulong len j124
671byteput get j124 i
672end
673for i ulong len j125
674byteput get j125 i
675end
676for i ulong len j126
677byteput get j126 i
678end
679for i ulong len j127
680byteput get j127 i
681end
682for i ulong len j128
683byteput get j128 i
684end
685for i ulong len j129
686byteput get j129 i
687end
688for i ulong len j130
689byteput get j130 i
690end
691for i ulong len j131
692byteput get j131 i
693end
694for i ulong len j132
695byteput get j132 i
696end
697for i ulong len j133
698byteput get j133 i
699end
700for i ulong len j134
701byteput get j134 i
702end
703for i ulong len j135
704byteput get j135 i
705end
706for i ulong len j136
707byteput get j136 i
708end
709for i ulong len j137
710byteput get j137 i
711end
712for i ulong len j138
713byteput get j138 i
714end
715for i ulong len j139
716byteput get j139 i
717end
718end
719fn part140 to void
720for i ulong len j140
721byteput get j140 i
722end
723for i ulong len j141
724byteput get j141 i
725end
726for i ulong len j142
727byteput get j142 i
728end
729for i ulong len j143
730byteput get j143 i
731end
732for i ulong len j144
733byteput get j144 i
734end
735for i ulong len j145
736byteput get j145 i
737end
738for i ulong len j146
739byteput get j146 i
740end
741for i ulong len j147
742byteput get j147 i
743end
744for i ulong len j148
745byteput get j148 i
746end
747for i ulong len j149
748byteput get j149 i
749end
750for i ulong len j150
751byteput get j150 i
752end
753for i ulong len j151
754byteput get j151 i
755end
756for i ulong len j152
757byteput get j152 i
758end
759for i ulong len j153
760byteput get j153 i
761end
762for i ulong len j154
763byteput get j154 i
764end
765for i ulong len j155
766byteput get j155 i
767end
768for i ulong len j156
769byteput get j156 i
770end
771for i ulong len j157
772byteput get j157 i
773end
774for i ulong len j158
775byteput get j158 i
776end
777for i ulong len j159
778byteput get j159 i
779end
780end
781fn part160 to void
782for i ulong len j160
783byteput get j160 i
784end
785for i ulong len j161
786byteput get j161 i
787end
788for i ulong len j162
789byteput get j162 i
790end
791for i ulong len j163
792byteput get j163 i
793end
794for i ulong len j164
795byteput get j164 i
796end
797for i ulong len j165
798byteput get j165 i
799end
800for i ulong len j166
801byteput get j166 i
802end
803for i ulong len j167
804byteput get j167 i
805end
806for i ulong len j168
807byteput get j168 i
808end
809for i ulong len j169
810byteput get j169 i
811end
812for i ulong len j170
813byteput get j170 i
814end
815for i ulong len j171
816byteput get j171 i
817end
818for i ulong len j172
819byteput get j172 i
820end
821for i ulong len j173
822byteput get j173 i
823end
824for i ulong len j174
825byteput get j174 i
826end
827for i ulong len j175
828byteput get j175 i
829end
830for i ulong len j176
831byteput get j176 i
832end
833for i ulong len j177
834byteput get j177 i
835end
836for i ulong len j178
837byteput get j178 i
838end
839for i ulong len j179
840byteput get j179 i
841end
842end
843fn part180 to void
844for i ulong len j180
845byteput get j180 i
846end
847for i ulong len j181
848byteput get j181 i
849end
850for i ulong len j182
851byteput get j182 i
852end
853for i ulong len j183
854byteput get j183 i
855end
856for i ulong len j184
857byteput get j184 i
858end
859for i ulong len j185
860byteput get j185 i
861end
862for i ulong len j186
863byteput get j186 i
864end
865for i ulong len j187
866byteput get j187 i
867end
868for i ulong len j188
869byteput get j188 i
870end
871for i ulong len j189
872byteput get j189 i
873end
874for i ulong len j190
875byteput get j190 i
876end
877for i ulong len j191
878byteput get j191 i
879end
880for i ulong len j192
881byteput get j192 i
882end
883for i ulong len j193
884byteput get j193 i
885end
886for i ulong len j194
887byteput get j194 i
888end
889for i ulong len j195
890byteput get j195 i
891end
892for i ulong len j196
893byteput get j196 i
894end
895for i ulong len j197
896byteput get j197 i
897end
898for i ulong len j198
899byteput get j198 i
900end
901for i ulong len j199
902byteput get j199 i
903end
904end
905fn part200 to void
906for i ulong len j200
907byteput get j200 i
908end
909for i ulong len j201
910byteput get j201 i
911end
912for i ulong len j202
913byteput get j202 i
914end
915for i ulong len j203
916byteput get j203 i
917end
918for i ulong len j204
919byteput get j204 i
920end
921for i ulong len j205
922byteput get j205 i
923end
924for i ulong len j206
925byteput get j206 i
926end
927for i ulong len j207
928byteput get j207 i
929end
930for i ulong len j208
931byteput get j208 i
932end
933for i ulong len j209
934byteput get j209 i
935end
936for i ulong len j210
937byteput get j210 i
938end
939for i ulong len j211
940byteput get j211 i
941end
942for i ulong len j212
943byteput get j212 i
944end
945for i ulong len j213
946byteput get j213 i
947end
948for i ulong len j214
949byteput get j214 i
950end
951for i ulong len j215
952byteput get j215 i
953end
954for i ulong len j216
955byteput get j216 i
956end
957for i ulong len j217
958byteput get j217 i
959end
960for i ulong len j218
961byteput get j218 i
962end
963for i ulong len j219
964byteput get j219 i
965end
966end
967fn part220 to void
968for i ulong len j220
969byteput get j220 i
970end
971for i ulong len j221
972byteput get j221 i
973end
974for i ulong len j222
975byteput get j222 i
976end
977for i ulong len j223
978byteput get j223 i
979end
980for i ulong len j224
981byteput get j224 i
982end
983for i ulong len j225
984byteput get j225 i
985end
986for i ulong len j226
987byteput get j226 i
988end
989for i ulong len j227
990byteput get j227 i
991end
992for i ulong len j228
993byteput get j228 i
994end
995for i ulong len j229
996byteput get j229 i
997end
998for i ulong len j230
999byteput get j230 i
1000end
1001for i ulong len j231
1002byteput get j231 i
1003end
1004for i ulong len j232
1005byteput get j232 i
1006end
1007for i ulong len j233
1008byteput get j233 i
1009end
1010for i ulong len j234
1011byteput get j234 i
1012end
1013for i ulong len j235
1014byteput get j235 i
1015end
1016for i ulong len j236
1017byteput get j236 i
1018end
1019for i ulong len j237
1020byteput get j237 i
1021end
1022for i ulong len j238
1023byteput get j238 i
1024end
1025for i ulong len j239
1026byteput get j239 i
1027end
1028end
1029fn part240 to void
1030for i ulong len j240
1031byteput get j240 i
1032end
1033for i ulong len j241
1034byteput get j241 i
1035end
1036for i ulong len j242
1037byteput get j242 i
1038end
1039for i ulong len j243
1040byteput get j243 i
1041end
1042for i ulong len j244
1043byteput get j244 i
1044end
1045for i ulong len j245
1046byteput get j245 i
1047end
1048for i ulong len j246
1049byteput get j246 i
1050end
1051for i ulong len j247
1052byteput get j247 i
1053end
1054for i ulong len j248
1055byteput get j248 i
1056end
1057for i ulong len j249
1058byteput get j249 i
1059end
1060for i ulong len j250
1061byteput get j250 i
1062end
1063for i ulong len j251
1064byteput get j251 i
1065end
1066for i ulong len j252
1067byteput get j252 i
1068end
1069for i ulong len j253
1070byteput get j253 i
1071end
1072for i ulong len j254
1073byteput get j254 i
1074end
1075for i ulong len j255
1076byteput get j255 i
1077end
1078for i ulong len j256
1079byteput get j256 i
1080end
1081for i ulong len j257
1082byteput get j257 i
1083end
1084for i ulong len j258
1085byteput get j258 i
1086end
1087for i ulong len j259
1088byteput get j259 i
1089end
1090end
1091fn part260 to void
1092for i ulong len j260
1093byteput get j260 i
1094end
1095for i ulong len j261
1096byteput get j261 i
1097end
1098end
1099fn main to int
1100part0
1101part20
1102part40
1103part60
1104part80
1105part100
1106part120
1107part140
1108part160
1109part180
1110part200
1111part220
1112part240
1113part260
1114flush
1115ret 0
1116end