mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
284 lines
13 KiB
ArmAsm
284 lines
13 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
|
|
glabel check_block_input
|
|
/* 1977AC 80268ECC 27BDFFC8 */ addiu $sp, $sp, -0x38
|
|
/* 1977B0 80268ED0 AFB40020 */ sw $s4, 0x20($sp)
|
|
/* 1977B4 80268ED4 0080A02D */ daddu $s4, $a0, $zero
|
|
/* 1977B8 80268ED8 AFB7002C */ sw $s7, 0x2c($sp)
|
|
/* 1977BC 80268EDC 0000B82D */ daddu $s7, $zero, $zero
|
|
/* 1977C0 80268EE0 AFB10014 */ sw $s1, 0x14($sp)
|
|
/* 1977C4 80268EE4 3C11800E */ lui $s1, 0x800e
|
|
/* 1977C8 80268EE8 2631C070 */ addiu $s1, $s1, -0x3f90
|
|
/* 1977CC 80268EEC AFB50024 */ sw $s5, 0x24($sp)
|
|
/* 1977D0 80268EF0 3C158011 */ lui $s5, 0x8011
|
|
/* 1977D4 80268EF4 26B5F290 */ addiu $s5, $s5, -0xd70
|
|
/* 1977D8 80268EF8 AFB60028 */ sw $s6, 0x28($sp)
|
|
/* 1977DC 80268EFC 3C16802A */ lui $s6, 0x802a
|
|
/* 1977E0 80268F00 26D6FBE0 */ addiu $s6, $s6, -0x420
|
|
/* 1977E4 80268F04 AFBF0030 */ sw $ra, 0x30($sp)
|
|
/* 1977E8 80268F08 AFB3001C */ sw $s3, 0x1c($sp)
|
|
/* 1977EC 80268F0C AFB20018 */ sw $s2, 0x18($sp)
|
|
/* 1977F0 80268F10 AFB00010 */ sw $s0, 0x10($sp)
|
|
/* 1977F4 80268F14 82230083 */ lb $v1, 0x83($s1)
|
|
/* 1977F8 80268F18 2402FFFF */ addiu $v0, $zero, -1
|
|
/* 1977FC 80268F1C 14620009 */ bne $v1, $v0, .L80268F44
|
|
/* 197800 80268F20 A2200087 */ sb $zero, 0x87($s1)
|
|
/* 197804 80268F24 8E220000 */ lw $v0, ($s1)
|
|
/* 197808 80268F28 3C030200 */ lui $v1, 0x200
|
|
/* 19780C 80268F2C 00431024 */ and $v0, $v0, $v1
|
|
/* 197810 80268F30 10400004 */ beqz $v0, .L80268F44
|
|
/* 197814 80268F34 24020001 */ addiu $v0, $zero, 1
|
|
/* 197818 80268F38 A2220087 */ sb $v0, 0x87($s1)
|
|
/* 19781C 80268F3C 0809A43B */ j .L802690EC
|
|
/* 197820 80268F40 24020001 */ addiu $v0, $zero, 1
|
|
|
|
.L80268F44:
|
|
/* 197824 80268F44 82220083 */ lb $v0, 0x83($s1)
|
|
/* 197828 80268F48 10400068 */ beqz $v0, .L802690EC
|
|
/* 19782C 80268F4C 0000102D */ daddu $v0, $zero, $zero
|
|
/* 197830 80268F50 3C028007 */ lui $v0, 0x8007
|
|
/* 197834 80268F54 8C42419C */ lw $v0, 0x419c($v0)
|
|
/* 197838 80268F58 904200AA */ lbu $v0, 0xaa($v0)
|
|
/* 19783C 80268F5C 30420001 */ andi $v0, $v0, 1
|
|
/* 197840 80268F60 14400062 */ bnez $v0, .L802690EC
|
|
/* 197844 80268F64 0000102D */ daddu $v0, $zero, $zero
|
|
/* 197848 80268F68 96A30298 */ lhu $v1, 0x298($s5)
|
|
/* 19784C 80268F6C 2C62270F */ sltiu $v0, $v1, 0x270f
|
|
/* 197850 80268F70 1040000A */ beqz $v0, .L80268F9C
|
|
/* 197854 80268F74 24620001 */ addiu $v0, $v1, 1
|
|
/* 197858 80268F78 A6A20298 */ sh $v0, 0x298($s5)
|
|
/* 19785C 80268F7C 0809A3E9 */ j .L80268FA4
|
|
/* 197860 80268F80 A6C0006E */ sh $zero, 0x6e($s6)
|
|
|
|
.L80268F84:
|
|
/* 197864 80268F84 0809A408 */ j .L80269020
|
|
/* 197868 80268F88 24170001 */ addiu $s7, $zero, 1
|
|
|
|
.L80268F8C:
|
|
/* 19786C 80268F8C 24020001 */ addiu $v0, $zero, 1
|
|
/* 197870 80268F90 A2220087 */ sb $v0, 0x87($s1)
|
|
/* 197874 80268F94 0809A41A */ j .L80269068
|
|
/* 197878 80268F98 24120001 */ addiu $s2, $zero, 1
|
|
|
|
.L80268F9C:
|
|
/* 19787C 80268F9C 24020001 */ addiu $v0, $zero, 1
|
|
/* 197880 80268FA0 A6C2006E */ sh $v0, 0x6e($s6)
|
|
.L80268FA4:
|
|
/* 197884 80268FA4 0000902D */ daddu $s2, $zero, $zero
|
|
/* 197888 80268FA8 24100003 */ addiu $s0, $zero, 3
|
|
/* 19788C 80268FAC 3C02800E */ lui $v0, 0x800e
|
|
/* 197890 80268FB0 8C42C070 */ lw $v0, -0x3f90($v0)
|
|
/* 197894 80268FB4 3C030008 */ lui $v1, 8
|
|
/* 197898 80268FB8 00431024 */ and $v0, $v0, $v1
|
|
/* 19789C 80268FBC 14400005 */ bnez $v0, .L80268FD4
|
|
/* 1978A0 80268FC0 2413000A */ addiu $s3, $zero, 0xa
|
|
/* 1978A4 80268FC4 0C03A752 */ jal is_ability_active
|
|
/* 1978A8 80268FC8 0240202D */ daddu $a0, $s2, $zero
|
|
/* 1978AC 80268FCC 54400001 */ bnezl $v0, .L80268FD4
|
|
/* 1978B0 80268FD0 24100005 */ addiu $s0, $zero, 5
|
|
.L80268FD4:
|
|
/* 1978B4 80268FD4 82230431 */ lb $v1, 0x431($s1)
|
|
/* 1978B8 80268FD8 02701021 */ addu $v0, $s3, $s0
|
|
/* 1978BC 80268FDC 00621823 */ subu $v1, $v1, $v0
|
|
/* 1978C0 80268FE0 04620001 */ bltzl $v1, .L80268FE8
|
|
/* 1978C4 80268FE4 24630040 */ addiu $v1, $v1, 0x40
|
|
.L80268FE8:
|
|
/* 1978C8 80268FE8 1260000D */ beqz $s3, .L80269020
|
|
/* 1978CC 80268FEC 0000202D */ daddu $a0, $zero, $zero
|
|
.L80268FF0:
|
|
/* 1978D0 80268FF0 28620040 */ slti $v0, $v1, 0x40
|
|
/* 1978D4 80268FF4 50400001 */ beql $v0, $zero, .L80268FFC
|
|
/* 1978D8 80268FF8 2463FFC0 */ addiu $v1, $v1, -0x40
|
|
.L80268FFC:
|
|
/* 1978DC 80268FFC 00031080 */ sll $v0, $v1, 2
|
|
/* 1978E0 80269000 02221021 */ addu $v0, $s1, $v0
|
|
/* 1978E4 80269004 8C420330 */ lw $v0, 0x330($v0)
|
|
/* 1978E8 80269008 00541024 */ and $v0, $v0, $s4
|
|
/* 1978EC 8026900C 1440FFDD */ bnez $v0, .L80268F84
|
|
/* 1978F0 80269010 24840001 */ addiu $a0, $a0, 1
|
|
/* 1978F4 80269014 0093102A */ slt $v0, $a0, $s3
|
|
/* 1978F8 80269018 1440FFF5 */ bnez $v0, .L80268FF0
|
|
/* 1978FC 8026901C 24630001 */ addiu $v1, $v1, 1
|
|
.L80269020:
|
|
.L80269020:
|
|
/* 197900 80269020 82230431 */ lb $v1, 0x431($s1)
|
|
/* 197904 80269024 00701823 */ subu $v1, $v1, $s0
|
|
/* 197908 80269028 04620001 */ bltzl $v1, .L80269030
|
|
/* 19790C 8026902C 24630040 */ addiu $v1, $v1, 0x40
|
|
.L80269030:
|
|
/* 197910 80269030 1200000D */ beqz $s0, .L80269068
|
|
/* 197914 80269034 0000202D */ daddu $a0, $zero, $zero
|
|
.L80269038:
|
|
/* 197918 80269038 28620040 */ slti $v0, $v1, 0x40
|
|
/* 19791C 8026903C 50400001 */ beql $v0, $zero, .L80269044
|
|
/* 197920 80269040 2463FFC0 */ addiu $v1, $v1, -0x40
|
|
.L80269044:
|
|
/* 197924 80269044 00031080 */ sll $v0, $v1, 2
|
|
/* 197928 80269048 02221021 */ addu $v0, $s1, $v0
|
|
/* 19792C 8026904C 8C420330 */ lw $v0, 0x330($v0)
|
|
/* 197930 80269050 00541024 */ and $v0, $v0, $s4
|
|
/* 197934 80269054 1440FFCD */ bnez $v0, .L80268F8C
|
|
/* 197938 80269058 24840001 */ addiu $a0, $a0, 1
|
|
/* 19793C 8026905C 0090102A */ slt $v0, $a0, $s0
|
|
/* 197940 80269060 1440FFF5 */ bnez $v0, .L80269038
|
|
/* 197944 80269064 24630001 */ addiu $v1, $v1, 1
|
|
.L80269068:
|
|
.L80269068:
|
|
/* 197948 80269068 12E00003 */ beqz $s7, .L80269078
|
|
/* 19794C 8026906C 2402FFFF */ addiu $v0, $zero, -1
|
|
/* 197950 80269070 A2220087 */ sb $v0, 0x87($s1)
|
|
/* 197954 80269074 0000902D */ daddu $s2, $zero, $zero
|
|
.L80269078:
|
|
/* 197958 80269078 24020001 */ addiu $v0, $zero, 1
|
|
/* 19795C 8026907C 16420012 */ bne $s2, $v0, .L802690C8
|
|
/* 197960 80269080 02701021 */ addu $v0, $s3, $s0
|
|
/* 197964 80269084 82230431 */ lb $v1, 0x431($s1)
|
|
/* 197968 80269088 00621823 */ subu $v1, $v1, $v0
|
|
/* 19796C 8026908C 04620001 */ bltzl $v1, .L80269094
|
|
/* 197970 80269090 24630040 */ addiu $v1, $v1, 0x40
|
|
.L80269094:
|
|
/* 197974 80269094 1040000C */ beqz $v0, .L802690C8
|
|
/* 197978 80269098 0000202D */ daddu $a0, $zero, $zero
|
|
/* 19797C 8026909C 0040282D */ daddu $a1, $v0, $zero
|
|
.L802690A0:
|
|
/* 197980 802690A0 28620040 */ slti $v0, $v1, 0x40
|
|
/* 197984 802690A4 50400001 */ beql $v0, $zero, .L802690AC
|
|
/* 197988 802690A8 2463FFC0 */ addiu $v1, $v1, -0x40
|
|
.L802690AC:
|
|
/* 19798C 802690AC 00031080 */ sll $v0, $v1, 2
|
|
/* 197990 802690B0 02221021 */ addu $v0, $s1, $v0
|
|
/* 197994 802690B4 AC400330 */ sw $zero, 0x330($v0)
|
|
/* 197998 802690B8 24840001 */ addiu $a0, $a0, 1
|
|
/* 19799C 802690BC 0085102A */ slt $v0, $a0, $a1
|
|
/* 1979A0 802690C0 1440FFF7 */ bnez $v0, .L802690A0
|
|
/* 1979A4 802690C4 24630001 */ addiu $v1, $v1, 1
|
|
.L802690C8:
|
|
/* 1979A8 802690C8 12400008 */ beqz $s2, .L802690EC
|
|
/* 1979AC 802690CC 0240102D */ daddu $v0, $s2, $zero
|
|
/* 1979B0 802690D0 86C2006E */ lh $v0, 0x6e($s6)
|
|
/* 1979B4 802690D4 14400005 */ bnez $v0, .L802690EC
|
|
/* 1979B8 802690D8 0240102D */ daddu $v0, $s2, $zero
|
|
/* 1979BC 802690DC 96A2029A */ lhu $v0, 0x29a($s5)
|
|
/* 1979C0 802690E0 24420001 */ addiu $v0, $v0, 1
|
|
/* 1979C4 802690E4 A6A2029A */ sh $v0, 0x29a($s5)
|
|
/* 1979C8 802690E8 0240102D */ daddu $v0, $s2, $zero
|
|
.L802690EC:
|
|
.L802690EC:
|
|
/* 1979CC 802690EC 8FBF0030 */ lw $ra, 0x30($sp)
|
|
/* 1979D0 802690F0 8FB7002C */ lw $s7, 0x2c($sp)
|
|
/* 1979D4 802690F4 8FB60028 */ lw $s6, 0x28($sp)
|
|
/* 1979D8 802690F8 8FB50024 */ lw $s5, 0x24($sp)
|
|
/* 1979DC 802690FC 8FB40020 */ lw $s4, 0x20($sp)
|
|
/* 1979E0 80269100 8FB3001C */ lw $s3, 0x1c($sp)
|
|
/* 1979E4 80269104 8FB20018 */ lw $s2, 0x18($sp)
|
|
/* 1979E8 80269108 8FB10014 */ lw $s1, 0x14($sp)
|
|
/* 1979EC 8026910C 8FB00010 */ lw $s0, 0x10($sp)
|
|
/* 1979F0 80269110 03E00008 */ jr $ra
|
|
/* 1979F4 80269114 27BD0038 */ addiu $sp, $sp, 0x38
|
|
|
|
/* 1979F8 80269118 3C058011 */ lui $a1, 0x8011
|
|
/* 1979FC 8026911C 24A5F290 */ addiu $a1, $a1, -0xd70
|
|
/* 197A00 80269120 3C04802A */ lui $a0, 0x802a
|
|
/* 197A04 80269124 2484FBE0 */ addiu $a0, $a0, -0x420
|
|
/* 197A08 80269128 8082005E */ lb $v0, 0x5e($a0)
|
|
/* 197A0C 8026912C 1440000A */ bnez $v0, .L80269158
|
|
/* 197A10 80269130 0080302D */ daddu $a2, $a0, $zero
|
|
/* 197A14 80269134 94A30294 */ lhu $v1, 0x294($a1)
|
|
/* 197A18 80269138 2C62270F */ sltiu $v0, $v1, 0x270f
|
|
/* 197A1C 8026913C 10400005 */ beqz $v0, .L80269154
|
|
/* 197A20 80269140 24020001 */ addiu $v0, $zero, 1
|
|
/* 197A24 80269144 24620001 */ addiu $v0, $v1, 1
|
|
/* 197A28 80269148 A4A20294 */ sh $v0, 0x294($a1)
|
|
/* 197A2C 8026914C 03E00008 */ jr $ra
|
|
/* 197A30 80269150 A480006E */ sh $zero, 0x6e($a0)
|
|
|
|
.L80269154:
|
|
/* 197A34 80269154 A4C2006E */ sh $v0, 0x6e($a2)
|
|
.L80269158:
|
|
/* 197A38 80269158 03E00008 */ jr $ra
|
|
/* 197A3C 8026915C 00000000 */ nop
|
|
|
|
/* 197A40 80269160 3C03802A */ lui $v1, 0x802a
|
|
/* 197A44 80269164 2463FBE0 */ addiu $v1, $v1, -0x420
|
|
/* 197A48 80269168 8062005E */ lb $v0, 0x5e($v1)
|
|
/* 197A4C 8026916C 3C048011 */ lui $a0, 0x8011
|
|
/* 197A50 80269170 2484F290 */ addiu $a0, $a0, -0xd70
|
|
/* 197A54 80269174 14400007 */ bnez $v0, .L80269194
|
|
/* 197A58 80269178 00000000 */ nop
|
|
/* 197A5C 8026917C 8462006E */ lh $v0, 0x6e($v1)
|
|
/* 197A60 80269180 10400004 */ beqz $v0, .L80269194
|
|
/* 197A64 80269184 00000000 */ nop
|
|
/* 197A68 80269188 94820296 */ lhu $v0, 0x296($a0)
|
|
/* 197A6C 8026918C 24420001 */ addiu $v0, $v0, 1
|
|
/* 197A70 80269190 A4820296 */ sh $v0, 0x296($a0)
|
|
.L80269194:
|
|
/* 197A74 80269194 03E00008 */ jr $ra
|
|
/* 197A78 80269198 00000000 */ nop
|
|
|
|
/* 197A7C 8026919C 27BDFFE8 */ addiu $sp, $sp, -0x18
|
|
/* 197A80 802691A0 AFBF0010 */ sw $ra, 0x10($sp)
|
|
/* 197A84 802691A4 8C82000C */ lw $v0, 0xc($a0)
|
|
/* 197A88 802691A8 0C0B1EAF */ jal get_variable
|
|
/* 197A8C 802691AC 8C450000 */ lw $a1, ($v0)
|
|
/* 197A90 802691B0 8FBF0010 */ lw $ra, 0x10($sp)
|
|
/* 197A94 802691B4 3C01800E */ lui $at, 0x800e
|
|
/* 197A98 802691B8 AC22C4A4 */ sw $v0, -0x3b5c($at)
|
|
/* 197A9C 802691BC 24020002 */ addiu $v0, $zero, 2
|
|
/* 197AA0 802691C0 03E00008 */ jr $ra
|
|
/* 197AA4 802691C4 27BD0018 */ addiu $sp, $sp, 0x18
|
|
|
|
/* 197AA8 802691C8 27BDFFE0 */ addiu $sp, $sp, -0x20
|
|
/* 197AAC 802691CC AFB20018 */ sw $s2, 0x18($sp)
|
|
/* 197AB0 802691D0 0080902D */ daddu $s2, $a0, $zero
|
|
/* 197AB4 802691D4 AFBF001C */ sw $ra, 0x1c($sp)
|
|
/* 197AB8 802691D8 AFB10014 */ sw $s1, 0x14($sp)
|
|
/* 197ABC 802691DC AFB00010 */ sw $s0, 0x10($sp)
|
|
/* 197AC0 802691E0 8E50000C */ lw $s0, 0xc($s2)
|
|
/* 197AC4 802691E4 8E050000 */ lw $a1, ($s0)
|
|
/* 197AC8 802691E8 0C0B1EAF */ jal get_variable
|
|
/* 197ACC 802691EC 26100004 */ addiu $s0, $s0, 4
|
|
/* 197AD0 802691F0 3C11802A */ lui $s1, 0x802a
|
|
/* 197AD4 802691F4 2631FBE0 */ addiu $s1, $s1, -0x420
|
|
/* 197AD8 802691F8 A2220080 */ sb $v0, 0x80($s1)
|
|
/* 197ADC 802691FC 8E050000 */ lw $a1, ($s0)
|
|
/* 197AE0 80269200 26100004 */ addiu $s0, $s0, 4
|
|
/* 197AE4 80269204 0C0B1EAF */ jal get_variable
|
|
/* 197AE8 80269208 0240202D */ daddu $a0, $s2, $zero
|
|
/* 197AEC 8026920C A6220076 */ sh $v0, 0x76($s1)
|
|
/* 197AF0 80269210 8E050000 */ lw $a1, ($s0)
|
|
/* 197AF4 80269214 26100004 */ addiu $s0, $s0, 4
|
|
/* 197AF8 80269218 0C0B1EAF */ jal get_variable
|
|
/* 197AFC 8026921C 0240202D */ daddu $a0, $s2, $zero
|
|
/* 197B00 80269220 A6220078 */ sh $v0, 0x78($s1)
|
|
/* 197B04 80269224 8E050000 */ lw $a1, ($s0)
|
|
/* 197B08 80269228 26100004 */ addiu $s0, $s0, 4
|
|
/* 197B0C 8026922C 0C0B1EAF */ jal get_variable
|
|
/* 197B10 80269230 0240202D */ daddu $a0, $s2, $zero
|
|
/* 197B14 80269234 A622007A */ sh $v0, 0x7a($s1)
|
|
/* 197B18 80269238 8E050000 */ lw $a1, ($s0)
|
|
/* 197B1C 8026923C 26100004 */ addiu $s0, $s0, 4
|
|
/* 197B20 80269240 0C0B1EAF */ jal get_variable
|
|
/* 197B24 80269244 0240202D */ daddu $a0, $s2, $zero
|
|
/* 197B28 80269248 A622007C */ sh $v0, 0x7c($s1)
|
|
/* 197B2C 8026924C 8E050000 */ lw $a1, ($s0)
|
|
/* 197B30 80269250 0C0B1EAF */ jal get_variable
|
|
/* 197B34 80269254 0240202D */ daddu $a0, $s2, $zero
|
|
/* 197B38 80269258 96240076 */ lhu $a0, 0x76($s1)
|
|
/* 197B3C 8026925C A622007E */ sh $v0, 0x7e($s1)
|
|
/* 197B40 80269260 00042400 */ sll $a0, $a0, 0x10
|
|
/* 197B44 80269264 00041C03 */ sra $v1, $a0, 0x10
|
|
/* 197B48 80269268 000427C2 */ srl $a0, $a0, 0x1f
|
|
/* 197B4C 8026926C 00641821 */ addu $v1, $v1, $a0
|
|
/* 197B50 80269270 00031843 */ sra $v1, $v1, 1
|
|
/* 197B54 80269274 A6230074 */ sh $v1, 0x74($s1)
|
|
/* 197B58 80269278 8FBF001C */ lw $ra, 0x1c($sp)
|
|
/* 197B5C 8026927C 8FB20018 */ lw $s2, 0x18($sp)
|
|
/* 197B60 80269280 8FB10014 */ lw $s1, 0x14($sp)
|
|
/* 197B64 80269284 8FB00010 */ lw $s0, 0x10($sp)
|
|
/* 197B68 80269288 24020002 */ addiu $v0, $zero, 2
|
|
/* 197B6C 8026928C 03E00008 */ jr $ra
|
|
/* 197B70 80269290 27BD0020 */ addiu $sp, $sp, 0x20
|
|
|