Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them.
Page: /drakestapleton/omega-tool-model/blob/main/deployment/workbench/candidate.om
# omega-tool-model
First-party Omega tool-use model source, serving harnesses, and verification records
Brought by drakestapleton
Sign in to star 0 stars 0 watching
About Files History Releases Proposed changes Issues For developers
branch `main` Branches Tags History
`omega-tool-model / deployment / workbench / candidate.om`
3079 lines · 60674 bytes Raw Blame History
1 text z0 "fn calc x int to int\n"
2 text z1 "s = x\nfor i ulong "
3 text z2 "\ns = "
4 text z3 "add"
5 text z4 "plus"
6 text z5 " s int "
7 text z6 "\nend\nret s\nend\n"
8 text z7 "ret "
9 text z8 "mul"
10 text z9 "sub"
11 text z10 "times"
12 text z11 " x int "
13 text z12 "\nend\n"
14 text z13 "fn main to int\nret calc int "
15 text z14 "Could not read the practice file."
16 text z15 "Refused unsupported source."
17 text z16 "Could not prepare the test."
18 text z17 "The compiler did not complete."
19 text z18 "Compilation failed."
20 text z19 "The test did not complete."
21 text z20 "{\"type\":\"test\",\"input\":"
22 text z21 ",\"expected\":"
23 text z22 ",\"actual\":"
24 text z23 "}"
25 text z24 "The browser disconnected."
26 text z25 "Test failed: calc("
27 text z26 ") expected "
28 text z27 ", got "
29 text z28 "."
30 text z29 "Tests passed."
31 text z30 "tool"
32 text z31 "path"
33 text z32 "old"
34 text z33 "new"
35 text z34 "replace_text"
36 text z35 "Task: Fix the error in this file and confirm its goal.\nFile: "
37 text z36 "\nGoal: "
38 text z37 "\nState: "
39 text z38 "unread"
40 text z39 "read"
41 text z40 "failed"
42 text z41 "edited"
43 text z42 "checked"
44 text z43 "missing"
45 text z44 "Source:\n"
46 text z45 "Tool result: "
47 text z46 "Answer:\n"
48 text z47 "read_file"
49 text z48 "File not found."
50 text z49 "Read succeeded."
51 text z50 "observation"
52 text z51 "omega_check"
53 text z52 "Edit saved."
54 text z53 "source"
55 text z54 "original"
56 text z55 "The model could not complete this request."
57 text z56 "action"
58 text z57 "The model completed the job and all four checks passed."
59 text z58 "The model claimed success before verification. No success was recorded."
60 text z59 "The model correctly reported the missing practice file."
61 text z60 "The model incorrectly reported a missing file."
62 text z61 "The model returned an unsupported action. The run stopped."
63 text z62 "The model requested the wrong file. The run stopped."
64 text z63 "The requested action was refused or could not finish."
65 text z64 "The model reached the seven-step limit without finishing."
66 text z65 "This practice area accepts only the small arithmetic program shapes shown in the examples. Keep the same main input."
67 text z66 "jobs/item76666.om"
68 text z67 "calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70."
69 text z68 "jobs/item96171.om"
70 text z69 "calc starts with x and adds 3 exactly 3 times in a for loop. main calls calc with 74."
71 text z70 "jobs/item96294.om"
72 text z71 "calc returns x plus 5. main calls calc with 73."
73 text z72 "jobs/item82028.om"
74 text z73 "calc returns x times 1. main calls calc with 72."
75 text z74 "jobs/item82342.om"
76 text z75 "calc starts with x and adds 1 exactly 6 times in a for loop. main calls calc with 72."
77 text z76 "jobs/item85188.om"
78 text z77 "calc starts with x and adds 2 exactly 4 times in a for loop. main calls calc with 70."
79 text z78 "jobs/item83423.om"
80 text z79 "calc starts with x and adds 5 exactly 3 times in a for loop. main calls calc with 71."
81 text z80 "jobs/item80896.om"
82 text z81 "jobs/item99846.om"
83 text z82 "calc returns x plus 1. main calls calc with 70."
84 text z83 "jobs/item86548.om"
85 text z84 "calc returns x plus 1. main calls calc with 72."
86 text z85 "jobs/item73182.om"
87 text z86 "calc returns x times 1. main calls calc with 71."
88 text z87 "jobs/item87470.om"
89 text z88 "calc returns x times 1. main calls calc with 74."
90 text z89 "jobs/item74558.om"
91 text z90 "calc returns x times 1. main calls calc with 73."
92 text z91 "{\"type\":\""
93 text z92 "\",\"text\":"
94 text z93 "{\"type\":\"done\",\"passed\":"
95 text z94 "true"
96 text z95 "false"
97 text z96 ",\"message\":\""
98 text z97 "\",\"source\":"
99 note Private local protocol. No model-generated bytes are executed.
100 global naddr uchar 110
101 global nbuf uchar 8192
102 global nfd int 1
103 global nerr ulong 1
104 text nsock "$HOME/.local/share/omega-tool-model/run/model.sock"
105 text nlock "$HOME/.local/share/omega-tool-model/run/model.lock"
106
107 fn naddress to void
108 put naddr 0 1
109 for i ulong len nsock
110 put naddr add i 2 get nsock i
111 end
112 end
113
114 fn nreceive off ulong n ulong timeout long to bool
115 p = ulong 0
116 deadline = add monons timeout
117 while lt p n bound 8192
118 left = sub deadline monons
119 if le left 0
120 ret false
121 end
122 r = waitio get nfd 0 1 left
123 if le r 0
124 ret false
125 end
126 r = recv get nfd 0 nbuf add off p sub n p 64
127 if eq r neg long 11
128 continue
129 end
130 if le r 0
131 ret false
132 end
133 p = add p ulong r
134 end
135 ret true
136 end
137
138 fn nsend off ulong n ulong to bool
139 p = ulong 0
140 deadline = add monons long `2000000000`
141 while lt p n bound 8192
142 left = sub deadline monons
143 if le left 0
144 ret false
145 end
146 r = waitio get nfd 0 4 left
147 if le r 0
148 ret false
149 end
150 r = send get nfd 0 nbuf add off p sub n p 64
151 if eq r neg long 11
152 continue
153 end
154 if le r 0
155 ret false
156 end
157 p = add p ulong r
158 end
159 ret true
160 end
161
162 fn nlength to ulong
163 ret add ulong get nbuf 0 mul ulong get nbuf 1 256
164 end
165
166 fn nheader n ulong to void
167 put nbuf 0 uchar and n 255
168 put nbuf 1 uchar and shr n 8 255
169 end
170
171 fn nstatus code ulong to void
172 if eq code 0
173 nheader 0
174 r = nsend 0 2
175 else
176 nheader 65535
177 put nbuf 2 uchar code
178 r = nsend 0 3
179 end
180 end
181
182 note Private, bounded HTTP adapter. No generated text is executed or interpreted as HTML.
183 global hreq uchar 12288
184 global hbuf uchar 65536
185 global haddr uchar 16
186 global hopt uchar 4
187 global hstat uchar 4
188 global hfd int 1
189 global hcount ulong 1
190 global hend ulong 1
191 global hsize ulong 1
192 global hseen ulong 1
193 global hguard ulong 1
194 global hhost ulong 1
195 global hroute ulong 1
196 text hex "`0123456789abcdef`"
197
198 fn hsend n ulong to bool
199 p = ulong 0
200 deadline = add monons long `3000000000`
201 while lt p n bound 65536
202 left = sub deadline monons
203 if le left 0
204 ret false
205 end
206 r = waitio get hfd 0 4 left
207 if le r 0
208 ret false
209 end
210 r = send get hfd 0 hbuf p sub n p 64
211 if eq r neg long 11
212 continue
213 end
214 if le r 0
215 ret false
216 end
217 p = add p ulong r
218 end
219 ret true
220 end
221
222 fn hfind start ulong total ulong to bool
223 while lt add start 3 total bound 8192
224 if and eq get hreq start 13 eq get hreq add start 1 10
225 if and eq get hreq add start 2 13 eq get hreq add start 3 10
226 put hend 0 add start 4
227 ret true
228 end
229 end
230 start = add start 1
231 end
232 ret false
233 end
234
235 fn hread to bool
236 put hcount 0 0
237 put hend 0 0
238 deadline = add monons long `5000000000`
239 for step ulong 8192
240 n = get hcount 0
241 if ge n 8192
242 ret false
243 end
244 left = sub deadline monons
245 if le left 0
246 ret false
247 end
248 if le waitio get hfd 0 1 left 0
249 ret false
250 end
251 r = recv get hfd 0 hreq n sub 8192 n 64
252 if eq r neg long 11
253 continue
254 end
255 if le r 0
256 ret false
257 end
258 total = add n ulong r
259 put hcount 0 total
260 start = ulong 0
261 if gt n 3
262 start = sub n 3
263 end
264 if hfind start total
265 ret true
266 end
267 end
268 ret false
269 end
270
271 fn hline a ulong b ulong to bool
272 if eq a b
273 ret true
274 end
275 if iscl a b
276 if ne get hseen 0 0
277 ret false
278 end
279 put hseen 0 1
280 p = add a 15
281 while lt p b bound 8192
282 if not or eq get hreq p 32 eq get hreq p 9
283 break
284 end
285 p = add p 1
286 end
287 if eq p b
288 ret false
289 end
290 v = ulong 0
291 while lt p b bound 8192
292 c = get hreq p
293 if or lt c 48 gt c 57
294 ret false
295 end
296 v = add mul v 10 ulong sub c 48
297 if gt v 4000
298 ret false
299 end
300 p = add p 1
301 end
302 put hsize 0 v
303 ret true
304 end
305 if iste a b
306 ret false
307 end
308 if isguard a b
309 put hguard 0 add get hguard 0 1
310 end
311 if ishost a b
312 if not goodhost a b
313 ret false
314 end
315 put hhost 0 add get hhost 0 1
316 end
317 ret true
318 end
319
320 fn hparse to bool
321 put hsize 0 0
322 put hseen 0 0
323 put hguard 0 0
324 put hhost 0 0
325 put hroute 0 0
326 n = get hend 0
327 a = ulong 0
328 first = true
329 for i ulong sub n 1
330 c = get hreq i
331 if and eq c 13 eq get hreq add i 1 10
332 if first
333 if isroot a i
334 put hroute 0 1
335 end
336 if isgen a i
337 put hroute 0 2
338 end
339 if isrepair a i
340 put hroute 0 3
341 end
342 first = false
343 else
344 if not hline a i
345 ret false
346 end
347 end
348 a = add i 2
349 else
350 if not first
351 if and ge c 65 le c 90
352 put hreq i add c 32
353 end
354 end
355 end
356 end
357 ret eq get hhost 0 1
358 end
359
360 fn hbody to bool
361 n = get hsize 0
362 off = get hend 0
363 total = add off n
364 if or eq n 0 gt n 4000
365 ret false
366 end
367 if gt get hcount 0 total
368 ret false
369 end
370 deadline = add monons long `5000000000`
371 while lt get hcount 0 total bound 4000
372 p = get hcount 0
373 left = sub deadline monons
374 if le left 0
375 ret false
376 end
377 if le waitio get hfd 0 1 left 0
378 ret false
379 end
380 r = recv get hfd 0 hreq p sub total p 64
381 if eq r neg long 11
382 continue
383 end
384 if le r 0
385 ret false
386 end
387 put hcount 0 add p ulong r
388 end
389 nheader n
390 for i ulong n
391 c = get hreq add off i
392 if eq c 0
393 ret false
394 end
395 put nbuf add i 2 c
396 end
397 ret true
398 end
399
400 fn hchunk n ulong to bool
401 for i ulong 4
402 shift = mul sub 3 i 4
403 put hbuf i get hex and shr n shift 15
404 end
405 put hbuf 4 13
406 put hbuf 5 10
407 for i ulong n
408 put hbuf add i 6 get nbuf i
409 end
410 put hbuf add n 6 13
411 put hbuf add n 7 10
412 ret hsend add n 8
413 end
414
415 fn hstream to void
416 started = false
417 for frame ulong 1024
418 if not nreceive 0 2 `30000000000`
419 if not started
420 r = respond502
421 end
422 ret
423 end
424 n = nlength
425 if eq n 65535
426 if not started
427 if nreceive 0 1 `2000000000`
428 if eq get nbuf 0 3
429 r = respond422
430 else
431 r = respond502
432 end
433 else
434 r = respond502
435 end
436 end
437 ret
438 end
439 if gt n 4096
440 if not started
441 r = respond502
442 end
443 ret
444 end
445 if not started
446 if not streamhead
447 ret
448 end
449 started = true
450 end
451 if eq n 0
452 r = streamend
453 ret
454 end
455 if not nreceive 0 n `2000000000`
456 ret
457 end
458 if not hchunk n
459 ret
460 end
461 end
462 end
463
464 fn hmodel to void
465 naddress
466 fd = socknew 1 524289 0
467 if lt fd 0
468 r = respond503
469 ret
470 end
471 if ne connect int fd naddr 0 add len nsock 3 0
472 closed = fclose int fd
473 r = respond503
474 ret
475 end
476 put nfd 0 int fd
477 if nsend 0 add get hsize 0 2
478 hstream
479 else
480 r = respond502
481 end
482 closed = fclose int fd
483 end
484
485 fn hserve to void
486 if not hread
487 r = respond400
488 ret
489 end
490 if not hparse
491 r = respond400
492 ret
493 end
494 route = get hroute 0
495 if eq route 1
496 if ne get hsize 0 0
497 r = respond400
498 ret
499 end
500 r = respondpage
501 ret
502 end
503 if or eq route 2 eq route 3
504 if or ne get hguard 0 1 ne get hseen 0 1
505 r = respond400
506 ret
507 end
508 if not hbody
509 r = respond400
510 ret
511 end
512 if eq route 3
513 wrepair
514 else
515 hmodel
516 end
517 else
518 r = respond404
519 end
520 end
521
522 fn main to int
523 put haddr 0 2
524 put haddr 2 70
525 put haddr 3 255
526 put haddr 4 127
527 put haddr 7 1
528 put hopt 0 1
529 fd = socknew 2 524289 0
530 if lt fd 0
531 ret 70
532 end
533 r = sockopt int fd 1 2 hopt 0 4
534 if ne bind int fd haddr 0 16 0
535 ret 71
536 end
537 if ne listen int fd 16 0
538 ret 72
539 end
540 active = ulong 0
541 for request ulong `1000000`
542 for reap ulong 16
543 done = waitpid -1 hstat 0 4 1
544 if le done 0
545 break
546 end
547 if gt active 0
548 active = sub active 1
549 end
550 end
551 if ge active 16
552 r = sleepns `10000000`
553 continue
554 end
555 if le waitio int fd 1 `1000000000` 0
556 continue
557 end
558 client = accept int fd 524288
559 if lt client 0
560 continue
561 end
562 pid = fork
563 if eq pid 0
564 r = fclose int fd
565 put hfd 0 int client
566 r = sockopt int client 6 1 hopt 0 4
567 hserve
568 r = fclose int client
569 ret 0
570 end
571 r = fclose int client
572 if gt pid 0
573 active = add active 1
574 end
575 end
576 ret 0
577 end
578
579 note Model-driven tools for one bounded arithmetic practice file. Paths from the model never become OS paths.
580 global wsrc uchar 1024
581 global wslen ulong 1
582 global wobs uchar 1024
583 global wolen ulong 1
584 global wans uchar 4096
585 global walen ulong 1
586 global wpath uchar 128
587 global wplen ulong 1
588 global wgoal uchar 256
589 global wglen ulong 1
590 global wbuf uchar 8192
591 global wlen ulong 1
592 global wjob ulong 5
593 global wstate ulong 1
594 global wvalid ulong 1
595 global wcall ulong 1
596 global wclen ulong 1
597 global wtmp uchar 1024
598 global wtlen ulong 1
599 global wargv uchar 1024
600 global wstat uchar 4
601 global wdir uchar 256
602 global wdlen ulong 1
603 global wout uchar 4096
604 global wused ulong 1
605 global wfld uchar 512
606 global wflen ulong 4
607 global wpos ulong 1
608 global wtok uchar 128
609 global wtkn ulong 1
610 text wprog "program.om"
611 text wtest "test.om"
612 text wexe "test.bin"
613 text werr "check.err"
614 text wrout "run.out"
615 text wbase "$HOME/.local/share/omega-tool-model/practice/"
616 text wcomp "$HOME/handoffs/omega-tool-deployment-`20261105`/workbench/omc"
617 text wexec "./test.bin"
618
619 fn wb c uchar to void
620 if ge get wlen 0 8192
621 exit 90
622 end
623 put wbuf get wlen 0 c
624 put wlen 0 add get wlen 0 1
625 end
626 fn wn n ulong to void
627 if ge n 10
628 wn div n 10
629 end
630 wb uchar add rem n 10 48
631 end
632 fn wz to void
633 put wlen 0 0
634 end
635 fn wbyte mode ulong i ulong to uchar
636 if eq mode 1
637 ret get wsrc i
638 end
639 if eq mode 2
640 ret get wobs i
641 end
642 if eq mode 3
643 ret get wans i
644 end
645 if eq mode 4
646 ret get wpath i
647 end
648 if eq mode 5
649 ret get wgoal i
650 end
651 ret get wfld add mul sub mode 6 128 i
652 end
653 fn wlength mode ulong to ulong
654 if eq mode 1
655 ret get wslen 0
656 end
657 if eq mode 2
658 ret get wolen 0
659 end
660 if eq mode 3
661 ret get walen 0
662 end
663 if eq mode 4
664 ret get wplen 0
665 end
666 if eq mode 5
667 ret get wglen 0
668 end
669 ret get wflen sub mode 6
670 end
671 fn wa mode ulong to void
672 for i ulong wlength mode
673 wb wbyte mode i
674 end
675 end
676 fn wj mode ulong to void
677 wb 34
678 for i ulong wlength mode
679 c = wbyte mode i
680 if or eq c 34 eq c 92
681 wb 92
682 wb c
683 else
684 if eq c 10
685 wb 92
686 wb 110
687 else
688 if eq c 13
689 wb 92
690 wb 114
691 else
692 if eq c 9
693 wb 92
694 wb 116
695 else
696 if lt c 32
697 wb 63
698 else
699 wb c
700 end
701 end
702 end
703 end
704 end
705 end
706 wb 34
707 end
708 fn wobsbuf to void
709 if gt get wlen 0 1024
710 exit 90
711 end
712 put wolen 0 get wlen 0
713 for i ulong get wlen 0
714 put wobs i get wbuf i
715 end
716 end
717 fn wemit to bool
718 wb 10
719 n = get wlen 0
720 for i ulong n
721 put nbuf i get wbuf i
722 end
723 ret hchunk n
724 end
725 fn wsmall at ulong to ulong
726 if ge at get wslen 0
727 ret 10000
728 end
729 c = get wsrc at
730 if or lt c 49 gt c 54
731 ret 10000
732 end
733 ret add at 1
734 end
735 fn wgrammar to bool
736 put wcall 0 0
737 put wclen 0 0
738 p = wconsumec0 0
739 if wmc1 p
740 p = wconsumec2 p
741 p = wsmall p
742 p = wconsumec3 p
743 if wmc4 p
744 p = add p 3
745 else
746 p = wconsumec5 p
747 end
748 p = wconsumec6 p
749 p = wsmall p
750 p = wconsumec7 p
751 else
752 if eq get wjob 0 2
753 ret false
754 end
755 p = wconsumec8 p
756 if or wmc4 p or wmc9 p wmc10 p
757 p = add p 3
758 else
759 if wmc11 p
760 p = add p 4
761 else
762 p = wconsumec12 p
763 end
764 end
765 p = wconsumec13 p
766 p = wsmall p
767 p = wconsumec14 p
768 end
769 p = wconsumec15 p
770 if ge p get wslen 0
771 ret false
772 end
773 put wcall 0 p
774 v = ulong 0
775 start = p
776 while lt p get wslen 0 bound 1024
777 c = get wsrc p
778 if or lt c 48 gt c 57
779 break
780 end
781 v = add mul v 10 ulong sub c 48
782 if gt v 99
783 ret false
784 end
785 p = add p 1
786 end
787 if or eq p start gt sub p start 2
788 ret false
789 end
790 put wclen 0 sub p start
791 if ne v get wjob 1
792 ret false
793 end
794 p = wconsumec14 p
795 ret eq p get wslen 0
796 end
797
798 fn wsave to bool
799 fd = fopen wprog 0 len wprog 524865 384
800 if lt fd 0
801 ret false
802 end
803 n = write int fd wsrc 0 get wslen 0
804 r = fclose int fd
805 ret and eq n long get wslen 0 eq r 0
806 end
807 fn wload to bool
808 fd = fopen wprog 0 len wprog 524288 0
809 if lt fd 0
810 ret false
811 end
812 n = read int fd wsrc 0 1024
813 r = fclose int fd
814 if or le n 0 gt n 600
815 ret false
816 end
817 put wslen 0 ulong n
818 ret eq r 0
819 end
820 fn wmkdir to bool
821 wz
822 wtc16
823 wn ulong getpid
824 wb 45
825 wn ulong monons
826 n = get wlen 0
827 for i ulong n
828 put wdir i get wbuf i
829 end
830 put wdlen 0 n
831 if ne makedir wdir 0 n 448 0
832 ret false
833 end
834 ret eq chdir wdir 0 n 0
835 end
836 fn wclean to void
837 r = unlink wprog 0 len wprog
838 r = unlink wtest 0 len wtest
839 r = unlink wexe 0 len wexe
840 r = unlink werr 0 len werr
841 r = unlink wrout 0 len wrout
842 r = chdir wbase 0 len wbase
843 r = rmdir wdir 0 get wdlen 0
844 end
845 fn wwait pid int timeout long to long
846 deadline = add monons timeout
847 for poll ulong 10000
848 r = waitpid pid wstat 0 4 1
849 if eq r long pid
850 if ne get wstat 0 0
851 ret -2
852 end
853 ret long get wstat 1
854 end
855 if lt r 0
856 ret -3
857 end
858 if ge monons deadline
859 r = killpid pid 9
860 r = waitpid pid wstat 0 4 0
861 ret -1
862 end
863 r = sleepns `1000000`
864 end
865 r = killpid pid 9
866 r = waitpid pid wstat 0 4 0
867 ret -1
868 end
869 fn wlaunch mode ulong ifd int ofd int efd int to long
870 wz
871 if eq mode 0
872 wtc17
873 else
874 wtc18
875 end
876 n = get wlen 0
877 put wargv 0 1
878 put wargv 1 0
879 put wargv 2 uchar and n 255
880 put wargv 3 uchar shr n 8
881 for i ulong n
882 put wargv add i 4 get wbuf i
883 end
884 pid = fork
885 if lt pid 0
886 ret -3
887 end
888 if eq pid 0
889 if ne dupfd ifd 0 0 0
890 exit 98
891 end
892 if ne dupfd ofd 1 0 1
893 exit 98
894 end
895 if ne dupfd efd 2 0 2
896 exit 98
897 end
898 r = execprog wargv 0 add n 4
899 exit 98
900 end
901 ret wwait int pid `2000000000`
902 end
903 fn wcompile to long
904 inf = fopen wtest 0 len wtest 524288 0
905 outf = fopen wexe 0 len wexe 524865 384
906 errf = fopen werr 0 len werr 524865 384
907 if or lt inf 0 or lt outf 0 lt errf 0
908 r = fclose int inf
909 r = fclose int outf
910 r = fclose int errf
911 ret -3
912 end
913 rc = wlaunch 0 int inf int outf int errf
914 r = fclose int inf
915 r = fclose int outf
916 r = fclose int errf
917 ret rc
918 end
919 fn wrun to long
920 inf = fopen wtest 0 len wtest 524288 0
921 outf = fopen wrout 0 len wrout 524865 384
922 errf = fopen werr 0 len werr 524865 384
923 if or lt inf 0 or lt outf 0 lt errf 0
924 r = fclose int inf
925 r = fclose int outf
926 r = fclose int errf
927 ret -3
928 end
929 if ne chmod wexe 0 len wexe 448 0
930 r = fclose int inf
931 r = fclose int outf
932 r = fclose int errf
933 ret -3
934 end
935 rc = wlaunch 1 int inf int outf int errf
936 r = fclose int inf
937 r = fclose int outf
938 r = fclose int errf
939 ret rc
940 end
941 fn wtestsrc x ulong to bool
942 wz
943 for i ulong get wcall 0
944 wb get wsrc i
945 end
946 wn x
947 p = add get wcall 0 get wclen 0
948 while lt p get wslen 0 bound 1024
949 wb get wsrc p
950 p = add p 1
951 end
952 fd = fopen wtest 0 len wtest 524865 384
953 if lt fd 0
954 ret false
955 end
956 n = write int fd wbuf 0 get wlen 0
957 r = fclose int fd
958 ret and eq n long get wlen 0 eq r 0
959 end
960 fn wexpected x ulong to ulong
961 if eq get wjob 0 0
962 ret add x get wjob 2
963 end
964 if eq get wjob 0 1
965 ret mul x get wjob 2
966 end
967 ret add x mul get wjob 2 get wjob 3
968 end
969 fn wcheck to bool
970 if not wload
971 woc19
972 ret false
973 end
974 if not wgrammar
975 woc20
976 ret false
977 end
978 for test ulong 4
979 x = get wjob 1
980 if eq test 1
981 x = 0
982 end
983 if eq test 2
984 x = 3
985 end
986 if eq test 3
987 x = 7
988 end
989 if not wtestsrc x
990 woc21
991 ret false
992 end
993 rc = wcompile
994 if ne rc 0
995 if lt rc 0
996 woc22
997 ret false
998 end
999 fd = fopen werr 0 len werr 524288 0
1000 n = read int fd wobs 0 1024
1001 r = fclose int fd
1002 if le n 0
1003 woc23
1004 else
1005 put wolen 0 ulong n
1006 while gt get wolen 0 0 bound 1024
1007 p = sub get wolen 0 1
1008 if ne get wobs p 10
1009 break
1010 end
1011 put wolen 0 p
1012 end
1013 end
1014 ret false
1015 end
1016 actual = wrun
1017 if lt actual 0
1018 woc24
1019 ret false
1020 end
1021 want = wexpected x
1022 wz
1023 wtc25
1024 wn x
1025 wtc26
1026 wn want
1027 wtc27
1028 wn ulong actual
1029 wtc28
1030 if not wemit
1031 woc29
1032 ret false
1033 end
1034 if ne ulong actual want
1035 wz
1036 wtc30
1037 wn x
1038 wtc31
1039 wn want
1040 wtc32
1041 wn ulong actual
1042 wtc33
1043 wobsbuf
1044 ret false
1045 end
1046 end
1047 woc34
1048 ret true
1049 end
1050
1051 note Strict JSON object with exactly tool/path, or tool/path/old/new, all bounded strings.
1052 fn wspace to void
1053 while lt get wpos 0 get walen 0 bound 4096
1054 c = get wans get wpos 0
1055 if not or or eq c 32 eq c 10 or eq c 13 eq c 9
1056 ret
1057 end
1058 put wpos 0 add get wpos 0 1
1059 end
1060 end
1061 fn wpunc c uchar to bool
1062 wspace
1063 p = get wpos 0
1064 if ge p get walen 0
1065 ret false
1066 end
1067 if ne get wans p c
1068 ret false
1069 end
1070 put wpos 0 add p 1
1071 ret true
1072 end
1073 fn wstring to bool
1074 put wtkn 0 0
1075 if not wpunc 34
1076 ret false
1077 end
1078 while lt get wpos 0 get walen 0 bound 4096
1079 p = get wpos 0
1080 c = get wans p
1081 put wpos 0 add p 1
1082 if eq c 34
1083 ret true
1084 end
1085 if lt c 32
1086 ret false
1087 end
1088 if eq c 92
1089 p = get wpos 0
1090 if ge p get walen 0
1091 ret false
1092 end
1093 c = get wans p
1094 put wpos 0 add p 1
1095 if eq c 110
1096 c = 10
1097 else
1098 if eq c 114
1099 c = 13
1100 else
1101 if eq c 116
1102 c = 9
1103 else
1104 if not or eq c 34 or eq c 92 eq c 47
1105 ret false
1106 end
1107 end
1108 end
1109 end
1110 end
1111 if ge get wtkn 0 127
1112 ret false
1113 end
1114 put wtok get wtkn 0 c
1115 put wtkn 0 add get wtkn 0 1
1116 end
1117 ret false
1118 end
1119 fn wjson to bool
1120 put wpos 0 0
1121 for i ulong 4
1122 put wflen i 0
1123 end
1124 if not wpunc 123
1125 ret false
1126 end
1127 mask = ulong 0
1128 for field ulong 4
1129 if not wstring
1130 ret false
1131 end
1132 slot = ulong 4
1133 if wtokenc35
1134 slot = 0
1135 end
1136 if wtokenc36
1137 slot = 1
1138 end
1139 if wtokenc37
1140 slot = 2
1141 end
1142 if wtokenc38
1143 slot = 3
1144 end
1145 if eq slot 4
1146 ret false
1147 end
1148 bit = shl ulong 1 slot
1149 if ne and mask bit 0
1150 ret false
1151 end
1152 mask = or mask bit
1153 if not wpunc 58
1154 ret false
1155 end
1156 if not wstring
1157 ret false
1158 end
1159 put wflen slot get wtkn 0
1160 for i ulong get wtkn 0
1161 put wfld add mul slot 128 i get wtok i
1162 end
1163 wspace
1164 p = get wpos 0
1165 if ge p get walen 0
1166 ret false
1167 end
1168 if eq get wans p 125
1169 put wpos 0 add p 1
1170 wspace
1171 if ne get wpos 0 get walen 0
1172 ret false
1173 end
1174 if wfieldc39 0
1175 ret eq mask 15
1176 end
1177 ret eq mask 3
1178 end
1179 if not wpunc 44
1180 ret false
1181 end
1182 end
1183 ret false
1184 end
1185 fn wmatchold at ulong to bool
1186 n = get wflen 2
1187 if gt add at n get wslen 0
1188 ret false
1189 end
1190 for i ulong n
1191 if ne get wsrc add at i get wfld add 256 i
1192 ret false
1193 end
1194 end
1195 ret true
1196 end
1197 fn wpatch to bool
1198 oldn = get wflen 2
1199 newn = get wflen 3
1200 if or eq oldn 0 or gt oldn 40 gt newn 40
1201 ret false
1202 end
1203 count = ulong 0
1204 found = ulong 0
1205 for i ulong get wslen 0
1206 if wmatchold i
1207 count = add count 1
1208 found = i
1209 end
1210 end
1211 if ne count 1
1212 ret false
1213 end
1214 newsize = add sub get wslen 0 oldn newn
1215 if gt newsize 600
1216 ret false
1217 end
1218 put wtlen 0 get wslen 0
1219 for i ulong get wslen 0
1220 put wtmp i get wsrc i
1221 end
1222 p = found
1223 for i ulong newn
1224 put wsrc p get wfld add 384 i
1225 p = add p 1
1226 end
1227 tail = add found oldn
1228 while lt tail get wtlen 0 bound 1024
1229 put wsrc p get wtmp tail
1230 p = add p 1
1231 tail = add tail 1
1232 end
1233 put wslen 0 newsize
1234 if not wgrammar
1235 put wslen 0 get wtlen 0
1236 for i ulong get wtlen 0
1237 put wsrc i get wtmp i
1238 end
1239 ret false
1240 end
1241 ret wsave
1242 end
1243
1244 fn wprompt to void
1245 wz
1246 wtc40
1247 wa 4
1248 wtc41
1249 wa 5
1250 wtc42
1251 s = get wstate 0
1252 if eq s 0
1253 wtc43
1254 end
1255 if eq s 1
1256 wtc44
1257 end
1258 if eq s 2
1259 wtc45
1260 end
1261 if eq s 3
1262 wtc46
1263 end
1264 if eq s 4
1265 wtc47
1266 end
1267 if eq s 5
1268 wtc48
1269 end
1270 wb 10
1271 if and ne s 0 ne s 5
1272 wtc49
1273 wa 1
1274 end
1275 if ne s 0
1276 wtc50
1277 wa 2
1278 wb 10
1279 end
1280 wtc51
1281 end
1282 fn wresponse to bool
1283 put walen 0 0
1284 for frame ulong 1024
1285 if not nreceive 0 2 `30000000000`
1286 ret false
1287 end
1288 n = nlength
1289 if eq n 0
1290 ret true
1291 end
1292 if or eq n 65535 gt n 4096
1293 ret false
1294 end
1295 if gt add get walen 0 n 4096
1296 ret false
1297 end
1298 if not nreceive 0 n `2000000000`
1299 ret false
1300 end
1301 for i ulong n
1302 put wans add get walen 0 i get nbuf i
1303 end
1304 put walen 0 add get walen 0 n
1305 end
1306 ret false
1307 end
1308 fn wask to bool
1309 wprompt
1310 n = get wlen 0
1311 if gt n 4000
1312 ret false
1313 end
1314 nheader n
1315 for i ulong n
1316 put nbuf add i 2 get wbuf i
1317 end
1318 naddress
1319 fd = socknew 1 524289 0
1320 if lt fd 0
1321 ret false
1322 end
1323 if ne connect int fd naddr 0 add len nsock 3 0
1324 r = fclose int fd
1325 ret false
1326 end
1327 put nfd 0 int fd
1328 ok = false
1329 if nsend 0 add n 2
1330 ok = wresponse
1331 end
1332 r = fclose int fd
1333 ret ok
1334 end
1335 fn wrightpath to bool
1336 if ne get wflen 1 get wplen 0
1337 ret false
1338 end
1339 for i ulong get wplen 0
1340 if ne get wfld add 128 i get wpath i
1341 ret false
1342 end
1343 end
1344 ret true
1345 end
1346 fn waction to bool
1347 s = get wstate 0
1348 if and wfieldc52 0 eq s 0
1349 if eq get wjob 4 1
1350 put wslen 0 0
1351 put wstate 0 5
1352 woc53
1353 else
1354 if not wload
1355 ret false
1356 end
1357 put wstate 0 1
1358 woc54
1359 end
1360 ret weventc55 2
1361 end
1362 if and wfieldc56 0 or eq s 1 eq s 3
1363 put wvalid 0 0
1364 if wcheck
1365 put wstate 0 4
1366 put wvalid 0 1
1367 else
1368 put wstate 0 2
1369 end
1370 ret weventc55 2
1371 end
1372 if and wfieldc39 0 eq s 2
1373 if not wpatch
1374 ret false
1375 end
1376 put wstate 0 3
1377 put wvalid 0 0
1378 woc57
1379 if not weventc58 1
1380 ret false
1381 end
1382 ret weventc55 2
1383 end
1384 ret false
1385 end
1386 fn wloop to void
1387 put wstate 0 0
1388 put wvalid 0 0
1389 if not weventc59 1
1390 ret
1391 end
1392 for turn ulong 7
1393 if not wask
1394 wfinishc60 false
1395 ret
1396 end
1397 if not weventc61 3
1398 ret
1399 end
1400 if wanswerc62
1401 if and eq get wstate 0 4 eq get wvalid 0 1
1402 wfinishc63 true
1403 else
1404 wfinishc64 false
1405 end
1406 ret
1407 end
1408 if wanswerc65
1409 if eq get wstate 0 5
1410 wfinishc66 false
1411 else
1412 wfinishc67 false
1413 end
1414 ret
1415 end
1416 if not wjson
1417 wfinishc68 false
1418 ret
1419 end
1420 if not wrightpath
1421 wfinishc69 false
1422 ret
1423 end
1424 if not waction
1425 wfinishc70 false
1426 ret
1427 end
1428 end
1429 wfinishc71 false
1430 end
1431 fn wrepair to void
1432 n = get hsize 0
1433 off = get hend 0
1434 if lt n 2
1435 r = respond400
1436 ret
1437 end
1438 id = get hreq off
1439 if or lt id 65 gt id 77
1440 r = respond400
1441 ret
1442 end
1443 if ne get hreq add off 1 10
1444 r = respond400
1445 ret
1446 end
1447 wjobload ulong sub id 65
1448 if gt sub n 2 600
1449 r = respond400
1450 ret
1451 end
1452 put wslen 0 sub n 2
1453 for i ulong get wslen 0
1454 put wsrc i get hreq add add off 2 i
1455 end
1456 if eq get wjob 4 1
1457 put wslen 0 0
1458 else
1459 if not wgrammar
1460 if streamhead
1461 wfinishc72 false
1462 end
1463 ret
1464 end
1465 end
1466 if not wmkdir
1467 r = respond503
1468 ret
1469 end
1470 if ne get wjob 4 1
1471 if not wsave
1472 wclean
1473 r = respond503
1474 ret
1475 end
1476 end
1477 if streamhead
1478 wloop
1479 end
1480 wclean
1481 end
1482
1483 fn wjobload id ulong to void
1484 if eq id 0
1485 put wjob 0 2
1486 put wjob 1 70
1487 put wjob 2 4
1488 put wjob 3 3
1489 put wjob 4 0
1490 wz
1491 wtc73
1492 put wplen 0 get wlen 0
1493 for i ulong get wlen 0
1494 put wpath i get wbuf i
1495 end
1496 wz
1497 wtc74
1498 put wglen 0 get wlen 0
1499 for i ulong get wlen 0
1500 put wgoal i get wbuf i
1501 end
1502 ret
1503 end
1504 if eq id 1
1505 put wjob 0 2
1506 put wjob 1 74
1507 put wjob 2 3
1508 put wjob 3 3
1509 put wjob 4 0
1510 wz
1511 wtc75
1512 put wplen 0 get wlen 0
1513 for i ulong get wlen 0
1514 put wpath i get wbuf i
1515 end
1516 wz
1517 wtc76
1518 put wglen 0 get wlen 0
1519 for i ulong get wlen 0
1520 put wgoal i get wbuf i
1521 end
1522 ret
1523 end
1524 if eq id 2
1525 put wjob 0 0
1526 put wjob 1 73
1527 put wjob 2 5
1528 put wjob 3 0
1529 put wjob 4 0
1530 wz
1531 wtc77
1532 put wplen 0 get wlen 0
1533 for i ulong get wlen 0
1534 put wpath i get wbuf i
1535 end
1536 wz
1537 wtc78
1538 put wglen 0 get wlen 0
1539 for i ulong get wlen 0
1540 put wgoal i get wbuf i
1541 end
1542 ret
1543 end
1544 if eq id 3
1545 put wjob 0 1
1546 put wjob 1 72
1547 put wjob 2 1
1548 put wjob 3 0
1549 put wjob 4 0
1550 wz
1551 wtc79
1552 put wplen 0 get wlen 0
1553 for i ulong get wlen 0
1554 put wpath i get wbuf i
1555 end
1556 wz
1557 wtc80
1558 put wglen 0 get wlen 0
1559 for i ulong get wlen 0
1560 put wgoal i get wbuf i
1561 end
1562 ret
1563 end
1564 if eq id 4
1565 put wjob 0 2
1566 put wjob 1 72
1567 put wjob 2 1
1568 put wjob 3 6
1569 put wjob 4 0
1570 wz
1571 wtc81
1572 put wplen 0 get wlen 0
1573 for i ulong get wlen 0
1574 put wpath i get wbuf i
1575 end
1576 wz
1577 wtc82
1578 put wglen 0 get wlen 0
1579 for i ulong get wlen 0
1580 put wgoal i get wbuf i
1581 end
1582 ret
1583 end
1584 if eq id 5
1585 put wjob 0 2
1586 put wjob 1 70
1587 put wjob 2 2
1588 put wjob 3 4
1589 put wjob 4 0
1590 wz
1591 wtc83
1592 put wplen 0 get wlen 0
1593 for i ulong get wlen 0
1594 put wpath i get wbuf i
1595 end
1596 wz
1597 wtc84
1598 put wglen 0 get wlen 0
1599 for i ulong get wlen 0
1600 put wgoal i get wbuf i
1601 end
1602 ret
1603 end
1604 if eq id 6
1605 put wjob 0 2
1606 put wjob 1 71
1607 put wjob 2 5
1608 put wjob 3 3
1609 put wjob 4 1
1610 wz
1611 wtc85
1612 put wplen 0 get wlen 0
1613 for i ulong get wlen 0
1614 put wpath i get wbuf i
1615 end
1616 wz
1617 wtc86
1618 put wglen 0 get wlen 0
1619 for i ulong get wlen 0
1620 put wgoal i get wbuf i
1621 end
1622 ret
1623 end
1624 if eq id 7
1625 put wjob 0 0
1626 put wjob 1 73
1627 put wjob 2 5
1628 put wjob 3 0
1629 put wjob 4 0
1630 wz
1631 wtc87
1632 put wplen 0 get wlen 0
1633 for i ulong get wlen 0
1634 put wpath i get wbuf i
1635 end
1636 wz
1637 wtc78
1638 put wglen 0 get wlen 0
1639 for i ulong get wlen 0
1640 put wgoal i get wbuf i
1641 end
1642 ret
1643 end
1644 if eq id 8
1645 put wjob 0 0
1646 put wjob 1 70
1647 put wjob 2 1
1648 put wjob 3 0
1649 put wjob 4 0
1650 wz
1651 wtc88
1652 put wplen 0 get wlen 0
1653 for i ulong get wlen 0
1654 put wpath i get wbuf i
1655 end
1656 wz
1657 wtc89
1658 put wglen 0 get wlen 0
1659 for i ulong get wlen 0
1660 put wgoal i get wbuf i
1661 end
1662 ret
1663 end
1664 if eq id 9
1665 put wjob 0 0
1666 put wjob 1 72
1667 put wjob 2 1
1668 put wjob 3 0
1669 put wjob 4 1
1670 wz
1671 wtc90
1672 put wplen 0 get wlen 0
1673 for i ulong get wlen 0
1674 put wpath i get wbuf i
1675 end
1676 wz
1677 wtc91
1678 put wglen 0 get wlen 0
1679 for i ulong get wlen 0
1680 put wgoal i get wbuf i
1681 end
1682 ret
1683 end
1684 if eq id 10
1685 put wjob 0 1
1686 put wjob 1 71
1687 put wjob 2 1
1688 put wjob 3 0
1689 put wjob 4 0
1690 wz
1691 wtc92
1692 put wplen 0 get wlen 0
1693 for i ulong get wlen 0
1694 put wpath i get wbuf i
1695 end
1696 wz
1697 wtc93
1698 put wglen 0 get wlen 0
1699 for i ulong get wlen 0
1700 put wgoal i get wbuf i
1701 end
1702 ret
1703 end
1704 if eq id 11
1705 put wjob 0 1
1706 put wjob 1 74
1707 put wjob 2 1
1708 put wjob 3 0
1709 put wjob 4 0
1710 wz
1711 wtc94
1712 put wplen 0 get wlen 0
1713 for i ulong get wlen 0
1714 put wpath i get wbuf i
1715 end
1716 wz
1717 wtc95
1718 put wglen 0 get wlen 0
1719 for i ulong get wlen 0
1720 put wgoal i get wbuf i
1721 end
1722 ret
1723 end
1724 if eq id 12
1725 put wjob 0 1
1726 put wjob 1 73
1727 put wjob 2 1
1728 put wjob 3 0
1729 put wjob 4 1
1730 wz
1731 wtc96
1732 put wplen 0 get wlen 0
1733 for i ulong get wlen 0
1734 put wpath i get wbuf i
1735 end
1736 wz
1737 wtc97
1738 put wglen 0 get wlen 0
1739 for i ulong get wlen 0
1740 put wgoal i get wbuf i
1741 end
1742 ret
1743 end
1744 end
1745 text t0 "HTTP/1.1 200 OK\nConnection: close\nCache-Control: no-store\nX-Content-Type-Options: nosniff\nReferrer-Policy: no-referrer\nContent-Security-Policy: default-src 'none'; script-src 'sha256-bWTGATZgaaJeoGYh6ERYnQR4IwNh+uZuPc4WbOr70QM='; style-src 'unsafe-inline'; connect-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'\nContent-Type: text/html; charset=utf-8\nContent-Length: 15473\n\n"
1746 text page "\n
Omega · Your model\n\nOMEGARound 40 · Fast model\n
Give your model a coding job.
\n
Watch your model read a practice file, repair it, and check the result. Start with an example, then try changing its code.
\n
Practice with tools
Real compiler checks
\n
Choose a job. The model will work on a temporary copy and show each step.
\n\n\n
You can change the numbers or try an arithmetic spelling mistake. Keep the same program shape and starting input. Larger programs are not supported here yet.
\n\n
Choose a job and press Run.
\n\n
Current code
\n\n
Ask for a single response
\n\n
Model response
Its response will appear here.
\n\n\n"
1747 fn respondpage to bool
1748 p = ulong 0
1749 for i ulong len t0
1750 c = get t0 i
1751 if eq c 10
1752 put hbuf p 13
1753 p = add p 1
1754 end
1755 put hbuf p c
1756 p = add p 1
1757 end
1758 for i ulong len page
1759 put hbuf p get page i
1760 p = add p 1
1761 end
1762 ret hsend p
1763 end
1764 text t1 "HTTP/1.1 400 Bad Request\nConnection: close\nCache-Control: no-store\nX-Content-Type-Options: nosniff\nReferrer-Policy: no-referrer\nContent-Security-Policy: default-src 'none'; script-src 'sha256-bWTGATZgaaJeoGYh6ERYnQR4IwNh+uZuPc4WbOr70QM='; style-src 'unsafe-inline'; connect-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'\nContent-Type: text/plain; charset=utf-8\nContent-Length: 55\n\nPlease send a short, nonempty request using this page.\n"
1765 fn respond400 to bool
1766 p = ulong 0
1767 for i ulong len t1
1768 c = get t1 i
1769 if eq c 10
1770 put hbuf p 13
1771 p = add p 1
1772 end
1773 put hbuf p c
1774 p = add p 1
1775 end
1776 put hbuf sub p 2 10
1777 p = sub p 1
1778 ret hsend p
1779 end
1780 text t2 "HTTP/1.1 404 Not Found\nConnection: close\nCache-Control: no-store\nX-Content-Type-Options: nosniff\nReferrer-Policy: no-referrer\nContent-Security-Policy: default-src 'none'; script-src 'sha256-bWTGATZgaaJeoGYh6ERYnQR4IwNh+uZuPc4WbOr70QM='; style-src 'unsafe-inline'; connect-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'\nContent-Type: text/plain; charset=utf-8\nContent-Length: 16\n\nPage not found.\n"
1781 fn respond404 to bool
1782 p = ulong 0
1783 for i ulong len t2
1784 c = get t2 i
1785 if eq c 10
1786 put hbuf p 13
1787 p = add p 1
1788 end
1789 put hbuf p c
1790 p = add p 1
1791 end
1792 put hbuf sub p 2 10
1793 p = sub p 1
1794 ret hsend p
1795 end
1796 text t3 "HTTP/1.1 422 Unprocessable Content\nConnection: close\nCache-Control: no-store\nX-Content-Type-Options: nosniff\nReferrer-Policy: no-referrer\nContent-Security-Policy: default-src 'none'; script-src 'sha256-bWTGATZgaaJeoGYh6ERYnQR4IwNh+uZuPc4WbOr70QM='; style-src 'unsafe-inline'; connect-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'\nContent-Type: text/plain; charset=utf-8\nContent-Length: 73\n\nThis request is too long for the model. Please shorten it and try again.\n"
1797 fn respond422 to bool
1798 p = ulong 0
1799 for i ulong len t3
1800 c = get t3 i
1801 if eq c 10
1802 put hbuf p 13
1803 p = add p 1
1804 end
1805 put hbuf p c
1806 p = add p 1
1807 end
1808 put hbuf sub p 2 10
1809 p = sub p 1
1810 ret hsend p
1811 end
1812 text t4 "HTTP/1.1 502 Bad Gateway\nConnection: close\nCache-Control: no-store\nX-Content-Type-Options: nosniff\nReferrer-Policy: no-referrer\nContent-Security-Policy: default-src 'none'; script-src 'sha256-bWTGATZgaaJeoGYh6ERYnQR4IwNh+uZuPc4WbOr70QM='; style-src 'unsafe-inline'; connect-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'\nContent-Type: text/plain; charset=utf-8\nContent-Length: 54\n\nThe model response was interrupted. Please try again.\n"
1813 fn respond502 to bool
1814 p = ulong 0
1815 for i ulong len t4
1816 c = get t4 i
1817 if eq c 10
1818 put hbuf p 13
1819 p = add p 1
1820 end
1821 put hbuf p c
1822 p = add p 1
1823 end
1824 put hbuf sub p 2 10
1825 p = sub p 1
1826 ret hsend p
1827 end
1828 text t5 "HTTP/1.1 503 Service Unavailable\nConnection: close\nCache-Control: no-store\nX-Content-Type-Options: nosniff\nReferrer-Policy: no-referrer\nContent-Security-Policy: default-src 'none'; script-src 'sha256-bWTGATZgaaJeoGYh6ERYnQR4IwNh+uZuPc4WbOr70QM='; style-src 'unsafe-inline'; connect-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'\nContent-Type: text/plain; charset=utf-8\nContent-Length: 60\n\nThe model service is unavailable. Please try again shortly.\n"
1829 fn respond503 to bool
1830 p = ulong 0
1831 for i ulong len t5
1832 c = get t5 i
1833 if eq c 10
1834 put hbuf p 13
1835 p = add p 1
1836 end
1837 put hbuf p c
1838 p = add p 1
1839 end
1840 put hbuf sub p 2 10
1841 p = sub p 1
1842 ret hsend p
1843 end
1844 text t6 "HTTP/1.1 200 OK\nConnection: close\nCache-Control: no-store\nX-Content-Type-Options: nosniff\nReferrer-Policy: no-referrer\nContent-Security-Policy: default-src 'none'; script-src 'sha256-bWTGATZgaaJeoGYh6ERYnQR4IwNh+uZuPc4WbOr70QM='; style-src 'unsafe-inline'; connect-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'\nContent-Type: text/plain; charset=utf-8\nTransfer-Encoding: chunked\nX-Accel-Buffering: no\n\n"
1845 fn streamhead to bool
1846 p = ulong 0
1847 for i ulong len t6
1848 c = get t6 i
1849 if eq c 10
1850 put hbuf p 13
1851 p = add p 1
1852 end
1853 put hbuf p c
1854 p = add p 1
1855 end
1856 ret hsend p
1857 end
1858 text t7 "0\n\n"
1859 fn streamend to bool
1860 p = ulong 0
1861 for i ulong len t7
1862 c = get t7 i
1863 if eq c 10
1864 put hbuf p 13
1865 p = add p 1
1866 end
1867 put hbuf p c
1868 p = add p 1
1869 end
1870 ret hsend p
1871 end
1872 text m0 "GET / HTTP/1.1"
1873 fn isroot a ulong b ulong to bool
1874 if ne sub b a len m0
1875 ret false
1876 end
1877 for i ulong len m0
1878 if ne get hreq add a i get m0 i
1879 ret false
1880 end
1881 end
1882 ret true
1883 end
1884 text m1 "POST /generate HTTP/1.1"
1885 fn isgen a ulong b ulong to bool
1886 if ne sub b a len m1
1887 ret false
1888 end
1889 for i ulong len m1
1890 if ne get hreq add a i get m1 i
1891 ret false
1892 end
1893 end
1894 ret true
1895 end
1896 text m2 "POST /repair HTTP/1.1"
1897 fn isrepair a ulong b ulong to bool
1898 if ne sub b a len m2
1899 ret false
1900 end
1901 for i ulong len m2
1902 if ne get hreq add a i get m2 i
1903 ret false
1904 end
1905 end
1906 ret true
1907 end
1908 text m3 "content-length:"
1909 fn iscl a ulong b ulong to bool
1910 if lt sub b a len m3
1911 ret false
1912 end
1913 for i ulong len m3
1914 if ne get hreq add a i get m3 i
1915 ret false
1916 end
1917 end
1918 ret true
1919 end
1920 text m4 "transfer-encoding:"
1921 fn iste a ulong b ulong to bool
1922 if lt sub b a len m4
1923 ret false
1924 end
1925 for i ulong len m4
1926 if ne get hreq add a i get m4 i
1927 ret false
1928 end
1929 end
1930 ret true
1931 end
1932 text m5 "x-omega-ui: 1"
1933 fn isguard a ulong b ulong to bool
1934 if ne sub b a len m5
1935 ret false
1936 end
1937 for i ulong len m5
1938 if ne get hreq add a i get m5 i
1939 ret false
1940 end
1941 end
1942 ret true
1943 end
1944 text m6 "host:"
1945 fn ishost a ulong b ulong to bool
1946 if lt sub b a len m6
1947 ret false
1948 end
1949 for i ulong len m6
1950 if ne get hreq add a i get m6 i
1951 ret false
1952 end
1953 end
1954 ret true
1955 end
1956 text m7 "host: 127.0.0.1:18175"
1957 fn host0 a ulong b ulong to bool
1958 if ne sub b a len m7
1959 ret false
1960 end
1961 for i ulong len m7
1962 if ne get hreq add a i get m7 i
1963 ret false
1964 end
1965 end
1966 ret true
1967 end
1968 text m8 "host: localhost:18175"
1969 fn host1 a ulong b ulong to bool
1970 if ne sub b a len m8
1971 ret false
1972 end
1973 for i ulong len m8
1974 if ne get hreq add a i get m8 i
1975 ret false
1976 end
1977 end
1978 ret true
1979 end
1980 text m9 "host: 127.0.0.1:18174"
1981 fn host2 a ulong b ulong to bool
1982 if ne sub b a len m9
1983 ret false
1984 end
1985 for i ulong len m9
1986 if ne get hreq add a i get m9 i
1987 ret false
1988 end
1989 end
1990 ret true
1991 end
1992 text m10 "host: localhost:18174"
1993 fn host3 a ulong b ulong to bool
1994 if ne sub b a len m10
1995 ret false
1996 end
1997 for i ulong len m10
1998 if ne get hreq add a i get m10 i
1999 ret false
2000 end
2001 end
2002 ret true
2003 end
2004 fn goodhost a ulong b ulong to bool
2005 ret or or host0 a b host1 a b or host2 a b host3 a b
2006 end
2007 fn wconsumec0 at ulong to ulong
2008 if not wmc98 at
2009 ret 10000
2010 end
2011 ret add at len z0
2012 end
2013
2014 fn wmc1 at ulong to bool
2015 if gt add at len z1 get wslen 0
2016 ret false
2017 end
2018 for i ulong len z1
2019 if ne get wsrc add at i get z1 i
2020 ret false
2021 end
2022 end
2023 ret true
2024 end
2025
2026 fn wconsumec2 at ulong to ulong
2027 if not wmc1 at
2028 ret 10000
2029 end
2030 ret add at len z1
2031 end
2032
2033 fn wconsumec3 at ulong to ulong
2034 if not wmc99 at
2035 ret 10000
2036 end
2037 ret add at len z2
2038 end
2039
2040 fn wmc4 at ulong to bool
2041 if gt add at len z3 get wslen 0
2042 ret false
2043 end
2044 for i ulong len z3
2045 if ne get wsrc add at i get z3 i
2046 ret false
2047 end
2048 end
2049 ret true
2050 end
2051
2052 fn wconsumec5 at ulong to ulong
2053 if not wmc11 at
2054 ret 10000
2055 end
2056 ret add at len z4
2057 end
2058
2059 fn wconsumec6 at ulong to ulong
2060 if not wmc100 at
2061 ret 10000
2062 end
2063 ret add at len z5
2064 end
2065
2066 fn wconsumec7 at ulong to ulong
2067 if not wmc101 at
2068 ret 10000
2069 end
2070 ret add at len z6
2071 end
2072
2073 fn wconsumec8 at ulong to ulong
2074 if not wmc102 at
2075 ret 10000
2076 end
2077 ret add at len z7
2078 end
2079
2080 fn wmc9 at ulong to bool
2081 if gt add at len z8 get wslen 0
2082 ret false
2083 end
2084 for i ulong len z8
2085 if ne get wsrc add at i get z8 i
2086 ret false
2087 end
2088 end
2089 ret true
2090 end
2091
2092 fn wmc10 at ulong to bool
2093 if gt add at len z9 get wslen 0
2094 ret false
2095 end
2096 for i ulong len z9
2097 if ne get wsrc add at i get z9 i
2098 ret false
2099 end
2100 end
2101 ret true
2102 end
2103
2104 fn wmc11 at ulong to bool
2105 if gt add at len z4 get wslen 0
2106 ret false
2107 end
2108 for i ulong len z4
2109 if ne get wsrc add at i get z4 i
2110 ret false
2111 end
2112 end
2113 ret true
2114 end
2115
2116 fn wconsumec12 at ulong to ulong
2117 if not wmc103 at
2118 ret 10000
2119 end
2120 ret add at len z10
2121 end
2122
2123 fn wconsumec13 at ulong to ulong
2124 if not wmc104 at
2125 ret 10000
2126 end
2127 ret add at len z11
2128 end
2129
2130 fn wconsumec14 at ulong to ulong
2131 if not wmc105 at
2132 ret 10000
2133 end
2134 ret add at len z12
2135 end
2136
2137 fn wconsumec15 at ulong to ulong
2138 if not wmc106 at
2139 ret 10000
2140 end
2141 ret add at len z13
2142 end
2143
2144 fn wtc16 to void
2145 for i ulong len wbase
2146 wb get wbase i
2147 end
2148 end
2149
2150 fn wtc17 to void
2151 for i ulong len wcomp
2152 wb get wcomp i
2153 end
2154 end
2155
2156 fn wtc18 to void
2157 for i ulong len wexec
2158 wb get wexec i
2159 end
2160 end
2161
2162 fn woc19 to void
2163 put wolen 0 len z14
2164 for i ulong len z14
2165 put wobs i get z14 i
2166 end
2167 end
2168
2169 fn woc20 to void
2170 put wolen 0 len z15
2171 for i ulong len z15
2172 put wobs i get z15 i
2173 end
2174 end
2175
2176 fn woc21 to void
2177 put wolen 0 len z16
2178 for i ulong len z16
2179 put wobs i get z16 i
2180 end
2181 end
2182
2183 fn woc22 to void
2184 put wolen 0 len z17
2185 for i ulong len z17
2186 put wobs i get z17 i
2187 end
2188 end
2189
2190 fn woc23 to void
2191 put wolen 0 len z18
2192 for i ulong len z18
2193 put wobs i get z18 i
2194 end
2195 end
2196
2197 fn woc24 to void
2198 put wolen 0 len z19
2199 for i ulong len z19
2200 put wobs i get z19 i
2201 end
2202 end
2203
2204 fn wtc25 to void
2205 for i ulong len z20
2206 wb get z20 i
2207 end
2208 end
2209
2210 fn wtc26 to void
2211 for i ulong len z21
2212 wb get z21 i
2213 end
2214 end
2215
2216 fn wtc27 to void
2217 for i ulong len z22
2218 wb get z22 i
2219 end
2220 end
2221
2222 fn wtc28 to void
2223 for i ulong len z23
2224 wb get z23 i
2225 end
2226 end
2227
2228 fn woc29 to void
2229 put wolen 0 len z24
2230 for i ulong len z24
2231 put wobs i get z24 i
2232 end
2233 end
2234
2235 fn wtc30 to void
2236 for i ulong len z25
2237 wb get z25 i
2238 end
2239 end
2240
2241 fn wtc31 to void
2242 for i ulong len z26
2243 wb get z26 i
2244 end
2245 end
2246
2247 fn wtc32 to void
2248 for i ulong len z27
2249 wb get z27 i
2250 end
2251 end
2252
2253 fn wtc33 to void
2254 for i ulong len z28
2255 wb get z28 i
2256 end
2257 end
2258
2259 fn woc34 to void
2260 put wolen 0 len z29
2261 for i ulong len z29
2262 put wobs i get z29 i
2263 end
2264 end
2265
2266 fn wtokenc35 to bool
2267 if ne get wtkn 0 len z30
2268 ret false
2269 end
2270 for i ulong len z30
2271 if ne get wtok i get z30 i
2272 ret false
2273 end
2274 end
2275 ret true
2276 end
2277
2278 fn wtokenc36 to bool
2279 if ne get wtkn 0 len z31
2280 ret false
2281 end
2282 for i ulong len z31
2283 if ne get wtok i get z31 i
2284 ret false
2285 end
2286 end
2287 ret true
2288 end
2289
2290 fn wtokenc37 to bool
2291 if ne get wtkn 0 len z32
2292 ret false
2293 end
2294 for i ulong len z32
2295 if ne get wtok i get z32 i
2296 ret false
2297 end
2298 end
2299 ret true
2300 end
2301
2302 fn wtokenc38 to bool
2303 if ne get wtkn 0 len z33
2304 ret false
2305 end
2306 for i ulong len z33
2307 if ne get wtok i get z33 i
2308 ret false
2309 end
2310 end
2311 ret true
2312 end
2313
2314 fn wfieldc39 slot ulong to bool
2315 if ne get wflen slot len z34
2316 ret false
2317 end
2318 for i ulong len z34
2319 if ne get wfld add mul slot 128 i get z34 i
2320 ret false
2321 end
2322 end
2323 ret true
2324 end
2325
2326 fn wtc40 to void
2327 for i ulong len z35
2328 wb get z35 i
2329 end
2330 end
2331
2332 fn wtc41 to void
2333 for i ulong len z36
2334 wb get z36 i
2335 end
2336 end
2337
2338 fn wtc42 to void
2339 for i ulong len z37
2340 wb get z37 i
2341 end
2342 end
2343
2344 fn wtc43 to void
2345 for i ulong len z38
2346 wb get z38 i
2347 end
2348 end
2349
2350 fn wtc44 to void
2351 for i ulong len z39
2352 wb get z39 i
2353 end
2354 end
2355
2356 fn wtc45 to void
2357 for i ulong len z40
2358 wb get z40 i
2359 end
2360 end
2361
2362 fn wtc46 to void
2363 for i ulong len z41
2364 wb get z41 i
2365 end
2366 end
2367
2368 fn wtc47 to void
2369 for i ulong len z42
2370 wb get z42 i
2371 end
2372 end
2373
2374 fn wtc48 to void
2375 for i ulong len z43
2376 wb get z43 i
2377 end
2378 end
2379
2380 fn wtc49 to void
2381 for i ulong len z44
2382 wb get z44 i
2383 end
2384 end
2385
2386 fn wtc50 to void
2387 for i ulong len z45
2388 wb get z45 i
2389 end
2390 end
2391
2392 fn wtc51 to void
2393 for i ulong len z46
2394 wb get z46 i
2395 end
2396 end
2397
2398 fn wfieldc52 slot ulong to bool
2399 if ne get wflen slot len z47
2400 ret false
2401 end
2402 for i ulong len z47
2403 if ne get wfld add mul slot 128 i get z47 i
2404 ret false
2405 end
2406 end
2407 ret true
2408 end
2409
2410 fn woc53 to void
2411 put wolen 0 len z48
2412 for i ulong len z48
2413 put wobs i get z48 i
2414 end
2415 end
2416
2417 fn woc54 to void
2418 put wolen 0 len z49
2419 for i ulong len z49
2420 put wobs i get z49 i
2421 end
2422 end
2423
2424 fn weventc55 mode ulong to bool
2425 wz
2426 wtc107
2427 wtc108
2428 wtc109
2429 wj mode
2430 wtc28
2431 ret wemit
2432 end
2433
2434 fn wfieldc56 slot ulong to bool
2435 if ne get wflen slot len z51
2436 ret false
2437 end
2438 for i ulong len z51
2439 if ne get wfld add mul slot 128 i get z51 i
2440 ret false
2441 end
2442 end
2443 ret true
2444 end
2445
2446 fn woc57 to void
2447 put wolen 0 len z52
2448 for i ulong len z52
2449 put wobs i get z52 i
2450 end
2451 end
2452
2453 fn weventc58 mode ulong to bool
2454 wz
2455 wtc107
2456 wtc110
2457 wtc109
2458 wj mode
2459 wtc28
2460 ret wemit
2461 end
2462
2463 fn weventc59 mode ulong to bool
2464 wz
2465 wtc107
2466 wtc111
2467 wtc109
2468 wj mode
2469 wtc28
2470 ret wemit
2471 end
2472
2473 fn wfinishc60 ok bool to void
2474 wz
2475 wtc112
2476 if ok
2477 wtc113
2478 else
2479 wtc114
2480 end
2481 wtc115
2482 wtc116
2483 wtc117
2484 wj 1
2485 wtc28
2486 r = wemit
2487 r = streamend
2488 end
2489
2490 note Match exact, host-free line grammar before the compiler is invoked.
2491
2492 fn weventc61 mode ulong to bool
2493 wz
2494 wtc107
2495 wtc118
2496 wtc109
2497 wj mode
2498 wtc28
2499 ret wemit
2500 end
2501
2502 fn wanswerc62 to bool
2503 if ne get walen 0 len z29
2504 ret false
2505 end
2506 for i ulong len z29
2507 if ne get wans i get z29 i
2508 ret false
2509 end
2510 end
2511 ret true
2512 end
2513
2514 fn wfinishc63 ok bool to void
2515 wz
2516 wtc112
2517 if ok
2518 wtc113
2519 else
2520 wtc114
2521 end
2522 wtc115
2523 wtc119
2524 wtc117
2525 wj 1
2526 wtc28
2527 r = wemit
2528 r = streamend
2529 end
2530
2531 note Match exact, host-free line grammar before the compiler is invoked.
2532
2533 fn wfinishc64 ok bool to void
2534 wz
2535 wtc112
2536 if ok
2537 wtc113
2538 else
2539 wtc114
2540 end
2541 wtc115
2542 wtc120
2543 wtc117
2544 wj 1
2545 wtc28
2546 r = wemit
2547 r = streamend
2548 end
2549
2550 note Match exact, host-free line grammar before the compiler is invoked.
2551
2552 fn wanswerc65 to bool
2553 if ne get walen 0 len z48
2554 ret false
2555 end
2556 for i ulong len z48
2557 if ne get wans i get z48 i
2558 ret false
2559 end
2560 end
2561 ret true
2562 end
2563
2564 fn wfinishc66 ok bool to void
2565 wz
2566 wtc112
2567 if ok
2568 wtc113
2569 else
2570 wtc114
2571 end
2572 wtc115
2573 wtc121
2574 wtc117
2575 wj 1
2576 wtc28
2577 r = wemit
2578 r = streamend
2579 end
2580
2581 note Match exact, host-free line grammar before the compiler is invoked.
2582
2583 fn wfinishc67 ok bool to void
2584 wz
2585 wtc112
2586 if ok
2587 wtc113
2588 else
2589 wtc114
2590 end
2591 wtc115
2592 wtc122
2593 wtc117
2594 wj 1
2595 wtc28
2596 r = wemit
2597 r = streamend
2598 end
2599
2600 note Match exact, host-free line grammar before the compiler is invoked.
2601
2602 fn wfinishc68 ok bool to void
2603 wz
2604 wtc112
2605 if ok
2606 wtc113
2607 else
2608 wtc114
2609 end
2610 wtc115
2611 wtc123
2612 wtc117
2613 wj 1
2614 wtc28
2615 r = wemit
2616 r = streamend
2617 end
2618
2619 note Match exact, host-free line grammar before the compiler is invoked.
2620
2621 fn wfinishc69 ok bool to void
2622 wz
2623 wtc112
2624 if ok
2625 wtc113
2626 else
2627 wtc114
2628 end
2629 wtc115
2630 wtc124
2631 wtc117
2632 wj 1
2633 wtc28
2634 r = wemit
2635 r = streamend
2636 end
2637
2638 note Match exact, host-free line grammar before the compiler is invoked.
2639
2640 fn wfinishc70 ok bool to void
2641 wz
2642 wtc112
2643 if ok
2644 wtc113
2645 else
2646 wtc114
2647 end
2648 wtc115
2649 wtc125
2650 wtc117
2651 wj 1
2652 wtc28
2653 r = wemit
2654 r = streamend
2655 end
2656
2657 note Match exact, host-free line grammar before the compiler is invoked.
2658
2659 fn wfinishc71 ok bool to void
2660 wz
2661 wtc112
2662 if ok
2663 wtc113
2664 else
2665 wtc114
2666 end
2667 wtc115
2668 wtc126
2669 wtc117
2670 wj 1
2671 wtc28
2672 r = wemit
2673 r = streamend
2674 end
2675
2676 note Match exact, host-free line grammar before the compiler is invoked.
2677
2678 fn wfinishc72 ok bool to void
2679 wz
2680 wtc112
2681 if ok
2682 wtc113
2683 else
2684 wtc114
2685 end
2686 wtc115
2687 wtc127
2688 wtc117
2689 wj 1
2690 wtc28
2691 r = wemit
2692 r = streamend
2693 end
2694
2695 note Match exact, host-free line grammar before the compiler is invoked.
2696
2697 fn wtc73 to void
2698 for i ulong len z66
2699 wb get z66 i
2700 end
2701 end
2702
2703 fn wtc74 to void
2704 for i ulong len z67
2705 wb get z67 i
2706 end
2707 end
2708
2709 fn wtc75 to void
2710 for i ulong len z68
2711 wb get z68 i
2712 end
2713 end
2714
2715 fn wtc76 to void
2716 for i ulong len z69
2717 wb get z69 i
2718 end
2719 end
2720
2721 fn wtc77 to void
2722 for i ulong len z70
2723 wb get z70 i
2724 end
2725 end
2726
2727 fn wtc78 to void
2728 for i ulong len z71
2729 wb get z71 i
2730 end
2731 end
2732
2733 fn wtc79 to void
2734 for i ulong len z72
2735 wb get z72 i
2736 end
2737 end
2738
2739 fn wtc80 to void
2740 for i ulong len z73
2741 wb get z73 i
2742 end
2743 end
2744
2745 fn wtc81 to void
2746 for i ulong len z74
2747 wb get z74 i
2748 end
2749 end
2750
2751 fn wtc82 to void
2752 for i ulong len z75
2753 wb get z75 i
2754 end
2755 end
2756
2757 fn wtc83 to void
2758 for i ulong len z76
2759 wb get z76 i
2760 end
2761 end
2762
2763 fn wtc84 to void
2764 for i ulong len z77
2765 wb get z77 i
2766 end
2767 end
2768
2769 fn wtc85 to void
2770 for i ulong len z78
2771 wb get z78 i
2772 end
2773 end
2774
2775 fn wtc86 to void
2776 for i ulong len z79
2777 wb get z79 i
2778 end
2779 end
2780
2781 fn wtc87 to void
2782 for i ulong len z80
2783 wb get z80 i
2784 end
2785 end
2786
2787 fn wtc88 to void
2788 for i ulong len z81
2789 wb get z81 i
2790 end
2791 end
2792
2793 fn wtc89 to void
2794 for i ulong len z82
2795 wb get z82 i
2796 end
2797 end
2798
2799 fn wtc90 to void
2800 for i ulong len z83
2801 wb get z83 i
2802 end
2803 end
2804
2805 fn wtc91 to void
2806 for i ulong len z84
2807 wb get z84 i
2808 end
2809 end
2810
2811 fn wtc92 to void
2812 for i ulong len z85
2813 wb get z85 i
2814 end
2815 end
2816
2817 fn wtc93 to void
2818 for i ulong len z86
2819 wb get z86 i
2820 end
2821 end
2822
2823 fn wtc94 to void
2824 for i ulong len z87
2825 wb get z87 i
2826 end
2827 end
2828
2829 fn wtc95 to void
2830 for i ulong len z88
2831 wb get z88 i
2832 end
2833 end
2834
2835 fn wtc96 to void
2836 for i ulong len z89
2837 wb get z89 i
2838 end
2839 end
2840
2841 fn wtc97 to void
2842 for i ulong len z90
2843 wb get z90 i
2844 end
2845 end
2846
2847 fn wmc98 at ulong to bool
2848 if gt add at len z0 get wslen 0
2849 ret false
2850 end
2851 for i ulong len z0
2852 if ne get wsrc add at i get z0 i
2853 ret false
2854 end
2855 end
2856 ret true
2857 end
2858
2859 fn wmc99 at ulong to bool
2860 if gt add at len z2 get wslen 0
2861 ret false
2862 end
2863 for i ulong len z2
2864 if ne get wsrc add at i get z2 i
2865 ret false
2866 end
2867 end
2868 ret true
2869 end
2870
2871 fn wmc100 at ulong to bool
2872 if gt add at len z5 get wslen 0
2873 ret false
2874 end
2875 for i ulong len z5
2876 if ne get wsrc add at i get z5 i
2877 ret false
2878 end
2879 end
2880 ret true
2881 end
2882
2883 fn wmc101 at ulong to bool
2884 if gt add at len z6 get wslen 0
2885 ret false
2886 end
2887 for i ulong len z6
2888 if ne get wsrc add at i get z6 i
2889 ret false
2890 end
2891 end
2892 ret true
2893 end
2894
2895 fn wmc102 at ulong to bool
2896 if gt add at len z7 get wslen 0
2897 ret false
2898 end
2899 for i ulong len z7
2900 if ne get wsrc add at i get z7 i
2901 ret false
2902 end
2903 end
2904 ret true
2905 end
2906
2907 fn wmc103 at ulong to bool
2908 if gt add at len z10 get wslen 0
2909 ret false
2910 end
2911 for i ulong len z10
2912 if ne get wsrc add at i get z10 i
2913 ret false
2914 end
2915 end
2916 ret true
2917 end
2918
2919 fn wmc104 at ulong to bool
2920 if gt add at len z11 get wslen 0
2921 ret false
2922 end
2923 for i ulong len z11
2924 if ne get wsrc add at i get z11 i
2925 ret false
2926 end
2927 end
2928 ret true
2929 end
2930
2931 fn wmc105 at ulong to bool
2932 if gt add at len z12 get wslen 0
2933 ret false
2934 end
2935 for i ulong len z12
2936 if ne get wsrc add at i get z12 i
2937 ret false
2938 end
2939 end
2940 ret true
2941 end
2942
2943 fn wmc106 at ulong to bool
2944 if gt add at len z13 get wslen 0
2945 ret false
2946 end
2947 for i ulong len z13
2948 if ne get wsrc add at i get z13 i
2949 ret false
2950 end
2951 end
2952 ret true
2953 end
2954
2955 fn wtc107 to void
2956 for i ulong len z91
2957 wb get z91 i
2958 end
2959 end
2960
2961 fn wtc108 to void
2962 for i ulong len z50
2963 wb get z50 i
2964 end
2965 end
2966
2967 fn wtc109 to void
2968 for i ulong len z92
2969 wb get z92 i
2970 end
2971 end
2972
2973 fn wtc110 to void
2974 for i ulong len z53
2975 wb get z53 i
2976 end
2977 end
2978
2979 fn wtc111 to void
2980 for i ulong len z54
2981 wb get z54 i
2982 end
2983 end
2984
2985 fn wtc112 to void
2986 for i ulong len z93
2987 wb get z93 i
2988 end
2989 end
2990
2991 fn wtc113 to void
2992 for i ulong len z94
2993 wb get z94 i
2994 end
2995 end
2996
2997 fn wtc114 to void
2998 for i ulong len z95
2999 wb get z95 i
3000 end
3001 end
3002
3003 fn wtc115 to void
3004 for i ulong len z96
3005 wb get z96 i
3006 end
3007 end
3008
3009 fn wtc116 to void
3010 for i ulong len z55
3011 wb get z55 i
3012 end
3013 end
3014
3015 fn wtc117 to void
3016 for i ulong len z97
3017 wb get z97 i
3018 end
3019 end
3020
3021 fn wtc118 to void
3022 for i ulong len z56
3023 wb get z56 i
3024 end
3025 end
3026
3027 fn wtc119 to void
3028 for i ulong len z57
3029 wb get z57 i
3030 end
3031 end
3032
3033 fn wtc120 to void
3034 for i ulong len z58
3035 wb get z58 i
3036 end
3037 end
3038
3039 fn wtc121 to void
3040 for i ulong len z59
3041 wb get z59 i
3042 end
3043 end
3044
3045 fn wtc122 to void
3046 for i ulong len z60
3047 wb get z60 i
3048 end
3049 end
3050
3051 fn wtc123 to void
3052 for i ulong len z61
3053 wb get z61 i
3054 end
3055 end
3056
3057 fn wtc124 to void
3058 for i ulong len z62
3059 wb get z62 i
3060 end
3061 end
3062
3063 fn wtc125 to void
3064 for i ulong len z63
3065 wb get z63 i
3066 end
3067 end
3068
3069 fn wtc126 to void
3070 for i ulong len z64
3071 wb get z64 i
3072 end
3073 end
3074
3075 fn wtc127 to void
3076 for i ulong len z65
3077 wb get z65 i
3078 end
3079 end