mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 09:45:02 +00:00
140 lines
6.1 KiB
ArmAsm
140 lines
6.1 KiB
ArmAsm
.include "macro.inc"
|
|
|
|
# assembler directives
|
|
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
.set gp=64 # allow use of 64-bit general purposee registers
|
|
|
|
.section .text
|
|
|
|
.align 4
|
|
|
|
glabel func_80103010
|
|
/* B7A1B0 80103010 27BDFF88 */ addiu $sp, $sp, -0x78
|
|
/* B7A1B4 80103014 AFBF003C */ sw $ra, 0x3c($sp)
|
|
/* B7A1B8 80103018 AFBE0038 */ sw $fp, 0x38($sp)
|
|
/* B7A1BC 8010301C AFB70034 */ sw $s7, 0x34($sp)
|
|
/* B7A1C0 80103020 AFB60030 */ sw $s6, 0x30($sp)
|
|
/* B7A1C4 80103024 AFB5002C */ sw $s5, 0x2c($sp)
|
|
/* B7A1C8 80103028 AFB40028 */ sw $s4, 0x28($sp)
|
|
/* B7A1CC 8010302C AFB30024 */ sw $s3, 0x24($sp)
|
|
/* B7A1D0 80103030 AFB20020 */ sw $s2, 0x20($sp)
|
|
/* B7A1D4 80103034 AFB1001C */ sw $s1, 0x1c($sp)
|
|
/* B7A1D8 80103038 AFB00018 */ sw $s0, 0x18($sp)
|
|
/* B7A1DC 8010303C AFA5007C */ sw $a1, 0x7c($sp)
|
|
/* B7A1E0 80103040 8C8E0000 */ lw $t6, ($a0)
|
|
/* B7A1E4 80103044 00809025 */ move $s2, $a0
|
|
/* B7A1E8 80103048 00E0A825 */ move $s5, $a3
|
|
/* B7A1EC 8010304C 31CF0001 */ andi $t7, $t6, 1
|
|
/* B7A1F0 80103050 30B7FFFF */ andi $s7, $a1, 0xffff
|
|
/* B7A1F4 80103054 15E00003 */ bnez $t7, .L80103064
|
|
/* B7A1F8 80103058 00C0F025 */ move $fp, $a2
|
|
/* B7A1FC 8010305C 10000051 */ b .L801031A4
|
|
/* B7A200 80103060 24020005 */ li $v0, 5
|
|
.L80103064:
|
|
/* B7A204 80103064 0C040AFC */ jal func_80102BF0
|
|
/* B7A208 80103068 02402025 */ move $a0, $s2
|
|
/* B7A20C 8010306C 50400004 */ beql $v0, $zero, .L80103080
|
|
/* B7A210 80103070 8E580050 */ lw $t8, 0x50($s2)
|
|
/* B7A214 80103074 1000004C */ b .L801031A8
|
|
/* B7A218 80103078 8FBF003C */ lw $ra, 0x3c($sp)
|
|
/* B7A21C 8010307C 8E580050 */ lw $t8, 0x50($s2)
|
|
.L80103080:
|
|
/* B7A220 80103080 00009825 */ move $s3, $zero
|
|
/* B7A224 80103084 27B60050 */ addiu $s6, $sp, 0x50
|
|
/* B7A228 80103088 1B000042 */ blez $t8, .L80103194
|
|
/* B7A22C 8010308C 8FB40088 */ lw $s4, 0x88($sp)
|
|
/* B7A230 80103090 27B10060 */ addiu $s1, $sp, 0x60
|
|
/* B7A234 80103094 27B00054 */ addiu $s0, $sp, 0x54
|
|
/* B7A238 80103098 8E59005C */ lw $t9, 0x5c($s2)
|
|
.L8010309C:
|
|
/* B7A23C 8010309C 8E440004 */ lw $a0, 4($s2)
|
|
/* B7A240 801030A0 8E450008 */ lw $a1, 8($s2)
|
|
/* B7A244 801030A4 03333021 */ addu $a2, $t9, $s3
|
|
/* B7A248 801030A8 30C8FFFF */ andi $t0, $a2, 0xffff
|
|
/* B7A24C 801030AC 01003025 */ move $a2, $t0
|
|
/* B7A250 801030B0 0C0417D0 */ jal func_80105F40
|
|
/* B7A254 801030B4 02C03825 */ move $a3, $s6
|
|
/* B7A258 801030B8 50400004 */ beql $v0, $zero, .L801030CC
|
|
/* B7A25C 801030BC 8E440004 */ lw $a0, 4($s2)
|
|
/* B7A260 801030C0 10000039 */ b .L801031A8
|
|
/* B7A264 801030C4 8FBF003C */ lw $ra, 0x3c($sp)
|
|
/* B7A268 801030C8 8E440004 */ lw $a0, 4($s2)
|
|
.L801030CC:
|
|
/* B7A26C 801030CC 0C040644 */ jal func_80101910
|
|
/* B7A270 801030D0 8E450008 */ lw $a1, 8($s2)
|
|
/* B7A274 801030D4 10400003 */ beqz $v0, .L801030E4
|
|
/* B7A278 801030D8 00403025 */ move $a2, $v0
|
|
/* B7A27C 801030DC 10000032 */ b .L801031A8
|
|
/* B7A280 801030E0 8FBF003C */ lw $ra, 0x3c($sp)
|
|
.L801030E4:
|
|
/* B7A284 801030E4 97A90054 */ lhu $t1, 0x54($sp)
|
|
/* B7A288 801030E8 8FAA0050 */ lw $t2, 0x50($sp)
|
|
/* B7A28C 801030EC 56E90025 */ bnel $s7, $t1, .L80103184
|
|
/* B7A290 801030F0 8E580050 */ lw $t8, 0x50($s2)
|
|
/* B7A294 801030F4 555E0023 */ bnel $t2, $fp, .L80103184
|
|
/* B7A298 801030F8 8E580050 */ lw $t8, 0x50($s2)
|
|
/* B7A29C 801030FC 12A0000C */ beqz $s5, .L80103130
|
|
/* B7A2A0 80103100 00002025 */ move $a0, $zero
|
|
/* B7A2A4 80103104 27A20050 */ addiu $v0, $sp, 0x50
|
|
/* B7A2A8 80103108 02A01825 */ move $v1, $s5
|
|
.L8010310C:
|
|
/* B7A2AC 8010310C 904B0010 */ lbu $t3, 0x10($v0)
|
|
/* B7A2B0 80103110 906C0000 */ lbu $t4, ($v1)
|
|
/* B7A2B4 80103114 24420001 */ addiu $v0, $v0, 1
|
|
/* B7A2B8 80103118 116C0003 */ beq $t3, $t4, .L80103128
|
|
/* B7A2BC 8010311C 00000000 */ nop
|
|
/* B7A2C0 80103120 10000003 */ b .L80103130
|
|
/* B7A2C4 80103124 24040001 */ li $a0, 1
|
|
.L80103128:
|
|
/* B7A2C8 80103128 1451FFF8 */ bne $v0, $s1, .L8010310C
|
|
/* B7A2CC 8010312C 24630001 */ addiu $v1, $v1, 1
|
|
.L80103130:
|
|
/* B7A2D0 80103130 1280000D */ beqz $s4, .L80103168
|
|
/* B7A2D4 80103134 00000000 */ nop
|
|
/* B7A2D8 80103138 1480000B */ bnez $a0, .L80103168
|
|
/* B7A2DC 8010313C 27A20050 */ addiu $v0, $sp, 0x50
|
|
/* B7A2E0 80103140 02801825 */ move $v1, $s4
|
|
.L80103144:
|
|
/* B7A2E4 80103144 904D000C */ lbu $t5, 0xc($v0)
|
|
/* B7A2E8 80103148 906E0000 */ lbu $t6, ($v1)
|
|
/* B7A2EC 8010314C 24420001 */ addiu $v0, $v0, 1
|
|
/* B7A2F0 80103150 11AE0003 */ beq $t5, $t6, .L80103160
|
|
/* B7A2F4 80103154 00000000 */ nop
|
|
/* B7A2F8 80103158 10000003 */ b .L80103168
|
|
/* B7A2FC 8010315C 24040001 */ li $a0, 1
|
|
.L80103160:
|
|
/* B7A300 80103160 1450FFF8 */ bne $v0, $s0, .L80103144
|
|
/* B7A304 80103164 24630001 */ addiu $v1, $v1, 1
|
|
.L80103168:
|
|
/* B7A308 80103168 54800006 */ bnezl $a0, .L80103184
|
|
/* B7A30C 8010316C 8E580050 */ lw $t8, 0x50($s2)
|
|
/* B7A310 80103170 8FAF008C */ lw $t7, 0x8c($sp)
|
|
/* B7A314 80103174 00C01025 */ move $v0, $a2
|
|
/* B7A318 80103178 1000000A */ b .L801031A4
|
|
/* B7A31C 8010317C ADF30000 */ sw $s3, ($t7)
|
|
/* B7A320 80103180 8E580050 */ lw $t8, 0x50($s2)
|
|
.L80103184:
|
|
/* B7A324 80103184 26730001 */ addiu $s3, $s3, 1
|
|
/* B7A328 80103188 0278082A */ slt $at, $s3, $t8
|
|
/* B7A32C 8010318C 5420FFC3 */ bnezl $at, .L8010309C
|
|
/* B7A330 80103190 8E59005C */ lw $t9, 0x5c($s2)
|
|
.L80103194:
|
|
/* B7A334 80103194 8FA8008C */ lw $t0, 0x8c($sp)
|
|
/* B7A338 80103198 2419FFFF */ li $t9, -1
|
|
/* B7A33C 8010319C 24020005 */ li $v0, 5
|
|
/* B7A340 801031A0 AD190000 */ sw $t9, ($t0)
|
|
.L801031A4:
|
|
/* B7A344 801031A4 8FBF003C */ lw $ra, 0x3c($sp)
|
|
.L801031A8:
|
|
/* B7A348 801031A8 8FB00018 */ lw $s0, 0x18($sp)
|
|
/* B7A34C 801031AC 8FB1001C */ lw $s1, 0x1c($sp)
|
|
/* B7A350 801031B0 8FB20020 */ lw $s2, 0x20($sp)
|
|
/* B7A354 801031B4 8FB30024 */ lw $s3, 0x24($sp)
|
|
/* B7A358 801031B8 8FB40028 */ lw $s4, 0x28($sp)
|
|
/* B7A35C 801031BC 8FB5002C */ lw $s5, 0x2c($sp)
|
|
/* B7A360 801031C0 8FB60030 */ lw $s6, 0x30($sp)
|
|
/* B7A364 801031C4 8FB70034 */ lw $s7, 0x34($sp)
|
|
/* B7A368 801031C8 8FBE0038 */ lw $fp, 0x38($sp)
|
|
/* B7A36C 801031CC 03E00008 */ jr $ra
|
|
/* B7A370 801031D0 27BD0078 */ addiu $sp, $sp, 0x78
|