papermario/asm/nonmatchings/code_111f0_len_860/func_8003646C.s

140 lines
6.0 KiB
ArmAsm
Raw Normal View History

2020-08-04 08:49:11 +02:00
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8003646C
/* 01186C 8003646C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 011870 80036470 AFB00010 */ sw $s0, 0x10($sp)
/* 011874 80036474 3C10800A */ lui $s0, 0x800a
/* 011878 80036478 26100944 */ addiu $s0, $s0, 0x944
/* 01187C 8003647C 24020002 */ addiu $v0, $zero, 2
/* 011880 80036480 AFBF0014 */ sw $ra, 0x14($sp)
/* 011884 80036484 86030000 */ lh $v1, ($s0)
/* 011888 80036488 96070000 */ lhu $a3, ($s0)
/* 01188C 8003648C 1062001A */ beq $v1, $v0, .L800364F8
/* 011890 80036490 28620003 */ slti $v0, $v1, 3
/* 011894 80036494 10400005 */ beqz $v0, .L800364AC
/* 011898 80036498 24020001 */ addiu $v0, $zero, 1
/* 01189C 8003649C 1062000A */ beq $v1, $v0, .L800364C8
/* 0118A0 800364A0 00000000 */ nop
/* 0118A4 800364A4 0800D984 */ j .L80036610
/* 0118A8 800364A8 00000000 */ nop
.L800364AC:
/* 0118AC 800364AC 24020003 */ addiu $v0, $zero, 3
/* 0118B0 800364B0 1062002A */ beq $v1, $v0, .L8003655C
/* 0118B4 800364B4 24020004 */ addiu $v0, $zero, 4
/* 0118B8 800364B8 1062003C */ beq $v1, $v0, .L800365AC
/* 0118BC 800364BC 00000000 */ nop
/* 0118C0 800364C0 0800D984 */ j .L80036610
/* 0118C4 800364C4 00000000 */ nop
.L800364C8:
/* 0118C8 800364C8 3C03800A */ lui $v1, 0x800a
/* 0118CC 800364CC 2463A650 */ addiu $v1, $v1, -0x59b0
/* 0118D0 800364D0 8C620000 */ lw $v0, ($v1)
/* 0118D4 800364D4 34420008 */ ori $v0, $v0, 8
/* 0118D8 800364D8 0C018028 */ jal nuContRmbForceStop
/* 0118DC 800364DC AC620000 */ sw $v0, ($v1)
/* 0118E0 800364E0 96020000 */ lhu $v0, ($s0)
/* 0118E4 800364E4 24030004 */ addiu $v1, $zero, 4
/* 0118E8 800364E8 3C01800A */ lui $at, 0x800a
/* 0118EC 800364EC A4230946 */ sh $v1, 0x946($at)
/* 0118F0 800364F0 0800D955 */ j .L80036554
/* 0118F4 800364F4 24420001 */ addiu $v0, $v0, 1
.L800364F8:
/* 0118F8 800364F8 3C04800A */ lui $a0, 0x800a
/* 0118FC 800364FC 24840946 */ addiu $a0, $a0, 0x946
/* 011900 80036500 84820000 */ lh $v0, ($a0)
/* 011904 80036504 94830000 */ lhu $v1, ($a0)
/* 011908 80036508 10400003 */ beqz $v0, .L80036518
/* 01190C 8003650C 2462FFFF */ addiu $v0, $v1, -1
/* 011910 80036510 0800D984 */ j .L80036610
/* 011914 80036514 A4820000 */ sh $v0, ($a0)
.L80036518:
/* 011918 80036518 3C038007 */ lui $v1, 0x8007
/* 01191C 8003651C 2463419C */ addiu $v1, $v1, 0x419c
/* 011920 80036520 8C620000 */ lw $v0, ($v1)
/* 011924 80036524 A0400070 */ sb $zero, 0x70($v0)
/* 011928 80036528 8C620000 */ lw $v0, ($v1)
/* 01192C 8003652C A0400078 */ sb $zero, 0x78($v0)
/* 011930 80036530 8C620000 */ lw $v0, ($v1)
/* 011934 80036534 84440086 */ lh $a0, 0x86($v0)
/* 011938 80036538 8445008C */ lh $a1, 0x8c($v0)
/* 01193C 8003653C 0C0169BD */ jal load_map_by_IDs
/* 011940 80036540 0000302D */ daddu $a2, $zero, $zero
/* 011944 80036544 0C018030 */ jal nuContRmbForceStopEnd
/* 011948 80036548 00000000 */ nop
/* 01194C 8003654C 96020000 */ lhu $v0, ($s0)
/* 011950 80036550 24420001 */ addiu $v0, $v0, 1
.L80036554:
/* 011954 80036554 0800D984 */ j .L80036610
/* 011958 80036558 A6020000 */ sh $v0, ($s0)
.L8003655C:
/* 01195C 8003655C 0C00F949 */ jal func_8003E524
/* 011960 80036560 00000000 */ nop
/* 011964 80036564 0C00E64C */ jal func_80039930
/* 011968 80036568 00000000 */ nop
/* 01196C 8003656C 3C028007 */ lui $v0, 0x8007
/* 011970 80036570 8C42419C */ lw $v0, 0x419c($v0)
/* 011974 80036574 0C0B1059 */ jal does_script_exist
/* 011978 80036578 8C44006C */ lw $a0, 0x6c($v0)
/* 01197C 8003657C 1440002C */ bnez $v0, .L80036630
/* 011980 80036580 00000000 */ nop
/* 011984 80036584 3C05800A */ lui $a1, 0x800a
/* 011988 80036588 24A5A650 */ addiu $a1, $a1, -0x59b0
/* 01198C 8003658C 2404FFF7 */ addiu $a0, $zero, -9
/* 011990 80036590 8CA20000 */ lw $v0, ($a1)
/* 011994 80036594 96030000 */ lhu $v1, ($s0)
/* 011998 80036598 00441024 */ and $v0, $v0, $a0
/* 01199C 8003659C 24630001 */ addiu $v1, $v1, 1
/* 0119A0 800365A0 ACA20000 */ sw $v0, ($a1)
/* 0119A4 800365A4 0800D984 */ j .L80036610
/* 0119A8 800365A8 A6030000 */ sh $v1, ($s0)
.L800365AC:
/* 0119AC 800365AC 3C06800A */ lui $a2, 0x800a
/* 0119B0 800365B0 24C60940 */ addiu $a2, $a2, 0x940
/* 0119B4 800365B4 94C20000 */ lhu $v0, ($a2)
/* 0119B8 800365B8 3C03800A */ lui $v1, 0x800a
/* 0119BC 800365BC 94630942 */ lhu $v1, 0x942($v1)
/* 0119C0 800365C0 00431023 */ subu $v0, $v0, $v1
/* 0119C4 800365C4 A4C20000 */ sh $v0, ($a2)
/* 0119C8 800365C8 00021400 */ sll $v0, $v0, 0x10
/* 0119CC 800365CC 04410008 */ bgez $v0, .L800365F0
/* 0119D0 800365D0 240400FF */ addiu $a0, $zero, 0xff
/* 0119D4 800365D4 3C05BF80 */ lui $a1, 0xbf80
/* 0119D8 800365D8 24E20001 */ addiu $v0, $a3, 1
/* 0119DC 800365DC A4C00000 */ sh $zero, ($a2)
/* 0119E0 800365E0 0C04DF62 */ jal func_80137D88
/* 0119E4 800365E4 A6020000 */ sh $v0, ($s0)
/* 0119E8 800365E8 0C00CD3C */ jal set_game_mode
/* 0119EC 800365EC 24040004 */ addiu $a0, $zero, 4
.L800365F0:
/* 0119F0 800365F0 0C00E64C */ jal func_80039930
/* 0119F4 800365F4 00000000 */ nop
/* 0119F8 800365F8 0C037DD0 */ jal func_800DF740
/* 0119FC 800365FC 00000000 */ nop
/* 011A00 80036600 0C016754 */ jal func_80059D50
/* 011A04 80036604 00000000 */ nop
/* 011A08 80036608 0C00B500 */ jal update_cameras
/* 011A0C 8003660C 00000000 */ nop
.L80036610:
/* 011A10 80036610 3C02800A */ lui $v0, 0x800a
/* 011A14 80036614 84420940 */ lh $v0, 0x940($v0)
/* 011A18 80036618 44820000 */ mtc1 $v0, $f0
/* 011A1C 8003661C 00000000 */ nop
/* 011A20 80036620 46800020 */ cvt.s.w $f0, $f0
/* 011A24 80036624 44050000 */ mfc1 $a1, $f0
/* 011A28 80036628 0C04DF62 */ jal func_80137D88
/* 011A2C 8003662C 0000202D */ daddu $a0, $zero, $zero
.L80036630:
/* 011A30 80036630 8FBF0014 */ lw $ra, 0x14($sp)
/* 011A34 80036634 8FB00010 */ lw $s0, 0x10($sp)
/* 011A38 80036638 03E00008 */ jr $ra
/* 011A3C 8003663C 27BD0018 */ addiu $sp, $sp, 0x18