papermario/asm/nonmatchings/code_1b40_len_20b0/load_engine_data.s
2020-08-12 22:37:16 -04:00

180 lines
8.4 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel load_engine_data
/* 0021DC 80026DDC 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 0021E0 80026DE0 3C040010 */ lui $a0, 0x10
/* 0021E4 80026DE4 2484EE30 */ addiu $a0, $a0, -0x11d0
/* 0021E8 80026DE8 3C050010 */ lui $a1, 0x10
/* 0021EC 80026DEC 24A52610 */ addiu $a1, $a1, 0x2610
/* 0021F0 80026DF0 3C06802E */ lui $a2, 0x802e
/* 0021F4 80026DF4 24C6BD40 */ addiu $a2, $a2, -0x42c0
/* 0021F8 80026DF8 AFBF0014 */ sw $ra, 0x14($sp)
/* 0021FC 80026DFC 0C00A5CF */ jal dma_copy
/* 002200 80026E00 AFB00010 */ sw $s0, 0x10($sp)
/* 002204 80026E04 3C040007 */ lui $a0, 7
/* 002208 80026E08 248459B0 */ addiu $a0, $a0, 0x59b0
/* 00220C 80026E0C 3C05000A */ lui $a1, 0xa
/* 002210 80026E10 24A55DD0 */ addiu $a1, $a1, 0x5dd0
/* 002214 80026E14 3C06800E */ lui $a2, 0x800e
/* 002218 80026E18 24C6C500 */ addiu $a2, $a2, -0x3b00
/* 00221C 80026E1C 0C00A5CF */ jal dma_copy
/* 002220 80026E20 00000000 */ nop
/* 002224 80026E24 3C04000E */ lui $a0, 0xe
/* 002228 80026E28 248479B0 */ addiu $a0, $a0, 0x79b0
/* 00222C 80026E2C 3C050010 */ lui $a1, 0x10
/* 002230 80026E30 24A5EE30 */ addiu $a1, $a1, -0x11d0
/* 002234 80026E34 3C06802C */ lui $a2, 0x802c
/* 002238 80026E38 24C63000 */ addiu $a2, $a2, 0x3000
/* 00223C 80026E3C 0C00A5CF */ jal dma_copy
/* 002240 80026E40 00000000 */ nop
/* 002244 80026E44 3C040010 */ lui $a0, 0x10
/* 002248 80026E48 24842610 */ addiu $a0, $a0, 0x2610
/* 00224C 80026E4C 3C050011 */ lui $a1, 0x11
/* 002250 80026E50 24A5CC10 */ addiu $a1, $a1, -0x33f0
/* 002254 80026E54 3C06802E */ lui $a2, 0x802e
/* 002258 80026E58 24C60D90 */ addiu $a2, $a2, 0xd90
/* 00225C 80026E5C 0C00A5CF */ jal dma_copy
/* 002260 80026E60 00000000 */ nop
/* 002264 80026E64 3C04000A */ lui $a0, 0xa
/* 002268 80026E68 24845DD0 */ addiu $a0, $a0, 0x5dd0
/* 00226C 80026E6C 3C05000E */ lui $a1, 0xe
/* 002270 80026E70 24A579B0 */ addiu $a1, $a1, 0x79b0
/* 002274 80026E74 3C068011 */ lui $a2, 0x8011
/* 002278 80026E78 24C6F6D0 */ addiu $a2, $a2, -0x930
/* 00227C 80026E7C 0C00A5CF */ jal dma_copy
/* 002280 80026E80 00000000 */ nop
/* 002284 80026E84 3C040011 */ lui $a0, 0x11
/* 002288 80026E88 2484CC10 */ addiu $a0, $a0, -0x33f0
/* 00228C 80026E8C 3C050011 */ lui $a1, 0x11
/* 002290 80026E90 24A5F1B0 */ addiu $a1, $a1, -0xe50
/* 002294 80026E94 3C06802F */ lui $a2, 0x802f
/* 002298 80026E98 24C6B3D0 */ addiu $a2, $a2, -0x4c30
/* 00229C 80026E9C 0C00A5CF */ jal dma_copy
/* 0022A0 80026EA0 00000000 */ nop
/* 0022A4 80026EA4 3C108007 */ lui $s0, 0x8007
/* 0022A8 80026EA8 2610419C */ addiu $s0, $s0, 0x419c
/* 0022AC 80026EAC 8E020000 */ lw $v0, ($s0)
/* 0022B0 80026EB0 3C01800A */ lui $at, 0x800a
/* 0022B4 80026EB4 AC20A650 */ sw $zero, -0x59b0($at)
/* 0022B8 80026EB8 A0400079 */ sb $zero, 0x79($v0)
/* 0022BC 80026EBC 8E030000 */ lw $v1, ($s0)
/* 0022C0 80026EC0 24040001 */ addiu $a0, $zero, 1
/* 0022C4 80026EC4 A064007A */ sb $a0, 0x7a($v1)
/* 0022C8 80026EC8 8E020000 */ lw $v0, ($s0)
/* 0022CC 80026ECC A4600148 */ sh $zero, 0x148($v1)
/* 0022D0 80026ED0 A044007C */ sb $a0, 0x7c($v0)
/* 0022D4 80026ED4 8E030000 */ lw $v1, ($s0)
/* 0022D8 80026ED8 2402FFFF */ addiu $v0, $zero, -1
/* 0022DC 80026EDC A06200A8 */ sb $v0, 0xa8($v1)
/* 0022E0 80026EE0 8E020000 */ lw $v0, ($s0)
/* 0022E4 80026EE4 A04000AA */ sb $zero, 0xaa($v0)
/* 0022E8 80026EE8 8E020000 */ lw $v0, ($s0)
/* 0022EC 80026EEC A0400081 */ sb $zero, 0x81($v0)
/* 0022F0 80026EF0 8E030000 */ lw $v1, ($s0)
/* 0022F4 80026EF4 2402FFF8 */ addiu $v0, $zero, -8
/* 0022F8 80026EF8 A0620082 */ sb $v0, 0x82($v1)
/* 0022FC 80026EFC 8E030000 */ lw $v1, ($s0)
/* 002300 80026F00 24020004 */ addiu $v0, $zero, 4
/* 002304 80026F04 A0620083 */ sb $v0, 0x83($v1)
/* 002308 80026F08 8E020000 */ lw $v0, ($s0)
/* 00230C 80026F0C 3C01800A */ lui $at, 0x800a
/* 002310 80026F10 AC20A5D8 */ sw $zero, -0x5a28($at)
/* 002314 80026F14 A440013C */ sh $zero, 0x13c($v0)
/* 002318 80026F18 A0400075 */ sb $zero, 0x75($v0)
/* 00231C 80026F1C 8E030000 */ lw $v1, ($s0)
/* 002320 80026F20 24020005 */ addiu $v0, $zero, 5
/* 002324 80026F24 3C018007 */ lui $at, 0x8007
/* 002328 80026F28 A0224021 */ sb $v0, 0x4021($at)
/* 00232C 80026F2C 0C00AE13 */ jal fio_init_flash
/* 002330 80026F30 AC600168 */ sw $zero, 0x168($v1)
/* 002334 80026F34 0C00A20E */ jal func_80028838
/* 002338 80026F38 00000000 */ nop
/* 00233C 80026F3C 0C00AB00 */ jal general_heap_create
/* 002340 80026F40 00000000 */ nop
/* 002344 80026F44 0C047624 */ jal func_8011D890
/* 002348 80026F48 00000000 */ nop
/* 00234C 80026F4C 0C048C2E */ jal func_801230B8
/* 002350 80026F50 00000000 */ nop
/* 002354 80026F54 0C0B0C77 */ jal clear_script_list
/* 002358 80026F58 00000000 */ nop
/* 00235C 80026F5C 0C00B7BD */ jal create_cameras_a
/* 002360 80026F60 00000000 */ nop
/* 002364 80026F64 0C037F14 */ jal clear_player_status
/* 002368 80026F68 00000000 */ nop
/* 00236C 80026F6C 0C0B763E */ jal func_802DD8F8
/* 002370 80026F70 0000202D */ daddu $a0, $zero, $zero
/* 002374 80026F74 0C0482EC */ jal func_80120BB0
/* 002378 80026F78 00000000 */ nop
/* 00237C 80026F7C 0C047889 */ jal func_8011E224
/* 002380 80026F80 00000000 */ nop
/* 002384 80026F84 0C045751 */ jal clear_model_data
/* 002388 80026F88 00000000 */ nop
/* 00238C 80026F8C 0C052010 */ jal func_80148040
/* 002390 80026F90 00000000 */ nop
/* 002394 80026F94 0C05177E */ jal func_80145DF8
/* 002398 80026F98 00000000 */ nop
/* 00239C 80026F9C 0C048D98 */ jal clear_character_set
/* 0023A0 80026FA0 00000000 */ nop
/* 0023A4 80026FA4 0C048D9D */ jal clear_printers
/* 0023A8 80026FA8 00000000 */ nop
/* 0023AC 80026FAC 0C044AE6 */ jal func_80112B98
/* 0023B0 80026FB0 00000000 */ nop
/* 0023B4 80026FB4 0C00E12F */ jal func_800384BC
/* 0023B8 80026FB8 00000000 */ nop
/* 0023BC 80026FBC 0C050440 */ jal func_80141100
/* 0023C0 80026FC0 00000000 */ nop
/* 0023C4 80026FC4 0C0515A0 */ jal clear_trigger_data
/* 0023C8 80026FC8 00000000 */ nop
/* 0023CC 80026FCC 0C04432E */ jal func_80110CB8
/* 0023D0 80026FD0 0000202D */ daddu $a0, $zero, $zero
/* 0023D4 80026FD4 0C039CE8 */ jal clear_player_data
/* 0023D8 80026FD8 00000000 */ nop
/* 0023DC 80026FDC 0C00F8CE */ jal func_8003E338
/* 0023E0 80026FE0 00000000 */ nop
/* 0023E4 80026FE4 0C04E042 */ jal func_80138108
/* 0023E8 80026FE8 00000000 */ nop
/* 0023EC 80026FEC 0C016727 */ jal func_80059C9C
/* 0023F0 80026FF0 00000000 */ nop
/* 0023F4 80026FF4 0C0514C8 */ jal clear_saved_variables
/* 0023F8 80026FF8 00000000 */ nop
/* 0023FC 80026FFC 0C04C3FC */ jal clear_item_entity_data
/* 002400 80027000 00000000 */ nop
/* 002404 80027004 0C052926 */ jal func_8014A498
/* 002408 80027008 00000000 */ nop
/* 00240C 8002700C 0C051C8C */ jal func_80147230
/* 002410 80027010 00000000 */ nop
/* 002414 80027014 0C052586 */ jal func_80149618
/* 002418 80027018 00000000 */ nop
/* 00241C 8002701C 0C051CFC */ jal func_801473F0
/* 002420 80027020 00000000 */ nop
/* 002424 80027024 0C00AE90 */ jal func_8002BA40
/* 002428 80027028 00000000 */ nop
/* 00242C 8002702C 0C00A3B8 */ jal poll_rumble
/* 002430 80027030 00000000 */ nop
/* 002434 80027034 0000182D */ daddu $v1, $zero, $zero
/* 002438 80027038 24050003 */ addiu $a1, $zero, 3
/* 00243C 8002703C 2404000C */ addiu $a0, $zero, 0xc
/* 002440 80027040 8E100000 */ lw $s0, ($s0)
.L80027044:
/* 002444 80027044 A6050050 */ sh $a1, 0x50($s0)
/* 002448 80027048 A6040048 */ sh $a0, 0x48($s0)
/* 00244C 8002704C 24630001 */ addiu $v1, $v1, 1
/* 002450 80027050 28620004 */ slti $v0, $v1, 4
/* 002454 80027054 1440FFFB */ bnez $v0, .L80027044
/* 002458 80027058 26100002 */ addiu $s0, $s0, 2
/* 00245C 8002705C 3C03800A */ lui $v1, 0x800a
/* 002460 80027060 2463A650 */ addiu $v1, $v1, -0x59b0
/* 002464 80027064 8C620000 */ lw $v0, ($v1)
/* 002468 80027068 0000202D */ daddu $a0, $zero, $zero
/* 00246C 8002706C 34420008 */ ori $v0, $v0, 8
/* 002470 80027070 0C00CD3C */ jal set_game_mode
/* 002474 80027074 AC620000 */ sw $v0, ($v1)
/* 002478 80027078 8FBF0014 */ lw $ra, 0x14($sp)
/* 00247C 8002707C 8FB00010 */ lw $s0, 0x10($sp)
/* 002480 80027080 03E00008 */ jr $ra
/* 002484 80027084 27BD0018 */ addiu $sp, $sp, 0x18