-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpingpong.out
3509 lines (3418 loc) · 114 KB
/
pingpong.out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
pingpong.b: file format elf32-tradbigmips
Disassembly of section .text:
00400000 <_start>:
400000: 0c1002eb jal 400bac <libmain>
400004: 00000000 nop
400008: 00000000 nop
0040000c <__asm_pgfault_handler>:
40000c: 00000000 nop
400010: 8fa4008c lw a0,140(sp)
400014: 3c090040 lui t1,0x40
400018: 8d2946f0 lw t1,18160(t1)
40001c: 0120f809 jalr t1
400020: 00000000 nop
400024: 8fa30088 lw v1,136(sp)
400028: 00600013 mtlo v1
40002c: 8fa20084 lw v0,132(sp)
400030: 8fa30094 lw v1,148(sp)
400034: 00400011 mthi v0
400038: 40837000 mtc0 v1,c0_epc
40003c: 8fbf007c lw ra,124(sp)
400040: 8fbe0078 lw s8,120(sp)
400044: 8fbc0070 lw gp,112(sp)
400048: 8fb90064 lw t9,100(sp)
40004c: 8fb80060 lw t8,96(sp)
400050: 8fb7005c lw s7,92(sp)
400054: 8fb60058 lw s6,88(sp)
400058: 8fb50054 lw s5,84(sp)
40005c: 8fb40050 lw s4,80(sp)
400060: 8fb3004c lw s3,76(sp)
400064: 8fb20048 lw s2,72(sp)
400068: 8fb10044 lw s1,68(sp)
40006c: 8fb00040 lw s0,64(sp)
400070: 8faf003c lw t7,60(sp)
400074: 8fae0038 lw t6,56(sp)
400078: 8fad0034 lw t5,52(sp)
40007c: 8fac0030 lw t4,48(sp)
400080: 8fab002c lw t3,44(sp)
400084: 8faa0028 lw t2,40(sp)
400088: 8fa90024 lw t1,36(sp)
40008c: 8fa80020 lw t0,32(sp)
400090: 8fa7001c lw a3,28(sp)
400094: 8fa60018 lw a2,24(sp)
400098: 8fa50014 lw a1,20(sp)
40009c: 8fa40010 lw a0,16(sp)
4000a0: 8fa3000c lw v1,12(sp)
4000a4: 8fa20008 lw v0,8(sp)
4000a8: 8fa10004 lw at,4(sp)
4000ac: 8fba0094 lw k0,148(sp)
4000b0: 03400008 jr k0
4000b4: 8fbd0074 lw sp,116(sp)
...
004000c0 <msyscall>:
4000c0: afa40000 sw a0,0(sp)
4000c4: afa50004 sw a1,4(sp)
4000c8: afa60008 sw a2,8(sp)
4000cc: afa7000c sw a3,12(sp)
4000d0: 00801021 move v0,a0
4000d4: 0000000c syscall
4000d8: 03e00008 jr ra
4000dc: 00000000 nop
004000e0 <umain>:
4000e0: 27bdffd8 addiu sp,sp,-40
4000e4: afbf0020 sw ra,32(sp)
4000e8: afb1001c sw s1,28(sp)
4000ec: 0c10037a jal 400de8 <fork>
4000f0: afb00018 sw s0,24(sp)
4000f4: 1040000d beqz v0,40012c <umain+0x4c>
4000f8: afa20010 sw v0,16(sp)
4000fc: 0c100415 jal 401054 <syscall_getenvid>
400100: 00000000 nop
400104: 3c040040 lui a0,0x40
400108: 24844910 addiu a0,a0,18704
40010c: 00402821 move a1,v0
400110: 0c100099 jal 400264 <writef>
400114: 8fa60010 lw a2,16(sp)
400118: 8fa40010 lw a0,16(sp)
40011c: 00002821 move a1,zero
400120: 00003021 move a2,zero
400124: 0c1004c8 jal 401320 <ipc_send>
400128: 00003821 move a3,zero
40012c: 0c100415 jal 401054 <syscall_getenvid>
400130: 2411000a li s1,10
400134: 3c040040 lui a0,0x40
400138: 2484492c addiu a0,a0,18732
40013c: 0c100099 jal 400264 <writef>
400140: 00402821 move a1,v0
400144: 27a40010 addiu a0,sp,16
400148: 00002821 move a1,zero
40014c: 0c1004f3 jal 4013cc <ipc_recv>
400150: 00003021 move a2,zero
400154: 0c100415 jal 401054 <syscall_getenvid>
400158: 00408021 move s0,v0
40015c: 3c040040 lui a0,0x40
400160: 24844940 addiu a0,a0,18752
400164: 00402821 move a1,v0
400168: 02003021 move a2,s0
40016c: 0c100099 jal 400264 <writef>
400170: 8fa70010 lw a3,16(sp)
400174: 1211000f beq s0,s1,4001b4 <umain+0xd4>
400178: 8fbf0020 lw ra,32(sp)
40017c: 0c100415 jal 401054 <syscall_getenvid>
400180: 26100001 addiu s0,s0,1
400184: 3c040040 lui a0,0x40
400188: 24844910 addiu a0,a0,18704
40018c: 00402821 move a1,v0
400190: 0c100099 jal 400264 <writef>
400194: 8fa60010 lw a2,16(sp)
400198: 8fa40010 lw a0,16(sp)
40019c: 02002821 move a1,s0
4001a0: 00003021 move a2,zero
4001a4: 0c1004c8 jal 401320 <ipc_send>
4001a8: 00003821 move a3,zero
4001ac: 1611ffdf bne s0,s1,40012c <umain+0x4c>
4001b0: 8fbf0020 lw ra,32(sp)
4001b4: 8fb1001c lw s1,28(sp)
4001b8: 8fb00018 lw s0,24(sp)
4001bc: 03e00008 jr ra
4001c0: 27bd0028 addiu sp,sp,40
...
004001d0 <user_myoutput>:
4001d0: 27bdffe0 addiu sp,sp,-32
4001d4: afbf001c sw ra,28(sp)
4001d8: afb20018 sw s2,24(sp)
4001dc: afb10014 sw s1,20(sp)
4001e0: afb00010 sw s0,16(sp)
4001e4: 24020001 li v0,1
4001e8: 14c20013 bne a2,v0,400238 <user_myoutput+0x68>
4001ec: 00c09021 move s2,a2
4001f0: 80a20000 lb v0,0(a1)
4001f4: 14400013 bnez v0,400244 <user_myoutput+0x74>
4001f8: 00a08021 move s0,a1
4001fc: 10000014 b 400250 <user_myoutput+0x80>
400200: 8fbf001c lw ra,28(sp)
400204: 0c100408 jal 401020 <syscall_putchar>
400208: 82040000 lb a0,0(s0)
40020c: 82030000 lb v1,0(s0)
400210: 2402000a li v0,10
400214: 14620003 bne v1,v0,400224 <user_myoutput+0x54>
400218: 00000000 nop
40021c: 0c100408 jal 401020 <syscall_putchar>
400220: 2404000a li a0,10
400224: 26310001 addiu s1,s1,1
400228: 12510008 beq s2,s1,40024c <user_myoutput+0x7c>
40022c: 26100001 addiu s0,s0,1
400230: 1000fff4 b 400204 <user_myoutput+0x34>
400234: 00000000 nop
400238: 18c00005 blez a2,400250 <user_myoutput+0x80>
40023c: 8fbf001c lw ra,28(sp)
400240: 00a08021 move s0,a1
400244: 1000ffef b 400204 <user_myoutput+0x34>
400248: 00008821 move s1,zero
40024c: 8fbf001c lw ra,28(sp)
400250: 8fb20018 lw s2,24(sp)
400254: 8fb10014 lw s1,20(sp)
400258: 8fb00010 lw s0,16(sp)
40025c: 03e00008 jr ra
400260: 27bd0020 addiu sp,sp,32
00400264 <writef>:
400264: 27bdffe0 addiu sp,sp,-32
400268: afbf0018 sw ra,24(sp)
40026c: afa50024 sw a1,36(sp)
400270: afa60028 sw a2,40(sp)
400274: afa7002c sw a3,44(sp)
400278: 00803021 move a2,a0
40027c: 27a70024 addiu a3,sp,36
400280: afa70010 sw a3,16(sp)
400284: 3c040040 lui a0,0x40
400288: 248401d0 addiu a0,a0,464
40028c: 0c1000c4 jal 400310 <user_lp_Print>
400290: 00002821 move a1,zero
400294: 8fbf0018 lw ra,24(sp)
400298: 03e00008 jr ra
40029c: 27bd0020 addiu sp,sp,32
004002a0 <_user_panic>:
4002a0: 27bdffe0 addiu sp,sp,-32
4002a4: afbf001c sw ra,28(sp)
4002a8: afb00018 sw s0,24(sp)
4002ac: 00801821 move v1,a0
4002b0: 00a04021 move t0,a1
4002b4: afa7002c sw a3,44(sp)
4002b8: 00c08021 move s0,a2
4002bc: 27a2002c addiu v0,sp,44
4002c0: afa20010 sw v0,16(sp)
4002c4: 3c040040 lui a0,0x40
4002c8: 24844954 addiu a0,a0,18772
4002cc: 00602821 move a1,v1
4002d0: 0c100099 jal 400264 <writef>
4002d4: 01003021 move a2,t0
4002d8: 3c040040 lui a0,0x40
4002dc: 248401d0 addiu a0,a0,464
4002e0: 00002821 move a1,zero
4002e4: 02003021 move a2,s0
4002e8: 0c1000c4 jal 400310 <user_lp_Print>
4002ec: 8fa70010 lw a3,16(sp)
4002f0: 3c040040 lui a0,0x40
4002f4: 0c100099 jal 400264 <writef>
4002f8: 24844bd4 addiu a0,a0,19412
4002fc: 1000ffff b 4002fc <_user_panic+0x5c>
400300: 00000000 nop
...
00400310 <user_lp_Print>:
400310: 27bdff78 addiu sp,sp,-136
400314: afbf0084 sw ra,132(sp)
400318: afb40080 sw s4,128(sp)
40031c: afb3007c sw s3,124(sp)
400320: afb20078 sw s2,120(sp)
400324: afb10074 sw s1,116(sp)
400328: afb00070 sw s0,112(sp)
40032c: 00809821 move s3,a0
400330: 00a0a021 move s4,a1
400334: 00c02821 move a1,a2
400338: 00e09021 move s2,a3
40033c: 80a30000 lb v1,0(a1)
400340: 1060000c beqz v1,400374 <user_lp_Print+0x64>
400344: 00a08021 move s0,a1
400348: 10000148 b 40086c <user_lp_Print+0x55c>
40034c: 24020025 li v0,37
400350: 00a08021 move s0,a1
400354: 26100001 addiu s0,s0,1
400358: 82020000 lb v0,0(s0)
40035c: 10400006 beqz v0,400378 <user_lp_Print+0x68>
400360: 02053023 subu a2,s0,a1
400364: 10430005 beq v0,v1,40037c <user_lp_Print+0x6c>
400368: 2cc20051 sltiu v0,a2,81
40036c: 1000fffa b 400358 <user_lp_Print+0x48>
400370: 26100001 addiu s0,s0,1
400374: 02053023 subu a2,s0,a1
400378: 2cc20051 sltiu v0,a2,81
40037c: 14400007 bnez v0,40039c <user_lp_Print+0x8c>
400380: 02802021 move a0,s4
400384: 3c050040 lui a1,0x40
400388: 24a54700 addiu a1,a1,18176
40038c: 0260f809 jalr s3
400390: 2406001d li a2,29
400394: 1000ffff b 400394 <user_lp_Print+0x84>
400398: 00000000 nop
40039c: 0260f809 jalr s3
4003a0: 02802021 move a0,s4
4003a4: 82020000 lb v0,0(s0)
4003a8: 10400123 beqz v0,400838 <user_lp_Print+0x528>
4003ac: 2402006c li v0,108
4003b0: 82030001 lb v1,1(s0)
4003b4: 10620003 beq v1,v0,4003c4 <user_lp_Print+0xb4>
4003b8: 26110001 addiu s1,s0,1
4003bc: 10000003 b 4003cc <user_lp_Print+0xbc>
4003c0: 00002021 move a0,zero
4003c4: 26110002 addiu s1,s0,2
4003c8: 24040001 li a0,1
4003cc: 82230000 lb v1,0(s1)
4003d0: 2402002d li v0,45
4003d4: 14620004 bne v1,v0,4003e8 <user_lp_Print+0xd8>
4003d8: 00003821 move a3,zero
4003dc: 26310001 addiu s1,s1,1
4003e0: 24070001 li a3,1
4003e4: 82230000 lb v1,0(s1)
4003e8: 24020030 li v0,48
4003ec: 14620003 bne v1,v0,4003fc <user_lp_Print+0xec>
4003f0: 24090020 li t1,32
4003f4: 26310001 addiu s1,s1,1
4003f8: 24090030 li t1,48
4003fc: 82260000 lb a2,0(s1)
400400: 24c2ffd0 addiu v0,a2,-48
400404: 304200ff andi v0,v0,0xff
400408: 2c42000a sltiu v0,v0,10
40040c: 1040000d beqz v0,400444 <user_lp_Print+0x134>
400410: 00004021 move t0,zero
400414: 00081040 sll v0,t0,0x1
400418: 000818c0 sll v1,t0,0x3
40041c: 00431021 addu v0,v0,v1
400420: 00461021 addu v0,v0,a2
400424: 2448ffd0 addiu t0,v0,-48
400428: 26310001 addiu s1,s1,1
40042c: 82260000 lb a2,0(s1)
400430: 24c2ffd0 addiu v0,a2,-48
400434: 304200ff andi v0,v0,0xff
400438: 2c42000a sltiu v0,v0,10
40043c: 1440fff6 bnez v0,400418 <user_lp_Print+0x108>
400440: 00081040 sll v0,t0,0x1
400444: 82230000 lb v1,0(s1)
400448: 2402002e li v0,46
40044c: 14620011 bne v1,v0,400494 <user_lp_Print+0x184>
400450: 2c620079 sltiu v0,v1,121
400454: 26310001 addiu s1,s1,1
400458: 92220000 lbu v0,0(s1)
40045c: 2442ffd0 addiu v0,v0,-48
400460: 304200ff andi v0,v0,0xff
400464: 2c42000a sltiu v0,v0,10
400468: 10400008 beqz v0,40048c <user_lp_Print+0x17c>
40046c: 00000000 nop
400470: 26310001 addiu s1,s1,1
400474: 92220000 lbu v0,0(s1)
400478: 2442ffd0 addiu v0,v0,-48
40047c: 304200ff andi v0,v0,0xff
400480: 2c42000a sltiu v0,v0,10
400484: 1440fffa bnez v0,400470 <user_lp_Print+0x160>
400488: 00000000 nop
40048c: 82230000 lb v1,0(s1)
400490: 2c620079 sltiu v0,v1,121
400494: 104000e2 beqz v0,400820 <user_lp_Print+0x510>
400498: 00031080 sll v0,v1,0x2
40049c: 3c030040 lui v1,0x40
4004a0: 24634724 addiu v1,v1,18212
4004a4: 00431021 addu v0,v0,v1
4004a8: 8c420000 lw v0,0(v0)
4004ac: 00400008 jr v0
4004b0: 00000000 nop
4004b4: 10800004 beqz a0,4004c8 <user_lp_Print+0x1b8>
4004b8: 00000000 nop
4004bc: 8e450000 lw a1,0(s2)
4004c0: 10000003 b 4004d0 <user_lp_Print+0x1c0>
4004c4: 26520004 addiu s2,s2,4
4004c8: 8e450000 lw a1,0(s2)
4004cc: 26520004 addiu s2,s2,4
4004d0: afa80010 sw t0,16(sp)
4004d4: afa70014 sw a3,20(sp)
4004d8: afa90018 sw t1,24(sp)
4004dc: afa0001c sw zero,28(sp)
4004e0: 27a40020 addiu a0,sp,32
4004e4: 24060002 li a2,2
4004e8: 0c100281 jal 400a04 <user_PrintNum>
4004ec: 00003821 move a3,zero
4004f0: 00403021 move a2,v0
4004f4: 2c420051 sltiu v0,v0,81
4004f8: 14400007 bnez v0,400518 <user_lp_Print+0x208>
4004fc: 02802021 move a0,s4
400500: 3c050040 lui a1,0x40
400504: 24a54700 addiu a1,a1,18176
400508: 0260f809 jalr s3
40050c: 2406001d li a2,29
400510: 1000ffff b 400510 <user_lp_Print+0x200>
400514: 00000000 nop
400518: 0260f809 jalr s3
40051c: 27a50020 addiu a1,sp,32
400520: 1000ff86 b 40033c <user_lp_Print+0x2c>
400524: 26250001 addiu a1,s1,1
400528: 10800004 beqz a0,40053c <user_lp_Print+0x22c>
40052c: 00000000 nop
400530: 8e450000 lw a1,0(s2)
400534: 10000003 b 400544 <user_lp_Print+0x234>
400538: 26520004 addiu s2,s2,4
40053c: 8e450000 lw a1,0(s2)
400540: 26520004 addiu s2,s2,4
400544: 04a10003 bgez a1,400554 <user_lp_Print+0x244>
400548: 00001021 move v0,zero
40054c: 00052823 negu a1,a1
400550: 24020001 li v0,1
400554: afa80010 sw t0,16(sp)
400558: afa70014 sw a3,20(sp)
40055c: afa90018 sw t1,24(sp)
400560: afa0001c sw zero,28(sp)
400564: 27a40020 addiu a0,sp,32
400568: 2406000a li a2,10
40056c: 0c100281 jal 400a04 <user_PrintNum>
400570: 00403821 move a3,v0
400574: 00403021 move a2,v0
400578: 2c420051 sltiu v0,v0,81
40057c: 14400007 bnez v0,40059c <user_lp_Print+0x28c>
400580: 02802021 move a0,s4
400584: 3c050040 lui a1,0x40
400588: 24a54700 addiu a1,a1,18176
40058c: 0260f809 jalr s3
400590: 2406001d li a2,29
400594: 1000ffff b 400594 <user_lp_Print+0x284>
400598: 00000000 nop
40059c: 0260f809 jalr s3
4005a0: 27a50020 addiu a1,sp,32
4005a4: 1000ff65 b 40033c <user_lp_Print+0x2c>
4005a8: 26250001 addiu a1,s1,1
4005ac: 10800004 beqz a0,4005c0 <user_lp_Print+0x2b0>
4005b0: 00000000 nop
4005b4: 8e450000 lw a1,0(s2)
4005b8: 10000003 b 4005c8 <user_lp_Print+0x2b8>
4005bc: 26520004 addiu s2,s2,4
4005c0: 8e450000 lw a1,0(s2)
4005c4: 26520004 addiu s2,s2,4
4005c8: afa80010 sw t0,16(sp)
4005cc: afa70014 sw a3,20(sp)
4005d0: afa90018 sw t1,24(sp)
4005d4: afa0001c sw zero,28(sp)
4005d8: 27a40020 addiu a0,sp,32
4005dc: 24060008 li a2,8
4005e0: 0c100281 jal 400a04 <user_PrintNum>
4005e4: 00003821 move a3,zero
4005e8: 00403021 move a2,v0
4005ec: 2c420051 sltiu v0,v0,81
4005f0: 14400007 bnez v0,400610 <user_lp_Print+0x300>
4005f4: 02802021 move a0,s4
4005f8: 3c050040 lui a1,0x40
4005fc: 24a54700 addiu a1,a1,18176
400600: 0260f809 jalr s3
400604: 2406001d li a2,29
400608: 1000ffff b 400608 <user_lp_Print+0x2f8>
40060c: 00000000 nop
400610: 0260f809 jalr s3
400614: 27a50020 addiu a1,sp,32
400618: 1000ff48 b 40033c <user_lp_Print+0x2c>
40061c: 26250001 addiu a1,s1,1
400620: 10800004 beqz a0,400634 <user_lp_Print+0x324>
400624: 00000000 nop
400628: 8e450000 lw a1,0(s2)
40062c: 10000003 b 40063c <user_lp_Print+0x32c>
400630: 26520004 addiu s2,s2,4
400634: 8e450000 lw a1,0(s2)
400638: 26520004 addiu s2,s2,4
40063c: afa80010 sw t0,16(sp)
400640: afa70014 sw a3,20(sp)
400644: afa90018 sw t1,24(sp)
400648: afa0001c sw zero,28(sp)
40064c: 27a40020 addiu a0,sp,32
400650: 2406000a li a2,10
400654: 0c100281 jal 400a04 <user_PrintNum>
400658: 00003821 move a3,zero
40065c: 00403021 move a2,v0
400660: 2c420051 sltiu v0,v0,81
400664: 14400007 bnez v0,400684 <user_lp_Print+0x374>
400668: 02802021 move a0,s4
40066c: 3c050040 lui a1,0x40
400670: 24a54700 addiu a1,a1,18176
400674: 0260f809 jalr s3
400678: 2406001d li a2,29
40067c: 1000ffff b 40067c <user_lp_Print+0x36c>
400680: 00000000 nop
400684: 0260f809 jalr s3
400688: 27a50020 addiu a1,sp,32
40068c: 1000ff2b b 40033c <user_lp_Print+0x2c>
400690: 26250001 addiu a1,s1,1
400694: 10800004 beqz a0,4006a8 <user_lp_Print+0x398>
400698: 00000000 nop
40069c: 8e450000 lw a1,0(s2)
4006a0: 10000003 b 4006b0 <user_lp_Print+0x3a0>
4006a4: 26520004 addiu s2,s2,4
4006a8: 8e450000 lw a1,0(s2)
4006ac: 26520004 addiu s2,s2,4
4006b0: afa80010 sw t0,16(sp)
4006b4: afa70014 sw a3,20(sp)
4006b8: afa90018 sw t1,24(sp)
4006bc: afa0001c sw zero,28(sp)
4006c0: 27a40020 addiu a0,sp,32
4006c4: 24060010 li a2,16
4006c8: 0c100281 jal 400a04 <user_PrintNum>
4006cc: 00003821 move a3,zero
4006d0: 00403021 move a2,v0
4006d4: 2c420051 sltiu v0,v0,81
4006d8: 14400007 bnez v0,4006f8 <user_lp_Print+0x3e8>
4006dc: 02802021 move a0,s4
4006e0: 3c050040 lui a1,0x40
4006e4: 24a54700 addiu a1,a1,18176
4006e8: 0260f809 jalr s3
4006ec: 2406001d li a2,29
4006f0: 1000ffff b 4006f0 <user_lp_Print+0x3e0>
4006f4: 00000000 nop
4006f8: 0260f809 jalr s3
4006fc: 27a50020 addiu a1,sp,32
400700: 1000ff0e b 40033c <user_lp_Print+0x2c>
400704: 26250001 addiu a1,s1,1
400708: 10800004 beqz a0,40071c <user_lp_Print+0x40c>
40070c: 00000000 nop
400710: 8e450000 lw a1,0(s2)
400714: 10000003 b 400724 <user_lp_Print+0x414>
400718: 26520004 addiu s2,s2,4
40071c: 8e450000 lw a1,0(s2)
400720: 26520004 addiu s2,s2,4
400724: afa80010 sw t0,16(sp)
400728: afa70014 sw a3,20(sp)
40072c: afa90018 sw t1,24(sp)
400730: 24020001 li v0,1
400734: afa2001c sw v0,28(sp)
400738: 27a40020 addiu a0,sp,32
40073c: 24060010 li a2,16
400740: 0c100281 jal 400a04 <user_PrintNum>
400744: 00003821 move a3,zero
400748: 00403021 move a2,v0
40074c: 2c420051 sltiu v0,v0,81
400750: 14400007 bnez v0,400770 <user_lp_Print+0x460>
400754: 02802021 move a0,s4
400758: 3c050040 lui a1,0x40
40075c: 24a54700 addiu a1,a1,18176
400760: 0260f809 jalr s3
400764: 2406001d li a2,29
400768: 1000ffff b 400768 <user_lp_Print+0x458>
40076c: 00000000 nop
400770: 0260f809 jalr s3
400774: 27a50020 addiu a1,sp,32
400778: 1000fef0 b 40033c <user_lp_Print+0x2c>
40077c: 26250001 addiu a1,s1,1
400780: 26500004 addiu s0,s2,4
400784: 27a40020 addiu a0,sp,32
400788: 82450003 lb a1,3(s2)
40078c: 0c10021f jal 40087c <user_PrintChar>
400790: 01003021 move a2,t0
400794: 00403021 move a2,v0
400798: 2c420051 sltiu v0,v0,81
40079c: 14400007 bnez v0,4007bc <user_lp_Print+0x4ac>
4007a0: 02802021 move a0,s4
4007a4: 3c050040 lui a1,0x40
4007a8: 24a54700 addiu a1,a1,18176
4007ac: 0260f809 jalr s3
4007b0: 2406001d li a2,29
4007b4: 1000ffff b 4007b4 <user_lp_Print+0x4a4>
4007b8: 00000000 nop
4007bc: 0260f809 jalr s3
4007c0: 27a50020 addiu a1,sp,32
4007c4: 1000001a b 400830 <user_lp_Print+0x520>
4007c8: 02009021 move s2,s0
4007cc: 26500004 addiu s0,s2,4
4007d0: 27a40020 addiu a0,sp,32
4007d4: 8e450000 lw a1,0(s2)
4007d8: 0c10023f jal 4008fc <user_PrintString>
4007dc: 01003021 move a2,t0
4007e0: 00403021 move a2,v0
4007e4: 2c420051 sltiu v0,v0,81
4007e8: 14400007 bnez v0,400808 <user_lp_Print+0x4f8>
4007ec: 02802021 move a0,s4
4007f0: 3c050040 lui a1,0x40
4007f4: 24a54700 addiu a1,a1,18176
4007f8: 0260f809 jalr s3
4007fc: 2406001d li a2,29
400800: 1000ffff b 400800 <user_lp_Print+0x4f0>
400804: 00000000 nop
400808: 0260f809 jalr s3
40080c: 27a50020 addiu a1,sp,32
400810: 10000007 b 400830 <user_lp_Print+0x520>
400814: 02009021 move s2,s0
400818: 10000005 b 400830 <user_lp_Print+0x520>
40081c: 2631ffff addiu s1,s1,-1
400820: 02802021 move a0,s4
400824: 02202821 move a1,s1
400828: 0260f809 jalr s3
40082c: 24060001 li a2,1
400830: 1000fec2 b 40033c <user_lp_Print+0x2c>
400834: 26250001 addiu a1,s1,1
400838: 02802021 move a0,s4
40083c: 3c050040 lui a1,0x40
400840: 24a54720 addiu a1,a1,18208
400844: 0260f809 jalr s3
400848: 24060001 li a2,1
40084c: 8fbf0084 lw ra,132(sp)
400850: 8fb40080 lw s4,128(sp)
400854: 8fb3007c lw s3,124(sp)
400858: 8fb20078 lw s2,120(sp)
40085c: 8fb10074 lw s1,116(sp)
400860: 8fb00070 lw s0,112(sp)
400864: 03e00008 jr ra
400868: 27bd0088 addiu sp,sp,136
40086c: 1462feb8 bne v1,v0,400350 <user_lp_Print+0x40>
400870: 24030025 li v1,37
400874: 1000febf b 400374 <user_lp_Print+0x64>
400878: 00a08021 move s0,a1
0040087c <user_PrintChar>:
40087c: 00052e00 sll a1,a1,0x18
400880: 00052e03 sra a1,a1,0x18
400884: 0006182a slt v1,zero,a2
400888: 24020001 li v0,1
40088c: 10e00015 beqz a3,4008e4 <user_PrintChar+0x68>
400890: 0043300a movz a2,v0,v1
400894: 28c20002 slti v0,a2,2
400898: 14400016 bnez v0,4008f4 <user_PrintChar+0x78>
40089c: a0850000 sb a1,0(a0)
4008a0: 24030001 li v1,1
4008a4: 24050020 li a1,32
4008a8: 00831021 addu v0,a0,v1
4008ac: 24630001 addiu v1,v1,1
4008b0: 10c30010 beq a2,v1,4008f4 <user_PrintChar+0x78>
4008b4: a0450000 sb a1,0(v0)
4008b8: 1000fffc b 4008ac <user_PrintChar+0x30>
4008bc: 00831021 addu v0,a0,v1
4008c0: 00001821 move v1,zero
4008c4: 24080020 li t0,32
4008c8: 00641021 addu v0,v1,a0
4008cc: 24630001 addiu v1,v1,1
4008d0: 1467fffd bne v1,a3,4008c8 <user_PrintChar+0x4c>
4008d4: a0480000 sb t0,0(v0)
4008d8: 00c41021 addu v0,a2,a0
4008dc: 10000005 b 4008f4 <user_PrintChar+0x78>
4008e0: a045ffff sb a1,-1(v0)
4008e4: 24c7ffff addiu a3,a2,-1
4008e8: 1ce0fff5 bgtz a3,4008c0 <user_PrintChar+0x44>
4008ec: 00c41021 addu v0,a2,a0
4008f0: a045ffff sb a1,-1(v0)
4008f4: 03e00008 jr ra
4008f8: 00c01021 move v0,a2
004008fc <user_PrintString>:
4008fc: 80a20000 lb v0,0(a1)
400900: 14400003 bnez v0,400910 <user_PrintString+0x14>
400904: 24a30001 addiu v1,a1,1
400908: 10000006 b 400924 <user_PrintString+0x28>
40090c: 00004021 move t0,zero
400910: 00004021 move t0,zero
400914: 25080001 addiu t0,t0,1
400918: 80620000 lb v0,0(v1)
40091c: 1440fffd bnez v0,400914 <user_PrintString+0x18>
400920: 24630001 addiu v1,v1,1
400924: 00c8102a slt v0,a2,t0
400928: 14e00030 bnez a3,4009ec <user_PrintString+0xf0>
40092c: 0102300b movn a2,t0,v0
400930: 1000002a b 4009dc <user_PrintString+0xe0>
400934: 00c83823 subu a3,a2,t0
400938: 00003821 move a3,zero
40093c: 00871021 addu v0,a0,a3
400940: 00a71821 addu v1,a1,a3
400944: 90630000 lbu v1,0(v1)
400948: 24e70001 addiu a3,a3,1
40094c: 1507fffb bne t0,a3,40093c <user_PrintString+0x40>
400950: a0430000 sb v1,0(v0)
400954: 0106102a slt v0,t0,a2
400958: 10400028 beqz v0,4009fc <user_PrintString+0x100>
40095c: 00001821 move v1,zero
400960: 00881021 addu v0,a0,t0
400964: 24050020 li a1,32
400968: 00c82023 subu a0,a2,t0
40096c: a0450000 sb a1,0(v0)
400970: 24630001 addiu v1,v1,1
400974: 10640021 beq v1,a0,4009fc <user_PrintString+0x100>
400978: 24420001 addiu v0,v0,1
40097c: 1000fffc b 400970 <user_PrintString+0x74>
400980: a0450000 sb a1,0(v0)
400984: 00001821 move v1,zero
400988: 24090020 li t1,32
40098c: 00831021 addu v0,a0,v1
400990: 24630001 addiu v1,v1,1
400994: 1467fffd bne v1,a3,40098c <user_PrintString+0x90>
400998: a0490000 sb t1,0(v0)
40099c: 00e6102a slt v0,a3,a2
4009a0: 10400016 beqz v0,4009fc <user_PrintString+0x100>
4009a4: 00872021 addu a0,a0,a3
4009a8: 00e61023 subu v0,a3,a2
4009ac: 01021021 addu v0,t0,v0
4009b0: 00a21821 addu v1,a1,v0
4009b4: 00002821 move a1,zero
4009b8: 00c73823 subu a3,a2,a3
4009bc: 90620000 lbu v0,0(v1)
4009c0: a0820000 sb v0,0(a0)
4009c4: 24a50001 addiu a1,a1,1
4009c8: 24630001 addiu v1,v1,1
4009cc: 10a7000b beq a1,a3,4009fc <user_PrintString+0x100>
4009d0: 24840001 addiu a0,a0,1
4009d4: 1000fffa b 4009c0 <user_PrintString+0xc4>
4009d8: 90620000 lbu v0,0(v1)
4009dc: 1ce0ffe9 bgtz a3,400984 <user_PrintString+0x88>
4009e0: 00e6102a slt v0,a3,a2
4009e4: 1000ffee b 4009a0 <user_PrintString+0xa4>
4009e8: 00000000 nop
4009ec: 1d00ffd2 bgtz t0,400938 <user_PrintString+0x3c>
4009f0: 0106102a slt v0,t0,a2
4009f4: 1000ffd8 b 400958 <user_PrintString+0x5c>
4009f8: 00000000 nop
4009fc: 03e00008 jr ra
400a00: 00c01021 move v0,a2
00400a04 <user_PrintNum>:
400a04: 8fa90010 lw t1,16(sp)
400a08: 8fac0014 lw t4,20(sp)
400a0c: 8fab001c lw t3,28(sp)
400a10: 83aa001b lb t2,27(sp)
400a14: 00804021 move t0,a0
400a18: 00a6001b divu zero,a1,a2
400a1c: 00c001f4 teq a2,zero,0x7
400a20: 00001810 mfhi v1
400a24: 2862000a slti v0,v1,10
400a28: 10400004 beqz v0,400a3c <user_PrintNum+0x38>
400a2c: 24620030 addiu v0,v1,48
400a30: a1020000 sb v0,0(t0)
400a34: 1000000b b 400a64 <user_PrintNum+0x60>
400a38: 25080001 addiu t0,t0,1
400a3c: 11600005 beqz t3,400a54 <user_PrintNum+0x50>
400a40: 24620057 addiu v0,v1,87
400a44: 24620037 addiu v0,v1,55
400a48: a1020000 sb v0,0(t0)
400a4c: 10000003 b 400a5c <user_PrintNum+0x58>
400a50: 25080001 addiu t0,t0,1
400a54: a1020000 sb v0,0(t0)
400a58: 25080001 addiu t0,t0,1
400a5c: 00a6001b divu zero,a1,a2
400a60: 00c001f4 teq a2,zero,0x7
400a64: 00002812 mflo a1
400a68: 14a0ffeb bnez a1,400a18 <user_PrintNum+0x14>
400a6c: 00000000 nop
400a70: 10e00005 beqz a3,400a88 <user_PrintNum+0x84>
400a74: 01043023 subu a2,t0,a0
400a78: 2402002d li v0,45
400a7c: a1020000 sb v0,0(t0)
400a80: 25080001 addiu t0,t0,1
400a84: 01043023 subu a2,t0,a0
400a88: 0126102a slt v0,t1,a2
400a8c: 00c2480b movn t1,a2,v0
400a90: 24020020 li v0,32
400a94: 10e00032 beqz a3,400b60 <user_PrintNum+0x15c>
400a98: 004c500b movn t2,v0,t4
400a9c: 15800031 bnez t4,400b64 <user_PrintNum+0x160>
400aa0: 00c9102a slt v0,a2,t1
400aa4: 24020030 li v0,48
400aa8: 1542002e bne t2,v0,400b64 <user_PrintNum+0x160>
400aac: 00c9102a slt v0,a2,t1
400ab0: 24c6ffff addiu a2,a2,-1
400ab4: 2528ffff addiu t0,t1,-1
400ab8: 00c8102a slt v0,a2,t0
400abc: 10400008 beqz v0,400ae0 <user_PrintNum+0xdc>
400ac0: 01061023 subu v0,t0,a2
400ac4: 00861821 addu v1,a0,a2
400ac8: 00002821 move a1,zero
400acc: 24070030 li a3,48
400ad0: a0670000 sb a3,0(v1)
400ad4: 24a50001 addiu a1,a1,1
400ad8: 14a2fffd bne a1,v0,400ad0 <user_PrintNum+0xcc>
400adc: 24630001 addiu v1,v1,1
400ae0: 00891821 addu v1,a0,t1
400ae4: 2402002d li v0,45
400ae8: 1000000d b 400b20 <user_PrintNum+0x11c>
400aec: a062ffff sb v0,-1(v1)
400af0: a0aa0000 sb t2,0(a1)
400af4: 24630001 addiu v1,v1,1
400af8: 01261023 subu v0,t1,a2
400afc: 1462fffc bne v1,v0,400af0 <user_PrintNum+0xec>
400b00: 24a50001 addiu a1,a1,1
400b04: 11800006 beqz t4,400b20 <user_PrintNum+0x11c>
400b08: 00000000 nop
400b0c: 24c6ffff addiu a2,a2,-1
400b10: 1cc00005 bgtz a2,400b28 <user_PrintNum+0x124>
400b14: 00003821 move a3,zero
400b18: 03e00008 jr ra
400b1c: 01201021 move v0,t1
400b20: 1000fffb b 400b10 <user_PrintNum+0x10c>
400b24: 2526ffff addiu a2,t1,-1
400b28: 00802821 move a1,a0
400b2c: 00862021 addu a0,a0,a2
400b30: 80a20000 lb v0,0(a1)
400b34: 90830000 lbu v1,0(a0)
400b38: a0a30000 sb v1,0(a1)
400b3c: a0820000 sb v0,0(a0)
400b40: 24e70001 addiu a3,a3,1
400b44: 24c6ffff addiu a2,a2,-1
400b48: 24a50001 addiu a1,a1,1
400b4c: 00e6102a slt v0,a3,a2
400b50: 10400009 beqz v0,400b78 <user_PrintNum+0x174>
400b54: 2484ffff addiu a0,a0,-1
400b58: 1000fff6 b 400b34 <user_PrintNum+0x130>
400b5c: 80a20000 lb v0,0(a1)
400b60: 00c9102a slt v0,a2,t1
400b64: 1040ffe7 beqz v0,400b04 <user_PrintNum+0x100>
400b68: 00000000 nop
400b6c: 00862821 addu a1,a0,a2
400b70: 1000ffdf b 400af0 <user_PrintNum+0xec>
400b74: 00001821 move v1,zero
400b78: 01201021 move v0,t1
400b7c: 03e00008 jr ra
400b80: 00000000 nop
...
00400b90 <exit>:
400b90: 27bdffe8 addiu sp,sp,-24
400b94: afbf0010 sw ra,16(sp)
400b98: 0c10042d jal 4010b4 <syscall_env_destroy>
400b9c: 00002021 move a0,zero
400ba0: 8fbf0010 lw ra,16(sp)
400ba4: 03e00008 jr ra
400ba8: 27bd0018 addiu sp,sp,24
00400bac <libmain>:
400bac: 27bdffe8 addiu sp,sp,-24
400bb0: afbf0010 sw ra,16(sp)
400bb4: 3c020040 lui v0,0x40
400bb8: 0c100038 jal 4000e0 <umain>
400bbc: ac404d10 sw zero,19728(v0)
400bc0: 0c1002e4 jal 400b90 <exit>
400bc4: 00000000 nop
400bc8: 8fbf0010 lw ra,16(sp)
400bcc: 03e00008 jr ra
400bd0: 27bd0018 addiu sp,sp,24
...
00400be0 <user_bcopy>:
400be0: 30820003 andi v0,a0,0x3
400be4: 14400004 bnez v0,400bf8 <user_bcopy+0x18>
400be8: 00c53021 addu a2,a2,a1
400bec: 30a20003 andi v0,a1,0x3
400bf0: 10400016 beqz v0,400c4c <user_bcopy+0x6c>
400bf4: 24a20003 addiu v0,a1,3
400bf8: 00a6102b sltu v0,a1,a2
400bfc: 1440000c bnez v0,400c30 <user_bcopy+0x50>
400c00: 00a01821 move v1,a1
400c04: 03e00008 jr ra
400c08: 00000000 nop
400c0c: 8c820000 lw v0,0(a0)
400c10: aca20000 sw v0,0(a1)
400c14: 24a50004 addiu a1,a1,4
400c18: 24630007 addiu v1,v1,7
400c1c: 0066182b sltu v1,v1,a2
400c20: 1060fff5 beqz v1,400bf8 <user_bcopy+0x18>
400c24: 24840004 addiu a0,a0,4
400c28: 1000fff8 b 400c0c <user_bcopy+0x2c>
400c2c: 00a01821 move v1,a1
400c30: 90820000 lbu v0,0(a0)
400c34: a0620000 sb v0,0(v1)
400c38: 24630001 addiu v1,v1,1
400c3c: 1066fff1 beq v1,a2,400c04 <user_bcopy+0x24>
400c40: 24840001 addiu a0,a0,1
400c44: 1000fffb b 400c34 <user_bcopy+0x54>
400c48: 90820000 lbu v0,0(a0)
400c4c: 0046102b sltu v0,v0,a2
400c50: 1440ffee bnez v0,400c0c <user_bcopy+0x2c>
400c54: 00a01821 move v1,a1
400c58: 1000ffe8 b 400bfc <user_bcopy+0x1c>
400c5c: 00a6102b sltu v0,a1,a2
00400c60 <user_bzero>:
400c60: 24a2ffff addiu v0,a1,-1
400c64: 04400007 bltz v0,400c84 <user_bzero+0x24>
400c68: 00801821 move v1,a0
400c6c: 00821021 addu v0,a0,v0
400c70: 24420001 addiu v0,v0,1
400c74: a0600000 sb zero,0(v1)
400c78: 24630001 addiu v1,v1,1
400c7c: 1462fffd bne v1,v0,400c74 <user_bzero+0x14>
400c80: 00000000 nop
400c84: 03e00008 jr ra
400c88: 00000000 nop
00400c8c <pgfault>:
400c8c: 27bdffe0 addiu sp,sp,-32
400c90: afbf001c sw ra,28(sp)
400c94: afb00018 sw s0,24(sp)
400c98: 00808021 move s0,a0
400c9c: 3c040040 lui a0,0x40
400ca0: 24844968 addiu a0,a0,18792
400ca4: 0c100099 jal 400264 <writef>
400ca8: 02002821 move a1,s0
400cac: 00101302 srl v0,s0,0xc
400cb0: 00021080 sll v0,v0,0x2
400cb4: 3c030040 lui v1,0x40
400cb8: 8c6346e8 lw v1,18152(v1)
400cbc: 00431021 addu v0,v0,v1
400cc0: 8c420000 lw v0,0(v0)
400cc4: 38420001 xori v0,v0,0x1
400cc8: 30420001 andi v0,v0,0x1
400ccc: 10400008 beqz v0,400cf0 <pgfault+0x64>
400cd0: 24051000 li a1,4096
400cd4: 3c040040 lui a0,0x40
400cd8: 24844984 addiu a0,a0,18820
400cdc: 2405003c li a1,60
400ce0: 3c060040 lui a2,0x40
400ce4: 24c6498c addiu a2,a2,18828
400ce8: 0c1000a8 jal 4002a0 <_user_panic>
400cec: 02003821 move a3,s0
400cf0: 00002021 move a0,zero
400cf4: 0c100447 jal 40111c <syscall_mem_alloc>
400cf8: 24060600 li a2,1536
400cfc: 2404f000 li a0,-4096
400d00: 02042024 and a0,s0,a0
400d04: 24051000 li a1,4096
400d08: 0c1002f8 jal 400be0 <user_bcopy>
400d0c: 24061000 li a2,4096
400d10: 24020600 li v0,1536
400d14: afa20010 sw v0,16(sp)
400d18: 00002021 move a0,zero
400d1c: 24051000 li a1,4096
400d20: 00003021 move a2,zero
400d24: 0c100455 jal 401154 <syscall_mem_map>
400d28: 02003821 move a3,s0
400d2c: 3c040040 lui a0,0x40
400d30: 0c100099 jal 400264 <writef>
400d34: 248449b8 addiu a0,a0,18872
400d38: 8fbf001c lw ra,28(sp)
400d3c: 8fb00018 lw s0,24(sp)
400d40: 03e00008 jr ra
400d44: 27bd0020 addiu sp,sp,32
00400d48 <duppage>:
400d48: 27bdffd8 addiu sp,sp,-40
400d4c: afbf0020 sw ra,32(sp)
400d50: afb1001c sw s1,28(sp)
400d54: afb00018 sw s0,24(sp)
400d58: 00803021 move a2,a0
400d5c: 00051080 sll v0,a1,0x2
400d60: 3c030040 lui v1,0x40
400d64: 8c6346e8 lw v1,18152(v1)
400d68: 00431021 addu v0,v0,v1
400d6c: 8c430000 lw v1,0(v0)
400d70: 30640fff andi a0,v1,0xfff
400d74: 30620400 andi v0,v1,0x400
400d78: 14400004 bnez v0,400d8c <duppage+0x44>
400d7c: 00058b00 sll s1,a1,0xc
400d80: 30620001 andi v0,v1,0x1
400d84: 1040000f beqz v0,400dc4 <duppage+0x7c>
400d88: 02202821 move a1,s1
400d8c: 24100201 li s0,513
400d90: afb00010 sw s0,16(sp)
400d94: 00002021 move a0,zero
400d98: 02202821 move a1,s1
400d9c: 0c100455 jal 401154 <syscall_mem_map>
400da0: 02203821 move a3,s1
400da4: afb00010 sw s0,16(sp)
400da8: 00002021 move a0,zero
400dac: 02202821 move a1,s1
400db0: 00003021 move a2,zero
400db4: 0c100455 jal 401154 <syscall_mem_map>
400db8: 02203821 move a3,s1
400dbc: 10000006 b 400dd8 <duppage+0x90>
400dc0: 8fbf0020 lw ra,32(sp)
400dc4: afa40010 sw a0,16(sp)
400dc8: 00002021 move a0,zero
400dcc: 0c100455 jal 401154 <syscall_mem_map>
400dd0: 02203821 move a3,s1
400dd4: 8fbf0020 lw ra,32(sp)
400dd8: 8fb1001c lw s1,28(sp)
400ddc: 8fb00018 lw s0,24(sp)
400de0: 03e00008 jr ra
400de4: 27bd0028 addiu sp,sp,40
00400de8 <fork>:
400de8: 27bdffd0 addiu sp,sp,-48
400dec: afbf0028 sw ra,40(sp)
400df0: afb50024 sw s5,36(sp)
400df4: afb40020 sw s4,32(sp)
400df8: afb3001c sw s3,28(sp)
400dfc: afb20018 sw s2,24(sp)
400e00: afb10014 sw s1,20(sp)
400e04: afb00010 sw s0,16(sp)
400e08: 3c040040 lui a0,0x40
400e0c: 0c100099 jal 400264 <writef>
400e10: 248449d8 addiu a0,a0,18904
400e14: 3c040040 lui a0,0x40
400e18: 0c1003e8 jal 400fa0 <set_pgfault_handler>
400e1c: 24840c8c addiu a0,a0,3212
400e20: 0c100472 jal 4011c8 <syscall_env_alloc>
400e24: 00000000 nop
400e28: 14400014 bnez v0,400e7c <fork+0x94>
400e2c: 0040a021 move s4,v0
400e30: 3c040040 lui a0,0x40
400e34: 0c100099 jal 400264 <writef>
400e38: 248449f0 addiu a0,a0,18928
400e3c: 0c100415 jal 401054 <syscall_getenvid>
400e40: 00000000 nop
400e44: 000212c2 srl v0,v0,0xb
400e48: 000218c0 sll v1,v0,0x3
400e4c: 00021140 sll v0,v0,0x5
400e50: 00431023 subu v0,v0,v1
400e54: 000218c0 sll v1,v0,0x3
400e58: 00431021 addu v0,v0,v1
400e5c: 3c030040 lui v1,0x40
400e60: 8c6346e0 lw v1,18144(v1)
400e64: 00431021 addu v0,v0,v1
400e68: 2442ff28 addiu v0,v0,-216
400e6c: 3c030040 lui v1,0x40
400e70: ac624d10 sw v0,19728(v1)
400e74: 10000037 b 400f54 <fork+0x16c>
400e78: 00001021 move v0,zero
400e7c: 3c040040 lui a0,0x40
400e80: 24844a0c addiu a0,a0,18956
400e84: 3c050040 lui a1,0x40
400e88: 24a546ec addiu a1,a1,18156
400e8c: 3c060040 lui a2,0x40
400e90: 0c100099 jal 400264 <writef>
400e94: 24c646e8 addiu a2,a2,18152
400e98: 00008021 move s0,zero
400e9c: 3c120040 lui s2,0x40
400ea0: 3c130040 lui s3,0x40
400ea4: 3c150040 lui s5,0x40
400ea8: 3c020007 lui v0,0x7
400eac: 3451f3ff ori s1,v0,0xf3ff
400eb0: 00101282 srl v0,s0,0xa
400eb4: 00021080 sll v0,v0,0x2
400eb8: 8e4346ec lw v1,18156(s2)
400ebc: 00433021 addu a2,v0,v1
400ec0: 8cc20000 lw v0,0(a2)
400ec4: 1040000e beqz v0,400f00 <fork+0x118>
400ec8: 00101080 sll v0,s0,0x2
400ecc: 8e6346e8 lw v1,18152(s3)
400ed0: 00433821 addu a3,v0,v1
400ed4: 8ce20000 lw v0,0(a3)
400ed8: 10400009 beqz v0,400f00 <fork+0x118>
400edc: 00000000 nop
400ee0: 8cc60000 lw a2,0(a2)
400ee4: 8ce70000 lw a3,0(a3)
400ee8: 26a44a24 addiu a0,s5,18980
400eec: 0c100099 jal 400264 <writef>
400ef0: 02002821 move a1,s0
400ef4: 02802021 move a0,s4
400ef8: 0c100352 jal 400d48 <duppage>
400efc: 02002821 move a1,s0
400f00: 26100001 addiu s0,s0,1
400f04: 1611ffeb bne s0,s1,400eb4 <fork+0xcc>
400f08: 00101282 srl v0,s0,0xa
400f0c: 02802021 move a0,s4
400f10: 3c057f3f lui a1,0x7f3f
400f14: 34a5f000 ori a1,a1,0xf000
400f18: 0c100447 jal 40111c <syscall_mem_alloc>
400f1c: 24060600 li a2,1536
400f20: 04410003 bgez v0,400f30 <fork+0x148>