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/aienux/blob/main/native/kernel/svc/tests/fixtures/code/long.txt # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. 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 `aienux / native / kernel / svc / tests / fixtures / code / long.txt` 734 lines ยท 18137 bytes Raw Blame History 1 Here is a long C program with many small steps, built with cc steps.c. 2 3 ```c 4 /* steps.c: many small steps, each one printed. */ 5 #include 6 7 static int step_1(int x) 8 { 9 /* step 1: multiply, add, and keep it small \ no tabs */ 10 return (x * 1 + 7) % `1000003`; 11 } 12 static int step_2(int x) 13 { 14 /* step 2: multiply, add, and keep it small \ no tabs */ 15 return (x * 2 + 14) % `1000003`; 16 } 17 static int step_3(int x) 18 { 19 /* step 3: multiply, add, and keep it small \ no tabs */ 20 return (x * 3 + 21) % `1000003`; 21 } 22 static int step_4(int x) 23 { 24 /* step 4: multiply, add, and keep it small \ no tabs */ 25 return (x * 4 + 28) % `1000003`; 26 } 27 static int step_5(int x) 28 { 29 /* step 5: multiply, add, and keep it small \ no tabs */ 30 return (x * 5 + 35) % `1000003`; 31 } 32 static int step_6(int x) 33 { 34 /* step 6: multiply, add, and keep it small \ no tabs */ 35 return (x * 6 + 42) % `1000003`; 36 } 37 static int step_7(int x) 38 { 39 /* step 7: multiply, add, and keep it small \ no tabs */ 40 return (x * 7 + 49) % `1000003`; 41 } 42 static int step_8(int x) 43 { 44 /* step 8: multiply, add, and keep it small \ no tabs */ 45 return (x * 8 + 56) % `1000003`; 46 } 47 static int step_9(int x) 48 { 49 /* step 9: multiply, add, and keep it small \ no tabs */ 50 return (x * 9 + 63) % `1000003`; 51 } 52 static int step_10(int x) 53 { 54 /* step 10: multiply, add, and keep it small \ no tabs */ 55 return (x * 10 + 70) % `1000003`; 56 } 57 static int step_11(int x) 58 { 59 /* step 11: multiply, add, and keep it small \ no tabs */ 60 return (x * 11 + 77) % `1000003`; 61 } 62 static int step_12(int x) 63 { 64 /* step 12: multiply, add, and keep it small \ no tabs */ 65 return (x * 12 + 84) % `1000003`; 66 } 67 static int step_13(int x) 68 { 69 /* step 13: multiply, add, and keep it small \ no tabs */ 70 return (x * 13 + 91) % `1000003`; 71 } 72 static int step_14(int x) 73 { 74 /* step 14: multiply, add, and keep it small \ no tabs */ 75 return (x * 14 + 98) % `1000003`; 76 } 77 static int step_15(int x) 78 { 79 /* step 15: multiply, add, and keep it small \ no tabs */ 80 return (x * 15 + 105) % `1000003`; 81 } 82 static int step_16(int x) 83 { 84 /* step 16: multiply, add, and keep it small \ no tabs */ 85 return (x * 16 + 112) % `1000003`; 86 } 87 static int step_17(int x) 88 { 89 /* step 17: multiply, add, and keep it small \ no tabs */ 90 return (x * 17 + 119) % `1000003`; 91 } 92 static int step_18(int x) 93 { 94 /* step 18: multiply, add, and keep it small \ no tabs */ 95 return (x * 18 + 126) % `1000003`; 96 } 97 static int step_19(int x) 98 { 99 /* step 19: multiply, add, and keep it small \ no tabs */ 100 return (x * 19 + 133) % `1000003`; 101 } 102 static int step_20(int x) 103 { 104 /* step 20: multiply, add, and keep it small \ no tabs */ 105 return (x * 20 + 140) % `1000003`; 106 } 107 static int step_21(int x) 108 { 109 /* step 21: multiply, add, and keep it small \ no tabs */ 110 return (x * 21 + 147) % `1000003`; 111 } 112 static int step_22(int x) 113 { 114 /* step 22: multiply, add, and keep it small \ no tabs */ 115 return (x * 22 + 154) % `1000003`; 116 } 117 static int step_23(int x) 118 { 119 /* step 23: multiply, add, and keep it small \ no tabs */ 120 return (x * 23 + 161) % `1000003`; 121 } 122 static int step_24(int x) 123 { 124 /* step 24: multiply, add, and keep it small \ no tabs */ 125 return (x * 24 + 168) % `1000003`; 126 } 127 static int step_25(int x) 128 { 129 /* step 25: multiply, add, and keep it small \ no tabs */ 130 return (x * 25 + 175) % `1000003`; 131 } 132 static int step_26(int x) 133 { 134 /* step 26: multiply, add, and keep it small \ no tabs */ 135 return (x * 26 + 182) % `1000003`; 136 } 137 static int step_27(int x) 138 { 139 /* step 27: multiply, add, and keep it small \ no tabs */ 140 return (x * 27 + 189) % `1000003`; 141 } 142 static int step_28(int x) 143 { 144 /* step 28: multiply, add, and keep it small \ no tabs */ 145 return (x * 28 + 196) % `1000003`; 146 } 147 static int step_29(int x) 148 { 149 /* step 29: multiply, add, and keep it small \ no tabs */ 150 return (x * 29 + 203) % `1000003`; 151 } 152 static int step_30(int x) 153 { 154 /* step 30: multiply, add, and keep it small \ no tabs */ 155 return (x * 30 + 210) % `1000003`; 156 } 157 static int step_31(int x) 158 { 159 /* step 31: multiply, add, and keep it small \ no tabs */ 160 return (x * 31 + 217) % `1000003`; 161 } 162 static int step_32(int x) 163 { 164 /* step 32: multiply, add, and keep it small \ no tabs */ 165 return (x * 32 + 224) % `1000003`; 166 } 167 static int step_33(int x) 168 { 169 /* step 33: multiply, add, and keep it small \ no tabs */ 170 return (x * 33 + 231) % `1000003`; 171 } 172 static int step_34(int x) 173 { 174 /* step 34: multiply, add, and keep it small \ no tabs */ 175 return (x * 34 + 238) % `1000003`; 176 } 177 static int step_35(int x) 178 { 179 /* step 35: multiply, add, and keep it small \ no tabs */ 180 return (x * 35 + 245) % `1000003`; 181 } 182 static int step_36(int x) 183 { 184 /* step 36: multiply, add, and keep it small \ no tabs */ 185 return (x * 36 + 252) % `1000003`; 186 } 187 static int step_37(int x) 188 { 189 /* step 37: multiply, add, and keep it small \ no tabs */ 190 return (x * 37 + 259) % `1000003`; 191 } 192 static int step_38(int x) 193 { 194 /* step 38: multiply, add, and keep it small \ no tabs */ 195 return (x * 38 + 266) % `1000003`; 196 } 197 static int step_39(int x) 198 { 199 /* step 39: multiply, add, and keep it small \ no tabs */ 200 return (x * 39 + 273) % `1000003`; 201 } 202 static int step_40(int x) 203 { 204 /* step 40: multiply, add, and keep it small \ no tabs */ 205 return (x * 40 + 280) % `1000003`; 206 } 207 static int step_41(int x) 208 { 209 /* step 41: multiply, add, and keep it small \ no tabs */ 210 return (x * 41 + 287) % `1000003`; 211 } 212 static int step_42(int x) 213 { 214 /* step 42: multiply, add, and keep it small \ no tabs */ 215 return (x * 42 + 294) % `1000003`; 216 } 217 static int step_43(int x) 218 { 219 /* step 43: multiply, add, and keep it small \ no tabs */ 220 return (x * 43 + 301) % `1000003`; 221 } 222 static int step_44(int x) 223 { 224 /* step 44: multiply, add, and keep it small \ no tabs */ 225 return (x * 44 + 308) % `1000003`; 226 } 227 static int step_45(int x) 228 { 229 /* step 45: multiply, add, and keep it small \ no tabs */ 230 return (x * 45 + 315) % `1000003`; 231 } 232 static int step_46(int x) 233 { 234 /* step 46: multiply, add, and keep it small \ no tabs */ 235 return (x * 46 + 322) % `1000003`; 236 } 237 static int step_47(int x) 238 { 239 /* step 47: multiply, add, and keep it small \ no tabs */ 240 return (x * 47 + 329) % `1000003`; 241 } 242 static int step_48(int x) 243 { 244 /* step 48: multiply, add, and keep it small \ no tabs */ 245 return (x * 48 + 336) % `1000003`; 246 } 247 static int step_49(int x) 248 { 249 /* step 49: multiply, add, and keep it small \ no tabs */ 250 return (x * 49 + 343) % `1000003`; 251 } 252 static int step_50(int x) 253 { 254 /* step 50: multiply, add, and keep it small \ no tabs */ 255 return (x * 50 + 350) % `1000003`; 256 } 257 static int step_51(int x) 258 { 259 /* step 51: multiply, add, and keep it small \ no tabs */ 260 return (x * 51 + 357) % `1000003`; 261 } 262 static int step_52(int x) 263 { 264 /* step 52: multiply, add, and keep it small \ no tabs */ 265 return (x * 52 + 364) % `1000003`; 266 } 267 static int step_53(int x) 268 { 269 /* step 53: multiply, add, and keep it small \ no tabs */ 270 return (x * 53 + 371) % `1000003`; 271 } 272 static int step_54(int x) 273 { 274 /* step 54: multiply, add, and keep it small \ no tabs */ 275 return (x * 54 + 378) % `1000003`; 276 } 277 static int step_55(int x) 278 { 279 /* step 55: multiply, add, and keep it small \ no tabs */ 280 return (x * 55 + 385) % `1000003`; 281 } 282 static int step_56(int x) 283 { 284 /* step 56: multiply, add, and keep it small \ no tabs */ 285 return (x * 56 + 392) % `1000003`; 286 } 287 static int step_57(int x) 288 { 289 /* step 57: multiply, add, and keep it small \ no tabs */ 290 return (x * 57 + 399) % `1000003`; 291 } 292 static int step_58(int x) 293 { 294 /* step 58: multiply, add, and keep it small \ no tabs */ 295 return (x * 58 + 406) % `1000003`; 296 } 297 static int step_59(int x) 298 { 299 /* step 59: multiply, add, and keep it small \ no tabs */ 300 return (x * 59 + 413) % `1000003`; 301 } 302 static int step_60(int x) 303 { 304 /* step 60: multiply, add, and keep it small \ no tabs */ 305 return (x * 60 + 420) % `1000003`; 306 } 307 static int step_61(int x) 308 { 309 /* step 61: multiply, add, and keep it small \ no tabs */ 310 return (x * 61 + 427) % `1000003`; 311 } 312 static int step_62(int x) 313 { 314 /* step 62: multiply, add, and keep it small \ no tabs */ 315 return (x * 62 + 434) % `1000003`; 316 } 317 static int step_63(int x) 318 { 319 /* step 63: multiply, add, and keep it small \ no tabs */ 320 return (x * 63 + 441) % `1000003`; 321 } 322 static int step_64(int x) 323 { 324 /* step 64: multiply, add, and keep it small \ no tabs */ 325 return (x * 64 + 448) % `1000003`; 326 } 327 static int step_65(int x) 328 { 329 /* step 65: multiply, add, and keep it small \ no tabs */ 330 return (x * 65 + 455) % `1000003`; 331 } 332 static int step_66(int x) 333 { 334 /* step 66: multiply, add, and keep it small \ no tabs */ 335 return (x * 66 + 462) % `1000003`; 336 } 337 static int step_67(int x) 338 { 339 /* step 67: multiply, add, and keep it small \ no tabs */ 340 return (x * 67 + 469) % `1000003`; 341 } 342 static int step_68(int x) 343 { 344 /* step 68: multiply, add, and keep it small \ no tabs */ 345 return (x * 68 + 476) % `1000003`; 346 } 347 static int step_69(int x) 348 { 349 /* step 69: multiply, add, and keep it small \ no tabs */ 350 return (x * 69 + 483) % `1000003`; 351 } 352 static int step_70(int x) 353 { 354 /* step 70: multiply, add, and keep it small \ no tabs */ 355 return (x * 70 + 490) % `1000003`; 356 } 357 static int step_71(int x) 358 { 359 /* step 71: multiply, add, and keep it small \ no tabs */ 360 return (x * 71 + 497) % `1000003`; 361 } 362 static int step_72(int x) 363 { 364 /* step 72: multiply, add, and keep it small \ no tabs */ 365 return (x * 72 + 504) % `1000003`; 366 } 367 static int step_73(int x) 368 { 369 /* step 73: multiply, add, and keep it small \ no tabs */ 370 return (x * 73 + 511) % `1000003`; 371 } 372 static int step_74(int x) 373 { 374 /* step 74: multiply, add, and keep it small \ no tabs */ 375 return (x * 74 + 518) % `1000003`; 376 } 377 static int step_75(int x) 378 { 379 /* step 75: multiply, add, and keep it small \ no tabs */ 380 return (x * 75 + 525) % `1000003`; 381 } 382 static int step_76(int x) 383 { 384 /* step 76: multiply, add, and keep it small \ no tabs */ 385 return (x * 76 + 532) % `1000003`; 386 } 387 static int step_77(int x) 388 { 389 /* step 77: multiply, add, and keep it small \ no tabs */ 390 return (x * 77 + 539) % `1000003`; 391 } 392 static int step_78(int x) 393 { 394 /* step 78: multiply, add, and keep it small \ no tabs */ 395 return (x * 78 + 546) % `1000003`; 396 } 397 static int step_79(int x) 398 { 399 /* step 79: multiply, add, and keep it small \ no tabs */ 400 return (x * 79 + 553) % `1000003`; 401 } 402 static int step_80(int x) 403 { 404 /* step 80: multiply, add, and keep it small \ no tabs */ 405 return (x * 80 + 560) % `1000003`; 406 } 407 static int step_81(int x) 408 { 409 /* step 81: multiply, add, and keep it small \ no tabs */ 410 return (x * 81 + 567) % `1000003`; 411 } 412 static int step_82(int x) 413 { 414 /* step 82: multiply, add, and keep it small \ no tabs */ 415 return (x * 82 + 574) % `1000003`; 416 } 417 static int step_83(int x) 418 { 419 /* step 83: multiply, add, and keep it small \ no tabs */ 420 return (x * 83 + 581) % `1000003`; 421 } 422 static int step_84(int x) 423 { 424 /* step 84: multiply, add, and keep it small \ no tabs */ 425 return (x * 84 + 588) % `1000003`; 426 } 427 static int step_85(int x) 428 { 429 /* step 85: multiply, add, and keep it small \ no tabs */ 430 return (x * 85 + 595) % `1000003`; 431 } 432 static int step_86(int x) 433 { 434 /* step 86: multiply, add, and keep it small \ no tabs */ 435 return (x * 86 + 602) % `1000003`; 436 } 437 static int step_87(int x) 438 { 439 /* step 87: multiply, add, and keep it small \ no tabs */ 440 return (x * 87 + 609) % `1000003`; 441 } 442 static int step_88(int x) 443 { 444 /* step 88: multiply, add, and keep it small \ no tabs */ 445 return (x * 88 + 616) % `1000003`; 446 } 447 static int step_89(int x) 448 { 449 /* step 89: multiply, add, and keep it small \ no tabs */ 450 return (x * 89 + 623) % `1000003`; 451 } 452 static int step_90(int x) 453 { 454 /* step 90: multiply, add, and keep it small \ no tabs */ 455 return (x * 90 + 630) % `1000003`; 456 } 457 static int step_91(int x) 458 { 459 /* step 91: multiply, add, and keep it small \ no tabs */ 460 return (x * 91 + 637) % `1000003`; 461 } 462 static int step_92(int x) 463 { 464 /* step 92: multiply, add, and keep it small \ no tabs */ 465 return (x * 92 + 644) % `1000003`; 466 } 467 static int step_93(int x) 468 { 469 /* step 93: multiply, add, and keep it small \ no tabs */ 470 return (x * 93 + 651) % `1000003`; 471 } 472 static int step_94(int x) 473 { 474 /* step 94: multiply, add, and keep it small \ no tabs */ 475 return (x * 94 + 658) % `1000003`; 476 } 477 static int step_95(int x) 478 { 479 /* step 95: multiply, add, and keep it small \ no tabs */ 480 return (x * 95 + 665) % `1000003`; 481 } 482 static int step_96(int x) 483 { 484 /* step 96: multiply, add, and keep it small \ no tabs */ 485 return (x * 96 + 672) % `1000003`; 486 } 487 static int step_97(int x) 488 { 489 /* step 97: multiply, add, and keep it small \ no tabs */ 490 return (x * 97 + 679) % `1000003`; 491 } 492 static int step_98(int x) 493 { 494 /* step 98: multiply, add, and keep it small \ no tabs */ 495 return (x * 98 + 686) % `1000003`; 496 } 497 static int step_99(int x) 498 { 499 /* step 99: multiply, add, and keep it small \ no tabs */ 500 return (x * 99 + 693) % `1000003`; 501 } 502 static int step_100(int x) 503 { 504 /* step 100: multiply, add, and keep it small \ no tabs */ 505 return (x * 100 + 700) % `1000003`; 506 } 507 static int step_101(int x) 508 { 509 /* step 101: multiply, add, and keep it small \ no tabs */ 510 return (x * 101 + 707) % `1000003`; 511 } 512 static int step_102(int x) 513 { 514 /* step 102: multiply, add, and keep it small \ no tabs */ 515 return (x * 102 + 714) % `1000003`; 516 } 517 static int step_103(int x) 518 { 519 /* step 103: multiply, add, and keep it small \ no tabs */ 520 return (x * 103 + 721) % `1000003`; 521 } 522 static int step_104(int x) 523 { 524 /* step 104: multiply, add, and keep it small \ no tabs */ 525 return (x * 104 + 728) % `1000003`; 526 } 527 static int step_105(int x) 528 { 529 /* step 105: multiply, add, and keep it small \ no tabs */ 530 return (x * 105 + 735) % `1000003`; 531 } 532 static int step_106(int x) 533 { 534 /* step 106: multiply, add, and keep it small \ no tabs */ 535 return (x * 106 + 742) % `1000003`; 536 } 537 static int step_107(int x) 538 { 539 /* step 107: multiply, add, and keep it small \ no tabs */ 540 return (x * 107 + 749) % `1000003`; 541 } 542 static int step_108(int x) 543 { 544 /* step 108: multiply, add, and keep it small \ no tabs */ 545 return (x * 108 + 756) % `1000003`; 546 } 547 static int step_109(int x) 548 { 549 /* step 109: multiply, add, and keep it small \ no tabs */ 550 return (x * 109 + 763) % `1000003`; 551 } 552 static int step_110(int x) 553 { 554 /* step 110: multiply, add, and keep it small \ no tabs */ 555 return (x * 110 + 770) % `1000003`; 556 } 557 static int step_111(int x) 558 { 559 /* step 111: multiply, add, and keep it small \ no tabs */ 560 return (x * 111 + 777) % `1000003`; 561 } 562 static int step_112(int x) 563 { 564 /* step 112: multiply, add, and keep it small \ no tabs */ 565 return (x * 112 + 784) % `1000003`; 566 } 567 static int step_113(int x) 568 { 569 /* step 113: multiply, add, and keep it small \ no tabs */ 570 return (x * 113 + 791) % `1000003`; 571 } 572 static int step_114(int x) 573 { 574 /* step 114: multiply, add, and keep it small \ no tabs */ 575 return (x * 114 + 798) % `1000003`; 576 } 577 static int step_115(int x) 578 { 579 /* step 115: multiply, add, and keep it small \ no tabs */ 580 return (x * 115 + 805) % `1000003`; 581 } 582 static int step_116(int x) 583 { 584 /* step 116: multiply, add, and keep it small \ no tabs */ 585 return (x * 116 + 812) % `1000003`; 586 } 587 static int step_117(int x) 588 { 589 /* step 117: multiply, add, and keep it small \ no tabs */ 590 return (x * 117 + 819) % `1000003`; 591 } 592 static int step_118(int x) 593 { 594 /* step 118: multiply, add, and keep it small \ no tabs */ 595 return (x * 118 + 826) % `1000003`; 596 } 597 static int step_119(int x) 598 { 599 /* step 119: multiply, add, and keep it small \ no tabs */ 600 return (x * 119 + 833) % `1000003`; 601 } 602 static int step_120(int x) 603 { 604 /* step 120: multiply, add, and keep it small \ no tabs */ 605 return (x * 120 + 840) % `1000003`; 606 } 607 608 int main(void) 609 { 610 int x = 1; 611 x = step_1(x); 612 x = step_2(x); 613 x = step_3(x); 614 x = step_4(x); 615 x = step_5(x); 616 x = step_6(x); 617 x = step_7(x); 618 x = step_8(x); 619 x = step_9(x); 620 x = step_10(x); 621 x = step_11(x); 622 x = step_12(x); 623 x = step_13(x); 624 x = step_14(x); 625 x = step_15(x); 626 x = step_16(x); 627 x = step_17(x); 628 x = step_18(x); 629 x = step_19(x); 630 x = step_20(x); 631 x = step_21(x); 632 x = step_22(x); 633 x = step_23(x); 634 x = step_24(x); 635 x = step_25(x); 636 x = step_26(x); 637 x = step_27(x); 638 x = step_28(x); 639 x = step_29(x); 640 x = step_30(x); 641 x = step_31(x); 642 x = step_32(x); 643 x = step_33(x); 644 x = step_34(x); 645 x = step_35(x); 646 x = step_36(x); 647 x = step_37(x); 648 x = step_38(x); 649 x = step_39(x); 650 x = step_40(x); 651 x = step_41(x); 652 x = step_42(x); 653 x = step_43(x); 654 x = step_44(x); 655 x = step_45(x); 656 x = step_46(x); 657 x = step_47(x); 658 x = step_48(x); 659 x = step_49(x); 660 x = step_50(x); 661 x = step_51(x); 662 x = step_52(x); 663 x = step_53(x); 664 x = step_54(x); 665 x = step_55(x); 666 x = step_56(x); 667 x = step_57(x); 668 x = step_58(x); 669 x = step_59(x); 670 x = step_60(x); 671 x = step_61(x); 672 x = step_62(x); 673 x = step_63(x); 674 x = step_64(x); 675 x = step_65(x); 676 x = step_66(x); 677 x = step_67(x); 678 x = step_68(x); 679 x = step_69(x); 680 x = step_70(x); 681 x = step_71(x); 682 x = step_72(x); 683 x = step_73(x); 684 x = step_74(x); 685 x = step_75(x); 686 x = step_76(x); 687 x = step_77(x); 688 x = step_78(x); 689 x = step_79(x); 690 x = step_80(x); 691 x = step_81(x); 692 x = step_82(x); 693 x = step_83(x); 694 x = step_84(x); 695 x = step_85(x); 696 x = step_86(x); 697 x = step_87(x); 698 x = step_88(x); 699 x = step_89(x); 700 x = step_90(x); 701 x = step_91(x); 702 x = step_92(x); 703 x = step_93(x); 704 x = step_94(x); 705 x = step_95(x); 706 x = step_96(x); 707 x = step_97(x); 708 x = step_98(x); 709 x = step_99(x); 710 x = step_100(x); 711 x = step_101(x); 712 x = step_102(x); 713 x = step_103(x); 714 x = step_104(x); 715 x = step_105(x); 716 x = step_106(x); 717 x = step_107(x); 718 x = step_108(x); 719 x = step_109(x); 720 x = step_110(x); 721 x = step_111(x); 722 x = step_112(x); 723 x = step_113(x); 724 x = step_114(x); 725 x = step_115(x); 726 x = step_116(x); 727 x = step_117(x); 728 x = step_118(x); 729 x = step_119(x); 730 x = step_120(x); 731 printf("%d\n", x); 732 return 0; 733 } 734 ```