oot/asm/non_matchings/code/z_camera/func_800588B4.s

313 lines
15 KiB
ArmAsm

.rdata
glabel D_80139970
.asciz "camera: water: off\n"
.balign 4
glabel D_80139984
.asciz "kankyo changed water, sound on\n"
.balign 4
glabel D_801399A4
.asciz "kankyo changed water off, sound off\n"
.balign 4
.text
glabel func_800588B4
/* ACFA54 800588B4 27BDFFB0 */ addiu $sp, $sp, -0x50
/* ACFA58 800588B8 AFBF0024 */ sw $ra, 0x24($sp)
/* ACFA5C 800588BC AFB00020 */ sw $s0, 0x20($sp)
/* ACFA60 800588C0 8483014C */ lh $v1, 0x14c($a0)
/* ACFA64 800588C4 00808025 */ move $s0, $a0
/* ACFA68 800588C8 8C820090 */ lw $v0, 0x90($a0)
/* ACFA6C 800588CC 306E0002 */ andi $t6, $v1, 2
/* ACFA70 800588D0 11C0000A */ beqz $t6, .L800588FC
/* ACFA74 800588D4 00000000 */ nop
/* ACFA78 800588D8 848F0142 */ lh $t7, 0x142($a0)
/* ACFA7C 800588DC 3C198012 */ lui $t9, %hi(D_8011D064)
/* ACFA80 800588E0 30690200 */ andi $t1, $v1, 0x200
/* ACFA84 800588E4 000FC0C0 */ sll $t8, $t7, 3
/* ACFA88 800588E8 0338C821 */ addu $t9, $t9, $t8
/* ACFA8C 800588EC 8F39D064 */ lw $t9, %lo(D_8011D064)($t9)
/* ACFA90 800588F0 00194040 */ sll $t0, $t9, 1
/* ACFA94 800588F4 05010003 */ bgez $t0, .L80058904
/* ACFA98 800588F8 00000000 */ nop
.L800588FC:
/* ACFA9C 800588FC 100000F9 */ b .L80058CE4
/* ACFAA0 80058900 00001025 */ move $v0, $zero
.L80058904:
/* ACFAA4 80058904 51200019 */ beql $t1, $zero, .L8005896C
/* ACFAA8 80058908 0003CBC2 */ srl $t9, $v1, 0xf
/* ACFAAC 8005890C 8C4A0680 */ lw $t2, 0x680($v0)
/* ACFAB0 80058910 02002025 */ move $a0, $s0
/* ACFAB4 80058914 24050024 */ li $a1, 36
/* ACFAB8 80058918 314B0800 */ andi $t3, $t2, 0x800
/* ACFABC 8005891C 11600009 */ beqz $t3, .L80058944
/* ACFAC0 80058920 000373C2 */ srl $t6, $v1, 0xf
/* ACFAC4 80058924 0C016952 */ jal func_8005A548
/* ACFAC8 80058928 24060006 */ li $a2, 6
/* ACFACC 8005892C 860C014C */ lh $t4, 0x14c($s0)
/* ACFAD0 80058930 24018000 */ li $at, -32768
/* ACFAD4 80058934 01816825 */ or $t5, $t4, $at
/* ACFAD8 80058938 A60D014C */ sh $t5, 0x14c($s0)
/* ACFADC 8005893C 1000000A */ b .L80058968
/* ACFAE0 80058940 8603014C */ lh $v1, 0x14c($s0)
.L80058944:
/* ACFAE4 80058944 11C00008 */ beqz $t6, .L80058968
/* ACFAE8 80058948 02002025 */ move $a0, $s0
/* ACFAEC 8005894C 8605011E */ lh $a1, 0x11e($s0)
/* ACFAF0 80058950 0C016952 */ jal func_8005A548
/* ACFAF4 80058954 24060006 */ li $a2, 6
/* ACFAF8 80058958 860F014C */ lh $t7, 0x14c($s0)
/* ACFAFC 8005895C 31F87FFF */ andi $t8, $t7, 0x7fff
/* ACFB00 80058960 A618014C */ sh $t8, 0x14c($s0)
/* ACFB04 80058964 8603014C */ lh $v1, 0x14c($s0)
.L80058968:
/* ACFB08 80058968 0003CBC2 */ srl $t9, $v1, 0xf
.L8005896C:
/* ACFB0C 8005896C 17200068 */ bnez $t9, .L80058B10
/* ACFB10 80058970 02002025 */ move $a0, $s0
/* ACFB14 80058974 0C011233 */ jal func_800448CC
/* ACFB18 80058978 27A5004C */ addiu $a1, $sp, 0x4c
/* ACFB1C 8005897C 00021C00 */ sll $v1, $v0, 0x10
/* ACFB20 80058980 00031C03 */ sra $v1, $v1, 0x10
/* ACFB24 80058984 00022C00 */ sll $a1, $v0, 0x10
/* ACFB28 80058988 2401FFFE */ li $at, -2
/* ACFB2C 8005898C 14610024 */ bne $v1, $at, .L80058A20
/* ACFB30 80058990 00052C03 */ sra $a1, $a1, 0x10
/* ACFB34 80058994 8603014C */ lh $v1, 0x14c($s0)
/* ACFB38 80058998 240BFFFF */ li $t3, -1
/* ACFB3C 8005899C 240D0032 */ li $t5, 50
/* ACFB40 800589A0 30680200 */ andi $t0, $v1, 0x200
/* ACFB44 800589A4 15000007 */ bnez $t0, .L800589C4
/* ACFB48 800589A8 34690200 */ ori $t1, $v1, 0x200
/* ACFB4C 800589AC A609014C */ sh $t1, 0x14c($s0)
/* ACFB50 800589B0 C7A4004C */ lwc1 $f4, 0x4c($sp)
/* ACFB54 800589B4 860A0148 */ lh $t2, 0x148($s0)
/* ACFB58 800589B8 A60B0120 */ sh $t3, 0x120($s0)
/* ACFB5C 800589BC E6040114 */ swc1 $f4, 0x114($s0)
/* ACFB60 800589C0 AE0A0118 */ sw $t2, 0x118($s0)
.L800589C4:
/* ACFB64 800589C4 C6060098 */ lwc1 $f6, 0x98($s0)
/* ACFB68 800589C8 C6080104 */ lwc1 $f8, 0x104($s0)
/* ACFB6C 800589CC 02002025 */ move $a0, $s0
/* ACFB70 800589D0 24050005 */ li $a1, 5
/* ACFB74 800589D4 46083032 */ c.eq.s $f6, $f8
/* ACFB78 800589D8 00000000 */ nop
/* ACFB7C 800589DC 4503004D */ bc1tl .L80058B14
/* ACFB80 800589E0 02002025 */ move $a0, $s0
/* ACFB84 800589E4 860C0146 */ lh $t4, 0x146($s0)
/* ACFB88 800589E8 260E011C */ addiu $t6, $s0, 0x11c
/* ACFB8C 800589EC 24060002 */ li $a2, 2
/* ACFB90 800589F0 A7AC0032 */ sh $t4, 0x32($sp)
/* ACFB94 800589F4 A60D0146 */ sh $t5, 0x146($s0)
/* ACFB98 800589F8 0C016952 */ jal func_8005A548
/* ACFB9C 800589FC AFAE002C */ sw $t6, 0x2c($sp)
/* ACFBA0 80058A00 860F0142 */ lh $t7, 0x142($s0)
/* ACFBA4 80058A04 8FB8002C */ lw $t8, 0x2c($sp)
/* ACFBA8 80058A08 2408FFFE */ li $t0, -2
/* ACFBAC 80058A0C AF0F0000 */ sw $t7, ($t8)
/* ACFBB0 80058A10 87B90032 */ lh $t9, 0x32($sp)
/* ACFBB4 80058A14 A6080148 */ sh $t0, 0x148($s0)
/* ACFBB8 80058A18 1000003D */ b .L80058B10
/* ACFBBC 80058A1C A6190146 */ sh $t9, 0x146($s0)
.L80058A20:
/* ACFBC0 80058A20 2401FFFF */ li $at, -1
/* ACFBC4 80058A24 50610021 */ beql $v1, $at, .L80058AAC
/* ACFBC8 80058A28 8609014C */ lh $t1, 0x14c($s0)
/* ACFBCC 80058A2C 8603014C */ lh $v1, 0x14c($s0)
/* ACFBD0 80058A30 240CFFFF */ li $t4, -1
/* ACFBD4 80058A34 240E0032 */ li $t6, 50
/* ACFBD8 80058A38 30690200 */ andi $t1, $v1, 0x200
/* ACFBDC 80058A3C 15200007 */ bnez $t1, .L80058A5C
/* ACFBE0 80058A40 346A0200 */ ori $t2, $v1, 0x200
/* ACFBE4 80058A44 A60A014C */ sh $t2, 0x14c($s0)
/* ACFBE8 80058A48 C7AA004C */ lwc1 $f10, 0x4c($sp)
/* ACFBEC 80058A4C 860B0148 */ lh $t3, 0x148($s0)
/* ACFBF0 80058A50 A60C0120 */ sh $t4, 0x120($s0)
/* ACFBF4 80058A54 E60A0114 */ swc1 $f10, 0x114($s0)
/* ACFBF8 80058A58 AE0B0118 */ sw $t3, 0x118($s0)
.L80058A5C:
/* ACFBFC 80058A5C C6100098 */ lwc1 $f16, 0x98($s0)
/* ACFC00 80058A60 C6120104 */ lwc1 $f18, 0x104($s0)
/* ACFC04 80058A64 46128032 */ c.eq.s $f16, $f18
/* ACFC08 80058A68 00000000 */ nop
/* ACFC0C 80058A6C 45030029 */ bc1tl .L80058B14
/* ACFC10 80058A70 02002025 */ move $a0, $s0
/* ACFC14 80058A74 860D0146 */ lh $t5, 0x146($s0)
/* ACFC18 80058A78 260F011C */ addiu $t7, $s0, 0x11c
/* ACFC1C 80058A7C 02002025 */ move $a0, $s0
/* ACFC20 80058A80 A7AD0032 */ sh $t5, 0x32($sp)
/* ACFC24 80058A84 A60E0146 */ sh $t6, 0x146($s0)
/* ACFC28 80058A88 0C0169EA */ jal func_8005A7A8
/* ACFC2C 80058A8C AFAF002C */ sw $t7, 0x2c($sp)
/* ACFC30 80058A90 86180142 */ lh $t8, 0x142($s0)
/* ACFC34 80058A94 8FB9002C */ lw $t9, 0x2c($sp)
/* ACFC38 80058A98 AF380000 */ sw $t8, ($t9)
/* ACFC3C 80058A9C 87A80032 */ lh $t0, 0x32($sp)
/* ACFC40 80058AA0 1000001B */ b .L80058B10
/* ACFC44 80058AA4 A6080146 */ sh $t0, 0x146($s0)
/* ACFC48 80058AA8 8609014C */ lh $t1, 0x14c($s0)
.L80058AAC:
/* ACFC4C 80058AAC 3C048014 */ lui $a0, %hi(D_80139970) # $a0, 0x8014
/* ACFC50 80058AB0 312A0200 */ andi $t2, $t1, 0x200
/* ACFC54 80058AB4 51400017 */ beql $t2, $zero, .L80058B14
/* ACFC58 80058AB8 02002025 */ move $a0, $s0
/* ACFC5C 80058ABC 0C00084C */ jal osSyncPrintf
/* ACFC60 80058AC0 24849970 */ addiu $a0, %lo(D_80139970) # addiu $a0, $a0, -0x6690
/* ACFC64 80058AC4 860B014C */ lh $t3, 0x14c($s0)
/* ACFC68 80058AC8 860D0146 */ lh $t5, 0x146($s0)
/* ACFC6C 80058ACC 240E0032 */ li $t6, 50
/* ACFC70 80058AD0 316CFDFF */ andi $t4, $t3, 0xfdff
/* ACFC74 80058AD4 A60C014C */ sh $t4, 0x14c($s0)
/* ACFC78 80058AD8 A7AD0032 */ sh $t5, 0x32($sp)
/* ACFC7C 80058ADC 8E050118 */ lw $a1, 0x118($s0)
/* ACFC80 80058AE0 A60E0146 */ sh $t6, 0x146($s0)
/* ACFC84 80058AE4 04A10006 */ bgez $a1, .L80058B00
/* ACFC88 80058AE8 00000000 */ nop
/* ACFC8C 80058AEC 0C015FF1 */ jal func_80057FC4
/* ACFC90 80058AF0 02002025 */ move $a0, $s0
/* ACFC94 80058AF4 240FFFFF */ li $t7, -1
/* ACFC98 80058AF8 10000003 */ b .L80058B08
/* ACFC9C 80058AFC A60F0148 */ sh $t7, 0x148($s0)
.L80058B00:
/* ACFCA0 80058B00 0C0169EA */ jal func_8005A7A8
/* ACFCA4 80058B04 02002025 */ move $a0, $s0
.L80058B08:
/* ACFCA8 80058B08 87B80032 */ lh $t8, 0x32($sp)
/* ACFCAC 80058B0C A6180146 */ sh $t8, 0x146($s0)
.L80058B10:
/* ACFCB0 80058B10 02002025 */ move $a0, $s0
.L80058B14:
/* ACFCB4 80058B14 2605005C */ addiu $a1, $s0, 0x5c
/* ACFCB8 80058B18 0C01126B */ jal func_800449AC
/* ACFCBC 80058B1C 27A60044 */ addiu $a2, $sp, 0x44
/* ACFCC0 80058B20 3C01C6FA */ li $at, 0xC6FA0000 # 0.000000
/* ACFCC4 80058B24 44812000 */ mtc1 $at, $f4
/* ACFCC8 80058B28 E7A0004C */ swc1 $f0, 0x4c($sp)
/* ACFCCC 80058B2C 46040032 */ c.eq.s $f0, $f4
/* ACFCD0 80058B30 00000000 */ nop
/* ACFCD4 80058B34 45030056 */ bc1tl .L80058C90
/* ACFCD8 80058B38 8603014C */ lh $v1, 0x14c($s0)
/* ACFCDC 80058B3C 8603014C */ lh $v1, 0x14c($s0)
/* ACFCE0 80058B40 E6000114 */ swc1 $f0, 0x114($s0)
/* ACFCE4 80058B44 26190120 */ addiu $t9, $s0, 0x120
/* ACFCE8 80058B48 30680100 */ andi $t0, $v1, 0x100
/* ACFCEC 80058B4C 1500000B */ bnez $t0, .L80058B7C
/* ACFCF0 80058B50 AFB9002C */ sw $t9, 0x2c($sp)
/* ACFCF4 80058B54 34690100 */ ori $t1, $v1, 0x100
/* ACFCF8 80058B58 3C048014 */ lui $a0, %hi(D_80139984) # $a0, 0x8014
/* ACFCFC 80058B5C A609014C */ sh $t1, 0x14c($s0)
/* ACFD00 80058B60 0C00084C */ jal osSyncPrintf
/* ACFD04 80058B64 24849984 */ addiu $a0, %lo(D_80139984) # addiu $a0, $a0, -0x667c
/* ACFD08 80058B68 8E04008C */ lw $a0, 0x8c($s0)
/* ACFD0C 80058B6C 0C01C180 */ jal func_80070600
/* ACFD10 80058B70 8FA50044 */ lw $a1, 0x44($sp)
/* ACFD14 80058B74 240A0050 */ li $t2, 80
/* ACFD18 80058B78 A60A0150 */ sh $t2, 0x150($s0)
.L80058B7C:
/* ACFD1C 80058B7C 0C03DA0A */ jal func_800F6828
/* ACFD20 80058B80 24040020 */ li $a0, 32
/* ACFD24 80058B84 3C0B8016 */ lui $t3, %hi(gGameInfo) # $t3, 0x8016
/* ACFD28 80058B88 8D6BFA90 */ lw $t3, %lo(gGameInfo)($t3)
/* ACFD2C 80058B8C 8FAD002C */ lw $t5, 0x2c($sp)
/* ACFD30 80058B90 856C02F6 */ lh $t4, 0x2f6($t3)
/* ACFD34 80058B94 5180000A */ beql $t4, $zero, .L80058BC0
/* ACFD38 80058B98 8FB9002C */ lw $t9, 0x2c($sp)
/* ACFD3C 80058B9C 0C024BEB */ jal func_80092FAC
/* ACFD40 80058BA0 85A40000 */ lh $a0, ($t5)
/* ACFD44 80058BA4 8FAF002C */ lw $t7, 0x2c($sp)
/* ACFD48 80058BA8 240EFFFF */ li $t6, -1
/* ACFD4C 80058BAC 3C188016 */ lui $t8, %hi(gGameInfo) # $t8, 0x8016
/* ACFD50 80058BB0 A5EE0000 */ sh $t6, ($t7)
/* ACFD54 80058BB4 8F18FA90 */ lw $t8, %lo(gGameInfo)($t8)
/* ACFD58 80058BB8 A70002F6 */ sh $zero, 0x2f6($t8)
/* ACFD5C 80058BBC 8FB9002C */ lw $t9, 0x2c($sp)
.L80058BC0:
/* ACFD60 80058BC0 2401FFFF */ li $at, -1
/* ACFD64 80058BC4 87240000 */ lh $a0, ($t9)
/* ACFD68 80058BC8 50810006 */ beql $a0, $at, .L80058BE4
/* ACFD6C 80058BCC 02002025 */ move $a0, $s0
/* ACFD70 80058BD0 0C024B8F */ jal func_80092E3C
/* ACFD74 80058BD4 00000000 */ nop
/* ACFD78 80058BD8 2401000A */ li $at, 10
/* ACFD7C 80058BDC 14410015 */ bne $v0, $at, .L80058C34
/* ACFD80 80058BE0 02002025 */ move $a0, $s0
.L80058BE4:
/* ACFD84 80058BE4 0C024BE2 */ jal func_80092F88
/* ACFD88 80058BE8 24050005 */ li $a1, 5
/* ACFD8C 80058BEC 8FA8002C */ lw $t0, 0x2c($sp)
/* ACFD90 80058BF0 10400010 */ beqz $v0, .L80058C34
/* ACFD94 80058BF4 A5020000 */ sh $v0, ($t0)
/* ACFD98 80058BF8 8FA9002C */ lw $t1, 0x2c($sp)
/* ACFD9C 80058BFC 24050226 */ li $a1, 550
/* ACFDA0 80058C00 0C024B6B */ jal func_80092DAC
/* ACFDA4 80058C04 85240000 */ lh $a0, ($t1)
/* ACFDA8 80058C08 8FAA002C */ lw $t2, 0x2c($sp)
/* ACFDAC 80058C0C 24050001 */ li $a1, 1
/* ACFDB0 80058C10 24060001 */ li $a2, 1
/* ACFDB4 80058C14 85440000 */ lh $a0, ($t2)
/* ACFDB8 80058C18 AFA00010 */ sw $zero, 0x10($sp)
/* ACFDBC 80058C1C 0C024B9C */ jal func_80092E70
/* ACFDC0 80058C20 240700B4 */ li $a3, 180
/* ACFDC4 80058C24 8FAB002C */ lw $t3, 0x2c($sp)
/* ACFDC8 80058C28 240503E8 */ li $a1, 1000
/* ACFDCC 80058C2C 0C024B7C */ jal func_80092DF0
/* ACFDD0 80058C30 85640000 */ lh $a0, ($t3)
.L80058C34:
/* ACFDD4 80058C34 86020150 */ lh $v0, 0x150($s0)
/* ACFDD8 80058C38 58400008 */ blezl $v0, .L80058C5C
/* ACFDDC 80058C3C 8E0F008C */ lw $t7, 0x8c($s0)
/* ACFDE0 80058C40 860D0152 */ lh $t5, 0x152($s0)
/* ACFDE4 80058C44 244CFFFF */ addiu $t4, $v0, -1
/* ACFDE8 80058C48 A60C0150 */ sh $t4, 0x150($s0)
/* ACFDEC 80058C4C 35AE0008 */ ori $t6, $t5, 8
/* ACFDF0 80058C50 10000024 */ b .L80058CE4
/* ACFDF4 80058C54 A60E0152 */ sh $t6, 0x152($s0)
/* ACFDF8 80058C58 8E0F008C */ lw $t7, 0x8c($s0)
.L80058C5C:
/* ACFDFC 80058C5C 24010049 */ li $at, 73
/* ACFE00 80058C60 85F800A4 */ lh $t8, 0xa4($t7)
/* ACFE04 80058C64 57010006 */ bnel $t8, $at, .L80058C80
/* ACFE08 80058C68 86090152 */ lh $t1, 0x152($s0)
/* ACFE0C 80058C6C 86190152 */ lh $t9, 0x152($s0)
/* ACFE10 80058C70 37280010 */ ori $t0, $t9, 0x10
/* ACFE14 80058C74 1000001B */ b .L80058CE4
/* ACFE18 80058C78 A6080152 */ sh $t0, 0x152($s0)
/* ACFE1C 80058C7C 86090152 */ lh $t1, 0x152($s0)
.L80058C80:
/* ACFE20 80058C80 352A0002 */ ori $t2, $t1, 2
/* ACFE24 80058C84 10000017 */ b .L80058CE4
/* ACFE28 80058C88 A60A0152 */ sh $t2, 0x152($s0)
/* ACFE2C 80058C8C 8603014C */ lh $v1, 0x14c($s0)
.L80058C90:
/* ACFE30 80058C90 3C048014 */ lui $a0, %hi(D_801399A4) # $a0, 0x8014
/* ACFE34 80058C94 248499A4 */ addiu $a0, %lo(D_801399A4) # addiu $a0, $a0, -0x665c
/* ACFE38 80058C98 306B0100 */ andi $t3, $v1, 0x100
/* ACFE3C 80058C9C 1160000F */ beqz $t3, .L80058CDC
/* ACFE40 80058CA0 306CFEFF */ andi $t4, $v1, 0xfeff
/* ACFE44 80058CA4 A60C014C */ sh $t4, 0x14c($s0)
/* ACFE48 80058CA8 260D0120 */ addiu $t5, $s0, 0x120
/* ACFE4C 80058CAC 0C00084C */ jal osSyncPrintf
/* ACFE50 80058CB0 AFAD002C */ sw $t5, 0x2c($sp)
/* ACFE54 80058CB4 0C01C1A8 */ jal func_800706A0
/* ACFE58 80058CB8 8E04008C */ lw $a0, 0x8c($s0)
/* ACFE5C 80058CBC 8FAE002C */ lw $t6, 0x2c($sp)
/* ACFE60 80058CC0 85C40000 */ lh $a0, ($t6)
/* ACFE64 80058CC4 50800004 */ beql $a0, $zero, .L80058CD8
/* ACFE68 80058CC8 A6000150 */ sh $zero, 0x150($s0)
/* ACFE6C 80058CCC 0C024BEB */ jal func_80092FAC
/* ACFE70 80058CD0 00000000 */ nop
/* ACFE74 80058CD4 A6000150 */ sh $zero, 0x150($s0)
.L80058CD8:
/* ACFE78 80058CD8 A6000152 */ sh $zero, 0x152($s0)
.L80058CDC:
/* ACFE7C 80058CDC 0C03DA0A */ jal func_800F6828
/* ACFE80 80058CE0 00002025 */ move $a0, $zero
.L80058CE4:
/* ACFE84 80058CE4 8FBF0024 */ lw $ra, 0x24($sp)
/* ACFE88 80058CE8 8FB00020 */ lw $s0, 0x20($sp)
/* ACFE8C 80058CEC 27BD0050 */ addiu $sp, $sp, 0x50
/* ACFE90 80058CF0 03E00008 */ jr $ra
/* ACFE94 80058CF4 00000000 */ nop