.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel func_80027E10 /* 3210 80027E10 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 3214 80027E14 3C040050 */ lui $a0, 0x50 /* 3218 80027E18 3C0C800A */ lui $t4, 0x800a /* 321C 80027E1C 258CA66C */ addiu $t4, $t4, -0x5994 /* 3220 80027E20 348403C0 */ ori $a0, $a0, 0x3c0 /* 3224 80027E24 3C02ED00 */ lui $v0, 0xed00 /* 3228 80027E28 AFBF0044 */ sw $ra, 0x44($sp) /* 322C 80027E2C AFBE0040 */ sw $fp, 0x40($sp) /* 3230 80027E30 AFB7003C */ sw $s7, 0x3c($sp) /* 3234 80027E34 AFB60038 */ sw $s6, 0x38($sp) /* 3238 80027E38 AFB50034 */ sw $s5, 0x34($sp) /* 323C 80027E3C AFB40030 */ sw $s4, 0x30($sp) /* 3240 80027E40 AFB3002C */ sw $s3, 0x2c($sp) /* 3244 80027E44 AFB20028 */ sw $s2, 0x28($sp) /* 3248 80027E48 AFB10024 */ sw $s1, 0x24($sp) /* 324C 80027E4C AFB00020 */ sw $s0, 0x20($sp) /* 3250 80027E50 8D8B0000 */ lw $t3, ($t4) /* 3254 80027E54 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 3258 80027E58 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 325C 80027E5C 0160182D */ daddu $v1, $t3, $zero /* 3260 80027E60 256B0008 */ addiu $t3, $t3, 8 /* 3264 80027E64 AD8B0000 */ sw $t3, ($t4) /* 3268 80027E68 AC640004 */ sw $a0, 4($v1) /* 326C 80027E6C 3C04800B */ lui $a0, %hi(gCameras) /* 3270 80027E70 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* 3274 80027E74 AC620000 */ sw $v0, ($v1) /* 3278 80027E78 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 327C 80027E7C 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3280 80027E80 8E0D0000 */ lw $t5, ($s0) /* 3284 80027E84 00031080 */ sll $v0, $v1, 2 /* 3288 80027E88 00431021 */ addu $v0, $v0, $v1 /* 328C 80027E8C 00021080 */ sll $v0, $v0, 2 /* 3290 80027E90 00431023 */ subu $v0, $v0, $v1 /* 3294 80027E94 000218C0 */ sll $v1, $v0, 3 /* 3298 80027E98 00431021 */ addu $v0, $v0, $v1 /* 329C 80027E9C 000210C0 */ sll $v0, $v0, 3 /* 32A0 80027EA0 00449821 */ addu $s3, $v0, $a0 /* 32A4 80027EA4 95A30148 */ lhu $v1, 0x148($t5) /* 32A8 80027EA8 24020020 */ addiu $v0, $zero, 0x20 /* 32AC 80027EAC 306300F0 */ andi $v1, $v1, 0xf0 /* 32B0 80027EB0 1062004E */ beq $v1, $v0, .L80027FEC /* 32B4 80027EB4 28620021 */ slti $v0, $v1, 0x21 /* 32B8 80027EB8 10400005 */ beqz $v0, .L80027ED0 /* 32BC 80027EBC 24020010 */ addiu $v0, $zero, 0x10 /* 32C0 80027EC0 10620008 */ beq $v1, $v0, .L80027EE4 /* 32C4 80027EC4 3C03FF10 */ lui $v1, 0xff10 /* 32C8 80027EC8 0800A0CB */ j .L8002832C /* 32CC 80027ECC 00000000 */ nop .L80027ED0: /* 32D0 80027ED0 24020030 */ addiu $v0, $zero, 0x30 /* 32D4 80027ED4 10620053 */ beq $v1, $v0, .L80028024 /* 32D8 80027ED8 00000000 */ nop /* 32DC 80027EDC 0800A0CB */ j .L8002832C /* 32E0 80027EE0 00000000 */ nop .L80027EE4: /* 32E4 80027EE4 3463013F */ ori $v1, $v1, 0x13f /* 32E8 80027EE8 3C06E300 */ lui $a2, 0xe300 /* 32EC 80027EEC 34C60A01 */ ori $a2, $a2, 0xa01 /* 32F0 80027EF0 3C078080 */ lui $a3, 0x8080 /* 32F4 80027EF4 34E780FF */ ori $a3, $a3, 0x80ff /* 32F8 80027EF8 3C05E200 */ lui $a1, 0xe200 /* 32FC 80027EFC 34A51D00 */ ori $a1, $a1, 0x1d00 /* 3300 80027F00 3C0AE200 */ lui $t2, 0xe200 /* 3304 80027F04 354A001C */ ori $t2, $t2, 0x1c /* 3308 80027F08 3C090FA5 */ lui $t1, 0xfa5 /* 330C 80027F0C 35294040 */ ori $t1, $t1, 0x4040 /* 3310 80027F10 3C08F650 */ lui $t0, 0xf650 /* 3314 80027F14 350803C0 */ ori $t0, $t0, 0x3c0 /* 3318 80027F18 25620008 */ addiu $v0, $t3, 8 /* 331C 80027F1C 3C04E700 */ lui $a0, 0xe700 /* 3320 80027F20 AD820000 */ sw $v0, ($t4) /* 3324 80027F24 25620010 */ addiu $v0, $t3, 0x10 /* 3328 80027F28 AD640000 */ sw $a0, ($t3) /* 332C 80027F2C AD600004 */ sw $zero, 4($t3) /* 3330 80027F30 AD820000 */ sw $v0, ($t4) /* 3334 80027F34 25620018 */ addiu $v0, $t3, 0x18 /* 3338 80027F38 AD630008 */ sw $v1, 8($t3) /* 333C 80027F3C AD820000 */ sw $v0, ($t4) /* 3340 80027F40 25620020 */ addiu $v0, $t3, 0x20 /* 3344 80027F44 AD820000 */ sw $v0, ($t4) /* 3348 80027F48 25620028 */ addiu $v0, $t3, 0x28 /* 334C 80027F4C AD820000 */ sw $v0, ($t4) /* 3350 80027F50 25620030 */ addiu $v0, $t3, 0x30 /* 3354 80027F54 AD820000 */ sw $v0, ($t4) /* 3358 80027F58 25620038 */ addiu $v0, $t3, 0x38 /* 335C 80027F5C AD820000 */ sw $v0, ($t4) /* 3360 80027F60 3C03800A */ lui $v1, 0x800a /* 3364 80027F64 8C63A658 */ lw $v1, -0x59a8($v1) /* 3368 80027F68 25620040 */ addiu $v0, $t3, 0x40 /* 336C 80027F6C AD820000 */ sw $v0, ($t4) /* 3370 80027F70 8C630004 */ lw $v1, 4($v1) /* 3374 80027F74 25620048 */ addiu $v0, $t3, 0x48 /* 3378 80027F78 AD820000 */ sw $v0, ($t4) /* 337C 80027F7C 3C02F900 */ lui $v0, 0xf900 /* 3380 80027F80 AD620018 */ sw $v0, 0x18($t3) /* 3384 80027F84 3C02EE00 */ lui $v0, 0xee00 /* 3388 80027F88 AD620020 */ sw $v0, 0x20($t3) /* 338C 80027F8C 2402FFFF */ addiu $v0, $zero, -1 /* 3390 80027F90 AD620024 */ sw $v0, 0x24($t3) /* 3394 80027F94 24020004 */ addiu $v0, $zero, 4 /* 3398 80027F98 AD660010 */ sw $a2, 0x10($t3) /* 339C 80027F9C AD600014 */ sw $zero, 0x14($t3) /* 33A0 80027FA0 AD67001C */ sw $a3, 0x1c($t3) /* 33A4 80027FA4 AD650028 */ sw $a1, 0x28($t3) /* 33A8 80027FA8 AD62002C */ sw $v0, 0x2c($t3) /* 33AC 80027FAC AD6A0030 */ sw $t2, 0x30($t3) /* 33B0 80027FB0 AD690034 */ sw $t1, 0x34($t3) /* 33B4 80027FB4 AD680038 */ sw $t0, 0x38($t3) /* 33B8 80027FB8 AD60003C */ sw $zero, 0x3c($t3) /* 33BC 80027FBC AD640040 */ sw $a0, 0x40($t3) /* 33C0 80027FC0 AD600044 */ sw $zero, 0x44($t3) /* 33C4 80027FC4 AD650048 */ sw $a1, 0x48($t3) /* 33C8 80027FC8 AD60004C */ sw $zero, 0x4c($t3) /* 33CC 80027FCC AD63000C */ sw $v1, 0xc($t3) /* 33D0 80027FD0 95A20148 */ lhu $v0, 0x148($t5) /* 33D4 80027FD4 25630050 */ addiu $v1, $t3, 0x50 /* 33D8 80027FD8 AD830000 */ sw $v1, ($t4) /* 33DC 80027FDC 3042FF0F */ andi $v0, $v0, 0xff0f /* 33E0 80027FE0 34420020 */ ori $v0, $v0, 0x20 /* 33E4 80027FE4 0800A1E4 */ j .L80028790 /* 33E8 80027FE8 A5A20148 */ sh $v0, 0x148($t5) .L80027FEC: /* 33EC 80027FEC 3C02800A */ lui $v0, 0x800a /* 33F0 80027FF0 8C42A658 */ lw $v0, -0x59a8($v0) /* 33F4 80027FF4 3C06800A */ lui $a2, 0x800a /* 33F8 80027FF8 8CC6A5DC */ lw $a2, -0x5a24($a2) /* 33FC 80027FFC 8C440000 */ lw $a0, ($v0) /* 3400 80028000 0C009E6D */ jal func_800279B4 /* 3404 80028004 8C450004 */ lw $a1, 4($v0) /* 3408 80028008 8E030000 */ lw $v1, ($s0) /* 340C 8002800C 94620148 */ lhu $v0, 0x148($v1) /* 3410 80028010 3C018007 */ lui $at, 0x8007 /* 3414 80028014 AC2041F8 */ sw $zero, 0x41f8($at) /* 3418 80028018 3042FF0F */ andi $v0, $v0, 0xff0f /* 341C 8002801C 34420030 */ ori $v0, $v0, 0x30 /* 3420 80028020 A4620148 */ sh $v0, 0x148($v1) .L80028024: /* 3424 80028024 3C168007 */ lui $s6, 0x8007 /* 3428 80028028 26D641F8 */ addiu $s6, $s6, 0x41f8 /* 342C 8002802C 8EC20000 */ lw $v0, ($s6) /* 3430 80028030 24420010 */ addiu $v0, $v0, 0x10 /* 3434 80028034 AEC20000 */ sw $v0, ($s6) /* 3438 80028038 28420081 */ slti $v0, $v0, 0x81 /* 343C 8002803C 14400003 */ bnez $v0, .L8002804C /* 3440 80028040 3C060050 */ lui $a2, 0x50 /* 3444 80028044 24020080 */ addiu $v0, $zero, 0x80 /* 3448 80028048 AEC20000 */ sw $v0, ($s6) .L8002804C: /* 344C 8002804C 34C603C0 */ ori $a2, $a2, 0x3c0 /* 3450 80028050 3C05E300 */ lui $a1, 0xe300 /* 3454 80028054 34A50A01 */ ori $a1, $a1, 0xa01 /* 3458 80028058 3C07E200 */ lui $a3, 0xe200 /* 345C 8002805C 34E7001C */ ori $a3, $a3, 0x1c /* 3460 80028060 3C08FF10 */ lui $t0, 0xff10 /* 3464 80028064 3508013F */ ori $t0, $t0, 0x13f /* 3468 80028068 3C090001 */ lui $t1, 1 /* 346C 8002806C 35290001 */ ori $t1, $t1, 1 /* 3470 80028070 3C0AF64F */ lui $t2, 0xf64f /* 3474 80028074 354AC3BC */ ori $t2, $t2, 0xc3bc /* 3478 80028078 3C0BE300 */ lui $t3, 0xe300 /* 347C 8002807C 356B0C00 */ ori $t3, $t3, 0xc00 /* 3480 80028080 3C0CE300 */ lui $t4, 0xe300 /* 3484 80028084 358C1001 */ ori $t4, $t4, 0x1001 /* 3488 80028088 3C0D0F0A */ lui $t5, 0xf0a /* 348C 8002808C 35AD4000 */ ori $t5, $t5, 0x4000 /* 3490 80028090 3C0FFC35 */ lui $t7, 0xfc35 /* 3494 80028094 35EF7E6A */ ori $t7, $t7, 0x7e6a /* 3498 80028098 3C0E12FC */ lui $t6, 0x12fc /* 349C 8002809C 35CEFCBE */ ori $t6, $t6, 0xfcbe /* 34A0 800280A0 3C112828 */ lui $s1, 0x2828 /* 34A4 800280A4 36312800 */ ori $s1, $s1, 0x2800 /* 34A8 800280A8 3C10E300 */ lui $s0, 0xe300 /* 34AC 800280AC 36101201 */ ori $s0, $s0, 0x1201 /* 34B0 800280B0 0000C82D */ daddu $t9, $zero, $zero /* 34B4 800280B4 3C02800A */ lui $v0, 0x800a /* 34B8 800280B8 2442A66C */ addiu $v0, $v0, -0x5994 /* 34BC 800280BC 0040902D */ daddu $s2, $v0, $zero /* 34C0 800280C0 AFAE0018 */ sw $t6, 0x18($sp) /* 34C4 800280C4 3C0EFD10 */ lui $t6, 0xfd10 /* 34C8 800280C8 35CE013F */ ori $t6, $t6, 0x13f /* 34CC 800280CC 3C15F510 */ lui $s5, 0xf510 /* 34D0 800280D0 36B5A000 */ ori $s5, $s5, 0xa000 /* 34D4 800280D4 AFAE0010 */ sw $t6, 0x10($sp) /* 34D8 800280D8 3C0E074F */ lui $t6, 0x74f /* 34DC 800280DC 35CEC014 */ ori $t6, $t6, 0xc014 /* 34E0 800280E0 3C17E700 */ lui $s7, 0xe700 /* 34E4 800280E4 3C1E004F */ lui $fp, 0x4f /* 34E8 800280E8 37DEC014 */ ori $fp, $fp, 0xc014 /* 34EC 800280EC 0320C02D */ daddu $t8, $t9, $zero /* 34F0 800280F0 24140018 */ addiu $s4, $zero, 0x18 /* 34F4 800280F4 0320982D */ daddu $s3, $t9, $zero /* 34F8 800280F8 AFAE0014 */ sw $t6, 0x14($sp) /* 34FC 800280FC 8E420000 */ lw $v0, ($s2) /* 3500 80028100 02E0182D */ daddu $v1, $s7, $zero /* 3504 80028104 0040202D */ daddu $a0, $v0, $zero /* 3508 80028108 24420008 */ addiu $v0, $v0, 8 /* 350C 8002810C AE420000 */ sw $v0, ($s2) /* 3510 80028110 AC830000 */ sw $v1, ($a0) /* 3514 80028114 24430008 */ addiu $v1, $v0, 8 /* 3518 80028118 AC800004 */ sw $zero, 4($a0) /* 351C 8002811C AE430000 */ sw $v1, ($s2) /* 3520 80028120 3C03ED00 */ lui $v1, 0xed00 /* 3524 80028124 AC430000 */ sw $v1, ($v0) /* 3528 80028128 24430010 */ addiu $v1, $v0, 0x10 /* 352C 8002812C AC460004 */ sw $a2, 4($v0) /* 3530 80028130 AE430000 */ sw $v1, ($s2) /* 3534 80028134 3C030030 */ lui $v1, 0x30 /* 3538 80028138 AC43000C */ sw $v1, 0xc($v0) /* 353C 8002813C 00541821 */ addu $v1, $v0, $s4 /* 3540 80028140 AC450008 */ sw $a1, 8($v0) /* 3544 80028144 AE430000 */ sw $v1, ($s2) /* 3548 80028148 3C04800A */ lui $a0, 0x800a /* 354C 8002814C 8C84A64C */ lw $a0, -0x59b4($a0) /* 3550 80028150 24430020 */ addiu $v1, $v0, 0x20 /* 3554 80028154 AC470010 */ sw $a3, 0x10($v0) /* 3558 80028158 AC400014 */ sw $zero, 0x14($v0) /* 355C 8002815C AE430000 */ sw $v1, ($s2) /* 3560 80028160 24430028 */ addiu $v1, $v0, 0x28 /* 3564 80028164 AC480018 */ sw $t0, 0x18($v0) /* 3568 80028168 AC44001C */ sw $a0, 0x1c($v0) /* 356C 8002816C AE430000 */ sw $v1, ($s2) /* 3570 80028170 3C03F700 */ lui $v1, 0xf700 /* 3574 80028174 AC430020 */ sw $v1, 0x20($v0) /* 3578 80028178 24430030 */ addiu $v1, $v0, 0x30 /* 357C 8002817C AC490024 */ sw $t1, 0x24($v0) /* 3580 80028180 AE430000 */ sw $v1, ($s2) /* 3584 80028184 24430038 */ addiu $v1, $v0, 0x38 /* 3588 80028188 AC4A0028 */ sw $t2, 0x28($v0) /* 358C 8002818C AC40002C */ sw $zero, 0x2c($v0) /* 3590 80028190 AE430000 */ sw $v1, ($s2) /* 3594 80028194 24430040 */ addiu $v1, $v0, 0x40 /* 3598 80028198 AC450030 */ sw $a1, 0x30($v0) /* 359C 8002819C AC400034 */ sw $zero, 0x34($v0) /* 35A0 800281A0 AE430000 */ sw $v1, ($s2) /* 35A4 800281A4 24430048 */ addiu $v1, $v0, 0x48 /* 35A8 800281A8 AC4B0038 */ sw $t3, 0x38($v0) /* 35AC 800281AC AC40003C */ sw $zero, 0x3c($v0) /* 35B0 800281B0 AE430000 */ sw $v1, ($s2) /* 35B4 800281B4 24430050 */ addiu $v1, $v0, 0x50 /* 35B8 800281B8 AC4C0040 */ sw $t4, 0x40($v0) /* 35BC 800281BC AC400044 */ sw $zero, 0x44($v0) /* 35C0 800281C0 AE430000 */ sw $v1, ($s2) /* 35C4 800281C4 24430058 */ addiu $v1, $v0, 0x58 /* 35C8 800281C8 AC470048 */ sw $a3, 0x48($v0) /* 35CC 800281CC AC4D004C */ sw $t5, 0x4c($v0) /* 35D0 800281D0 AE430000 */ sw $v1, ($s2) /* 35D4 800281D4 AC4F0050 */ sw $t7, 0x50($v0) /* 35D8 800281D8 8FAE0018 */ lw $t6, 0x18($sp) /* 35DC 800281DC 24430060 */ addiu $v1, $v0, 0x60 /* 35E0 800281E0 AC4E0054 */ sw $t6, 0x54($v0) /* 35E4 800281E4 AE430000 */ sw $v1, ($s2) /* 35E8 800281E8 3C03FA00 */ lui $v1, 0xfa00 /* 35EC 800281EC AC430058 */ sw $v1, 0x58($v0) /* 35F0 800281F0 92C40003 */ lbu $a0, 3($s6) /* 35F4 800281F4 24430068 */ addiu $v1, $v0, 0x68 /* 35F8 800281F8 AE430000 */ sw $v1, ($s2) /* 35FC 800281FC AC500060 */ sw $s0, 0x60($v0) /* 3600 80028200 AC400064 */ sw $zero, 0x64($v0) /* 3604 80028204 00912025 */ or $a0, $a0, $s1 /* 3608 80028208 AC44005C */ sw $a0, 0x5c($v0) .L8002820C: /* 360C 8002820C 3C070400 */ lui $a3, 0x400 /* 3610 80028210 34E70400 */ ori $a3, $a3, 0x400 /* 3614 80028214 33060FFF */ andi $a2, $t8, 0xfff /* 3618 80028218 27180018 */ addiu $t8, $t8, 0x18 /* 361C 8002821C 32850FFF */ andi $a1, $s4, 0xfff /* 3620 80028220 26940018 */ addiu $s4, $s4, 0x18 /* 3624 80028224 27390001 */ addiu $t9, $t9, 1 /* 3628 80028228 8E430000 */ lw $v1, ($s2) /* 362C 8002822C 3C02800A */ lui $v0, 0x800a /* 3630 80028230 8C42A5DC */ lw $v0, -0x5a24($v0) /* 3634 80028234 0060202D */ daddu $a0, $v1, $zero /* 3638 80028238 24630008 */ addiu $v1, $v1, 8 /* 363C 8002823C 00531021 */ addu $v0, $v0, $s3 /* 3640 80028240 AE430000 */ sw $v1, ($s2) /* 3644 80028244 8FAE0010 */ lw $t6, 0x10($sp) /* 3648 80028248 26730F00 */ addiu $s3, $s3, 0xf00 /* 364C 8002824C AC820004 */ sw $v0, 4($a0) /* 3650 80028250 24620008 */ addiu $v0, $v1, 8 /* 3654 80028254 AC8E0000 */ sw $t6, ($a0) /* 3658 80028258 3C0E0700 */ lui $t6, 0x700 /* 365C 8002825C AE420000 */ sw $v0, ($s2) /* 3660 80028260 24620010 */ addiu $v0, $v1, 0x10 /* 3664 80028264 AC6E0004 */ sw $t6, 4($v1) /* 3668 80028268 3C0EE600 */ lui $t6, 0xe600 /* 366C 8002826C AC750000 */ sw $s5, ($v1) /* 3670 80028270 AE420000 */ sw $v0, ($s2) /* 3674 80028274 24620018 */ addiu $v0, $v1, 0x18 /* 3678 80028278 AC6E0008 */ sw $t6, 8($v1) /* 367C 8002827C 3C0EF400 */ lui $t6, 0xf400 /* 3680 80028280 AC60000C */ sw $zero, 0xc($v1) /* 3684 80028284 AE420000 */ sw $v0, ($s2) /* 3688 80028288 AC6E0010 */ sw $t6, 0x10($v1) /* 368C 8002828C 8FAE0014 */ lw $t6, 0x14($sp) /* 3690 80028290 24620020 */ addiu $v0, $v1, 0x20 /* 3694 80028294 AC6E0014 */ sw $t6, 0x14($v1) /* 3698 80028298 AE420000 */ sw $v0, ($s2) /* 369C 8002829C 24620028 */ addiu $v0, $v1, 0x28 /* 36A0 800282A0 AC770018 */ sw $s7, 0x18($v1) /* 36A4 800282A4 AC60001C */ sw $zero, 0x1c($v1) /* 36A8 800282A8 AE420000 */ sw $v0, ($s2) /* 36AC 800282AC 24620030 */ addiu $v0, $v1, 0x30 /* 36B0 800282B0 3C0EF200 */ lui $t6, 0xf200 /* 36B4 800282B4 AC750020 */ sw $s5, 0x20($v1) /* 36B8 800282B8 AC600024 */ sw $zero, 0x24($v1) /* 36BC 800282BC AE420000 */ sw $v0, ($s2) /* 36C0 800282C0 24620038 */ addiu $v0, $v1, 0x38 /* 36C4 800282C4 AC6E0028 */ sw $t6, 0x28($v1) /* 36C8 800282C8 3C0EE450 */ lui $t6, 0xe450 /* 36CC 800282CC 00AE2825 */ or $a1, $a1, $t6 /* 36D0 800282D0 AC7E002C */ sw $fp, 0x2c($v1) /* 36D4 800282D4 AE420000 */ sw $v0, ($s2) /* 36D8 800282D8 24620040 */ addiu $v0, $v1, 0x40 /* 36DC 800282DC AC650030 */ sw $a1, 0x30($v1) /* 36E0 800282E0 AC660034 */ sw $a2, 0x34($v1) /* 36E4 800282E4 AE420000 */ sw $v0, ($s2) /* 36E8 800282E8 3C02E100 */ lui $v0, 0xe100 /* 36EC 800282EC AC620038 */ sw $v0, 0x38($v1) /* 36F0 800282F0 3C02FFE0 */ lui $v0, 0xffe0 /* 36F4 800282F4 AC62003C */ sw $v0, 0x3c($v1) /* 36F8 800282F8 24620048 */ addiu $v0, $v1, 0x48 /* 36FC 800282FC AE420000 */ sw $v0, ($s2) /* 3700 80028300 3C02F100 */ lui $v0, 0xf100 /* 3704 80028304 AC620040 */ sw $v0, 0x40($v1) /* 3708 80028308 24620050 */ addiu $v0, $v1, 0x50 /* 370C 8002830C AC670044 */ sw $a3, 0x44($v1) /* 3710 80028310 AE420000 */ sw $v0, ($s2) /* 3714 80028314 2B220028 */ slti $v0, $t9, 0x28 /* 3718 80028318 AC770048 */ sw $s7, 0x48($v1) /* 371C 8002831C 1440FFBB */ bnez $v0, .L8002820C /* 3720 80028320 AC60004C */ sw $zero, 0x4c($v1) /* 3724 80028324 0800A1E4 */ j .L80028790 /* 3728 80028328 00000000 */ nop .L8002832C: /* 372C 8002832C 3C02800A */ lui $v0, %hi(D_8009A650) /* 3730 80028330 8C42A650 */ lw $v0, %lo(D_8009A650)($v0) /* 3734 80028334 30420008 */ andi $v0, $v0, 8 /* 3738 80028338 1040000E */ beqz $v0, .L80028374 /* 373C 8002833C 3C05FF10 */ lui $a1, 0xff10 /* 3740 80028340 34A5013F */ ori $a1, $a1, 0x13f /* 3744 80028344 3C03800A */ lui $v1, 0x800a /* 3748 80028348 2463A66C */ addiu $v1, $v1, -0x5994 /* 374C 8002834C 8C620000 */ lw $v0, ($v1) /* 3750 80028350 3C04800A */ lui $a0, 0x800a /* 3754 80028354 8C84A64C */ lw $a0, -0x59b4($a0) /* 3758 80028358 0040802D */ daddu $s0, $v0, $zero /* 375C 8002835C 24420008 */ addiu $v0, $v0, 8 /* 3760 80028360 AC620000 */ sw $v0, ($v1) /* 3764 80028364 0C0187A4 */ jal osVirtualToPhysical /* 3768 80028368 AE050000 */ sw $a1, ($s0) /* 376C 8002836C 0800A1ED */ j .L800287B4 /* 3770 80028370 AE020004 */ sw $v0, 4($s0) .L80028374: /* 3774 80028374 3C06E300 */ lui $a2, 0xe300 /* 3778 80028378 34C60A01 */ ori $a2, $a2, 0xa01 /* 377C 8002837C 3C07E200 */ lui $a3, 0xe200 /* 3780 80028380 34E7001C */ ori $a3, $a3, 0x1c /* 3784 80028384 3C08FF10 */ lui $t0, 0xff10 /* 3788 80028388 3508013F */ ori $t0, $t0, 0x13f /* 378C 8002838C 3C09FFFC */ lui $t1, 0xfffc /* 3790 80028390 3529FFFC */ ori $t1, $t1, 0xfffc /* 3794 80028394 3C0AF64F */ lui $t2, 0xf64f /* 3798 80028398 354AC3BC */ ori $t2, $t2, 0xc3bc /* 379C 8002839C 3C11800A */ lui $s1, 0x800a /* 37A0 800283A0 2631A66C */ addiu $s1, $s1, -0x5994 /* 37A4 800283A4 3C02FE00 */ lui $v0, 0xfe00 /* 37A8 800283A8 8E300000 */ lw $s0, ($s1) /* 37AC 800283AC 3C04800A */ lui $a0, 0x800a /* 37B0 800283B0 8C84A64C */ lw $a0, -0x59b4($a0) /* 37B4 800283B4 0200282D */ daddu $a1, $s0, $zero /* 37B8 800283B8 26100008 */ addiu $s0, $s0, 8 /* 37BC 800283BC AE300000 */ sw $s0, ($s1) /* 37C0 800283C0 3C03800A */ lui $v1, 0x800a /* 37C4 800283C4 8C63A5DC */ lw $v1, -0x5a24($v1) /* 37C8 800283C8 3C12F700 */ lui $s2, 0xf700 /* 37CC 800283CC ACA20000 */ sw $v0, ($a1) /* 37D0 800283D0 3C028000 */ lui $v0, 0x8000 /* 37D4 800283D4 00621821 */ addu $v1, $v1, $v0 /* 37D8 800283D8 26020008 */ addiu $v0, $s0, 8 /* 37DC 800283DC ACA30004 */ sw $v1, 4($a1) /* 37E0 800283E0 AE220000 */ sw $v0, ($s1) /* 37E4 800283E4 3C020030 */ lui $v0, 0x30 /* 37E8 800283E8 AE020004 */ sw $v0, 4($s0) /* 37EC 800283EC 26020010 */ addiu $v0, $s0, 0x10 /* 37F0 800283F0 AE060000 */ sw $a2, ($s0) /* 37F4 800283F4 AE220000 */ sw $v0, ($s1) /* 37F8 800283F8 26020018 */ addiu $v0, $s0, 0x18 /* 37FC 800283FC AE070008 */ sw $a3, 8($s0) /* 3800 80028400 AE00000C */ sw $zero, 0xc($s0) /* 3804 80028404 AE220000 */ sw $v0, ($s1) /* 3808 80028408 26020020 */ addiu $v0, $s0, 0x20 /* 380C 8002840C AE080010 */ sw $t0, 0x10($s0) /* 3810 80028410 AE030014 */ sw $v1, 0x14($s0) /* 3814 80028414 AE220000 */ sw $v0, ($s1) /* 3818 80028418 26020028 */ addiu $v0, $s0, 0x28 /* 381C 8002841C AE120018 */ sw $s2, 0x18($s0) /* 3820 80028420 AE09001C */ sw $t1, 0x1c($s0) /* 3824 80028424 AE220000 */ sw $v0, ($s1) /* 3828 80028428 26020030 */ addiu $v0, $s0, 0x30 /* 382C 8002842C AE0A0020 */ sw $t2, 0x20($s0) /* 3830 80028430 AE000024 */ sw $zero, 0x24($s0) /* 3834 80028434 AE220000 */ sw $v0, ($s1) /* 3838 80028438 3C02E700 */ lui $v0, 0xe700 /* 383C 8002843C AE020028 */ sw $v0, 0x28($s0) /* 3840 80028440 26020038 */ addiu $v0, $s0, 0x38 /* 3844 80028444 AE00002C */ sw $zero, 0x2c($s0) /* 3848 80028448 AE220000 */ sw $v0, ($s1) /* 384C 8002844C 0C0187A4 */ jal osVirtualToPhysical /* 3850 80028450 AE080030 */ sw $t0, 0x30($s0) /* 3854 80028454 8E230000 */ lw $v1, ($s1) /* 3858 80028458 AE020034 */ sw $v0, 0x34($s0) /* 385C 8002845C 0060282D */ daddu $a1, $v1, $zero /* 3860 80028460 ACB20000 */ sw $s2, ($a1) /* 3864 80028464 8664002C */ lh $a0, 0x2c($s3) /* 3868 80028468 24630008 */ addiu $v1, $v1, 8 /* 386C 8002846C AE230000 */ sw $v1, ($s1) /* 3870 80028470 8663002E */ lh $v1, 0x2e($s3) /* 3874 80028474 96620030 */ lhu $v0, 0x30($s3) /* 3878 80028478 00042200 */ sll $a0, $a0, 8 /* 387C 8002847C 3084F800 */ andi $a0, $a0, 0xf800 /* 3880 80028480 000318C0 */ sll $v1, $v1, 3 /* 3884 80028484 306307C0 */ andi $v1, $v1, 0x7c0 /* 3888 80028488 00832025 */ or $a0, $a0, $v1 /* 388C 8002848C 00021082 */ srl $v0, $v0, 2 /* 3890 80028490 3042003E */ andi $v0, $v0, 0x3e /* 3894 80028494 00822025 */ or $a0, $a0, $v0 /* 3898 80028498 34820001 */ ori $v0, $a0, 1 /* 389C 8002849C 00021400 */ sll $v0, $v0, 0x10 /* 38A0 800284A0 34420001 */ ori $v0, $v0, 1 /* 38A4 800284A4 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 38A8 800284A8 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 38AC 800284AC 00441025 */ or $v0, $v0, $a0 /* 38B0 800284B0 ACA20004 */ sw $v0, 4($a1) /* 38B4 800284B4 8470014A */ lh $s0, 0x14a($v1) /* 38B8 800284B8 8462014E */ lh $v0, 0x14e($v1) /* 38BC 800284BC 8471014C */ lh $s1, 0x14c($v1) /* 38C0 800284C0 0202A021 */ addu $s4, $s0, $v0 /* 38C4 800284C4 84620150 */ lh $v0, 0x150($v1) /* 38C8 800284C8 8663000E */ lh $v1, 0xe($s3) /* 38CC 800284CC 02229021 */ addu $s2, $s1, $v0 /* 38D0 800284D0 0203102A */ slt $v0, $s0, $v1 /* 38D4 800284D4 54400001 */ bnel $v0, $zero, .L800284DC /* 38D8 800284D8 0060802D */ daddu $s0, $v1, $zero .L800284DC: /* 38DC 800284DC 86640010 */ lh $a0, 0x10($s3) /* 38E0 800284E0 0224102A */ slt $v0, $s1, $a0 /* 38E4 800284E4 54400001 */ bnel $v0, $zero, .L800284EC /* 38E8 800284E8 0080882D */ daddu $s1, $a0, $zero .L800284EC: /* 38EC 800284EC 8662000A */ lh $v0, 0xa($s3) /* 38F0 800284F0 00621821 */ addu $v1, $v1, $v0 /* 38F4 800284F4 0074102A */ slt $v0, $v1, $s4 /* 38F8 800284F8 54400001 */ bnel $v0, $zero, .L80028500 /* 38FC 800284FC 0060A02D */ daddu $s4, $v1, $zero .L80028500: /* 3900 80028500 8662000C */ lh $v0, 0xc($s3) /* 3904 80028504 00821821 */ addu $v1, $a0, $v0 /* 3908 80028508 0072102A */ slt $v0, $v1, $s2 /* 390C 8002850C 54400001 */ bnel $v0, $zero, .L80028514 /* 3910 80028510 0060902D */ daddu $s2, $v1, $zero .L80028514: /* 3914 80028514 06020001 */ bltzl $s0, .L8002851C /* 3918 80028518 0000802D */ daddu $s0, $zero, $zero .L8002851C: /* 391C 8002851C 06220001 */ bltzl $s1, .L80028524 /* 3920 80028520 0000882D */ daddu $s1, $zero, $zero .L80028524: /* 3924 80028524 5A800001 */ blezl $s4, .L8002852C /* 3928 80028528 24140001 */ addiu $s4, $zero, 1 .L8002852C: /* 392C 8002852C 5A400001 */ blezl $s2, .L80028534 /* 3930 80028530 24120001 */ addiu $s2, $zero, 1 .L80028534: /* 3934 80028534 2A020140 */ slti $v0, $s0, 0x140 /* 3938 80028538 50400001 */ beql $v0, $zero, .L80028540 /* 393C 8002853C 2410013F */ addiu $s0, $zero, 0x13f .L80028540: /* 3940 80028540 2A2200F0 */ slti $v0, $s1, 0xf0 /* 3944 80028544 50400001 */ beql $v0, $zero, .L8002854C /* 3948 80028548 241100EF */ addiu $s1, $zero, 0xef .L8002854C: /* 394C 8002854C 2A820141 */ slti $v0, $s4, 0x141 /* 3950 80028550 50400001 */ beql $v0, $zero, .L80028558 /* 3954 80028554 24140140 */ addiu $s4, $zero, 0x140 .L80028558: /* 3958 80028558 2A4200F1 */ slti $v0, $s2, 0xf1 /* 395C 8002855C 50400001 */ beql $v0, $zero, .L80028564 /* 3960 80028560 241200F0 */ addiu $s2, $zero, 0xf0 .L80028564: /* 3964 80028564 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 3968 80028568 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 396C 8002856C 94420148 */ lhu $v0, 0x148($v0) /* 3970 80028570 30420001 */ andi $v0, $v0, 1 /* 3974 80028574 14400017 */ bnez $v0, .L800285D4 /* 3978 80028578 3C04F600 */ lui $a0, 0xf600 /* 397C 8002857C 3C03800A */ lui $v1, 0x800a /* 3980 80028580 2463A66C */ addiu $v1, $v1, -0x5994 /* 3984 80028584 8C620000 */ lw $v0, ($v1) /* 3988 80028588 0040282D */ daddu $a1, $v0, $zero /* 398C 8002858C 24420008 */ addiu $v0, $v0, 8 /* 3990 80028590 AC620000 */ sw $v0, ($v1) /* 3994 80028594 2683FFFF */ addiu $v1, $s4, -1 /* 3998 80028598 306303FF */ andi $v1, $v1, 0x3ff /* 399C 8002859C 00031B80 */ sll $v1, $v1, 0xe /* 39A0 800285A0 2642FFFF */ addiu $v0, $s2, -1 /* 39A4 800285A4 304203FF */ andi $v0, $v0, 0x3ff /* 39A8 800285A8 00021080 */ sll $v0, $v0, 2 /* 39AC 800285AC 00441025 */ or $v0, $v0, $a0 /* 39B0 800285B0 00621825 */ or $v1, $v1, $v0 /* 39B4 800285B4 ACA30000 */ sw $v1, ($a1) /* 39B8 800285B8 320303FF */ andi $v1, $s0, 0x3ff /* 39BC 800285BC 00031B80 */ sll $v1, $v1, 0xe /* 39C0 800285C0 322203FF */ andi $v0, $s1, 0x3ff /* 39C4 800285C4 00021080 */ sll $v0, $v0, 2 /* 39C8 800285C8 00621825 */ or $v1, $v1, $v0 /* 39CC 800285CC 0800A177 */ j .L800285DC /* 39D0 800285D0 ACA30004 */ sw $v1, 4($a1) .L800285D4: /* 39D4 800285D4 0C0517B0 */ jal func_80145EC0 /* 39D8 800285D8 00000000 */ nop .L800285DC: /* 39DC 800285DC 3C04E300 */ lui $a0, 0xe300 /* 39E0 800285E0 34840A01 */ ori $a0, $a0, 0xa01 /* 39E4 800285E4 3C05E200 */ lui $a1, 0xe200 /* 39E8 800285E8 34A5001C */ ori $a1, $a1, 0x1c /* 39EC 800285EC 3C060001 */ lui $a2, 1 /* 39F0 800285F0 3C08800A */ lui $t0, 0x800a /* 39F4 800285F4 2508A66C */ addiu $t0, $t0, -0x5994 /* 39F8 800285F8 34C60001 */ ori $a2, $a2, 1 /* 39FC 800285FC 8D070000 */ lw $a3, ($t0) /* 3A00 80028600 3C03E700 */ lui $v1, 0xe700 /* 3A04 80028604 00E0102D */ daddu $v0, $a3, $zero /* 3A08 80028608 24E70008 */ addiu $a3, $a3, 8 /* 3A0C 8002860C AD070000 */ sw $a3, ($t0) /* 3A10 80028610 AC430000 */ sw $v1, ($v0) /* 3A14 80028614 AC400004 */ sw $zero, 4($v0) /* 3A18 80028618 24E20008 */ addiu $v0, $a3, 8 /* 3A1C 8002861C AD020000 */ sw $v0, ($t0) /* 3A20 80028620 3C020030 */ lui $v0, 0x30 /* 3A24 80028624 ACE20004 */ sw $v0, 4($a3) /* 3A28 80028628 24E20010 */ addiu $v0, $a3, 0x10 /* 3A2C 8002862C ACE40000 */ sw $a0, ($a3) /* 3A30 80028630 AD020000 */ sw $v0, ($t0) /* 3A34 80028634 24E20018 */ addiu $v0, $a3, 0x18 /* 3A38 80028638 ACE50008 */ sw $a1, 8($a3) /* 3A3C 8002863C ACE0000C */ sw $zero, 0xc($a3) /* 3A40 80028640 AD020000 */ sw $v0, ($t0) /* 3A44 80028644 3C02F700 */ lui $v0, 0xf700 /* 3A48 80028648 ACE20010 */ sw $v0, 0x10($a3) /* 3A4C 8002864C 24E20020 */ addiu $v0, $a3, 0x20 /* 3A50 80028650 ACE60014 */ sw $a2, 0x14($a3) /* 3A54 80028654 AD020000 */ sw $v0, ($t0) /* 3A58 80028658 ACE30018 */ sw $v1, 0x18($a3) /* 3A5C 8002865C 1A20000F */ blez $s1, .L8002869C /* 3A60 80028660 ACE0001C */ sw $zero, 0x1c($a3) /* 3A64 80028664 3C03F64F */ lui $v1, 0xf64f /* 3A68 80028668 3463C000 */ ori $v1, $v1, 0xc000 /* 3A6C 8002866C 24E20028 */ addiu $v0, $a3, 0x28 /* 3A70 80028670 AD020000 */ sw $v0, ($t0) /* 3A74 80028674 2622FFFF */ addiu $v0, $s1, -1 /* 3A78 80028678 304203FF */ andi $v0, $v0, 0x3ff /* 3A7C 8002867C 00021080 */ sll $v0, $v0, 2 /* 3A80 80028680 00431025 */ or $v0, $v0, $v1 /* 3A84 80028684 ACE20020 */ sw $v0, 0x20($a3) /* 3A88 80028688 24E20030 */ addiu $v0, $a3, 0x30 /* 3A8C 8002868C ACE00024 */ sw $zero, 0x24($a3) /* 3A90 80028690 AD020000 */ sw $v0, ($t0) /* 3A94 80028694 ACE00028 */ sw $zero, 0x28($a3) /* 3A98 80028698 ACE0002C */ sw $zero, 0x2c($a3) .L8002869C: /* 3A9C 8002869C 1A000015 */ blez $s0, .L800286F4 /* 3AA0 800286A0 2603FFFF */ addiu $v1, $s0, -1 /* 3AA4 800286A4 306303FF */ andi $v1, $v1, 0x3ff /* 3AA8 800286A8 00031B80 */ sll $v1, $v1, 0xe /* 3AAC 800286AC 2642FFFF */ addiu $v0, $s2, -1 /* 3AB0 800286B0 304203FF */ andi $v0, $v0, 0x3ff /* 3AB4 800286B4 00021080 */ sll $v0, $v0, 2 /* 3AB8 800286B8 3C04F600 */ lui $a0, 0xf600 /* 3ABC 800286BC 00441025 */ or $v0, $v0, $a0 /* 3AC0 800286C0 00621825 */ or $v1, $v1, $v0 /* 3AC4 800286C4 322203FF */ andi $v0, $s1, 0x3ff /* 3AC8 800286C8 8D050000 */ lw $a1, ($t0) /* 3ACC 800286CC 00021080 */ sll $v0, $v0, 2 /* 3AD0 800286D0 00A0302D */ daddu $a2, $a1, $zero /* 3AD4 800286D4 24A50008 */ addiu $a1, $a1, 8 /* 3AD8 800286D8 AD050000 */ sw $a1, ($t0) /* 3ADC 800286DC ACC20004 */ sw $v0, 4($a2) /* 3AE0 800286E0 24A20008 */ addiu $v0, $a1, 8 /* 3AE4 800286E4 ACC30000 */ sw $v1, ($a2) /* 3AE8 800286E8 AD020000 */ sw $v0, ($t0) /* 3AEC 800286EC ACA00000 */ sw $zero, ($a1) /* 3AF0 800286F0 ACA00004 */ sw $zero, 4($a1) .L800286F4: /* 3AF4 800286F4 2A820140 */ slti $v0, $s4, 0x140 /* 3AF8 800286F8 10400015 */ beqz $v0, .L80028750 /* 3AFC 800286FC 3C03F64F */ lui $v1, 0xf64f /* 3B00 80028700 3463C000 */ ori $v1, $v1, 0xc000 /* 3B04 80028704 2642FFFF */ addiu $v0, $s2, -1 /* 3B08 80028708 304203FF */ andi $v0, $v0, 0x3ff /* 3B0C 8002870C 00021080 */ sll $v0, $v0, 2 /* 3B10 80028710 00431025 */ or $v0, $v0, $v1 /* 3B14 80028714 328303FF */ andi $v1, $s4, 0x3ff /* 3B18 80028718 8D040000 */ lw $a0, ($t0) /* 3B1C 8002871C 00031B80 */ sll $v1, $v1, 0xe /* 3B20 80028720 0080282D */ daddu $a1, $a0, $zero /* 3B24 80028724 24840008 */ addiu $a0, $a0, 8 /* 3B28 80028728 AD040000 */ sw $a0, ($t0) /* 3B2C 8002872C ACA20000 */ sw $v0, ($a1) /* 3B30 80028730 322203FF */ andi $v0, $s1, 0x3ff /* 3B34 80028734 00021080 */ sll $v0, $v0, 2 /* 3B38 80028738 00621825 */ or $v1, $v1, $v0 /* 3B3C 8002873C 24820008 */ addiu $v0, $a0, 8 /* 3B40 80028740 ACA30004 */ sw $v1, 4($a1) /* 3B44 80028744 AD020000 */ sw $v0, ($t0) /* 3B48 80028748 AC800000 */ sw $zero, ($a0) /* 3B4C 8002874C AC800004 */ sw $zero, 4($a0) .L80028750: /* 3B50 80028750 2A4200F0 */ slti $v0, $s2, 0xf0 /* 3B54 80028754 1040000E */ beqz $v0, .L80028790 /* 3B58 80028758 3C02F64F */ lui $v0, 0xf64f /* 3B5C 8002875C 8D030000 */ lw $v1, ($t0) /* 3B60 80028760 3442C3BC */ ori $v0, $v0, 0xc3bc /* 3B64 80028764 0060202D */ daddu $a0, $v1, $zero /* 3B68 80028768 24630008 */ addiu $v1, $v1, 8 /* 3B6C 8002876C AD030000 */ sw $v1, ($t0) /* 3B70 80028770 AC820000 */ sw $v0, ($a0) /* 3B74 80028774 324203FF */ andi $v0, $s2, 0x3ff /* 3B78 80028778 00021080 */ sll $v0, $v0, 2 /* 3B7C 8002877C AC820004 */ sw $v0, 4($a0) /* 3B80 80028780 24620008 */ addiu $v0, $v1, 8 /* 3B84 80028784 AD020000 */ sw $v0, ($t0) /* 3B88 80028788 AC600000 */ sw $zero, ($v1) /* 3B8C 8002878C AC600004 */ sw $zero, 4($v1) .L80028790: /* 3B90 80028790 3C03800A */ lui $v1, 0x800a /* 3B94 80028794 2463A66C */ addiu $v1, $v1, -0x5994 /* 3B98 80028798 8C620000 */ lw $v0, ($v1) /* 3B9C 8002879C 0040202D */ daddu $a0, $v0, $zero /* 3BA0 800287A0 24420008 */ addiu $v0, $v0, 8 /* 3BA4 800287A4 AC620000 */ sw $v0, ($v1) /* 3BA8 800287A8 3C02E700 */ lui $v0, 0xe700 /* 3BAC 800287AC AC820000 */ sw $v0, ($a0) /* 3BB0 800287B0 AC800004 */ sw $zero, 4($a0) .L800287B4: /* 3BB4 800287B4 8FBF0044 */ lw $ra, 0x44($sp) /* 3BB8 800287B8 8FBE0040 */ lw $fp, 0x40($sp) /* 3BBC 800287BC 8FB7003C */ lw $s7, 0x3c($sp) /* 3BC0 800287C0 8FB60038 */ lw $s6, 0x38($sp) /* 3BC4 800287C4 8FB50034 */ lw $s5, 0x34($sp) /* 3BC8 800287C8 8FB40030 */ lw $s4, 0x30($sp) /* 3BCC 800287CC 8FB3002C */ lw $s3, 0x2c($sp) /* 3BD0 800287D0 8FB20028 */ lw $s2, 0x28($sp) /* 3BD4 800287D4 8FB10024 */ lw $s1, 0x24($sp) /* 3BD8 800287D8 8FB00020 */ lw $s0, 0x20($sp) /* 3BDC 800287DC 03E00008 */ jr $ra /* 3BE0 800287E0 27BD0048 */ addiu $sp, $sp, 0x48 /* 3BE4 800287E4 00000000 */ nop /* 3BE8 800287E8 00000000 */ nop /* 3BEC 800287EC 00000000 */ nop